From: <enl...@li...> - 2004-02-19 21:55:57
|
Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl Dir : e17/libs/ewl/src Modified Files: Ewl.h ewl_embed.c ewl_embed.h ewl_events.h ewl_widget.c Log Message: Some changes in the signals emitted to fit better with edje. Added some documentation about layers and the beginnings of some event structures. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/Ewl.h,v retrieving revision 1.44 retrieving revision 1.45 diff -u -3 -r1.44 -r1.45 --- Ewl.h 12 Feb 2004 06:34:12 -0000 1.44 +++ Ewl.h 19 Feb 2004 21:45:02 -0000 1.45 @@ -203,6 +203,39 @@ */ /** + * @page layering Layering Scheme + * + * As widgets are placed inside containers, there becomes the issue of + * specifying which gets drawn on top. It is important that the widgets placed + * inside of a container are above the container's background, or the user + * would be unable to view the placed widgets. + * + * @image html e_mini.png + * + * The current scheme to accomplish this is that each widget has a layer + * field. This field is an integer that indicates an offset relative to it's + * parent containers layer. The default value is 5, which raises any widgets + * inside of a container 5 layers above the container. This use of offsets + * allows for children that have the same level of nesting to be at the same + * layer in the Evas. + * + * @image html e_mini.png + * + * Unfortunately, this also means that if two containers overlap, the children + * may seem to intermingle as they are above the layers of their containers. + * So far this has not become an issue, but it may in the future. See the + * diagram below for further information. + * + * @image html layer-problem.png + * + * @image html e_mini.png + * + * One issue that did occur was with the imenu's popup portion. It was placed + * at the first level above the window, so the contents of the menu were + * overlapped by items placed in nested containers in the window. + */ + +/** * @page images Documentation Images * * Miniature E logo. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- ewl_embed.c 17 Feb 2004 05:18:38 -0000 1.23 +++ ewl_embed.c 19 Feb 2004 21:45:02 -0000 1.24 @@ -93,7 +93,7 @@ ewl_callback_prepend(EWL_WIDGET(w), EWL_CALLBACK_DESTROY, ewl_embed_destroy_cb, NULL); - w->max_layer = LAYER(w) = -1000; + LAYER(w) = -1000; ewd_list_append(ewl_embed_list, w); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ewl_embed.h 17 Feb 2004 05:18:38 -0000 1.14 +++ ewl_embed.h 19 Feb 2004 21:45:02 -0000 1.15 @@ -40,7 +40,6 @@ Evas_Object *smart; /**< Object to manipulate Ewl_Embed from evas */ Ewd_List *tab_order; /**< Order of widgets to send focus on tab */ - int max_layer; /**< The highest layer used by sub-widget */ }; Ewl_Widget *ewl_embed_new(void); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_events.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ewl_events.h 13 Feb 2004 06:25:20 -0000 1.14 +++ ewl_events.h 19 Feb 2004 21:45:02 -0000 1.15 @@ -8,7 +8,63 @@ * @{ */ -int ewl_ev_init(void); +typedef struct Ewl_Event_Window_Expose Ewl_Event_Window_Expose; + +struct Ewl_Event_Window_Expose +{ + int x, y, w, h; +}; + +typedef struct Ewl_Event_Window_Configure Ewl_Event_Window_Configure; + +struct Ewl_Event_Window_Configure +{ + int x, y, w, h; +}; + +typedef struct Ewl_Event_Window_Delete Ewl_Event_Window_Delete; + +struct Ewl_Event_Window_Delete +{ +}; + +typedef struct Ewl_Event_Key_Down Ewl_Event_Key_Down; + +struct Ewl_Event_Key_Down +{ +}; + +typedef struct Ewl_Event_Key_Up Ewl_Event_Key_Up; + +struct Ewl_Event_Key_Up +{ +}; + +typedef struct Ewl_Event_Mouse_Down Ewl_Event_Mouse_Down; + +struct Ewl_Event_Mouse_Down +{ +}; + +typedef struct Ewl_Event_Mouse_Up Ewl_Event_Mouse_Up; + +struct Ewl_Event_Mouse_Up +{ +}; + +typedef struct Ewl_Event_Mouse_Move Ewl_Event_Mouse_Move; + +struct Ewl_Event_Mouse_Move +{ +}; + +typedef struct Ewl_Event_Mouse_Out Ewl_Event_Mouse_Out; + +struct Ewl_Event_Mouse_Out +{ +}; + +int ewl_ev_init(void); int ewl_ev_window_expose(void *data, int type, void *_ev); int ewl_ev_window_configure(void *data, int type, void *_ev); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -3 -r1.99 -r1.100 --- ewl_widget.c 17 Feb 2004 05:18:38 -0000 1.99 +++ ewl_widget.c 19 Feb 2004 21:45:02 -0000 1.100 @@ -1260,7 +1260,6 @@ DRETURN(DLEVEL_STABLE); ewl_widget_set_state(w, "mouse,out"); - ewl_widget_set_state(w, "default"); } void @@ -1282,12 +1281,13 @@ if (ewl_object_has_state(EWL_OBJECT(w), EWL_FLAG_STATE_DISABLED)) DRETURN(DLEVEL_STABLE); + ewl_widget_set_state(w, "mouse,up"); if (ewl_object_has_state(EWL_OBJECT(w), EWL_FLAG_STATE_HILITED)) { ewl_widget_set_state(w, "mouse,in"); ewl_callback_call_with_event_data(w, EWL_CALLBACK_CLICKED, ev_data); } else - ewl_widget_set_state(w, "default"); + ewl_widget_set_state(w, "mouse,out"); } void |