[Atspi]: When atspi mode is dynamically switched on/off, register/unregister access 82/83082/13
authorShilpa Singh <shilpa.singh@samsung.com>
Tue, 9 Aug 2016 06:30:33 +0000 (12:00 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 2 Sep 2016 05:58:58 +0000 (22:58 -0700)
objects accordingly. naviframe, popup, calendar,flipselector.

Change-Id: Ia4d1caa8342f6bbbdd5109627abdff8c720567ea
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
17 files changed:
src/lib/elc_multibuttonentry.c
src/lib/elc_naviframe.c
src/lib/elc_popup.c
src/lib/elm_atspi_bridge.c
src/lib/elm_calendar.c
src/lib/elm_calendar.eo
src/lib/elm_config.c
src/lib/elm_flipselector.c
src/lib/elm_flipselector.eo
src/lib/elm_multibuttonentry.eo
src/lib/elm_naviframe.eo
src/lib/elm_popup.eo
src/lib/elm_priv.h
src/lib/elm_widget.c
src/lib/elm_widget.eo
src/lib/elm_widget.h
src/lib/elm_win.c

index 29fb6d7..ca28ab1 100644 (file)
@@ -721,6 +721,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);
+              elm_atspi_accessible_role_set(sd->label_access, ELM_ATSPI_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)
+     {
+        elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
+        elm_interface_atspi_accessible_added(eo_item);
+     }
+   else
+     elm_interface_atspi_accessible_children_changed_del_signal_emit(WIDGET(item), eo_item);
+}
+//
+
 EOLIAN static Eo *
 _elm_multibuttonentry_item_eo_base_constructor(Eo *eo_item, Elm_Multibuttonentry_Item_Data *item)
 {
@@ -937,13 +986,12 @@ _item_new(Elm_Multibuttonentry_Data *sd,
      }
    eo_do(obj, eo_event_callback_call
      (ELM_MULTIBUTTONENTRY_EVENT_ITEM_ADDED, eo_item));
-   if (_elm_config->atspi_mode)
-     {
-        elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
-        elm_interface_atspi_accessible_added(eo_item);
-     }
-
 
+   //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+   //register/unregister access objects accordingly.
+   if (_elm_config->atspi_mode)
+     _atspi_multibuttonentry_item_register(obj, eo_item, EINA_TRUE);
+   //
    return eo_item;
 }
 
@@ -1435,13 +1483,6 @@ _box_layout_cb(Evas_Object *o,
      }
 }
 
-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, Elm_Multibuttonentry_Data *sd)
 {
@@ -1477,19 +1518,7 @@ _view_init(Evas_Object *obj, Elm_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);
-            elm_atspi_accessible_role_set(sd->label_access, ELM_ATSPI_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 = elm_entry_add(obj);
@@ -1747,6 +1776,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
 _elm_multibuttonentry_elm_widget_access(Eo *obj, Elm_Multibuttonentry_Data *sd EINA_UNUSED, Eina_Bool acs)
 {
@@ -1754,6 +1802,15 @@ _elm_multibuttonentry_elm_widget_access(Eo *obj, Elm_Multibuttonentry_Data *sd E
    _access_obj_process(obj, _elm_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 ca922a8..4234a80 100644 (file)
@@ -365,8 +365,6 @@ _naviframe_atspi_bridge_on_disconnect_cb(void *data, Eo *obj EINA_UNUSED, const
 static void
 _unregister_naviframe_atspi_bridge_callbacks(Elm_Naviframe_Item_Data *it)
 {
-   if (!_elm_config->atspi_mode) return;
-
    eo_do(_elm_atspi_bridge_get(),
          eo_event_callback_del(ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _naviframe_atspi_bridge_on_connect_cb, it));
    eo_do(_elm_atspi_bridge_get(),
@@ -374,11 +372,11 @@ _unregister_naviframe_atspi_bridge_callbacks(Elm_Naviframe_Item_Data *it)
 }
 
 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;
 
    // If bridge is connected expose it now
    eo_do(_elm_atspi_bridge_get(), connected = elm_obj_atspi_bridge_connected_get());
@@ -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);
    //
 }
 
@@ -1650,6 +1649,18 @@ _elm_naviframe_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Ei
      _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
 _item_push_helper(Elm_Naviframe_Item_Data *item)
 {
index d4170ec..fe53865 100644 (file)
@@ -360,6 +360,54 @@ _mirrored_set(Evas_Object *obj,
    elm_object_mirrored_set(sd->notify, rtl);
 }
 
+//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);
+             elm_atspi_accessible_role_set(ao, ELM_ATSPI_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)
 {
@@ -1115,25 +1163,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)
@@ -1166,26 +1195,7 @@ _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);
-                  elm_atspi_accessible_role_set(ao, ELM_ATSPI_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");
@@ -1916,6 +1926,15 @@ _elm_popup_elm_widget_access(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, Eina_Bool
    _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 3b27fe0..d1b7d05 100644 (file)
@@ -4713,6 +4713,7 @@ static void _a11y_connection_init(Eo *bridge)
    if (p)
       pd->pending_requests = eina_list_append(pd->pending_requests, p);
 }
+
 static void
 _screen_reader_enabled_get(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
 {
@@ -4743,6 +4744,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)
@@ -4958,6 +4963,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 567e284..1d5947b 100644 (file)
@@ -711,23 +711,24 @@ _unregister_atspi_calendar_bridge_callbacks(Evas_Object *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;
-
-   // If already connected register callendar buttons callbacks
-   eo_do(_elm_atspi_bridge_get(), connected = elm_obj_atspi_bridge_connected_get());
-   if (connected)
-     _calendar_atspi_bridge_on_connect_cb(obj, NULL, NULL, NULL);
-
    // Register bridge connect/disconnect
    _unregister_atspi_calendar_bridge_callbacks(obj);
-   eo_do(_elm_atspi_bridge_get(),
-        eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, obj));
-   eo_do(_elm_atspi_bridge_get(),
-        eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_disconnect_cb, obj));
+   if (is_atspi)
+     {
+        // If already connected register callendar buttons callbacks
+        eo_do(_elm_atspi_bridge_get(), connected = elm_obj_atspi_bridge_connected_get());
+        if (connected)
+          _calendar_atspi_bridge_on_connect_cb(obj, NULL, NULL, NULL);
+        eo_do(_elm_atspi_bridge_get(),
+              eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_CONNECTED,
+                                    _calendar_atspi_bridge_on_connect_cb, obj));
+        eo_do(_elm_atspi_bridge_get(),
+             eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED,
+                                   _calendar_atspi_bridge_on_disconnect_cb, obj));
+     }
 }
 //
 
@@ -937,7 +938,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);
    //
 }
 
@@ -1847,6 +1849,15 @@ _elm_calendar_elm_widget_access(Eo *obj EINA_UNUSED, Elm_Calendar_Data *_pd EINA
    _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 d494e6a..c32e586 100644 (file)
@@ -419,6 +419,10 @@ class Elm.Calendar (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
       Elm.Widget.focus_next_manager_is;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.access;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Elm.Widget.focus_next;
       Elm.Widget.event;
       Elm.Layout.sizing_eval;
index ca79388..ac72963 100644 (file)
@@ -1015,7 +1015,6 @@ void _elm_config_atspi_mode_set(Eina_Bool is_enabled)
    if ((_elm_config->atspi_mode == is_enabled) && (connected == is_enabled)) return;
    //
    _elm_config->atspi_mode = is_enabled;
-
    if (!is_enabled) _elm_atspi_bridge_shutdown();
    else _elm_atspi_bridge_init();
 }
index c34c460..17d2f44 100644 (file)
@@ -663,26 +663,39 @@ _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;
-
    sd->access_top_button = NULL;
    sd->access_bottom_button = NULL;
 
-   // Expose flipselector buttons
-   eo_do(_elm_atspi_bridge_get(), connected = elm_obj_atspi_bridge_connected_get());
-   if (connected)
-     _flipselector_atspi_bridge_on_connect_cb(sd, NULL, NULL, NULL);
-
-   // Register for ATSPI bridge enable/disable
+   // UnRegister for ATSPI bridge enable/disable
    _unregister_flipselector_atspi_bridge_callbacks(sd);
-   eo_do(_elm_atspi_bridge_get(),
-        eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _flipselector_atspi_bridge_on_connect_cb, sd));
-   eo_do(_elm_atspi_bridge_get(),
-        eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _flipselector_atspi_bridge_on_disconnect_cb, sd));
+
+   if (is_atspi)
+     {
+        // Expose flipselector buttons
+        eo_do(_elm_atspi_bridge_get(), connected = elm_obj_atspi_bridge_connected_get());
+        if (connected)
+          _flipselector_atspi_bridge_on_connect_cb(sd, NULL, NULL, NULL);
+
+        eo_do(_elm_atspi_bridge_get(),
+             eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_CONNECTED,
+                                   _flipselector_atspi_bridge_on_connect_cb, sd));
+        eo_do(_elm_atspi_bridge_get(),
+             eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED,
+                                   _flipselector_atspi_bridge_on_disconnect_cb, sd));
+     }
+}
+//
+
+//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);
 }
 //
 
@@ -697,7 +710,8 @@ _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
-   _atspi_expose_flipselector_top_bottom(sd);
+   if (_elm_config->atspi_mode)
+     _atspi_expose_flipselector_top_bottom(sd, EINA_TRUE);
    //
    return obj;
 }
index 1ec54b2..8300e67 100644 (file)
@@ -163,6 +163,10 @@ class Elm.Flipselector (Elm.Layout, Elm_Interface_Atspi_Widget_Action,
       Elm.Widget.focus_next_manager_is;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.event;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Elm.Layout.sizing_eval;
       Elm_Interface_Atspi_Widget_Action.elm_actions.get;
       ///TIZEN_ONLY(20150716) : fix accessible_at_point getter
index 61c41dd..505bc0f 100644 (file)
@@ -177,6 +177,10 @@ class Elm.Multibuttonentry (Elm.Layout)
       Elm.Widget.focus_next_manager_is;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.access;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Elm.Widget.focus_next;
       Elm.Widget.on_focus;
       Elm.Widget.translate;
index 0978797..a7bcef4 100644 (file)
@@ -147,6 +147,10 @@ class Elm.Naviframe (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
       Elm.Widget.focus_next_manager_is;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.access;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Elm.Widget.focus_next;
       Elm.Widget.translate;
       Elm.Widget.theme_apply;
index d28c1d7..c778346 100644 (file)
@@ -170,6 +170,10 @@ class Elm.Popup (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
       Elm.Widget.theme_apply;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.access;
+      //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Elm.Widget.focus_next;
       Elm.Widget.parent.set;
       Elm.Widget.translate;
index f04d8ba..61ab020 100644 (file)
@@ -386,6 +386,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);
 
index faef26a..af2c8df 100644 (file)
@@ -921,6 +921,33 @@ elm_widget_access(Evas_Object *obj,
    return ret;
 }
 
+//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);
+     }
+   eo_do(obj, elm_obj_widget_atspi(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)
+{
+}
+//
+
 EOLIAN static void
 _elm_widget_access(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Eina_Bool is_access EINA_UNUSED)
 {
index 043a9a6..c6fb204 100644 (file)
@@ -516,6 +516,16 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible,
          }
          legacy: null;
       }
+      //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;
+      }
+      //
       cursor_del {
          params {
             @in cur: Elm_Cursor *;
index 740d2a4..cdf9f6a 100644 (file)
@@ -688,6 +688,10 @@ EAPI Evas_Object     *elm_widget_add(Evas_Smart *, Evas_Object *);
 EAPI void             elm_widget_parent_set(Evas_Object *, 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_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);
 EAPI void             elm_widget_translate(Evas_Object *obj);
index e403dac..d6de7ce 100644 (file)
@@ -2917,6 +2917,50 @@ _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_Bool highlight = EINA_FALSE;
+
+   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)
+          {
+             eo_do(obj, highlight = elm_interface_atspi_component_highlight_clear());
+          }
+     }
+}
+//
+
 void
 _elm_win_translate(void)
 {