[atspi][index] index item accessibility highlight implementation
authorPrasoon Singh <prasoon.16@samsung.com>
Mon, 14 Nov 2016 15:46:10 +0000 (21:16 +0530)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 17 Nov 2016 08:07:49 +0000 (17:07 +0900)
Indicator will come if highilght is present on index item and will stay untill highlight is not
gone from index item.

Change-Id: I6cd57936057f4fc954f5d21ced8fe3fc042180a8

src/lib/elm_index.c
src/lib/elm_index_item.eo

index a4ce08a99961dff80c09d447e05d54ee8ecde1e6..0533cf5cf756379d8f5ec1b35133f21b49de397b 100644 (file)
@@ -1393,9 +1393,6 @@ _elm_index_item_selected_set(Eo *eo_it,
 
              edje_object_signal_emit(VIEW(it_inactive),
                                      "elm,state,inactive", "elm");
-             //TIZEN_ONLY(20160519): improve index atspi support
-             if (_elm_atspi_enabled()) elm_layout_signal_emit(obj, "elm,indicator,state,inactive", "elm");
-             //
              edje_object_message_signal_process(VIEW(it_inactive));
           }
 
@@ -1407,14 +1404,6 @@ _elm_index_item_selected_set(Eo *eo_it,
 
         edje_object_signal_emit(VIEW(it_active), "elm,state,active", "elm");
 
-        //TIZEN_ONLY(20160519): improve index atspi support
-        if (_elm_atspi_enabled())
-          {
-             elm_layout_text_set(obj, "elm.text", strdup(it_sel->letter));
-             elm_layout_signal_emit(obj, "elm,indicator,state,active", "elm");
-          }
-        //
-
         edje_object_message_signal_process(VIEW(it_active));
 
         eo_do(obj, eo_event_callback_call
@@ -1862,5 +1851,29 @@ _elm_index_item_elm_interface_atspi_accessible_state_set_get(Eo *eo_it, Elm_Inde
 }
 //
 
+//TIZEN ONLY(20161114): index item accessibility highlight implementation
+EOLIAN static Eina_Bool
+_elm_index_item_elm_interface_atspi_component_highlight_grab(Eo *eo_it, Elm_Index_Item_Data *sd)
+{
+   Evas_Object *obj = WIDGET(sd);
+   if (sd->letter)
+     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);
+
+   return EINA_TRUE;
+}
+
+EOLIAN static Eina_Bool
+_elm_index_item_elm_interface_atspi_component_highlight_clear(Eo *eo_it, Elm_Index_Item_Data *sd)
+{
+   Evas_Object *obj = WIDGET(sd);
+   elm_layout_signal_emit(obj, "elm,indicator,state,inactive", "elm");
+   elm_object_accessibility_highlight_set(eo_it, EINA_FALSE);
+
+   return EINA_TRUE;
+}
+//
+
 #include "elm_index_item.eo.c"
 #include "elm_index.eo.c"
index f0f88cb4b2e8e9b45c04a9df8f1ec731874224fd..88b868bfefbb6be4c79c5d04472574f1722ffea2 100644 (file)
@@ -68,5 +68,9 @@ class Elm.Index_Item(Elm.Widget_Item, Elm_Interface_Atspi_Widget_Action)
         //TIZEN_ONLY(20161021) : atspi:Do not give highlightable state if index style is pagecontrol
         Elm_Interface_Atspi_Accessible.state_set.get;
         //
+        //TIZEN ONLY(20161114): index item accessibility highlight implementation
+        Elm_Interface_Atspi_Component.highlight_grab;
+        Elm_Interface_Atspi_Component.highlight_clear;
+        //
    }
 }