aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2016-01-15 17:25:00 +0100
committerLukasz Stanislawski <l.stanislaws@samsung.com>2016-01-15 17:25:00 +0100
commite0067278629d7e0a695a065fd1d29521cddacd19 (patch)
tree8602d37d74cd2018c728fdf3d510d3009cde4188
parentatspi; simplify API by removing type set/get funcs (diff)
downloadelementary-devs/stanluk/next-2.tar.gz
atspi; add init/shutdown funcsdevs/stanluk/next-2
Change-Id: I5d2e73775a2a16397fde467a5cdf3f30a27fc12d
-rw-r--r--src/lib/elc_multibuttonentry.c10
-rw-r--r--src/lib/elm_atspi_bridge.c15
-rw-r--r--src/lib/elm_check.c15
-rw-r--r--src/lib/elm_entry.c44
-rw-r--r--src/lib/elm_gengrid.c29
-rw-r--r--src/lib/elm_genlist.c31
-rw-r--r--src/lib/elm_index.c35
-rw-r--r--src/lib/elm_interface_atspi_accessible.c23
-rw-r--r--src/lib/elm_interface_atspi_accessible.eo9
-rw-r--r--src/lib/elm_layout.c4
-rw-r--r--src/lib/elm_list.c30
-rw-r--r--src/lib/elm_menu.c16
-rw-r--r--src/lib/elm_radio.c12
-rw-r--r--src/lib/elm_slider.c6
-rw-r--r--src/lib/elm_toolbar.c15
-rw-r--r--src/lib/elm_widget.c19
-rw-r--r--src/lib/elm_win.c30
17 files changed, 143 insertions, 200 deletions
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index a6102650c..16cdca421 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -650,8 +650,7 @@ EOLIAN static void
_elm_multibuttonentry_item_eo_base_destructor(Eo *eo_it,
Elm_Multibuttonentry_Item_Data *it)
{
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_children_changed_del_signal_emit(WIDGET(it), eo_it);
+ elm_interface_atspi_accessible_children_changed_del_signal_emit(WIDGET(it), eo_it);
_item_del(it);
eo_do_super(eo_it, ELM_MULTIBUTTONENTRY_ITEM_CLASS, eo_destructor());
@@ -916,11 +915,8 @@ _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);
- }
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
+ elm_interface_atspi_accessible_added(eo_item);
return eo_item;
}
diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c
index c53a86eed..2dd24a9ce 100644
--- a/src/lib/elm_atspi_bridge.c
+++ b/src/lib/elm_atspi_bridge.c
@@ -3779,8 +3779,11 @@ _registered_listeners_get(void *data, const Eldbus_Message *msg, Eldbus_Pending
}
if (!pd->connected)
- eo_do(data, eo_event_callback_call(ELM_ATSPI_BRIDGE_EVENT_CONNECTED, NULL));
- pd->connected = EINA_TRUE;
+ {
+ pd->connected = EINA_TRUE;
+ eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_init());
+ eo_do(data, eo_event_callback_call(ELM_ATSPI_BRIDGE_EVENT_CONNECTED, NULL));
+ }
}
static void
@@ -4262,8 +4265,12 @@ _a11y_connection_shutdown(Eo *bridge)
eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_handler_del(pd->event_hdlr));
pd->event_hdlr = NULL;
- eo_do(bridge, eo_event_callback_call(ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, NULL));
- pd->connected = EINA_FALSE;
+ if (pd->connected)
+ {
+ pd->connected = EINA_FALSE;
+ eo_do(bridge, eo_event_callback_call(ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, NULL));
+ eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_shutdown());
+ }
}
static void _disconnect_cb(void *data, Eldbus_Connection *conn EINA_UNUSED, void *event_info EINA_UNUSED)
diff --git a/src/lib/elm_check.c b/src/lib/elm_check.c
index 78e790651..2c5928c2a 100644
--- a/src/lib/elm_check.c
+++ b/src/lib/elm_check.c
@@ -80,10 +80,7 @@ _activate(Evas_Object *obj)
eo_do(obj, eo_event_callback_call(ELM_CHECK_EVENT_CHANGED, NULL));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(obj,
- ELM_ATSPI_STATE_CHECKED,
- sd->state);
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_CHECKED, sd->state);
}
/* FIXME: replicated from elm_layout just because check's icon spot
@@ -285,10 +282,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(data,
- ELM_ATSPI_STATE_CHECKED,
- sd->state);
+ elm_interface_atspi_accessible_state_changed_signal_emit(data, ELM_ATSPI_STATE_CHECKED, sd->state);
}
static void
@@ -306,10 +300,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(data,
- ELM_ATSPI_STATE_CHECKED,
- sd->state);
+ elm_interface_atspi_accessible_state_changed_signal_emit(data, ELM_ATSPI_STATE_CHECKED, sd->state);
}
static void
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index a2c6d73b1..5c9405387 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -1152,8 +1152,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
_return_key_enabled_check(obj);
_validate(obj);
}
@@ -1165,8 +1164,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
if (_elm_config->selection_clear_enable)
{
@@ -2014,6 +2012,7 @@ _entry_changed_user_signal_cb(void *data,
const char *emission EINA_UNUSED,
const char *source EINA_UNUSED)
{
+ Elm_Atspi_Text_Change_Info atspi_info;
Elm_Entry_Change_Info info;
Edje_Entry_Change_Info *edje_info = (Edje_Entry_Change_Info *)
edje_object_signal_callback_extra_data_get();
@@ -2027,23 +2026,19 @@ _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 (edje_info && edje_info->insert)
{
- Elm_Atspi_Text_Change_Info atspi_info;
- if (edje_info && edje_info->insert)
- {
- atspi_info.content = edje_info->change.insert.content;
- atspi_info.pos = edje_info->change.insert.pos;
- atspi_info.len = edje_info->change.insert.plain_length;
- eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info));
- }
- else if (edje_info && !edje_info->insert)
- {
- atspi_info.content = edje_info->change.del.content;
- atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end);
- atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos;
- eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info));
- }
+ atspi_info.content = edje_info->change.insert.content;
+ atspi_info.pos = edje_info->change.insert.pos;
+ atspi_info.len = edje_info->change.insert.plain_length;
+ eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info));
+ }
+ else if (edje_info && !edje_info->insert)
+ {
+ atspi_info.content = edje_info->change.del.content;
+ atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end);
+ atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos;
+ eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info));
}
}
@@ -2133,8 +2128,7 @@ _entry_selection_changed_signal_cb(void *data,
(EVAS_SELECTABLE_INTERFACE_EVENT_SELECTION_CHANGED, NULL));
_selection_store(ELM_SEL_TYPE_PRIMARY, data);
_update_selection_handler(data);
- if (_elm_config->atspi_mode)
- eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, NULL));
+ eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, NULL));
}
static void
@@ -2230,8 +2224,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)
- eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL));
+ eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL));
}
static void
@@ -2242,8 +2235,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)
- eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL));
+ eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL));
}
static void
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 7661995a2..e610d4cca 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -542,8 +542,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
}
}
@@ -852,8 +851,7 @@ _item_text_realize(Elm_Gen_Item *it,
{
edje_object_part_text_set(target, key, "");
}
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_name_changed_signal_emit(EO_OBJ(it));
+ elm_interface_atspi_accessible_name_changed_signal_emit(EO_OBJ(it));
}
}
@@ -2038,8 +2036,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
}
static void
@@ -2068,8 +2065,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
}
static Eina_Bool
@@ -4136,8 +4132,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
}
it->walking--;
@@ -4444,11 +4439,8 @@ _elm_gengrid_item_append(Eo *obj, Elm_Gengrid_Data *sd, const Elm_Gengrid_Item_C
ecore_job_del(sd->calc_job);
sd->calc_job = ecore_job_add(_calc_job, obj);
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(EO_OBJ(it));
- elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
- }
+ elm_interface_atspi_accessible_added(EO_OBJ(it));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
return EO_OBJ(it);
}
@@ -4470,11 +4462,8 @@ _elm_gengrid_item_prepend(Eo *obj, Elm_Gengrid_Data *sd, const Elm_Gengrid_Item_
ecore_job_del(sd->calc_job);
sd->calc_job = ecore_job_add(_calc_job, obj);
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(EO_OBJ(it));
- elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
- }
+ elm_interface_atspi_accessible_added(EO_OBJ(it));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
return EO_OBJ(it);
}
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index b78081f84..b2d46a453 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -341,8 +341,7 @@ _item_text_realize(Elm_Gen_Item *it,
{
edje_object_part_text_set(target, key, "");
}
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_name_changed_signal_emit(EO_OBJ(it));
+ elm_interface_atspi_accessible_name_changed_signal_emit(EO_OBJ(it));
}
}
@@ -2672,8 +2671,7 @@ _elm_genlist_item_focused(Elm_Object_Item *eo_it)
if (it->realized)
_elm_genlist_item_focus_update(it);
eo_do(obj, eo_event_callback_call(ELM_GENLIST_EVENT_ITEM_FOCUSED, eo_it));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
}
static void
@@ -2700,8 +2698,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
sd->focused_item = NULL;
eo_do(obj, eo_event_callback_call(ELM_GENLIST_EVENT_ITEM_UNFOCUSED, eo_it));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
}
static Eina_Bool
@@ -3729,8 +3726,7 @@ _item_unselect(Elm_Gen_Item *it)
sd->selected = eina_list_remove(sd->selected, EO_OBJ(it));
eo_do(WIDGET(it), eo_event_callback_call
(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(it)));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
}
static void
@@ -4658,11 +4654,8 @@ _item_queue(Elm_Genlist_Data *sd,
evas_object_geometry_get(sd->obj, NULL, NULL, &w, NULL);
if (w > 0) _requeue_idle_enterer(sd);
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(EO_OBJ(it));
- elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
- }
+ elm_interface_atspi_accessible_added(EO_OBJ(it));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(sd->obj, EO_OBJ(it));
}
/* If the application wants to know the relative item, use
@@ -5766,8 +5759,7 @@ _item_select(Elm_Gen_Item *it)
// delete item if it's requested deletion in the above callbacks.
if ((it->base)->on_deletion) goto item_deleted;
eo_do(WIDGET(it), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, eo_it));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
// delete item if it's requested deletion in the above callbacks.
if ((it->base)->on_deletion) goto item_deleted;
it->walking--;
@@ -5882,8 +5874,7 @@ _elm_genlist_item_elm_widget_item_del_pre(Eo *eo_it EINA_UNUSED,
sd->items = eina_inlist_remove(sd->items, EINA_INLIST_GET(it));
return EINA_FALSE;
}
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_children_changed_del_signal_emit(WIDGET(it),eo_it);
+ elm_interface_atspi_accessible_children_changed_del_signal_emit(WIDGET(it),eo_it);
_item_del(it);
return EINA_TRUE;
@@ -6789,8 +6780,7 @@ _elm_genlist_item_expanded_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Eina_B
eo_do(WIDGET(it), eo_event_callback_call
(ELM_GENLIST_EVENT_EXPANDED, EO_OBJ(it)));
sd->auto_scroll_enabled = EINA_TRUE;
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_item, ELM_ATSPI_STATE_EXPANDED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_item, ELM_ATSPI_STATE_EXPANDED, EINA_TRUE);
}
else
{
@@ -6800,8 +6790,7 @@ _elm_genlist_item_expanded_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it, Eina_B
eo_do(WIDGET(it), eo_event_callback_call
(ELM_GENLIST_EVENT_CONTRACTED, EO_OBJ(it)));
sd->auto_scroll_enabled = EINA_FALSE;
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_item, ELM_ATSPI_STATE_EXPANDED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_item, ELM_ATSPI_STATE_EXPANDED, EINA_FALSE);
}
}
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 17f844a3b..bdd54a095 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -1372,11 +1372,8 @@ _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)
- {
- elm_interface_atspi_accessible_added(eo_item);
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
- }
+ elm_interface_atspi_accessible_added(eo_item);
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
return eo_item;
}
@@ -1394,11 +1391,8 @@ _elm_index_item_prepend(Eo *obj, Elm_Index_Data *sd, const char *letter, Evas_Sm
ELM_INDEX_ITEM_DATA_GET(eo_item, it);
VIEW(it) = edje_object_add(evas_object_evas_get(obj));
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(eo_item);
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
- }
+ elm_interface_atspi_accessible_added(eo_item);
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
return eo_item;
}
@@ -1429,11 +1423,8 @@ _elm_index_item_insert_after(Eo *obj, Elm_Index_Data *sd, Elm_Object_Item *after
ELM_INDEX_ITEM_DATA_GET(eo_item, it);
VIEW(it) = edje_object_add(evas_object_evas_get(obj));
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(eo_item);
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
- }
+ elm_interface_atspi_accessible_added(eo_item);
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
return eo_item;
}
@@ -1453,11 +1444,8 @@ _elm_index_item_insert_before(Eo *obj, Elm_Index_Data *sd, Elm_Object_Item *befo
ELM_INDEX_ITEM_DATA_GET(eo_item, it);
VIEW(it) = edje_object_add(evas_object_evas_get(obj));
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(eo_item);
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
- }
+ elm_interface_atspi_accessible_added(eo_item);
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
return eo_item;
}
@@ -1497,11 +1485,8 @@ _elm_index_item_sorted_insert(Eo *obj, Elm_Index_Data *sd, const char *letter, E
ELM_INDEX_ITEM_DATA_GET(eo_item, it);
VIEW(it) = edje_object_add(evas_object_evas_get(obj));
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(eo_item);
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
- }
+ elm_interface_atspi_accessible_added(eo_item);
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, eo_item);
if (!eo_item) return NULL;
else return eo_item;
diff --git a/src/lib/elm_interface_atspi_accessible.c b/src/lib/elm_interface_atspi_accessible.c
index 6a0084a10..8e28c76ee 100644
--- a/src/lib/elm_interface_atspi_accessible.c
+++ b/src/lib/elm_interface_atspi_accessible.c
@@ -136,6 +136,7 @@ typedef struct _Elm_Interface_Atspi_Accessible_Data Elm_Interface_Atspi_Accessib
static Eina_List *global_callbacks;
static Eo *root;
+static int _init_count;
EOLIAN static int
_elm_interface_atspi_accessible_index_in_parent_get(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED)
@@ -325,6 +326,9 @@ _elm_interface_atspi_accessible_event_emit(Eo *class EINA_UNUSED, void *pd EINA_
Elm_Atspi_Event_Handler *hdl;
Eina_Bool disabled;
+ if (!_init_count)
+ return;
+
if (!accessible || !event || !eo_isa(accessible, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
{
CRI("Invalid parameters, event: %s, obj: %s", event ? event->name : "NULL", accessible ? eo_class_name_get(accessible) : "NULL");
@@ -602,4 +606,23 @@ _elm_interface_atspi_accessible_disabled_set(Eo *obj, Elm_Interface_Atspi_Access
pd->disabled = !!val;
}
+EOLIAN void
+_elm_interface_atspi_accessible_init(Eo *class EINA_UNUSED, void *pd EINA_UNUSED)
+{
+ _init_count++;
+}
+
+EOLIAN void
+_elm_interface_atspi_accessible_shutdown(Eo *class EINA_UNUSED, void *pd EINA_UNUSED)
+{
+ if (_init_count > 0)
+ _init_count--;
+}
+
+EOLIAN Eina_Bool
+_elm_interface_atspi_accessible_enabled_is(Eo *class EINA_UNUSED, void *pd EINA_UNUSED)
+{
+ return _init_count > 0 ? EINA_TRUE : EINA_FALSE;
+}
+
#include "elm_interface_atspi_accessible.eo.c"
diff --git a/src/lib/elm_interface_atspi_accessible.eo b/src/lib/elm_interface_atspi_accessible.eo
index f6bf85e92..b7d93d95f 100644
--- a/src/lib/elm_interface_atspi_accessible.eo
+++ b/src/lib/elm_interface_atspi_accessible.eo
@@ -202,6 +202,15 @@ mixin Elm_Interface_Atspi_Accessible ()
}
}
}
+ init @class @protected {
+ [[Initializes accessibility submodule.]]
+ }
+ shutdown @class @protected {
+ [[Shutdowns accessibility submodule.]]
+ }
+ enabled_is @class @protected {
+ retrun: bool;
+ }
}
events {
property,changed: const(char)*;
diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c
index bc99d75fa..aeecf376a 100644
--- a/src/lib/elm_layout.c
+++ b/src/lib/elm_layout.c
@@ -409,7 +409,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_widget_child_can_focus_get(obj))
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
}
else
@@ -417,7 +417,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_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))
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 9da0b40a7..1adcf3f4a 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -1163,8 +1163,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
}
static void
@@ -1190,8 +1189,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
}
/*
@@ -1420,8 +1418,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
sd->last_selected_item = eo_it;
_elm_list_unwalk(obj, sd);
@@ -1490,8 +1487,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
}
_elm_list_unwalk(obj, sd);
@@ -2342,8 +2338,7 @@ _item_new(Evas_Object *obj,
eo_do(it->end, elm_interface_atspi_accessible_disabled_set(EINA_TRUE));
}
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_added(eo_it);
+ elm_interface_atspi_accessible_added(eo_it);
return it;
}
@@ -2801,8 +2796,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)
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
return EO_OBJ(it);
}
@@ -2818,8 +2812,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)
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
return EO_OBJ(it);
}
@@ -2840,8 +2833,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)
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
return EO_OBJ(it);
}
@@ -2862,8 +2854,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)
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
return EO_OBJ(it);
}
@@ -2893,8 +2884,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)
- elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, EO_OBJ(it));
return EO_OBJ(it);
}
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index 725c45c2b..4dbb34cb8 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -108,8 +108,7 @@ _submenu_sizing_eval(Elm_Menu_Item_Data *parent_it)
{
ELM_MENU_ITEM_DATA_GET(eo_item, item);
elm_layout_sizing_eval(VIEW(item));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_item, ELM_ATSPI_STATE_SHOWING, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_item, ELM_ATSPI_STATE_SHOWING, EINA_TRUE);
}
@@ -503,8 +502,7 @@ _menu_item_activate_cb(void *data,
}
eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, elm_interface_atspi_accessible_event_emit(WIDGET(item), ELM_INTERFACE_ATSPI_SELECTION_EVENT_SELECTION_CHANGED, NULL));
}
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
}
static void
@@ -517,8 +515,7 @@ _menu_item_inactivate_cb(void *data,
item->selected = 0;
if (item->submenu.open) _submenu_hide(item);
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
}
static Eina_Bool
@@ -1058,11 +1055,8 @@ _elm_menu_item_add(Eo *obj, Elm_Menu_Data *sd, Elm_Object_Item *parent, const ch
it->dbus_idx = _elm_dbus_menu_item_add(sd->dbus_menu, eo_item);
it->dbus_menu = sd->dbus_menu;
}
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(eo_item);
- elm_interface_atspi_accessible_children_changed_added_signal_emit(parent ? parent : obj, eo_item);
- }
+ elm_interface_atspi_accessible_added(eo_item);
+ elm_interface_atspi_accessible_children_changed_added_signal_emit(parent ? parent : obj, eo_item);
return eo_item;
}
diff --git a/src/lib/elm_radio.c b/src/lib/elm_radio.c
index 4c6f5fa3a..54f40019c 100644
--- a/src/lib/elm_radio.c
+++ b/src/lib/elm_radio.c
@@ -71,15 +71,13 @@ _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 (sd->state)
{
- if (sd->state)
- {
- elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_CHECKED, EINA_TRUE);
- }
- else
- elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_CHECKED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_CHECKED, EINA_TRUE);
}
+ else
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_CHECKED, EINA_FALSE);
+ }
}
}
diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c
index 6db74da2b..4db8e8274 100644
--- a/src/lib/elm_slider.c
+++ b/src/lib/elm_slider.c
@@ -65,8 +65,7 @@ _delay_change(void *data)
sd->delay = NULL;
eo_do(data, eo_event_callback_call(ELM_SLIDER_EVENT_DELAY_CHANGED, NULL));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_value_changed_signal_emit(data);
+ elm_interface_atspi_accessible_value_changed_signal_emit(data);
return ECORE_CALLBACK_CANCEL;
}
@@ -131,8 +130,7 @@ _val_set(Evas_Object *obj)
(wd->resize_obj, "elm.dragable.slider", pos, pos);
// emit accessiblity event also if value was chagend by API
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_value_changed_signal_emit(obj);
+ elm_interface_atspi_accessible_value_changed_signal_emit(obj);
}
static void
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 5f38906f9..79fe0f6ca 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -160,8 +160,7 @@ _item_unselect(Elm_Toolbar_Item_Data *item)
if (item->icon)
elm_widget_signal_emit(item->icon, "elm,state,unselected", "elm");
eo_do(WIDGET(item), eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_UNSELECTED, EO_OBJ(item)));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(item), ELM_ATSPI_STATE_SELECTED, EINA_FALSE);
}
static void
@@ -636,8 +635,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
}
static void
@@ -663,8 +661,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)
- elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(eo_it, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
}
/*
@@ -1179,8 +1176,7 @@ _item_select(Elm_Toolbar_Item_Data *it)
}
eo_do(obj, eo_event_callback_call(EVAS_CLICKABLE_INTERFACE_EVENT_CLICKED, EO_OBJ(it)));
eo_do(obj, eo_event_callback_call(EVAS_SELECTABLE_INTERFACE_EVENT_SELECTED, EO_OBJ(it)));
- if (_elm_config->atspi_mode)
- elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
+ elm_interface_atspi_accessible_state_changed_signal_emit(EO_OBJ(it), ELM_ATSPI_STATE_SELECTED, EINA_TRUE);
}
static void
@@ -2468,8 +2464,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)
- elm_interface_atspi_accessible_added(eo_it);
+ elm_interface_atspi_accessible_added(eo_it);
return it;
}
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 2c4ea8dd2..7fb7d9875 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -529,12 +529,9 @@ _elm_widget_evas_object_smart_show(Eo *obj, Elm_Widget_Smart_Data *_pd)
}
eina_iterator_free(it);
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_accessible_added(obj);
- if (!_pd->on_destroy && _elm_widget_onscreen_is(obj))
- elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_SHOWING, EINA_TRUE);
- }
+ elm_interface_atspi_accessible_added(obj);
+ if (!_pd->on_destroy && _elm_widget_onscreen_is(obj))
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_SHOWING, EINA_TRUE);
}
EOLIAN static void
@@ -551,7 +548,7 @@ _elm_widget_evas_object_smart_hide(Eo *obj, Elm_Widget_Smart_Data *_pd)
}
eina_iterator_free(it);
- if (_elm_config->atspi_mode && !_pd->on_destroy)
+ if (!_pd->on_destroy)
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_SHOWING, EINA_FALSE);
}
@@ -1199,7 +1196,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 && !sd->on_create)
+ if (!sd->on_create)
{
Elm_Interface_Atspi_Accessible *aparent;
eo_do(sobj, aparent = elm_interface_atspi_accessible_parent_get());
@@ -1277,7 +1274,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 (!sd->on_destroy)
{
Elm_Interface_Atspi_Accessible *aparent;
eo_do(sobj, aparent = elm_interface_atspi_accessible_parent_get());
@@ -5751,7 +5748,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_widget_child_can_focus_get(obj))
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_TRUE);
}
else
@@ -5760,7 +5757,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_widget_child_can_focus_get(obj))
elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_FOCUSED, EINA_FALSE);
}
}
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 050e82b9e..47448a608 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -1130,11 +1130,8 @@ _elm_win_focus_in(Ecore_Evas *ee)
edje_object_signal_emit(sd->frame_obj, "elm,action,focus", "elm");
}
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_window_activated_signal_emit(obj);
- elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_ACTIVE, EINA_TRUE);
- }
+ elm_interface_atspi_window_activated_signal_emit(obj);
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_ACTIVE, EINA_TRUE);
/* do nothing */
/* else if (sd->img_obj) */
@@ -1168,11 +1165,8 @@ _elm_win_focus_out(Ecore_Evas *ee)
/* access */
_elm_access_object_highlight_disable(evas_object_evas_get(obj));
- if (_elm_config->atspi_mode)
- {
- elm_interface_atspi_window_deactivated_signal_emit(obj);
- elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_ACTIVE, EINA_FALSE);
- }
+ elm_interface_atspi_window_deactivated_signal_emit(obj);
+ elm_interface_atspi_accessible_state_changed_signal_emit(obj, ELM_ATSPI_STATE_ACTIVE, EINA_FALSE);
/* do nothing */
/* if (sd->img_obj) */
@@ -1394,14 +1388,12 @@ _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)
- elm_interface_atspi_window_minimized_signal_emit(obj);
+ 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)
- elm_interface_atspi_window_restored_signal_emit(obj);
+ elm_interface_atspi_window_restored_signal_emit(obj);
}
}
if (ch_sticky)
@@ -1438,14 +1430,12 @@ _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)
- elm_interface_atspi_window_maximized_signal_emit(obj);
+ 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)
- elm_interface_atspi_window_restored_signal_emit(obj);
+ elm_interface_atspi_window_restored_signal_emit(obj);
}
_elm_win_frame_maximized_state_update(sd, sd->maximized);
}
@@ -1602,6 +1592,7 @@ _elm_win_evas_object_smart_show(Eo *obj, Elm_Win_Data *sd)
if (sd->modal_count) return;
const Eina_List *l;
Evas_Object *current;
+ Eo *root;
if (!evas_object_visible_get(obj))
_elm_win_state_eval_queue();
@@ -1616,9 +1607,8 @@ _elm_win_evas_object_smart_show(Eo *obj, Elm_Win_Data *sd)
TRAP(sd, show);
- if (_elm_config->atspi_mode)
+ if (elm_atspi_accessible_enabled_is())
{
- Eo *root;
elm_interface_atspi_window_created_signal_emit(obj);
eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, root = elm_interface_atspi_accessible_root_get());
if (root)