From: Paweł Stawicki Date: Fri, 12 May 2017 11:37:11 +0000 (+0200) Subject: atspi: connect to at-spi dbus based on org.a11y.Status.IsEnabled property X-Git-Tag: accepted/tizen/unified/20170711.181143~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de6d9debc46d4f042cbba2e3d43b56677f151545;p=platform%2Fupstream%2Felementary.git atspi: connect to at-spi dbus based on org.a11y.Status.IsEnabled property Change-Id: I1fcd3d5e98fff8eb601430127bfc6660ef0ae414 --- diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c index b1d99e0..b945fd2 100644 --- a/src/lib/elc_multibuttonentry.c +++ b/src/lib/elc_multibuttonentry.c @@ -1904,15 +1904,17 @@ _elm_multibuttonentry_elm_widget_access(Eo *obj, Elm_Multibuttonentry_Data *sd E //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_multibuttonentry_elm_widget_atspi(Eo *obj, Elm_Multibuttonentry_Data *sd EINA_UNUSED, Eina_Bool is_atspi) +_elm_multibuttonentry_elm_widget_screen_reader(Eo *obj, Elm_Multibuttonentry_Data *sd EINA_UNUSED, Eina_Bool is_screen_reader) { - _atspi_obj_process(obj, is_atspi); + _atspi_obj_process(obj, is_screen_reader); //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EAPI Evas_Object * elm_multibuttonentry_add(Evas_Object *parent) diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index 3f9a9cb..2ace342 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -413,7 +413,7 @@ _item_style_set(Elm_Naviframe_Item_Data *it, evas_object_freeze_events_set(VIEW(it), EINA_FALSE); //TIZEN ONLY(20151012): expose title as at-spi object - if (_elm_atspi_enabled()) + if (elm_atspi_bridge_utils_is_screen_reader_enabled()) _atspi_expose_title(it, EINA_TRUE); // } @@ -1756,19 +1756,21 @@ _elm_naviframe_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Ei //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_naviframe_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Eina_Bool is_atspi) +_elm_naviframe_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Eina_Bool is_screen_reader) { Elm_Naviframe_Item_Data *it; EINA_INLIST_FOREACH(sd->stack, it) - _atspi_expose_title(it, is_atspi); + _atspi_expose_title(it, is_screen_reader); //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// static void _item_push_helper(Elm_Naviframe_Item_Data *item) diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c index 592f6ee..75d0b87 100644 --- a/src/lib/elc_popup.c +++ b/src/lib/elc_popup.c @@ -1342,9 +1342,11 @@ _title_text_set(Evas_Object *obj, } //TIZEN ONLY(20150717): expose title as at-spi object - if (_elm_atspi_enabled()) + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + if (elm_atspi_bridge_utils_is_screen_reader_enabled()) _atspi_expose_title(obj, EINA_TRUE); // + // if (sd->title_text) elm_layout_signal_emit(sd->main_layout, "elm,state,title,text,visible", "elm"); else @@ -1480,7 +1482,9 @@ _elm_popup_elm_layout_text_set(Eo *obj, Elm_Popup_Data *_pd, const char *part, c { int_ret = elm_layout_text_set(_pd->main_layout, part, label); //TIZEN_ONLY(20170314): expose part-text as at-spi object - _atspi_part_text_expose(obj, part,_elm_atspi_enabled()); + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + _atspi_part_text_expose(obj, part,elm_atspi_bridge_utils_is_screen_reader_enabled()); + // // } _scroller_size_calc(obj); @@ -2224,19 +2228,21 @@ _elm_popup_elm_widget_access(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, Eina_Bool //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_popup_elm_widget_atspi(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, Eina_Bool is_atspi) +_elm_popup_elm_widget_screen_reader(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, Eina_Bool is_screen_reader) { - _atspi_expose_title(obj, is_atspi); + _atspi_expose_title(obj, is_screen_reader); //TIZEN_ONLY(20170314): expose part-text as at-spi object - _atspi_part_text_expose(obj, "elm.text", is_atspi); + _atspi_part_text_expose(obj, "elm.text", is_screen_reader); // //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EAPI Evas_Object * elm_popup_add(Evas_Object *parent) diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c index b58b4dc..6cd6626 100644 --- a/src/lib/elm_atspi_bridge.c +++ b/src/lib/elm_atspi_bridge.c @@ -24,6 +24,9 @@ #define A11Y_DBUS_PATH "/org/a11y/bus" #define A11Y_DBUS_INTERFACE "org.a11y.Bus" #define A11Y_DBUS_STATUS_INTERFACE "org.a11y.Status" +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property +#define A11Y_DBUS_ENABLED_PROPERTY "IsEnabled" +// #define ATSPI_DBUS_INTERFACE_EVENT_WINDOW "org.a11y.atspi.Event.Window" #define CACHE_ITEM_SIGNATURE "((so)(so)(so)a(so)assusau)" @@ -6090,21 +6093,50 @@ _screen_reader_enabled_get(void *data, const Eldbus_Message *msg, Eldbus_Pending ERR("Could not get 'ScreenReaderEnabled' boolean property"); return; } - - if (is_enabled) - _a11y_connection_init(data); - else - DBG("AT-SPI2 stack not enabled."); - //TIZEN_ONLY(20161027) - Export elm_atspi_bridge_utils_is_screen_reader_enabled pd->screen_reader_enabled = !!is_enabled; // //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - _elm_win_atspi(is_enabled); + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + _elm_win_screen_reader(is_enabled); + // // } +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property +static void +_at_spi_client_enabled_get(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending) +{ + ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(data, pd); + const char *errname, *errmsg; + Eina_Bool is_enabled; + Eldbus_Message_Iter *variant; + + pd->pending_requests = eina_list_remove(pd->pending_requests, pending); + + if (eldbus_message_error_get(msg, &errname, &errmsg)) + { + WRN("%s %s", errname, errmsg); + return; + } + if (!eldbus_message_arguments_get(msg, "v", &variant)) + { + ERR("'" A11Y_DBUS_ENABLED_PROPERTY "' not packed into variant."); + return; + } + if (!eldbus_message_iter_arguments_get(variant, "b", &is_enabled)) + { + ERR("Could not get '" A11Y_DBUS_ENABLED_PROPERTY "' boolean property"); + return; + } + if (is_enabled) + _a11y_connection_init(data); + else + DBG("AT-SPI2 stack not enabled."); +} +// + static void _bridge_object_register(Eo *bridge, Eo *obj) { ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd); @@ -6333,20 +6365,33 @@ _properties_changed_cb(void *data, Eldbus_Proxy *proxy EINA_UNUSED, void *event) ERR("Unable to get ScreenReaderEnabled property value"); return; } - if (val) - _a11y_connection_init(bridge); - else - _a11y_connection_shutdown(bridge); - //TIZEN_ONLY(20161027) - Export elm_atspi_bridge_utils_is_screen_reader_enabled ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd); pd->screen_reader_enabled = !!val; // //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - _elm_win_atspi(val); + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + _elm_win_screen_reader(val); + // // } + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + if (ev->name && !strcmp(ev->name, A11Y_DBUS_ENABLED_PROPERTY) && + ifc && !strcmp(A11Y_DBUS_STATUS_INTERFACE, ifc)) + { + if (!eina_value_get(ev->value, &val)) + { + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + ERR("Unable to get " A11Y_DBUS_ENABLED_PROPERTY " property value"); + return; + } + if (val) + _a11y_connection_init(bridge); + else + _a11y_connection_shutdown(bridge); + } + // } EOLIAN Eo_Base* @@ -6381,6 +6426,16 @@ _elm_atspi_bridge_eo_base_constructor(Eo *obj, Elm_Atspi_Bridge_Data *pd) } pd->pending_requests = eina_list_append(pd->pending_requests, req); + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + if (!(req = eldbus_proxy_property_get(proxy, A11Y_DBUS_ENABLED_PROPERTY, _at_spi_client_enabled_get, obj))) + { + ERR("Could not send PropertyGet request"); + goto proxy_err; + } + + pd->pending_requests = eina_list_append(pd->pending_requests, req); + // + eldbus_proxy_properties_monitor(proxy, EINA_TRUE); eldbus_proxy_event_callback_add(proxy, ELDBUS_PROXY_EVENT_PROPERTY_CHANGED, _properties_changed_cb, obj); diff --git a/src/lib/elm_calendar.c b/src/lib/elm_calendar.c index 7472a0a..9e0d291 100644 --- a/src/lib/elm_calendar.c +++ b/src/lib/elm_calendar.c @@ -852,9 +852,11 @@ _populate(Evas_Object *obj) edje_object_message_signal_process(elm_layout_edje_get(obj)); //TIZEN_ONLY(20151012): Register smart callbacks for calendar buttons. - if (_elm_atspi_enabled()) + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + if (elm_atspi_bridge_utils_is_screen_reader_enabled()) _atspi_expose_objects(obj, EINA_TRUE); // + // } static void @@ -2160,15 +2162,17 @@ _elm_calendar_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Calendar_Data *_pd EINA //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_calendar_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Calendar_Data *_pd EINA_UNUSED, Eina_Bool is_atspi) +_elm_calendar_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_Calendar_Data *_pd EINA_UNUSED, Eina_Bool is_screen_reader) { - _atspi_expose_objects(obj, is_atspi); + _atspi_expose_objects(obj, is_screen_reader); //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EAPI Evas_Object * elm_calendar_add(Evas_Object *parent) diff --git a/src/lib/elm_calendar.eo b/src/lib/elm_calendar.eo index 6ec3323..decd995 100644 --- a/src/lib/elm_calendar.eo +++ b/src/lib/elm_calendar.eo @@ -529,7 +529,9 @@ class Elm.Calendar (Elm.Layout, Elm_Interface_Atspi_Widget_Action) Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // //TIZEN_ONLY(20161116): Apply UI Mirror for Tizen 3.0 UX Elm.Widget.mirrored; diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c index 1ce9706..5f98053 100644 --- a/src/lib/elm_conform.c +++ b/src/lib/elm_conform.c @@ -408,15 +408,17 @@ _atspi_expose_keypad_area(Evas_Object *obj, Eina_Bool is_atspi) //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_conformant_elm_widget_atspi(Eo *obj, Elm_Conformant_Data *_pd EINA_UNUSED, Eina_Bool is_atspi) +_elm_conformant_elm_widget_screen_reader(Eo *obj, Elm_Conformant_Data *_pd EINA_UNUSED, Eina_Bool is_screen_reader) { - _atspi_expose_keypad_area(obj, is_atspi); + _atspi_expose_keypad_area(obj, is_screen_reader); //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// static void _conformant_parts_swallow(Evas_Object *obj) @@ -443,9 +445,11 @@ _conformant_parts_swallow(Evas_Object *obj) elm_widget_sub_object_add(obj, sd->virtualkeypad); evas_object_size_hint_max_set(sd->virtualkeypad, -1, 0); //TIZEN ONLY(20160628): expose virtual keypad rect as at-spi object - if (_elm_atspi_enabled()) + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + if (elm_atspi_bridge_utils_is_screen_reader_enabled()) _atspi_expose_keypad_area(obj, EINA_TRUE); // + // } // TIZEN_ONLY(20160509): support different thing in Tizen 3.0 else if (mode == ELM_WIN_KEYBOARD_ON) diff --git a/src/lib/elm_conformant.eo b/src/lib/elm_conformant.eo index dfbb342..fb84273 100644 --- a/src/lib/elm_conformant.eo +++ b/src/lib/elm_conformant.eo @@ -10,7 +10,9 @@ class Elm.Conformant (Elm.Layout) Elm.Widget.theme_apply; //TIZEN_ONLY(20161012): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Layout.content_aliases.get; } diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 31de500..7250020 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -4531,9 +4531,11 @@ _elm_entry_elm_layout_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, co */ // TIZEN_ONLY(20170512): Support accessibility for entry anchors. - if (_elm_atspi_enabled()) + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + if (elm_atspi_bridge_utils_is_screen_reader_enabled()) _atspi_expose_anchors(obj, EINA_TRUE); // + // evas_event_thaw(evas_object_evas_get(obj)); evas_event_thaw_eval(evas_object_evas_get(obj)); return EINA_TRUE; @@ -8219,12 +8221,14 @@ _atspi_expose_anchors(Eo *obj, Eina_Bool is_atspi) } } +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_entry_elm_widget_atspi(Eo *obj, Elm_Entry_Data *sd EINA_UNUSED, Eina_Bool is_atspi) +_elm_entry_elm_widget_screen_reader(Eo *obj, Elm_Entry_Data *sd EINA_UNUSED, Eina_Bool is_screen_reader) { - _atspi_expose_anchors(obj, is_atspi); - evas_object_smart_callback_call(obj, "atspi,screen,reader,changed", &is_atspi); + _atspi_expose_anchors(obj, is_screen_reader); + evas_object_smart_callback_call(obj, "atspi,screen,reader,changed", &is_screen_reader); } +// EOLIAN static Eina_List* _elm_entry_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) diff --git a/src/lib/elm_entry.eo b/src/lib/elm_entry.eo index 59f05e0..623246a 100644 --- a/src/lib/elm_entry.eo +++ b/src/lib/elm_entry.eo @@ -1338,7 +1338,9 @@ class Elm.Entry (Elm.Layout, Elm_Interface_Scrollable, Evas.Clickable_Interface, Evas.Object_Smart.show; Evas.Object_Smart.hide; // TIZEN_ONLY(20170512): Support accessibility for entry anchors. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Widget.activate; Elm.Widget.focus_direction_manager_is; diff --git a/src/lib/elm_flipselector.c b/src/lib/elm_flipselector.c index a1ed26d..316cc08 100644 --- a/src/lib/elm_flipselector.c +++ b/src/lib/elm_flipselector.c @@ -672,15 +672,17 @@ _atspi_expose_flipselector_top_bottom(Elm_Flipselector_Data *sd, Eina_Bool is_at //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_flipselector_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, Eina_Bool is_atspi) +_elm_flipselector_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, Eina_Bool is_screen_reader) { - _atspi_expose_flipselector_top_bottom(sd, is_atspi); + _atspi_expose_flipselector_top_bottom(sd, is_screen_reader); //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EOLIAN static Eo * _elm_flipselector_eo_base_constructor(Eo *obj, Elm_Flipselector_Data *sd) @@ -693,9 +695,11 @@ _elm_flipselector_eo_base_constructor(Eo *obj, Elm_Flipselector_Data *sd) elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_LIST)); //TIZEN ONLY(20151012): expose flipselector top/bottom buttons for accessibility tree - if (_elm_atspi_enabled()) + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + if (elm_atspi_bridge_utils_is_screen_reader_enabled()) _atspi_expose_flipselector_top_bottom(sd, EINA_TRUE); // + // return obj; } diff --git a/src/lib/elm_flipselector.eo b/src/lib/elm_flipselector.eo index d71141f..d93d3de 100644 --- a/src/lib/elm_flipselector.eo +++ b/src/lib/elm_flipselector.eo @@ -216,7 +216,9 @@ class Elm.Flipselector (Elm.Layout, Elm_Interface_Atspi_Widget_Action, Elm.Widget.event; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Layout.sizing_eval; Elm_Interface_Atspi_Widget_Action.elm_actions.get; diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 69da336..be5d945 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -4837,22 +4837,23 @@ _elm_gengrid_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, Eina_B //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_gengrid_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, Eina_Bool is_atspi) +_elm_gengrid_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, Eina_Bool is_screen_reader) { Elm_Gen_Item *it; Evas_Object *content = NULL; Eina_List *l; //TIZEN_ONLY (20160914) : Accessibility: sort children list according to their x,y position - if (sd->horizontal && is_atspi) + if (sd->horizontal && is_screen_reader) sd->atspi_children = eina_list_sort(sd->atspi_children, eina_list_count(sd->atspi_children), _sort_items); // EINA_INLIST_FOREACH(sd->items, it) { if (!it->realized) continue; - if (is_atspi) + if (is_screen_reader) { elm_interface_atspi_accessible_added(EO_OBJ(it)); elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it)); @@ -4871,10 +4872,11 @@ _elm_gengrid_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, Eina_Bo } //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EAPI Evas_Object * elm_gengrid_add(Evas_Object *parent) diff --git a/src/lib/elm_gengrid.eo b/src/lib/elm_gengrid.eo index dac1467..e9c0594 100644 --- a/src/lib/elm_gengrid.eo +++ b/src/lib/elm_gengrid.eo @@ -713,7 +713,9 @@ class Elm.Gengrid (Elm.Layout, Elm_Interface_Scrollable, Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Widget.focus_next; Elm.Widget.focus_direction; diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index de4b372..4093614 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -5922,8 +5922,9 @@ _elm_genlist_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_B //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_genlist_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bool is_atspi) +_elm_genlist_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bool is_screen_reader) { Item_Block *itb; Eina_Bool done = EINA_FALSE; @@ -5941,7 +5942,7 @@ _elm_genlist_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bo EINA_LIST_FOREACH(itb->items, l, it) { if (!it->realized || it->want_hidden) continue; - if (is_atspi) + if (is_screen_reader) { elm_interface_atspi_accessible_added(EO_OBJ(it)); elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it)); @@ -5965,10 +5966,11 @@ _elm_genlist_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bo else if (done) break; } //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EAPI Evas_Object * elm_genlist_add(Evas_Object *parent) diff --git a/src/lib/elm_genlist.eo b/src/lib/elm_genlist.eo index e8c2872..f103763 100644 --- a/src/lib/elm_genlist.eo +++ b/src/lib/elm_genlist.eo @@ -647,7 +647,9 @@ class Elm.Genlist (Elm.Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Widget.focus_highlight_geometry_get; Elm.Widget.focus_next; diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c index d1bd0e8..59a5b7e 100644 --- a/src/lib/elm_index.c +++ b/src/lib/elm_index.c @@ -1307,15 +1307,16 @@ _elm_index_elm_widget_access(Eo *obj, Elm_Index_Data *_pd EINA_UNUSED, Eina_Bool //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_index_elm_widget_atspi(Eo *obj, Elm_Index_Data *_pd, Eina_Bool is_atspi) +_elm_index_elm_widget_screen_reader(Eo *obj, Elm_Index_Data *_pd, Eina_Bool is_screen_reader) { Eina_List *elist = NULL; Elm_Object_Item *eo_it; EINA_LIST_FOREACH(_pd->items, elist, eo_it) { - if (is_atspi) + if (is_screen_reader) { elm_interface_atspi_accessible_added(eo_it); elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_it); @@ -1327,10 +1328,11 @@ _elm_index_elm_widget_atspi(Eo *obj, Elm_Index_Data *_pd, Eina_Bool is_atspi) } } //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EAPI Evas_Object * elm_index_add(Evas_Object *parent) diff --git a/src/lib/elm_index.eo b/src/lib/elm_index.eo index 74c8a57..962c8ff 100644 --- a/src/lib/elm_index.eo +++ b/src/lib/elm_index.eo @@ -358,7 +358,9 @@ class Elm.Index (Elm.Layout, Evas.Clickable_Interface, Evas.Selectable_Interface Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Widget.focus_next; Elm.Layout.sizing_eval; diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c index 549b81e..16c1d25 100644 --- a/src/lib/elm_layout.c +++ b/src/lib/elm_layout.c @@ -1872,11 +1872,12 @@ elm_layout_mmap_get(Eo *obj, const Eina_File **file, const char **group) } //TIZEN_ONLY(20161213): apply screen_reader_changed callback +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_layout_elm_widget_atspi(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED, Eina_Bool is_atspi) +_elm_layout_elm_widget_screen_reader(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED, Eina_Bool is_screen_reader) { EINA_SAFETY_ON_NULL_RETURN(obj); - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); } // diff --git a/src/lib/elm_layout.eo b/src/lib/elm_layout.eo index 83f5fc5..c2d80f7 100644 --- a/src/lib/elm_layout.eo +++ b/src/lib/elm_layout.eo @@ -620,7 +620,9 @@ class Elm.Layout (Elm.Container, Efl.File) Elm.Widget.sub_object_del; Elm.Widget.on_focus; //TIZEN_ONLY(20161212): apply screen_reader_changed callback - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Container.content_get; Elm.Container.content_set; diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index eb2128d..6449aef 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -2626,15 +2626,16 @@ _elm_list_elm_widget_access(Eo *obj EINA_UNUSED, Elm_List_Data *sd, Eina_Bool ac //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_list_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_List_Data *sd, Eina_Bool is_atspi) +_elm_list_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_List_Data *sd, Eina_Bool is_screen_reader) { Eina_List *elist = NULL; Elm_Object_Item *eo_it; EINA_LIST_FOREACH(sd->items, elist, eo_it) { - if (is_atspi) + if (is_screen_reader) { ELM_LIST_ITEM_DATA_GET(eo_it, it); if (it->icon) eo_do(it->icon, elm_interface_atspi_accessible_parent_set(eo_it)); @@ -2649,10 +2650,11 @@ _elm_list_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_List_Data *sd, Eina_Bool is_ } } //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EAPI Evas_Object * elm_list_add(Evas_Object *parent) diff --git a/src/lib/elm_list.eo b/src/lib/elm_list.eo index c832dc1..c22aa81 100644 --- a/src/lib/elm_list.eo +++ b/src/lib/elm_list.eo @@ -563,7 +563,9 @@ class Elm.List (Elm.Layout, Elm_Interface_Scrollable, Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Widget.focus_highlight_geometry_get; Elm.Widget.focus_next; diff --git a/src/lib/elm_multibuttonentry.eo b/src/lib/elm_multibuttonentry.eo index 26cac83..7e14175 100644 --- a/src/lib/elm_multibuttonentry.eo +++ b/src/lib/elm_multibuttonentry.eo @@ -283,7 +283,9 @@ class Elm.Multibuttonentry (Elm.Layout) Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Widget.focus_direction; Elm.Widget.focus_next; diff --git a/src/lib/elm_naviframe.eo b/src/lib/elm_naviframe.eo index 0fa4a1c..b976f56 100644 --- a/src/lib/elm_naviframe.eo +++ b/src/lib/elm_naviframe.eo @@ -218,7 +218,9 @@ class Elm.Naviframe (Elm.Layout, Elm_Interface_Atspi_Widget_Action) Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // //TIZEN_ONLY(20161208): add API elm_object_part_access_object_get Elm.Widget.part_access_object_get; diff --git a/src/lib/elm_popup.eo b/src/lib/elm_popup.eo index a83d043..d318dc5 100644 --- a/src/lib/elm_popup.eo +++ b/src/lib/elm_popup.eo @@ -228,7 +228,9 @@ class Elm.Popup (Elm.Layout, Elm_Interface_Atspi_Widget_Action) Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Widget.focus_next; Elm.Widget.parent.set; diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h index 7d910f5..85f3e9a 100644 --- a/src/lib/elm_priv.h +++ b/src/lib/elm_priv.h @@ -395,7 +395,9 @@ void _elm_win_rescale(Elm_Theme *th, void _elm_win_access(Eina_Bool is_access); //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. -void _elm_win_atspi(Eina_Bool is_atspi); +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property +void _elm_win_screen_reader(Eina_Bool is_screen_reader); +// // void _elm_win_translate(void); void _elm_win_focus_reconfigure(void); diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index 43015af..7cdbde0 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -3170,14 +3170,15 @@ _elm_toolbar_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, Eina_B //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_toolbar_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, Eina_Bool is_atspi) +_elm_toolbar_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, Eina_Bool is_screen_reader) { Elm_Toolbar_Item_Data *it; EINA_INLIST_FOREACH (sd->items, it) { - if (is_atspi) + if (is_screen_reader) { if (it->icon) eo_do(it->icon, elm_interface_atspi_accessible_parent_set(EO_OBJ(it))); elm_interface_atspi_accessible_added(EO_OBJ(it)); @@ -3190,10 +3191,11 @@ _elm_toolbar_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, Eina_Bo } } //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// static void _elm_toolbar_coordinates_adjust(Elm_Toolbar_Item_Data *it, diff --git a/src/lib/elm_toolbar.eo b/src/lib/elm_toolbar.eo index bf83fd0..3d31ecc 100644 --- a/src/lib/elm_toolbar.eo +++ b/src/lib/elm_toolbar.eo @@ -527,7 +527,9 @@ class Elm.Toolbar (Elm.Widget, Elm_Interface_Scrollable, Elm.Widget.access; //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - Elm.Widget.atspi; + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + Elm.Widget.screen_reader; + // // Elm.Widget.focus_next; Elm.Widget.theme_apply; diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index cac4cfa..4f03349 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -952,9 +952,10 @@ elm_widget_access(Evas_Object *obj, //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EAPI Eina_Bool -elm_widget_atspi(Evas_Object *obj, - Eina_Bool is_atspi) +elm_widget_screen_reader(Evas_Object *obj, + Eina_Bool is_screen_reader) { const Eina_List *l; Evas_Object *child; @@ -964,18 +965,19 @@ elm_widget_atspi(Evas_Object *obj, EINA_LIST_FOREACH(sd->subobjs, l, child) { if (elm_widget_is(child)) - ret &= elm_widget_atspi(child, is_atspi); + ret &= elm_widget_screen_reader(child, is_screen_reader); } - eo_do(obj, elm_obj_widget_atspi(is_atspi)); + eo_do(obj, elm_obj_widget_screen_reader(is_screen_reader)); return ret; } EOLIAN static void -_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Eina_Bool is_atspi EINA_UNUSED) +_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Eina_Bool is_screen_reader EINA_UNUSED) { } // +// EOLIAN static void _elm_widget_access(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Eina_Bool is_access EINA_UNUSED) diff --git a/src/lib/elm_widget.eo b/src/lib/elm_widget.eo index 3e9f22a..25e1271 100644 --- a/src/lib/elm_widget.eo +++ b/src/lib/elm_widget.eo @@ -518,14 +518,16 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, } //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. - atspi { + // TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property + screen_reader { [['Virtual' function on the widget being set access.]] params { - @in is_atspi: bool; + @in is_screen_reader: bool; } legacy: null; } // + // cursor_del { params { @in cur: Elm_Cursor *; diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h index e9815ca..d6db337 100644 --- a/src/lib/elm_widget.h +++ b/src/lib/elm_widget.h @@ -704,7 +704,9 @@ EAPI Eina_Bool elm_widget_api_check(int ver); EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access); //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. -EAPI Eina_Bool elm_widget_atspi(Evas_Object *obj, Eina_Bool is_access); +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property +EAPI Eina_Bool elm_widget_screen_reader(Evas_Object *obj, Eina_Bool is_access); +// // EAPI Elm_Theme_Apply elm_widget_theme(Evas_Object *obj); EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force); diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 55ca564..a83ab2f 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -2991,8 +2991,9 @@ _elm_win_access(Eina_Bool is_access) //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property void -_elm_win_atspi(Eina_Bool is_atspi) +_elm_win_screen_reader(Eina_Bool is_screen_reader) { const Eina_List *l; Evas_Object *obj; @@ -3000,8 +3001,8 @@ _elm_win_atspi(Eina_Bool is_atspi) EINA_LIST_FOREACH(_elm_win_list, l, obj) { - elm_widget_atspi(obj, is_atspi); - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + elm_widget_screen_reader(obj, is_screen_reader); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); /* floating orphan object. if there are A, B, C objects and user does as below, then there would be floating orphan objects. @@ -3020,11 +3021,11 @@ _elm_win_atspi(Eina_Bool is_atspi) if (elm_widget_is(fobj) && !elm_widget_parent_get(fobj)) { - elm_widget_atspi(fobj, is_atspi); + elm_widget_screen_reader(fobj, is_screen_reader); } } - if (!is_atspi) + if (!is_screen_reader) { eo_do(obj, elm_interface_atspi_component_highlight_clear()); } @@ -3037,6 +3038,7 @@ _elm_win_atspi(Eina_Bool is_atspi) } } // +// void _elm_win_translate(void) diff --git a/src/mobile_lib/elm_genlist.c b/src/mobile_lib/elm_genlist.c index 7e074cd..5bb1456 100644 --- a/src/mobile_lib/elm_genlist.c +++ b/src/mobile_lib/elm_genlist.c @@ -6189,8 +6189,9 @@ _elm_genlist_evas_object_smart_add(Eo *obj, Elm_Genlist_Data *priv) //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off, //register/unregister access objects accordingly. +// TIZEN_ONLY(20170516): connect to at-spi dbus based on org.a11y.Status.IsEnabled property EOLIAN static void -_elm_genlist_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bool is_atspi) +_elm_genlist_elm_widget_screen_reader(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bool is_screen_reader) { Item_Block *itb; Eina_Bool done = EINA_FALSE; @@ -6207,7 +6208,7 @@ _elm_genlist_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bo EINA_LIST_FOREACH(itb->items, l, it) { if (!it->realized || it->want_hidden) continue; - if (is_atspi) + if (is_screen_reader) { elm_interface_atspi_accessible_added(EO_OBJ(it)); elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it)); @@ -6232,10 +6233,11 @@ _elm_genlist_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bo } //TIZEN_ONLY(20161213): apply screen_reader_changed callback - evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_atspi); + evas_object_smart_callback_call(obj, SIG_ATSPI_SCREEN_READER_CHANGED, &is_screen_reader); // } // +// EOLIAN const Elm_Atspi_Action * _elm_genlist_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *pd EINA_UNUSED)