atspi : During the highlight grab, out signal is not sent. 71/155371/2
authorJunsuChoi <jsuya.choi@samsung.com>
Wed, 11 Oct 2017 03:12:45 +0000 (12:12 +0900)
committerjunsu choi <jsuya.choi@samsung.com>
Fri, 13 Oct 2017 05:39:58 +0000 (05:39 +0000)
   There is an action that takes time to complete
   the highlight grab, such as scroll bring in.
   So the highlight box can be outside the screen.
   After the highlight grab process is completed,
   will check the highlight box status.

Change-Id: I5b9535b9f1ef7a515e3958af07dc0a61f1802782

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

index bd31e26..7cae360 100644 (file)
@@ -6569,6 +6569,22 @@ _accessible_highlight_region_show(Eo* obj)
 }
 //
 
+//TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
+Eina_Bool
+_elm_widget_accessibility_highlight_grabbing_get(Eo *obj)
+{
+   ELM_WIDGET_DATA_GET(obj, wd);
+   return wd->highlight_grabbing;
+}
+
+void
+_elm_widget_accessibility_highlight_grabbing_set(Eo *obj, Eina_Bool grabbing)
+{
+   ELM_WIDGET_DATA_GET(obj, wd);
+   wd->highlight_grabbing = grabbing;
+}
+//
+
 //TIZEN_ONLY(20160329): atspi: implement HighlightGrab and HighlightClear methods (29e253e2f7ef3c632ac3a64c489bf569df407f30)
 EOLIAN static Eina_Bool
 _elm_widget_elm_interface_atspi_component_highlight_grab(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
@@ -6577,6 +6593,10 @@ _elm_widget_elm_interface_atspi_component_highlight_grab(Eo *obj, Elm_Widget_Sma
    if(!_elm_atspi_enabled())
       return EINA_FALSE;
 
+   //TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
+   _elm_widget_accessibility_highlight_grabbing_set(obj, EINA_TRUE);
+   //
+
    //TIZEN_ONLY(20170119): Show the object highlighted by highlight_grab when the object is completely out of the scroll
    _accessible_highlight_region_show(obj);
    //
@@ -6587,6 +6607,9 @@ _elm_widget_elm_interface_atspi_component_highlight_grab(Eo *obj, Elm_Widget_Sma
    // TIZEN_ONLY(20161018): add highlighted/unhighlighted signal for atspi
    evas_object_smart_callback_call(obj, SIG_WIDGET_ATSPI_HIGHLIGHTED, NULL);
    //
+   //TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
+   _elm_widget_accessibility_highlight_grabbing_set(obj, EINA_FALSE);
+   //
    return EINA_TRUE;
 }
 
@@ -7137,6 +7160,9 @@ _elm_widget_item_elm_interface_atspi_component_highlight_grab(Eo *obj, Elm_Widge
 {
    if (!sd) return EINA_FALSE;
    if (!sd->view) return EINA_FALSE;
+   //TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
+   _elm_widget_accessibility_highlight_grabbing_set(obj, EINA_TRUE);
+   //
 
    //TIZEN_ONLY(20170119): Show the object highlighted by highlight_grab when the object is completely out of the scroll
    _accessible_highlight_region_show(sd->view);
@@ -7151,6 +7177,9 @@ _elm_widget_item_elm_interface_atspi_component_highlight_grab(Eo *obj, Elm_Widge
    //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
    evas_object_smart_callback_call(sd->widget, SIG_WIDGET_ATSPI_HIGHLIGHTED, obj);
    //
+   //TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
+   _elm_widget_accessibility_highlight_grabbing_set(obj, EINA_FALSE);
+   //
    return EINA_TRUE;
 }
 
index 449da33..2334f66 100644 (file)
@@ -474,6 +474,9 @@ typedef struct _Elm_Widget_Smart_Data
    ///TIZEN_ONLY(20170717) : expose highlight information on atspi
    Eina_Bool                     can_highlight : 1; /**< true if widget have at-spi HIGHLIGHTABLE state */
    ///
+   //TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
+   Eina_Bool                     highlight_grabbing : 1;
+   //
 // TIZEN_ONLY(20150705): Genlist item align feature
    Eina_Bool                     scroll_item_align_enable;
    const char                    *scroll_item_valign;
@@ -588,6 +591,11 @@ Evas_Object          *_elm_win_default_label_obj_get(Evas_Object *obj);
 void                 *_elm_object_accessibility_currently_highlighted_get();
 void                  _elm_widget_showing_geometry_get(Eo *obj, int *x, int *y, int *w, int *h);
 
+//TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
+Eina_Bool _elm_widget_accessibility_highlight_grabbing_get(Eo *obj);
+void _elm_widget_accessibility_highlight_grabbing_set(Eo *obj, Eina_Bool grabbing);
+//
+
 EAPI void             _elm_access_clear(Elm_Access_Info *ac);
 EAPI void             _elm_access_text_set(Elm_Access_Info *ac, int type, const char *text);
 EAPI void             _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Info_Cb func, const void *data);
index f9f9e92..d3e42bd 100644 (file)
@@ -1044,28 +1044,33 @@ _elm_win_accessibility_highlight_simple_setup(Elm_Win_Data *sd,
    //TIZEN_ONLY(20160623): atspi: moved highlight when object is out of screen
    evas_object_geometry_get(target, &ox, &oy, NULL, NULL);
 
-   if (((w < 0 && ox > sd->accessibility_highlight.cur.x) || (h < 0 && oy < sd->accessibility_highlight.cur.y))
-     && sd->accessibility_highlight.cur.need_moved
-     && eo_isa(target, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
+   //TIZEN_ONLY(20171011) : atspi : During the highlight grab, out signal is not sent.
+   if (!_elm_widget_accessibility_highlight_grabbing_get(target))
+   //
      {
-        eo_do(target, role = elm_interface_atspi_accessible_role_get());
-        if (role && role != ELM_ATSPI_ROLE_MENU_ITEM && role != ELM_ATSPI_ROLE_LIST_ITEM)
+        if (((w < 0 && ox > sd->accessibility_highlight.cur.x) || (h < 0 && oy < sd->accessibility_highlight.cur.y))
+          && sd->accessibility_highlight.cur.need_moved
+          && eo_isa(target, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
           {
-             elm_interface_atspi_accessible_move_outed_signal_emit(target, ELM_ATSPI_MOVE_OUTED_TOP_LEFT);
-             sd->accessibility_highlight.cur.need_moved = EINA_FALSE;
-             return ;
+             eo_do(target, role = elm_interface_atspi_accessible_role_get());
+             if (role && role != ELM_ATSPI_ROLE_MENU_ITEM && role != ELM_ATSPI_ROLE_LIST_ITEM)
+               {
+                  elm_interface_atspi_accessible_move_outed_signal_emit(target, ELM_ATSPI_MOVE_OUTED_TOP_LEFT);
+                  sd->accessibility_highlight.cur.need_moved = EINA_FALSE;
+                  return ;
+               }
           }
-     }
-   else if (((w < 0 && ox < sd->accessibility_highlight.cur.x) || (h < 0 && oy > sd->accessibility_highlight.cur.y))
-           && sd->accessibility_highlight.cur.need_moved
-           && eo_isa(target, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
-     {
-        eo_do(target, role = elm_interface_atspi_accessible_role_get());
-        if (role && role != ELM_ATSPI_ROLE_MENU_ITEM && role != ELM_ATSPI_ROLE_LIST_ITEM)
+        else if (((w < 0 && ox < sd->accessibility_highlight.cur.x) || (h < 0 && oy > sd->accessibility_highlight.cur.y))
+                && sd->accessibility_highlight.cur.need_moved
+                && eo_isa(target, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
           {
-             elm_interface_atspi_accessible_move_outed_signal_emit(target, ELM_ATSPI_MOVE_OUTED_BOTTOM_RIGHT);
-                sd->accessibility_highlight.cur.need_moved = EINA_FALSE;
-             return ;
+             eo_do(target, role = elm_interface_atspi_accessible_role_get());
+             if (role && role != ELM_ATSPI_ROLE_MENU_ITEM && role != ELM_ATSPI_ROLE_LIST_ITEM)
+               {
+                  elm_interface_atspi_accessible_move_outed_signal_emit(target, ELM_ATSPI_MOVE_OUTED_BOTTOM_RIGHT);
+                  sd->accessibility_highlight.cur.need_moved = EINA_FALSE;
+                  return ;
+               }
           }
      }
    //