From 46e8efcd8c2b6ba9f23ac1e38372fa80da059227 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Mon, 16 Mar 2009 16:24:43 +0000 Subject: [PATCH] Let me introduce you to Ecore_Input. The idea is to share as much as possible event between all ecore graphic engine to ease porting of application and reduce the amount of specific code per engine. This patch does just that. All your application should continu to work has previously, if it's not the case please report any new behaviour regarding mouse and keyboard. SVN revision: 39505 --- configure.ac | 1 + src/bin/e.h | 1 + src/bin/e_actions.c | 24 +-- src/bin/e_actions.h | 10 +- src/bin/e_bindings.c | 191 ++++++++---------- src/bin/e_bindings.h | 16 +- src/bin/e_border.c | 169 ++++++++-------- src/bin/e_border.h | 10 +- src/bin/e_container.c | 84 ++------ src/bin/e_desklock.c | 32 +-- src/bin/e_dnd.c | 28 +-- src/bin/e_dnd.h | 8 +- src/bin/e_fm.c | 4 +- src/bin/e_manager.c | 16 +- src/bin/e_menu.c | 104 +++++----- src/bin/e_pointer.c | 16 +- src/bin/e_popup.c | 24 +-- src/bin/e_widget_toolbar.c | 3 + src/bin/e_zone.c | 40 ++-- .../e_int_config_keybindings.c | 36 ++-- .../e_int_config_mousebindings.c | 48 ++--- src/modules/exebuf/e_exebuf.c | 72 +++---- src/modules/illume/e_appwin.c | 6 +- src/modules/illume/e_busywin.c | 6 +- src/modules/illume/e_simplelock.c | 20 +- src/modules/illume/e_slipshelf.c | 6 +- src/modules/illume/e_slipwin.c | 6 +- src/modules/illume/e_syswin.c | 6 +- src/modules/mixer/e_mod_main.c | 14 +- src/modules/pager/e_mod_config.c | 26 +-- src/modules/pager/e_mod_main.c | 106 +++++----- src/modules/syscon/e_syscon.c | 46 ++--- src/modules/winlist/e_mod_main.c | 8 +- src/modules/winlist/e_winlist.c | 128 ++++++------ 34 files changed, 624 insertions(+), 691 deletions(-) diff --git a/configure.ac b/configure.ac index 26516d753..5cf5de7a1 100644 --- a/configure.ac +++ b/configure.ac @@ -238,6 +238,7 @@ PKG_CHECK_MODULES(E, [ ecore ecore-x ecore-evas + ecore-input ecore-con ecore-ipc ecore-job diff --git a/src/bin/e.h b/src/bin/e.h index 8a42195ce..7e67299ef 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -69,6 +69,7 @@ #include #include #include +#include #include #include #include diff --git a/src/bin/e_actions.c b/src/bin/e_actions.c index c117a8082..a838d2569 100644 --- a/src/bin/e_actions.c +++ b/src/bin/e_actions.c @@ -21,14 +21,14 @@ if (act) act->func.go_mouse = _e_actions_act_##name##_go_mouse; \ } #define ACT_FN_GO_MOUSE(act) \ - static void _e_actions_act_##act##_go_mouse(E_Object *obj, const char *params, Ecore_X_Event_Mouse_Button_Down *ev) + static void _e_actions_act_##act##_go_mouse(E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev) #define ACT_GO_WHEEL(name) \ { \ act = e_action_add(#name); \ if (act) act->func.go_wheel = _e_actions_act_##name##_go_wheel; \ } #define ACT_FN_GO_WHEEL(act) \ - static void _e_actions_act_##act##_go_wheel(E_Object *obj, const char *params, Ecore_X_Event_Mouse_Wheel *ev) + static void _e_actions_act_##act##_go_wheel(E_Object *obj, const char *params, Ecore_Event_Mouse_Wheel *ev) #define ACT_GO_EDGE(name) \ { \ act = e_action_add(#name); \ @@ -49,7 +49,7 @@ if (act) act->func.go_key = _e_actions_act_##name##_go_key; \ } #define ACT_FN_GO_KEY(act) \ - static void _e_actions_act_##act##_go_key(E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev) + static void _e_actions_act_##act##_go_key(E_Object *obj, const char *params, Ecore_Event_Key *ev) #define ACT_END(name) \ { \ act = e_action_add(#name); \ @@ -63,14 +63,14 @@ if (act) act->func.end_mouse = _e_actions_act_##name##_end_mouse; \ } #define ACT_FN_END_MOUSE(act) \ - static void _e_actions_act_##act##_end_mouse(E_Object *obj, const char *params, Ecore_X_Event_Mouse_Button_Up *ev) + static void _e_actions_act_##act##_end_mouse(E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev) #define ACT_END_KEY(name) \ { \ act = e_action_add(#name); \ if (act) act->func.end_key = _e_actions_act_##name##_end_key; \ } #define ACT_FN_END_KEY(act) \ - static void _e_actions_act_##act##_end_key(E_Object *obj, const char *params, Ecore_X_Event_Key_Up *ev) + static void _e_actions_act_##act##_end_key(E_Object *obj, const char *params, Ecore_Event_Key *ev) /* local subsystem functions */ static void _e_action_free(E_Action *act); @@ -1614,7 +1614,7 @@ ACT_FN_GO_MOUSE(menu_show) y -= zone->container->y; e_menu_post_deactivate_callback_set(m, _e_actions_cb_menu_end, NULL); e_menu_activate_mouse(m, zone, x, y, 1, 1, - E_MENU_POP_DIRECTION_DOWN, ev->time); + E_MENU_POP_DIRECTION_DOWN, ev->timestamp); } } } @@ -2332,7 +2332,7 @@ _delayed_action_list_parse(Delayed_Action *da, const char *params) } static void -_delayed_action_key_add(E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev) +_delayed_action_key_add(E_Object *obj, const char *params, Ecore_Event_Key *ev) { Delayed_Action *da; @@ -2350,7 +2350,7 @@ _delayed_action_key_add(E_Object *obj, const char *params, Ecore_X_Event_Key_Dow } static void -_delayed_action_key_del(E_Object *obj, const char *params, Ecore_X_Event_Key_Up *ev) +_delayed_action_key_del(E_Object *obj, const char *params, Ecore_Event_Key *ev) { Eina_List *l; @@ -2371,7 +2371,7 @@ _delayed_action_key_del(E_Object *obj, const char *params, Ecore_X_Event_Key_Up } static void -_delayed_action_mouse_add(E_Object *obj, const char *params, Ecore_X_Event_Mouse_Button_Down *ev) +_delayed_action_mouse_add(E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev) { Delayed_Action *da; @@ -2383,13 +2383,13 @@ _delayed_action_mouse_add(E_Object *obj, const char *params, Ecore_X_Event_Mouse e_object_ref(da->obj); } da->mouse = 1; - da->button = ev->button; + da->button = ev->buttons; if (params) _delayed_action_list_parse(da, params); _delayed_actions = eina_list_append(_delayed_actions, da); } static void -_delayed_action_mouse_del(E_Object *obj, const char *params, Ecore_X_Event_Mouse_Button_Up *ev) +_delayed_action_mouse_del(E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev) { Eina_List *l; @@ -2399,7 +2399,7 @@ _delayed_action_mouse_del(E_Object *obj, const char *params, Ecore_X_Event_Mouse da = l->data; if ((da->obj == obj) && (da->mouse) && - (ev->button == da->button)) + (ev->buttons == da->button)) { _delayed_action_do(da); _delayed_action_free(da); diff --git a/src/bin/e_actions.h b/src/bin/e_actions.h index 1987cc7ca..1f381d2a2 100644 --- a/src/bin/e_actions.h +++ b/src/bin/e_actions.h @@ -20,14 +20,14 @@ struct _E_Action const char *name; struct { void (*go) (E_Object *obj, const char *params); - void (*go_mouse) (E_Object *obj, const char *params, Ecore_X_Event_Mouse_Button_Down *ev); - void (*go_wheel) (E_Object *obj, const char *params, Ecore_X_Event_Mouse_Wheel *ev); + void (*go_mouse) (E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev); + void (*go_wheel) (E_Object *obj, const char *params, Ecore_Event_Mouse_Wheel *ev); void (*go_edge) (E_Object *obj, const char *params, E_Event_Zone_Edge *ev); - void (*go_key) (E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev); + void (*go_key) (E_Object *obj, const char *params, Ecore_Event_Key *ev); void (*go_signal) (E_Object *obj, const char *params, const char *sig, const char *src); void (*end) (E_Object *obj, const char *params); - void (*end_mouse) (E_Object *obj, const char *params, Ecore_X_Event_Mouse_Button_Up *ev); - void (*end_key) (E_Object *obj, const char *params, Ecore_X_Event_Key_Up *ev); + void (*end_mouse) (E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev); + void (*end_key) (E_Object *obj, const char *params, Ecore_Event_Key *ev); } func; }; diff --git a/src/bin/e_bindings.c b/src/bin/e_bindings.c index 56f27269f..03c409eba 100644 --- a/src/bin/e_bindings.c +++ b/src/bin/e_bindings.c @@ -11,6 +11,8 @@ static void _e_bindings_edge_free(E_Binding_Edge *bind); static void _e_bindings_signal_free(E_Binding_Signal *bind); static void _e_bindings_wheel_free(E_Binding_Wheel *bind); static int _e_bindings_context_match(E_Binding_Context bctxt, E_Binding_Context ctxt); +static E_Binding_Modifier _e_bindings_modifiers(unsigned int modifiers); +static int _e_ecore_modifiers(E_Binding_Modifier modifiers); static int _e_bindings_edge_cb_timer(void *data); /* local subsystem globals */ @@ -199,18 +201,12 @@ e_bindings_mouse_grab(E_Binding_Context ctxt, Ecore_X_Window win) bind = l->data; if (_e_bindings_context_match(bind->ctxt, ctxt)) { - int mod; - - mod = 0; - if (bind->mod & E_BINDING_MODIFIER_SHIFT) mod |= ECORE_X_MODIFIER_SHIFT; - if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= ECORE_X_MODIFIER_CTRL; - if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= ECORE_X_MODIFIER_ALT; - if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= ECORE_X_MODIFIER_WIN; - ecore_x_window_button_grab(win, bind->button, - ECORE_X_EVENT_MASK_MOUSE_DOWN | - ECORE_X_EVENT_MASK_MOUSE_UP | - ECORE_X_EVENT_MASK_MOUSE_MOVE, - mod, bind->any_mod); + ecore_x_window_button_grab(win, bind->button, + ECORE_X_EVENT_MASK_MOUSE_DOWN | + ECORE_X_EVENT_MASK_MOUSE_UP | + ECORE_X_EVENT_MASK_MOUSE_MOVE, + _e_ecore_modifiers(bind->mod), + bind->any_mod); } } } @@ -227,35 +223,25 @@ e_bindings_mouse_ungrab(E_Binding_Context ctxt, Ecore_X_Window win) bind = l->data; if (_e_bindings_context_match(bind->ctxt, ctxt)) { - int mod; - - mod = 0; - if (bind->mod & E_BINDING_MODIFIER_SHIFT) mod |= ECORE_X_MODIFIER_SHIFT; - if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= ECORE_X_MODIFIER_CTRL; - if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= ECORE_X_MODIFIER_ALT; - if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= ECORE_X_MODIFIER_WIN; ecore_x_window_button_ungrab(win, bind->button, - mod, bind->any_mod); + _e_ecore_modifiers(bind->mod), bind->any_mod); } } } EAPI E_Action * -e_bindings_mouse_down_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Down *ev, E_Binding_Mouse **bind_ret) +e_bindings_mouse_down_find(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Button *ev, E_Binding_Mouse **bind_ret) { E_Binding_Modifier mod = 0; Eina_List *l; - - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; + + mod = _e_bindings_modifiers(ev->modifiers); for (l = mouse_bindings; l; l = l->next) { E_Binding_Mouse *bind; bind = l->data; - if ((bind->button == ev->button) && + if ((bind->button == ev->buttons) && ((bind->any_mod) || (bind->mod == mod))) { if (_e_bindings_context_match(bind->ctxt, ctxt)) @@ -272,7 +258,7 @@ e_bindings_mouse_down_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_ } EAPI E_Action * -e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Down *ev) +e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Button *ev) { E_Action *act; E_Binding_Mouse *bind; @@ -290,21 +276,18 @@ e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_ } EAPI E_Action * -e_bindings_mouse_up_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Up *ev, E_Binding_Mouse **bind_ret) +e_bindings_mouse_up_find(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Button *ev, E_Binding_Mouse **bind_ret) { E_Binding_Modifier mod = 0; Eina_List *l; - - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; + + mod = _e_bindings_modifiers(ev->modifiers); for (l = mouse_bindings; l; l = l->next) { E_Binding_Mouse *bind; bind = l->data; - if ((bind->button == ev->button) && + if ((bind->button == ev->buttons) && ((bind->any_mod) || (bind->mod == mod))) { if (_e_bindings_context_match(bind->ctxt, ctxt)) @@ -321,7 +304,7 @@ e_bindings_mouse_up_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mo } EAPI E_Action * -e_bindings_mouse_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Up *ev) +e_bindings_mouse_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Button *ev) { E_Action *act; E_Binding_Mouse *bind; @@ -407,18 +390,8 @@ e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win) bind = l->data; if (_e_bindings_context_match(bind->ctxt, ctxt)) { - int mod; - - mod = 0; - if (bind->mod & E_BINDING_MODIFIER_SHIFT) mod |= ECORE_X_MODIFIER_SHIFT; - if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= ECORE_X_MODIFIER_CTRL; - if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= ECORE_X_MODIFIER_ALT; - if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= ECORE_X_MODIFIER_WIN; - /* see comment in e_bindings on numlock - if (bind->mod & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM; - */ ecore_x_window_key_grab(win, bind->key, - mod, bind->any_mod); + _e_ecore_modifiers(bind->mod), bind->any_mod); } } } @@ -435,48 +408,19 @@ e_bindings_key_ungrab(E_Binding_Context ctxt, Ecore_X_Window win) bind = l->data; if (_e_bindings_context_match(bind->ctxt, ctxt)) { - int mod; - - mod = 0; - if (bind->mod & E_BINDING_MODIFIER_SHIFT) mod |= ECORE_X_MODIFIER_SHIFT; - if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= ECORE_X_MODIFIER_CTRL; - if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= ECORE_X_MODIFIER_ALT; - if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= ECORE_X_MODIFIER_WIN; - /* see comment in e_bindings on numlock - if (bind->mod & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM; - */ ecore_x_window_key_ungrab(win, bind->key, - mod, bind->any_mod); + _e_ecore_modifiers(bind->mod), bind->any_mod); } } } EAPI E_Action * -e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Key_Down *ev) +e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev) { E_Binding_Modifier mod = 0; Eina_List *l; - - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; - /* FIXME: there is a good reason numlock was ignored. sometimes people - * have it on, sometimes they don't, and often they have no idea. waaaay - * back in E 0.1->0.13 or so days this caused issues thus numlock, - * scrollock and capslock are not usable modifiers. - * - * if we REALLY want to be able to use numlock we need to add more binding - * flags and config that says "REALLY pay attention to numlock for this - * binding" field in the binding (like there is a "any_mod" flag - we need a - * "num_lock_respect" field) - * - * also it should be an E_BINDING_MODIFIER_LOCK_NUM as the ecore lock flag - * may vary from system to system as different xservers may have differing - * modifier masks for numlock (it is queried at startup). - * - if (ev->modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM; - */ + + mod = _e_bindings_modifiers(ev->modifiers); for (l = key_bindings; l; l = l->next) { E_Binding_Key *bind; @@ -506,18 +450,12 @@ e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_ } EAPI E_Action * -e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Key_Up *ev) +e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev) { E_Binding_Modifier mod = 0; Eina_List *l; - - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; - /* see comment in e_bindings on numlock - if (ev->modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM; - */ + + mod = _e_bindings_modifiers(ev->modifiers); for (l = key_bindings; l; l = l->next) { E_Binding_Key *bind; @@ -842,15 +780,8 @@ e_bindings_wheel_grab(E_Binding_Context ctxt, Ecore_X_Window win) bind = l->data; if (_e_bindings_context_match(bind->ctxt, ctxt)) { - int mod; int button = 0; - - mod = 0; - if (bind->mod & E_BINDING_MODIFIER_SHIFT) mod |= ECORE_X_MODIFIER_SHIFT; - if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= ECORE_X_MODIFIER_CTRL; - if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= ECORE_X_MODIFIER_ALT; - if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= ECORE_X_MODIFIER_WIN; - + if (bind->direction == 0) { if (bind->z < 0) button = 4; @@ -864,7 +795,7 @@ e_bindings_wheel_grab(E_Binding_Context ctxt, Ecore_X_Window win) if (button != 0) ecore_x_window_button_grab(win, button, ECORE_X_EVENT_MASK_MOUSE_DOWN, - mod, bind->any_mod); + _e_ecore_modifiers(bind->mod), bind->any_mod); } } } @@ -881,14 +812,8 @@ e_bindings_wheel_ungrab(E_Binding_Context ctxt, Ecore_X_Window win) bind = l->data; if (_e_bindings_context_match(bind->ctxt, ctxt)) { - int mod; int button = 0; - mod = 0; - if (bind->mod & E_BINDING_MODIFIER_SHIFT) mod |= ECORE_X_MODIFIER_SHIFT; - if (bind->mod & E_BINDING_MODIFIER_CTRL) mod |= ECORE_X_MODIFIER_CTRL; - if (bind->mod & E_BINDING_MODIFIER_ALT) mod |= ECORE_X_MODIFIER_ALT; - if (bind->mod & E_BINDING_MODIFIER_WIN) mod |= ECORE_X_MODIFIER_WIN; if (bind->direction == 0) { if (bind->z < 0) button = 4; @@ -901,21 +826,18 @@ e_bindings_wheel_ungrab(E_Binding_Context ctxt, Ecore_X_Window win) } if (button != 0) ecore_x_window_button_ungrab(win, button, - mod, bind->any_mod); + _e_ecore_modifiers(bind->mod), bind->any_mod); } } } EAPI E_Action * -e_bindings_wheel_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Wheel *ev, E_Binding_Wheel **bind_ret) +e_bindings_wheel_find(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Wheel *ev, E_Binding_Wheel **bind_ret) { E_Binding_Modifier mod = 0; Eina_List *l; - - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; + + mod = _e_bindings_modifiers(ev->modifiers); for (l = wheel_bindings; l; l = l->next) { E_Binding_Wheel *bind; @@ -939,7 +861,7 @@ e_bindings_wheel_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse } EAPI E_Action * -e_bindings_wheel_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Wheel *ev) +e_bindings_wheel_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Wheel *ev) { E_Action *act; E_Binding_Wheel *bind; @@ -1017,6 +939,51 @@ _e_bindings_context_match(E_Binding_Context bctxt, E_Binding_Context ctxt) return 0; } +static E_Binding_Modifier +_e_bindings_modifiers(unsigned int modifiers) +{ + E_Binding_Modifier mod = 0; + + if (modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; + if (modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; + if (modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; + if (modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; + /* FIXME: there is a good reason numlock was ignored. sometimes people + * have it on, sometimes they don't, and often they have no idea. waaaay + * back in E 0.1->0.13 or so days this caused issues thus numlock, + * scrollock and capslock are not usable modifiers. + * + * if we REALLY want to be able to use numlock we need to add more binding + * flags and config that says "REALLY pay attention to numlock for this + * binding" field in the binding (like there is a "any_mod" flag - we need a + * "num_lock_respect" field) + * + * also it should be an E_BINDING_MODIFIER_LOCK_NUM as the ecore lock flag + * may vary from system to system as different xservers may have differing + * modifier masks for numlock (it is queried at startup). + * + if (ev->modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM; + */ + + return mod; +} + +static int +_e_ecore_modifiers(E_Binding_Modifier modifiers) +{ + int mod = 0; + + if (modifiers & E_BINDING_MODIFIER_SHIFT) mod |= ECORE_EVENT_MODIFIER_SHIFT; + if (modifiers & E_BINDING_MODIFIER_CTRL) mod |= ECORE_EVENT_MODIFIER_CTRL; + if (modifiers & E_BINDING_MODIFIER_ALT) mod |= ECORE_EVENT_MODIFIER_ALT; + if (modifiers & E_BINDING_MODIFIER_WIN) mod |= ECORE_EVENT_MODIFIER_WIN; + /* see comment in e_bindings on numlock + if (modifiers & ECORE_X_LOCK_NUM) mod |= ECORE_X_LOCK_NUM; + */ + + return mod; +} + static int _e_bindings_edge_cb_timer(void *data) { diff --git a/src/bin/e_bindings.h b/src/bin/e_bindings.h index cbbc6f8aa..d4d5dd402 100644 --- a/src/bin/e_bindings.h +++ b/src/bin/e_bindings.h @@ -102,18 +102,18 @@ EAPI void e_bindings_mouse_add(E_Binding_Context ctxt, int button, E_Bind EAPI void e_bindings_mouse_del(E_Binding_Context ctxt, int button, E_Binding_Modifier mod, int any_mod, const char *action, const char *params); EAPI void e_bindings_mouse_grab(E_Binding_Context ctxt, Ecore_X_Window win); EAPI void e_bindings_mouse_ungrab(E_Binding_Context ctxt, Ecore_X_Window win); -EAPI E_Action *e_bindings_mouse_down_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Down *ev, E_Binding_Mouse **bind_ret); -EAPI E_Action *e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Down *ev); -EAPI E_Action *e_bindings_mouse_up_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Up *ev, E_Binding_Mouse **bind_ret); -EAPI E_Action *e_bindings_mouse_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Button_Up *ev); +EAPI E_Action *e_bindings_mouse_down_find(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Button *ev, E_Binding_Mouse **bind_ret); +EAPI E_Action *e_bindings_mouse_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Button *ev); +EAPI E_Action *e_bindings_mouse_up_find(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Button *ev, E_Binding_Mouse **bind_ret); +EAPI E_Action *e_bindings_mouse_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Button *ev); EAPI void e_bindings_key_add(E_Binding_Context ctxt, const char *key, E_Binding_Modifier mod, int any_mod, const char *action, const char *params); EAPI void e_bindings_key_del(E_Binding_Context ctxt, const char *key, E_Binding_Modifier mod, int any_mod, const char *action, const char *params); EAPI E_Binding_Key *e_bindings_key_get(const char *action); EAPI void e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win); EAPI void e_bindings_key_ungrab(E_Binding_Context ctxt, Ecore_X_Window win); -EAPI E_Action *e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Key_Down *ev); -EAPI E_Action *e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Key_Up *ev); +EAPI E_Action *e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev); +EAPI E_Action *e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev); EAPI void e_bindings_edge_add(E_Binding_Context ctxt, E_Zone_Edge edge, E_Binding_Modifier mod, int any_mod, const char *action, const char *params, float delay); EAPI E_Binding_Edge *e_bindings_edge_get(const char *action, E_Zone_Edge edge); @@ -130,8 +130,8 @@ EAPI void e_bindings_wheel_add(E_Binding_Context ctxt, int direction, int EAPI void e_bindings_wheel_del(E_Binding_Context ctxt, int direction, int z, E_Binding_Modifier mod, int any_mod, const char *action, const char *params); EAPI void e_bindings_wheel_grab(E_Binding_Context ctxt, Ecore_X_Window win); EAPI void e_bindings_wheel_ungrab(E_Binding_Context ctxt, Ecore_X_Window win); -EAPI E_Action *e_bindings_wheel_find(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Wheel *ev, E_Binding_Wheel **bind_ret); -EAPI E_Action *e_bindings_wheel_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_X_Event_Mouse_Wheel *ev); +EAPI E_Action *e_bindings_wheel_find(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Wheel *ev, E_Binding_Wheel **bind_ret); +EAPI E_Action *e_bindings_wheel_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Mouse_Wheel *ev); #endif #endif diff --git a/src/bin/e_border.c b/src/bin/e_border.c index ea5f3ebbe..3315a3717 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -279,12 +279,13 @@ e_border_new(E_Container *con, Ecore_X_Window win, int first_map, int internal) free(bd); return NULL; } + bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, _e_border_cb_mouse_in, bd)); bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, _e_border_cb_mouse_out, bd)); - bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_border_cb_mouse_down, bd)); - bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, _e_border_cb_mouse_up, bd)); - bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _e_border_cb_mouse_move, bd)); - bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, _e_border_cb_mouse_wheel, bd)); + bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_border_cb_mouse_down, bd)); + bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_border_cb_mouse_up, bd)); + bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _e_border_cb_mouse_move, bd)); + bd->handlers = eina_list_append(bd->handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _e_border_cb_mouse_wheel, bd)); bd->client.win = win; @@ -2729,10 +2730,10 @@ _e_border_action_move_timeout_add(void) static int _e_border_move_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev = event; + Ecore_Event_Key *ev = event; int x, y; - if (ev->event_win != action_input_win) + if (ev->event_window != action_input_win) return 1; if (!action_border) { @@ -2743,23 +2744,23 @@ _e_border_move_key_down(void *data, int type, void *event) x = action_border->x; y = action_border->y; - if (strcmp(ev->keysymbol, "Up") == 0) + if (strcmp(ev->key, "Up") == 0) y -= _e_border_key_down_modifier_apply(ev->modifiers, e_config->border_keyboard.move.dy); - else if (strcmp(ev->keysymbol, "Down") == 0) + else if (strcmp(ev->key, "Down") == 0) y += _e_border_key_down_modifier_apply(ev->modifiers, e_config->border_keyboard.move.dy); - else if (strcmp(ev->keysymbol, "Left") == 0) + else if (strcmp(ev->key, "Left") == 0) x -= _e_border_key_down_modifier_apply(ev->modifiers, e_config->border_keyboard.move.dx); - else if (strcmp(ev->keysymbol, "Right") == 0) + else if (strcmp(ev->key, "Right") == 0) x += _e_border_key_down_modifier_apply(ev->modifiers, e_config->border_keyboard.move.dx); - else if (strcmp(ev->keysymbol, "Return") == 0) + else if (strcmp(ev->key, "Return") == 0) goto stop; - else if (strcmp(ev->keysymbol, "Escape") == 0) + else if (strcmp(ev->key, "Escape") == 0) { _e_border_action_restore_orig(action_border); goto stop; } - else if ((strncmp(ev->keysymbol, "Control", sizeof("Control") - 1) != 0) && - (strncmp(ev->keysymbol, "Alt", sizeof("Alt") - 1) != 0)) + else if ((strncmp(ev->key, "Control", sizeof("Control") - 1) != 0) && + (strncmp(ev->key, "Alt", sizeof("Alt") - 1) != 0)) goto stop; e_border_move(action_border, x, y); @@ -2776,9 +2777,9 @@ _e_border_move_key_down(void *data, int type, void *event) static int _e_border_move_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev = event; + Ecore_Event_Mouse_Button *ev = event; - if (ev->event_win != action_input_win) + if (ev->event_window != action_input_win) return 1; if (!action_border) @@ -2810,11 +2811,11 @@ e_border_act_move_keyboard(E_Border *bd) if (action_handler_key) ecore_event_handler_del(action_handler_key); - action_handler_key = ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, _e_border_move_key_down, NULL); + action_handler_key = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _e_border_move_key_down, NULL); if (action_handler_mouse) ecore_event_handler_del(action_handler_mouse); - action_handler_mouse = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_border_move_mouse_down, NULL); + action_handler_mouse = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_border_move_mouse_down, NULL); } static int @@ -2836,10 +2837,10 @@ _e_border_action_resize_timeout_add(void) static int _e_border_resize_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev = event; + Ecore_Event_Key *ev = event; int w, h, dx, dy; - if (ev->event_win != action_input_win) + if (ev->event_window != action_input_win) return 1; if (!action_border) { @@ -2857,23 +2858,23 @@ _e_border_resize_key_down(void *data, int type, void *event) if (dy < action_border->client.icccm.step_h) dy = action_border->client.icccm.step_h; - if (strcmp(ev->keysymbol, "Up") == 0) + if (strcmp(ev->key, "Up") == 0) h -= _e_border_key_down_modifier_apply(ev->modifiers, dy); - else if (strcmp(ev->keysymbol, "Down") == 0) + else if (strcmp(ev->key, "Down") == 0) h += _e_border_key_down_modifier_apply(ev->modifiers, dy); - else if (strcmp(ev->keysymbol, "Left") == 0) + else if (strcmp(ev->key, "Left") == 0) w -= _e_border_key_down_modifier_apply(ev->modifiers, dx); - else if (strcmp(ev->keysymbol, "Right") == 0) + else if (strcmp(ev->key, "Right") == 0) w += _e_border_key_down_modifier_apply(ev->modifiers, dx); - else if (strcmp(ev->keysymbol, "Return") == 0) + else if (strcmp(ev->key, "Return") == 0) goto stop; - else if (strcmp(ev->keysymbol, "Escape") == 0) + else if (strcmp(ev->key, "Escape") == 0) { _e_border_action_restore_orig(action_border); goto stop; } - else if ((strncmp(ev->keysymbol, "Control", sizeof("Control") - 1) != 0) && - (strncmp(ev->keysymbol, "Alt", sizeof("Alt") - 1) != 0)) + else if ((strncmp(ev->key, "Control", sizeof("Control") - 1) != 0) && + (strncmp(ev->key, "Alt", sizeof("Alt") - 1) != 0)) goto stop; e_border_resize_limit(action_border, &w, &h); @@ -2891,9 +2892,9 @@ _e_border_resize_key_down(void *data, int type, void *event) static int _e_border_resize_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev = event; + Ecore_Event_Mouse_Button *ev = event; - if (ev->event_win != action_input_win) + if (ev->event_window != action_input_win) return 1; if (!action_border) @@ -2925,15 +2926,15 @@ e_border_act_resize_keyboard(E_Border *bd) if (action_handler_key) ecore_event_handler_del(action_handler_key); - action_handler_key = ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, _e_border_resize_key_down, NULL); + action_handler_key = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _e_border_resize_key_down, NULL); if (action_handler_mouse) ecore_event_handler_del(action_handler_mouse); - action_handler_mouse = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_border_resize_mouse_down, NULL); + action_handler_mouse = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_border_resize_mouse_down, NULL); } EAPI void -e_border_act_move_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev) +e_border_act_move_begin(E_Border *bd, Ecore_Event_Mouse_Button *ev) { E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); @@ -2949,13 +2950,13 @@ e_border_act_move_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev) { char source[256]; - snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->button); + snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->buttons); _e_border_moveinfo_gather(bd, source); } } EAPI void -e_border_act_move_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev) +e_border_act_move_end(E_Border *bd, Ecore_Event_Mouse_Button *ev) { E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); @@ -2968,7 +2969,7 @@ e_border_act_move_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev) } EAPI void -e_border_act_resize_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev) +e_border_act_resize_begin(E_Border *bd, Ecore_Event_Mouse_Button *ev) { E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); @@ -3007,13 +3008,13 @@ e_border_act_resize_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev) { char source[256]; - snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->button); + snprintf(source, sizeof(source) - 1, "mouse,down,%i", ev->buttons); _e_border_moveinfo_gather(bd, source); } } EAPI void -e_border_act_resize_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev) +e_border_act_resize_end(E_Border *bd, Ecore_Event_Mouse_Button *ev) { E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); @@ -3028,7 +3029,7 @@ e_border_act_resize_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev) } EAPI void -e_border_act_menu_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev, int key) +e_border_act_menu_begin(E_Border *bd, Ecore_Event_Mouse_Button *ev, int key) { E_OBJECT_CHECK(bd); E_OBJECT_TYPE_CHECK(bd, E_BORDER_TYPE); @@ -3037,7 +3038,7 @@ e_border_act_menu_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev, int k e_int_border_menu_show(bd, bd->x + bd->fx.x + ev->x - bd->zone->container->x, bd->y + bd->fx.y + ev->y - bd->zone->container->y, key, - ev->time); + ev->timestamp); } else { @@ -5120,12 +5121,12 @@ _e_border_cb_mouse_out(void *data, int type, void *event) static int _e_border_cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; E_Border *bd; ev = event; bd = data; - if (ev->event_win == bd->win) + if (ev->event_window == bd->win) { bd->mouse.current.mx = ev->root.x; bd->mouse.current.my = ev->root.y; @@ -5133,28 +5134,28 @@ _e_border_cb_mouse_wheel(void *data, int type, void *event) e_bindings_wheel_event_handle(E_BINDING_CONTEXT_BORDER, E_OBJECT(bd), ev); } - evas_event_feed_mouse_wheel(bd->bg_evas, ev->direction, ev->z, ev->time, NULL); + evas_event_feed_mouse_wheel(bd->bg_evas, ev->direction, ev->z, ev->timestamp, NULL); return 1; } static int _e_border_cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; E_Border *bd; ev = event; bd = data; - if (ev->event_win == bd->win) + if (ev->event_window == bd->win) { - if ((ev->button >= 1) && (ev->button <= 3)) + if ((ev->buttons >= 1) && (ev->buttons <= 3)) { - bd->mouse.last_down[ev->button - 1].mx = ev->root.x; - bd->mouse.last_down[ev->button - 1].my = ev->root.y; - bd->mouse.last_down[ev->button - 1].x = bd->x + bd->fx.x; - bd->mouse.last_down[ev->button - 1].y = bd->y + bd->fx.y; - bd->mouse.last_down[ev->button - 1].w = bd->w; - bd->mouse.last_down[ev->button - 1].h = bd->h; + bd->mouse.last_down[ev->buttons - 1].mx = ev->root.x; + bd->mouse.last_down[ev->buttons - 1].my = ev->root.y; + bd->mouse.last_down[ev->buttons - 1].x = bd->x + bd->fx.x; + bd->mouse.last_down[ev->buttons - 1].y = bd->y + bd->fx.y; + bd->mouse.last_down[ev->buttons - 1].w = bd->w; + bd->mouse.last_down[ev->buttons - 1].h = bd->h; } else { @@ -5181,22 +5182,22 @@ _e_border_cb_mouse_down(void *data, int type, void *event) } e_focus_event_mouse_down(bd); } - if (ev->win != ev->event_win) + if (ev->window != ev->event_window) { return 1; } - if ((ev->win != bd->event_win) && (ev->event_win != bd->win)) + if ((ev->window != bd->event_win) && (ev->event_window != bd->win)) { return 1; } - if ((ev->button >= 1) && (ev->button <= 3)) + if ((ev->buttons >= 1) && (ev->buttons <= 3)) { - bd->mouse.last_down[ev->button - 1].mx = ev->root.x; - bd->mouse.last_down[ev->button - 1].my = ev->root.y; - bd->mouse.last_down[ev->button - 1].x = bd->x + bd->fx.x; - bd->mouse.last_down[ev->button - 1].y = bd->y + bd->fx.y; - bd->mouse.last_down[ev->button - 1].w = bd->w; - bd->mouse.last_down[ev->button - 1].h = bd->h; + bd->mouse.last_down[ev->buttons - 1].mx = ev->root.x; + bd->mouse.last_down[ev->buttons - 1].my = ev->root.y; + bd->mouse.last_down[ev->buttons - 1].x = bd->x + bd->fx.x; + bd->mouse.last_down[ev->buttons - 1].y = bd->y + bd->fx.y; + bd->mouse.last_down[ev->buttons - 1].w = bd->w; + bd->mouse.last_down[ev->buttons - 1].h = bd->h; } else { @@ -5221,7 +5222,7 @@ _e_border_cb_mouse_down(void *data, int type, void *event) if (ev->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK; if (ev->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK; - evas_event_feed_mouse_down(bd->bg_evas, ev->button, flags, ev->time, NULL); + evas_event_feed_mouse_down(bd->bg_evas, ev->buttons, flags, ev->timestamp, NULL); } return 1; } @@ -5229,19 +5230,19 @@ _e_border_cb_mouse_down(void *data, int type, void *event) static int _e_border_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; E_Border *bd; ev = event; bd = data; - if (ev->event_win == bd->win) + if (ev->event_window == bd->win) { - if ((ev->button >= 1) && (ev->button <= 3)) + if ((ev->buttons >= 1) && (ev->buttons <= 3)) { - bd->mouse.last_up[ev->button - 1].mx = ev->root.x; - bd->mouse.last_up[ev->button - 1].my = ev->root.y; - bd->mouse.last_up[ev->button - 1].x = bd->x + bd->fx.x; - bd->mouse.last_up[ev->button - 1].y = bd->y + bd->fx.y; + bd->mouse.last_up[ev->buttons - 1].mx = ev->root.x; + bd->mouse.last_up[ev->buttons - 1].my = ev->root.y; + bd->mouse.last_up[ev->buttons - 1].x = bd->x + bd->fx.x; + bd->mouse.last_up[ev->buttons - 1].y = bd->y + bd->fx.y; } bd->mouse.current.mx = ev->root.x; bd->mouse.current.my = ev->root.y; @@ -5262,33 +5263,33 @@ _e_border_cb_mouse_up(void *data, int type, void *event) e_focus_event_mouse_up(bd); } } - if (ev->win != bd->event_win) return 1; - if ((ev->button >= 1) && (ev->button <= 3)) + if (ev->window != bd->event_win) return 1; + if ((ev->buttons >= 1) && (ev->buttons <= 3)) { - bd->mouse.last_up[ev->button - 1].mx = ev->root.x; - bd->mouse.last_up[ev->button - 1].my = ev->root.y; - bd->mouse.last_up[ev->button - 1].x = bd->x + bd->fx.x; - bd->mouse.last_up[ev->button - 1].y = bd->y + bd->fx.y; + bd->mouse.last_up[ev->buttons - 1].mx = ev->root.x; + bd->mouse.last_up[ev->buttons - 1].my = ev->root.y; + bd->mouse.last_up[ev->buttons - 1].x = bd->x + bd->fx.x; + bd->mouse.last_up[ev->buttons - 1].y = bd->y + bd->fx.y; } bd->mouse.current.mx = ev->root.x; bd->mouse.current.my = ev->root.y; bd->drag.start = 0; - evas_event_feed_mouse_up(bd->bg_evas, ev->button, EVAS_BUTTON_NONE, ev->time, NULL); + evas_event_feed_mouse_up(bd->bg_evas, ev->buttons, EVAS_BUTTON_NONE, ev->timestamp, NULL); return 1; } static int _e_border_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; E_Border *bd; ev = event; bd = data; - if ((ev->win != bd->event_win) && - (ev->event_win != bd->win)) return 1; + if ((ev->window != bd->event_win) && + (ev->event_window != bd->win)) return 1; bd->mouse.current.mx = ev->root.x; bd->mouse.current.my = ev->root.y; if (bd->moving) @@ -5399,7 +5400,7 @@ _e_border_cb_mouse_move(void *data, int type, void *event) } } } - evas_event_feed_mouse_move(bd->bg_evas, ev->x, ev->y, ev->time, NULL); + evas_event_feed_mouse_move(bd->bg_evas, ev->x, ev->y, ev->timestamp, NULL); } return 1; } @@ -5407,8 +5408,8 @@ _e_border_cb_mouse_move(void *data, int type, void *event) static int _e_border_cb_grab_replay(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; - if (type != ECORE_X_EVENT_MOUSE_BUTTON_DOWN) return 0; + Ecore_Event_Mouse_Button *ev; + if (type != ECORE_EVENT_MOUSE_BUTTON_DOWN) return 0; ev = event; if ((e_config->pass_click_on) || (e_config->always_click_to_raise) || @@ -5416,12 +5417,12 @@ _e_border_cb_grab_replay(void *data, int type, void *event) { E_Border *bd; - bd = e_border_find_by_window(ev->event_win); + bd = e_border_find_by_window(ev->event_window); if (bd) { if (bd->cur_mouse_action) return 0; - if (ev->event_win == bd->win) + if (ev->event_window == bd->win) { if (!e_bindings_mouse_down_find(E_BINDING_CONTEXT_BORDER, E_OBJECT(bd), ev, NULL)) diff --git a/src/bin/e_border.h b/src/bin/e_border.h index 0eb7fde84..15778cd9a 100644 --- a/src/bin/e_border.h +++ b/src/bin/e_border.h @@ -602,11 +602,11 @@ EAPI Eina_List *e_border_client_list(void); EAPI void e_border_act_move_keyboard(E_Border *bd); EAPI void e_border_act_resize_keyboard(E_Border *bd); -EAPI void e_border_act_move_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev); -EAPI void e_border_act_move_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev); -EAPI void e_border_act_resize_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev); -EAPI void e_border_act_resize_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev); -EAPI void e_border_act_menu_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev, int key); +EAPI void e_border_act_move_begin(E_Border *bd, Ecore_Event_Mouse_Button *ev); +EAPI void e_border_act_move_end(E_Border *bd, Ecore_Event_Mouse_Button *ev); +EAPI void e_border_act_resize_begin(E_Border *bd, Ecore_Event_Mouse_Button *ev); +EAPI void e_border_act_resize_end(E_Border *bd, Ecore_Event_Mouse_Button *ev); +EAPI void e_border_act_menu_begin(E_Border *bd, Ecore_Event_Mouse_Button *ev, int key); EAPI void e_border_act_close_begin(E_Border *bd); EAPI void e_border_act_kill_begin(E_Border *bd); diff --git a/src/bin/e_container.c b/src/bin/e_container.c index 0faca5573..23dbb5f1c 100644 --- a/src/bin/e_container.c +++ b/src/bin/e_container.c @@ -14,7 +14,6 @@ static void _e_container_free(E_Container *con); static E_Container *_e_container_find_by_event_window(Ecore_X_Window win); -static void _e_container_modifiers_update(Evas *evas, int modifiers); static int _e_container_cb_mouse_in(void *data, int type, void *event); static int _e_container_cb_mouse_out(void *data, int type, void *event); @@ -42,10 +41,10 @@ e_container_init(void) handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_IN, _e_container_cb_mouse_in, NULL)); handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_OUT, _e_container_cb_mouse_out, NULL)); - handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_container_cb_mouse_down, NULL)); - handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, _e_container_cb_mouse_up, NULL)); - handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _e_container_cb_mouse_move, NULL)); - handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, _e_container_cb_mouse_wheel, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_container_cb_mouse_down, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_container_cb_mouse_up, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _e_container_cb_mouse_move, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _e_container_cb_mouse_wheel, NULL)); return 1; } @@ -994,45 +993,6 @@ _e_container_find_by_event_window(Ecore_X_Window win) return NULL; } -static void -_e_container_modifiers_update(Evas *evas, int modifiers) -{ - if (modifiers & ECORE_X_MODIFIER_SHIFT) - evas_key_modifier_on(evas, "Shift"); - else - evas_key_modifier_off(evas, "Shift"); - if (modifiers & ECORE_X_MODIFIER_CTRL) - evas_key_modifier_on(evas, "Control"); - else - evas_key_modifier_off(evas, "Control"); - if (modifiers & ECORE_X_MODIFIER_ALT) - evas_key_modifier_on(evas, "Alt"); - else - evas_key_modifier_off(evas, "Alt"); - if (modifiers & ECORE_X_MODIFIER_WIN) - { - evas_key_modifier_on(evas, "Super"); - evas_key_modifier_on(evas, "Hyper"); - } - else - { - evas_key_modifier_off(evas, "Super"); - evas_key_modifier_off(evas, "Hyper"); - } - if (modifiers & ECORE_X_LOCK_SCROLL) - evas_key_lock_on(evas, "Scroll_Lock"); - else - evas_key_lock_off(evas, "Scroll_Lock"); - if (modifiers & ECORE_X_LOCK_NUM) - evas_key_lock_on(evas, "Num_Lock"); - else - evas_key_lock_off(evas, "Num_Lock"); - if (modifiers & ECORE_X_LOCK_CAPS) - evas_key_lock_on(evas, "Caps_Lock"); - else - evas_key_lock_off(evas, "Caps_Lock"); -} - static int _e_container_cb_mouse_in(void *data, int type, void *event) { @@ -1046,7 +1006,7 @@ _e_container_cb_mouse_in(void *data, int type, void *event) { bd = e_border_focused_get(); if (bd) e_focus_event_mouse_out(bd); - _e_container_modifiers_update(con->bg_evas, ev->modifiers); + ecore_evas_event_modifier_lock_update(con->bg_evas, ev->modifiers); evas_event_feed_mouse_in(con->bg_evas, ev->time, NULL); } return 1; @@ -1062,7 +1022,7 @@ _e_container_cb_mouse_out(void *data, int type, void *event) con = _e_container_find_by_event_window(ev->event_win); if (con) { - _e_container_modifiers_update(con->bg_evas, ev->modifiers); + ecore_evas_event_modifier_lock_update(con->bg_evas, ev->modifiers); if (ev->mode == ECORE_X_EVENT_MODE_GRAB) evas_event_feed_mouse_cancel(con->bg_evas, ev->time, NULL); evas_event_feed_mouse_out(con->bg_evas, ev->time, NULL); @@ -1073,11 +1033,11 @@ _e_container_cb_mouse_out(void *data, int type, void *event) static int _e_container_cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; E_Container *con; ev = event; - con = _e_container_find_by_event_window(ev->event_win); + con = _e_container_find_by_event_window(ev->event_window); if (con) { Evas_Button_Flags flags = EVAS_BUTTON_NONE; @@ -1086,8 +1046,8 @@ _e_container_cb_mouse_down(void *data, int type, void *event) E_OBJECT(con), ev); if (ev->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK; if (ev->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK; - _e_container_modifiers_update(con->bg_evas, ev->modifiers); - evas_event_feed_mouse_down(con->bg_evas, ev->button, flags, ev->time, NULL); + ecore_evas_event_modifier_lock_update(con->bg_evas, ev->modifiers); + evas_event_feed_mouse_down(con->bg_evas, ev->buttons, flags, ev->timestamp, NULL); } return 1; } @@ -1095,15 +1055,15 @@ _e_container_cb_mouse_down(void *data, int type, void *event) static int _e_container_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; E_Container *con; ev = event; - con = _e_container_find_by_event_window(ev->event_win); + con = _e_container_find_by_event_window(ev->event_window); if (con) { - evas_event_feed_mouse_up(con->bg_evas, ev->button, EVAS_BUTTON_NONE, ev->time, NULL); - _e_container_modifiers_update(con->bg_evas, ev->modifiers); + evas_event_feed_mouse_up(con->bg_evas, ev->buttons, EVAS_BUTTON_NONE, ev->timestamp, NULL); + ecore_evas_event_modifier_lock_update(con->bg_evas, ev->modifiers); e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_CONTAINER, E_OBJECT(con), ev); } @@ -1113,15 +1073,15 @@ _e_container_cb_mouse_up(void *data, int type, void *event) static int _e_container_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; E_Container *con; ev = event; - con = _e_container_find_by_event_window(ev->event_win); + con = _e_container_find_by_event_window(ev->event_window); if (con) { - _e_container_modifiers_update(con->bg_evas, ev->modifiers); - evas_event_feed_mouse_move(con->bg_evas, ev->x, ev->y, ev->time, NULL); + ecore_evas_event_modifier_lock_update(con->bg_evas, ev->modifiers); + evas_event_feed_mouse_move(con->bg_evas, ev->x, ev->y, ev->timestamp, NULL); } return 1; } @@ -1129,18 +1089,18 @@ _e_container_cb_mouse_move(void *data, int type, void *event) static int _e_container_cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; E_Container *con; ev = event; - con = _e_container_find_by_event_window(ev->event_win); + con = _e_container_find_by_event_window(ev->event_window); if (con) { if (!e_bindings_wheel_event_handle(E_BINDING_CONTEXT_CONTAINER, E_OBJECT(con), ev)) { - _e_container_modifiers_update(con->bg_evas, ev->modifiers); - evas_event_feed_mouse_wheel(con->bg_evas, ev->direction, ev->z, ev->time, NULL); + ecore_evas_event_modifier_lock_update(con->bg_evas, ev->modifiers); + evas_event_feed_mouse_wheel(con->bg_evas, ev->direction, ev->z, ev->timestamp, NULL); } } return 1; diff --git a/src/bin/e_desklock.c b/src/bin/e_desklock.c index 1044e109c..77174ea38 100644 --- a/src/bin/e_desklock.c +++ b/src/bin/e_desklock.c @@ -337,21 +337,21 @@ e_desklock_show(void) /* handlers */ edd->handlers = eina_list_append(edd->handlers, - ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, + ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _e_desklock_cb_key_down, NULL)); edd->handlers = eina_list_append(edd->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_desklock_cb_mouse_down, NULL)); edd->handlers = eina_list_append(edd->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_desklock_cb_mouse_up, NULL)); edd->handlers = eina_list_append(edd->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, + ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _e_desklock_cb_mouse_wheel, NULL)); if ((total_zone_num > 1) && (e_config->desklock_login_box_zone == -2)) edd->handlers = eina_list_append(edd->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, + ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _e_desklock_cb_mouse_move, NULL)); _e_desklock_passwd_update(); @@ -417,31 +417,31 @@ e_desklock_hide(void) static int _e_desklock_cb_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->win != edd->elock_wnd || edd->state == E_DESKLOCK_STATE_CHECKING) return 1; + if (ev->window != edd->elock_wnd || edd->state == E_DESKLOCK_STATE_CHECKING) return 1; - if (!strcmp(ev->keysymbol, "Escape")) + if (!strcmp(ev->key, "Escape")) ; - else if (!strcmp(ev->keysymbol, "KP_Enter")) + else if (!strcmp(ev->key, "KP_Enter")) _e_desklock_check_auth(); - else if (!strcmp(ev->keysymbol, "Return")) + else if (!strcmp(ev->key, "Return")) _e_desklock_check_auth(); - else if (!strcmp(ev->keysymbol, "BackSpace")) + else if (!strcmp(ev->key, "BackSpace")) _e_desklock_backspace(); - else if (!strcmp(ev->keysymbol, "Delete")) + else if (!strcmp(ev->key, "Delete")) _e_desklock_delete(); - else if (!strcmp(ev->keysymbol, "u") && (ev->modifiers & ECORE_X_MODIFIER_CTRL)) + else if (!strcmp(ev->key, "u") && (ev->modifiers & ECORE_X_MODIFIER_CTRL)) _e_desklock_null(); else { /* here we have to grab a password */ - if (ev->key_compose) + if (ev->compose) { - if ((strlen(edd->passwd) < (PASSWD_LEN - strlen(ev->key_compose)))) + if ((strlen(edd->passwd) < (PASSWD_LEN - strlen(ev->compose)))) { - strcat(edd->passwd, ev->key_compose); + strcat(edd->passwd, ev->compose); _e_desklock_passwd_update(); } } diff --git a/src/bin/e_dnd.c b/src/bin/e_dnd.c index 4c97b8032..771ac57f3 100644 --- a/src/bin/e_dnd.c +++ b/src/bin/e_dnd.c @@ -77,10 +77,10 @@ e_dnd_init(void) _drop_handlers_responsives = eina_hash_string_superfast_new(NULL); _event_handlers = eina_list_append(_event_handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_dnd_cb_mouse_up, NULL)); _event_handlers = eina_list_append(_event_handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, + ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _e_dnd_cb_mouse_move, NULL)); _event_handlers = eina_list_append(_event_handlers, ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE, @@ -108,10 +108,10 @@ e_dnd_init(void) ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, _e_dnd_cb_event_dnd_selection, NULL)); _event_handlers = eina_list_append(_event_handlers, - ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, + ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _e_dnd_cb_key_down, NULL)); _event_handlers = eina_list_append(_event_handlers, - ecore_event_handler_add(ECORE_X_EVENT_KEY_UP, + ecore_event_handler_add(ECORE_EVENT_KEY_UP, _e_dnd_cb_key_up, NULL)); _action = ECORE_X_ATOM_XDND_ACTION_PRIVATE; @@ -553,13 +553,13 @@ e_drop_handler_action_get() } EAPI void -e_drag_key_down_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_X_Event_Key_Down *e)) +e_drag_key_down_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_Event_Key *e)) { drag->cb.key_down = func; } EAPI void -e_drag_key_up_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_X_Event_Key_Up *e)) +e_drag_key_up_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_Event_Key *e)) { drag->cb.key_up = func; } @@ -1135,10 +1135,10 @@ _e_dnd_cb_window_shape(void *data, int ev_type, void *ev) static int _e_dnd_cb_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->win != _drag_win) return 1; + if (ev->window != _drag_win) return 1; if (!_drag_current) return 1; @@ -1151,10 +1151,10 @@ _e_dnd_cb_key_down(void *data, int type, void *event) static int _e_dnd_cb_key_up(void *data, int type, void *event) { - Ecore_X_Event_Key_Up *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->win != _drag_win) return 1; + if (ev->window != _drag_win) return 1; if (!_drag_current) return 1; @@ -1167,10 +1167,10 @@ _e_dnd_cb_key_up(void *data, int type, void *event) static int _e_dnd_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->win != _drag_win) return 1; + if (ev->window != _drag_win) return 1; _e_drag_end(_drag_win_root, ev->x, ev->y); @@ -1180,10 +1180,10 @@ _e_dnd_cb_mouse_up(void *data, int type, void *event) static int _e_dnd_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; ev = event; - if (ev->win != _drag_win) return 1; + if (ev->window != _drag_win) return 1; if (!_xdnd) _e_drag_update(_drag_win_root, ev->x, ev->y, ECORE_X_ATOM_XDND_ACTION_PRIVATE); diff --git a/src/bin/e_dnd.h b/src/bin/e_dnd.h index 84734cd4d..812b07032 100644 --- a/src/bin/e_dnd.h +++ b/src/bin/e_dnd.h @@ -38,8 +38,8 @@ struct _E_Drag struct { void *(*convert)(E_Drag *drag, const char *type); void (*finished)(E_Drag *drag, int dropped); - void (*key_down)(E_Drag *drag, Ecore_X_Event_Key_Down *e); - void (*key_up)(E_Drag *drag, Ecore_X_Event_Key_Up *e); + void (*key_down)(E_Drag *drag, Ecore_Event_Key *e); + void (*key_up)(E_Drag *drag, Ecore_Event_Key *e); } cb; E_Container *container; @@ -122,8 +122,8 @@ EAPI void e_drag_object_set(E_Drag *drag, Evas_Object *object); EAPI void e_drag_move(E_Drag *drag, int x, int y); EAPI void e_drag_resize(E_Drag *drag, int w, int h); EAPI void e_drag_idler_before(void); -EAPI void e_drag_key_down_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_X_Event_Key_Down *e)); -EAPI void e_drag_key_up_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_X_Event_Key_Up *e)); +EAPI void e_drag_key_down_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_Event_Key *e)); +EAPI void e_drag_key_up_cb_set(E_Drag *drag, void (*func)(E_Drag *drag, Ecore_Event_Key *e)); /* x and y are the coords where the mouse is when dragging starts */ EAPI int e_drag_start(E_Drag *drag, int x, int y); diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index afd49b809..9da98ebd5 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -5926,7 +5926,7 @@ _e_fm2_cb_drag_finished(E_Drag *drag, int dropped) } void -_e_fm_drag_key_down_cb(E_Drag *drag, Ecore_X_Event_Key_Down *e) +_e_fm_drag_key_down_cb(E_Drag *drag, Ecore_Event_Key *e) { if (!strncmp(e->keyname, "Alt", 3)) { @@ -5946,7 +5946,7 @@ _e_fm_drag_key_down_cb(E_Drag *drag, Ecore_X_Event_Key_Down *e) } void -_e_fm_drag_key_up_cb(E_Drag *drag, Ecore_X_Event_Key_Up *e) +_e_fm_drag_key_up_cb(E_Drag *drag, Ecore_Event_Key *e) { /* Default action would be move. ;) */ diff --git a/src/bin/e_manager.c b/src/bin/e_manager.c index 6b5ad9a74..40aaa9d36 100644 --- a/src/bin/e_manager.c +++ b/src/bin/e_manager.c @@ -134,9 +134,9 @@ e_manager_new(Ecore_X_Window root, int num) if (h) man->handlers = eina_list_append(man->handlers, h); h = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_CONFIGURE, _e_manager_cb_window_configure, man); if (h) man->handlers = eina_list_append(man->handlers, h); - h = ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, _e_manager_cb_key_down, man); + h = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _e_manager_cb_key_down, man); if (h) man->handlers = eina_list_append(man->handlers, h); - h = ecore_event_handler_add(ECORE_X_EVENT_KEY_UP, _e_manager_cb_key_up, man); + h = ecore_event_handler_add(ECORE_EVENT_KEY_UP, _e_manager_cb_key_up, man); if (h) man->handlers = eina_list_append(man->handlers, h); h = ecore_event_handler_add(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST, _e_manager_cb_frame_extents_request, man); if (h) man->handlers = eina_list_append(man->handlers, h); @@ -596,13 +596,13 @@ static int _e_manager_cb_key_down(void *data, int ev_type __UNUSED__, void *ev) { E_Manager *man; - Ecore_X_Event_Key_Down *e; + Ecore_Event_Key *e; man = data; e = ev; - if (e->event_win != man->root) return 1; - if (e->root_win != man->root) man = _e_manager_get_for_root(e->root_win); + if (e->event_window != man->root) return 1; + if (e->root_window != man->root) man = _e_manager_get_for_root(e->root_window); if (e_bindings_key_down_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(man), ev)) return 0; return 1; @@ -612,13 +612,13 @@ static int _e_manager_cb_key_up(void *data, int ev_type __UNUSED__, void *ev) { E_Manager *man; - Ecore_X_Event_Key_Up *e; + Ecore_Event_Key *e; man = data; e = ev; - if (e->event_win != man->root) return 1; - if (e->root_win != man->root) man = _e_manager_get_for_root(e->root_win); + if (e->event_window != man->root) return 1; + if (e->root_window != man->root) man = _e_manager_get_for_root(e->root_window); if (e_bindings_key_up_event_handle(E_BINDING_CONTEXT_MANAGER, E_OBJECT(man), ev)) return 0; return 1; diff --git a/src/bin/e_menu.c b/src/bin/e_menu.c index 15425a766..399cf1d77 100644 --- a/src/bin/e_menu.c +++ b/src/bin/e_menu.c @@ -53,7 +53,7 @@ static void _e_menu_item_activate_previous (void); static void _e_menu_item_activate_first (void); static void _e_menu_item_activate_last (void); static void _e_menu_item_activate_nth (int n); -static void _e_menu_item_activate_char (char * key_compose); +static void _e_menu_item_activate_char (const char * key_compose); static void _e_menu_activate_next (void); static void _e_menu_activate_previous (void); static void _e_menu_activate_first (void); @@ -117,12 +117,12 @@ static Ecore_Event_Handler *_e_menu_window_shape_handler = NULL; EAPI int e_menu_init(void) { - _e_menu_key_down_handler = ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, _e_menu_cb_key_down, NULL); - _e_menu_key_up_handler = ecore_event_handler_add(ECORE_X_EVENT_KEY_UP, _e_menu_cb_key_up, NULL); - _e_menu_mouse_down_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_menu_cb_mouse_down, NULL); - _e_menu_mouse_up_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, _e_menu_cb_mouse_up, NULL); - _e_menu_mouse_move_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _e_menu_cb_mouse_move, NULL); - _e_menu_mouse_wheel_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, _e_menu_cb_mouse_wheel, NULL); + _e_menu_key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _e_menu_cb_key_down, NULL); + _e_menu_key_up_handler = ecore_event_handler_add(ECORE_EVENT_KEY_UP, _e_menu_cb_key_up, NULL); + _e_menu_mouse_down_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_menu_cb_mouse_down, NULL); + _e_menu_mouse_up_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_menu_cb_mouse_up, NULL); + _e_menu_mouse_move_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _e_menu_cb_mouse_move, NULL); + _e_menu_mouse_wheel_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _e_menu_cb_mouse_wheel, NULL); _e_menu_window_shape_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE, _e_menu_cb_window_shape, NULL); _e_menu_categories = eina_hash_string_superfast_new(NULL); return 1; @@ -2095,7 +2095,7 @@ _e_menu_item_activate_nth(int n) } static void -_e_menu_item_activate_char(char * key_compose) +_e_menu_item_activate_char(const char * key_compose) { E_Menu *m; E_Menu_Item *mi; @@ -2573,72 +2573,72 @@ _e_menu_cb_item_out(void *data, Evas *evas, Evas_Object *obj, void *event_info) static int _e_menu_cb_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->win != _e_menu_win) return 1; - if ((!strcmp(ev->keysymbol, "Up")) || - (!strcmp(ev->keysymbol, "KP_Up"))) + if (ev->window != _e_menu_win) return 1; + if ((!strcmp(ev->key, "Up")) || + (!strcmp(ev->key, "KP_Up"))) _e_menu_item_activate_previous(); - else if ((!strcmp(ev->keysymbol, "Down")) || - (!strcmp(ev->keysymbol, "KP_Down"))) + else if ((!strcmp(ev->key, "Down")) || + (!strcmp(ev->key, "KP_Down"))) _e_menu_item_activate_next(); - else if ((!strcmp(ev->keysymbol, "Left")) || - (!strcmp(ev->keysymbol, "KP_Left"))) + else if ((!strcmp(ev->key, "Left")) || + (!strcmp(ev->key, "KP_Left"))) _e_menu_activate_previous(); - else if ((!strcmp(ev->keysymbol, "Right")) || - (!strcmp(ev->keysymbol, "KP_Right"))) + else if ((!strcmp(ev->key, "Right")) || + (!strcmp(ev->key, "KP_Right"))) _e_menu_activate_next(); - else if ((!strcmp(ev->keysymbol, "Home")) || - (!strcmp(ev->keysymbol, "KP_Home"))) + else if ((!strcmp(ev->key, "Home")) || + (!strcmp(ev->key, "KP_Home"))) _e_menu_item_activate_first(); - else if ((!strcmp(ev->keysymbol, "End")) || - (!strcmp(ev->keysymbol, "KP_End"))) + else if ((!strcmp(ev->key, "End")) || + (!strcmp(ev->key, "KP_End"))) _e_menu_item_activate_last(); - else if (!strcmp(ev->keysymbol, "space")) + else if (!strcmp(ev->key, "space")) { _e_menu_active_call(); } - else if ((!strcmp(ev->keysymbol, "Return")) || - (!strcmp(ev->keysymbol, "KP_Enter"))) + else if ((!strcmp(ev->key, "Return")) || + (!strcmp(ev->key, "KP_Enter"))) { _e_menu_active_call(); _e_menu_deactivate_all(); } - else if (!strcmp(ev->keysymbol, "Escape")) + else if (!strcmp(ev->key, "Escape")) _e_menu_deactivate_all(); - else if ((!strcmp(ev->keysymbol, "1")) || (!strcmp(ev->keysymbol, "KP_1"))) + else if ((!strcmp(ev->key, "1")) || (!strcmp(ev->key, "KP_1"))) _e_menu_item_activate_first(); - else if ((!strcmp(ev->keysymbol, "2")) || (!strcmp(ev->keysymbol, "KP_2"))) + else if ((!strcmp(ev->key, "2")) || (!strcmp(ev->key, "KP_2"))) _e_menu_item_activate_nth(1); - else if ((!strcmp(ev->keysymbol, "3")) || (!strcmp(ev->keysymbol, "KP_3"))) + else if ((!strcmp(ev->key, "3")) || (!strcmp(ev->key, "KP_3"))) _e_menu_item_activate_nth(2); - else if ((!strcmp(ev->keysymbol, "4")) || (!strcmp(ev->keysymbol, "KP_4"))) + else if ((!strcmp(ev->key, "4")) || (!strcmp(ev->key, "KP_4"))) _e_menu_item_activate_nth(3); - else if ((!strcmp(ev->keysymbol, "5")) || (!strcmp(ev->keysymbol, "KP_5"))) + else if ((!strcmp(ev->key, "5")) || (!strcmp(ev->key, "KP_5"))) _e_menu_item_activate_nth(4); - else if ((!strcmp(ev->keysymbol, "6")) || (!strcmp(ev->keysymbol, "KP_6"))) + else if ((!strcmp(ev->key, "6")) || (!strcmp(ev->key, "KP_6"))) _e_menu_item_activate_nth(5); - else if ((!strcmp(ev->keysymbol, "7")) || (!strcmp(ev->keysymbol, "KP_7"))) + else if ((!strcmp(ev->key, "7")) || (!strcmp(ev->key, "KP_7"))) _e_menu_item_activate_nth(6); - else if ((!strcmp(ev->keysymbol, "8")) || (!strcmp(ev->keysymbol, "KP_8"))) + else if ((!strcmp(ev->key, "8")) || (!strcmp(ev->key, "KP_8"))) _e_menu_item_activate_nth(7); - else if ((!strcmp(ev->keysymbol, "9")) || (!strcmp(ev->keysymbol, "KP_9"))) + else if ((!strcmp(ev->key, "9")) || (!strcmp(ev->key, "KP_9"))) _e_menu_item_activate_nth(8); - else if ((!strcmp(ev->keysymbol, "0")) || (!strcmp(ev->keysymbol, "KP_0"))) + else if ((!strcmp(ev->key, "0")) || (!strcmp(ev->key, "KP_0"))) _e_menu_item_activate_last(); - else if (ev->key_compose) - _e_menu_item_activate_char(ev->key_compose); + else if (ev->compose) + _e_menu_item_activate_char(ev->compose); return 1; } static int _e_menu_cb_key_up(void *data, int type, void *event) { - Ecore_X_Event_Key_Up *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->win != _e_menu_win) return 1; + if (ev->window != _e_menu_win) return 1; return 1; } @@ -2650,10 +2650,10 @@ _e_menu_cb_key_up(void *data, int type, void *event) static int _e_menu_cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->win != _e_menu_win) return 1; + if (ev->window != _e_menu_win) return 1; /* Only allow dragging from floating menus for now. * The reason for this is that for non floating menus, @@ -2669,14 +2669,14 @@ _e_menu_cb_mouse_down(void *data, int type, void *event) static int _e_menu_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; Ecore_X_Time t; int ret = 0; ev = event; - if (ev->win != _e_menu_win) return 1; + if (ev->window != _e_menu_win) return 1; - t = ev->time - _e_menu_activate_time; + t = ev->timestamp - _e_menu_activate_time; if ((_e_menu_activate_time != 0) && (t < (e_config->menus_click_drag_timeout * 1000))) { @@ -2710,7 +2710,7 @@ _e_menu_cb_mouse_up(void *data, int type, void *event) static int _e_menu_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; Eina_List *l, *tmp = NULL; int dx, dy, d; double dt; @@ -2718,12 +2718,12 @@ _e_menu_cb_mouse_move(void *data, int type, void *event) int is_fast = 0; ev = event; - if (ev->win != _e_menu_win) return 1; + if (ev->window != _e_menu_win) return 1; fast_move_threshold = e_config->menus_fast_mouse_move_threshhold; dx = ev->x - _e_menu_x; dy = ev->y - _e_menu_y; d = (dx * dx) + (dy * dy); - dt = (double)(ev->time - _e_menu_time) / 1000.0; + dt = (double)(ev->timestamp - _e_menu_time) / 1000.0; dt = dt * dt; if ((dt > 0.0) && ((d / dt) >= (fast_move_threshold * fast_move_threshold))) is_fast = 1; @@ -2757,7 +2757,7 @@ _e_menu_cb_mouse_move(void *data, int type, void *event) evas_event_feed_mouse_move(m->evas, ev->x - m->cur.x + m->zone->x, ev->y - m->cur.y + m->zone->y, - ev->time, + ev->timestamp, NULL); } } @@ -2769,7 +2769,7 @@ _e_menu_cb_mouse_move(void *data, int type, void *event) _e_menu_x = ev->x; _e_menu_y = ev->y; - _e_menu_time = ev->time; + _e_menu_time = ev->timestamp; _e_menu_mouse_autoscroll_check(); return 1; } @@ -2777,10 +2777,10 @@ _e_menu_cb_mouse_move(void *data, int type, void *event) static int _e_menu_cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; ev = event; - if (ev->win != _e_menu_win) return 1; + if (ev->window != _e_menu_win) return 1; if (ev->z < 0) /* up */ { int i; diff --git a/src/bin/e_pointer.c b/src/bin/e_pointer.c index 441572420..69bd8c20a 100644 --- a/src/bin/e_pointer.c +++ b/src/bin/e_pointer.c @@ -40,10 +40,10 @@ static int _e_pointer_cb_idle_poller(void *data); EAPI int e_pointer_init(void) { - handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_pointer_cb_mouse_down, NULL)); - handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, _e_pointer_cb_mouse_up, NULL)); - handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _e_pointer_cb_mouse_move, NULL)); - handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, _e_pointer_cb_mouse_wheel, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_pointer_cb_mouse_down, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_pointer_cb_mouse_up, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _e_pointer_cb_mouse_move, NULL)); + handlers = eina_list_append(handlers, ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _e_pointer_cb_mouse_wheel, NULL)); return 1; } @@ -534,7 +534,7 @@ _e_pointer_active_handle(E_Pointer *p) static int _e_pointer_cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; Eina_List *l; E_Pointer *p; @@ -555,7 +555,7 @@ _e_pointer_cb_mouse_down(void *data, int type, void *event) static int _e_pointer_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; Eina_List *l; E_Pointer *p; @@ -576,7 +576,7 @@ _e_pointer_cb_mouse_up(void *data, int type, void *event) static int _e_pointer_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; Eina_List *l; E_Pointer *p; @@ -597,7 +597,7 @@ _e_pointer_cb_mouse_move(void *data, int type, void *event) static int _e_pointer_cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; Eina_List *l; E_Pointer *p; diff --git a/src/bin/e_popup.c b/src/bin/e_popup.c index 5f53934ec..438c5a9ed 100644 --- a/src/bin/e_popup.c +++ b/src/bin/e_popup.c @@ -30,11 +30,11 @@ e_popup_init(void) _e_popup_window_shape_handler = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_SHAPE, _e_popup_cb_window_shape, NULL); /* - _e_popup_mouse_down_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, + _e_popup_mouse_down_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_popup_cb_mouse_down, NULL); - _e_popup_mouse_up_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + _e_popup_mouse_up_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_popup_cb_mouse_up, NULL); - _e_popup_mouse_wheel_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, + _e_popup_mouse_wheel_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _e_popup_cb_mouse_wheel, NULL); */ return 1; @@ -327,11 +327,11 @@ _e_popup_find_by_window(Ecore_X_Window win) static int _e_popup_cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; E_Popup *pop; ev = event; - pop = _e_popup_find_by_window(ev->event_win); + pop = _e_popup_find_by_window(ev->event_window); if (pop) { Evas_Button_Flags flags = EVAS_BUTTON_NONE; @@ -340,7 +340,7 @@ _e_popup_cb_mouse_down(void *data, int type, void *event) E_OBJECT(pop), ev); if (ev->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK; if (ev->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK; - evas_event_feed_mouse_down(pop->evas, ev->button, flags, ev->time, NULL); + evas_event_feed_mouse_down(pop->evas, ev->buttons, flags, ev->timestamp, NULL); return 0; } return 1; @@ -349,14 +349,14 @@ _e_popup_cb_mouse_down(void *data, int type, void *event) static int _e_popup_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; E_Popup *pop; ev = event; - pop = _e_popup_find_by_window(ev->event_win); + pop = _e_popup_find_by_window(ev->event_window); if (pop) { - evas_event_feed_mouse_up(pop->evas, ev->button, EVAS_BUTTON_NONE, ev->time, NULL); + evas_event_feed_mouse_up(pop->evas, ev->buttons, EVAS_BUTTON_NONE, ev->timestamp, NULL); e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_POPUP, E_OBJECT(pop), ev); return 0; @@ -367,16 +367,16 @@ _e_popup_cb_mouse_up(void *data, int type, void *event) static int _e_popup_cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; E_Popup *pop; ev = event; - pop = _e_popup_find_by_window(ev->event_win); + pop = _e_popup_find_by_window(ev->event_window); if (pop) { e_bindings_wheel_event_handle(E_BINDING_CONTEXT_POPUP, E_OBJECT(pop), ev); - evas_event_feed_mouse_wheel(pop->evas, ev->direction, ev->z, ev->time, NULL); + evas_event_feed_mouse_wheel(pop->evas, ev->direction, ev->z, ev->timestamp, NULL); return 0; } return 1; diff --git a/src/bin/e_widget_toolbar.c b/src/bin/e_widget_toolbar.c index 0cb53b53d..e416bab9e 100644 --- a/src/bin/e_widget_toolbar.c +++ b/src/bin/e_widget_toolbar.c @@ -255,6 +255,9 @@ _e_wid_cb_scrollframe_resize(void *data, Evas *e, Evas_Object *obj, void *event_ Item *it; wd = e_widget_data_get(data); + + if (wd->o_base == NULL || wd->o_box == NULL) return ; + e_scrollframe_child_viewport_size_get(wd->o_base, &vw, &vh); e_box_min_size_get(wd->o_box, &mw, &mh); evas_object_geometry_get(wd->o_box, NULL, NULL, &w, &h); diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index eaecd2422..a73f74d46 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -146,7 +146,7 @@ e_zone_new(E_Container *con, int num, int id, int x, int y, int w, int h) _e_zone_cb_mouse_out, zone)); zone->handlers = eina_list_append(zone->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, + ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _e_zone_cb_mouse_move, zone)); zone->handlers = eina_list_append(zone->handlers, @@ -909,9 +909,9 @@ _e_zone_cb_bg_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_i if (!zone->cur_mouse_action) { - if (ecore_event_current_type_get() == ECORE_X_EVENT_MOUSE_BUTTON_DOWN) + if (ecore_event_current_type_get() == ECORE_EVENT_MOUSE_BUTTON_DOWN) { - Ecore_X_Event_Mouse_Button_Down *ev2; + Ecore_Event_Mouse_Button *ev2; ev2 = ecore_event_current_event_get(); zone->cur_mouse_action = @@ -939,9 +939,9 @@ _e_zone_cb_bg_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_inf zone = data; if (zone->cur_mouse_action) { - if (ecore_event_current_type_get() == ECORE_X_EVENT_MOUSE_BUTTON_UP) + if (ecore_event_current_type_get() == ECORE_EVENT_MOUSE_BUTTON_UP) { - Ecore_X_Event_Mouse_Button_Up *ev2; + Ecore_Event_Mouse_Button *ev2; ev2 = ecore_event_current_event_get(); if (zone->cur_mouse_action->func.end_mouse) @@ -954,9 +954,9 @@ _e_zone_cb_bg_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_inf } else { - if (ecore_event_current_type_get() == ECORE_X_EVENT_MOUSE_BUTTON_UP) + if (ecore_event_current_type_get() == ECORE_EVENT_MOUSE_BUTTON_UP) { - Ecore_X_Event_Mouse_Button_Up *ev2; + Ecore_Event_Mouse_Button *ev2; ev2 = ecore_event_current_event_get(); e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_ZONE, @@ -1067,7 +1067,7 @@ _e_zone_cb_mouse_out(void *data, int type, void *event) static int _e_zone_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; E_Event_Zone_Edge *zev; E_Zone_Edge edge; E_Zone *zone; @@ -1075,25 +1075,25 @@ _e_zone_cb_mouse_move(void *data, int type, void *event) ev = event; zone = data; - if (ev->win == zone->edge.left) + if (ev->window == zone->edge.left) edge = E_ZONE_EDGE_LEFT; - else if (ev->win == zone->edge.top) + else if (ev->window == zone->edge.top) edge = E_ZONE_EDGE_TOP; - else if (ev->win == zone->edge.right) + else if (ev->window == zone->edge.right) edge = E_ZONE_EDGE_RIGHT; - else if (ev->win == zone->edge.bottom) + else if (ev->window == zone->edge.bottom) edge = E_ZONE_EDGE_BOTTOM; - else if ((ev->win == zone->corner.left_top) || - (ev->win == zone->corner.top_left)) + else if ((ev->window == zone->corner.left_top) || + (ev->window == zone->corner.top_left)) edge = E_ZONE_EDGE_TOP_LEFT; - else if ((ev->win == zone->corner.right_top) || - (ev->win == zone->corner.top_right)) + else if ((ev->window == zone->corner.right_top) || + (ev->window == zone->corner.top_right)) edge = E_ZONE_EDGE_TOP_RIGHT; - else if ((ev->win == zone->corner.right_bottom) || - (ev->win == zone->corner.bottom_right)) + else if ((ev->window == zone->corner.right_bottom) || + (ev->window == zone->corner.bottom_right)) edge = E_ZONE_EDGE_BOTTOM_RIGHT; - else if ((ev->win == zone->corner.left_bottom) || - (ev->win == zone->corner.bottom_left)) + else if ((ev->window == zone->corner.left_bottom) || + (ev->window == zone->corner.bottom_left)) edge = E_ZONE_EDGE_BOTTOM_LEFT; else return 1; diff --git a/src/modules/conf_keybindings/e_int_config_keybindings.c b/src/modules/conf_keybindings/e_int_config_keybindings.c index 6729ab2dc..b63e4fac6 100644 --- a/src/modules/conf_keybindings/e_int_config_keybindings.c +++ b/src/modules/conf_keybindings/e_int_config_keybindings.c @@ -929,19 +929,19 @@ _grab_wnd_show(E_Config_Dialog_Data *cfdata) e_grabinput_get(cfdata->locals.bind_win, 0, cfdata->locals.bind_win); cfdata->locals.handlers = eina_list_append(cfdata->locals.handlers, - ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, + ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _grab_key_down_cb, cfdata)); cfdata->locals.handlers = eina_list_append(cfdata->locals.handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _grab_mouse_dumb_cb, NULL)); cfdata->locals.handlers = eina_list_append(cfdata->locals.handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _grab_mouse_dumb_cb, NULL)); cfdata->locals.handlers = eina_list_append(cfdata->locals.handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, + ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _grab_mouse_dumb_cb, NULL)); e_dialog_show(cfdata->locals.dia); @@ -970,27 +970,27 @@ static int _grab_key_down_cb(void *data, int type, void *event) { E_Config_Dialog_Data *cfdata; - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev = event; cfdata = data; - if (ev->win != cfdata->locals.bind_win) return 1; + if (ev->window != cfdata->locals.bind_win) return 1; if (!strcmp(ev->keyname, "Escape") && - !(ev->modifiers & ECORE_X_MODIFIER_SHIFT) && - !(ev->modifiers & ECORE_X_MODIFIER_CTRL) && - !(ev->modifiers & ECORE_X_MODIFIER_ALT) && - !(ev->modifiers & ECORE_X_MODIFIER_WIN)) + !(ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) && + !(ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) && + !(ev->modifiers & ECORE_EVENT_MODIFIER_ALT) && + !(ev->modifiers & ECORE_EVENT_MODIFIER_WIN)) { _grab_wnd_hide(cfdata); } else { - if ((ev->keyname) && (ev->keysymbol) && (ev->key_compose)) - printf("'%s' '%s' '%s'\n", ev->keyname, ev->keysymbol, ev->key_compose); - else if ((ev->keyname) && (ev->keysymbol)) - printf("'%s' '%s'\n", ev->keyname, ev->keysymbol); + if ((ev->keyname) && (ev->key) && (ev->compose)) + printf("'%s' '%s' '%s'\n", ev->keyname, ev->key, ev->compose); + else if ((ev->keyname) && (ev->key)) + printf("'%s' '%s'\n", ev->keyname, ev->key); else printf("unknown key!!!!\n"); if (!strcmp(ev->keyname, "Control_L") || !strcmp(ev->keyname, "Control_R") || @@ -1007,13 +1007,13 @@ _grab_key_down_cb(void *data, int type, void *event) int mod = E_BINDING_MODIFIER_NONE; int found = 0, n; - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; /* see comment in e_bindings on numlock if (ev->modifiers & ECORE_X_LOCK_NUM) diff --git a/src/modules/conf_mousebindings/e_int_config_mousebindings.c b/src/modules/conf_mousebindings/e_int_config_mousebindings.c index 52682d6dc..64fa77252 100644 --- a/src/modules/conf_mousebindings/e_int_config_mousebindings.c +++ b/src/modules/conf_mousebindings/e_int_config_mousebindings.c @@ -1281,15 +1281,15 @@ _grab_wnd_show(E_Config_Dialog_Data *cfdata) e_grabinput_get(cfdata->locals.bind_win, 0, cfdata->locals.bind_win); cfdata->locals.handlers = eina_list_append(cfdata->locals.handlers, - ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, + ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _grab_key_down_cb, cfdata)); cfdata->locals.handlers = eina_list_append(cfdata->locals.handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _grab_mouse_down_cb, cfdata)); cfdata->locals.handlers = eina_list_append(cfdata->locals.handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_WHEEL, + ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _grab_mouse_wheel_cb, cfdata)); e_dialog_show(cfdata->locals.dia); @@ -1323,27 +1323,27 @@ _grab_mouse_down_cb(void *data, int type, void *event) E_Config_Binding_Wheel *bw; int mod = E_BINDING_MODIFIER_NONE, n; - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; ev = event; cfdata = data; - if (ev->win != cfdata->locals.bind_win) return 1; + if (ev->window != cfdata->locals.bind_win) return 1; - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; if (cfdata->locals.add) { eb = E_NEW(E_Config_Binding_Mouse, 1); eb->context = E_BINDING_CONTEXT_ANY; - eb->button = ev->button; + eb->button = ev->buttons; eb->modifiers = mod; eb->any_mod = 0; eb->action = NULL; @@ -1359,7 +1359,7 @@ _grab_mouse_down_cb(void *data, int type, void *event) eb = eina_list_nth(cfdata->binding.mouse, n); if (eb) { - eb->button = ev->button; + eb->button = ev->buttons; eb->modifiers = mod; } } @@ -1371,7 +1371,7 @@ _grab_mouse_down_cb(void *data, int type, void *event) eb = E_NEW(E_Config_Binding_Mouse, 1); eb->context = bw->context; - eb->button = ev->button; + eb->button = ev->buttons; eb->modifiers = mod; eb->any_mod = 0; eb->action = bw->action; @@ -1423,21 +1423,21 @@ _grab_mouse_wheel_cb(void *data, int type, void *event) E_Config_Binding_Wheel *bw = NULL; E_Config_Binding_Mouse *eb = NULL; E_Config_Dialog_Data *cfdata; - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; int mod = E_BINDING_MODIFIER_NONE, n; ev = event; cfdata = data; - if (ev->win != cfdata->locals.bind_win) return 1; + if (ev->window != cfdata->locals.bind_win) return 1; - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; @@ -1535,17 +1535,17 @@ static int _grab_key_down_cb(void *data, int type, void *event) { E_Config_Dialog_Data *cfdata; - Ecore_X_Event_Key_Down *ev = event; + Ecore_Event_Key *ev = event; cfdata = data; - if (ev->win != cfdata->locals.bind_win) return 1; + if (ev->window != cfdata->locals.bind_win) return 1; if (!strcmp(ev->keyname, "Escape") && - !(ev->modifiers & ECORE_X_MODIFIER_SHIFT) && - !(ev->modifiers & ECORE_X_MODIFIER_CTRL) && - !(ev->modifiers & ECORE_X_MODIFIER_ALT) && - !(ev->modifiers & ECORE_X_MODIFIER_WIN)) + !(ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) && + !(ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) && + !(ev->modifiers & ECORE_EVENT_MODIFIER_ALT) && + !(ev->modifiers & ECORE_EVENT_MODIFIER_WIN)) { _grab_wnd_hide(cfdata); } diff --git a/src/modules/exebuf/e_exebuf.c b/src/modules/exebuf/e_exebuf.c index ddcde1ad3..57b9f20dd 100644 --- a/src/modules/exebuf/e_exebuf.c +++ b/src/modules/exebuf/e_exebuf.c @@ -230,19 +230,19 @@ e_exebuf_show(E_Zone *zone) handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_KEY_DOWN, _e_exebuf_cb_key_down, NULL)); + (ECORE_EVENT_KEY_DOWN, _e_exebuf_cb_key_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_exebuf_cb_mouse_down, NULL)); + (ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_exebuf_cb_mouse_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_BUTTON_UP, _e_exebuf_cb_mouse_up, NULL)); + (ECORE_EVENT_MOUSE_BUTTON_UP, _e_exebuf_cb_mouse_up, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_MOVE, _e_exebuf_cb_mouse_move, NULL)); + (ECORE_EVENT_MOUSE_MOVE, _e_exebuf_cb_mouse_move, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_WHEEL, _e_exebuf_cb_mouse_wheel, NULL)); + (ECORE_EVENT_MOUSE_WHEEL, _e_exebuf_cb_mouse_wheel, NULL)); el = e_config_domain_load("exebuf_exelist_cache", exelist_edd); if (el) @@ -1303,51 +1303,51 @@ _e_exebuf_cb_exe_item_mouse_out(void *data, Evas *evas, Evas_Object *obj, static int _e_exebuf_cb_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev_last_is_mouse = 0; ev = event; - if (ev->event_win != input_window) return 1; - if (!strcmp(ev->keysymbol, "Up")) + if (ev->window != input_window) return 1; + if (!strcmp(ev->key, "Up")) _e_exebuf_prev(); - else if (!strcmp(ev->keysymbol, "Down")) + else if (!strcmp(ev->key, "Down")) _e_exebuf_next(); - else if (!strcmp(ev->keysymbol, "Prior")) + else if (!strcmp(ev->key, "Prior")) _e_exebuf_prev(); - else if (!strcmp(ev->keysymbol, "Next")) + else if (!strcmp(ev->key, "Next")) _e_exebuf_next(); - else if (!strcmp(ev->keysymbol, "Left")) + else if (!strcmp(ev->key, "Left")) _e_exebuf_prev(); - else if (!strcmp(ev->keysymbol, "Right")) + else if (!strcmp(ev->key, "Right")) _e_exebuf_complete(); - else if (!strcmp(ev->keysymbol, "Tab")) + else if (!strcmp(ev->key, "Tab")) _e_exebuf_complete(); - else if (!strcmp(ev->keysymbol, "Return") && (ev->modifiers & ECORE_X_MODIFIER_CTRL)) + else if (!strcmp(ev->key, "Return") && (ev->modifiers & ECORE_X_MODIFIER_CTRL)) _e_exebuf_exec_term(); - else if (!strcmp(ev->keysymbol, "Return")) + else if (!strcmp(ev->key, "Return")) _e_exebuf_exec(); - else if (!strcmp(ev->keysymbol, "KP_Enter") && (ev->modifiers & ECORE_X_MODIFIER_CTRL)) + else if (!strcmp(ev->key, "KP_Enter") && (ev->modifiers & ECORE_X_MODIFIER_CTRL)) _e_exebuf_exec_term(); - else if (!strcmp(ev->keysymbol, "KP_Enter")) + else if (!strcmp(ev->key, "KP_Enter")) _e_exebuf_exec(); - else if (!strcmp(ev->keysymbol, "u") && (ev->modifiers & ECORE_X_MODIFIER_CTRL)) + else if (!strcmp(ev->key, "u") && (ev->modifiers & ECORE_X_MODIFIER_CTRL)) _e_exebuf_clear(); - else if (!strcmp(ev->keysymbol, "Escape")) + else if (!strcmp(ev->key, "Escape")) e_exebuf_hide(); - else if (!strcmp(ev->keysymbol, "BackSpace")) + else if (!strcmp(ev->key, "BackSpace")) _e_exebuf_backspace(); - else if (!strcmp(ev->keysymbol, "Delete")) + else if (!strcmp(ev->key, "Delete")) _e_exebuf_backspace(); else { - if (ev->key_compose) + if (ev->compose) { - if ((strlen(cmd_buf) < (EXEBUFLEN - strlen(ev->key_compose)))) + if ((strlen(cmd_buf) < (EXEBUFLEN - strlen(ev->compose)))) { if (!(strlen(cmd_buf)) && exe_sel) _e_exebuf_hist_clear(); - strcat(cmd_buf, ev->key_compose); + strcat(cmd_buf, ev->compose); _e_exebuf_update(); if (!update_timer) update_timer = ecore_timer_add(MATCH_LAG, _e_exebuf_update_timer, NULL); @@ -1360,10 +1360,10 @@ _e_exebuf_cb_key_down(void *data, int type, void *event) static int _e_exebuf_cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; if (ev_last_mouse_exe && (exe_sel != ev_last_mouse_exe)) { @@ -1378,13 +1378,13 @@ _e_exebuf_cb_mouse_down(void *data, int type, void *event) static int _e_exebuf_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->event_win != input_window) return 1; - if (ev->button == 1) + if (ev->window != input_window) return 1; + if (ev->buttons == 1) _e_exebuf_exec(); - else if (ev->button == 2) + else if (ev->buttons == 2) _e_exebuf_complete(); return 1; @@ -1393,10 +1393,10 @@ _e_exebuf_cb_mouse_up(void *data, int type, void *event) static int _e_exebuf_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; if (!ev_last_is_mouse) { @@ -1415,7 +1415,7 @@ _e_exebuf_cb_mouse_move(void *data, int type, void *event) } evas_event_feed_mouse_move(exebuf->evas, ev->x - exebuf->x, - ev->y - exebuf->y, ev->time, NULL); + ev->y - exebuf->y, ev->timestamp, NULL); return 1; } @@ -1423,10 +1423,10 @@ _e_exebuf_cb_mouse_move(void *data, int type, void *event) static int _e_exebuf_cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; ev_last_is_mouse = 0; diff --git a/src/modules/illume/e_appwin.c b/src/modules/illume/e_appwin.c index fdf91b669..91edaee6d 100644 --- a/src/modules/illume/e_appwin.c +++ b/src/modules/illume/e_appwin.c @@ -112,7 +112,7 @@ e_appwin_new(E_Zone *zone, const char *themedir) esw->handlers = eina_list_append (esw->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_appwin_cb_mouse_up, esw)); e_object_del_attach_func_set(E_OBJECT(esw), _e_appwin_object_del_attach); @@ -315,12 +315,12 @@ _e_appwin_slide(E_Appwin *esw, int out, double len) static int _e_appwin_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; E_Appwin *esw; ev = event; esw = data; - if (ev->win == esw->clickwin) + if (ev->window == esw->clickwin) { if (esw->out) _e_appwin_slide(esw, 0, 1.0); else _e_appwin_slide(esw, 1, 1.0); diff --git a/src/modules/illume/e_busywin.c b/src/modules/illume/e_busywin.c index 6039f04d0..90862df74 100644 --- a/src/modules/illume/e_busywin.c +++ b/src/modules/illume/e_busywin.c @@ -76,7 +76,7 @@ e_busywin_new(E_Zone *zone, const char *themedir) esw->handlers = eina_list_append (esw->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_busywin_cb_mouse_up, esw)); esw->handlers = eina_list_append (esw->handlers, @@ -219,12 +219,12 @@ _e_busywin_slide(E_Busywin *esw, int out, double len) static int _e_busywin_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; E_Busywin *esw; ev = event; esw = data; - if (ev->win == esw->clickwin) + if (ev->window == esw->clickwin) { if (esw->out) _e_busywin_slide(esw, 0, (double)illume_cfg->sliding.busywin.duration / 1000.0); else _e_busywin_slide(esw, 1, (double)illume_cfg->sliding.busywin.duration / 1000.0); diff --git a/src/modules/illume/e_simplelock.c b/src/modules/illume/e_simplelock.c index a96f806f9..33c1d3d05 100644 --- a/src/modules/illume/e_simplelock.c +++ b/src/modules/illume/e_simplelock.c @@ -40,14 +40,14 @@ _e_action_simplelock_cb(E_Object *obj, const char *params) static int _e_simplelock_cb_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; E_Action *act; Eina_List *l; E_Config_Binding_Key *bind; E_Binding_Modifier mod; ev = event; - if (ev->event_win != grab_win) return 1; + if (ev->event_window != grab_win) return 1; for (l = e_config->key_bindings; l; l = l->next) { bind = l->data; @@ -56,10 +56,10 @@ _e_simplelock_cb_key_down(void *data, int type, void *event) mod = 0; - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; if (bind->key && (!strcmp(bind->key, ev->keyname)) && ((bind->modifiers == mod) || (bind->any_mod))) @@ -76,10 +76,10 @@ _e_simplelock_cb_key_down(void *data, int type, void *event) static int _e_simplelock_cb_key_up(void *data, int type, void *event) { - Ecore_X_Event_Key_Up *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->event_win != grab_win) return 1; + if (ev->event_window != grab_win) return 1; return 0; } @@ -211,10 +211,10 @@ e_simplelock_show(void) } handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_KEY_DOWN, _e_simplelock_cb_key_down, NULL)); + (ECORE_EVENT_KEY_DOWN, _e_simplelock_cb_key_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_KEY_UP, _e_simplelock_cb_key_up, NULL)); + (ECORE_EVENT_KEY_UP, _e_simplelock_cb_key_up, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add (E_EVENT_ZONE_MOVE_RESIZE, _e_simplelock_cb_zone_move_resize, NULL)); diff --git a/src/modules/illume/e_slipshelf.c b/src/modules/illume/e_slipshelf.c index d73ba1789..4dc89dda5 100644 --- a/src/modules/illume/e_slipshelf.c +++ b/src/modules/illume/e_slipshelf.c @@ -212,7 +212,7 @@ e_slipshelf_new(E_Zone *zone, const char *themedir) ess->handlers = eina_list_append (ess->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_slipshelf_cb_mouse_up, ess)); ess->handlers = eina_list_append (ess->handlers, @@ -754,12 +754,12 @@ _e_slipshelf_slide(E_Slipshelf *ess, int out, double len) static int _e_slipshelf_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; E_Slipshelf *ess; ev = event; ess = data; - if (ev->win == ess->clickwin) + if (ev->window == ess->clickwin) { if (ess->slide_down_timer) ecore_timer_del(ess->slide_down_timer); ess->slide_down_timer = NULL; diff --git a/src/modules/illume/e_slipwin.c b/src/modules/illume/e_slipwin.c index 4a63d9e31..a6fdced57 100644 --- a/src/modules/illume/e_slipwin.c +++ b/src/modules/illume/e_slipwin.c @@ -100,7 +100,7 @@ e_slipwin_new(E_Zone *zone, const char *themedir) esw->handlers = eina_list_append (esw->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_slipwin_cb_mouse_up, esw)); e_object_del_attach_func_set(E_OBJECT(esw), _e_slipwin_object_del_attach); @@ -303,12 +303,12 @@ _e_slipwin_slide(E_Slipwin *esw, int out, double len) static int _e_slipwin_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; E_Slipwin *esw; ev = event; esw = data; - if (ev->win == esw->clickwin) + if (ev->window == esw->clickwin) { if (esw->out) _e_slipwin_slide(esw, 0, 1.0); else _e_slipwin_slide(esw, 1, 1.0); diff --git a/src/modules/illume/e_syswin.c b/src/modules/illume/e_syswin.c index 80db84469..73a031569 100644 --- a/src/modules/illume/e_syswin.c +++ b/src/modules/illume/e_syswin.c @@ -100,7 +100,7 @@ e_syswin_new(E_Zone *zone, const char *themedir) esw->handlers = eina_list_append (esw->handlers, - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _e_syswin_cb_mouse_up, esw)); e_object_del_attach_func_set(E_OBJECT(esw), _e_syswin_object_del_attach); @@ -303,12 +303,12 @@ _e_syswin_slide(E_Syswin *esw, int out, double len) static int _e_syswin_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; E_Syswin *esw; ev = event; esw = data; - if (ev->win == esw->clickwin) + if (ev->window == esw->clickwin) { if (esw->out) _e_syswin_slide(esw, 0, 1.0); else _e_syswin_slide(esw, 1, 1.0); diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c index 31b2a1474..391a5d21e 100644 --- a/src/modules/mixer/e_mod_main.c +++ b/src/modules/mixer/e_mod_main.c @@ -424,10 +424,10 @@ static void _mixer_popup_del(E_Mixer_Instance *inst); static int _mixer_popup_input_window_mouse_up_cb(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev = event; + Ecore_Event_Mouse_Button *ev = event; E_Mixer_Instance *inst = data; - if (ev->win != inst->ui.input.win) + if (ev->window != inst->ui.input.win) return 1; _mixer_popup_del(inst); @@ -438,14 +438,14 @@ _mixer_popup_input_window_mouse_up_cb(void *data, int type, void *event) static int _mixer_popup_input_window_key_down_cb(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev = event; + Ecore_Event_Key *ev = event; E_Mixer_Instance *inst = data; const char *keysym; - if (ev->win != inst->ui.input.win) + if (ev->window != inst->ui.input.win) return 1; - keysym = ev->keysymbol; + keysym = ev->key; if (strcmp(keysym, "Escape") == 0) _mixer_popup_del(inst); else if (strcmp(keysym, "Up") == 0) @@ -492,11 +492,11 @@ _mixer_popup_input_window_create(E_Mixer_Instance *inst) ecore_x_window_show(w); inst->ui.input.mouse_up = - ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, + ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _mixer_popup_input_window_mouse_up_cb, inst); inst->ui.input.key_down = - ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, + ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _mixer_popup_input_window_key_down_cb, inst); inst->ui.input.win = w; diff --git a/src/modules/pager/e_mod_config.c b/src/modules/pager/e_mod_config.c index 7c21b23b7..d007e84bb 100644 --- a/src/modules/pager/e_mod_config.c +++ b/src/modules/pager/e_mod_config.c @@ -287,10 +287,10 @@ _grab_wnd_show(void *data1, void *data2) cfdata->grab.dia = NULL; return; } - hdl = ecore_event_handler_add(ECORE_X_EVENT_KEY_DOWN, + hdl = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _grab_cb_key_down, cfdata); cfdata->grab.hdls = eina_list_append(cfdata->grab.hdls, hdl); - hdl = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, + hdl = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _grab_cb_mouse_down, cfdata); cfdata->grab.hdls = eina_list_append(cfdata->grab.hdls, hdl); @@ -303,27 +303,27 @@ static int _grab_cb_mouse_down(void *data, int type, void *event) { E_Config_Dialog_Data *cfdata = NULL; - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; ev = event; if (!(cfdata = data)) return 1; - if (ev->win != cfdata->grab.bind_win) return 1; + if (ev->window != cfdata->grab.bind_win) return 1; - if(ev->button == cfdata->btn.drag) + if(ev->buttons == cfdata->btn.drag) cfdata->btn.drag = 0; - else if (ev->button == cfdata->btn.noplace) + else if (ev->buttons == cfdata->btn.noplace) cfdata->btn.noplace = 0; - else if (ev->button == cfdata->btn.desk) + else if (ev->buttons == cfdata->btn.desk) cfdata->btn.desk = 0; if (cfdata->grab.btn == 1) - cfdata->btn.drag = ev->button; + cfdata->btn.drag = ev->buttons; else if (cfdata->grab.btn == 2) - cfdata->btn.noplace = ev->button; + cfdata->btn.noplace = ev->buttons; else - cfdata->btn.desk = ev->button; + cfdata->btn.desk = ev->buttons; - if(ev->button == 3) + if(ev->buttons == 3) { e_util_dialog_show(_("Attetion"), _("You cannot use the right mouse button in the
" @@ -339,11 +339,11 @@ static int _grab_cb_key_down(void *data, int type, void *event) { E_Config_Dialog_Data *cfdata = NULL; - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev = event; if (!(cfdata = data)) return 1; - if (ev->win != cfdata->grab.bind_win) return 1; + if (ev->window != cfdata->grab.bind_win) return 1; if (!strcmp(ev->keyname, "Escape")) _grab_wnd_hide(cfdata); if (!strcmp(ev->keyname, "Delete")) { diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c index 35dc696ad..6bbc1c3e7 100644 --- a/src/modules/pager/e_mod_main.c +++ b/src/modules/pager/e_mod_main.c @@ -175,8 +175,8 @@ static void _pager_popup_desk_switch(int x, int y); static void _pager_popup_modifiers_set(int mod); static int _pager_popup_cb_key_down(void *data, int type, void *event); static int _pager_popup_cb_key_up(void *data, int type, void *event); -static void _pager_popup_cb_action_show(E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev); -static void _pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev); +static void _pager_popup_cb_action_show(E_Object *obj, const char *params, Ecore_Event_Key *ev); +static void _pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_Event_Key *ev); /* variables for pager popup on key actions */ static E_Action *act_popup_show = NULL; @@ -2383,22 +2383,22 @@ _pager_popup_show() handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_KEY_DOWN, _pager_popup_cb_key_down, NULL)); + (ECORE_EVENT_KEY_DOWN, _pager_popup_cb_key_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_KEY_UP, _pager_popup_cb_key_up, NULL)); + (ECORE_EVENT_KEY_UP, _pager_popup_cb_key_up, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _pager_popup_cb_mouse_down, NULL)); + (ECORE_EVENT_MOUSE_BUTTON_DOWN, _pager_popup_cb_mouse_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_BUTTON_UP, _pager_popup_cb_mouse_up, NULL)); + (ECORE_EVENT_MOUSE_BUTTON_UP, _pager_popup_cb_mouse_up, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_WHEEL, _pager_popup_cb_mouse_wheel, NULL)); + (ECORE_EVENT_MOUSE_WHEEL, _pager_popup_cb_mouse_wheel, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_MOVE, _pager_popup_cb_mouse_move, NULL)); + (ECORE_EVENT_MOUSE_MOVE, _pager_popup_cb_mouse_move, NULL)); act_popup = _pager_popup_new(zone, 1); @@ -2449,10 +2449,10 @@ _pager_popup_modifiers_set(int mod) if (!act_popup) return; hold_mod = mod; hold_count = 0; - if (hold_mod & ECORE_X_MODIFIER_SHIFT) hold_count++; - if (hold_mod & ECORE_X_MODIFIER_CTRL) hold_count++; - if (hold_mod & ECORE_X_MODIFIER_ALT) hold_count++; - if (hold_mod & ECORE_X_MODIFIER_WIN) hold_count++; + if (hold_mod & ECORE_EVENT_MODIFIER_SHIFT) hold_count++; + if (hold_mod & ECORE_EVENT_MODIFIER_CTRL) hold_count++; + if (hold_mod & ECORE_EVENT_MODIFIER_ALT) hold_count++; + if (hold_mod & ECORE_EVENT_MODIFIER_WIN) hold_count++; } static void @@ -2486,14 +2486,14 @@ _pager_popup_desk_switch(int x, int y) } static void -_pager_popup_cb_action_show(E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev) +_pager_popup_cb_action_show(E_Object *obj, const char *params, Ecore_Event_Key *ev) { if (_pager_popup_show()) _pager_popup_modifiers_set(ev->modifiers); } static void -_pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev) +_pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_Event_Key *ev) { int x = 0; int y = 0; @@ -2520,51 +2520,51 @@ _pager_popup_cb_action_switch(E_Object *obj, const char *params, Ecore_X_Event_K static int _pager_popup_cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; Pager_Popup *pp = act_popup; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; - evas_event_feed_mouse_down(pp->popup->evas, ev->button, - 0, ev->time, NULL); + evas_event_feed_mouse_down(pp->popup->evas, ev->buttons, + 0, ev->timestamp, NULL); return 1; } static int _pager_popup_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; Pager_Popup *pp = act_popup; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; - evas_event_feed_mouse_up(pp->popup->evas, ev->button, - 0, ev->time, NULL); + evas_event_feed_mouse_up(pp->popup->evas, ev->buttons, + 0, ev->timestamp, NULL); return 1; } static int _pager_popup_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; Pager_Popup *pp = act_popup; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; evas_event_feed_mouse_move(pp->popup->evas, ev->x - pp->popup->x + pp->pager->zone->x, ev->y - pp->popup->y + pp->pager->zone->y, - ev->time, NULL); + ev->timestamp, NULL); return 1; } static int _pager_popup_cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev = event; + Ecore_Event_Mouse_Wheel *ev = event; Pager_Popup *pp = act_popup; int max_x; @@ -2583,19 +2583,19 @@ _pager_popup_cb_mouse_wheel(void *data, int type, void *event) static int _pager_popup_cb_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->event_win != input_window) return 1; - if (!strcmp(ev->keysymbol, "Up")) + if (ev->window != input_window) return 1; + if (!strcmp(ev->key, "Up")) _pager_popup_desk_switch(0, -1); - else if (!strcmp(ev->keysymbol, "Down")) + else if (!strcmp(ev->key, "Down")) _pager_popup_desk_switch(0, 1); - else if (!strcmp(ev->keysymbol, "Left")) + else if (!strcmp(ev->key, "Left")) _pager_popup_desk_switch(-1, 0); - else if (!strcmp(ev->keysymbol, "Right")) + else if (!strcmp(ev->key, "Right")) _pager_popup_desk_switch(1, 0); - else if (!strcmp(ev->keysymbol, "Escape")) + else if (!strcmp(ev->key, "Escape")) _pager_popup_hide(0); else { @@ -2610,10 +2610,10 @@ _pager_popup_cb_key_down(void *data, int type, void *event) if (bind->action && strcmp(bind->action,"pager_switch")) continue; - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; if (bind->key && (!strcmp(bind->key, ev->keyname)) && ((bind->modifiers == mod))) { @@ -2635,28 +2635,28 @@ _pager_popup_cb_key_down(void *data, int type, void *event) static int _pager_popup_cb_key_up(void *data, int type, void *event) { - Ecore_X_Event_Key_Up *ev; + Ecore_Event_Key *ev; ev = event; if (!(act_popup)) return 1; if (hold_mod) { - if ((hold_mod & ECORE_X_MODIFIER_SHIFT) && (!strcmp(ev->keysymbol, "Shift_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_SHIFT) && (!strcmp(ev->keysymbol, "Shift_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_CTRL) && (!strcmp(ev->keysymbol, "Control_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_CTRL) && (!strcmp(ev->keysymbol, "Control_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Alt_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Alt_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Meta_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Meta_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Super_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Super_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Super_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Super_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Mode_switch"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Meta_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Meta_R"))) hold_count--; + if ((hold_mod & ECORE_EVENT_MODIFIER_SHIFT) && (!strcmp(ev->key, "Shift_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_SHIFT) && (!strcmp(ev->key, "Shift_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(ev->key, "Control_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(ev->key, "Control_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Alt_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Alt_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Meta_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Meta_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Super_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Super_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Super_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Super_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Mode_switch"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Meta_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Meta_R"))) hold_count--; if (hold_count <= 0 && !act_popup->pager->dragging) { _pager_popup_hide(1); diff --git a/src/modules/syscon/e_syscon.c b/src/modules/syscon/e_syscon.c index 0f6424a72..be2cc8779 100644 --- a/src/modules/syscon/e_syscon.c +++ b/src/modules/syscon/e_syscon.c @@ -76,19 +76,19 @@ e_syscon_show(E_Zone *zone, const char *defact) handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_KEY_DOWN, _cb_key_down, NULL)); + (ECORE_EVENT_KEY_DOWN, _cb_key_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _cb_mouse_down, NULL)); + (ECORE_EVENT_MOUSE_BUTTON_DOWN, _cb_mouse_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_BUTTON_UP, _cb_mouse_up, NULL)); + (ECORE_EVENT_MOUSE_BUTTON_UP, _cb_mouse_up, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_MOVE, _cb_mouse_move, NULL)); + (ECORE_EVENT_MOUSE_MOVE, _cb_mouse_move, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_WHEEL, _cb_mouse_wheel, NULL)); + (ECORE_EVENT_MOUSE_WHEEL, _cb_mouse_wheel, NULL)); o = edje_object_add(popup->evas); o_bg = o; @@ -308,13 +308,13 @@ e_syscon_hide(void) static int _cb_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->event_win != input_window) return 1; - if (!strcmp(ev->keysymbol, "Escape")) + if (ev->event_window != input_window) return 1; + if (!strcmp(ev->key, "Escape")) e_syscon_hide(); - else if (!strcmp(ev->keysymbol, "Up")) + else if (!strcmp(ev->key, "Up")) { // FIXME: implement focus and key control... eventually } @@ -325,11 +325,11 @@ _cb_key_down(void *data, int type, void *event) static int _cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; Evas_Button_Flags flags = EVAS_BUTTON_NONE; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->event_window != input_window) return 1; if (ev->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK; if (ev->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK; if ((ev->x < popup->x) || (ev->x >= (popup->x + popup->w)) || @@ -338,48 +338,48 @@ _cb_mouse_down(void *data, int type, void *event) e_syscon_hide(); return 1; } - evas_event_feed_mouse_down(popup->evas, ev->button, flags, ev->time, NULL); + evas_event_feed_mouse_down(popup->evas, ev->buttons, flags, ev->timestamp, NULL); return 1; } static int _cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->event_win != input_window) return 1; - evas_event_feed_mouse_up(popup->evas, ev->button, EVAS_BUTTON_NONE, - ev->time, NULL); + if (ev->event_window != input_window) return 1; + evas_event_feed_mouse_up(popup->evas, ev->buttons, EVAS_BUTTON_NONE, + ev->timestamp, NULL); return 1; } static int _cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->event_window != input_window) return 1; if (!inevas) { - evas_event_feed_mouse_in(popup->evas, ev->time, NULL); + evas_event_feed_mouse_in(popup->evas, ev->timestamp, NULL); inevas = 1; } evas_event_feed_mouse_move(popup->evas, ev->x - popup->x, ev->y - popup->y, - ev->time, NULL); + ev->timestamp, NULL); return 1; } static int _cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->event_window != input_window) return 1; evas_event_feed_mouse_wheel(popup->evas, ev->direction, ev->z, - ev->time, NULL); + ev->timestamp, NULL); return 1; } diff --git a/src/modules/winlist/e_mod_main.c b/src/modules/winlist/e_mod_main.c index 1a1d56de7..3c3eb4165 100644 --- a/src/modules/winlist/e_mod_main.c +++ b/src/modules/winlist/e_mod_main.c @@ -9,8 +9,8 @@ /* actual module specifics */ static void _e_mod_action_winlist_cb(E_Object *obj, const char *params); -static void _e_mod_action_winlist_mouse_cb(E_Object *obj, const char *params, Ecore_X_Event_Mouse_Button_Down *ev); -static void _e_mod_action_winlist_key_cb(E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev); +static void _e_mod_action_winlist_mouse_cb(E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev); +static void _e_mod_action_winlist_key_cb(E_Object *obj, const char *params, Ecore_Event_Key *ev); static E_Module *conf_module = NULL; static E_Action *act = NULL; @@ -118,7 +118,7 @@ _e_mod_action_winlist_cb(E_Object *obj, const char *params) } static void -_e_mod_action_winlist_mouse_cb(E_Object *obj, const char *params, Ecore_X_Event_Mouse_Button_Down *ev) +_e_mod_action_winlist_mouse_cb(E_Object *obj, const char *params, Ecore_Event_Mouse_Button *ev) { E_Zone *zone = NULL; @@ -164,7 +164,7 @@ _e_mod_action_winlist_mouse_cb(E_Object *obj, const char *params, Ecore_X_Event_ } static void -_e_mod_action_winlist_key_cb(E_Object *obj, const char *params, Ecore_X_Event_Key_Down *ev) +_e_mod_action_winlist_key_cb(E_Object *obj, const char *params, Ecore_Event_Key *ev) { E_Zone *zone = NULL; diff --git a/src/modules/winlist/e_winlist.c b/src/modules/winlist/e_winlist.c index f0077cef8..7bc31ef36 100644 --- a/src/modules/winlist/e_winlist.c +++ b/src/modules/winlist/e_winlist.c @@ -185,22 +185,22 @@ e_winlist_show(E_Zone *zone) (E_EVENT_BORDER_REMOVE, _e_winlist_cb_event_border_remove, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_KEY_DOWN, _e_winlist_cb_key_down, NULL)); + (ECORE_EVENT_KEY_DOWN, _e_winlist_cb_key_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_KEY_UP, _e_winlist_cb_key_up, NULL)); + (ECORE_EVENT_KEY_UP, _e_winlist_cb_key_up, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_BUTTON_DOWN, _e_winlist_cb_mouse_down, NULL)); + (ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_winlist_cb_mouse_down, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_BUTTON_UP, _e_winlist_cb_mouse_up, NULL)); + (ECORE_EVENT_MOUSE_BUTTON_UP, _e_winlist_cb_mouse_up, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_WHEEL, _e_winlist_cb_mouse_wheel, NULL)); + (ECORE_EVENT_MOUSE_WHEEL, _e_winlist_cb_mouse_wheel, NULL)); handlers = eina_list_append (handlers, ecore_event_handler_add - (ECORE_X_EVENT_MOUSE_MOVE, _e_winlist_cb_mouse_move, NULL)); + (ECORE_EVENT_MOUSE_MOVE, _e_winlist_cb_mouse_move, NULL)); e_popup_show(winlist); return 1; @@ -359,10 +359,10 @@ e_winlist_modifiers_set(int mod) if (!winlist) return; hold_mod = mod; hold_count = 0; - if (hold_mod & ECORE_X_MODIFIER_SHIFT) hold_count++; - if (hold_mod & ECORE_X_MODIFIER_CTRL) hold_count++; - if (hold_mod & ECORE_X_MODIFIER_ALT) hold_count++; - if (hold_mod & ECORE_X_MODIFIER_WIN) hold_count++; + if (hold_mod & ECORE_EVENT_MODIFIER_SHIFT) hold_count++; + if (hold_mod & ECORE_EVENT_MODIFIER_CTRL) hold_count++; + if (hold_mod & ECORE_EVENT_MODIFIER_ALT) hold_count++; + if (hold_mod & ECORE_EVENT_MODIFIER_WIN) hold_count++; } /* local subsystem functions */ @@ -745,43 +745,43 @@ _e_winlist_cb_event_border_remove(void *data, int type, void *event) static int _e_winlist_cb_key_down(void *data, int type, void *event) { - Ecore_X_Event_Key_Down *ev; + Ecore_Event_Key *ev; ev = event; - if (ev->event_win != input_window) return 1; - if (!strcmp(ev->keysymbol, "Up")) + if (ev->window != input_window) return 1; + if (!strcmp(ev->key, "Up")) e_winlist_prev(); - else if (!strcmp(ev->keysymbol, "Down")) + else if (!strcmp(ev->key, "Down")) e_winlist_next(); - else if (!strcmp(ev->keysymbol, "Left")) + else if (!strcmp(ev->key, "Left")) e_winlist_prev(); - else if (!strcmp(ev->keysymbol, "Right")) + else if (!strcmp(ev->key, "Right")) e_winlist_next(); - else if (!strcmp(ev->keysymbol, "Return")) + else if (!strcmp(ev->key, "Return")) e_winlist_hide(); - else if (!strcmp(ev->keysymbol, "space")) + else if (!strcmp(ev->key, "space")) e_winlist_hide(); - else if (!strcmp(ev->keysymbol, "Escape")) + else if (!strcmp(ev->key, "Escape")) _e_winlist_restore_desktop(); - else if (!strcmp(ev->keysymbol, "1")) + else if (!strcmp(ev->key, "1")) _e_winlist_activate_nth(0); - else if (!strcmp(ev->keysymbol, "2")) + else if (!strcmp(ev->key, "2")) _e_winlist_activate_nth(1); - else if (!strcmp(ev->keysymbol, "3")) + else if (!strcmp(ev->key, "3")) _e_winlist_activate_nth(2); - else if (!strcmp(ev->keysymbol, "4")) + else if (!strcmp(ev->key, "4")) _e_winlist_activate_nth(3); - else if (!strcmp(ev->keysymbol, "5")) + else if (!strcmp(ev->key, "5")) _e_winlist_activate_nth(4); - else if (!strcmp(ev->keysymbol, "6")) + else if (!strcmp(ev->key, "6")) _e_winlist_activate_nth(5); - else if (!strcmp(ev->keysymbol, "7")) + else if (!strcmp(ev->key, "7")) _e_winlist_activate_nth(6); - else if (!strcmp(ev->keysymbol, "8")) + else if (!strcmp(ev->key, "8")) _e_winlist_activate_nth(7); - else if (!strcmp(ev->keysymbol, "9")) + else if (!strcmp(ev->key, "9")) _e_winlist_activate_nth(8); - else if (!strcmp(ev->keysymbol, "0")) + else if (!strcmp(ev->key, "0")) _e_winlist_activate_nth(9); else { @@ -798,12 +798,12 @@ _e_winlist_cb_key_down(void *data, int type, void *event) mod = 0; - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; - if (bind->key && (!strcmp(bind->key, ev->keyname)) && + if (bind->key && (!strcmp(bind->key, ev->keyname)) && ((bind->modifiers == mod) || (bind->any_mod))) { act = e_action_find(bind->action); @@ -824,7 +824,7 @@ _e_winlist_cb_key_down(void *data, int type, void *event) static int _e_winlist_cb_key_up(void *data, int type, void *event) { - Ecore_X_Event_Key_Up *ev; + Ecore_Event_Key *ev; E_Action *act; Eina_List *l; E_Config_Binding_Key *bind; @@ -834,21 +834,21 @@ _e_winlist_cb_key_up(void *data, int type, void *event) if (!winlist) return 1; if (hold_mod) { - if ((hold_mod & ECORE_X_MODIFIER_SHIFT) && (!strcmp(ev->keysymbol, "Shift_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_SHIFT) && (!strcmp(ev->keysymbol, "Shift_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_CTRL) && (!strcmp(ev->keysymbol, "Control_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_CTRL) && (!strcmp(ev->keysymbol, "Control_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Alt_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Alt_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Meta_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Meta_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Super_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_ALT) && (!strcmp(ev->keysymbol, "Super_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Super_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Super_R"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Mode_switch"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Meta_L"))) hold_count--; - else if ((hold_mod & ECORE_X_MODIFIER_WIN) && (!strcmp(ev->keysymbol, "Meta_R"))) hold_count--; + if ((hold_mod & ECORE_EVENT_MODIFIER_SHIFT) && (!strcmp(ev->key, "Shift_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_SHIFT) && (!strcmp(ev->key, "Shift_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(ev->key, "Control_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(ev->key, "Control_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Alt_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Alt_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Meta_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Meta_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Super_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Super_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Super_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Super_R"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Mode_switch"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Meta_L"))) hold_count--; + else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Meta_R"))) hold_count--; if (hold_count <= 0) { e_winlist_hide(); @@ -864,12 +864,12 @@ _e_winlist_cb_key_up(void *data, int type, void *event) mod = 0; - if (ev->modifiers & ECORE_X_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_X_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_X_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_X_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; - if (bind->key && (!strcmp(bind->key, ev->keyname)) && + if (bind->key && (!strcmp(bind->key, ev->keyname)) && ((bind->modifiers == mod) || (bind->any_mod))) { act = e_action_find(bind->action); @@ -889,10 +889,10 @@ _e_winlist_cb_key_up(void *data, int type, void *event) static int _e_winlist_cb_mouse_down(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Down *ev; + Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_WINLIST, E_OBJECT(winlist->zone), ev); return 1; @@ -901,10 +901,10 @@ _e_winlist_cb_mouse_down(void *data, int type, void *event) static int _e_winlist_cb_mouse_up(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Button_Up *ev; + Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_WINLIST, E_OBJECT(winlist->zone), ev); return 1; @@ -913,10 +913,10 @@ _e_winlist_cb_mouse_up(void *data, int type, void *event) static int _e_winlist_cb_mouse_wheel(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Wheel *ev; + Ecore_Event_Mouse_Wheel *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; e_bindings_wheel_event_handle(E_BINDING_CONTEXT_WINLIST, E_OBJECT(winlist->zone), ev); if (ev->z < 0) /* up */ @@ -937,13 +937,13 @@ _e_winlist_cb_mouse_wheel(void *data, int type, void *event) static int _e_winlist_cb_mouse_move(void *data, int type, void *event) { - Ecore_X_Event_Mouse_Move *ev; + Ecore_Event_Mouse_Move *ev; ev = event; - if (ev->event_win != input_window) return 1; + if (ev->window != input_window) return 1; evas_event_feed_mouse_move(winlist->evas, ev->x - winlist->x + - winlist->zone->x, ev->y - winlist->y + winlist->zone->y, ev->time, NULL); + winlist->zone->x, ev->y - winlist->y + winlist->zone->y, ev->timestamp, NULL); return 1; }