Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_events.c Log Message: - formatting =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_events.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ewl_events.c 20 Oct 2005 05:38:08 -0000 1.7 +++ ewl_events.c 23 Oct 2005 23:15:19 -0000 1.8 @@ -3,14 +3,8 @@ #include "ewl_macros.h" #include "ewl_private.h" -unsigned int key_modifiers = 0; - -extern Ewl_Widget *last_selected; -extern Ewl_Widget *last_key; -extern Ewl_Widget *last_focused; -extern Ewl_Widget *dnd_widget; - -extern Ecore_List *ewl_embed_list;; +extern Ecore_List *ewl_embed_list;; +static unsigned int key_modifiers = 0; #ifdef ENABLE_EWL_SOFTWARE_X11 int ewl_ev_x_window_expose(void *data, int type, void *_ev); @@ -40,9 +34,11 @@ * @return Returns true or false to indicate success in initializing events. * @brief Initialize the event handlers for dispatching to proper widgets */ -int ewl_ev_init(void) +int +ewl_ev_init(void) { unsigned int engine; + DENTER_FUNCTION(DLEVEL_STABLE); engine = ewl_engine_mask_get(); @@ -103,16 +99,18 @@ } #endif - DRETURN_INT(1, DLEVEL_STABLE); + DRETURN_INT(TRUE, DLEVEL_STABLE); } /** * @return Returns the current mask of modifier keys. * @brief Retrieve the current mask of modifiers that are set. */ -unsigned int ewl_ev_modifiers_get() +unsigned int +ewl_ev_modifiers_get(void) { DENTER_FUNCTION(DLEVEL_STABLE); + DRETURN_INT(key_modifiers, DLEVEL_STABLE); } @@ -121,7 +119,8 @@ * @return Returns no value. * @brief Sets the key modifiers to the given value */ -void ewl_ev_modifiers_set(unsigned int modifiers) +void +ewl_ev_modifiers_set(unsigned int modifiers) { DENTER_FUNCTION(DLEVEL_STABLE); @@ -141,14 +140,15 @@ * * Dispatches the expose event to the appropriate window for handling. */ -int ewl_ev_x_window_expose(void *data __UNUSED__, int type __UNUSED__, void * e) +int +ewl_ev_x_window_expose(void *data __UNUSED__, int type __UNUSED__, void * e) { /* * Widgets don't need to know about this usually, but we still need to * let them know in case a widget is using a non-evas based draw method */ Ecore_X_Event_Window_Damage *ev; - Ewl_Embed *embed; + Ewl_Embed *embed; DENTER_FUNCTION(DLEVEL_STABLE); @@ -173,16 +173,18 @@ * * Dispatches a configure even to the appropriate ewl window. */ -int ewl_ev_x_window_configure(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_window_configure(void *data __UNUSED__, int type __UNUSED__, void *e) { /* * When a configure event occurs, we must update the windows geometry * based on the coordinates and dimensions given in the Ecore_Event. */ Ecore_X_Event_Window_Configure *ev; - Ewl_Window *window; + Ewl_Window *window; DENTER_FUNCTION(DLEVEL_STABLE); + ev = e; window = ewl_window_window_find((void *)ev->win); @@ -223,14 +225,15 @@ * * Dispatches the delete event to the appropriate ewl window. */ -int ewl_ev_x_window_delete(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_window_delete(void *data __UNUSED__, int type __UNUSED__, void *e) { /* * Retrieve the appropriate ewl_window using the x window id that is * held in the eevent, and call it's handlers for a window delete event. */ Ecore_X_Event_Window_Destroy *ev; - Ewl_Window *window; + Ewl_Window *window; DENTER_FUNCTION(DLEVEL_STABLE); @@ -254,15 +257,15 @@ * * Dispatches the key down event to the appropriate ewl window. */ -int ewl_ev_x_key_down(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_key_down(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_X_Event_Key_Down *ev; DENTER_FUNCTION(DLEVEL_STABLE); ev = e; - embed = ewl_embed_evas_window_find((void *)ev->win); if (!embed) @@ -297,9 +300,10 @@ * * Dispatches the key up event to the appropriate ewl window. */ -int ewl_ev_x_key_up(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_key_up(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_X_Event_Key_Up *ev; DENTER_FUNCTION(DLEVEL_STABLE); @@ -330,7 +334,6 @@ DRETURN_INT(TRUE, DLEVEL_STABLE); } - /** * @param data: user specified data passed to the function * @param type: the type of event triggering the function call @@ -341,7 +344,8 @@ * Dispatches the mouse down event to the appropriate ewl window. * Also determines the widgets clicked state. */ -int ewl_ev_x_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *e) { int clicks = 1; Ewl_Embed *embed; @@ -366,7 +370,6 @@ DRETURN_INT(TRUE, DLEVEL_STABLE); } - /** * @param data: user specified data passed to the function * @param type: the type of event triggering the function call @@ -377,9 +380,10 @@ * Dispatches the mouse up event to the appropriate ewl window. * Also determines the widgets clicked state. */ -int ewl_ev_x_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_X_Event_Mouse_Button_Up *ev; DENTER_FUNCTION(DLEVEL_STABLE); @@ -405,9 +409,10 @@ * * Dispatches the mouse move event to the appropriate ewl window. */ -int ewl_ev_x_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_X_Event_Mouse_Move *ev; DENTER_FUNCTION(DLEVEL_STABLE); @@ -432,9 +437,10 @@ * * Dispatches the mouse out event to the appropriate ewl window. */ -int ewl_ev_x_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_X_Event_Mouse_Out *ev = e; DENTER_FUNCTION(DLEVEL_STABLE); @@ -457,9 +463,10 @@ * * Dispatches the mouse wheel event to the appropriate ewl window. */ -int ewl_ev_x_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_x_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_X_Event_Mouse_Wheel *ev = e; DENTER_FUNCTION(DLEVEL_STABLE); @@ -482,8 +489,8 @@ * * Dispatches the mouse out event to the appropriate ewl window. */ -int ewl_ev_x_paste(void *data __UNUSED__, int type __UNUSED__, - void *e __UNUSED__) +int +ewl_ev_x_paste(void *data __UNUSED__, int type __UNUSED__, void *e __UNUSED__) { DENTER_FUNCTION(DLEVEL_STABLE); @@ -505,9 +512,10 @@ * * Dispatches the key down event to the appropriate ewl window. */ -int ewl_ev_fb_key_down(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_fb_key_down(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_Fb_Event_Key_Down *ev; DENTER_FUNCTION(DLEVEL_STABLE); @@ -533,15 +541,15 @@ * * Dispatches the key down event to the appropriate ewl window. */ -int ewl_ev_fb_key_up(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_fb_key_up(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_Fb_Event_Key_Up *ev; DENTER_FUNCTION(DLEVEL_STABLE); ev = e; - embed = ecore_list_goto_first(ewl_embed_list); if (!embed) @@ -562,7 +570,8 @@ * Dispatches the mouse down event to the appropriate ewl window. * Also determines the widgets clicked state. */ -int ewl_ev_fb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_fb_mouse_down(void *data __UNUSED__, int type __UNUSED__, void *e) { int clicks = 1; Ewl_Embed *embed; @@ -601,9 +610,10 @@ * Dispatches the mouse up event to the appropriate ewl window. * Also determines the widgets clicked state. */ -int ewl_ev_fb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_fb_mouse_up(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_Fb_Event_Mouse_Button_Up *ev; DENTER_FUNCTION(DLEVEL_STABLE); @@ -629,9 +639,10 @@ * * Dispatches the mouse move event to the appropriate ewl window. */ -int ewl_ev_fb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *e) +int +ewl_ev_fb_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *e) { - Ewl_Embed *embed; + Ewl_Embed *embed; Ecore_Fb_Event_Mouse_Move *ev; DENTER_FUNCTION(DLEVEL_STABLE); @@ -648,3 +659,4 @@ } #endif + ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs