atspi: grab highlight using unrealized item 96/140296/2 accepted/tizen/unified/20170728.195337 submit/tizen/20170727.055818
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 24 Jul 2017 10:11:48 +0000 (19:11 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 27 Jul 2017 01:32:58 +0000 (01:32 +0000)
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 5c998863dd27a9c94a99b3531a7d319d08bd3f26..82048ecce76f94908ae19442ff16374f32231372 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}
 };
 
@@ -1989,6 +1993,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));
+        //
      }
 }
 
@@ -8774,7 +8784,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");