elm: access: Make atspi,(un)highlighted callback work on widget item. The atspi,...
authorShinwoo Kim <cinoo.kim@samsung.com>
Thu, 7 Dec 2017 11:06:29 +0000 (16:36 +0530)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 21 Dec 2017 12:20:05 +0000 (21:20 +0900)
Change-Id: Ib89f6dc33a8e1060b279f6757ecbb05bc3699f2e
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
src/lib/elementary/elm_colorselector.c
src/lib/elementary/elm_gengrid.c
src/lib/elementary/elm_genlist.c
src/lib/elementary/elm_index.c
src/lib/elementary/elm_list.c
src/lib/elementary/elm_toolbar.c
src/lib/elementary/elm_widget.c
src/lib/elementary/elm_widget_genlist.h

index 8b2cd4f..0a5a6c5 100644 (file)
@@ -2720,6 +2720,35 @@ _elm_color_item_efl_ui_focus_object_focus_set(Eo *obj, Elm_Color_Item_Data *pd,
    elm_object_item_focus_set(obj, focus);
 }
 
+//TIZEN_ONLY(20171114) : atspi: expose highlight information on atspi
+EOLIAN static Eina_Bool
+_elm_color_item_efl_access_component_highlight_grab(Eo *eo_it, Elm_Color_Item_Data *it)
+{
+   elm_genlist_item_show(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
+
+   elm_object_accessibility_highlight_set(VIEW(it), EINA_TRUE);
+
+   efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_HIGHLIGHTED, EINA_TRUE);
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,highlighted", eo_it);
+    //
+   return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_elm_color_item_efl_access_component_highlight_clear(Eo *eo_it EINA_UNUSED, Elm_Color_Item_Data *it)
+{
+   elm_object_accessibility_highlight_set(VIEW(it), EINA_FALSE);
+   efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_HIGHLIGHTED, EINA_FALSE);
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,unhighlighted", eo_it);
+   //
+   return EINA_TRUE;
+}
+//
+
 /* Standard widget overrides */
 
 ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(elm_colorselector, Elm_Colorselector_Data)
index bfd2028..852d7cc 100644 (file)
@@ -5561,11 +5561,15 @@ _elm_gengrid_item_efl_access_component_highlight_grab(Eo *eo_it, Elm_Gen_Item *i
    //TIZEN_ONLY(20170717) : expose highlight information on atspi
    efl_access_active_descendant_changed_signal_emit(WIDGET(it), eo_it);
    //
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,highlighted", eo_it);
+   //
    return EINA_TRUE;
 }
 
 EOLIAN static Eina_Bool
-_elm_gengrid_item_efl_access_component_highlight_clear(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
+_elm_gengrid_item_efl_access_component_highlight_clear(Eo *eo_it, Elm_Gen_Item *it)
 {
    //TIZEN_ONLY (20151009) : Accessibility: updated highlight change during gengrid scroll
    ELM_GENGRID_DATA_GET(WIDGET(it), sd);
@@ -5576,6 +5580,10 @@ _elm_gengrid_item_efl_access_component_highlight_clear(Eo *eo_it EINA_UNUSED, El
    //TIZEN_ONLY(20170717) : expose highlight information on atspi
    efl_access_active_descendant_changed_signal_emit(WIDGET(it), eo_it);
    //
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,unhighlighted", eo_it);
+   //
    return EINA_TRUE;
 }
 //
index 435238b..902163d 100644 (file)
@@ -9083,13 +9083,34 @@ _elm_genlist_item_efl_access_component_highlight_grab(Eo *eo_it, Elm_Gen_Item *i
           }
     }
 
-  if (VIEW(it))
-    ret = efl_access_component_highlight_grab(efl_super(eo_it, ELM_GENLIST_ITEM_CLASS));
-  else
-    sd->atspi_item_to_highlight = it;//it will be highlighted when realized
+   if (VIEW(it))
+     elm_object_accessibility_highlight_set(EO_OBJ(it), EINA_TRUE);
+
+   ///TIZEN_ONLY(20170717) : expose highlight information on atspi
+   efl_access_state_changed_signal_emit(EO_OBJ(it), EFL_ACCESS_STATE_HIGHLIGHTED, EINA_TRUE);
+   ///
+
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,highlighted", EO_OBJ(it));
+   //
+
+   if (VIEW(it))
+     {
+        elm_object_accessibility_highlight_set(EO_OBJ(it), EINA_TRUE);
+        //TIZEN_ONLY(20161104) : Accessibility : synchronized highlight of atspi and item align feature for wearable profile
+        sd->currently_highlighted_item = it;
+        //
+     }
+   else
+     sd->atspi_item_to_highlight = it;//it will be highlighted when realized
 
   efl_access_active_descendant_changed_signal_emit(WIDGET(it), eo_it);
 
+  //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+  // If you call eo_do_super, then you do NOT have to call smart callback.
+  evas_object_smart_callback_call(WIDGET(it), "atspi,highlighted", eo_it);
+  //
   return ret;
 }
 
@@ -9104,6 +9125,10 @@ _elm_genlist_item_efl_access_component_highlight_clear(Eo *eo_it, Elm_Gen_Item *
   efl_access_active_descendant_changed_signal_emit(WIDGET(it), eo_it);
 
   ret = efl_access_component_highlight_clear(efl_super(eo_it, ELM_GENLIST_ITEM_CLASS));
+  //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+  // If you call eo_do_super, then you do NOT have to call smart callback.
+  evas_object_smart_callback_call(WIDGET(it), "atspi,unhighlighted", eo_it);
+  //
   return ret;
 }
 //
index 567cb32..ed244cc 100644 (file)
@@ -1805,7 +1805,10 @@ _elm_index_item_efl_access_component_highlight_grab(Eo *eo_it, Elm_Index_Item_Da
      elm_layout_text_set(obj, "elm.text", strdup(sd->letter));
    elm_layout_signal_emit(obj, "elm,indicator,state,active", "elm");
    elm_object_accessibility_highlight_set(eo_it, EINA_TRUE);
-
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(obj, "atspi,highlighted", eo_it);
+   //
    return EINA_TRUE;
 }
 
@@ -1815,7 +1818,10 @@ _elm_index_item_efl_access_component_highlight_clear(Eo *eo_it, Elm_Index_Item_D
    Evas_Object *obj = WIDGET(sd);
    elm_layout_signal_emit(obj, "elm,indicator,state,inactive", "elm");
    elm_object_accessibility_highlight_set(eo_it, EINA_FALSE);
-
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(obj, "atspi,unhighlighted", eo_it);
+   //
    return EINA_TRUE;
 }
 //
index fa6d905..5f14348 100644 (file)
@@ -2164,8 +2164,6 @@ _elm_list_item_efl_access_name_get(Eo *eo_it, Elm_List_Item_Data *data)
    return _elm_widget_item_accessible_plain_name_get(eo_it, data->label);
 }
 
-
-
 //TIZEN_ONLY(20171114):  Region show on item elements fixed
 EOLIAN static Eina_Bool
 _elm_list_item_efl_access_component_highlight_clear(Eo *eo_it EINA_UNUSED, Elm_List_Item_Data *it)
@@ -2174,6 +2172,10 @@ _elm_list_item_efl_access_component_highlight_clear(Eo *eo_it EINA_UNUSED, Elm_L
    // TIZEN_ONLY(20171114): atspi: expose highlight information on atspi
    efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_HIGHLIGHTED, EINA_FALSE);
    //
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,unhighlighted", EO_OBJ(it));
+   //
    return EINA_TRUE;
 }
 //
@@ -3454,6 +3456,10 @@ _elm_list_item_efl_access_component_highlight_grab(Eo *eo_it, Elm_List_Item_Data
    elm_object_accessibility_highlight_set(eo_it, EINA_TRUE);
    efl_access_state_changed_signal_emit(eo_it, EFL_ACCESS_STATE_HIGHLIGHTED, EINA_TRUE);
    //
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,highlighted", EO_OBJ(it));
+   //
    return ret;
 }
 //
index 2c04009..b8099c4 100644 (file)
@@ -3977,6 +3977,10 @@ _elm_toolbar_item_efl_access_component_highlight_grab(Eo *eo_it, Elm_Toolbar_Ite
    // TIZEN_ONLY(20171114): atspi: expose highlight information on atspi
    efl_access_active_descendant_changed_signal_emit(WIDGET(it), eo_it);
    //
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,highlighted", eo_it);
+   //
    return EINA_TRUE;
 }
 
@@ -3987,6 +3991,10 @@ _elm_toolbar_item_efl_access_component_highlight_clear(Eo *eo_it EINA_UNUSED, El
    // TIZEN_ONLY(20171114): atspi: expose highlight information on atspi
    efl_access_active_descendant_changed_signal_emit(WIDGET(it), eo_it);
    //
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   // If you call eo_do_super, then you do NOT have to call smart callback.
+   evas_object_smart_callback_call(WIDGET(it), "atspi,unhighlighted", eo_it);
+   //
    return EINA_TRUE;
 }
 //
index dd2534e..d313759 100644 (file)
@@ -5883,7 +5883,9 @@ _elm_widget_item_efl_access_component_highlight_grab(Eo *obj, Elm_Widget_Item_Da
 
    elm_object_accessibility_highlight_set(sd->view, EINA_TRUE);
    efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_HIGHLIGHTED, EINA_TRUE);
-
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   evas_object_smart_callback_call(sd->widget, SIG_WIDGET_ATSPI_HIGHLIGHTED, obj);
+   //
    return EINA_TRUE;
    //
 }
@@ -5894,6 +5896,9 @@ _elm_widget_item_efl_access_component_highlight_clear(Eo *obj, Elm_Widget_Item_D
    if (!obj) return EINA_FALSE;
    elm_object_accessibility_highlight_set(sd->view, EINA_FALSE);
    efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_HIGHLIGHTED, EINA_FALSE);
+   //TIZEN_ONLY(20170412) Make atspi,(un)highlighted work on widget item
+   evas_object_smart_callback_call(sd->widget, SIG_WIDGET_ATSPI_UNHIGHLIGHTED, obj);
+   //
    return EINA_TRUE;
 }
 //
index ebbeda0..a3ba1d8 100644 (file)
@@ -155,6 +155,9 @@ struct _Elm_Genlist_Data
    //TIZEN_ONLY(20171114) genlist: enhance accessibility scroll & highlight
    Elm_Gen_Item                         *atspi_item_to_highlight;
    //
+   //TIZEN_ONLY(20161104) : Accessibility : synchronized highlight of atspi and item align feature for wearable profile
+   Elm_Gen_Item                         *currently_highlighted_item;
+   //
 
    Eina_Bool                             filter;
    Eina_Bool                             focus_on_selection_enabled : 1;