[ATSPI]: when scroll happens due to flick, Screen-reader will not know 92/90092/2
authorShilpa Singh <shilpa.singh@samsung.com>
Wed, 28 Sep 2016 09:16:55 +0000 (14:46 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 29 Sep 2016 13:11:32 +0000 (06:11 -0700)
about when the scroll actually ended, hence sending notification to
screen reader for the same.

Change-Id: Ib9335517d1821031510dbe937108ab1c157ed8ac

src/lib/elm_gengrid.c
src/lib/elm_list.c
src/lib/elm_scroller.c
src/mobile_lib/elm_genlist.c

index e1b3686..9000963 100644 (file)
@@ -3984,6 +3984,15 @@ _scroll_animate_stop_cb(Evas_Object *obj,
                         void *data EINA_UNUSED)
 {
    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)
+     {
+        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 0645ad5..dfdf41e 100644 (file)
@@ -1552,6 +1552,20 @@ _edge_bottom_cb(Evas_Object *obj,
    eo_do(obj, eo_event_callback_call(ELM_LIST_EVENT_EDGE_BOTTOM, NULL));
 }
 
+static void
+_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)
+     {
+        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 Eina_Bool
 _long_press_cb(void *data)
 {
@@ -2463,6 +2477,9 @@ _elm_list_evas_object_smart_add(Eo *obj, Elm_List_Data *priv)
          elm_interface_scrollable_edge_right_cb_set(_edge_right_cb),
          elm_interface_scrollable_edge_top_cb_set(_edge_top_cb),
          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_content_min_limit_cb_set(_elm_list_content_min_limit_cb),
          elm_interface_scrollable_objects_set(wd->resize_obj, priv->hit_rect));
 
index d6d950d..c5913f5 100644 (file)
@@ -643,6 +643,14 @@ _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)
+     {
+        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 52950c0..1bf3e91 100644 (file)
@@ -5013,6 +5013,15 @@ _scroll_animate_stop_cb(Evas_Object *obj,
      _elm_genlist_scroll_item_align_highlight_cb(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)
+     {
+        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