From: <enl...@li...> - 2004-03-10 21:45:06
|
Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl Dir : e17/libs/ewl/src Modified Files: ewl_embed.c ewl_embed.h ewl_events.c ewl_events.h ewl_window.c Log Message: More progress towards EWL working on the FB. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- ewl_embed.c 4 Mar 2004 00:29:20 -0000 1.28 +++ ewl_embed.c 10 Mar 2004 21:19:00 -0000 1.29 @@ -305,10 +305,9 @@ * @brief Sends the event for a mouse button press into an embed. */ void -ewl_embed_feed_mouse_down(Ewl_Embed *embed, int b, int x, int y, unsigned - int mods) +ewl_embed_feed_mouse_down(Ewl_Embed *embed, int b, int clicks, int x, int y, + unsigned int mods) { - int double_click = 0; Ewl_Event_Mouse_Down ev; Ewl_Widget *temp = NULL; Ewl_Widget *widget = NULL; @@ -331,6 +330,7 @@ ev.x = x; ev.y = y; ev.button = b; + ev.clicks = clicks; /* * While the mouse is down the widget has a pressed state, the widget @@ -347,7 +347,7 @@ ewl_callback_call_with_event_data(temp, EWL_CALLBACK_MOUSE_DOWN, &ev); - if (double_click) { + if (ev.clicks > 1) { ewl_callback_call_with_event_data(temp, EWL_CALLBACK_DOUBLE_CLICKED, &ev); @@ -929,7 +929,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); embed = evas_object_smart_data_get(obj); - ewl_embed_feed_mouse_down(embed, ev->button, ev->canvas.x, + ewl_embed_feed_mouse_down(embed, ev->button, 1, ev->canvas.x, ev->canvas.y, ewl_ev_get_modifiers()); DLEAVE_FUNCTION(DLEVEL_STABLE); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- ewl_embed.h 27 Feb 2004 18:46:49 -0000 1.18 +++ ewl_embed.h 10 Mar 2004 21:19:00 -0000 1.19 @@ -50,8 +50,8 @@ unsigned int modifiers); void ewl_embed_feed_key_up(Ewl_Embed *embed, char *keyname, unsigned int modifiers); -void ewl_embed_feed_mouse_down(Ewl_Embed *embed, int b, int x, - int y, unsigned int modifiers); +void ewl_embed_feed_mouse_down(Ewl_Embed *embed, int b, int clicks, + int x, int y, unsigned int modifiers); void ewl_embed_feed_mouse_up(Ewl_Embed *embed, int b, int x, int y, unsigned int modifiers); void ewl_embed_feed_mouse_move(Ewl_Embed *embed, int x, int y, =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_events.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- ewl_events.c 6 Mar 2004 05:25:44 -0000 1.57 +++ ewl_events.c 10 Mar 2004 21:19:00 -0000 1.58 @@ -325,7 +325,8 @@ */ int ewl_ev_x_mouse_down(void *data, int type, void *e) { - Ewl_Embed *embed; + int clicks = 1; + Ewl_Embed *embed; Ecore_X_Event_Mouse_Button_Down *ev; DENTER_FUNCTION(DLEVEL_STABLE); @@ -336,7 +337,12 @@ if (!embed) DRETURN_INT(TRUE, DLEVEL_STABLE); - ewl_embed_feed_mouse_down(embed, ev->button, ev->x, ev->y, + if (ev->double_click) + clicks = 2; + if (ev->triple_click) + clicks = 3; + + ewl_embed_feed_mouse_down(embed, ev->button, clicks, ev->x, ev->y, key_modifiers); DRETURN_INT(TRUE, DLEVEL_STABLE); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_events.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- ewl_events.h 27 Feb 2004 18:46:49 -0000 1.18 +++ ewl_events.h 10 Mar 2004 21:19:00 -0000 1.19 @@ -10,80 +10,132 @@ typedef struct Ewl_Event_Window_Expose Ewl_Event_Window_Expose; +/** + * @struct Ewl_Event_Window_Expose + * Describes the evas region that received an expose notification. + */ struct Ewl_Event_Window_Expose { - int x, y, w, h; + int x; /**< Beginning X coordinate for the expose rectangle */ + int y; /**< Beginning Y coordinate for the expose rectangle */ + int w; /**< Width of the expose rectangle */ + int h; /**< Height of the expose rectangle */ }; typedef struct Ewl_Event_Window_Configure Ewl_Event_Window_Configure; +/** + * @struct Ewl_Event_Window_Configure + * Notifies widgets when the enclosing window size has changed. + */ struct Ewl_Event_Window_Configure { - int x, y, w, h; + int x; /**< Beginning X coordinate of the windows new position */ + int y; /**< Beginning Y coordinate of the windows new position */ + int w; /**< The new width of the window */ + int h; /**< The new height of the window */ }; typedef struct Ewl_Event_Window_Delete Ewl_Event_Window_Delete; +/** + * @struct Ewl_Event_Window_Delete + * Notifies of window close requests. + */ struct Ewl_Event_Window_Delete { }; typedef struct Ewl_Event_Key_Down Ewl_Event_Key_Down; +/** + * @struct Ewl_Event_Key_Down + * Provides clients with necessary information about the key press event. + */ struct Ewl_Event_Key_Down { - unsigned int modifiers; - char *keyname; + unsigned int modifiers; /**< Modifiers that were pressed */ + char *keyname; /**< Name of the key that was pressed */ }; typedef struct Ewl_Event_Key_Up Ewl_Event_Key_Up; +/** + * @struct Ewl_Event_Key_Up + * Provides clients with necessary information about the key release event. + */ struct Ewl_Event_Key_Up { - unsigned int modifiers; - char *keyname; + unsigned int modifiers; /**< Modifiers that were pressed */ + char *keyname; /**< Name of the key that was released */ }; typedef struct Ewl_Event_Mouse_Down Ewl_Event_Mouse_Down; +/** + * @struct Ewl_Event_Mouse_Down + * Provides information about the mouse down event. + */ struct Ewl_Event_Mouse_Down { - unsigned int modifiers; - int button; - int x, y; + unsigned int modifiers; /**< Modifiers that were pressed */ + int button; /**< The mouse button that was pressed */ + int clicks; /**< Number of consecutive clicks */ + int x; /**< X coordinate the mouse press occurred at */ + int y; /**< Y coordinate the mouse press occurred at */ }; typedef struct Ewl_Event_Mouse_Up Ewl_Event_Mouse_Up; +/** + * @struct Ewl_Event_Mouse_Up + * Provides information about the mouse up event. + */ struct Ewl_Event_Mouse_Up { - unsigned int modifiers; - int button; - int x, y; + unsigned int modifiers; /**< Modifiers that were pressed */ + int button; /**< The mouse button that was released */ + int x; /**< X coordinate the mouse release occurred at */ + int y; /**< Y coordinate the mouse release occurred at */ }; typedef struct Ewl_Event_Mouse_Move Ewl_Event_Mouse_Move; +/** + * @struct Ewl_Event_Mouse_Move + * Provides information about mouse movement + */ struct Ewl_Event_Mouse_Move { - unsigned int modifiers; - int x, y; + unsigned int modifiers; /**< Modifiers that were pressed */ + int x; /**< X coordinate the mouse moved to */ + int y; /**< Y coordinate the mouse moved to */ }; typedef struct Ewl_Event_Mouse_In Ewl_Event_Mouse_In; +/** + * @struct Ewl_Event_Mouse_In + * Provides information about the mouse entering + */ struct Ewl_Event_Mouse_In { - unsigned int modifiers; - int x, y; + unsigned int modifiers; /**< Modifiers that were pressed */ + int x; /**< X coordinate the mouse entered at */ + int y; /**< Y coordinate the mouse entered at */ }; typedef struct Ewl_Event_Mouse_Out Ewl_Event_Mouse_Out; +/** + * @struct Ewl_Event_Mouse_Out + * Provides information about the mouse leaving + */ struct Ewl_Event_Mouse_Out { - unsigned int modifiers; - int x, y; + unsigned int modifiers; /**< Modifiers that were pressed */ + int x; /**< X coordinate the mouse left at */ + int y; /**< Y coordinate the mouse left at */ }; int ewl_ev_init(void); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -3 -r1.75 -r1.76 --- ewl_window.c 27 Feb 2004 00:30:58 -0000 1.75 +++ ewl_window.c 10 Mar 2004 21:19:00 -0000 1.76 @@ -6,6 +6,7 @@ #ifdef HAVE_EVAS_ENGINE_FB_H #include <Ecore_Fb.h> +#include <Evas_Engine_FB.h> #endif #ifdef HAVE_EVAS_ENGINE_SOFTWARE_X11_H @@ -408,9 +409,12 @@ } else #endif -#ifdef HAVE_EVAS_ENGINE_FB +#ifdef HAVE_EVAS_ENGINE_FB_H if (!strcmp(render, "fb")) { Evas_Engine_Info_FB *fbinfo; + + fbinfo = (Evas_Engine_Info_FB *)info; + fbinfo->info.virtual_terminal = 0; fbinfo->info.device_number = 0; fbinfo->info.refresh = 0; @@ -438,6 +442,7 @@ } #endif else { + evas_free(evas); DRETURN(DLEVEL_STABLE); } |