[ATSPI]: 1. As ATSPI mode is always on, check for bridge connect as well 09/91909/8
authorShilpa Singh <shilpa.singh@samsung.com>
Wed, 12 Oct 2016 07:04:29 +0000 (12:34 +0530)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 13 Oct 2016 05:40:10 +0000 (22:40 -0700)
2. Use common _elm_atspi_enabled func instead of internal func

Change-Id: Ie30969dcda70bc46194577aa7b55ae520ffc5773

17 files changed:
src/lib/elc_multibuttonentry.c
src/lib/elm_check.c
src/lib/elm_colorselector.c
src/lib/elm_conform.c
src/lib/elm_conformant.eo
src/lib/elm_entry.c
src/lib/elm_flipselector.c
src/lib/elm_gengrid.c
src/lib/elm_index.c
src/lib/elm_layout.c
src/lib/elm_list.c
src/lib/elm_radio.c
src/lib/elm_spinner.c
src/lib/elm_toolbar.c
src/lib/elm_widget.c
src/lib/elm_win.c
src/mobile_lib/elm_genlist.c

index daa061a9afd372be6069796b97c2a11df76e6a32..2e80192f12b018b67d831146caab832cdea48d31 100644 (file)
@@ -520,7 +520,7 @@ _on_item_clicked(void *data,
 
    _item_select(WIDGET(it), it);
    //TIZEN_ONLY(20160701): send selected signal
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(eo_it,
                                                               ELM_ATSPI_STATE_CHECKED,
                                                               EINA_TRUE);
@@ -667,7 +667,7 @@ EOLIAN static void
 _elm_multibuttonentry_item_eo_base_destructor(Eo *eo_it,
                                               Elm_Multibuttonentry_Item_Data *it)
 {
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_children_changed_del_signal_emit(WIDGET(it), eo_it);
    _item_del(it);
 
index eb06d713044f4c49f9cf7b213e590fbfef4602e8..22bf8bc185d86542d7fab9f4784ea5356921ed34 100644 (file)
@@ -80,7 +80,7 @@ _activate(Evas_Object *obj)
 
    eo_do(obj, eo_event_callback_call(ELM_CHECK_EVENT_CHANGED, NULL));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
        elm_interface_atspi_accessible_state_changed_signal_emit(obj,
                                                                 ELM_ATSPI_STATE_CHECKED,
                                                                 sd->state);
@@ -289,7 +289,7 @@ _on_check_off(void *data,
    elm_layout_signal_emit(obj, "elm,state,check,off", "elm");
    eo_do(obj, eo_event_callback_call(ELM_CHECK_EVENT_CHANGED, NULL));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
        elm_interface_atspi_accessible_state_changed_signal_emit(data,
                                                                 ELM_ATSPI_STATE_CHECKED,
                                                                 sd->state);
@@ -310,7 +310,7 @@ _on_check_on(void *data,
    elm_layout_signal_emit(obj, "elm,state,check,on", "elm");
    eo_do(obj, eo_event_callback_call(ELM_CHECK_EVENT_CHANGED, NULL));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
        elm_interface_atspi_accessible_state_changed_signal_emit(data,
                                                                 ELM_ATSPI_STATE_CHECKED,
                                                                 sd->state);
index e3a9d96ea9f5f03635c749abcf1090108028d888..b03194227512ee852c3fb9407e98c35a22a8cc0c 100644 (file)
@@ -1772,7 +1772,7 @@ _item_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
 
    elm_object_signal_emit(VIEW(item), "elm,state,selected", "elm");
    //TIZEN_ONLY(20160701): send selected signal
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(obj,
                                                               ELM_ATSPI_STATE_CHECKED,
                                                               EINA_TRUE);
index 170388c54e7775bb5b07e3d6b93a25c0e707ace9..05203acddcd68d713c0f911a46ac58ac3b3f5855 100644 (file)
@@ -224,7 +224,7 @@ _conformant_part_sizing_eval(Evas_Object *obj,
 #endif
 //
         DBG("[KEYPAD]: size(%d,%d, %dx%d).", sx, sy, sw, sh);
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           {
              Evas_Object *access;
              access = evas_object_data_get(sd->virtualkeypad, "_part_access_obj");
@@ -273,54 +273,31 @@ _conformant_part_sizing_eval(Evas_Object *obj,
      }
 }
 
-//TIZEN ONLY(20160628): expose virtual keypad rect as at-spi object
-static Eina_Bool
-_conformant_atspi_bridge_on_connect_cb(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
+static void
+_atspi_expose_keypad_area(Evas_Object *obj, Eina_Bool is_atspi)
 {
-   ELM_CONFORMANT_DATA_GET(data, sd);
+   ELM_CONFORMANT_DATA_GET(obj, sd);
    Evas_Object *access;
 
    if (sd->virtualkeypad)
      {
-        access = elm_access_object_register(sd->virtualkeypad, data);
-        elm_atspi_accessible_role_set(access, ELM_ATSPI_ROLE_INPUT_METHOD_WINDOW);
+        if (is_atspi)
+          {
+             access = elm_access_object_register(sd->virtualkeypad, obj);
+             elm_atspi_accessible_role_set(access, ELM_ATSPI_ROLE_INPUT_METHOD_WINDOW);
+          }
+        else
+           elm_access_object_unregister(sd->virtualkeypad);
      }
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_conformant_atspi_bridge_on_disconnect_cb(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   ELM_CONFORMANT_DATA_GET(data, sd);
-   elm_access_object_unregister(sd->virtualkeypad);
-   return EINA_TRUE;
-}
-
-static void
-_unregister_conformant_atspi_bridge_callbacks(Evas_Object *obj)
-{
-   if (!_elm_config->atspi_mode) return;
-   eo_do(_elm_atspi_bridge_get(),
-         eo_event_callback_del(ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _conformant_atspi_bridge_on_connect_cb, obj));
-   eo_do(_elm_atspi_bridge_get(),
-         eo_event_callback_del(ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _conformant_atspi_bridge_on_disconnect_cb, obj));
 }
+//
 
-static void
-_atspi_expose_keypad_area(Evas_Object *obj)
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_conformant_elm_widget_atspi(Eo *obj, Elm_Conformant_Data *_pd EINA_UNUSED, Eina_Bool is_atspi)
 {
-   Eina_Bool connected = EINA_FALSE;
-   // If bridge is connected expose it now
-   eo_do(_elm_atspi_bridge_get(), connected = elm_obj_atspi_bridge_connected_get());
-   if (connected)
-     _conformant_atspi_bridge_on_connect_cb(obj, NULL, NULL, NULL);
-
-   // Register for bridge connect/disconnect
-   _unregister_conformant_atspi_bridge_callbacks(obj);
-   eo_do(_elm_atspi_bridge_get(),
-        eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _conformant_atspi_bridge_on_connect_cb, obj));
-   eo_do(_elm_atspi_bridge_get(),
-         eo_event_callback_add(ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _conformant_atspi_bridge_on_disconnect_cb, obj));
+   _atspi_expose_keypad_area(obj, is_atspi);
 }
 //
 
@@ -349,8 +326,8 @@ _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_config->atspi_mode)
-               _atspi_expose_keypad_area(obj);
+             if (_elm_atspi_enabled())
+               _atspi_expose_keypad_area(obj, EINA_TRUE);
              //
           }
         // TIZEN_ONLY(20160509): support different thing in Tizen 3.0
@@ -1186,7 +1163,7 @@ _on_conformant_changed(void *data,
              eo_do(data, eo_event_callback_call(
                    ELM_CONFORMANT_EVENT_VIRTUALKEYPAD_STATE_OFF, NULL));
              //TIZEN ONLY(20160628): update geometry of keyboard to screen-reader
-             if (_elm_config->atspi_mode)
+             if (_elm_atspi_enabled())
                {
                   Evas_Object *access;
                   access = evas_object_data_get(sd->virtualkeypad, "_part_access_obj");
@@ -1264,9 +1241,6 @@ _elm_conformant_evas_object_smart_del(Eo *obj, Elm_Conformant_Data *sd)
         sd->indicator_effect_timer = NULL ;
      }
    //END
-   // TIZEN_ONLY(20160628): Unregister callbacks for ATSPI bridge enable/disable
-   _unregister_conformant_atspi_bridge_callbacks(obj);
-   //
    eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
 }
 
index 98023c77cc529b5354d4b328d618823df40969b8..dfbb342a90c285dd209880a2e3dcb379907bd0e7 100644 (file)
@@ -8,6 +8,10 @@ class Elm.Conformant (Elm.Layout)
       Evas.Object_Smart.del;
       Elm.Widget.parent.set;
       Elm.Widget.theme_apply;
+      //TIZEN_ONLY(20161012): When atspi mode is dynamically switched on/off,
+      //register/unregister access objects accordingly.
+      Elm.Widget.atspi;
+      //
       Elm.Layout.content_aliases.get;
    }
    events {
index e6b319551c837f7745e426606682fdc41e943a27..8cc4db1f8d032269cbb39cf7b3acf9751b343293 100644 (file)
@@ -2198,7 +2198,7 @@ _elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd, Elm_Object_Item *ite
             !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text"))
           elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
         eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_FOCUSED, NULL));
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
         _return_key_enabled_check(obj);
         _validate(obj);
@@ -2219,7 +2219,7 @@ _elm_entry_elm_widget_on_focus(Eo *obj, Elm_Entry_Data *sd, Elm_Object_Item *ite
             !edje_object_part_text_imf_context_get(sd->entry_edje, "elm.text"))
           elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
         eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_UNFOCUSED, NULL));
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
         // TIZEN ONLY (20150201): Add cursor handler
         if (sd->cursor_handler_shown)
@@ -3409,7 +3409,7 @@ _entry_changed_user_signal_cb(void *data,
      {
         eo_do(data, eo_event_callback_call(ELM_ENTRY_EVENT_CHANGED_USER, NULL));
      }
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         Elm_Atspi_Text_Change_Info atspi_info;
         if (edje_info && edje_info->insert)
@@ -3440,7 +3440,7 @@ _entry_preedit_changed_signal_cb(void *data,
                                   edje_object_signal_callback_extra_data_get();
    _entry_changed_handle(data, ELM_ENTRY_EVENT_PREEDIT_CHANGED);
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         Elm_Atspi_Text_Change_Info atspi_info;
         if (edje_info && edje_info->insert)
@@ -3543,7 +3543,7 @@ _entry_selection_changed_signal_cb(void *data,
    //_selection_store(ELM_SEL_TYPE_PRIMARY, data);
    //
    _update_selection_handler(data);
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, NULL));
 }
 
@@ -3653,7 +3653,7 @@ _entry_cursor_changed_signal_cb(void *data,
    if (elm_widget_focus_get(data))
      edje_object_signal_emit(sd->entry_edje, "elm,action,show,cursor", "elm");
    _cursor_geometry_recalc(data);
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL));
 }
 
@@ -3665,7 +3665,7 @@ _entry_cursor_changed_manual_signal_cb(void *data,
 {
    eo_do(data, eo_event_callback_call
      (ELM_ENTRY_EVENT_CURSOR_CHANGED_MANUAL, NULL));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL));
    // TIZEN ONLY (20150715): update cursor handler when cursor pos changes
    ELM_ENTRY_DATA_GET(data, sd);
index bdf559621e2375963acec169760751310b6c933d..a4167b1d3b0c538bc9f980fbc5a794de18f98b24 100644 (file)
@@ -244,7 +244,7 @@ _on_item_changed(Elm_Flipselector_Data *sd)
      (EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, eo_item));
 
    //TIZEN ONLY(2015090): expose flipselector top/bottom buttons for accessibility tree
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
        if (sd->access_top_button)
          {
index da1698c15279d1d9d79bb10e4a1833f8dde50b5e..b2a2e8fd671616272c51a7461d73aa0c679fc105 100644 (file)
@@ -100,7 +100,6 @@ static int _is_item_in_viewport(int viewport_x, int viewport_y, int viewport_w,
                                 int obj_x, int obj_y, int obj_w, int obj_h);
 //TIZEN_ONLY (20160914) : Accessibility: sort children list according to their x,y position
 static int _sort_items(const void *data1, const void *data2);
-static Eina_Bool _atspi_enabled();
 //
 
 static const Elm_Action key_actions[] = {
@@ -571,7 +570,7 @@ _item_unselect(Elm_Gen_Item *it)
         sd->selected = eina_list_remove(sd->selected, eo_it);
         eo_do(WIDGET(it), eo_event_callback_call
           (EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, eo_it));
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
      }
 }
@@ -885,7 +884,7 @@ _item_text_realize(Elm_Gen_Item *it,
           {
              edje_object_part_text_set(target, key, "");
           }
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_name_changed_signal_emit(EO_OBJ(it));
      }
 }
@@ -940,7 +939,7 @@ _item_content_realize(Elm_Gen_Item *it,
              if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
                elm_widget_disabled_set(content, EINA_TRUE);
 
-             if (_elm_config->atspi_mode && eo_isa(content, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
+             if (_elm_atspi_enabled() && eo_isa(content, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
                eo_do(content, elm_interface_atspi_accessible_parent_set(EO_OBJ(it)));
           }
      }
@@ -1088,7 +1087,7 @@ _elm_gengrid_item_unrealize(Elm_Gen_Item *it,
    evas_event_thaw(evas_object_evas_get(WIDGET(it)));
    evas_event_thaw_eval(evas_object_evas_get(WIDGET(it)));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         elm_interface_atspi_accessible_removed(EO_OBJ(it));
         elm_interface_atspi_accessible_children_changed_del_signal_emit(WIDGET(it), EO_OBJ(it));
@@ -1428,7 +1427,7 @@ _item_realize(Elm_Gen_Item *it)
    /* access */
    if (_elm_config->access_mode) _access_widget_item_register(it);
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         elm_interface_atspi_accessible_added(EO_OBJ(it));
         elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
@@ -2037,7 +2036,7 @@ _elm_gengrid_pan_evas_object_smart_calculate(Eo *obj EINA_UNUSED, Elm_Gengrid_Pa
      _elm_widget_focus_highlight_start(psd->wobj);
 
    //TIZEN_ONLY (20160914) : Accessibility: sort children list according to their x,y position
-   if (_atspi_enabled() && sd->horizontal)
+   if (_elm_atspi_enabled() && sd->horizontal)
      sd->atspi_children = eina_list_sort(sd->atspi_children, eina_list_count(sd->atspi_children), _sort_items);
    //
 
@@ -2141,7 +2140,7 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it)
      }
 
    eo_do(obj, eo_event_callback_call(ELM_GENGRID_EVENT_ITEM_FOCUSED, eo_it));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
 }
 
@@ -2171,7 +2170,7 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it)
 
    sd->focused_item = NULL;
    eo_do(obj, eo_event_callback_call(ELM_GENGRID_EVENT_ITEM_UNFOCUSED, eo_it));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
 }
 
@@ -4261,7 +4260,7 @@ _item_select(Elm_Gen_Item *it)
    if (it->generation == sd->generation)
      {
         eo_do(WIDGET(it), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, eo_it));
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
         elm_object_item_focus_set(eo_it, EINA_TRUE);
      }
@@ -6166,16 +6165,6 @@ _elm_gengrid_elm_interface_atspi_selection_child_deselect(Eo *obj EINA_UNUSED, E
    return EINA_FALSE;
 }
 
-// TIZEN_ONLY (20151009) : Accessibility: updated highlight change during gengrid scroll
-static Eina_Bool _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;
-}
-
 static int _is_item_in_viewport(int viewport_x, int viewport_y, int viewport_w, int viewport_h,
                                 int obj_x, int obj_y, int obj_w, int obj_h)
 {
@@ -6194,7 +6183,7 @@ static int _is_item_in_viewport(int viewport_x, int viewport_y, int viewport_w,
 EOLIAN static void
 _elm_gengrid_elm_interface_scrollable_content_pos_set(Eo *obj, Elm_Gengrid_Data *sd EINA_UNUSED, Evas_Coord x, Evas_Coord y, Eina_Bool sig)
 {
-   if (!_atspi_enabled())
+   if (!_elm_atspi_enabled())
      {
        eo_do_super(obj, MY_CLASS, elm_interface_scrollable_content_pos_set(x,y,sig));
        return;
index d937c6e85584610fbbd3532fa98d42edf918e283..4cb88fe9141b59650473e90a1982f03c0b3b6f0a 100644 (file)
@@ -124,17 +124,6 @@ _access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
    return NULL;
 }
 
-//TIZEN_ONLY(20160519): improve index atspi support
-static Eina_Bool _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;
-}
-//
-
 EOLIAN static Evas_Object*
 _elm_index_item_elm_widget_item_access_register(Eo *eo_item, Elm_Index_Item_Data *it)
 {
@@ -1405,7 +1394,7 @@ _elm_index_item_selected_set(Eo *eo_it,
              edje_object_signal_emit(VIEW(it_inactive),
                                      "elm,state,inactive", "elm");
              //TIZEN_ONLY(20160519): improve index atspi support
-             if (_atspi_enabled()) elm_layout_signal_emit(obj, "elm,indicator,state,inactive", "elm");
+             if (_elm_atspi_enabled()) elm_layout_signal_emit(obj, "elm,indicator,state,inactive", "elm");
              //
              edje_object_message_signal_process(VIEW(it_inactive));
           }
@@ -1419,7 +1408,7 @@ _elm_index_item_selected_set(Eo *eo_it,
         edje_object_signal_emit(VIEW(it_active), "elm,state,active", "elm");
 
         //TIZEN_ONLY(20160519): improve index atspi support
-        if (_atspi_enabled())
+        if (_elm_atspi_enabled())
           {
              elm_layout_text_set(obj, "elm.text", strdup(it_sel->letter));
              elm_layout_signal_emit(obj, "elm,indicator,state,active", "elm");
@@ -1483,7 +1472,7 @@ _elm_index_item_append(Eo *obj, Elm_Index_Data *sd, const char *letter, Evas_Sma
    ELM_INDEX_ITEM_DATA_GET(eo_item, it);
    VIEW(it) = edje_object_add(evas_object_evas_get(obj));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         elm_interface_atspi_accessible_added(eo_item);
         elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
index d290cf32b44b7a3c6631a0b36205b6b0bc76dfb4..8743ebd4b2f43a0724cac0c9deb57a241e2afbb2 100644 (file)
@@ -413,7 +413,7 @@ _elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED,
         elm_layout_signal_emit(obj, "elm,action,focus", "elm");
         evas_object_focus_set(wd->resize_obj, EINA_TRUE);
         eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_FOCUSED, NULL));
-        if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
+        if (_elm_atspi_enabled() && !elm_widget_child_can_focus_get(obj))
           elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
      }
    else
@@ -421,7 +421,7 @@ _elm_layout_elm_widget_on_focus(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED,
         elm_layout_signal_emit(obj, "elm,action,unfocus", "elm");
         evas_object_focus_set(wd->resize_obj, EINA_FALSE);
         eo_do(obj, eo_event_callback_call(ELM_WIDGET_EVENT_UNFOCUSED, NULL));
-        if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
+        if (_elm_atspi_enabled() && !elm_widget_child_can_focus_get(obj))
           elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
      }
    if (eo_isa(wd->resize_obj, EDJE_OBJECT_CLASS))
index 2da8b7de905e79f52014a1ecffa2887ba2debff7..eaba5100d4da463b3814a34b08981fbfd57cd349 100644 (file)
@@ -1171,7 +1171,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
      evas_object_raise(VIEW(it));
    eo_do(WIDGET(it), eo_event_callback_call
      (ELM_LIST_EVENT_ITEM_FOCUSED, eo_it));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
 }
 
@@ -1198,7 +1198,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
 
    sd->focused_item = NULL;
    eo_do(obj, eo_event_callback_call(ELM_LIST_EVENT_ITEM_UNFOCUSED, eo_it));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
 }
 
@@ -1432,7 +1432,7 @@ call:
    //
    if (it->func) it->func((void *)WIDGET_ITEM_DATA_GET(eo_it), WIDGET(it), eo_it);
    eo_do(obj, eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, eo_it));
-     if (_elm_config->atspi_mode)
+     if (_elm_atspi_enabled())
        elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
    sd->last_selected_item = eo_it;
 
@@ -1502,7 +1502,7 @@ _item_unselect(Elm_List_Item_Data *it)
               (sd->select_mode == ELM_OBJECT_SELECT_MODE_NONE)))
           eo_do(WIDGET(it), eo_event_callback_call
             (EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(it)));
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
      }
 
@@ -2368,7 +2368,7 @@ _item_new(Evas_Object *obj,
 
    VIEW(it) = edje_object_add(evas_object_evas_get(obj));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         if (it->icon) eo_do(it->icon, elm_interface_atspi_accessible_parent_set(eo_it));
         if (it->end) eo_do(it->end, elm_interface_atspi_accessible_parent_set(eo_it));
@@ -2409,7 +2409,7 @@ _item_new(Evas_Object *obj,
           obj);
      }
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_added(eo_it);
 
    return it;
@@ -2898,7 +2898,7 @@ _elm_list_item_append(Eo *obj, Elm_List_Data *sd, const char *label, Evas_Object
    it->node = eina_list_last(sd->items);
    elm_box_pack_end(sd->box, VIEW(it));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
 
    return EO_OBJ(it);
@@ -2915,7 +2915,7 @@ _elm_list_item_prepend(Eo *obj, Elm_List_Data *sd, const char *label, Evas_Objec
    it->node = sd->items;
    elm_box_pack_start(sd->box, VIEW(it));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
 
    return EO_OBJ(it);
@@ -2937,7 +2937,7 @@ _elm_list_item_insert_before(Eo *obj, Elm_List_Data *sd, Elm_Object_Item *eo_bef
    it->node = before_it->node->prev;
    elm_box_pack_before(sd->box, VIEW(it), VIEW(before_it));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
 
    return EO_OBJ(it);
@@ -2959,7 +2959,7 @@ _elm_list_item_insert_after(Eo *obj, Elm_List_Data *sd, Elm_Object_Item *eo_afte
    it->node = after_it->node->next;
    elm_box_pack_after(sd->box, VIEW(it), VIEW(after_it));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
 
    return EO_OBJ(it);
@@ -2990,7 +2990,7 @@ _elm_list_item_sorted_insert(Eo *obj, Elm_List_Data *sd, const char *label, Evas
         elm_box_pack_before(sd->box, VIEW(it), VIEW(before));
      }
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
 
    return EO_OBJ(it);
@@ -3400,19 +3400,10 @@ static int _is_item_in_viewport(int viewport_y, int viewport_h, int obj_y, int o
     return 0;
 }
 
-static Eina_Bool _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;
-}
-
 EOLIAN static void
 _elm_list_elm_interface_scrollable_content_pos_set(Eo *obj EINA_UNUSED, Elm_List_Data *pd, Evas_Coord x, Evas_Coord y, Eina_Bool sig)
 {
-   if (!_atspi_enabled())
+   if (!_elm_atspi_enabled())
      {
         eo_do_super(obj, MY_CLASS, elm_interface_scrollable_content_pos_set(x,y,sig));
         return;
index 50c0c2a7977dd49b2008e7151dfdf75d8f81ba60..247a8ec01f205bbc3308daacd39bcdc0520d61a4 100644 (file)
@@ -74,7 +74,7 @@ _state_set(Evas_Object *obj, Eina_Bool state, Eina_Bool activate)
              if (activate) elm_layout_signal_emit(obj, "elm,activate,radio,off", "elm");
              elm_layout_signal_emit(obj, "elm,state,radio,off", "elm");
           }
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           {
              if (sd->state)
                {
index 366f32575cce05e5dfa04a0c89587b3adaca1d67..a114ec04624d00d48d0f0c9f607ca8134dbae250 100644 (file)
@@ -84,15 +84,6 @@ typedef enum _Elm_Spinner_Format_Type
    SPINNER_FORMAT_INVALID
 } Elm_Spinner_Format_Type;
 
-static Eina_Bool _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;
-}
-
 static Eina_Bool
 _is_valid_digit(char x)
 {
@@ -407,7 +398,7 @@ _entry_hide(Evas_Object *obj)
      elm_layout_signal_emit(obj, "elm,state,inactive", "elm");
 
    //TIZEN_ONLY(20160606): Forcefully setting highlight frame on spinner entry as on entry activation frame goes to window again.
-   if (_atspi_enabled()) eo_do(obj, elm_interface_atspi_component_highlight_clear());
+   if (_elm_atspi_enabled()) eo_do(obj, elm_interface_atspi_component_highlight_clear());
    //
    sd->entry_visible = EINA_FALSE;
 }
@@ -664,7 +655,7 @@ _entry_show_cb(void *data,
    sd->entry_visible = EINA_TRUE;
    elm_layout_signal_emit(data, "elm,state,button,inactive", "elm");
    //TIZEN_ONLY(20160606): Forcefully setting highlight frame on spinner entry as on entry activation frame goes to window again.
-   if (_atspi_enabled()) eo_do(obj, elm_interface_atspi_component_highlight_grab());
+   if (_elm_atspi_enabled()) eo_do(obj, elm_interface_atspi_component_highlight_grab());
    //
 }
 
index 1b3488c121245cbf7fa177000d0e4916fe27a13f..4a926b642115543a872343f9efa5e0cb344f98eb 100644 (file)
@@ -183,7 +183,7 @@ _item_unselect(Elm_Toolbar_Item_Data *item)
    if (selected)
      {
         eo_do(WIDGET(item), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(item)));
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
      }
    /* END */
@@ -668,7 +668,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
      evas_object_raise(VIEW(it));
    eo_do(obj, eo_event_callback_call
      (ELM_TOOLBAR_EVENT_ITEM_FOCUSED, EO_OBJ(it)));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
 }
 
@@ -695,7 +695,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
    sd->focused_item = NULL;
    eo_do(obj, eo_event_callback_call
      (ELM_TOOLBAR_EVENT_ITEM_UNFOCUSED, eo_it));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
 }
 
@@ -1215,7 +1215,7 @@ _item_select(Elm_Toolbar_Item_Data *it)
    //
 
    eo_do(obj, eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, EO_OBJ(it)));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
     elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
 }
 
@@ -2585,7 +2585,7 @@ _item_new(Evas_Object *obj,
    evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_RESIZE, _item_resized_cb, NULL);
    //
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      if (icon_obj) eo_do(icon_obj, elm_interface_atspi_accessible_parent_set(eo_it));
 
    if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
@@ -2656,7 +2656,7 @@ _item_new(Evas_Object *obj,
    if ((!sd->items) && (sd->select_mode == ELM_OBJECT_SELECT_MODE_ALWAYS))
      _item_select(it);
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_added(eo_it);
 
    return it;
index 6d54e36fa134a2581d8eaa23e40519e2372dc197..b938d27e8f2953af948c5b816734f4775dab25e3 100644 (file)
@@ -550,7 +550,7 @@ _elm_widget_evas_object_smart_show(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUS
    Eina_Iterator *it;
    Evas_Object *o;
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         Eo *parent;
         eo_do(obj, parent = elm_interface_atspi_accessible_parent_get());
@@ -565,7 +565,7 @@ _elm_widget_evas_object_smart_show(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUS
      }
    eina_iterator_free(it);
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         elm_interface_atspi_accessible_added(obj);
         if (_elm_widget_onscreen_is(obj))
@@ -587,7 +587,7 @@ _elm_widget_evas_object_smart_hide(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUS
      }
    eina_iterator_free(it);
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_SHOWING, EINA_FALSE);
 }
 
@@ -1260,7 +1260,7 @@ _elm_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj
 
         elm_widget_display_mode_set(sobj,
               evas_object_size_hint_display_mode_get(obj));
-        if (_elm_config->atspi_mode && !sdc->on_create)
+        if (_elm_atspi_enabled() && !sdc->on_create)
           {
              Elm_Interface_Atspi_Accessible *aparent;
              eo_do(sobj, aparent = elm_interface_atspi_accessible_parent_get());
@@ -1347,7 +1347,7 @@ _elm_widget_sub_object_del(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *sobj
                   parent = sdp->parent_obj;
                }
           }
-        if (_elm_config->atspi_mode && !sd->on_destroy)
+        if (_elm_atspi_enabled() && !sd->on_destroy)
           {
              Elm_Interface_Atspi_Accessible *aparent;
              eo_do(sobj, aparent = elm_interface_atspi_accessible_parent_get());
@@ -6057,7 +6057,7 @@ _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *item E
                evas_object_focus_set(obj, EINA_TRUE);
               eo_do(obj, eo_event_callback_call
                (ELM_WIDGET_EVENT_FOCUSED, NULL));
-             if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
+             if (_elm_atspi_enabled() && !elm_widget_child_can_focus_get(obj))
                elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
           }
         else
@@ -6066,7 +6066,7 @@ _elm_widget_on_focus(Eo *obj, Elm_Widget_Smart_Data *sd, Elm_Object_Item *item E
                evas_object_focus_set(obj, EINA_FALSE);
              eo_do(obj, eo_event_callback_call
                (ELM_WIDGET_EVENT_UNFOCUSED, NULL));
-             if (_elm_config->atspi_mode && !elm_widget_child_can_focus_get(obj))
+             if (_elm_atspi_enabled() && !elm_widget_child_can_focus_get(obj))
                elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
     }
      }
index 2663e3368145e6cb72675fb416259e16aaa4a657..8264a57bd53a3c994058baffd5c49e1c699601bb 100644 (file)
@@ -1220,7 +1220,7 @@ _elm_win_focus_in(Ecore_Evas *ee)
         edje_object_signal_emit(sd->frame_obj, "elm,action,focus", "elm");
      }
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         elm_interface_atspi_window_activated_signal_emit(obj);
         elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_ACTIVE, EINA_TRUE);
@@ -1257,7 +1257,7 @@ _elm_win_focus_out(Ecore_Evas *ee)
    /* access */
    _elm_access_object_highlight_disable(evas_object_evas_get(obj));
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         elm_interface_atspi_window_deactivated_signal_emit(obj);
         elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_ACTIVE, EINA_FALSE);
@@ -1531,13 +1531,13 @@ _elm_win_state_change(Ecore_Evas *ee)
         else if (sd->iconified)
           {
              eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_ICONIFIED, NULL));
-             if (_elm_config->atspi_mode)
+             if (_elm_atspi_enabled())
                elm_interface_atspi_window_minimized_signal_emit(obj);
           }
         else
           {
              eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_NORMAL, NULL));
-             if (_elm_config->atspi_mode)
+             if (_elm_atspi_enabled())
                elm_interface_atspi_window_restored_signal_emit(obj);
           }
      }
@@ -1575,13 +1575,13 @@ _elm_win_state_change(Ecore_Evas *ee)
         if (sd->maximized)
           {
              eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_MAXIMIZED, NULL));
-             if (_elm_config->atspi_mode)
+             if (_elm_atspi_enabled())
                elm_interface_atspi_window_maximized_signal_emit(obj);
           }
         else
           {
              eo_do(obj, eo_event_callback_call(ELM_WIN_EVENT_UNMAXIMIZED, NULL));
-             if (_elm_config->atspi_mode)
+             if (_elm_atspi_enabled())
                elm_interface_atspi_window_restored_signal_emit(obj);
           }
      }
@@ -1602,7 +1602,7 @@ _elm_win_state_change(Ecore_Evas *ee)
         eo_do(obj, eo_event_callback_call
           (ELM_WIN_EVENT_WM_ROTATION_CHANGED, NULL));
         //TIZEN_ONLY(20160915): send information to screen reader on window rotation
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           {
              Evas_Coord width = 0, height = 0;
              elm_win_screen_size_get(obj, NULL, NULL, &width, &height);
@@ -1638,7 +1638,7 @@ _elm_win_state_change(Ecore_Evas *ee)
      {
         evas_object_smart_callback_call(obj, SIG_VISIBILITY_CHANGED, (void*)!sd->obscured);
         //TIZEN_ONLY(20160701): add atspi window state visible change signal
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_VISIBLE, !sd->obscured);
         //
      }
@@ -1792,7 +1792,7 @@ _elm_win_evas_object_smart_show(Eo *obj, Elm_Win_Data *sd)
 
    TRAP(sd, show);
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         Eo *bridge = _elm_atspi_bridge_get();
         elm_interface_atspi_window_created_signal_emit(obj);
@@ -1860,7 +1860,7 @@ _elm_win_evas_object_smart_hide(Eo *obj, Elm_Win_Data *sd)
         ecore_evas_hide(sd->pointer.ee);
 #endif
      }
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         Eo *bridge = _elm_atspi_bridge_get();
         elm_interface_atspi_window_destroyed_signal_emit(obj);
@@ -2204,7 +2204,7 @@ _elm_win_evas_object_smart_del(Eo *obj, Elm_Win_Data *sd)
 
    if (sd->autodel_clear) *(sd->autodel_clear) = -1;
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_window_destroyed_signal_emit(obj);
 
    _elm_win_list = eina_list_remove(_elm_win_list, obj);
@@ -2410,7 +2410,7 @@ _elm_win_delete_request(Ecore_Evas *ee)
    if (sd->autohide)
      evas_object_hide(obj);
    // FIXME: if above callback deletes - then the below will be invalid
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_window_destroyed_signal_emit(obj);
    if (autodel) evas_object_del(obj);
    else sd->autodel_clear = NULL;
@@ -4633,7 +4633,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
      }
 
    eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_WINDOW));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_window_created_signal_emit(obj);
 
    if(_elm_config->win_no_border)
@@ -5549,7 +5549,7 @@ _win_rotate(Evas_Object *obj, Elm_Win_Data *sd, int rotation, Eina_Bool resize)
    eo_do(obj, eo_event_callback_call
      (ELM_WIN_EVENT_ROTATION_CHANGED, NULL));
    //TIZEN_ONLY(20160915): send information to screen reader on window rotation.
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         Evas_Coord width = 0, height = 0;
         elm_win_screen_size_get(obj, NULL, NULL, &width, &height);
@@ -6271,7 +6271,7 @@ _elm_win_socket_listen(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *svcnam
    if (!ecore_evas_extn_socket_listen(sd->ee, svcname, svcnum, svcsys))
      return EINA_FALSE;
 
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      {
         if (sd->socket_proxy)
           eo_unref(sd->socket_proxy);
index 5279e233e6618847c8a33680cf3f0b475ccaa995..34376f07a3d05c7699035a445e509c6daf655f73 100644 (file)
@@ -652,7 +652,7 @@ _item_text_realize(Elm_Gen_Item *it,
                }
           }
         edje_object_message_signal_process(target);
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_name_changed_signal_emit(EO_OBJ(it));
      }
 }
@@ -1100,7 +1100,7 @@ _item_unrealize(Elm_Gen_Item *it,
         _elm_access_widget_item_unregister(it->base);
         elm_object_item_access_order_unset(EO_OBJ(it));
         //TIZEN_ONLY(20150709) Do not register children of MANAGES_DESCENDATS objects
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           {
              elm_interface_atspi_accessible_removed(EO_OBJ(it));
              elm_interface_atspi_accessible_children_changed_del_signal_emit(GL_IT(it)->wsd->obj, EO_OBJ(it));
@@ -1634,7 +1634,7 @@ _item_realize(Elm_Gen_Item *it,
            eo_do(EO_OBJ(it), elm_wdg_item_cursor_set(it->mouse_cursor));
 
         //TIZEN_ONLY(20150709) Do not register children of MANAGES_DESCENDATS objects
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           {
              elm_interface_atspi_accessible_added(EO_OBJ(it));
              elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
@@ -1924,17 +1924,6 @@ _del_fx_space_get(Elm_Gen_Item *it)
 }
 #endif
 
-// TIZEN only (20150914) : Accessibility: updated highlight change during genlist and list scroll
-static Eina_Bool _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;
-}
-//
-
 static void
 _item_block_realize(Item_Block *itb, Eina_Bool force)
 {
@@ -1955,7 +1944,7 @@ _item_block_realize(Item_Block *itb, Eina_Bool force)
    evas_output_viewport_get(evas_object_evas_get(sd->obj),
                             &cvx, &cvy, &cvw, &cvh);
 
-   if (_elm_config->access_mode || _atspi_enabled())
+   if (_elm_config->access_mode || _elm_atspi_enabled())
      {
         // If access is on, realize more items (3 times)
         cvy = cvy - cvh;
@@ -2076,7 +2065,7 @@ _elm_genlist_pan_evas_object_smart_calculate(Eo *obj, Elm_Genlist_Pan_Data *psd)
 
    _calc((void *)psd->wsd);
 
-   if (_elm_config->access_mode || _atspi_enabled())
+   if (_elm_config->access_mode || _elm_atspi_enabled())
      {
         // If access is on, realize more items (3 times)
         cvy = cvy - cvh;
@@ -2114,7 +2103,7 @@ _elm_genlist_pan_evas_object_smart_calculate(Eo *obj, Elm_Genlist_Pan_Data *psd)
    Eina_List *realized_new = NULL;
    Eina_Bool flag = EINA_FALSE;
    if ((psd->wsd->blocks_realized) && (psd->wsd->dir == -1) &&
-       (!_elm_config->access_mode) && (!_atspi_enabled()))
+       (!_elm_config->access_mode) && (!_elm_atspi_enabled()))
      {
         start = EINA_INLIST_GET((Item_Block *)eina_list_data_get
                                (eina_list_last(psd->wsd->blocks_realized)));
@@ -2141,7 +2130,7 @@ _elm_genlist_pan_evas_object_smart_calculate(Eo *obj, Elm_Genlist_Pan_Data *psd)
           }
      }
    else if ((psd->wsd->blocks_realized) && (psd->wsd->dir == 1) &&
-            (!_elm_config->access_mode) && (!_atspi_enabled()))
+            (!_elm_config->access_mode) && (!_elm_atspi_enabled()))
      {
         start = EINA_INLIST_GET((Item_Block *)eina_list_data_get
                                 (psd->wsd->blocks_realized));
@@ -2586,7 +2575,7 @@ static void _item_focused(Elm_Gen_Item *it, Elm_Genlist_Item_Scrollto_Type type)
      }
    sd->focused_item = it;
    evas_object_smart_callback_call(WIDGET(it), SIG_ITEM_FOCUSED, EO_OBJ(it));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_active_descendant_changed_signal_emit(WIDGET(it), EO_OBJ(it));
 }
 
@@ -2678,7 +2667,7 @@ _item_highlight(Elm_Gen_Item *it)
      }
 //****************************
    evas_object_smart_callback_call(WIDGET(it), SIG_HIGHLIGHTED, EO_OBJ(it));
-   if (_elm_config->atspi_mode)
+   if (_elm_atspi_enabled())
      elm_interface_atspi_accessible_active_descendant_changed_signal_emit(WIDGET(it), EO_OBJ(it));
 }
 
@@ -6746,7 +6735,7 @@ _elm_genlist_item_expanded_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Eina_B
         if (it->realized)
           edje_object_signal_emit(VIEW(it), SIGNAL_EXPANDED, "elm");
         evas_object_smart_callback_call(WIDGET(it), SIG_EXPANDED, EO_OBJ(it));
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_active_descendant_changed_signal_emit(WIDGET(it), eo_item);
      }
    else
@@ -6754,7 +6743,7 @@ _elm_genlist_item_expanded_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Eina_B
         if (it->realized)
           edje_object_signal_emit(VIEW(it), SIGNAL_CONTRACTED, "elm");
         evas_object_smart_callback_call(WIDGET(it), SIG_CONTRACTED, EO_OBJ(it));
-        if (_elm_config->atspi_mode)
+        if (_elm_atspi_enabled())
           elm_interface_atspi_accessible_active_descendant_changed_signal_emit(WIDGET(it), eo_item);
      }
 }
@@ -8435,7 +8424,7 @@ static int _is_item_in_viewport(int viewport_y, int viewport_h, int obj_y, int o
 EOLIAN static void
 _elm_genlist_elm_interface_scrollable_content_pos_set(Eo *obj, Elm_Genlist_Data *sid EINA_UNUSED, Evas_Coord x, Evas_Coord y, Eina_Bool sig)
 {
-   if (!_atspi_enabled())
+   if (!_elm_atspi_enabled())
      {
        eo_do_super(obj, MY_CLASS, elm_interface_scrollable_content_pos_set(x,y,sig));
        return;