[ATSPI]: When scroll happens due to flick, drag, inform screen-reader 74/91574/4
authorShilpa Singh <shilpa.singh@samsung.com>
Mon, 10 Oct 2016 08:39:00 +0000 (14:09 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 13 Oct 2016 04:27:49 +0000 (21:27 -0700)
to do the reading.

Change-Id: I133c165532348c91ee2de1a81577dbaaef906320
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
src/lib/elm_gengrid.c
src/lib/elm_list.c
src/lib/elm_scroller.c
src/mobile_lib/elm_genlist.c

index e66734101e8b612fcb147eb518b6c195b7acb5a1..da1698c15279d1d9d79bb10e4a1833f8dde50b5e 100644 (file)
@@ -3988,7 +3988,7 @@ _scroll_animate_stop_cb(Evas_Object *obj,
    eo_do(obj, eo_event_callback_call(EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_ANIM_STOP, NULL));
 
    //TIZEN_ONLY: Let the screen-reader know when scroll animation ends
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         int x = 0, y = 0, w = 0, h = 0;
         eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(&x, &y, &w, &h));
@@ -4009,6 +4009,14 @@ _scroll_drag_stop_cb(Evas_Object *obj,
                      void *data EINA_UNUSED)
 {
    eo_do(obj, eo_event_callback_call(EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_DRAG_STOP, NULL));
+   //TIZEN_ONLY: Let the screen-reader know when drag ends
+   if (_elm_atspi_enabled())
+     {
+        int x = 0, y = 0, w = 0, h = 0;
+        eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(&x, &y, &w, &h));
+        elm_interface_atspi_accessible_bounds_changed_signal_emit(obj, x, y, w, h);
+     }
+   //
 }
 
 static void
index dfdf41e7a062df4cedfc088002993a5e132b6238..2da8b7de905e79f52014a1ecffa2887ba2debff7 100644 (file)
@@ -1557,7 +1557,21 @@ _scroll_animate_stop_cb(Evas_Object *obj,
                         void *data EINA_UNUSED)
 {
    //TIZEN_ONLY: Let the screen-reader know when scroll animation ends
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
+     {
+        int x = 0, y = 0, w = 0, h = 0;
+        eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(&x, &y, &w, &h));
+        elm_interface_atspi_accessible_bounds_changed_signal_emit(obj, x, y, w, h);
+     }
+   //
+}
+
+static void
+_scroll_drag_stop_cb(Evas_Object *obj,
+                        void *data EINA_UNUSED)
+{
+   //TIZEN_ONLY: Let the screen-reader know when drag ends
+   if (_elm_atspi_enabled())
      {
         int x = 0, y = 0, w = 0, h = 0;
         eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(&x, &y, &w, &h));
@@ -2479,6 +2493,7 @@ _elm_list_evas_object_smart_add(Eo *obj, Elm_List_Data *priv)
          elm_interface_scrollable_edge_bottom_cb_set(_edge_bottom_cb),
          //TIZEN_ONLY: Let the screen-reader know when scroll animation ends
          elm_interface_scrollable_animate_stop_cb_set(_scroll_animate_stop_cb),
+         elm_interface_scrollable_drag_stop_cb_set(_scroll_drag_stop_cb),
          //
          elm_interface_scrollable_content_min_limit_cb_set(_elm_list_content_min_limit_cb),
          elm_interface_scrollable_objects_set(wd->resize_obj, priv->hit_rect));
index 25fee9475151d1f6625272d6686420e678b8b6b9..c3838a49f32f0c3856c858c82039525f0d8e6928 100644 (file)
@@ -648,7 +648,7 @@ _scroll_anim_stop_cb(Evas_Object *obj,
    eo_do(obj, eo_event_callback_call
      (EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_ANIM_STOP, NULL));
    //TIZEN_ONLY: Let the screen-reader know when scroll animation ends
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         int x = 0, y = 0, w = 0, h = 0;
         eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(&x, &y, &w, &h));
@@ -671,6 +671,14 @@ _scroll_drag_stop_cb(Evas_Object *obj,
 {
    eo_do(obj, eo_event_callback_call
      (EVAS_SCROLLABLE_INTERFACE_EVENT_SCROLL_DRAG_STOP, NULL));
+   //TIZEN_ONLY: Let the screen-reader know when drag ends
+   if (_elm_atspi_enabled())
+     {
+        int x = 0, y = 0, w = 0, h = 0;
+        eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(&x, &y, &w, &h));
+        elm_interface_atspi_accessible_bounds_changed_signal_emit(obj, x, y, w, h);
+     }
+   //
 }
 
 static void
index e185b29210025694c9c6a10534945118596829b2..5279e233e6618847c8a33680cf3f0b475ccaa995 100644 (file)
@@ -5022,7 +5022,7 @@ _scroll_animate_stop_cb(Evas_Object *obj,
    evas_object_smart_callback_call(obj, SIG_SCROLL_ANIM_STOP, NULL);
 
    //TIZEN_ONLY: Let the screen-reader know when scroll animation ends
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         int x = 0, y = 0, w = 0, h = 0;
         eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(&x, &y, &w, &h));
@@ -5085,6 +5085,14 @@ _scroll_drag_stop_cb(Evas_Object *obj,
                      void *data EINA_UNUSED)
 {
    evas_object_smart_callback_call(obj, SIG_SCROLL_DRAG_STOP, NULL);
+   //TIZEN_ONLY: Let the screen-reader know when drag ends
+   if (_elm_atspi_enabled())
+     {
+        int x = 0, y = 0, w = 0, h = 0;
+        eo_do((Eo *) obj, elm_interface_scrollable_content_region_get(&x, &y, &w, &h));
+        elm_interface_atspi_accessible_bounds_changed_signal_emit(obj, x, y, w, h);
+     }
+   //
 }
 
 static void