From: JunsuChoi Date: Fri, 27 Apr 2018 04:28:12 +0000 (+0900) Subject: atspi: Enhance find unrealized item of genlist when called highlight_grab X-Git-Tag: submit/tizen_4.0/20180511.021528~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4723a3a9cfb142f45b3e4670da6c9d16db823229;p=platform%2Fupstream%2Felementary.git atspi: Enhance find unrealized item of genlist when called highlight_grab Change-Id: I77822bfab815f9e27a57acf6b645ec4438f8b27d --- diff --git a/src/mobile_lib/elm_genlist.c b/src/mobile_lib/elm_genlist.c index 1d0e6c9b9..49f3aa242 100644 --- a/src/mobile_lib/elm_genlist.c +++ b/src/mobile_lib/elm_genlist.c @@ -2000,6 +2000,9 @@ _item_realize(Elm_Gen_Item *it, evas_object_smart_callback_call(WIDGET(it), SIG_WIDGET_ATSPI_HIGHLIGHTED, EO_OBJ(it)); // + //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"); + // } } @@ -8778,16 +8781,20 @@ _elm_genlist_item_elm_interface_atspi_component_highlight_grab(Eo *eo_it, Elm_Ge { ELM_GENLIST_DATA_GET(WIDGET(it), sd); - //TIZEN_ONLY(20170119): Show the object highlighted by highlight_grab when the object is completely out of the scroll - eo_do_super(EO_OBJ(it), ELM_GENLIST_ITEM_CLASS, elm_interface_atspi_component_highlight_grab()); - - //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)) + { + //TIZEN_ONLY(20170119): Show the object highlighted by highlight_grab when the object is completely out of the scroll + eo_do_super(EO_OBJ(it), ELM_GENLIST_ITEM_CLASS, elm_interface_atspi_component_highlight_grab()); - if (!VIEW(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_OBJ(it)); + // + //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"); + // + } + else { if (!TIZEN_PROFILE_WEARABLE) { @@ -8795,12 +8802,26 @@ _elm_genlist_item_elm_interface_atspi_component_highlight_grab(Eo *eo_it, Elm_Ge elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN); // } + else + { + Eina_List *realized = elm_genlist_realized_items_get(WIDGET(it)); + if (realized) + { + Elm_Object_Item *first_it = elm_genlist_first_item_get(WIDGET(it)); + Elm_Object_Item *last_it = elm_genlist_last_item_get(WIDGET(it)); + if (first_it == eo_it || last_it == eo_it) + elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE); + else + elm_genlist_item_bring_in(eo_it, ELM_GENLIST_ITEM_SCROLLTO_IN); + eina_list_free(realized); + /* FIXME : Adjusted_item is not unnecessary when find unrealized item and highlight + Because In realized function will find unrealized item and highlight focus. */ + sd->adjusted_item = NULL; + } + } + 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"); - // - return EINA_TRUE; } @@ -8808,10 +8829,6 @@ EOLIAN static Eina_Bool _elm_genlist_item_elm_interface_atspi_component_highlight_clear(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it) { ELM_GENLIST_DATA_GET(WIDGET(it), sd); - //TIZEN_ONLY(20161104) : Accessibility : synchronized highlight of atspi and item align feature for wearable profile - if(sd->currently_highlighted_item == it) - sd->currently_highlighted_item = NULL; - // if (sd->atspi_item_to_highlight == it) sd->atspi_item_to_highlight = NULL; elm_object_accessibility_highlight_set(EO_OBJ(it), EINA_FALSE); diff --git a/src/mobile_lib/elm_widget_genlist.h b/src/mobile_lib/elm_widget_genlist.h index b633b1e1a..3724e050c 100644 --- a/src/mobile_lib/elm_widget_genlist.h +++ b/src/mobile_lib/elm_widget_genlist.h @@ -210,9 +210,6 @@ struct _Elm_Genlist_Data int scroll_delta_y_backup; // Elm_Gen_Item *aligned_item; - //TIZEN_ONLY(20161104) : Accessibility : synchronized highlight of atspi and item align feature for wearable profile - Elm_Gen_Item *currently_highlighted_item; - // Eina_List *filter_queue; Eina_List *filtered_list;