[atspi] Expose access object only when brigde is connected. 05/91305/4
authorPrasoon Singh <prasoon.16@samsung.com>
Thu, 6 Oct 2016 15:19:24 +0000 (20:49 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 7 Oct 2016 12:43:56 +0000 (05:43 -0700)
Change-Id: Ibfda3df165475d72395105daf80710e056d1a865

src/lib/elc_multibuttonentry.c
src/lib/elc_naviframe.c
src/lib/elc_popup.c
src/lib/elm_calendar.c
src/lib/elm_flipselector.c
src/lib/elm_priv.h

index ca28ab14e8c40cab91cd395a0e4764821b0cac28..daa061a9afd372be6069796b97c2a11df76e6a32 100644 (file)
@@ -989,7 +989,7 @@ _item_new(Elm_Multibuttonentry_Data *sd,
 
    //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
    //register/unregister access objects accordingly.
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      _atspi_multibuttonentry_item_register(obj, eo_item, EINA_TRUE);
    //
    return eo_item;
@@ -1517,7 +1517,7 @@ _view_init(Evas_Object *obj, Elm_Multibuttonentry_Data *sd)
      _access_multibuttonentry_label_register(obj, EINA_TRUE);
 
    //TIZEN_ONLY(20160527) : expose label as at-spi object
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      _atspi_multibuttonentry_label_register(obj, EINA_TRUE);
    ///
 
index face85c0824ec95e19d9545fe3e1927ee175abe6..a3c1b759700fec5dbbb6a33f1de6b637b7205efc 100644 (file)
@@ -386,7 +386,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_config->atspi_mode)
+   if (_elm_atspi_enabled())
      _atspi_expose_title(it, EINA_TRUE);
    //
 }
index be0176a938593fa03e03c0f717dba24870349ead..47687f70d8dd163e86eee6c0b57a8bb980f1bab2 100644 (file)
@@ -1204,7 +1204,7 @@ _title_text_set(Evas_Object *obj,
      }
 
    //TIZEN ONLY(20150717): expose title as at-spi object
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      _atspi_expose_title(obj, EINA_TRUE);
    //
    if (sd->title_text)
index 91dcb984402b9d4c6eaa169d47d738d6b4b8ed70..4a7dc650beedadfd8a9e6204b02b6a05f98a37cf 100644 (file)
@@ -912,7 +912,7 @@ _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_config->atspi_mode)
+   if (_elm_atspi_enabled())
      _atspi_expose_objects(obj, EINA_TRUE);
    //
 }
index 1bd6da8f2fb8a9bb41a747668ec2991235d168b1..bdf559621e2375963acec169760751310b6c933d 100644 (file)
@@ -666,7 +666,7 @@ _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_config->atspi_mode)
+   if (_elm_atspi_enabled())
      _atspi_expose_flipselector_top_bottom(sd, EINA_TRUE);
    //
    return obj;
index 3032819a1a47b625e3b2098145f98256f02e0a7d..7f71cb79229e5b09a1a716d787e3efcd8ce76fa7 100644 (file)
@@ -610,6 +610,18 @@ _elm_dgettext(const char *string)
 
 #endif
 
+//TIZEN_ONLY(20160710): Expose access object only when brigde is connected.
+static inline Eina_Bool
+_elm_atspi_enabled()
+{
+    Eo *bridge = NULL;
+    Eina_Bool ret = EINA_FALSE;
+    if (_elm_config->atspi_mode && (bridge = _elm_atspi_bridge_get()))
+      eo_do(bridge, ret = elm_obj_atspi_bridge_connected_get());
+    return ret;
+}
+//
+
 /* Used by the paste handler */
 void   _elm_entry_entry_paste(Evas_Object *obj, const char *entry);