atspi: grab highlight using unrealized item 95/140295/1 accepted/tizen/3.0/common/20170731.131710 accepted/tizen/3.0/ivi/20170731.012839 accepted/tizen/3.0/mobile/20170731.012719 accepted/tizen/3.0/tv/20170731.012745 accepted/tizen/3.0/wearable/20170731.012810 submit/tizen_3.0/20170727.060405 submit/tizen_3.0/20170728.001855 submit/tizen_3.0/20170728.001946
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 24 Jul 2017 10:11:48 +0000 (19:11 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Mon, 24 Jul 2017 10:35:49 +0000 (19:35 +0900)
The looping naviation could make the first(or last) item grab highlight.
But the _elm_widget_item_elm_interface_atspi_component_highlight_grab returns
without setting highlight if sd->view is NULL that means the item is NOT
realized in case of genlist.
So the _elm_genlist_item_elm_interface_atspi_component_highlight_grab BRINGs
the first(or last) item IN first before grabbing highlight.

Change-Id: Id36716d1e2d6249532d67dede9357e152b3d3107

src/mobile_lib/elm_genlist.c

index 0804a082fc60d8ffa04fd85eb6820331029aa6e8..90c3d057774e83035502a6ba03335467b0aa0498 100644 (file)
     cmd(SIG_ACCESS_CHANGED, "access,changed", "") \
     cmd(SIG_LOADED, "loaded", "") \
     cmd(SIG_ATSPI_SCREEN_READER_CHANGED, "atspi,screen,reader,changed", "") \
+    cmd(SIG_WIDGET_ATSPI_HIGHLIGHTED, "atspi,highlighted", "") \
     cmd(SIG_FILTER_DONE, "filter,done", "")
 
 ELM_PRIV_GENLIST_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
@@ -130,6 +131,9 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
        //TIZEN_ONLY(20161213): apply screen_reader_changed callback
        {SIG_ATSPI_SCREEN_READER_CHANGED, ""},
        //
+       //TIZEN_ONLY(20170724): grab highlight using unrealized item
+       {SIG_WIDGET_ATSPI_HIGHLIGHTED, ""},
+       //
        {NULL, NULL}
 };
 
@@ -1965,6 +1969,12 @@ _item_realize(Elm_Gen_Item *it,
      {
         sd->atspi_item_to_highlight = NULL;
         elm_object_accessibility_highlight_set(EO_OBJ(it), EINA_TRUE);
+        //TIZEN_ONLY(20170724): grab highlight using unrealized item
+        elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it),
+                                     ELM_ATSPI_STATE_HIGHLIGHTED, EINA_TRUE);
+        evas_object_smart_callback_call(WIDGET(it),
+          SIG_WIDGET_ATSPI_HIGHLIGHTED, EO_OBJ(it));
+        //
      }
 }
 
@@ -8752,7 +8762,12 @@ _elm_genlist_item_elm_interface_atspi_component_highlight_grab(Eo *eo_it, Elm_Ge
         //
      }
    else
+     {
+       //TIZEN_ONLY(20170724): grab highlight using unrealized item
+       elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN);
+       //
        sd->atspi_item_to_highlight = it;//it will be highlighted when realized
+     }
 
    //TIZEN_ONLY(20161104) : Accessibility : synchronized highlight of atspi and item align feature for wearable profile
    edje_object_signal_emit(VIEW(it), SIGNAL_ITEM_HIGHLIGHTED, "elm");