summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/Elementary.h.in1
-rw-r--r--src/lib/Makefile.am4
-rw-r--r--src/lib/elm_atspi_app_object.c3
-rw-r--r--src/lib/elm_atspi_bridge.c430
-rw-r--r--src/lib/elm_atspi_proxy.c101
-rw-r--r--src/lib/elm_atspi_proxy.eo43
-rw-r--r--src/lib/elm_atspi_proxy.h15
-rw-r--r--src/lib/elm_plug.c15
-rw-r--r--src/lib/elm_plug.eo1
-rw-r--r--src/lib/elm_priv.h3
-rw-r--r--src/lib/elm_web.eo1
-rw-r--r--src/lib/elm_web2.c33
-rw-r--r--src/lib/elm_widget.h2
-rw-r--r--src/lib/elm_widget_web.h2
-rw-r--r--src/lib/elm_win.c19
15 files changed, 658 insertions, 15 deletions
diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in
index cd17bbfd3..c3215fabc 100644
--- a/src/lib/Elementary.h.in
+++ b/src/lib/Elementary.h.in
@@ -187,6 +187,7 @@ EAPI extern Elm_Version *elm_version;
187#include <elm_app_client_view.h> 187#include <elm_app_client_view.h>
188#include <elm_app.h> 188#include <elm_app.h>
189#include <elm_atspi_app_object.h> 189#include <elm_atspi_app_object.h>
190#include <elm_atspi_proxy.h>
190#include <elm_bg.h> 191#include <elm_bg.h>
191#include <elm_box.h> 192#include <elm_box.h>
192 193
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index de8574987..3bede8177 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -153,6 +153,7 @@ elm_app_client_view_eo.h \
153elm_app_client_view.h \ 153elm_app_client_view.h \
154elm_app.h \ 154elm_app.h \
155elm_atspi_app_object.h \ 155elm_atspi_app_object.h \
156elm_atspi_proxy.h \
156elm_authors.h \ 157elm_authors.h \
157elm_bg.h \ 158elm_bg.h \
158elm_bg_eo.h \ 159elm_bg_eo.h \
@@ -415,6 +416,7 @@ elm_app_server_view.c \
415elm_app_client.c \ 416elm_app_client.c \
416elm_app_client_view.c \ 417elm_app_client_view.c \
417elm_atspi_app_object.c \ 418elm_atspi_app_object.c \
419elm_atspi_proxy.c \
418elm_atspi_bridge.c \ 420elm_atspi_bridge.c \
419elm_bg.c \ 421elm_bg.c \
420elm_box.c \ 422elm_box.c \
@@ -537,6 +539,7 @@ elm_app_client_view.eo \
537elm_app_server.eo \ 539elm_app_server.eo \
538elm_app_server_view.eo \ 540elm_app_server_view.eo \
539elm_atspi_app_object.eo \ 541elm_atspi_app_object.eo \
542elm_atspi_proxy.eo \
540elm_bg.eo \ 543elm_bg.eo \
541elm_box.eo \ 544elm_box.eo \
542elm_bubble.eo \ 545elm_bubble.eo \
@@ -679,6 +682,7 @@ elementaryeolianfiles_DATA = \
679 elm_app_server.eo \ 682 elm_app_server.eo \
680 elm_app_server_view.eo \ 683 elm_app_server_view.eo \
681 elm_atspi_app_object.eo \ 684 elm_atspi_app_object.eo \
685 elm_atspi_proxy.eo \
682 elm_interface_atspi_accessible.eo \ 686 elm_interface_atspi_accessible.eo \
683 elm_interface_atspi_action.eo \ 687 elm_interface_atspi_action.eo \
684 elm_interface_atspi_component.eo \ 688 elm_interface_atspi_component.eo \
diff --git a/src/lib/elm_atspi_app_object.c b/src/lib/elm_atspi_app_object.c
index 6e4989137..882174ad4 100644
--- a/src/lib/elm_atspi_app_object.c
+++ b/src/lib/elm_atspi_app_object.c
@@ -33,7 +33,8 @@ _elm_atspi_app_object_elm_interface_atspi_accessible_children_get(Eo *obj EINA_U
33 33
34 EINA_LIST_FOREACH(_elm_win_list, l, win) 34 EINA_LIST_FOREACH(_elm_win_list, l, win)
35 { 35 {
36 if (eo_isa(win, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN)) 36 if (eo_isa(win, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN) &&
37 (elm_win_type_get(win) != ELM_WIN_SOCKET_IMAGE))
37 accs = eina_list_append(accs, win); 38 accs = eina_list_append(accs, win);
38 } 39 }
39 40
diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c
index 4bf667311..b06d533dd 100644
--- a/src/lib/elm_atspi_bridge.c
+++ b/src/lib/elm_atspi_bridge.c
@@ -33,6 +33,8 @@
33#define ELM_ACCESS_OBJECT_PATH_PREFIX "/org/a11y/atspi/accessible/" 33#define ELM_ACCESS_OBJECT_PATH_PREFIX "/org/a11y/atspi/accessible/"
34#define ELM_ACCESS_OBJECT_REFERENCE_TEMPLATE ELM_ACCESS_OBJECT_PATH_PREFIX "%llu" 34#define ELM_ACCESS_OBJECT_REFERENCE_TEMPLATE ELM_ACCESS_OBJECT_PATH_PREFIX "%llu"
35 35
36#define ELM_ATSPI_DBUS_INTERFACE_PROXY "elm.atspi.bridge.proxy.Socket"
37
36#define SIZE(x) sizeof(x)/sizeof(x[0]) 38#define SIZE(x) sizeof(x)/sizeof(x[0])
37 39
38typedef struct Key_Event_Info { 40typedef struct Key_Event_Info {
@@ -56,6 +58,9 @@ static unsigned long _object_children_broadcast_mask;
56static unsigned long long _object_state_broadcast_mask; 58static unsigned long long _object_state_broadcast_mask;
57static unsigned long long _window_signal_broadcast_mask; 59static unsigned long long _window_signal_broadcast_mask;
58static Ecore_Event_Filter *_key_flr; 60static Ecore_Event_Filter *_key_flr;
61static const char *_a11y_socket_address;
62static Eina_List *socket_queue;
63static Eina_List *plug_queue;
59 64
60static Eina_Bool _state_changed_signal_send(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info); 65static Eina_Bool _state_changed_signal_send(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info);
61static Eina_Bool _property_changed_signal_send(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info); 66static Eina_Bool _property_changed_signal_send(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info);
@@ -75,6 +80,8 @@ static void _object_register(Eo *obj, char *path);
75static void _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj); 80static void _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj);
76static Eina_Bool _elm_atspi_bridge_key_filter(void *data, void *loop, int type, void *event); 81static Eina_Bool _elm_atspi_bridge_key_filter(void *data, void *loop, int type, void *event);
77static void _object_signal_send(Eldbus_Service_Interface *infc, int sig_id, const char *minor, unsigned int det1, unsigned int det2, const char *variant_sig, ...); 82static void _object_signal_send(Eldbus_Service_Interface *infc, int sig_id, const char *minor, unsigned int det1, unsigned int det2, const char *variant_sig, ...);
83static void _plug_connect(Eldbus_Connection *conn, Eo *proxy);
84static void _socket_ifc_create(Eldbus_Connection *conn, Eo *proxy);
78 85
79EO_CALLBACKS_ARRAY_DEFINE(_events_cb, 86EO_CALLBACKS_ARRAY_DEFINE(_events_cb,
80 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, _property_changed_signal_send}, 87 { ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, _property_changed_signal_send},
@@ -1720,6 +1727,56 @@ _editable_text_text_paste(const Eldbus_Service_Interface *iface, const Eldbus_Me
1720 return ret; 1727 return ret;
1721} 1728}
1722 1729
1730Eina_Bool
1731_elm_atspi_bridge_plug_id_split(const char *plug_id, char **bus, char **path)
1732{
1733 if (!plug_id || !strcmp(plug_id, "")) return EINA_FALSE;
1734 unsigned int tokens = 0;
1735 char **split = eina_str_split_full(plug_id, ":", 0, &tokens);
1736 Eina_Bool ret = EINA_FALSE;
1737 if (tokens == 2)
1738 {
1739 if (bus) *bus = strdup(split[1]);
1740 if (path) *path = strdup(split[2]);
1741 ret = EINA_TRUE;
1742 }
1743 else if (tokens == 3)
1744 {
1745 char buf[128];
1746 snprintf(buf, sizeof(buf), ":%s", split[1]);
1747 if (bus) *bus = strdup(buf);
1748 if (path) *path = strdup(split[2]);
1749 ret = EINA_TRUE;
1750 }
1751
1752 free(split[0]);
1753 free(split);
1754 return ret;
1755}
1756
1757static Eldbus_Message *
1758_socket_embedded(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg)
1759{
1760 Eo *proxy;
1761 const char *obj_path = eldbus_service_object_path_get(iface);
1762 const char *bus, *path;
1763 Eo *obj = _access_object_from_path(obj_path);
1764 eo_do(obj, proxy = elm_interface_atspi_accessible_parent_get());
1765 if (!eo_isa(proxy, ELM_ATSPI_PROXY_CLASS))
1766 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Unable to embed object.");
1767
1768 if (!eldbus_message_arguments_get(msg, "s", &path))
1769 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Plug id expected.");
1770
1771 bus = eldbus_message_sender_get(msg);
1772
1773 eo_do(proxy, elm_obj_atspi_proxy_address_set(bus, path));
1774
1775 _cache_build(proxy);
1776
1777 return eldbus_message_method_return_new(msg);
1778}
1779
1723static const Eldbus_Method editable_text_methods[] = { 1780static const Eldbus_Method editable_text_methods[] = {
1724 { "SetTextContents", ELDBUS_ARGS({"s", "newcontents"}), ELDBUS_ARGS({"b", NULL}), _editable_text_text_content_set, 0 }, 1781 { "SetTextContents", ELDBUS_ARGS({"s", "newcontents"}), ELDBUS_ARGS({"b", NULL}), _editable_text_text_content_set, 0 },
1725 { "InsertText", ELDBUS_ARGS({"i", "position"}, {"s", "text"}, {"i", "length"}), ELDBUS_ARGS({"b", NULL}), _editable_text_text_insert, 0 }, 1782 { "InsertText", ELDBUS_ARGS({"i", "position"}, {"s", "text"}, {"i", "length"}), ELDBUS_ARGS({"b", NULL}), _editable_text_text_insert, 0 },
@@ -1730,6 +1787,11 @@ static const Eldbus_Method editable_text_methods[] = {
1730 { NULL, NULL, NULL, NULL, 0 } 1787 { NULL, NULL, NULL, NULL, 0 }
1731}; 1788};
1732 1789
1790static const Eldbus_Method socket_methods[] = {
1791 { "Embedded", ELDBUS_ARGS({"s", "id"}), ELDBUS_ARGS({NULL, NULL}), _socket_embedded, 0 },
1792 { NULL, NULL, NULL, NULL, 0 }
1793};
1794
1733static Eo * 1795static Eo *
1734_access_object_from_path(const char *path) 1796_access_object_from_path(const char *path)
1735{ 1797{
@@ -2049,16 +2111,32 @@ static const Eldbus_Service_Interface_Desc editable_text_iface_desc = {
2049 ATSPI_DBUS_INTERFACE_EDITABLE_TEXT, editable_text_methods, NULL, NULL, NULL, NULL 2111 ATSPI_DBUS_INTERFACE_EDITABLE_TEXT, editable_text_methods, NULL, NULL, NULL, NULL
2050}; 2112};
2051 2113
2114static const Eldbus_Service_Interface_Desc socket_iface_desc = {
2115 ATSPI_DBUS_INTERFACE_SOCKET, socket_methods, NULL, NULL, NULL, NULL
2116};
2117
2052static void 2118static void
2053_iter_object_reference_append(Eldbus_Message_Iter *iter, const Eo *obj) 2119_iter_object_reference_append(Eldbus_Message_Iter *iter, const Eo *obj)
2054{ 2120{
2055 Eldbus_Message_Iter *iter_struct = eldbus_message_iter_container_new(iter, 'r', NULL); 2121 Eldbus_Message_Iter *iter_struct = eldbus_message_iter_container_new(iter, 'r', NULL);
2056 EINA_SAFETY_ON_NULL_RETURN(iter); 2122 EINA_SAFETY_ON_NULL_RETURN(iter);
2057 char *path = _path_from_access_object(obj); 2123 if (eo_isa(obj, ELM_ATSPI_PROXY_CLASS))
2058 eldbus_message_iter_basic_append(iter_struct, 's', eldbus_connection_unique_name_get(_a11y_bus)); 2124 {
2059 eldbus_message_iter_basic_append(iter_struct, 'o', path); 2125 const char *pbus, *ppath;
2126 eo_do(obj, elm_obj_atspi_proxy_address_get(&pbus, &ppath));
2127 if (!pbus || !ppath)
2128 CRI("Invalid proxy address!. This should never happen");
2129 eldbus_message_iter_basic_append(iter_struct, 's', pbus);
2130 eldbus_message_iter_basic_append(iter_struct, 'o', ppath);
2131 }
2132 else
2133 {
2134 char *path = _path_from_access_object(obj);
2135 eldbus_message_iter_basic_append(iter_struct, 's', eldbus_connection_unique_name_get(_a11y_bus));
2136 eldbus_message_iter_basic_append(iter_struct, 'o', path);
2137 free(path);
2138 }
2060 eldbus_message_iter_container_close(iter, iter_struct); 2139 eldbus_message_iter_container_close(iter, iter_struct);
2061 free(path);
2062} 2140}
2063 2141
2064static void 2142static void
@@ -3072,15 +3150,17 @@ _cache_build(void *obj)
3072 if (!eo_isa(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN)) 3150 if (!eo_isa(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
3073 return; 3151 return;
3074 3152
3075 path = _path_from_access_object(obj); 3153 if (!eo_isa(obj, ELM_ATSPI_PROXY_CLASS))
3076 if (!eina_hash_find(_cache, path))
3077 { 3154 {
3078 eina_hash_add(_cache, path, obj); 3155 path = _path_from_access_object(obj);
3079 _object_register(obj, path); 3156 if (!eina_hash_find(_cache, path))
3080 eo_do(obj, eo_event_callback_add(EO_EV_DEL, _on_cache_item_del, NULL)); 3157 {
3158 eina_hash_add(_cache, path, obj);
3159 _object_register(obj, path);
3160 eo_do(obj, eo_event_callback_add(EO_EV_DEL, _on_cache_item_del, NULL));
3161 }
3162 free(path);
3081 } 3163 }
3082 free(path);
3083
3084 eo_do(obj, children = elm_interface_atspi_accessible_children_get()); 3164 eo_do(obj, children = elm_interface_atspi_accessible_children_get());
3085 EINA_LIST_FREE(children, child) 3165 EINA_LIST_FREE(children, child)
3086 _cache_build(child); 3166 _cache_build(child);
@@ -3089,12 +3169,20 @@ _cache_build(void *obj)
3089static void 3169static void
3090_a11y_bus_initialize(const char *socket_addr) 3170_a11y_bus_initialize(const char *socket_addr)
3091{ 3171{
3172 Eo *obj;
3092 _a11y_bus = eldbus_address_connection_get(socket_addr); 3173 _a11y_bus = eldbus_address_connection_get(socket_addr);
3093 3174
3094 _cache_register(); 3175 _cache_register();
3095 _event_handlers_register(); 3176 _event_handlers_register();
3096 _elm_atspi_bridge_app_register(); 3177 if (!getenv("ELM_ATSPI_NO_EMBED"))
3178 _elm_atspi_bridge_app_register();
3097 _cache_build(_root); 3179 _cache_build(_root);
3180 // additionally register all socket objects and its descendants
3181 EINA_LIST_FREE(plug_queue, obj)
3182 _plug_connect(_a11y_bus, obj);
3183 EINA_LIST_FREE(socket_queue, obj)
3184 _socket_ifc_create(_a11y_bus, obj);
3185 plug_queue = socket_queue = NULL;
3098} 3186}
3099 3187
3100static void 3188static void
@@ -3115,12 +3203,26 @@ _a11y_bus_address_get(void *data, const Eldbus_Message *msg, Eldbus_Pending *pen
3115 goto end; 3203 goto end;
3116 } 3204 }
3117 3205
3206 _a11y_socket_address = eina_stringshare_add(sock_addr);
3118 _a11y_bus_initialize(sock_addr); 3207 _a11y_bus_initialize(sock_addr);
3119 3208
3120end: 3209end:
3121 eldbus_connection_unref(session_bus); 3210 eldbus_connection_unref(session_bus);
3122} 3211}
3123 3212
3213static void _socket_interface_register(Eldbus_Connection *conn, Eo *proxy)
3214{
3215 Eo *parent;
3216
3217 eo_do(proxy, parent = eo_parent_get());
3218 if (!eo_isa(parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
3219 return;
3220
3221 char *path = _path_from_access_object(parent);
3222 eldbus_service_interface_register(conn, path, &socket_iface_desc);
3223 free(path);
3224}
3225
3124static void _object_register(Eo *obj, char *path) 3226static void _object_register(Eo *obj, char *path)
3125{ 3227{
3126 Eldbus_Service_Interface *infc = NULL, *event_infc; 3228 Eldbus_Service_Interface *infc = NULL, *event_infc;
@@ -3256,6 +3358,10 @@ _elm_atspi_bridge_shutdown(void)
3256 ecore_event_filter_del(_key_flr); 3358 ecore_event_filter_del(_key_flr);
3257 _key_flr = NULL; 3359 _key_flr = NULL;
3258 3360
3361 if (_a11y_socket_address)
3362 eina_stringshare_del(_a11y_socket_address);
3363
3364 _a11y_socket_address = NULL;
3259 _init_count = 0; 3365 _init_count = 0;
3260 _root = NULL; 3366 _root = NULL;
3261 } 3367 }
@@ -3381,3 +3487,303 @@ _elm_atspi_bridge_key_filter(void *data EINA_UNUSED, void *loop EINA_UNUSED, int
3381 3487
3382 return EINA_FALSE; 3488 return EINA_FALSE;
3383} 3489}
3490
3491EAPI Eina_Bool
3492elm_atspi_bridge_object_address_get(Eo *obj, char **bus, char **path)
3493{
3494 if (!_a11y_bus)
3495 {
3496 ERR("Connection with accessibility bus not established.");
3497 return EINA_FALSE;
3498 }
3499 if (!eo_isa(obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
3500 {
3501 ERR("Connection with accessibility bus not established.");
3502 return EINA_FALSE;
3503 }
3504 if (bus) *bus = strdup(eldbus_connection_unique_name_get(_a11y_bus));
3505 if (path) *path = _path_from_access_object(obj);
3506
3507 return EINA_TRUE;
3508}
3509
3510static Eina_Bool
3511_proxy_property_get(const Eldbus_Service_Interface *interface, const char *property,
3512 Eldbus_Message_Iter *iter, const Eldbus_Message *request_msg EINA_UNUSED,
3513 Eldbus_Message **error EINA_UNUSED)
3514{
3515 char *bus, *path;
3516 Eo *obj = eldbus_service_object_data_get(interface, "_atspi_obj");
3517 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
3518
3519 if (!strcmp(property, "Object"))
3520 {
3521 Eo *parent;
3522 eo_do(obj, parent = eo_parent_get());
3523 if (!elm_atspi_bridge_object_address_get(parent, &bus, &path))
3524 return EINA_FALSE;
3525
3526 Eldbus_Message_Iter *iter_struct = eldbus_message_iter_container_new(iter, 'r', NULL);
3527 if (iter_struct)
3528 {
3529 eldbus_message_iter_basic_append(iter_struct, 's', bus);
3530 eldbus_message_iter_basic_append(iter_struct, 'o', path);
3531 eldbus_message_iter_container_close(iter, iter_struct);
3532 }
3533 free(bus);
3534 free(path);
3535 return EINA_TRUE;
3536 }
3537 return EINA_FALSE;
3538}
3539
3540static const Eldbus_Property proxy_properties[] = {
3541 { "Object", "(so)", _proxy_property_get, NULL, 0 },
3542 { NULL, NULL, NULL, NULL, 0 }
3543};
3544
3545static const Eldbus_Service_Interface_Desc _proxy_iface_desc = {
3546 ELM_ATSPI_DBUS_INTERFACE_PROXY, NULL, NULL, proxy_properties, NULL, NULL
3547};
3548
3549static void _embedded_reply_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
3550{
3551 Eo *parent, *proxy = data;
3552 const char *err, *txt;
3553
3554 if (eldbus_message_error_get(msg, &err, &txt))
3555 {
3556 ERR("AT-SPI: Embedded method call failed: %s %s", err, txt);
3557 eo_do(proxy, eo_event_callback_call(ELM_ATSPI_PROXY_EVENT_DISCONNECTED, NULL));
3558 return;
3559 }
3560 eo_do(proxy, eo_event_callback_call(ELM_ATSPI_PROXY_EVENT_CONNECTED, NULL));
3561
3562 eo_do(proxy, parent = eo_parent_get());
3563 if (parent)
3564 elm_interface_atspi_accessible_children_changed_added_signal_emit(parent, proxy)
3565}
3566
3567static void
3568_plug_embedded_send(Eldbus_Connection *conn, Eo *proxy, const char *bus, const char *path)
3569{
3570 char *obj_path = NULL;
3571 Eo *parent;
3572 Eldbus_Message *msg = NULL;
3573
3574 eo_do(proxy, parent = eo_parent_get());
3575 if (!parent) goto fail;
3576
3577 msg = eldbus_message_method_call_new(bus, path, ATSPI_DBUS_INTERFACE_SOCKET, "Embedded");
3578 if (!msg) goto fail;
3579
3580 if (!elm_atspi_bridge_object_address_get(parent, NULL, &obj_path))
3581 goto fail;
3582
3583 if (!eldbus_message_arguments_append(msg, "s", obj_path))
3584 goto fail;
3585
3586 free(obj_path);
3587
3588 if (!eldbus_connection_send(conn, msg, _embedded_reply_cb, proxy, 100))
3589 goto fail;
3590
3591 return;
3592
3593fail:
3594 ERR("AT-SPI: Unable to send Embedded request.");
3595 if (msg) eldbus_message_unref(msg);
3596 free(obj_path);
3597 eo_do(proxy, eo_event_callback_call(ELM_ATSPI_PROXY_EVENT_DISCONNECTED, NULL));
3598}
3599
3600static void _socket_addr_get_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
3601{
3602 Eo *proxy = data;
3603 const char *bus, *path, *err, *txt;
3604 Eldbus_Message_Iter *iter, *iter_variant, *iter_struct;
3605
3606 if (eldbus_message_error_get(msg, &err, &txt))
3607 {
3608 ERR("Unable to connect to socket: %s %s", err, txt);
3609 goto fail;
3610 }
3611
3612 iter = eldbus_message_iter_get(msg);
3613 if (!eldbus_message_iter_arguments_get(iter, "v", &iter_variant))
3614 {
3615 ERR("Unable to get variant parameter");
3616 goto fail;
3617 }
3618
3619 if (!eldbus_message_iter_arguments_get(iter_variant, "(so)", &iter_struct))
3620 {
3621 ERR("Unable to get so parameters");
3622 goto fail;
3623 }
3624
3625 if (!eldbus_message_iter_arguments_get(iter_struct, "so", &bus, &path))
3626 {
3627 ERR("Unable to get so parameters");
3628 goto fail;
3629 }
3630
3631 eo_do(proxy, elm_obj_atspi_proxy_address_set(bus, path));
3632
3633 _plug_embedded_send(_a11y_bus, proxy, bus, path);
3634
3635 return;
3636
3637fail:
3638 eo_do(proxy, eo_event_callback_call(ELM_ATSPI_PROXY_EVENT_DISCONNECTED, NULL));
3639}
3640
3641static Eina_Bool _free_stringshared(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
3642{
3643 const char *bus, *path;
3644
3645 eo_do(obj, bus = eo_key_data_get("__svc_bus"));
3646 eo_do(obj, path = eo_key_data_get("__svc_path"));
3647
3648 eina_stringshare_del(bus);
3649 eina_stringshare_del(path);
3650 return EINA_TRUE;
3651}
3652
3653static void
3654_plug_address_discover(Eldbus_Connection *conn, Eo *proxy, const char *svc_bus, const char *svc_path)
3655{
3656 Eldbus_Object *dobj;
3657 dobj = eldbus_object_get(conn, svc_bus, svc_path);
3658
3659 Eldbus_Message *msg = eldbus_object_method_call_new(dobj, ELDBUS_FDO_INTERFACE_PROPERTIES, "Get");
3660 eldbus_message_arguments_append(msg, "ss", ELM_ATSPI_DBUS_INTERFACE_PROXY, "Object");
3661 eldbus_object_send(dobj, msg, _socket_addr_get_cb, proxy, 100);
3662}
3663
3664static void _plug_connect(Eldbus_Connection *conn, Eo *proxy)
3665{
3666 const char *bus, *path;
3667
3668 eo_do(proxy, bus = eo_key_data_get("__svc_bus"));
3669 eo_do(proxy, path = eo_key_data_get("__svc_path"));
3670
3671 if (bus && path)
3672 {
3673 _plug_address_discover(conn, proxy, bus, path);
3674 return;
3675 }
3676 else
3677 {
3678 eo_do(proxy, elm_obj_atspi_proxy_address_get(&bus, &path));
3679 if (!bus || !path)
3680 {
3681 ERR("AT-SPI: Elm_Atspi_Proxy bus or path not set. Unable to connect");
3682 eo_do(proxy, eo_event_callback_call(ELM_ATSPI_PROXY_EVENT_DISCONNECTED, NULL));
3683 return;
3684 }
3685 _plug_embedded_send(conn, proxy, bus, path);
3686 }
3687 return;
3688}
3689
3690static Eina_Bool _from_list_remove(void *data, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
3691{
3692 Eina_List **list = data;
3693 *list = eina_list_remove(*list, obj);
3694 return EINA_TRUE;
3695}
3696
3697EAPI void elm_atspi_bridge_utils_proxy_connect(Eo *proxy)
3698{
3699 if (!_init_count)
3700 {
3701 ERR("AT-SPI: Atspi bridge is not enabled.");
3702 eo_do(proxy, eo_event_callback_call(ELM_ATSPI_PROXY_EVENT_DISCONNECTED, NULL));
3703 return;
3704 }
3705 if (!_a11y_bus)
3706 {
3707 if (!eina_list_data_find(plug_queue, proxy))
3708 {
3709 plug_queue = eina_list_append(plug_queue, proxy);
3710 eo_do(proxy, eo_event_callback_add(EO_EV_DEL, _from_list_remove, &plug_queue));
3711 }
3712 return;
3713 }
3714 _plug_connect(_a11y_bus, proxy);
3715}
3716
3717Eo* _elm_atspi_bridge_utils_proxy_create(Eo *parent, const char *svcname, int svcnum, Elm_Atspi_Proxy_Type type)
3718{
3719 Eo *ret;
3720 char bus[64], path[64];
3721
3722 ret = eo_add(ELM_ATSPI_PROXY_CLASS, parent, elm_obj_atspi_proxy_constructor(type));
3723 if (!ret) return NULL;
3724
3725 snprintf(bus, sizeof(bus), "elm.atspi.proxy.socket.%s-%d", svcname, svcnum);
3726 snprintf(path, sizeof(path), "/elm/atspi/proxy/socket/%s/%d", svcname, svcnum);
3727
3728 eo_do(ret, eo_key_data_set("__svc_bus", eina_stringshare_add(bus)));
3729 eo_do(ret, eo_key_data_set("__svc_path", eina_stringshare_add(path)));
3730 eo_do(ret, eo_event_callback_add(EO_EV_DEL, _free_stringshared, NULL));
3731
3732 return ret;
3733}
3734
3735static Eina_Bool
3736_on_socket_del(void *data, Eo *obj, const Eo_Event_Description *event EINA_UNUSED, void *event_info EINA_UNUSED)
3737{
3738 Eldbus_Service_Interface *ifc = data;
3739 const char *bus;
3740 Eldbus_Connection *conn = eldbus_service_connection_get(ifc);
3741 eo_do(obj, bus = eo_key_data_get("__svc_bus"));
3742 eldbus_name_release(conn, bus, NULL, NULL);
3743 eldbus_service_interface_unregister(ifc);
3744 return EINA_TRUE;
3745}
3746
3747static void
3748_proxy_interface_register(Eldbus_Connection *conn, Eo *proxy, const char *bus, const char *path)
3749{
3750 Eldbus_Service_Interface *proxy_infc;
3751 eldbus_name_request(conn, bus, ELDBUS_NAME_REQUEST_FLAG_DO_NOT_QUEUE, NULL, NULL);
3752 proxy_infc = eldbus_service_interface_register(_a11y_bus, path, &_proxy_iface_desc);
3753 if (!proxy_infc)
3754 ERR("AT-SPI: Proxy interface registration failed");
3755 eo_do(proxy, eo_event_callback_add(EO_EV_DEL, _on_socket_del, proxy_infc));
3756 eldbus_service_object_data_set(proxy_infc, "_atspi_obj", proxy);
3757}
3758
3759static void _socket_ifc_create(Eldbus_Connection *conn, Eo *proxy)
3760{
3761 const char *bus, *path;
3762
3763 eo_do(proxy, bus = eo_key_data_get("__svc_bus"));
3764 eo_do(proxy, path = eo_key_data_get("__svc_path"));
3765
3766 if (bus && path)
3767 _proxy_interface_register(conn, proxy, bus, path);
3768
3769 _socket_interface_register(conn, proxy);
3770}
3771
3772EAPI void elm_atspi_bridge_utils_proxy_listen(Eo *proxy)
3773{
3774 if (!_init_count)
3775 {
3776 ERR("AT-SPI: Atspi bridge is not enabled.");
3777 return;
3778 }
3779 if (!_a11y_bus)
3780 {
3781 if (!eina_list_data_find(socket_queue, proxy))
3782 {
3783 socket_queue = eina_list_append(socket_queue, proxy);
3784 eo_do(proxy, eo_event_callback_add(EO_EV_DEL, _from_list_remove, &socket_queue));
3785 }
3786 return;
3787 }
3788 _socket_ifc_create(_a11y_bus, proxy);
3789}
diff --git a/src/lib/elm_atspi_proxy.c b/src/lib/elm_atspi_proxy.c
new file mode 100644
index 000000000..3aac6d589
--- /dev/null
+++ b/src/lib/elm_atspi_proxy.c
@@ -0,0 +1,101 @@
1#ifdef HAVE_CONFIG_H
2 #include "elementary_config.h"
3#endif
4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6
7#include <Elementary.h>
8#include "elm_widget.h"
9#include "elm_priv.h"
10
11
12static Eina_List *_socket_list;
13
14typedef struct _Elm_Atspi_Proxy_Data Elm_Atspi_Proxy_Data;
15
16struct _Elm_Atspi_Proxy_Data
17{
18 Elm_Atspi_Proxy_Type type;
19 const char *bus;
20 const char *path;
21};
22
23EOLIAN static void
24_elm_atspi_proxy_eo_base_destructor(Eo *obj, Elm_Atspi_Proxy_Data *_pd)
25{
26 if (_pd->type == ELM_ATSPI_PROXY_TYPE_SOCKET)
27 _socket_list = eina_list_remove(_socket_list, obj);
28
29 if (_pd->bus) eina_stringshare_del(_pd->bus);
30 if (_pd->path) eina_stringshare_del(_pd->path);
31
32 eo_do_super(obj, ELM_ATSPI_PROXY_CLASS, eo_destructor());
33}
34
35EOLIAN static void
36_elm_atspi_proxy_constructor(Eo *obj, Elm_Atspi_Proxy_Data *_pd, Elm_Atspi_Proxy_Type type)
37{
38 Eo *parent;
39
40 _pd->type = type;
41 eo_do(obj, parent = eo_parent_get());
42 if (!parent || !eo_isa(parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
43 {
44 CRI("Elm_Atspi_Proxy parent (%s) must implement ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN", eo_class_name_get(eo_class_get(parent)));
45 abort();
46 }
47 if (type == ELM_ATSPI_PROXY_TYPE_SOCKET)
48 _socket_list = eina_list_append(_socket_list, obj);
49}
50
51EOLIAN Elm_Atspi_Proxy_Type
52_elm_atspi_proxy_type_get(Eo *obj EINA_UNUSED, Elm_Atspi_Proxy_Data *_pd)
53{
54 return _pd->type;
55}
56
57EOLIAN void
58_elm_atspi_proxy_address_get(Eo *obj EINA_UNUSED, Elm_Atspi_Proxy_Data *_pd, const char **bus, const char **path)
59{
60 if (bus) *bus = _pd->bus;
61 if (path) *path = _pd->path;
62}
63
64EOLIAN void
65_elm_atspi_proxy_address_set(Eo *obj EINA_UNUSED, Elm_Atspi_Proxy_Data *_pd, const char *bus, const char *path)
66{
67 if (bus) eina_stringshare_replace(&_pd->bus, bus);
68 if (path) eina_stringshare_replace(&_pd->path, path);
69}
70
71EOLIAN Eina_List*
72_elm_atspi_proxy_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Atspi_Proxy_Data *_pd)
73{
74 Eina_List *ret = NULL;
75 if (_pd->type == ELM_ATSPI_PROXY_TYPE_SOCKET)
76 {
77 Eo *parent;
78 eo_do(obj, parent = eo_parent_get());
79 ret = eina_list_append(ret, parent);
80 }
81 return ret;
82}
83
84EOLIAN Eo*
85_elm_atspi_proxy_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Atspi_Proxy_Data *_pd)
86{
87 Eo *ret = NULL;
88 if (_pd->type == ELM_ATSPI_PROXY_TYPE_PLUG)
89 {
90 eo_do(obj, ret = eo_parent_get());
91 }
92 return ret;
93}
94
95Eina_List*
96_elm_atspi_proxy_socket_list_get(void)
97{
98 return eina_list_clone(_socket_list);
99}
100
101#include "elm_atspi_proxy.eo.c"
diff --git a/src/lib/elm_atspi_proxy.eo b/src/lib/elm_atspi_proxy.eo
new file mode 100644
index 000000000..fab923f79
--- /dev/null
+++ b/src/lib/elm_atspi_proxy.eo
@@ -0,0 +1,43 @@
1class Elm_Atspi_Proxy (Eo.Base, Elm_Interface_Atspi_Accessible)
2{
3 eo_prefix: elm_obj_atspi_proxy;
4 data: Elm_Atspi_Proxy_Data;
5 methods {
6 constructor {
7 /*@ No description supplied by the EAPI. */
8 legacy: null;
9 params {
10 @in type: Elm_Atspi_Proxy_Type;
11 }
12 }
13 @property address {
14 set {
15 }
16 get {
17 }
18 values {
19 bus: const(char)*;
20 path: const(char)*;
21 }
22 }
23 @property type {
24 get {
25 }
26 values {
27 ret: Elm_Atspi_Proxy_Type;
28 }
29 }
30 }
31 constructors {
32 .constructor;
33 }
34 implements {
35 Eo.Base.destructor;
36 Elm_Interface_Atspi_Accessible.children.get;
37 Elm_Interface_Atspi_Accessible.parent.get;
38 }
39 events {
40 connected;
41 disconnected;
42 }
43}
diff --git a/src/lib/elm_atspi_proxy.h b/src/lib/elm_atspi_proxy.h
new file mode 100644
index 000000000..47cb538ea
--- /dev/null
+++ b/src/lib/elm_atspi_proxy.h
@@ -0,0 +1,15 @@
1
2enum _Elm_Atspi_Proxy_Type
3{
4 ELM_ATSPI_PROXY_TYPE_SOCKET,
5 ELM_ATSPI_PROXY_TYPE_PLUG
6};
7typedef enum _Elm_Atspi_Proxy_Type Elm_Atspi_Proxy_Type;
8
9#ifdef EFL_EO_API_SUPPORT
10#include "elm_atspi_proxy.eo.h"
11#endif
12#ifndef EFL_NOLEGACY_API_SUPPORT
13#include "elm_atspi_proxy.eo.legacy.h"
14#endif
15
diff --git a/src/lib/elm_plug.c b/src/lib/elm_plug.c
index d7f4448ef..c0c447279 100644
--- a/src/lib/elm_plug.c
+++ b/src/lib/elm_plug.c
@@ -178,12 +178,27 @@ _elm_plug_connect(Eo *obj, void *sd EINA_UNUSED, const char *svcname, int svcnum
178 ecore_evas_data_set(ee, PLUG_KEY, obj); 178 ecore_evas_data_set(ee, PLUG_KEY, obj);
179 ecore_evas_callback_delete_request_set(ee, _elm_plug_disconnected); 179 ecore_evas_callback_delete_request_set(ee, _elm_plug_disconnected);
180 ecore_evas_callback_resize_set(ee, _elm_plug_resized); 180 ecore_evas_callback_resize_set(ee, _elm_plug_resized);
181
182 if (_elm_config->atspi_mode)
183 {
184 Eo *proxy = _elm_atspi_bridge_utils_proxy_create(obj, svcname, svcnum, ELM_ATSPI_PROXY_TYPE_PLUG);
185 elm_atspi_bridge_utils_proxy_connect(proxy);
186 }
187
181 return EINA_TRUE; 188 return EINA_TRUE;
182 } 189 }
183 190
184 return EINA_FALSE; 191 return EINA_FALSE;
185} 192}
186 193
194EOLIAN static Eina_List*
195_elm_plug_elm_interface_atspi_accessible_children_get(Eo *obj, void *sd EINA_UNUSED)
196{
197 Eina_List *ret;
198 eo_do_super(obj, ELM_WIDGET_CLASS, ret = elm_interface_atspi_accessible_children_get());
199 return ret;
200}
201
187EOLIAN static void 202EOLIAN static void
188_elm_plug_class_constructor(Eo_Class *klass) 203_elm_plug_class_constructor(Eo_Class *klass)
189{ 204{
diff --git a/src/lib/elm_plug.eo b/src/lib/elm_plug.eo
index 1cb2808cc..6f3e8c7d8 100644
--- a/src/lib/elm_plug.eo
+++ b/src/lib/elm_plug.eo
@@ -43,6 +43,7 @@ class Elm.Plug (Elm.Widget)
43 Evas.Object_Smart.add; 43 Evas.Object_Smart.add;
44 Elm.Widget.theme_apply; 44 Elm.Widget.theme_apply;
45 Elm.Widget.on_focus; 45 Elm.Widget.on_focus;
46 Elm_Interface_Atspi_Accessible.children.get;
46 } 47 }
47 events { 48 events {
48 clicked; 49 clicked;
diff --git a/src/lib/elm_priv.h b/src/lib/elm_priv.h
index 9e7bc42ba..5d8145389 100644
--- a/src/lib/elm_priv.h
+++ b/src/lib/elm_priv.h
@@ -526,6 +526,7 @@ void *_elm_icon_signal_callback_del(Evas_Object *obj,
526 const char *emission, 526 const char *emission,
527 const char *source, 527 const char *source,
528 Edje_Signal_Cb func_cb); 528 Edje_Signal_Cb func_cb);
529Eo* _elm_atspi_bridge_utils_proxy_create(Eo *parent, const char *svcname, int svcnum, Elm_Atspi_Proxy_Type type);
529/* end of DEPRECATED */ 530/* end of DEPRECATED */
530 531
531 532
@@ -577,4 +578,6 @@ void _elm_entry_entry_paste(Evas_Object *obj, const char *entry);
577 578
578double _elm_atof(const char *s); 579double _elm_atof(const char *s);
579 580
581Eina_List* _elm_atspi_proxy_socket_list_get(void);
582
580#endif 583#endif
diff --git a/src/lib/elm_web.eo b/src/lib/elm_web.eo
index 1a0825684..dd18b2e10 100644
--- a/src/lib/elm_web.eo
+++ b/src/lib/elm_web.eo
@@ -669,6 +669,7 @@ class Elm.Web (Elm.Widget)
669 Elm.Widget.theme_apply; 669 Elm.Widget.theme_apply;
670 Elm.Widget.on_focus; 670 Elm.Widget.on_focus;
671 Elm.Widget.event; 671 Elm.Widget.event;
672 Elm_Interface_Atspi_Accessible.children.get;
672 } 673 }
673 events { 674 events {
674 uri,changed; /*@ s */ 675 uri,changed; /*@ s */
diff --git a/src/lib/elm_web2.c b/src/lib/elm_web2.c
index 40a00a6ba..15746e767 100644
--- a/src/lib/elm_web2.c
+++ b/src/lib/elm_web2.c
@@ -579,9 +579,32 @@ _view_smart_url_changed_cb(void *data,
579} 579}
580 580
581static void 581static void
582_view_smart_load_finished(void *data,
583 Evas_Object *obj,
584 void *event_info EINA_UNUSED)
585{
586 Eo *eo = data;
587 Elm_Web_Data *wd = eo_data_scope_get(eo, ELM_WEB_CLASS);
588 if (_elm_config->atspi_mode && !wd->atspi_plug)
589 {
590 char *bus, *path;
591 const char *address = ewk_view_accessibility_plug_id_get(obj);
592 if (_elm_atspi_bridge_plug_id_split(address, &bus, &path))
593 {
594 wd->atspi_plug = eo_add(ELM_ATSPI_PROXY_CLASS, eo, elm_obj_atspi_proxy_constructor(ELM_ATSPI_PROXY_TYPE_PLUG));
595 eo_do(wd->atspi_plug, elm_obj_atspi_proxy_address_set(bus, path));
596 elm_atspi_bridge_utils_proxy_connect(wd->atspi_plug);
597 free(bus);
598 free(path);
599 }
600 }
601}
602
603static void
582_view_smart_callback_proxy(Evas_Object *view, Evas_Object *parent) 604_view_smart_callback_proxy(Evas_Object *view, Evas_Object *parent)
583{ 605{
584 evas_object_smart_callback_add(view, SIG_URL_CHANGED, _view_smart_url_changed_cb, parent); 606 evas_object_smart_callback_add(view, SIG_URL_CHANGED, _view_smart_url_changed_cb, parent);
607 evas_object_smart_callback_add(view, "load,finished", _view_smart_load_finished, parent);
585} 608}
586 609
587static Eina_Bool _elm_need_web = EINA_FALSE; 610static Eina_Bool _elm_need_web = EINA_FALSE;
@@ -610,6 +633,16 @@ elm_need_web(void)
610#endif 633#endif
611} 634}
612 635
636EOLIAN static Eina_List*
637_elm_web_elm_interface_atspi_accessible_children_get(Eo *obj EINA_UNUSED, Elm_Web_Data *sd)
638{
639#ifdef HAVE_ELEMENTARY_WEB
640 if (sd->atspi_plug)
641 return eina_list_append(NULL, sd->atspi_plug);
642#endif
643 return NULL;
644}
645
613EOLIAN static Eina_Bool 646EOLIAN static Eina_Bool
614_elm_web_elm_widget_theme_apply(Eo *obj, Elm_Web_Data *sd EINA_UNUSED) 647_elm_web_elm_widget_theme_apply(Eo *obj, Elm_Web_Data *sd EINA_UNUSED)
615{ 648{
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index 12e6ebb94..761d21cfe 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -778,6 +778,8 @@ EAPI void elm_widget_focus_highlight_geometry_get(const Evas_Object
778void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it); 778void _elm_widget_item_highlight_in_theme(Evas_Object *obj, Elm_Object_Item *it);
779EAPI void elm_widget_focus_move_policy_set(Evas_Object *obj, Elm_Focus_Move_Policy policy); 779EAPI void elm_widget_focus_move_policy_set(Evas_Object *obj, Elm_Focus_Move_Policy policy);
780EAPI Elm_Focus_Move_Policy elm_widget_focus_move_policy_get(const Evas_Object *obj); 780EAPI Elm_Focus_Move_Policy elm_widget_focus_move_policy_get(const Evas_Object *obj);
781EAPI Eo* _elm_atspi_bridge_utils_plug_create(Eo *parent, const char *svcname, int svcnum);
782EAPI Eo* _elm_atspi_bridge_utils_socket_create(Eo *parent, const char *svcname, int svcnum);
781 783
782/** 784/**
783 * Function to operate on a given widget's scrollabe children when necessary. 785 * Function to operate on a given widget's scrollabe children when necessary.
diff --git a/src/lib/elm_widget_web.h b/src/lib/elm_widget_web.h
index 6eceacd41..431785fd7 100644
--- a/src/lib/elm_widget_web.h
+++ b/src/lib/elm_widget_web.h
@@ -66,6 +66,8 @@ struct _Elm_Web_Data
66 Ecore_Animator *animator; 66 Ecore_Animator *animator;
67 } bring_in; 67 } bring_in;
68 68
69 Eo *atspi_plug; // @since 1.15
70
69 Eina_Bool tab_propagate : 1; 71 Eina_Bool tab_propagate : 1;
70 Eina_Bool inwin_mode : 1; 72 Eina_Bool inwin_mode : 1;
71#endif 73#endif
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index b63b2b1c4..bf55ac341 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -195,6 +195,8 @@ struct _Elm_Win_Data
195 Eina_Bool use : 1; /* set ture when application use window manager rotation. */ 195 Eina_Bool use : 1; /* set ture when application use window manager rotation. */
196 } wm_rot; 196 } wm_rot;
197 197
198 Eo *socket_proxy; /* reference object to atspi object in separate process @since 1.15 */
199
198 void *trap_data; 200 void *trap_data;
199 201
200 struct 202 struct
@@ -3742,7 +3744,7 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
3742 eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_WINDOW)); 3744 eo_do(obj, elm_interface_atspi_accessible_role_set(ELM_ATSPI_ROLE_WINDOW));
3743 if (_elm_config->atspi_mode == ELM_ATSPI_MODE_ON) 3745 if (_elm_config->atspi_mode == ELM_ATSPI_MODE_ON)
3744 { 3746 {
3745 elm_interface_atspi_accessible_children_changed_added_signal_emit(_elm_atspi_bridge_root_get(), obj); 3747 eo_do(obj, eo_event_callback_call(ELM_INTERFACE_ATSPI_WINDOW_EVENT_WINDOW_CREATED, NULL));
3746 } 3748 }
3747 3749
3748 evas_object_show(sd->edje); 3750 evas_object_show(sd->edje);
@@ -5189,6 +5191,14 @@ _elm_win_socket_listen(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *svcnam
5189 if (!ecore_evas_extn_socket_listen(sd->ee, svcname, svcnum, svcsys)) 5191 if (!ecore_evas_extn_socket_listen(sd->ee, svcname, svcnum, svcsys))
5190 return EINA_FALSE; 5192 return EINA_FALSE;
5191 5193
5194 if (_elm_config->atspi_mode)
5195 {
5196 if (sd->socket_proxy)
5197 eo_unref(sd->socket_proxy);
5198 sd->socket_proxy = _elm_atspi_bridge_utils_proxy_create(obj, svcname, svcnum, ELM_ATSPI_PROXY_TYPE_SOCKET);
5199 elm_atspi_bridge_utils_proxy_listen(sd->socket_proxy);
5200 }
5201
5192 return EINA_TRUE; 5202 return EINA_TRUE;
5193} 5203}
5194 5204
@@ -5424,7 +5434,12 @@ EOLIAN static Eo*
5424_elm_win_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED) 5434_elm_win_elm_interface_atspi_accessible_parent_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
5425{ 5435{
5426 // attach all kinds of windows directly to ATSPI application root object 5436 // attach all kinds of windows directly to ATSPI application root object
5427 return _elm_atspi_bridge_root_get(); 5437 if (sd->type == ELM_WIN_SOCKET_IMAGE)
5438 {
5439 return sd->socket_proxy;
5440 }
5441 else
5442 return _elm_atspi_bridge_root_get();
5428} 5443}
5429 5444
5430EOLIAN static const Elm_Atspi_Action* 5445EOLIAN static const Elm_Atspi_Action*