Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_entry.c ewl_entry.h Log Message: Patch from mekius_ to show and hide the cursor on focus changes. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_entry.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ewl_entry.c 6 Jul 2005 13:44:39 -0000 1.19 +++ ewl_entry.c 9 Jul 2005 04:12:44 -0000 1.20 @@ -53,6 +53,10 @@ ewl_entry_editable_set(e, TRUE); /* setup callbacks */ + ewl_callback_append(w, EWL_CALLBACK_SELECT, + ewl_entry_cb_selected, NULL); + ewl_callback_append(w, EWL_CALLBACK_DESELECT, + ewl_entry_cb_deselected, NULL); ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, ewl_entry_cb_configure, NULL); ewl_callback_append(w, EWL_CALLBACK_MOUSE_DOWN, @@ -155,6 +159,22 @@ DLEAVE_FUNCTION(DLEVEL_STABLE); } +void +ewl_entry_cb_selected(Ewl_Widget *w, void *ev, void *data) +{ + Ewl_Entry *entry = w; + + ewl_widget_show(entry->cursor); +} + +void +ewl_entry_cb_deselected(Ewl_Widget *w, void *ev, void *data) +{ + Ewl_Entry *entry = w; + + ewl_widget_hide(entry->cursor); +} + void ewl_entry_cb_key_down(Ewl_Widget *w, void *ev, void *data) { =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_entry.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ewl_entry.h 6 Jul 2005 13:44:39 -0000 1.7 +++ ewl_entry.h 9 Jul 2005 04:12:45 -0000 1.8 @@ -31,6 +31,8 @@ void ewl_entry_cb_mouse_down(Ewl_Widget *w, void *ev, void *data); void ewl_entry_cb_mouse_up(Ewl_Widget *w, void *ev, void *data); void ewl_entry_cb_mouse_move(Ewl_Widget *w, void *ev, void *data); +void ewl_entry_cb_selected(Ewl_Widget *w, void *ev, void *data); +void ewl_entry_cb_deselected(Ewl_Widget *w, void *ev, void *data); void ewl_entry_cursor_move_left(Ewl_Entry *e); void ewl_entry_cursor_move_right(Ewl_Entry *e); ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs