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 Ewl_View        *ewl_entry_view_get(void);
00080 
00081 /*
00082  * Internal stuff
00083  */
00084 void ewl_entry_cb_configure(Ewl_Widget *w, void *ev, void *data);
00085 void ewl_entry_cb_key_down(Ewl_Widget *w, void *ev, void *data);
00086 void ewl_entry_cb_mouse_down(Ewl_Widget *w, void *ev, void *data);
00087 void ewl_entry_cb_mouse_up(Ewl_Widget *w, void *ev, void *data);
00088 void ewl_entry_cb_mouse_move(Ewl_Widget *w, void *ev, void *data);
00089 void ewl_entry_cb_focus_in(Ewl_Widget *w, void *ev, void *data);
00090 void ewl_entry_cb_focus_out(Ewl_Widget *w, void *ev, void *data);
00091 void ewl_entry_cb_disable(Ewl_Widget *w, void *ev, void *data);
00092 void ewl_entry_cb_enable(Ewl_Widget *w, void *ev, void *data);
00093 void ewl_entry_cb_dnd_position(Ewl_Widget *w, void *ev, void *data);
00094 void ewl_entry_cb_dnd_data(Ewl_Widget *w, void *ev, void *data);
00095 
00096 void ewl_entry_cursor_move_left(Ewl_Entry *e);
00097 void ewl_entry_cursor_move_right(Ewl_Entry *e);
00098 void ewl_entry_cursor_move_up(Ewl_Entry *e);
00099 void ewl_entry_cursor_move_down(Ewl_Entry *e);
00100 void ewl_entry_delete_left(Ewl_Entry *e);
00101 void ewl_entry_delete_right(Ewl_Entry *e);
00102 
00103 /*
00104  * cursor stuff
00105  */
00106 
00111 #define EWL_ENTRY_CURSOR(cursor) ((Ewl_Entry_Cursor *) cursor)
00112 
00116 typedef struct Ewl_Entry_Cursor Ewl_Entry_Cursor;
00117 
00121 struct Ewl_Entry_Cursor
00122 {
00123         Ewl_Widget         widget;        
00124         Ewl_Entry        *parent;        
00125 };
00126 
00127 Ewl_Widget         *ewl_entry_cursor_new(Ewl_Entry *parent);
00128 int                 ewl_entry_cursor_init(Ewl_Entry_Cursor *c, Ewl_Entry *parent);
00129 void                 ewl_entry_cursor_position_set(Ewl_Entry_Cursor *c, unsigned int pos);
00130 unsigned int         ewl_entry_cursor_position_get(Ewl_Entry_Cursor *c);
00131 
00136 #endif
00137 

Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:49:04 2008