elm: access: When atspi mode is dynamically switched on/off, register/unregister...
authorShilpa Singh <shilpa.singh@samsung.com>
Thu, 30 Nov 2017 08:36:44 +0000 (14:06 +0530)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 21 Dec 2017 11:22:28 +0000 (20:22 +0900)
Change-Id: Id167a44d109eb606edf18dec9bcb4810dbbabe89

16 files changed:
src/lib/elementary/efl_ui_multibuttonentry.c
src/lib/elementary/efl_ui_multibuttonentry.eo
src/lib/elementary/efl_ui_win.c
src/lib/elementary/elc_naviframe.c
src/lib/elementary/elc_popup.c
src/lib/elementary/elm_atspi_bridge.c
src/lib/elementary/elm_calendar.c
src/lib/elementary/elm_calendar.eo
src/lib/elementary/elm_flipselector.c
src/lib/elementary/elm_flipselector.eo
src/lib/elementary/elm_naviframe.eo
src/lib/elementary/elm_popup.eo
src/lib/elementary/elm_priv.h
src/lib/elementary/elm_widget.c
src/lib/elementary/elm_widget.eo
src/lib/elementary/elm_widget.h

index 04b00cd..fef2964 100644 (file)
@@ -706,6 +706,55 @@ _access_multibuttonentry_item_register(Evas_Object *obj,
    evas_object_propagate_events_set(VIEW(item), !is_access);
 }
 
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+static char *
+_label_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
+{
+   ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN_VAL(data, sd, NULL);
+   return strdup((char *)sd->label_str);
+}
+
+static void
+_atspi_multibuttonentry_label_register(Evas_Object *obj, Eina_Bool is_atspi)
+{
+   ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(obj, sd);
+   Evas_Object *label_obj;
+   label_obj = (Evas_Object *)edje_object_part_object_get(sd->label, "elm.text");
+   if (label_obj)
+     {
+         if (is_atspi)
+           {
+              sd->label_access = elm_access_object_register(label_obj, obj);
+              _elm_access_callback_set(_elm_access_info_get(sd->label_access),
+                                       ELM_ACCESS_INFO, _label_access_info_cb, obj);
+              efl_access_role_set(sd->label_access, EFL_ACCESS_ROLE_HEADING);
+              evas_object_pass_events_set(label_obj, !_elm_config->atspi_mode);
+              evas_object_propagate_events_set(sd->label, !_elm_config->atspi_mode);
+           }
+         else
+           {
+              elm_access_object_unregister(label_obj);
+           }
+     }
+}
+
+static void
+_atspi_multibuttonentry_item_register(Evas_Object *obj,
+                                      Elm_Object_Item *eo_item,
+                                      Eina_Bool is_atspi)
+{
+   ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item);
+   if (is_atspi)
+     {
+        efl_access_children_changed_added_signal_emit(obj, eo_item);
+        efl_access_added(eo_item);
+     }
+   else
+     efl_access_children_changed_del_signal_emit(obj, eo_item);
+}
+//
+
 EOLIAN static Eo *
 _elm_multibuttonentry_item_efl_object_constructor(Eo *eo_item, Elm_Multibuttonentry_Item_Data *item)
 {
@@ -919,11 +968,11 @@ _item_new(Efl_Ui_Multibuttonentry_Data *sd,
    efl_event_callback_legacy_call
      (obj, EFL_UI_MULTIBUTTONENTRY_EVENT_ITEM_ADDED, eo_item);
 
+   //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+   //register/unregister access objects accordingly.
    if (_elm_config->atspi_mode)
-     {
-        efl_access_children_changed_added_signal_emit(obj, eo_item);
-        efl_access_added(eo_item);
-     }
+     _atspi_multibuttonentry_item_register(obj, eo_item, EINA_TRUE);
+   //
 
    return eo_item;
 }
@@ -1411,15 +1460,6 @@ _box_layout_cb(Evas_Object *o,
      }
 }
 
-//TIZEN_ONLY(20160527) : expose label as at-spi object 
-static char *
-_label_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
-{
-   ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN_VAL(data, sd, NULL);
-   return strdup((char *)sd->label_str);
-}
-//
-
 static void
 _view_init(Evas_Object *obj, Efl_Ui_Multibuttonentry_Data *sd)
 {
@@ -1453,20 +1493,8 @@ _view_init(Evas_Object *obj, Efl_Ui_Multibuttonentry_Data *sd)
 
    //TIZEN_ONLY(20160527) : expose label as at-spi object
    if (_elm_config->atspi_mode)
-     {
-        Evas_Object *label_obj;
-        label_obj = (Evas_Object *)edje_object_part_object_get(sd->label, "elm.text");
-        if (label_obj)
-          {
-             sd->label_access = elm_access_object_register(label_obj, obj);
-             _elm_access_callback_set(_elm_access_info_get(sd->label_access),
-                                      ELM_ACCESS_INFO, _label_access_info_cb, obj);
-             efl_access_role_set(sd->label_access, EFL_ACCESS_ROLE_HEADING);
-             evas_object_pass_events_set(label_obj, !_elm_config->atspi_mode);
-             evas_object_propagate_events_set(sd->label, !_elm_config->atspi_mode);
-          }
-     }
-   ///
+     _atspi_multibuttonentry_label_register(obj, EINA_TRUE);
+   //
 
    sd->entry = efl_add(EFL_UI_TEXT_CLASS, sd->box,
                        efl_text_multiline_set(efl_added, EINA_FALSE),
@@ -1655,6 +1683,25 @@ _access_obj_process(Evas_Object *obj, Eina_Bool is_access)
      _access_multibuttonentry_item_register(obj, it, is_access);
 }
 
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+static void
+_atspi_obj_process(Evas_Object *obj, Eina_Bool is_atspi)
+{
+   Eina_List *l;
+   Elm_Object_Item *it;
+
+   ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(obj, sd);
+
+   /* label */
+   _atspi_multibuttonentry_label_register(obj, is_atspi);
+
+   /* items */
+   EINA_LIST_FOREACH(sd->items, l, it)
+     _atspi_multibuttonentry_item_register(obj, it, is_atspi);
+}
+//
+
 EOLIAN static void
 _efl_ui_multibuttonentry_elm_widget_on_access_update(Eo *obj, Efl_Ui_Multibuttonentry_Data *sd EINA_UNUSED, Eina_Bool acs)
 {
@@ -1662,6 +1709,15 @@ _efl_ui_multibuttonentry_elm_widget_on_access_update(Eo *obj, Efl_Ui_Multibutton
    _access_obj_process(obj, _efl_ui_multibuttonentry_smart_focus_next_enable);
 }
 
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_multibuttonentry_elm_widget_atspi(Eo *obj, Elm_Multibuttonentry_Data *sd EINA_UNUSED, Eina_Bool is_atspi)
+{
+   _atspi_obj_process(obj, is_atspi);
+}
+//
+
 EAPI Evas_Object *
 elm_multibuttonentry_add(Evas_Object *parent)
 {
index a4c2bb0..0ebb493 100644 (file)
@@ -166,6 +166,10 @@ class Efl.Ui.Multibuttonentry (Efl.Ui.Layout, Efl.Ui.Clickable, Efl.Ui.Format)
       Elm.Widget.on_access_update;
       Efl.Ui.Translatable.translation_update;
       Elm.Widget.widget_event;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Efl.Access.children { get; }
       Efl.Part.part;
       Efl.Ui.Format.format_cb { set; }
index a0144ef..fc1806a 100644 (file)
@@ -4034,6 +4034,49 @@ _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)
+{
+   Evas *evas;
+   const Eina_List *l;
+   Evas_Object *obj;
+   Evas_Object *fobj;
+
+   EINA_LIST_FOREACH(_elm_win_list, l, obj)
+     {
+        elm_widget_atspi(obj, is_atspi);
+
+         /* floating orphan object. if there are A, B, C objects and user does
+            as below, then there would be floating orphan objects.
+
+              1. elm_object_content_set(layout, A);
+              2. elm_object_content_set(layout, B);
+              3. elm_object_content_set(layout, C);
+
+            now, the object A and B are floating orphan objects */
+
+        fobj = obj;
+        for (;;)
+          {
+             fobj = evas_object_below_get(fobj);
+             if (!fobj) break;
+
+             if (elm_widget_is(fobj) && !elm_widget_parent_get(fobj))
+               {
+                  elm_widget_atspi(fobj, is_atspi);
+               }
+          }
+
+        if (!is_atspi)
+          {
+             efl_access_component_highlight_clear(obj);
+          }
+     }
+}
+//
+
 void
 _elm_win_translate(void)
 {
index f61e850..233d69c 100644 (file)
@@ -354,8 +354,6 @@ _naviframe_atspi_bridge_on_disconnect_cb(void *data, const Efl_Event *event EINA
 static void
 _unregister_naviframe_atspi_bridge_callbacks(Elm_Naviframe_Item_Data *it EINA_UNUSED)
 {
-   if (!_elm_config->atspi_mode) return;
-
    Eo *bridge = _elm_atspi_bridge_get();
    if (!bridge) return;
 
@@ -365,11 +363,11 @@ _unregister_naviframe_atspi_bridge_callbacks(Elm_Naviframe_Item_Data *it EINA_UN
 }
 
 static void
-_atspi_expose_title(Elm_Naviframe_Item_Data *it)
+_atspi_expose_title(Elm_Naviframe_Item_Data *it, Eina_Bool is_atspi)
 {
    Eina_Bool connected = EINA_FALSE;
-
-   if (!_elm_config->atspi_mode) return;
+   _unregister_naviframe_atspi_bridge_callbacks(it);
+   if (!is_atspi) return;
 
    Eo *bridge = _elm_atspi_bridge_get();
    if (!bridge) return;
@@ -423,7 +421,8 @@ _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
-   _atspi_expose_title(it);
+   if (_elm_config->atspi_mode)
+     _atspi_expose_title(it, EINA_TRUE);
    //
 }
 
@@ -1588,6 +1587,18 @@ _elm_naviframe_elm_widget_on_access_update(Eo *obj EINA_UNUSED, Elm_Naviframe_Da
      _access_obj_process(it, is_access);
 }
 
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_naviframe_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Eina_Bool is_atspi)
+{
+   Elm_Naviframe_Item_Data *it;
+
+   EINA_INLIST_FOREACH(sd->stack, it)
+     _atspi_expose_title(it, is_atspi);
+}
+//
+
 static void
 _schedule_deferred(Elm_Naviframe_Op *nfo, Elm_Naviframe_Data *sd)
 {
index 7f4c6e2..f2d7f6f 100644 (file)
@@ -333,6 +333,54 @@ _mirrored_set(Evas_Object *obj,
      }
 }
 
+//TIZEN ONLY(20150717): expose title as at-spi object
+static char *
+_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
+{
+   Eina_Strbuf *buf;
+   Elm_Popup_Data *priv = data;
+   char *ret = NULL;
+   if (priv->title_text)
+     {
+        buf = eina_strbuf_new();
+        eina_strbuf_append_printf(buf, "%s, %s", priv->title_text, N_("Title"));
+        ret = eina_strbuf_string_steal(buf);
+        eina_strbuf_free(buf);
+        return strdup(ret);
+     }
+   return NULL;
+}
+//
+
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+static void
+_atspi_expose_title(Eo *obj, Eina_Bool is_atspi)
+{
+   Evas_Object *ao = NULL;
+   ELM_POPUP_DATA_GET(obj, sd);
+
+   if (sd->title_text && is_atspi)
+     {
+        ao = _access_object_get(obj, ACCESS_TITLE_PART);
+        if (!ao)
+          {
+             ao = _elm_access_edje_object_part_object_register
+                   (sd->main_layout, elm_layout_edje_get(sd->main_layout), ACCESS_TITLE_PART);
+             efl_access_role_set(ao, EFL_ACCESS_ROLE_HEADING);
+             _elm_access_callback_set(_elm_access_info_get(ao),
+                                       ELM_ACCESS_INFO, _access_info_cb, sd);
+          }
+     }
+   else
+     {
+        ao = _access_object_get(obj, ACCESS_TITLE_PART);
+        if (ao)
+          _elm_access_object_unregister(ao, NULL);
+     }
+}
+//
+
 static void
 _access_obj_process(Eo *obj, Eina_Bool is_access)
 {
@@ -1045,25 +1093,6 @@ _item_new(Elm_Popup_Item_Data *it)
      }
 }
 
-//TIZEN ONLY(20150717): expose title as at-spi object
-static char *
-_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
-{
-   Eina_Strbuf *buf;
-   Elm_Popup_Data *priv = data;
-   char *ret = NULL;
-   if (priv->title_text)
-     {
-        buf = eina_strbuf_new();
-        eina_strbuf_append_printf(buf, "%s, %s", priv->title_text, N_("Title"));
-        ret = eina_strbuf_string_steal(buf);
-        eina_strbuf_free(buf);
-        return strdup(ret);
-     }
-   return NULL;
-}
-//
-
 static Eina_Bool
 _title_text_set(Evas_Object *obj,
                 const char *text)
@@ -1096,27 +1125,8 @@ _title_text_set(Evas_Object *obj,
 
    //TIZEN ONLY(20150717): expose title as at-spi object
    if (_elm_config->atspi_mode)
-     {
-        if (sd->title_text)
-          {
-             ao = _access_object_get(obj, ACCESS_TITLE_PART);
-             if (!ao)
-               {
-                  ao = _elm_access_edje_object_part_object_register
-                        (sd->main_layout, elm_layout_edje_get(sd->main_layout), ACCESS_TITLE_PART);
-                  efl_access_role_set(ao, EFL_ACCESS_ROLE_HEADING);
-                  _elm_access_callback_set(_elm_access_info_get(ao),
-                                            ELM_ACCESS_INFO, _access_info_cb, sd);
-               }
-          }
-        else
-          {
-                ao = _access_object_get(obj, ACCESS_TITLE_PART);
-                if (ao)
-                    _elm_access_object_unregister(ao, NULL);
-          }
-     }
-   //
+     _atspi_expose_title(obj, EINA_TRUE);
+
    if (sd->title_text)
      elm_layout_signal_emit(sd->main_layout, "elm,state,title,text,visible", "elm");
    else
@@ -1719,6 +1729,15 @@ _elm_popup_elm_widget_on_access_update(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED,
    _access_obj_process(obj, is_access);
 }
 
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_popup_elm_widget_atspi(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, Eina_Bool is_atspi)
+{
+   _atspi_expose_title(obj, is_atspi);
+}
+//
+
 EAPI Evas_Object *
 elm_popup_add(Evas_Object *parent)
 {
index 7cbff49..45a07cf 100644 (file)
@@ -4823,6 +4823,10 @@ _screen_reader_enabled_get(void *data, const Eldbus_Message *msg, Eldbus_Pending
      _a11y_connection_init(data);
    else
      DBG("AT-SPI2 stack not enabled.");
+   //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+   //register/unregister access objects accordingly.
+   _elm_win_atspi(is_enabled);
+   //
 }
 
 static void _bridge_object_register(Eo *bridge, Eo *obj)
@@ -5066,6 +5070,10 @@ _properties_changed_cb(void *data, Eldbus_Proxy *proxy EINA_UNUSED, void *event)
           _a11y_connection_init(bridge);
         else
           _a11y_connection_shutdown(bridge);
+        //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+         //register/unregister access objects accordingly.
+        _elm_win_atspi(val);
+        //
      }
 }
 
index ebbf536..07677e5 100644 (file)
@@ -562,29 +562,27 @@ _unregister_atspi_calendar_bridge_callbacks(Evas_Object *obj)
    Eo *bridge = _elm_atspi_bridge_get();
    if (!bridge) return;
 
-   efl_event_callback_del(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, NULL);
-   efl_event_callback_del(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_connect_cb, NULL);
+   efl_event_callback_del(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, obj);
+   efl_event_callback_del(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_connect_cb, obj);
 }
 
 static void
-_register_smart_callbacks_for_calendar_buttons(Evas_Object *obj)
+_atspi_expose_objects(Evas_Object *obj, Eina_Bool is_atspi)
 {
    Eina_Bool connected = EINA_FALSE;
-
-   if (!_elm_config->atspi_mode) return;
-
-   Eo *bridge = _elm_atspi_bridge_get();
-   if (!bridge) return;
-
-   // If already connected register callendar buttons callbacks
-   connected = elm_obj_atspi_bridge_connected_get(bridge);
-   if (connected)
-     _calendar_atspi_bridge_on_connect_cb(obj, NULL);
-
    // Register bridge connect/disconnect
    _unregister_atspi_calendar_bridge_callbacks(obj);
-   efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, NULL);
-   efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_disconnect_cb, NULL);
+   if (is_atspi)
+     {
+        // If already connected register callendar buttons callbacks
+        Eo *bridge = _elm_atspi_bridge_get();
+        if (!bridge) return;
+        connected = elm_obj_atspi_bridge_connected_get(bridge);
+        if (connected)
+          _calendar_atspi_bridge_on_connect_cb(obj, NULL);
+        efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, obj);
+        efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_disconnect_cb, obj);
+     }
 }
 //
 
@@ -813,7 +811,8 @@ _populate(Evas_Object *obj)
    edje_object_message_signal_process(elm_layout_edje_get(obj));
 
    //TIZEN_ONLY(20151012): Register smart callbacks for calendar buttons.
-   _register_smart_callbacks_for_calendar_buttons(obj);
+   if (_elm_config->atspi_mode)
+     _atspi_expose_objects(obj, EINA_TRUE);
    //
 
    _flush_calendar_composite_elements(obj, sd);
@@ -1736,6 +1735,15 @@ _elm_calendar_elm_widget_on_access_update(Eo *obj EINA_UNUSED, Elm_Calendar_Data
    _access_obj_process(obj, _elm_calendar_smart_focus_next_enable);
 }
 
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_calendar_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Calendar_Data *_pd EINA_UNUSED, Eina_Bool is_atspi)
+{
+   _atspi_expose_objects(obj, is_atspi);
+}
+//
+
 EAPI Evas_Object *
 elm_calendar_add(Evas_Object *parent)
 {
index 81f7c93..7a51f1b 100644 (file)
@@ -416,6 +416,10 @@ class Elm.Calendar (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Efl.Access.Widget.A
       Elm.Widget.on_access_update;
       Elm.Widget.on_focus_update;
       Elm.Widget.widget_event;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Efl.Access.Widget.Action.elm_actions { get; }
    }
    events {
index c4bae2f..2ebaada 100644 (file)
@@ -754,27 +754,37 @@ _unregister_flipselector_atspi_bridge_callbacks(Elm_Flipselector_Data *sd)
 }
 
 static void
-_atspi_expose_flipselector_top_bottom(Elm_Flipselector_Data *sd)
+_atspi_expose_flipselector_top_bottom(Elm_Flipselector_Data *sd, Eina_Bool is_atspi)
 {
    Eina_Bool connected = EINA_FALSE;
 
-   if (!_elm_config->atspi_mode) return;
-
-   Eo *bridge = _elm_atspi_bridge_get();
-   if (!bridge) return;
-
    sd->access_top_button = NULL;
    sd->access_bottom_button = NULL;
 
-   // Expose flipselector buttons
-   connected = elm_obj_atspi_bridge_connected_get(bridge);
-   if (connected)
-     _flipselector_atspi_bridge_on_connect_cb(sd, NULL);
-
-   // Register for ATSPI bridge enable/disable
+   // UnRegister for ATSPI bridge enable/disable
    _unregister_flipselector_atspi_bridge_callbacks(sd);
-   efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _flipselector_atspi_bridge_on_connect_cb, NULL);
-   efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _flipselector_atspi_bridge_on_disconnect_cb, NULL);
+
+   if (is_atspi)
+     {
+        // Expose flipselector buttons
+        Eo *bridge = _elm_atspi_bridge_get();
+        if (!bridge) return;
+        connected = elm_obj_atspi_bridge_connected_get(bridge);
+        if (connected)
+          _flipselector_atspi_bridge_on_connect_cb(sd, NULL);
+
+        efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _flipselector_atspi_bridge_on_connect_cb, NULL);
+        efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _flipselector_atspi_bridge_on_disconnect_cb, NULL);
+     }
+}
+//
+
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_flipselector_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, Eina_Bool is_atspi)
+{
+   _atspi_expose_flipselector_top_bottom(sd, is_atspi);
 }
 //
 
@@ -788,8 +798,9 @@ _elm_flipselector_efl_object_constructor(Eo *obj, Elm_Flipselector_Data *sd)
    efl_access_role_set(obj, EFL_ACCESS_ROLE_LIST);
 
    //TIZEN ONLY(20151012): expose flipselector top/bottom buttons for accessibility tree
-    _atspi_expose_flipselector_top_bottom(sd);
-    //
+   if (_elm_config->atspi_mode)
+     _atspi_expose_flipselector_top_bottom(sd, EINA_TRUE);
+   //
 
    return obj;
 }
index e1ddf5b..e9290da 100644 (file)
@@ -163,6 +163,10 @@ class Elm.Flipselector (Efl.Ui.Layout, Efl.Ui.Range,
       Efl.Object.constructor;
       Elm.Widget.theme_apply;
       Elm.Widget.widget_event;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Efl.Ui.Range.range_min_max { get; set; }
       Efl.Ui.Range.range_step { get; set; }
       Efl.Ui.Range.range_value { get; set; }
index 0cb644f..8074c97 100644 (file)
@@ -69,7 +69,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Efl.Access.Widget.Action)
            This pops an item that is on the top(visible) of the naviframe, makes it
            disappear, then deletes the item. The item that was underneath it on the
            stack will become visible.
-
+           
            When pop transition animation is in progress, new pop operation is blocked until current pop operation
            is complete.
           ]]
@@ -98,7 +98,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Efl.Access.Widget.Action)
 
            The item pushed becomes one page of the naviframe, this item will be
            deleted when it is popped.
-
+           
            When push transition animation is in progress, pop operation is blocked until push is complete.
 
            The following styles are available for this item:
@@ -148,6 +148,10 @@ class Elm.Naviframe (Efl.Ui.Layout, Efl.Access.Widget.Action)
       Efl.Ui.Translatable.translation_update;
       Elm.Widget.theme_apply;
       Elm.Widget.widget_event;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Efl.Layout.Signal.signal_emit;
       Efl.Access.Widget.Action.elm_actions { get; }
       Elm.Widget.resize_object { set; }
index cee2467..7288f4e 100644 (file)
@@ -177,6 +177,10 @@ class Elm.Popup (Efl.Ui.Layout, Efl.Ui.Focus.Layer, Efl.Access.Widget.Action)
       //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
       Elm.Widget.part_access_object_get;
       //
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Efl.Layout.Signal.signal_emit;
       Efl.Access.Widget.Action.elm_actions { get; }
       Efl.Access.state_set { get; }
index a332b21..2eeeb29 100644 (file)
@@ -522,6 +522,10 @@ void                 _elm_win_shutdown(void);
 void                 _elm_win_rescale(Elm_Theme *th,
                                       Eina_Bool use_theme);
 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);
+//
 void                 _elm_win_translate(void);
 void                 _elm_win_focus_reconfigure(void);
 void                 _elm_win_standard_init(Eo *win);
index fe7a4d5..cc593b0 100644 (file)
@@ -2890,6 +2890,33 @@ _elm_widget_access_info_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
    return sd->access_info;
 }
 
+//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_atspi)
+{
+   const Eina_List *l;
+   Evas_Object *child;
+   Eina_Bool ret = EINA_TRUE;
+
+   API_ENTRY return EINA_FALSE;
+   EINA_LIST_FOREACH(sd->subobjs, l, child)
+     {
+        if (elm_widget_is(child))
+          ret &= elm_widget_atspi(child, is_atspi);
+     }
+   elm_obj_widget_atspi(obj, is_atspi);
+
+   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)
+{
+}
+//
+
 EAPI Elm_Theme *
 elm_widget_theme_get(const Evas_Object *obj)
 {
index 427161d..1b86827 100644 (file)
@@ -236,6 +236,17 @@ abstract Elm.Widget (Efl.Canvas.Group, Efl.Access,
          legacy: null; /* FIXME: legacy API does extra work */
       }
 
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      atspi {
+         [['Virtual' function on the widget being set access.]]
+         params {
+            @in is_atspi: bool;
+         }
+         legacy: null;
+      }
+      //
+
       /* Internal hooks. */
       widget_sub_object_add @protected {
          [[Virtual function handling sub objects being added.
index c362872..3f63469 100644 (file)
@@ -655,6 +655,10 @@ struct _Elm_Widget_Item_Data
 EAPI Evas_Object     *elm_widget_add(Evas_Smart *, Evas_Object *);
 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_atspi);
+//
 EAPI Efl_Ui_Theme_Apply  elm_widget_theme(Evas_Object *obj);
 EAPI void             elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force);
 EAPI void             elm_widget_on_show_region_hook_set(Evas_Object *obj, void *data, Efl_Ui_Scrollable_On_Show_Region func, Eina_Free_Cb data_free);