summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2017-05-31 17:15:56 +0200
committerLukasz Stanislawski <l.stanislaws@samsung.com>2017-06-02 15:24:28 +0200
commit36e883e89461480f765fdd2f94e250d3ba94205e (patch)
tree08665bcbfaaec015dd5b930c5d24d06122d0b63c
parent6c22f0ea1fcccc5f1a428061f9b34e7075481178 (diff)
elementary: add accessibility observer abstractiondevs/stanluk/refactor
Change-Id: Ie3307522b49e3c73e76644e21ae12850524bc1e8
-rw-r--r--src/Makefile_Elementary.am9
-rw-r--r--src/bin/elementary/test_win_plug.c2
-rw-r--r--src/bin/elementary/test_win_socket.c6
-rw-r--r--src/examples/elementary/a11y/efl-gtk-integration/plug/efl-socket.c1
-rw-r--r--src/lib/elementary/elm_atspi_app_object.c14
-rw-r--r--src/lib/elementary/elm_atspi_app_object.eo8
-rw-r--r--src/lib/elementary/elm_atspi_bridge.c104
-rw-r--r--src/lib/elementary/elm_atspi_bridge.eo3
-rw-r--r--src/lib/elementary/elm_atspi_plug.c33
-rw-r--r--src/lib/elementary/elm_atspi_plug.eo46
-rw-r--r--src/lib/elementary/elm_atspi_socket.c14
-rw-r--r--src/lib/elementary/elm_atspi_socket.eo25
-rw-r--r--src/lib/elementary/elm_interface_accessible_observer.c8
-rw-r--r--src/lib/elementary/elm_interface_accessible_observer.eo20
-rw-r--r--src/lib/elementary/elm_interface_accessible_observer.h8
-rw-r--r--src/lib/elementary/elm_interface_atspi_accessible.c43
-rw-r--r--src/lib/elementary/elm_interface_atspi_accessible.eo16
-rw-r--r--src/lib/elementary/elm_interface_atspi_socket.c69
-rw-r--r--src/lib/elementary/elm_interface_atspi_socket.eo69
-rw-r--r--src/lib/elementary/elm_interfaces.h3
20 files changed, 257 insertions, 244 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 4a28d376db..3f57be8b8e 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -2,9 +2,8 @@
2### Library 2### Library
3 3
4elm_public_eolian_files = \ 4elm_public_eolian_files = \
5 lib/elementary/elm_atspi_bridge.eo \
6 lib/elementary/elm_atspi_app_object.eo \
7 lib/elementary/elm_atspi_plug.eo \ 5 lib/elementary/elm_atspi_plug.eo \
6 lib/elementary/elm_atspi_app_object.eo \
8 lib/elementary/elm_atspi_proxy.eo \ 7 lib/elementary/elm_atspi_proxy.eo \
9 lib/elementary/elm_atspi_socket.eo \ 8 lib/elementary/elm_atspi_socket.eo \
10 lib/elementary/elm_bg.eo \ 9 lib/elementary/elm_bg.eo \
@@ -37,7 +36,6 @@ elm_public_eolian_files = \
37 lib/elementary/elm_interface_atspi_text_editable.eo \ 36 lib/elementary/elm_interface_atspi_text_editable.eo \
38 lib/elementary/elm_interface_atspi_image.eo \ 37 lib/elementary/elm_interface_atspi_image.eo \
39 lib/elementary/elm_interface_atspi_selection.eo \ 38 lib/elementary/elm_interface_atspi_selection.eo \
40 lib/elementary/elm_interface_atspi_socket.eo \
41 lib/elementary/elm_interface_atspi_text.eo \ 39 lib/elementary/elm_interface_atspi_text.eo \
42 lib/elementary/elm_interface_atspi_value.eo \ 40 lib/elementary/elm_interface_atspi_value.eo \
43 lib/elementary/elm_interface_atspi_widget_action.eo \ 41 lib/elementary/elm_interface_atspi_widget_action.eo \
@@ -130,6 +128,8 @@ elm_public_eolian_files = \
130 128
131# Private classes (not exposed or shipped) 129# Private classes (not exposed or shipped)
132elm_private_eolian_files = \ 130elm_private_eolian_files = \
131 lib/elementary/elm_atspi_bridge.eo \
132 lib/elementary/elm_interface_accessible_observer.eo \
133 lib/elementary/efl_ui_internal_text_interactive.eo \ 133 lib/elementary/efl_ui_internal_text_interactive.eo \
134 lib/elementary/efl_ui_win_internal_part.eo \ 134 lib/elementary/efl_ui_win_internal_part.eo \
135 tests/elementary/focus_test.eo \ 135 tests/elementary/focus_test.eo \
@@ -211,6 +211,7 @@ includesunstable_HEADERS = \
211 lib/elementary/elm_atspi_plug.h \ 211 lib/elementary/elm_atspi_plug.h \
212 lib/elementary/elm_atspi_proxy.h \ 212 lib/elementary/elm_atspi_proxy.h \
213 lib/elementary/elm_atspi_socket.h \ 213 lib/elementary/elm_atspi_socket.h \
214 lib/elementary/elm_interface_accessible_observer.h \
214 lib/elementary/elm_interface_atspi_accessible.h \ 215 lib/elementary/elm_interface_atspi_accessible.h \
215 lib/elementary/elm_interface_atspi_text.h \ 216 lib/elementary/elm_interface_atspi_text.h \
216 lib/elementary/elm_interface_atspi_widget_action.h \ 217 lib/elementary/elm_interface_atspi_widget_action.h \
@@ -607,13 +608,13 @@ lib_elementary_libelementary_la_SOURCES = \
607 lib/elementary/elm_icon.c \ 608 lib/elementary/elm_icon.c \
608 lib/elementary/efl_ui_image.c \ 609 lib/elementary/efl_ui_image.c \
609 lib/elementary/elm_index.c \ 610 lib/elementary/elm_index.c \
611 lib/elementary/elm_interface_accessible_observer.c \
610 lib/elementary/elm_interface_atspi_accessible.c \ 612 lib/elementary/elm_interface_atspi_accessible.c \
611 lib/elementary/elm_interface_atspi_action.c \ 613 lib/elementary/elm_interface_atspi_action.c \
612 lib/elementary/elm_interface_atspi_component.c \ 614 lib/elementary/elm_interface_atspi_component.c \
613 lib/elementary/elm_interface_atspi_text_editable.c \ 615 lib/elementary/elm_interface_atspi_text_editable.c \
614 lib/elementary/elm_interface_atspi_image.c \ 616 lib/elementary/elm_interface_atspi_image.c \
615 lib/elementary/elm_interface_atspi_selection.c \ 617 lib/elementary/elm_interface_atspi_selection.c \
616 lib/elementary/elm_interface_atspi_socket.c \
617 lib/elementary/elm_interface_atspi_text.c \ 618 lib/elementary/elm_interface_atspi_text.c \
618 lib/elementary/elm_interface_atspi_value.c \ 619 lib/elementary/elm_interface_atspi_value.c \
619 lib/elementary/elm_interface_atspi_widget_action.c \ 620 lib/elementary/elm_interface_atspi_widget_action.c \
diff --git a/src/bin/elementary/test_win_plug.c b/src/bin/elementary/test_win_plug.c
index 8c53f9bbdb..ee6c6cf406 100644
--- a/src/bin/elementary/test_win_plug.c
+++ b/src/bin/elementary/test_win_plug.c
@@ -186,7 +186,7 @@ a11y_init(Evas_Object *plug)
186 elm_interface_atspi_accessible_parent_set(proxy, socket); 186 elm_interface_atspi_accessible_parent_set(proxy, socket);
187 187
188 // FIXME asume bridge is connected 188 // FIXME asume bridge is connected
189 elm_interface_atspi_socket_embed(socket, proxy); 189 elm_atspi_socket_embed(socket, proxy);
190} 190}
191 191
192void 192void
diff --git a/src/bin/elementary/test_win_socket.c b/src/bin/elementary/test_win_socket.c
index ef488b46a2..0879870695 100644
--- a/src/bin/elementary/test_win_socket.c
+++ b/src/bin/elementary/test_win_socket.c
@@ -146,7 +146,7 @@ static void
146_on_plug_id_changed(void *data, const Efl_Event *event) 146_on_plug_id_changed(void *data, const Efl_Event *event)
147{ 147{
148 Elm_Atspi_Plug *plug = event->object; 148 Elm_Atspi_Plug *plug = event->object;
149 plugid = elm_interface_atspi_socket_id_get(plug); 149 plugid = elm_atspi_plug_id_get(plug);
150 // send id using elementary IPC mechanism 150 // send id using elementary IPC mechanism
151} 151}
152 152
@@ -160,9 +160,9 @@ a11y_init(Evas_Object *socket_window)
160 elm_interface_atspi_accessible_parent_set(socket_window, plug); 160 elm_interface_atspi_accessible_parent_set(socket_window, plug);
161 161
162 // get address when bridge gets connected 162 // get address when bridge gets connected
163 efl_event_callback_add(plug, ELM_INTERFACE_ATSPI_SOCKET_EVENT_ID_CHANGED, _on_plug_id_changed, NULL); 163 efl_event_callback_add(plug, ELM_OBJ_ATSPI_PLUG_EVENT_ID_CHANGED, _on_plug_id_changed, NULL);
164 164
165 plugid = elm_interface_atspi_socket_id_get(plug); 165 plugid = elm_atspi_plug_id_get(plug);
166} 166}
167 167
168void 168void
diff --git a/src/examples/elementary/a11y/efl-gtk-integration/plug/efl-socket.c b/src/examples/elementary/a11y/efl-gtk-integration/plug/efl-socket.c
index 5cb521ec39..082faada6f 100644
--- a/src/examples/elementary/a11y/efl-gtk-integration/plug/efl-socket.c
+++ b/src/examples/elementary/a11y/efl-gtk-integration/plug/efl-socket.c
@@ -24,6 +24,7 @@ static void a11y_init(void)
24 // fires accessible parent should be set to eo_parent (???) 24 // fires accessible parent should be set to eo_parent (???)
25 elm_interface_atspi_accessible_parent_set(state.socket, state.container); 25 elm_interface_atspi_accessible_parent_set(state.socket, state.container);
26 // following line shuold be not necessary: 26 // following line shuold be not necessary:
27
27 elm_interface_atspi_accessible_parent_set(state.proxy, state.socket); 28 elm_interface_atspi_accessible_parent_set(state.proxy, state.socket);
28 29
29 // FIXME order matters = should be fixed!!! 30 // FIXME order matters = should be fixed!!!
diff --git a/src/lib/elementary/elm_atspi_app_object.c b/src/lib/elementary/elm_atspi_app_object.c
index a64ac43d81..f957e629a1 100644
--- a/src/lib/elementary/elm_atspi_app_object.c
+++ b/src/lib/elementary/elm_atspi_app_object.c
@@ -65,21 +65,21 @@ _elm_atspi_app_object_elm_interface_atspi_accessible_role_get(Eo *obj EINA_UNUSE
65} 65}
66 66
67EOLIAN static void 67EOLIAN static void
68_elm_atspi_app_object_elm_interface_atspi_socket_on_connected(Eo *obj, Elm_Atspi_App_Object_Data *_pd) 68_elm_atspi_app_object_elm_atspi_plug_on_connected(Eo *obj, Elm_Atspi_App_Object_Data *_pd)
69{ 69{
70 ERR("On Connected: %s", elm_interface_atspi_socket_id_get(obj)); 70 ERR("On Connected: %s", elm_atspi_plug_id_get(obj));
71 elm_interface_atspi_socket_embed_by(obj, _pd->desktop_proxy); 71 elm_atspi_plug_embed_by(obj, _pd->desktop_proxy);
72} 72}
73 73
74EOLIAN static void 74EOLIAN static void
75_elm_atspi_app_object_elm_interface_atspi_socket_on_disconnected(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED) 75_elm_atspi_app_object_elm_atspi_plug_on_disconnected(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED)
76{ 76{
77 ERR("On Disconnected: %s", elm_interface_atspi_socket_id_get(obj)); 77 ERR("On Disconnected: %s", elm_atspi_plug_id_get(obj));
78 elm_interface_atspi_socket_unembed_by(obj, _pd->desktop_proxy); 78 elm_atspi_plug_unembed_by(obj, _pd->desktop_proxy);
79} 79}
80 80
81EOLIAN static void 81EOLIAN static void
82_elm_atspi_app_object_elm_interface_atspi_socket_on_embedded(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED, Elm_Atspi_Proxy *proxy EINA_UNUSED) 82_elm_atspi_app_object_elm_atspi_plug_on_embedded(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED, Elm_Atspi_Proxy *proxy EINA_UNUSED)
83{ 83{
84 ERR("Application successfully registered as desktop child"); 84 ERR("Application successfully registered as desktop child");
85} 85}
diff --git a/src/lib/elementary/elm_atspi_app_object.eo b/src/lib/elementary/elm_atspi_app_object.eo
index a48697dae3..08f6c3a953 100644
--- a/src/lib/elementary/elm_atspi_app_object.eo
+++ b/src/lib/elementary/elm_atspi_app_object.eo
@@ -1,3 +1,5 @@
1import elm_general;
2
1class Elm.Atspi.App.Object (Elm.Atspi.Plug, Elm.Interface.Atspi_Accessible) 3class Elm.Atspi.App.Object (Elm.Atspi.Plug, Elm.Interface.Atspi_Accessible)
2{ 4{
3 [[AT-SPI application object class]] 5 [[AT-SPI application object class]]
@@ -10,8 +12,8 @@ class Elm.Atspi.App.Object (Elm.Atspi.Plug, Elm.Interface.Atspi_Accessible)
10 Elm.Interface.Atspi_Accessible.description { get; set; } 12 Elm.Interface.Atspi_Accessible.description { get; set; }
11 Elm.Interface.Atspi_Accessible.role { get; } 13 Elm.Interface.Atspi_Accessible.role { get; }
12 Elm.Interface.Atspi_Accessible.index_in_parent { get; } 14 Elm.Interface.Atspi_Accessible.index_in_parent { get; }
13 Elm.Interface.Atspi.Socket.on_embedded; 15 Elm.Atspi.Plug.on_embedded;
14 Elm.Interface.Atspi.Socket.on_connected; 16 Elm.Atspi.Plug.on_connected;
15 Elm.Interface.Atspi.Socket.on_disconnected; 17 Elm.Atspi.Plug.on_disconnected;
16 } 18 }
17} 19}
diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c
index ff89370761..afddd74f0e 100644
--- a/src/lib/elementary/elm_atspi_bridge.c
+++ b/src/lib/elementary/elm_atspi_bridge.c
@@ -155,8 +155,8 @@ static void _elm_atspi_bridge_pending_add(Elm_Atspi_Bridge *obj, Eldbus_Pending
155static void _elm_atspi_bridge_pending_del(Elm_Atspi_Bridge *obj, Eldbus_Pending *pending); 155static void _elm_atspi_bridge_pending_del(Elm_Atspi_Bridge *obj, Eldbus_Pending *pending);
156static void _elm_atspi_bridge_pending_cancel_all(Elm_Atspi_Bridge *obj); 156static void _elm_atspi_bridge_pending_cancel_all(Elm_Atspi_Bridge *obj);
157 157
158static void _elm_atspi_bridge_socket_hooks_uninstall(Elm_Interface_Atspi_Socket *socket); 158static void _elm_atspi_bridge_plug_hooks_uninstall(Eo *socket);
159static void _elm_atspi_bridge_socket_hooks_install(Elm_Interface_Atspi_Socket *socket); 159static void _elm_atspi_bridge_plug_hooks_install(Eo *socket);
160 160
161// utility functions 161// utility functions
162static void _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj); 162static void _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj);
@@ -1041,9 +1041,9 @@ _socket_embedded(const Eldbus_Service_Interface *iface, const Eldbus_Message *ms
1041 Eo *obj = _bridge_object_from_path(bridge, obj_path); 1041 Eo *obj = _bridge_object_from_path(bridge, obj_path);
1042 1042
1043 ERR("Recieved embedded request"); 1043 ERR("Recieved embedded request");
1044 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, ELM_INTERFACE_ATSPI_SOCKET_MIXIN, msg); 1044 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, ELM_ATSPI_PLUG_CLASS, msg);
1045 1045
1046 elm_interface_atspi_socket_on_embedded(obj, NULL); 1046 elm_atspi_plug_on_embedded(obj, NULL);
1047 1047
1048 return eldbus_message_method_return_new(msg); 1048 return eldbus_message_method_return_new(msg);
1049} 1049}
@@ -3648,9 +3648,9 @@ _on_elm_atspi_bridge_plug_register(void *data, const Eldbus_Message *msg, Eldbus
3648 Eo *proxy = eldbus_pending_data_get(pending, "__proxy"); 3648 Eo *proxy = eldbus_pending_data_get(pending, "__proxy");
3649 3649
3650 // check if object is still in cache, since it may be unregistered 3650 // check if object is still in cache, since it may be unregistered
3651 // before dbus request complete 3651 // before dbus request completes
3652 if (eina_hash_find(pd->cache, &obj)) 3652 if (eina_hash_find(pd->cache, &obj))
3653 elm_interface_atspi_socket_on_embedded(obj, proxy); 3653 elm_atspi_plug_on_embedded(obj, proxy);
3654} 3654}
3655 3655
3656EAPI void 3656EAPI void
@@ -3661,8 +3661,10 @@ _elm_atspi_bridge_plugs_register(Eo *bridge)
3661 Eina_List *l; 3661 Eina_List *l;
3662 Elm_Atspi_Plug *plug; 3662 Elm_Atspi_Plug *plug;
3663 3663
3664
3664 EINA_LIST_FOREACH(pd->plugs, l, plug) 3665 EINA_LIST_FOREACH(pd->plugs, l, plug)
3665 { 3666 {
3667 ERR("Plug register %d", plug);
3666 _bridge_object_register(bridge, plug); 3668 _bridge_object_register(bridge, plug);
3667 } 3669 }
3668} 3670}
@@ -4212,11 +4214,11 @@ _elm_atspi_bridge_on_object_unregistered(Elm_Atspi_Bridge *bridge, Eo *obj)
4212 efl_event_callback_array_del(obj, event_handlers(), bridge); 4214 efl_event_callback_array_del(obj, event_handlers(), bridge);
4213 _bridge_object_removed_signal_send(bridge, obj); 4215 _bridge_object_removed_signal_send(bridge, obj);
4214 4216
4215 if (efl_isa(obj, ELM_INTERFACE_ATSPI_SOCKET_MIXIN)) 4217 if (efl_isa(obj, ELM_ATSPI_PLUG_CLASS))
4216 { 4218 {
4217 elm_interface_atspi_socket_on_disconnected(obj); 4219 elm_atspi_plug_on_disconnected(obj);
4218 elm_interface_atspi_socket_id_set(obj, NULL); 4220 elm_atspi_plug_id_set(obj, NULL);
4219 _elm_atspi_bridge_socket_hooks_uninstall(obj); 4221 _elm_atspi_bridge_plug_hooks_uninstall(obj);
4220 } 4222 }
4221} 4223}
4222 4224
@@ -4224,21 +4226,26 @@ static void
4224_elm_atspi_bridge_on_object_registered(Elm_Atspi_Bridge *bridge, Eo *obj) 4226_elm_atspi_bridge_on_object_registered(Elm_Atspi_Bridge *bridge, Eo *obj)
4225{ 4227{
4226 struct dbus_address addr; 4228 struct dbus_address addr;
4229
4230 ERR("On object_registererd: %s", efl_class_name_get(obj));
4227 if (!efl_isa(obj, ELM_ATSPI_PROXY_CLASS)) 4231 if (!efl_isa(obj, ELM_ATSPI_PROXY_CLASS))
4228 { 4232 {
4229 _bridge_object_added_signal_send(bridge, obj); 4233 _bridge_object_added_signal_send(bridge, obj);
4230 efl_event_callback_array_add(obj, event_handlers(), bridge); 4234 efl_event_callback_array_add(obj, event_handlers(), bridge);
4231 } 4235 }
4232 4236 if (efl_isa(obj, ELM_ATSPI_PLUG_CLASS))
4233 if (efl_isa(obj, ELM_INTERFACE_ATSPI_SOCKET_MIXIN))
4234 { 4237 {
4235 _elm_atspi_bridge_socket_hooks_install(obj); 4238 ERR("pre hook install: %d", obj);
4239 _elm_atspi_bridge_plug_hooks_install(obj);
4236 addr = _elm_atspi_bridge_address_from_object(bridge, obj); 4240 addr = _elm_atspi_bridge_address_from_object(bridge, obj);
4237 char *id = _elm_atspi_bridge_id_make(&addr); 4241 char *id = _elm_atspi_bridge_id_make(&addr);
4238 elm_interface_atspi_socket_id_set(obj, id); 4242 elm_atspi_plug_id_set(obj, id);
4239 elm_interface_atspi_socket_on_connected(obj); 4243 elm_atspi_plug_on_connected(obj);
4240 free(id); 4244 free(id);
4241 } 4245 }
4246 if (efl_isa(obj, ELM_ATSPI_SOCKET_CLASS))
4247 {
4248 }
4242} 4249}
4243 4250
4244static void 4251static void
@@ -4485,10 +4492,9 @@ _elm_atspi_bridge_init(void)
4485 if (!_instance) 4492 if (!_instance)
4486 { 4493 {
4487 _instance = efl_add(ELM_ATSPI_BRIDGE_CLASS, NULL); 4494 _instance = efl_add(ELM_ATSPI_BRIDGE_CLASS, NULL);
4495 elm_interface_atspi_accessible_observer_install(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, _instance);
4488 Efl_Object *root = elm_interface_atspi_accessible_root_get(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN); 4496 Efl_Object *root = elm_interface_atspi_accessible_root_get(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN);
4489 elm_atspi_bridge_plug_register(_instance, root);
4490 elm_atspi_bridge_root_set(_instance, root); 4497 elm_atspi_bridge_root_set(_instance, root);
4491 elm_interface_atspi_accessible_observer_install(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN);
4492 } 4498 }
4493} 4499}
4494 4500
@@ -4503,7 +4509,7 @@ _elm_atspi_bridge_shutdown(void)
4503{ 4509{
4504 if (_instance) 4510 if (_instance)
4505 { 4511 {
4506 elm_interface_atspi_accessible_observer_uninstall(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN); 4512 elm_interface_atspi_accessible_observer_uninstall(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, _instance);
4507 efl_del(_instance); 4513 efl_del(_instance);
4508 _instance = NULL; 4514 _instance = NULL;
4509 } 4515 }
@@ -4847,22 +4853,23 @@ _elm_atspi_bridge_elm_interface_atspi_socket_unembed_by(Eo *obj, void *data, Elm
4847} 4853}
4848 4854
4849static void 4855static void
4850_elm_atspi_bridge_socket_hooks_uninstall(Elm_Interface_Atspi_Socket *socket) 4856_elm_atspi_bridge_plug_hooks_uninstall(Eo *socket)
4851{ 4857{
4852 efl_object_override(socket, NULL); 4858 efl_object_override(socket, NULL);
4853} 4859}
4854 4860
4855static void 4861static void
4856_elm_atspi_bridge_socket_hooks_install(Elm_Interface_Atspi_Socket *socket) 4862_elm_atspi_bridge_plug_hooks_install(Eo *plug)
4857{ 4863{
4858 ERR("Install hooks for %s", efl_class_name_get(socket)); 4864 ERR("Install hooks for (%d), %s", plug, efl_class_name_get(plug));
4859 EFL_OPS_DEFINE(_elm_atspi_bridge_hooks, 4865 EFL_OPS_DEFINE(_elm_atspi_bridge_hooks,
4860 EFL_OBJECT_OP_FUNC(elm_interface_atspi_socket_embed, _elm_atspi_bridge_elm_interface_atspi_socket_embed), 4866 //EFL_OBJECT_OP_FUNC(elm_atspi_socket_embed, _elm_atspi_bridge_elm_interface_atspi_socket_embed),
4861 EFL_OBJECT_OP_FUNC(elm_interface_atspi_socket_unembed, _elm_atspi_bridge_elm_interface_atspi_socket_unembed), 4867 //EFL_OBJECT_OP_FUNC(elm_atspi_socket_unembed, _elm_atspi_bridge_elm_interface_atspi_socket_unembed),
4862 EFL_OBJECT_OP_FUNC(elm_interface_atspi_socket_embed_by, _elm_atspi_bridge_elm_interface_atspi_socket_embed_by), 4868 EFL_OBJECT_OP_FUNC(elm_atspi_plug_embed_by, _elm_atspi_bridge_elm_interface_atspi_socket_embed_by),
4863 EFL_OBJECT_OP_FUNC(elm_interface_atspi_socket_unembed_by, _elm_atspi_bridge_elm_interface_atspi_socket_unembed_by)); 4869 EFL_OBJECT_OP_FUNC(elm_atspi_plug_unembed_by, _elm_atspi_bridge_elm_interface_atspi_socket_unembed_by));
4864 4870
4865 efl_object_override(socket, &_elm_atspi_bridge_hooks); 4871 efl_object_override(plug, &_elm_atspi_bridge_hooks);
4872 ERR("Install hooks end");
4866} 4873}
4867 4874
4868EOLIAN Efl_Object* 4875EOLIAN Efl_Object*
@@ -5065,6 +5072,7 @@ _elm_atspi_bridge_plug_register(Eo *obj, Elm_Atspi_Bridge_Data *pd, Elm_Atspi_Pl
5065 5072
5066 if (!eina_list_data_find(pd->plugs, plug)) 5073 if (!eina_list_data_find(pd->plugs, plug))
5067 { 5074 {
5075 ERR("Is connected: %d", pd->connected);
5068 if (pd->connected) 5076 if (pd->connected)
5069 _bridge_object_register(obj, plug); 5077 _bridge_object_register(obj, plug);
5070 efl_event_callback_add(plug, EFL_EVENT_DEL, _elm_atspi_bridge_plug_del, obj); 5078 efl_event_callback_add(plug, EFL_EVENT_DEL, _elm_atspi_bridge_plug_del, obj);
@@ -5087,44 +5095,46 @@ _elm_atspi_bridge_plug_unregister(Eo *obj, Elm_Atspi_Bridge_Data *pd, Elm_Atspi_
5087 } 5095 }
5088} 5096}
5089 5097
5098EOLIAN void
5099_elm_atspi_bridge_elm_interface_accessible_observer_on_created(Eo *obj, Elm_Atspi_Bridge_Data *pd, Elm_Interface_Atspi_Accessible *accessible)
5100{
5101 if (efl_isa(accessible, ELM_ATSPI_PLUG_CLASS)) {
5102 ERR("added plug %d", accessible);
5103 elm_atspi_bridge_plug_register(obj, accessible);
5104 }
5105}
5106
5090static Eina_Bool 5107static Eina_Bool
5091_elm_atspi_bridge_id_parse(const char *id, struct dbus_address *addr) 5108_elm_atspi_bridge_id_parse(const char *id, struct dbus_address *addr)
5092{ 5109{
5093 int written; 5110 size_t source_len;
5094 Eina_Bool ret = EINA_FALSE; 5111 char *split;
5112 int to_write;
5095 5113
5096 if (!addr || !id) 5114 if (!addr || !id)
5097 return EINA_FALSE; 5115 return EINA_FALSE;
5098 5116
5099 char *copy = strdup(id); 5117 split = strrchr(id, ':');
5100 if (!copy)
5101 return EINA_FALSE;
5102
5103 char *split = strrchr(copy, ':');
5104 if (!split) 5118 if (!split)
5105 goto exit; 5119 return EINA_FALSE;
5106
5107 *split = '\0';
5108 5120
5109 written = snprintf(addr->bus, sizeof(addr->bus), "%s", copy); 5121 to_write = split - id + 1;
5110 if ((written < 0) || (written >= (int)sizeof(addr->bus))) 5122 if (to_write > (int)sizeof(addr->bus))
5111 goto exit; 5123 return EINA_FALSE;
5112 5124
5113 written = snprintf(addr->path, sizeof(addr->path), "%s", split + 1); 5125 eina_strlcpy(addr->bus, id, to_write);
5114 if ((written < 0) || (written >= (int)sizeof(addr->path)))
5115 goto exit;
5116 5126
5117 ret = EINA_TRUE; 5127 source_len = eina_strlcpy(addr->path, split + 1, sizeof(addr->path));
5128 if (source_len >= (int)sizeof(addr->path))
5129 return EINA_FALSE;
5118 5130
5119exit: 5131 return EINA_TRUE;
5120 free(copy);
5121 return ret;
5122} 5132}
5123 5133
5124static char* 5134static char*
5125_elm_atspi_bridge_id_make(const struct dbus_address *address) 5135_elm_atspi_bridge_id_make(const struct dbus_address *address)
5126{ 5136{
5127 char buf[256]; 5137 char buf[512];
5128 5138
5129 int written = snprintf(buf, sizeof(buf), "%s:%s", address->bus, address->path); 5139 int written = snprintf(buf, sizeof(buf), "%s:%s", address->bus, address->path);
5130 if ((written < 0) || (written >= (int)sizeof(buf))) 5140 if ((written < 0) || (written >= (int)sizeof(buf)))
diff --git a/src/lib/elementary/elm_atspi_bridge.eo b/src/lib/elementary/elm_atspi_bridge.eo
index a1fb6a1bfa..6256b3b44e 100644
--- a/src/lib/elementary/elm_atspi_bridge.eo
+++ b/src/lib/elementary/elm_atspi_bridge.eo
@@ -1,4 +1,4 @@
1class Elm.Atspi.Bridge (Efl.Object) 1class Elm.Atspi.Bridge (Efl.Object, Elm.Interface.Accessible_Observer)
2{ 2{
3 [[AT-SPI bridge class]] 3 [[AT-SPI bridge class]]
4 legacy_prefix: elm_atspi_bridge; 4 legacy_prefix: elm_atspi_bridge;
@@ -37,6 +37,7 @@ class Elm.Atspi.Bridge (Efl.Object)
37 implements { 37 implements {
38 Efl.Object.constructor; 38 Efl.Object.constructor;
39 Efl.Object.destructor; 39 Efl.Object.destructor;
40 Elm.Interface.Accessible_Observer.on_created;
40 } 41 }
41 events { 42 events {
42 connected; [[Connected with AT-SPI2 bus]] 43 connected; [[Connected with AT-SPI2 bus]]
diff --git a/src/lib/elementary/elm_atspi_plug.c b/src/lib/elementary/elm_atspi_plug.c
index dbcd83339f..5cf2e3a23e 100644
--- a/src/lib/elementary/elm_atspi_plug.c
+++ b/src/lib/elementary/elm_atspi_plug.c
@@ -8,18 +8,13 @@
8 8
9 9
10typedef struct _Elm_Atspi_Plug_Data { 10typedef struct _Elm_Atspi_Plug_Data {
11 Elm_Atspi_Proxy *proxy_parent; // technical object for keep bridge coherent 11 const char *id;
12} Elm_Atspi_Plug_Data; 12} Elm_Atspi_Plug_Data;
13 13
14EOLIAN Eo* 14EOLIAN Eo*
15_elm_atspi_plug_efl_object_constructor(Eo *obj, Elm_Atspi_Plug_Data *pd) 15_elm_atspi_plug_efl_object_constructor(Eo *obj, Elm_Atspi_Plug_Data *pd)
16{ 16{
17 efl_constructor(efl_super(obj, ELM_ATSPI_PLUG_CLASS)); 17 efl_constructor(efl_super(obj, ELM_ATSPI_PLUG_CLASS));
18
19 Elm_Atspi_Bridge *bridge = _elm_atspi_bridge_get();
20 if (bridge)
21 elm_atspi_bridge_plug_register(bridge, obj);
22
23 elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_FRAME); 18 elm_interface_atspi_accessible_role_set(obj, ELM_ATSPI_ROLE_FRAME);
24 return obj; 19 return obj;
25} 20}
@@ -30,16 +25,34 @@ _elm_atspi_plug_efl_object_destructor(Eo *obj EINA_UNUSED, Elm_Atspi_Plug_Data *
30 efl_destructor(efl_super(obj, ELM_ATSPI_PLUG_CLASS)); 25 efl_destructor(efl_super(obj, ELM_ATSPI_PLUG_CLASS));
31} 26}
32 27
28EOLIAN const char*
29_elm_atspi_plug_id_get(Eo *plug EINA_UNUSED, Elm_Atspi_Plug_Data *pd)
30{
31 return pd->id;
32}
33
34EOLIAN void
35_elm_atspi_plug_id_set(Eo *plug, Elm_Atspi_Plug_Data *pd, const char *new_id)
36{
37 const char *id = eina_stringshare_add(new_id);
38 if (pd->id != id)
39 {
40 eina_stringshare_del(pd->id);
41 pd->id = id;
42 efl_event_callback_call(socket, ELM_OBJ_ATSPI_PLUG_EVENT_ID_CHANGED, NULL);
43 }
44 else
45 eina_stringshare_del(id);
46}
47
33EOLIAN void 48EOLIAN void
34_elm_atspi_plug_elm_interface_atspi_socket_on_embedded(Eo *obj EINA_UNUSED, Elm_Atspi_Plug_Data *pd, Elm_Atspi_Proxy *proxy) 49_elm_atspi_plug_on_connected(Eo *socket, Elm_Atspi_Plug_Data *pd EINA_UNUSED)
35{ 50{
36 ERR("On embedded");
37} 51}
38 52
39EOLIAN void 53EOLIAN void
40_elm_atspi_plug_elm_interface_atspi_socket_on_unembedded(Eo *obj EINA_UNUSED, Elm_Atspi_Plug_Data *pd, Elm_Atspi_Proxy *proxy) 54_elm_atspi_plug_on_disconnected(Eo *socket, Elm_Atspi_Plug_Data *pd EINA_UNUSED)
41{ 55{
42 ERR("On unembedded");
43} 56}
44 57
45#include "elm_atspi_plug.eo.c" 58#include "elm_atspi_plug.eo.c"
diff --git a/src/lib/elementary/elm_atspi_plug.eo b/src/lib/elementary/elm_atspi_plug.eo
index e7c133f847..2f8d328ad7 100644
--- a/src/lib/elementary/elm_atspi_plug.eo
+++ b/src/lib/elementary/elm_atspi_plug.eo
@@ -1,13 +1,51 @@
1class Elm.Atspi.Plug (Efl.Object, Elm.Interface.Atspi_Accessible, 1class Elm.Atspi.Plug (Efl.Object, Elm.Interface.Atspi_Accessible)
2 Elm.Interface.Atspi.Socket)
3{ 2{
4 [[AT-SPI Plug class.]] 3 [[AT-SPI Plug class.]]
5 legacy_prefix: elm_atspi_plug; 4 legacy_prefix: elm_atspi_plug;
6 eo_prefix: elm_obj_atspi_plug; 5 eo_prefix: elm_obj_atspi_plug;
6 methods {
7 @property id {
8 get {
9 } set {
10 }
11 values {
12 ret: string;
13 }
14 }
15 embed_by {
16 [[ Embed accessible object as a child of remote object.]]
17 params {
18 @in proxy: Elm.Atspi.Proxy;
19 }
20 }
21 unembed_by {
22 // unembed
23 params {
24 @in proxy: Elm.Atspi.Proxy;
25 }
26 }
27 on_embedded {
28 params {
29 @in proxy: Elm.Atspi.Proxy;
30 }
31 }
32 on_unembedded {
33 params {
34 @in proxy: Elm.Atspi.Proxy;
35 }
36 }
37 on_connected {
38 }
39 on_disconnected {
40 }
41 }
7 implements { 42 implements {
8 Efl.Object.destructor; 43 Efl.Object.destructor;
9 Efl.Object.constructor; 44 Efl.Object.constructor;
10 Elm.Interface.Atspi.Socket.on_embedded; 45 }
11 Elm.Interface.Atspi.Socket.on_unembedded; 46 events {
47 embedded;
48 unembedded;
49 id,changed;
12 } 50 }
13} 51}
diff --git a/src/lib/elementary/elm_atspi_socket.c b/src/lib/elementary/elm_atspi_socket.c
index c925d1d6cb..232987cbec 100644
--- a/src/lib/elementary/elm_atspi_socket.c
+++ b/src/lib/elementary/elm_atspi_socket.c
@@ -6,6 +6,7 @@
6#include <elm_priv.h> 6#include <elm_priv.h>
7 7
8typedef struct _Elm_Atspi_Socket_Data { 8typedef struct _Elm_Atspi_Socket_Data {
9 Eina_Bool occupied : 1;
9} Elm_Atspi_Socket_Data; 10} Elm_Atspi_Socket_Data;
10 11
11EOLIAN void 12EOLIAN void
@@ -22,4 +23,17 @@ _elm_atspi_socket_efl_object_constructor(Eo *obj, Elm_Atspi_Socket_Data *pd EINA
22 23
23 return obj; 24 return obj;
24} 25}
26
27EOLIAN Eina_Bool
28_elm_atspi_socket_occupied_get(Eo *plug EINA_UNUSED, Elm_Atspi_Socket_Data *pd)
29{
30 return pd->occupied;
31}
32
33EOLIAN void
34_elm_atspi_socket_occupied_set(Eo *plug EINA_UNUSED, Elm_Atspi_Socket_Data *pd, Eina_Bool val)
35{
36 pd->occupied = val;
37}
38
25#include "elm_atspi_socket.eo.c" 39#include "elm_atspi_socket.eo.c"
diff --git a/src/lib/elementary/elm_atspi_socket.eo b/src/lib/elementary/elm_atspi_socket.eo
index 12ccab0a72..68a02e29d5 100644
--- a/src/lib/elementary/elm_atspi_socket.eo
+++ b/src/lib/elementary/elm_atspi_socket.eo
@@ -1,8 +1,31 @@
1class Elm.Atspi.Socket (Efl.Object, Elm.Interface.Atspi_Accessible, Elm.Interface.Atspi.Socket) 1class Elm.Atspi.Socket (Efl.Object, Elm.Interface.Atspi_Accessible)
2{ 2{
3 [[AT-SPI Socket class]] 3 [[AT-SPI Socket class]]
4 legacy_prefix: elm_atspi_socket; 4 legacy_prefix: elm_atspi_socket;
5 eo_prefix: elm_obj_atspi_socket; 5 eo_prefix: elm_obj_atspi_socket;
6 methods {
7 @property occupied {
8 get {
9 }
10 set {
11 }
12 values {
13 ret: bool;
14 }
15 }
16 embed @pure_virtual {
17 [[ Embed remote accessible object as a child.]]
18 params {
19 @in proxy: Elm.Atspi.Proxy;
20 }
21 }
22 unembed @pure_virtual {
23 // unembed
24 params {
25 @in proxy: Elm.Atspi.Proxy;
26 }
27 }
28 }
6 implements { 29 implements {
7 Efl.Object.constructor; 30 Efl.Object.constructor;
8 Efl.Object.destructor; 31 Efl.Object.destructor;
diff --git a/src/lib/elementary/elm_interface_accessible_observer.c b/src/lib/elementary/elm_interface_accessible_observer.c
new file mode 100644
index 0000000000..a3da4a9aae
--- /dev/null
+++ b/src/lib/elementary/elm_interface_accessible_observer.c
@@ -0,0 +1,8 @@
1#ifdef HAVE_CONFIG_H
2 #include "elementary_config.h"
3#endif
4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#include <Elementary.h>
7
8#include "elm_interface_accessible_observer.eo.c"
diff --git a/src/lib/elementary/elm_interface_accessible_observer.eo b/src/lib/elementary/elm_interface_accessible_observer.eo
new file mode 100644
index 0000000000..0075a96423
--- /dev/null
+++ b/src/lib/elementary/elm_interface_accessible_observer.eo
@@ -0,0 +1,20 @@
1import elm_general;
2
3interface Elm.Interface.Accessible_Observer ()
4{
5 methods {
6 @property root {
7 set {
8 }
9 values {
10 new_root: Efl.Object;
11 }
12 }
13 on_created {
14 params {
15 @in object: Efl.Object;
16 }
17 }
18 }
19}
20
diff --git a/src/lib/elementary/elm_interface_accessible_observer.h b/src/lib/elementary/elm_interface_accessible_observer.h
new file mode 100644
index 0000000000..3a3e0144b8
--- /dev/null
+++ b/src/lib/elementary/elm_interface_accessible_observer.h
@@ -0,0 +1,8 @@
1#ifndef ELM_INTERFACE_ACCESSIBLE_OBSERVER_H
2#define ELM_INTERFACE_ACCESSIBLE_OBSERVER_H
3
4#ifdef EFL_EO_API_SUPPORT
5#include "elm_interface_accessible_observer.eo.h"
6#endif
7
8#endif
diff --git a/src/lib/elementary/elm_interface_atspi_accessible.c b/src/lib/elementary/elm_interface_atspi_accessible.c
index 5537b1e19a..da27c07795 100644
--- a/src/lib/elementary/elm_interface_atspi_accessible.c
+++ b/src/lib/elementary/elm_interface_atspi_accessible.c
@@ -131,16 +131,11 @@ struct _Elm_Interface_Atspi_Accessible_Data
131 131
132typedef struct _Elm_Interface_Atspi_Accessible_Data Elm_Interface_Atspi_Accessible_Data; 132typedef struct _Elm_Interface_Atspi_Accessible_Data Elm_Interface_Atspi_Accessible_Data;
133 133
134struct Accessibility_Plugin 134static void _elm_interface_atspi_accessible_observers_notify_created(Eo *object);
135{
136 void *plugin_private_data;
137};
138
139static void _elm_interface_atspi_accessible_observers_notify(Eo *object);
140 135
141 136
142static Eo *root; 137static Eo *root;
143static Eina_List *plugins; 138static Eina_List *observers;
144 139
145EOLIAN static int 140EOLIAN static int
146_elm_interface_atspi_accessible_index_in_parent_get(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED) 141_elm_interface_atspi_accessible_index_in_parent_get(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd EINA_UNUSED)
@@ -515,6 +510,11 @@ _elm_interface_atspi_accessible_root_get(Eo *class EINA_UNUSED, void *pd EINA_UN
515} 510}
516 511
517EOLIAN void 512EOLIAN void
513_elm_interface_atspi_accessible_root_set(Eo *class EINA_UNUSED, void *pd EINA_UNUSED, Eo *root)
514{
515}
516
517EOLIAN void
518_elm_interface_atspi_accessible_efl_object_destructor(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd) 518_elm_interface_atspi_accessible_efl_object_destructor(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd)
519{ 519{
520 efl_destructor(efl_super(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN)); 520 efl_destructor(efl_super(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN));
@@ -534,33 +534,36 @@ EOLIAN Eo *
534_elm_interface_atspi_accessible_efl_object_constructor(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd) 534_elm_interface_atspi_accessible_efl_object_constructor(Eo *obj, Elm_Interface_Atspi_Accessible_Data *pd)
535{ 535{
536 pd->self = obj; 536 pd->self = obj;
537 _elm_interface_atspi_accessible_observers_notify(obj); 537 _elm_interface_atspi_accessible_observers_notify_created(obj);
538 return efl_constructor(efl_super(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN)); 538 return efl_constructor(efl_super(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN));
539} 539}
540 540
541static void 541static void _elm_interface_atspi_accessible_observers_notify_created(Eo *object)
542_elm_interface_atspi_accessible_observers_notify(Eo *object)
543{ 542{
544 if (observers) 543 Eina_List *l;
544 Elm_Interface_Accessible_Observer *observer;
545
546 EINA_LIST_FOREACH(observers, l , observer)
545 { 547 {
546 ERR("Query observer"); 548 elm_interface_accessible_observer_on_created(observer, object);
547 } 549 }
548} 550}
549 551
550EOLIAN void 552EOLIAN void
551_elm_interface_atspi_accessible_observer_install(Eo *socket_class, void *data) 553_elm_interface_atspi_accessible_observer_install(Eo *socket_class, void *data,
554 Elm_Interface_Accessible_Observer *observer)
552{ 555{
553 ERR("Observer installed"); 556 if (efl_isa(observer, ELM_INTERFACE_ACCESSIBLE_OBSERVER_INTERFACE))
554 observers = 0x1; 557 observers = eina_list_append(observers, observer);
555 if (!observers) 558 else
556 observers = eina_array_new(1); 559 ERR("Incorrct type: (%s) do not implement %s",
560 efl_class_name_get(observer), efl_class_name_get(ELM_INTERFACE_ACCESSIBLE_OBSERVER_INTERFACE));
557} 561}
558 562
559EOLIAN void 563EOLIAN void
560_elm_interface_atspi_accessible_observer_uninstall(Eo *socket_class, void *data) 564_elm_interface_atspi_accessible_observer_uninstall(Eo *socket_class, void *data, Elm_Interface_Accessible_Observer *observer)
561{ 565{
562 ERR("Observer uninstalled"); 566 observers = eina_list_remove(observers, observer);
563 observers = NULL;
564} 567}
565 568
566#include "elm_interface_atspi_accessible.eo.c" 569#include "elm_interface_atspi_accessible.eo.c"
diff --git a/src/lib/elementary/elm_interface_atspi_accessible.eo b/src/lib/elementary/elm_interface_atspi_accessible.eo
index 1999d59910..e1cf1186ff 100644
--- a/src/lib/elementary/elm_interface_atspi_accessible.eo
+++ b/src/lib/elementary/elm_interface_atspi_accessible.eo
@@ -384,12 +384,22 @@ mixin Elm.Interface.Atspi_Accessible (Efl.Interface, Efl.Object)
384 @property root @class { 384 @property root @class {
385 get { 385 get {
386 [[Get's default root object of accessible object hierarchy]] 386 [[Get's default root object of accessible object hierarchy]]
387 values {
388 ret: Efl.Object; [[Root object]]
389 }
390 } 387 }
391 set { 388 set {
392 } 389 }
390 values {
391 ret: Efl.Object; [[Root object]]
392 }
393 }
394 observer_install @class {
395 params {
396 @in observer: Elm.Interface.Accessible_Observer;
397 }
398 }
399 observer_uninstall @class {
400 params {
401 @in observer: Elm.Interface.Accessible_Observer;
402 }
393 } 403 }
394 } 404 }
395 implements { 405 implements {
diff --git a/src/lib/elementary/elm_interface_atspi_socket.c b/src/lib/elementary/elm_interface_atspi_socket.c
deleted file mode 100644
index 0753306beb..0000000000
--- a/src/lib/elementary/elm_interface_atspi_socket.c
+++ /dev/null
@@ -1,69 +0,0 @@
1#ifdef HAVE_CONFIG_H
2 #include "elementary_config.h"
3#endif
4
5#include <Elementary.h>
6#include "elm_widget.h"
7#include "elm_priv.h"
8
9typedef struct _Elm_Inteface_Atspi_Socket_Data
10{
11 const char *id;
12 Eina_Bool occupied : 1;
13} Elm_Interface_Atspi_Socket_Data;
14
15EOLIAN const char*
16_elm_interface_atspi_socket_id_get(Eo *socket EINA_UNUSED, Elm_Interface_Atspi_Socket_Data *pd)
17{
18 return pd->id;
19}
20
21EOLIAN void
22_elm_interface_atspi_socket_id_set(Eo *socket, Elm_Interface_Atspi_Socket_Data *pd, const char *new_id)
23{
24 const char *id = eina_stringshare_add(new_id);
25 if (pd->id != id)
26 {
27 eina_stringshare_del(pd->id);
28 pd->id = id;
29 efl_event_callback_call(socket, ELM_INTERFACE_ATSPI_SOCKET_EVENT_ID_CHANGED, NULL);
30 }
31 else
32 eina_stringshare_del(id);
33}
34
35EOLIAN Eina_Bool
36_elm_interface_atspi_socket_occupied_get(Eo *socket EINA_UNUSED, Elm_Interface_Atspi_Socket_Data *pd)
37{
38 return pd->occupied;
39}
40
41EOLIAN void
42_elm_interface_atspi_socket_occupied_set(Eo *socket EINA_UNUSED, Elm_Interface_Atspi_Socket_Data *pd, Eina_Bool val)
43{
44 pd->occupied = val;
45}
46
47EOLIAN void
48_elm_interface_atspi_socket_on_embedded(Eo *socket, Elm_Interface_Atspi_Socket_Data *pd EINA_UNUSED, Elm_Atspi_Proxy *proxy)
49{
50 efl_event_callback_call(socket, ELM_INTERFACE_ATSPI_SOCKET_EVENT_EMBEDDED, proxy);
51}
52
53EOLIAN void
54_elm_interface_atspi_socket_on_unembedded(Eo *socket, Elm_Interface_Atspi_Socket_Data *pd EINA_UNUSED, Elm_Atspi_Proxy *proxy)
55{
56 efl_event_callback_call(socket, ELM_INTERFACE_ATSPI_SOCKET_EVENT_UNEMBEDDED, proxy);
57}
58
59EOLIAN void
60_elm_interface_atspi_socket_on_connected(Eo *socket, Elm_Interface_Atspi_Socket_Data *pd EINA_UNUSED)
61{
62}
63
64EOLIAN void
65_elm_interface_atspi_socket_on_disconnected(Eo *socket, Elm_Interface_Atspi_Socket_Data *pd EINA_UNUSED)
66{
67}
68
69#include "elm_interface_atspi_socket.eo.c"
diff --git a/src/lib/elementary/elm_interface_atspi_socket.eo b/src/lib/elementary/elm_interface_atspi_socket.eo
deleted file mode 100644
index 7efbfa4681..0000000000
--- a/src/lib/elementary/elm_interface_atspi_socket.eo
+++ /dev/null
@@ -1,69 +0,0 @@
1import elm_general;
2
3mixin Elm.Interface.Atspi.Socket(Efl.Interface, Efl.Object)
4{
5 [[Elementary AT-SPI socket interface]]
6 eo_prefix: elm_interface_atspi_socket;
7 methods {
8 @property id {
9 get {
10 } set {
11 }
12 values {
13 ret: string;
14 }
15 }
16 @property occupied {
17 get {
18 }
19 set {
20 }
21 values {
22 ret: bool;
23 }
24 }
25 embed @pure_virtual {
26 [[ Embed remote accessible object as a child.]]
27 params {
28 @in proxy: Elm.Atspi.Proxy;
29 }
30 }
31 unembed @pure_virtual {
32 // unembed
33 params {
34 @in proxy: Elm.Atspi.Proxy;
35 }
36 }
37 embed_by @pure_virtual {
38 [[ Embed accessible object as a child of remote object.]]
39 params {
40 @in proxy: Elm.Atspi.Proxy;
41 }
42 }
43 unembed_by @pure_virtual {
44 // unembed
45 params {
46 @in proxy: Elm.Atspi.Proxy;
47 }
48 }
49 on_embedded {
50 params {
51 @in proxy: Elm.Atspi.Proxy;
52 }
53 }
54 on_unembedded {
55 params {
56 @in proxy: Elm.Atspi.Proxy;
57 }
58 }
59 on_connected {
60 }
61 on_disconnected {
62 }
63 }
64 events {
65 embedded;
66 unembedded;
67 id,changed;
68 }
69}
diff --git a/src/lib/elementary/elm_interfaces.h b/src/lib/elementary/elm_interfaces.h
index c0c5a8bfdb..fa9e85b55a 100644
--- a/src/lib/elementary/elm_interfaces.h
+++ b/src/lib/elementary/elm_interfaces.h
@@ -1,3 +1,4 @@
1#include "elm_interface_accessible_observer.h"
1#include "elm_interface_atspi_accessible.h" 2#include "elm_interface_atspi_accessible.h"
2#include "elm_interface_atspi_text.h" 3#include "elm_interface_atspi_text.h"
3#include "elm_interface_atspi_widget_action.h" 4#include "elm_interface_atspi_widget_action.h"
@@ -11,7 +12,6 @@
11#include "elm_interface_atspi_text_editable.eo.h" 12#include "elm_interface_atspi_text_editable.eo.h"
12#include "elm_interface_atspi_image.eo.h" 13#include "elm_interface_atspi_image.eo.h"
13#include "elm_interface_atspi_selection.eo.h" 14#include "elm_interface_atspi_selection.eo.h"
14#include "elm_interface_atspi_socket.eo.h"
15#include "elm_interface_atspi_value.eo.h" 15#include "elm_interface_atspi_value.eo.h"
16#endif 16#endif
17#endif 17#endif
@@ -22,7 +22,6 @@
22#include "elm_interface_atspi_text_editable.eo.legacy.h" 22#include "elm_interface_atspi_text_editable.eo.legacy.h"
23#include "elm_interface_atspi_image.eo.legacy.h" 23#include "elm_interface_atspi_image.eo.legacy.h"
24#include "elm_interface_atspi_selection.eo.legacy.h" 24#include "elm_interface_atspi_selection.eo.legacy.h"
25#include "elm_interface_atspi_socket.eo.legacy.h"
26#include "elm_interface_atspi_value.eo.legacy.h" 25#include "elm_interface_atspi_value.eo.legacy.h"
27#endif 26#endif
28#endif 27#endif