Download

Support

lib/ewl_entry.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_ENTRY_H
00003 #define EWL_ENTRY_H
00004 
00005 #include "ewl_text.h"
00006 #include "ewl_view.h"
00007 
00024 #define EWL_ENTRY_TYPE "entry"
00025 
00030 #define EWL_ENTRY_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_ENTRY_TYPE))
00031 
00036 #define EWL_ENTRY_CURSOR_TYPE "cursor"
00037 
00042 #define EWL_ENTRY_CURSOR_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_ENTRY_CURSOR_TYPE))
00043 
00048 #define EWL_ENTRY(entry) ((Ewl_Entry *) entry)
00049 
00053 typedef struct Ewl_Entry Ewl_Entry;
00054 
00058 struct Ewl_Entry
00059 {
00060         Ewl_Text         text;                        
00061         Ewl_Widget        *cursor;                
00063         unsigned int         multiline:1;                
00064         unsigned int         editable:1;                
00065         unsigned int         in_select_mode:1;        
00066 };
00067 
00068 Ewl_Widget      *ewl_entry_new(void);
00069 Ewl_Widget      *ewl_password_new(void);
00070 int              ewl_entry_init(Ewl_Entry *e);
00071 
00072 void             ewl_entry_multiline_set(Ewl_Entry *e, unsigned int multiline);
00073 unsigned int     ewl_entry_multiline_get(Ewl_Entry *e);
00074 
00075 void             ewl_entry_editable_set(Ewl_Entry *e, unsigned int editable);
00076 unsigned int     ewl_entry_editable_get(Ewl_Entry *e);
00077 
00078 unsigned int     ewl_entry_selection_clear(Ewl_Entry *e);
00079 
00080 /*
00081  * Internal stuff
00082  */
00083 void ewl_entry_cb_configure(Ewl_Widget *w, void *ev, void *data);
00084 void ewl_entry_cb_key_down(Ewl_Widget *w, void *ev, void *data);
00085 void ewl_entry_cb_mouse_down(Ewl_Widget *w, void *ev, void *data);
00086 void ewl_entry_cb_mouse_up(Ewl_Widget *w, void *ev, void *data);
00087 void ewl_entry_cb_mouse_move(Ewl_Widget *w, void *ev, void *data);
00088 void ewl_entry_cb_focus_in(Ewl_Widget *w, void *ev, void *data);
00089 void ewl_entry_cb_focus_out(Ewl_Widget *w, void *ev, void *data);
00090 void ewl_entry_cb_disable(Ewl_Widget *w, void *ev, void *data);
00091 void ewl_entry_cb_enable(Ewl_Widget *w, void *ev, void *data);
00092 void ewl_entry_cb_dnd_position(Ewl_Widget *w, void *ev, void *data);
00093 void ewl_entry_cb_dnd_data(Ewl_Widget *w, void *ev, void *data);
00094 
00095 void ewl_entry_cursor_move_left(Ewl_Entry *e);
00096 void ewl_entry_cursor_move_right(Ewl_Entry *e);
00097 void ewl_entry_cursor_move_up(Ewl_Entry *e);
00098 void ewl_entry_cursor_move_down(Ewl_Entry *e);
00099 
00100 void ewl_entry_cursor_move_start(Ewl_Entry *e);
00101 void ewl_entry_cursor_move_end(Ewl_Entry *e);
00102 void ewl_entry_cursor_move_line_start(Ewl_Entry *e);
00103 void ewl_entry_cursor_move_line_end(Ewl_Entry *e);
00104 void ewl_entry_cursor_move_word_previous(Ewl_Entry *e);
00105 void ewl_entry_cursor_move_word_next(Ewl_Entry *e);
00106 
00107 
00108 void ewl_entry_delete_left(Ewl_Entry *e);
00109 void ewl_entry_delete_right(Ewl_Entry *e);
00110 
00111 /*
00112  * cursor stuff
00113  */
00114 
00119 #define EWL_ENTRY_CURSOR(cursor) ((Ewl_Entry_Cursor *) cursor)
00120 
00124 typedef struct Ewl_Entry_Cursor Ewl_Entry_Cursor;
00125 
00129 struct Ewl_Entry_Cursor
00130 {
00131         Ewl_Widget      widget;        
00132         Ewl_Entry       *parent;        
00133 };
00134 
00135 Ewl_Widget      *ewl_entry_cursor_new(Ewl_Entry *parent);
00136 int              ewl_entry_cursor_init(Ewl_Entry_Cursor *c, Ewl_Entry *parent);
00137 void             ewl_entry_cursor_position_set(Ewl_Entry_Cursor *c,
00138                                         unsigned int pos);
00139 unsigned int     ewl_entry_cursor_position_get(Ewl_Entry_Cursor *c);
00140 
00145 #endif
00146 

Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:48:49 2009