[access] use ecore_x_atom values for scroll, mouse message
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 30 Apr 2013 03:37:45 +0000 (12:37 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Mon, 27 May 2013 05:13:47 +0000 (14:13 +0900)
Change-Id: Ic6c07397cdf0c08928b78dfc1b679046bedb43d2

src/lib/elm_access.c
src/lib/elm_widget.h
src/lib/elm_win.c

index 146f5d5..44e555b 100644 (file)
@@ -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
index 713f831..10d3fab 100644 (file)
@@ -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);
index 2410491..c8fedbb 100755 (executable)
@@ -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);