From 6dce71a63e9e1b626904c9cdf61ecd5ab2c77d85 Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Tue, 30 Apr 2013 12:37:45 +0900 Subject: [PATCH] [access] use ecore_x_atom values for scroll, mouse message Change-Id: Ic6c07397cdf0c08928b78dfc1b679046bedb43d2 --- src/lib/elm_access.c | 35 +++++++++++++++++++++++++++-------- src/lib/elm_widget.h | 1 + src/lib/elm_win.c | 12 ++++++++++-- 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c index 146f5d5..44e555b 100644 --- a/src/lib/elm_access.c +++ b/src/lib/elm_access.c @@ -474,13 +474,9 @@ void _elm_access_highlight_object_scroll(Evas_Object *obj, int type, int x, int y) { Evas *evas; - Evas_Object *ho, *win; + Evas_Object *ho; Evas_Coord_Rectangle ho_area; -#ifdef HAVE_ELEMENTARY_X - Ecore_X_Window xwin = 0; -#endif - if (!obj) return; evas = evas_object_evas_get(obj); @@ -552,7 +548,30 @@ _elm_access_highlight_object_scroll(Evas_Object *obj, int type, int x, int y) s_iface->repeat_events_set(s_parent, EINA_TRUE); break; - case 3: + default: + break; + } +} + +void +_elm_access_highlight_object_mouse(Evas_Object *obj, int type, int x, int y) +{ + Evas *evas; + Evas_Object *ho, *win; + Evas_Coord_Rectangle ho_area; + +#ifdef HAVE_ELEMENTARY_X + Ecore_X_Window xwin = 0; +#endif + + if (!obj) return; + + evas = evas_object_evas_get(obj); + if (!evas) return; + + switch (type) + { + case 0: ho = _access_highlight_object_get(obj); if (!ho) { @@ -582,7 +601,7 @@ _elm_access_highlight_object_scroll(Evas_Object *obj, int type, int x, int y) #endif break; - case 4: + case 1: if (!s_parent) return; #ifdef HAVE_ELEMENTARY_X @@ -594,7 +613,7 @@ _elm_access_highlight_object_scroll(Evas_Object *obj, int type, int x, int y) #endif break; - case 5: + case 2: if (!s_parent) return; #ifdef HAVE_ELEMENTARY_X diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h index 713f831..10d3fab 100644 --- a/src/lib/elm_widget.h +++ b/src/lib/elm_widget.h @@ -594,6 +594,7 @@ void _elm_access_widget_item_access_order_set(Elm_Widget_Item * const Eina_List *_elm_access_widget_item_access_order_get(const Elm_Widget_Item *item); void _elm_access_widget_item_access_order_unset(Elm_Widget_Item *item); void _elm_access_highlight_object_scroll(Evas_Object *obj, int type, int x, int y); +void _elm_access_highlight_object_mouse(Evas_Object *obj, int type, int x, int y); EAPI void _elm_access_clear(Elm_Access_Info *ac); EAPI void _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text); diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 2410491..c8fedbb 100755 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -2073,12 +2073,20 @@ _elm_win_client_message(void *data, _elm_access_highlight_object_activate (ELM_WIDGET_DATA(sd)->obj, ELM_ACTIVATE_DOWN); } - else if ((unsigned int)e->data.l[1] == atom_scroll) + else if ((unsigned int)e->data.l[1] == + ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_SCROLL) { _elm_access_highlight_object_scroll(ELM_WIDGET_DATA(sd)->obj, e->data.l[2], e->data.l[3], e->data.l[4]); } - else if ((unsigned int)e->data.l[1] == atom_back) + else if ((unsigned int)e->data.l[1] == + ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_MOUSE) + { + _elm_access_highlight_object_mouse(ELM_WIDGET_DATA(sd)->obj, + e->data.l[2], e->data.l[3], e->data.l[4]); + } + else if ((unsigned int)e->data.l[1] == + ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_BACK) { _elm_access_highlight_object_activate (ELM_WIDGET_DATA(sd)->obj, ELM_ACTIVATE_BACK); -- 2.7.4