summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <lukasz.stanislawski@gmail.com>2017-04-05 22:07:45 +0200
committerLukasz Stanislawski <l.stanislaws@samsung.com>2017-05-29 15:38:44 +0200
commit0856fca1636b02c0219c033cbf3f48dc3e3e8d77 (patch)
treefc4356cda9685d59b740b4c6d6a3dbfeadbafe14
parente11a2d78ee61151eefddadd2a628f753183feb04 (diff)
elementary: refactor atspi event handling
-rw-r--r--src/lib/elementary/efl_ui_text.c8
-rw-r--r--src/lib/elementary/elm_atspi_bridge.c119
-rw-r--r--src/lib/elementary/elm_entry.c15
-rw-r--r--src/lib/elementary/elm_interface_atspi_accessible.c64
-rw-r--r--src/lib/elementary/elm_interface_atspi_accessible.eo24
-rw-r--r--src/lib/elementary/elm_interface_atspi_accessible.h56
-rw-r--r--src/lib/elementary/elm_interface_atspi_window.h28
-rw-r--r--src/lib/elementary/elm_menu.c4
8 files changed, 102 insertions, 216 deletions
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index fbb882fae0..47e194e72e 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -2148,14 +2148,14 @@ _entry_changed_user_signal_cb(void *data,
2148 atspi_info.content = edje_info->change.insert.content; 2148 atspi_info.content = edje_info->change.insert.content;
2149 atspi_info.pos = edje_info->change.insert.pos; 2149 atspi_info.pos = edje_info->change.insert.pos;
2150 atspi_info.len = edje_info->change.insert.plain_length; 2150 atspi_info.len = edje_info->change.insert.plain_length;
2151 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info); 2151 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info);
2152 } 2152 }
2153 else if (edje_info && !edje_info->insert) 2153 else if (edje_info && !edje_info->insert)
2154 { 2154 {
2155 atspi_info.content = edje_info->change.del.content; 2155 atspi_info.content = edje_info->change.del.content;
2156 atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end); 2156 atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end);
2157 atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos; 2157 atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos;
2158 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info); 2158 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info);
2159 } 2159 }
2160 } 2160 }
2161} 2161}
@@ -2207,7 +2207,7 @@ _entry_cursor_changed_signal_cb(void *data,
2207 } 2207 }
2208 _cursor_geometry_recalc(data); 2208 _cursor_geometry_recalc(data);
2209 if (_elm_config->atspi_mode) 2209 if (_elm_config->atspi_mode)
2210 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL); 2210 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL);
2211} 2211}
2212 2212
2213static void 2213static void
@@ -2219,7 +2219,7 @@ _entry_cursor_changed_manual_signal_cb(void *data,
2219 efl_event_callback_legacy_call 2219 efl_event_callback_legacy_call
2220 (data, EFL_UI_TEXT_EVENT_CURSOR_CHANGED_MANUAL, NULL); 2220 (data, EFL_UI_TEXT_EVENT_CURSOR_CHANGED_MANUAL, NULL);
2221 if (_elm_config->atspi_mode) 2221 if (_elm_config->atspi_mode)
2222 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL); 2222 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL);
2223} 2223}
2224 2224
2225static void 2225static void
diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c
index 7d004cd23e..48d410fd9a 100644
--- a/src/lib/elementary/elm_atspi_bridge.c
+++ b/src/lib/elementary/elm_atspi_bridge.c
@@ -94,7 +94,6 @@ typedef struct _Elm_Atspi_Bridge_Data
94 Eldbus_Service_Interface *value; 94 Eldbus_Service_Interface *value;
95 } interfaces; 95 } interfaces;
96 Elm_Atspi_Event_Handler *event_hdlr; 96 Elm_Atspi_Event_Handler *event_hdlr;
97 Eina_Hash *event_hash;
98 Eina_Bool connected : 1; 97 Eina_Bool connected : 1;
99} Elm_Atspi_Bridge_Data; 98} Elm_Atspi_Bridge_Data;
100 99
@@ -140,23 +139,16 @@ static void _bridge_iter_object_reference_append(Eo *bridge, Eldbus_Message_Iter
140static void _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj); 139static void _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj);
141static Eina_Bool _elm_atspi_bridge_key_filter(void *data, void *loop, int type, void *event); 140static Eina_Bool _elm_atspi_bridge_key_filter(void *data, void *loop, int type, void *event);
142static void _object_desktop_reference_append(Eldbus_Message_Iter *iter); 141static void _object_desktop_reference_append(Eldbus_Message_Iter *iter);
143static void _on_object_add(void *data, const Efl_Event *event); 142static void _bridge_object_added_signal_send(Elm_Atspi_Bridge *bridge, Eo *object);
144static void _on_object_del(void *data, const Efl_Event *event); 143static void _bridge_object_removed_signal_send(Elm_Atspi_Bridge *bridge, Eo *object);
145 144
146typedef struct { 145EFL_CALLBACKS_ARRAY_DEFINE(event_handlers,
147 const Efl_Event_Description *desc;
148 const Efl_Event_Cb callback;
149} Elm_Atspi_Bridge_Event_Handler;
150
151static const Elm_Atspi_Bridge_Event_Handler event_handlers[] = {
152 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED, _children_changed_signal_send}, 146 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED, _children_changed_signal_send},
153 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, _property_changed_signal_send}, 147 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, _property_changed_signal_send},
154 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_BOUNDS_CHANGED, _bounds_changed_signal_send}, 148 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_BOUNDS_CHANGED, _bounds_changed_signal_send},
155 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_STATE_CHANGED, _state_changed_signal_send}, 149 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_STATE_CHANGED, _state_changed_signal_send},
156 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_VISIBLE_DATA_CHANGED, _visible_data_changed_signal_send}, 150 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_VISIBLE_DATA_CHANGED, _visible_data_changed_signal_send},
157 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_ACTIVE_DESCENDANT_CHANGED, _active_descendant_changed_signal_send}, 151 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_ACTIVE_DESCENDANT_CHANGED, _active_descendant_changed_signal_send},
158 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_ADDED, _on_object_add},
159 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_REMOVED, _on_object_del},
160 { ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_CREATED, _window_signal_send}, 152 { ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_CREATED, _window_signal_send},
161 { ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_DESTROYED, _window_signal_send}, 153 { ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_DESTROYED, _window_signal_send},
162 { ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_ACTIVATED, _window_signal_send}, 154 { ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_ACTIVATED, _window_signal_send},
@@ -169,7 +161,7 @@ static const Elm_Atspi_Bridge_Event_Handler event_handlers[] = {
169 { ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, _text_text_inserted_send }, 161 { ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, _text_text_inserted_send },
170 { ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_REMOVED, _text_text_removed_send }, 162 { ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_REMOVED, _text_text_removed_send },
171 { ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, _text_selection_changed_send } 163 { ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, _text_selection_changed_send }
172}; 164);
173 165
174enum _Atspi_Object_Child_Event_Type 166enum _Atspi_Object_Child_Event_Type
175{ 167{
@@ -559,7 +551,6 @@ _accessible_get_children(const Eldbus_Service_Interface *iface, const Eldbus_Mes
559 EINA_LIST_FOREACH(children_list, l, children) 551 EINA_LIST_FOREACH(children_list, l, children)
560 { 552 {
561 _bridge_iter_object_reference_append(bridge, iter_array, children); 553 _bridge_iter_object_reference_append(bridge, iter_array, children);
562 _bridge_object_register(bridge, children);
563 } 554 }
564 555
565 eldbus_message_iter_container_close(iter, iter_array); 556 eldbus_message_iter_container_close(iter, iter_array);
@@ -692,18 +683,6 @@ _elm_atspi_state_hash_build(void)
692 return ret; 683 return ret;
693} 684}
694 685
695static Eina_Hash*
696_elm_atspi_event_hash_build(void)
697{
698 Eina_Hash *ret = eina_hash_pointer_new(NULL);
699 unsigned int i = 0;
700
701 for (i = 0; i < SIZE(event_handlers); i++)
702 eina_hash_add(ret, &(event_handlers[i].desc), event_handlers[i].callback);
703
704 return ret;
705}
706
707static Eldbus_Message * 686static Eldbus_Message *
708_accessible_get_state(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg) 687_accessible_get_state(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
709{ 688{
@@ -789,7 +768,6 @@ _accessible_child_at_index(const Eldbus_Service_Interface *iface EINA_UNUSED, co
789 768
790 child = eina_list_nth(children, idx); 769 child = eina_list_nth(children, idx);
791 _bridge_iter_object_reference_append(bridge, iter, child); 770 _bridge_iter_object_reference_append(bridge, iter, child);
792 _bridge_object_register(bridge, child);
793 eina_list_free(children); 771 eina_list_free(children);
794 772
795 return ret; 773 return ret;
@@ -827,7 +805,6 @@ _accessible_get_relation_set(const Eldbus_Service_Interface *iface EINA_UNUSED,
827 EINA_LIST_FOREACH(rel->objects, l2, rel_obj) 805 EINA_LIST_FOREACH(rel->objects, l2, rel_obj)
828 { 806 {
829 _bridge_iter_object_reference_append(bridge, iter_array2, rel_obj); 807 _bridge_iter_object_reference_append(bridge, iter_array2, rel_obj);
830 _bridge_object_register(bridge, rel_obj);
831 } 808 }
832 eldbus_message_iter_container_close(iter_struct, iter_array2); 809 eldbus_message_iter_container_close(iter_struct, iter_array2);
833 eldbus_message_iter_container_close(iter_array, iter_struct); 810 eldbus_message_iter_container_close(iter_array, iter_struct);
@@ -881,7 +858,6 @@ _selection_selected_child_get(const Eldbus_Service_Interface *iface EINA_UNUSED,
881 child = elm_interface_atspi_selection_selected_child_get(obj, idx); 858 child = elm_interface_atspi_selection_selected_child_get(obj, idx);
882 859
883 _bridge_iter_object_reference_append(bridge, iter, child); 860 _bridge_iter_object_reference_append(bridge, iter, child);
884 _bridge_object_register(bridge, child);
885 861
886 return ret; 862 return ret;
887} 863}
@@ -2877,7 +2853,6 @@ _collection_return_msg_from_list(Elm_Atspi_Bridge *bridge, const Eldbus_Message
2877 2853
2878 EINA_LIST_FOREACH(objs, l, obj) 2854 EINA_LIST_FOREACH(objs, l, obj)
2879 { 2855 {
2880 _bridge_object_register(bridge, obj);
2881 _bridge_iter_object_reference_append(bridge, array_iter, obj); 2856 _bridge_iter_object_reference_append(bridge, array_iter, obj);
2882 } 2857 }
2883 2858
@@ -3180,7 +3155,9 @@ _cache_item_reference_append_cb(Eo *bridge, Eo *data, Eldbus_Message_Iter *iter_
3180 EINA_SAFETY_ON_NULL_GOTO(iter_sub_array, fail); 3155 EINA_SAFETY_ON_NULL_GOTO(iter_sub_array, fail);
3181 3156
3182 EINA_LIST_FOREACH(children_list, l, child) 3157 EINA_LIST_FOREACH(children_list, l, child)
3183 _bridge_iter_object_reference_append(bridge, iter_sub_array, child); 3158 {
3159 _bridge_iter_object_reference_append(bridge, iter_sub_array, child);
3160 }
3184 3161
3185 eldbus_message_iter_container_close(iter_struct, iter_sub_array); 3162 eldbus_message_iter_container_close(iter_struct, iter_sub_array);
3186 eina_list_free(children_list); 3163 eina_list_free(children_list);
@@ -3255,7 +3232,6 @@ _cache_get_items(const Eldbus_Service_Interface *iface, const Eldbus_Message *ms
3255 Eo *obj = eina_list_data_get(to_process); 3232 Eo *obj = eina_list_data_get(to_process);
3256 to_process = eina_list_remove_list(to_process, to_process); 3233 to_process = eina_list_remove_list(to_process, to_process);
3257 _cache_item_reference_append_cb(bridge, obj, iter_array); 3234 _cache_item_reference_append_cb(bridge, obj, iter_array);
3258 _bridge_object_register(bridge, obj);
3259 3235
3260 Eina_List *children; 3236 Eina_List *children;
3261 children = elm_interface_atspi_accessible_children_get(obj); 3237 children = elm_interface_atspi_accessible_children_get(obj);
@@ -3337,7 +3313,6 @@ _component_get_accessible_at_point(const Eldbus_Service_Interface *iface EINA_UN
3337 Eina_Bool type = coord_type == ATSPI_COORD_TYPE_SCREEN ? EINA_TRUE : EINA_FALSE; 3313 Eina_Bool type = coord_type == ATSPI_COORD_TYPE_SCREEN ? EINA_TRUE : EINA_FALSE;
3338 accessible = elm_interface_atspi_component_accessible_at_point_get(obj, type, x, y); 3314 accessible = elm_interface_atspi_component_accessible_at_point_get(obj, type, x, y);
3339 _bridge_iter_object_reference_append(bridge, iter, accessible); 3315 _bridge_iter_object_reference_append(bridge, iter, accessible);
3340 _bridge_object_register(bridge, accessible);
3341 3316
3342 return ret; 3317 return ret;
3343} 3318}
@@ -3633,6 +3608,7 @@ _elm_atspi_bridge_app_register(Eo *bridge)
3633 3608
3634 root = elm_interface_atspi_accessible_root_get(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN); 3609 root = elm_interface_atspi_accessible_root_get(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN);
3635 _bridge_iter_object_reference_append(bridge, iter, root); 3610 _bridge_iter_object_reference_append(bridge, iter, root);
3611 _bridge_object_register(bridge, root);
3636 eldbus_connection_send(pd->a11y_bus, message, _on_elm_atspi_bridge_app_register, NULL, -1); 3612 eldbus_connection_send(pd->a11y_bus, message, _on_elm_atspi_bridge_app_register, NULL, -1);
3637 3613
3638 return EINA_TRUE; 3614 return EINA_TRUE;
@@ -3653,6 +3629,7 @@ _elm_atspi_bridge_app_unregister(Eo *bridge)
3653 Eldbus_Message_Iter *iter = eldbus_message_iter_get(message); 3629 Eldbus_Message_Iter *iter = eldbus_message_iter_get(message);
3654 3630
3655 _bridge_iter_object_reference_append(bridge, iter, root); 3631 _bridge_iter_object_reference_append(bridge, iter, root);
3632 _bridge_object_unregister(bridge, root);
3656 eldbus_connection_send(pd->a11y_bus, message, NULL, NULL, -1); 3633 eldbus_connection_send(pd->a11y_bus, message, NULL, NULL, -1);
3657 3634
3658 return EINA_TRUE; 3635 return EINA_TRUE;
@@ -3939,6 +3916,7 @@ static void
3939_children_changed_signal_send(void *data, const Efl_Event *event) 3916_children_changed_signal_send(void *data, const Efl_Event *event)
3940{ 3917{
3941 const char *atspi_desc = NULL; 3918 const char *atspi_desc = NULL;
3919 Elm_Atspi_Bridge *bridge = data;
3942 Elm_Atspi_Event_Children_Changed_Data *ev_data = event->info; 3920 Elm_Atspi_Event_Children_Changed_Data *ev_data = event->info;
3943 int idx; 3921 int idx;
3944 enum _Atspi_Object_Child_Event_Type type; 3922 enum _Atspi_Object_Child_Event_Type type;
@@ -3949,11 +3927,13 @@ _children_changed_signal_send(void *data, const Efl_Event *event)
3949 { 3927 {
3950 type = ATSPI_OBJECT_CHILD_ADDED; 3928 type = ATSPI_OBJECT_CHILD_ADDED;
3951 atspi_desc = "add"; 3929 atspi_desc = "add";
3930 _bridge_object_register(bridge, ev_data->child);
3952 } 3931 }
3953 else 3932 else
3954 { 3933 {
3955 type = ATSPI_OBJECT_CHILD_REMOVED; 3934 type = ATSPI_OBJECT_CHILD_REMOVED;
3956 atspi_desc = "remove"; 3935 atspi_desc = "remove";
3936 _bridge_object_unregister(bridge, ev_data->child);
3957 } 3937 }
3958 3938
3959 if (!STATE_TYPE_GET(pd->object_children_broadcast_mask, type)) 3939 if (!STATE_TYPE_GET(pd->object_children_broadcast_mask, type))
@@ -4185,36 +4165,51 @@ _bridge_object_unregister(Eo *bridge, Eo *obj)
4185{ 4165{
4186 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd); 4166 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd);
4187 4167
4188 eina_hash_del(pd->cache, &obj, obj); 4168 // unregister object and all its descendants
4169 Eina_List *to_process = eina_list_append(NULL, obj);
4170 while (to_process)
4171 {
4172 Eo *o = eina_list_data_get(to_process);
4173 to_process = eina_list_remove_list(to_process, to_process);
4174
4175 if (!eina_hash_find(pd->cache, &o))
4176 continue;
4177
4178 eina_hash_del(pd->cache, &o, o);
4179 efl_event_callback_array_del(o, event_handlers(), bridge);
4180 _bridge_object_removed_signal_send(bridge, o);
4181
4182 Eina_List *children;
4183 children = elm_interface_atspi_accessible_children_get(o);
4184 to_process = eina_list_merge(to_process, children);
4185 }
4189} 4186}
4190 4187
4191static void 4188static void
4192_on_object_add(void *data, const Efl_Event *event) 4189_bridge_object_added_signal_send(Elm_Atspi_Bridge *bridge, Eo *object)
4193{ 4190{
4194 Eldbus_Message *sig; 4191 Eldbus_Message *sig;
4195 Eldbus_Message_Iter *iter; 4192 Eldbus_Message_Iter *iter;
4196 4193
4197 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(data, pd); 4194 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd);
4198 4195
4199 sig = eldbus_service_signal_new(pd->cache_interface, ATSPI_OBJECT_CHILD_ADDED); 4196 sig = eldbus_service_signal_new(pd->cache_interface, ATSPI_OBJECT_CHILD_ADDED);
4200 iter = eldbus_message_iter_get(sig); 4197 iter = eldbus_message_iter_get(sig);
4201 _cache_item_reference_append_cb(data, event->object, iter); 4198 _cache_item_reference_append_cb(bridge, object, iter);
4202 4199
4203 eldbus_service_signal_send(pd->cache_interface, sig); 4200 eldbus_service_signal_send(pd->cache_interface, sig);
4204} 4201}
4205 4202
4206static void 4203static void
4207_on_object_del(void *data, const Efl_Event *event) 4204_bridge_object_removed_signal_send(Elm_Atspi_Bridge *bridge, Eo *object)
4208{ 4205{
4209 Eldbus_Message *sig; 4206 Eldbus_Message *sig;
4210 4207
4211 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(data, pd); 4208 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd);
4212
4213 _bridge_object_unregister(data, event->object);
4214 4209
4215 sig = eldbus_service_signal_new(pd->cache_interface, ATSPI_OBJECT_CHILD_REMOVED); 4210 sig = eldbus_service_signal_new(pd->cache_interface, ATSPI_OBJECT_CHILD_REMOVED);
4216 Eldbus_Message_Iter *iter = eldbus_message_iter_get(sig); 4211 Eldbus_Message_Iter *iter = eldbus_message_iter_get(sig);
4217 _bridge_iter_object_reference_append(data, iter, event->object); 4212 _bridge_iter_object_reference_append(bridge, iter, object);
4218 eldbus_service_signal_send(pd->cache_interface, sig); 4213 eldbus_service_signal_send(pd->cache_interface, sig);
4219} 4214}
4220 4215
@@ -4238,6 +4233,7 @@ _interfaces_unregister(Eo *bridge)
4238 INTERFACE_SAFE_FREE(pd->interfaces.selection); 4233 INTERFACE_SAFE_FREE(pd->interfaces.selection);
4239 INTERFACE_SAFE_FREE(pd->interfaces.text); 4234 INTERFACE_SAFE_FREE(pd->interfaces.text);
4240 INTERFACE_SAFE_FREE(pd->interfaces.value); 4235 INTERFACE_SAFE_FREE(pd->interfaces.value);
4236#undef INTERFACE_SAFE_FREE
4241} 4237}
4242 4238
4243static void 4239static void
@@ -4278,12 +4274,6 @@ _a11y_connection_shutdown(Eo *bridge)
4278 if (pd->state_hash) eina_hash_free(pd->state_hash); 4274 if (pd->state_hash) eina_hash_free(pd->state_hash);
4279 pd->state_hash = NULL; 4275 pd->state_hash = NULL;
4280 4276
4281 if (pd->event_hash) eina_hash_free(pd->event_hash);
4282 pd->event_hash = NULL;
4283
4284 elm_interface_atspi_accessible_event_handler_del(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, pd->event_hdlr);
4285 pd->event_hdlr = NULL;
4286
4287 efl_event_callback_legacy_call(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, NULL); 4277 efl_event_callback_legacy_call(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, NULL);
4288 pd->connected = EINA_FALSE; 4278 pd->connected = EINA_FALSE;
4289} 4279}
@@ -4340,17 +4330,6 @@ _interfaces_register(Eo *bridge)
4340} 4330}
4341 4331
4342static void 4332static void
4343_bridge_accessible_event_dispatch(void *data, const Efl_Event *event)
4344{
4345 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(data, pd);
4346
4347 _bridge_object_register(data, event->object);
4348
4349 Efl_Event_Cb cb = eina_hash_find(pd->event_hash, &event->desc);
4350 return cb ? cb(data, event) : EINA_TRUE;
4351}
4352
4353static void
4354_a11y_bus_initialize(Eo *obj, const char *socket_addr) 4333_a11y_bus_initialize(Eo *obj, const char *socket_addr)
4355{ 4334{
4356 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(obj, pd); 4335 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(obj, pd);
@@ -4364,16 +4343,12 @@ _a11y_bus_initialize(Eo *obj, const char *socket_addr)
4364 // init data structures 4343 // init data structures
4365 pd->cache = eina_hash_pointer_new(NULL); 4344 pd->cache = eina_hash_pointer_new(NULL);
4366 pd->state_hash = _elm_atspi_state_hash_build(); 4345 pd->state_hash = _elm_atspi_state_hash_build();
4367 pd->event_hash = _elm_atspi_event_hash_build();
4368 4346
4369 // dbus init 4347 // dbus init
4370 _cache_register(obj); 4348 _cache_register(obj);
4371 _interfaces_register(obj); 4349 _interfaces_register(obj);
4372 _event_handlers_register(obj); 4350 _event_handlers_register(obj);
4373 _elm_atspi_bridge_app_register(obj); 4351 _elm_atspi_bridge_app_register(obj);
4374
4375 // register accesible object event listener
4376 pd->event_hdlr = elm_interface_atspi_accessible_event_handler_add(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, _bridge_accessible_event_dispatch, obj);
4377} 4352}
4378 4353
4379static void 4354static void
@@ -4457,10 +4432,24 @@ static void _bridge_object_register(Eo *bridge, Eo *obj)
4457 return; 4432 return;
4458 } 4433 }
4459 4434
4460 if (eina_hash_find(pd->cache, &obj)) 4435 // register object and all its descendants
4461 return; 4436 Eina_List *to_process = eina_list_append(NULL, obj);
4437 while (to_process)
4438 {
4439 Eo *o = eina_list_data_get(to_process);
4440 to_process = eina_list_remove_list(to_process, to_process);
4462 4441
4463 eina_hash_add(pd->cache, &obj, obj); 4442 if (eina_hash_find(pd->cache, &o))
4443 continue;
4444
4445 eina_hash_add(pd->cache, &o, o);
4446 _bridge_object_added_signal_send(bridge, o);
4447 efl_event_callback_array_add(o, event_handlers(), bridge);
4448
4449 Eina_List *children;
4450 children = elm_interface_atspi_accessible_children_get(o);
4451 to_process = eina_list_merge(to_process, children);
4452 }
4464} 4453}
4465 4454
4466void 4455void
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 1880a03cb9..d251999379 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -2187,14 +2187,14 @@ _entry_changed_user_signal_cb(void *data,
2187 atspi_info.content = edje_info->change.insert.content; 2187 atspi_info.content = edje_info->change.insert.content;
2188 atspi_info.pos = edje_info->change.insert.pos; 2188 atspi_info.pos = edje_info->change.insert.pos;
2189 atspi_info.len = edje_info->change.insert.plain_length; 2189 atspi_info.len = edje_info->change.insert.plain_length;
2190 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info); 2190 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info);
2191 } 2191 }
2192 else if (edje_info && !edje_info->insert) 2192 else if (edje_info && !edje_info->insert)
2193 { 2193 {
2194 atspi_info.content = edje_info->change.del.content; 2194 atspi_info.content = edje_info->change.del.content;
2195 atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end); 2195 atspi_info.pos = MIN(edje_info->change.del.start, edje_info->change.del.end);
2196 atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos; 2196 atspi_info.len = MAX(edje_info->change.del.start, edje_info->change.del.end) - atspi_info.pos;
2197 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info); 2197 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_REMOVED, &atspi_info);
2198 } 2198 }
2199 } 2199 }
2200} 2200}
@@ -2219,10 +2219,7 @@ _entry_preedit_changed_signal_cb(void *data,
2219 atspi_info.content = text; 2219 atspi_info.content = text;
2220 atspi_info.pos = edje_info->change.insert.pos; 2220 atspi_info.pos = edje_info->change.insert.pos;
2221 atspi_info.len = edje_info->change.insert.plain_length; 2221 atspi_info.len = edje_info->change.insert.plain_length;
2222 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, 2222 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED, &atspi_info);
2223 data,
2224 ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_INSERTED,
2225 &atspi_info);
2226 free(text); 2223 free(text);
2227 } 2224 }
2228 } 2225 }
@@ -2297,7 +2294,7 @@ _entry_selection_changed_signal_cb(void *data,
2297 _selection_store(ELM_SEL_TYPE_PRIMARY, data); 2294 _selection_store(ELM_SEL_TYPE_PRIMARY, data);
2298 _update_selection_handler(data); 2295 _update_selection_handler(data);
2299 if (_elm_config->atspi_mode) 2296 if (_elm_config->atspi_mode)
2300 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, NULL); 2297 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_SELECTION_CHANGED, NULL);
2301} 2298}
2302 2299
2303static void 2300static void
@@ -2397,7 +2394,7 @@ _entry_cursor_changed_signal_cb(void *data,
2397 efl_event_callback_legacy_call(data, ELM_ENTRY_EVENT_CURSOR_CHANGED, NULL); 2394 efl_event_callback_legacy_call(data, ELM_ENTRY_EVENT_CURSOR_CHANGED, NULL);
2398 2395
2399 if (_elm_config->atspi_mode) 2396 if (_elm_config->atspi_mode)
2400 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL); 2397 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL);
2401} 2398}
2402 2399
2403static void 2400static void
@@ -2409,7 +2406,7 @@ _entry_cursor_changed_manual_signal_cb(void *data,
2409 efl_event_callback_legacy_call 2406 efl_event_callback_legacy_call
2410 (data, ELM_ENTRY_EVENT_CURSOR_CHANGED_MANUAL, NULL); 2407 (data, ELM_ENTRY_EVENT_CURSOR_CHANGED_MANUAL, NULL);
2411 if (_elm_config->atspi_mode) 2408 if (_elm_config->atspi_mode)
2412 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL); 2409 efl_event_callback_call(data, ELM_INTERFACE_ATSPI_TEXT_EVENT_ACCESS_TEXT_CARET_MOVED, NULL);
2413} 2410}
2414 2411
2415static void 2412static void
diff --git a/src/lib/elementary/elm_interface_atspi_accessible.c b/src/lib/elementary/elm_interface_atspi_accessible.c
index 35173af6d7..f6dadf0fd1 100644
--- a/src/lib/elementary/elm_interface_atspi_accessible.c
+++ b/src/lib/elementary/elm_interface_atspi_accessible.c
@@ -115,12 +115,6 @@ const char* Atspi_Name[] = {
115 "last defined" 115 "last defined"
116}; 116};
117 117
118struct _Elm_Atspi_Event_Handler
119{
120 Efl_Event_Cb cb;
121 void *data;
122};
123
124struct _Elm_Interface_Atspi_Accessible_Data 118struct _Elm_Interface_Atspi_Accessible_Data
125{ 119{
126 EINA_INLIST; 120 EINA_INLIST;
@@ -137,7 +131,6 @@ struct _Elm_Interface_Atspi_Accessible_Data
137typedef struct _Elm_Interface_Atspi_Accessible_Data Elm_Interface_Atspi_Accessible_Data; 131typedef struct _Elm_Interface_Atspi_Accessible_Data Elm_Interface_Atspi_Accessible_Data;
138 132
139 133
140static Eina_List *global_callbacks;
141static Eo *root; 134static Eo *root;
142 135
143EOLIAN static int 136EOLIAN static int
@@ -318,62 +311,6 @@ EAPI void elm_atspi_attributes_list_free(Eina_List *list)
318} 311}
319 312
320EOLIAN void 313EOLIAN void
321_elm_interface_atspi_accessible_event_emit(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Eo *accessible, const Efl_Event_Description *event, void *event_info)
322{
323 Eina_List *l;
324 Elm_Atspi_Event_Handler *hdl;
325
326 if (!accessible || !event || !efl_isa(accessible, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
327 {
328 CRI("Invalid parameters, event: %s, obj: %s", event ? event->name : "NULL", accessible ? efl_class_name_get(accessible) : "NULL");
329 return;
330 }
331
332 if ((elm_interface_atspi_accessible_parent_get(accessible) == NULL)
333 && !efl_isa(accessible, ELM_ATSPI_APP_OBJECT_CLASS))
334 return;
335
336 Efl_Event ev;
337 ev.object = accessible;
338 ev.desc = event;
339 ev.info = event_info;
340 EINA_LIST_FOREACH(global_callbacks, l, hdl)
341 {
342 if (hdl->cb)
343 hdl->cb(hdl->data, &ev);
344 }
345}
346
347EOLIAN Elm_Atspi_Event_Handler *
348_elm_interface_atspi_accessible_event_handler_add(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Efl_Event_Cb cb, void *data)
349{
350 Elm_Atspi_Event_Handler *ret = calloc(1, sizeof(Elm_Atspi_Event_Handler));
351
352 ret->cb = cb;
353 ret->data = data;
354
355 global_callbacks = eina_list_append(global_callbacks, ret);
356
357 return ret;
358}
359
360EOLIAN void
361_elm_interface_atspi_accessible_event_handler_del(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Elm_Atspi_Event_Handler *handler)
362{
363 Eina_List *l, *l2;
364 Elm_Atspi_Event_Handler *hdl;
365 EINA_LIST_FOREACH_SAFE(global_callbacks, l, l2, hdl)
366 {
367 if (hdl == handler)
368 {
369 global_callbacks = eina_list_remove_list(global_callbacks, l);
370 free(hdl);
371 break;
372 }
373 }
374}
375
376EOLIAN void
377_elm_interface_atspi_accessible_translation_domain_set(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd, const char *domain) 314_elm_interface_atspi_accessible_translation_domain_set(Eo *obj EINA_UNUSED, Elm_Interface_Atspi_Accessible_Data *pd, const char *domain)
378{ 315{
379 eina_stringshare_replace(&pd->translation_domain, domain); 316 eina_stringshare_replace(&pd->translation_domain, domain);
@@ -577,7 +514,6 @@ _elm_interface_atspi_accessible_efl_object_destructor(Eo *obj, Elm_Interface_Ats
577 EINA_INLIST_FOREACH(pd->children, child_data) 514 EINA_INLIST_FOREACH(pd->children, child_data)
578 child_data->parent = NULL; 515 child_data->parent = NULL;
579 516
580 elm_interface_atspi_accessible_removed(obj);
581 eina_stringshare_del(pd->name); 517 eina_stringshare_del(pd->name);
582 eina_stringshare_del(pd->description); 518 eina_stringshare_del(pd->description);
583 eina_stringshare_del(pd->translation_domain); 519 eina_stringshare_del(pd->translation_domain);
diff --git a/src/lib/elementary/elm_interface_atspi_accessible.eo b/src/lib/elementary/elm_interface_atspi_accessible.eo
index 941670bbde..4d2c29c602 100644
--- a/src/lib/elementary/elm_interface_atspi_accessible.eo
+++ b/src/lib/elementary/elm_interface_atspi_accessible.eo
@@ -329,28 +329,6 @@ mixin Elm.Interface.Atspi_Accessible (Efl.Interface, Efl.Object)
329 states: Elm.Atspi.State_Set; [[Accessible state set]] 329 states: Elm.Atspi.State_Set; [[Accessible state set]]
330 } 330 }
331 } 331 }
332 event_handler_add @class @protected {
333 [[Register accessibility event listener]]
334 params {
335 @in cb: Efl_Event_Cb; [[Callback]]
336 @in data: void_ptr; [[Data]]
337 }
338 return: ptr(Elm.Atspi.Event.Handler); [[Event handler]]
339 }
340 event_handler_del @class @protected {
341 [[Deregister accessibility event listener]]
342 params {
343 @in handler: ptr(Elm.Atspi.Event.Handler); [[Event handler]]
344 }
345 }
346 event_emit @class @protected {
347 [[Emit event]]
348 params {
349 @in accessible: Elm.Interface.Atspi_Accessible; [[Accessibility object.]]
350 @in event: ptr(const(Efl.Event.Description)); [[Accessibility event type.]]
351 @in event_info: void_ptr; [[Accessibility event details.]]
352 }
353 }
354 @property translation_domain { 332 @property translation_domain {
355 [[The translation domain of "name" and "description" 333 [[The translation domain of "name" and "description"
356 properties. 334 properties.
@@ -426,7 +404,5 @@ mixin Elm.Interface.Atspi_Accessible (Efl.Interface, Efl.Object)
426 bounds,changed: Elm.Atspi.Event.Geometry_Changed.Data; [[Called when bounds have changed]] 404 bounds,changed: Elm.Atspi.Event.Geometry_Changed.Data; [[Called when bounds have changed]]
427 visible,data,changed; [[Called when visibility has changed]] 405 visible,data,changed; [[Called when visibility has changed]]
428 active,descendant,changed; [[Called when active state of descendant has changed]] 406 active,descendant,changed; [[Called when active state of descendant has changed]]
429 added; [[Called when item was added]]
430 removed; [[Called when item was removed]]
431 } 407 }
432} 408}
diff --git a/src/lib/elementary/elm_interface_atspi_accessible.h b/src/lib/elementary/elm_interface_atspi_accessible.h
index 5116983c22..17e5995b66 100644
--- a/src/lib/elementary/elm_interface_atspi_accessible.h
+++ b/src/lib/elementary/elm_interface_atspi_accessible.h
@@ -68,96 +68,84 @@ EAPI Elm_Atspi_Relation_Set elm_atspi_relation_set_clone(const Elm_Atspi_Relatio
68#ifdef EFL_EO_API_SUPPORT 68#ifdef EFL_EO_API_SUPPORT
69 69
70/** 70/**
71 * Emits ATSPI 'StateChanged' dbus signal. 71 * Emits ATSPI 'StateChanged' event.
72 */ 72 */
73#define elm_interface_atspi_accessible_state_changed_signal_emit(obj, tp, nvl) \ 73#define elm_interface_atspi_accessible_state_changed_signal_emit(obj, tp, nvl) \
74 { do { \ 74 { do { \
75 Elm_Atspi_Event_State_Changed_Data evinfo; \ 75 Elm_Atspi_Event_State_Changed_Data evinfo; \
76 evinfo.type = (tp); \ 76 evinfo.type = (tp); \
77 evinfo.new_value = (nvl); \ 77 evinfo.new_value = (nvl); \
78 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_STATE_CHANGED, (void*)&evinfo); \ 78 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_STATE_CHANGED, (void*)&evinfo); \
79 } while(0); } 79 } while(0); }
80 80
81/** 81/**
82 * Emits ATSPI 'BoundsChanged' dbus signal. 82 * Emits ATSPI 'BoundsChanged' event.
83 */ 83 */
84#define elm_interface_atspi_accessible_bounds_changed_signal_emit(obj, x, y, width, height) \ 84#define elm_interface_atspi_accessible_bounds_changed_signal_emit(obj, x, y, width, height) \
85 do { \ 85 do { \
86 Elm_Atspi_Event_Geometry_Changed_Data evinfo = { x, y, width, height }; \ 86 Elm_Atspi_Event_Geometry_Changed_Data evinfo = { x, y, width, height }; \
87 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_BOUNDS_CHANGED, (void*)&evinfo); \ 87 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_BOUNDS_CHANGED, (void*)&evinfo); \
88 } while(0); 88 } while(0);
89 89
90/** 90/**
91 * Emits ATSPI 'PropertyChanged' dbus signal for 'Name' property. 91 * Emits ATSPI 'PropertyChanged' event for 'Name' property.
92 */ 92 */
93#define elm_interface_atspi_accessible_name_changed_signal_emit(obj) \ 93#define elm_interface_atspi_accessible_name_changed_signal_emit(obj) \
94 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "name"); 94 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "name");
95 95
96/** 96/**
97 * Emits ATSPI 'PropertyChanged' dbus signal for 'Description' property. 97 * Emits ATSPI 'PropertyChanged' event for 'Description' property.
98 */ 98 */
99#define elm_interface_atspi_accessible_description_changed_signal_emit(obj) \ 99#define elm_interface_atspi_accessible_description_changed_signal_emit(obj) \
100 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "description"); 100 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "description");
101 101
102/** 102/**
103 * Emits ATSPI 'PropertyChanged' dbus signal for 'Parent' property. 103 * Emits ATSPI 'PropertyChanged' event for 'Parent' property.
104 */ 104 */
105#define elm_interface_atspi_accessible_parent_changed_signal_emit(obj) \ 105#define elm_interface_atspi_accessible_parent_changed_signal_emit(obj) \
106 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "parent"); 106 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "parent");
107 107
108/** 108/**
109 * Emits ATSPI 'PropertyChanged' dbus signal for 'Role' property. 109 * Emits ATSPI 'PropertyChanged' event for 'Role' property.
110 */ 110 */
111#define elm_interface_atspi_accessible_role_changed_signal_emit(obj) \ 111#define elm_interface_atspi_accessible_role_changed_signal_emit(obj) \
112 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "role"); 112 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "role");
113 113
114/** 114/**
115 * Emits ATSPI 'PropertyChanged' dbus signal for 'Value' property. 115 * Emits ATSPI 'PropertyChanged' event for 'Value' property.
116 */ 116 */
117#define elm_interface_atspi_accessible_value_changed_signal_emit(obj) \ 117#define elm_interface_atspi_accessible_value_changed_signal_emit(obj) \
118 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "value"); 118 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "value");
119 119
120/** 120/**
121 * Emits ATSPI 'ChildrenChanged' dbus signal with added child as argument. 121 * Emits ATSPI 'ChildrenChanged' event with added child as argument.
122 */ 122 */
123#define elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, child) \ 123#define elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, child) \
124 do { \ 124 do { \
125 Elm_Atspi_Event_Children_Changed_Data atspi_data = { EINA_TRUE, child }; \ 125 Elm_Atspi_Event_Children_Changed_Data atspi_data = { EINA_TRUE, child }; \
126 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED, &atspi_data); \ 126 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED, &atspi_data); \
127 } while(0); 127 } while(0);
128 128
129/** 129/**
130 * Emits ATSPI 'ChildrenChanged' dbus signal with deleted child as argument. 130 * Emits ATSPI 'ChildrenChanged' event with deleted child as argument.
131 */ 131 */
132#define elm_interface_atspi_accessible_children_changed_del_signal_emit(obj, child) \ 132#define elm_interface_atspi_accessible_children_changed_del_signal_emit(obj, child) \
133 do { \ 133 do { \
134 Elm_Atspi_Event_Children_Changed_Data atspi_data = { EINA_FALSE, child }; \ 134 Elm_Atspi_Event_Children_Changed_Data atspi_data = { EINA_FALSE, child }; \
135 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED, &atspi_data); \ 135 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED, &atspi_data); \
136 } while(0); 136 } while(0);
137 137
138/** 138/**
139 * Emits ATSPI 'ActiveDescendantChanged' dbus signal. 139 * Emits ATSPI 'ActiveDescendantChanged' event.
140 */ 140 */
141#define elm_interface_atspi_accessible_active_descendant_changed_signal_emit(obj, child) \ 141#define elm_interface_atspi_accessible_active_descendant_changed_signal_emit(obj, child) \
142 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_ACTIVE_DESCENDANT_CHANGED, child); 142 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_ACTIVE_DESCENDANT_CHANGED, child);
143 143
144/** 144/**
145 * Emits ATSPI 'VisibleDataChanged' dbus signal. 145 * Emits ATSPI 'VisibleDataChanged' event.
146 */ 146 */
147#define elm_interface_atspi_accessible_visible_data_changed_signal_emit(obj) \ 147#define elm_interface_atspi_accessible_visible_data_changed_signal_emit(obj) \
148 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_VISIBLE_DATA_CHANGED, NULL); 148 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_VISIBLE_DATA_CHANGED, NULL);
149
150/**
151 * Emits ATSPI 'AddAccessible' dbus signal.
152 */
153#define elm_interface_atspi_accessible_added(obj) \
154 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_ADDED, NULL);
155
156/**
157 * Emits ATSPI 'RemoveAccessible' dbus signal.
158 */
159#define elm_interface_atspi_accessible_removed(obj) \
160 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_REMOVED, NULL);
161 149
162#endif 150#endif
163 151
diff --git a/src/lib/elementary/elm_interface_atspi_window.h b/src/lib/elementary/elm_interface_atspi_window.h
index a6e9b4e659..e715d6fb1e 100644
--- a/src/lib/elementary/elm_interface_atspi_window.h
+++ b/src/lib/elementary/elm_interface_atspi_window.h
@@ -5,46 +5,46 @@
5#ifdef EFL_EO_API_SUPPORT 5#ifdef EFL_EO_API_SUPPORT
6 6
7/** 7/**
8 * Emits ATSPI 'Window:Activated' dbus signal. 8 * Emits ATSPI 'Window:Activated' event.
9 */ 9 */
10#define elm_interface_atspi_window_activated_signal_emit(obj) \ 10#define elm_interface_atspi_window_activated_signal_emit(obj) \
11 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_ACTIVATED, NULL); 11 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_ACTIVATED, NULL);
12 12
13/** 13/**
14 * Emits ATSPI 'Window:Deactivated' dbus signal. 14 * Emits ATSPI 'Window:Deactivated' event.
15 */ 15 */
16#define elm_interface_atspi_window_deactivated_signal_emit(obj) \ 16#define elm_interface_atspi_window_deactivated_signal_emit(obj) \
17 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_DEACTIVATED, NULL); 17 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_DEACTIVATED, NULL);
18 18
19/** 19/**
20 * Emits ATSPI 'Window:Created' dbus signal. 20 * Emits ATSPI 'Window:Created' event.
21 */ 21 */
22#define elm_interface_atspi_window_created_signal_emit(obj) \ 22#define elm_interface_atspi_window_created_signal_emit(obj) \
23 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_CREATED, NULL); 23 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_CREATED, NULL);
24 24
25/** 25/**
26 * Emits ATSPI 'Window:Destroyed' dbus signal. 26 * Emits ATSPI 'Window:Destroyed' event.
27 */ 27 */
28#define elm_interface_atspi_window_destroyed_signal_emit(obj) \ 28#define elm_interface_atspi_window_destroyed_signal_emit(obj) \
29 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_DESTROYED, NULL); 29 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_DESTROYED, NULL);
30 30
31/** 31/**
32 * Emits ATSPI 'Window:Maximized' dbus signal. 32 * Emits ATSPI 'Window:Maximized' event.
33 */ 33 */
34#define elm_interface_atspi_window_maximized_signal_emit(obj) \ 34#define elm_interface_atspi_window_maximized_signal_emit(obj) \
35 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_MAXIMIZED, NULL); 35 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_MAXIMIZED, NULL);
36 36
37/** 37/**
38 * Emits ATSPI 'Window:Minimized' dbus signal. 38 * Emits ATSPI 'Window:Minimized' event.
39 */ 39 */
40#define elm_interface_atspi_window_minimized_signal_emit(obj) \ 40#define elm_interface_atspi_window_minimized_signal_emit(obj) \
41 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_MINIMIZED, NULL); 41 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_MINIMIZED, NULL);
42 42
43/** 43/**
44 * Emits ATSPI 'Window:Restored' dbus signal. 44 * Emits ATSPI 'Window:Restored' event.
45 */ 45 */
46#define elm_interface_atspi_window_restored_signal_emit(obj) \ 46#define elm_interface_atspi_window_restored_signal_emit(obj) \
47 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_RESTORED, NULL); 47 efl_event_callback_call(obj, ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_RESTORED, NULL);
48 48
49#include "elm_interface_atspi_window.eo.h" 49#include "elm_interface_atspi_window.eo.h"
50#endif 50#endif
diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c
index c4df8e4886..b338e3f32e 100644
--- a/src/lib/elementary/elm_menu.c
+++ b/src/lib/elementary/elm_menu.c
@@ -496,7 +496,7 @@ _menu_item_activate_cb(void *data,
496 if (eo_item2 != EO_OBJ(item)) 496 if (eo_item2 != EO_OBJ(item))
497 elm_menu_item_selected_set(eo_item2, 0); 497 elm_menu_item_selected_set(eo_item2, 0);
498 } 498 }
499 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, EO_OBJ(item->parent), ELM_INTERFACE_ATSPI_SELECTION_EVENT_SELECTION_CHANGED, NULL); 499 efl_event_callback_call(EO_OBJ(item->parent), ELM_INTERFACE_ATSPI_SELECTION_EVENT_SELECTION_CHANGED, NULL);
500 } 500 }
501 else 501 else
502 { 502 {
@@ -511,7 +511,7 @@ _menu_item_activate_cb(void *data,
511 elm_menu_item_selected_set(eo_item2, 0); 511 elm_menu_item_selected_set(eo_item2, 0);
512 } 512 }
513 } 513 }
514 elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, WIDGET(item), ELM_INTERFACE_ATSPI_SELECTION_EVENT_SELECTION_CHANGED, NULL); 514 efl_event_callback_call(WIDGET(item), ELM_INTERFACE_ATSPI_SELECTION_EVENT_SELECTION_CHANGED, NULL);
515 if (sd->menu_bar && was_open) 515 if (sd->menu_bar && was_open)
516 _menu_item_select_cb(item, NULL, NULL, NULL); 516 _menu_item_select_cb(item, NULL, NULL, NULL);
517 } 517 }