summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <lukasz.stanislawski@gmail.com>2019-01-24 07:18:43 +0100
committerLukasz Stanislawski <lukasz.stanislawski@gmail.com>2019-01-24 07:18:43 +0100
commitec147384aa3b4c8943597465ab3b410caa971c1e (patch)
treea452be1e793aac3cdf0335371bc4428262c54e41
parent579c564574b3434bf7596035db92c8f9d08175ab (diff)
efl_access: refactor Efl.Access.Object to interfacedevs/stanluk/mixin_removal
-rw-r--r--src/lib/elementary/efl_access_object.c496
-rw-r--r--src/lib/elementary/efl_access_object.eo6
-rw-r--r--src/lib/elementary/efl_ui_widget.c813
-rw-r--r--src/lib/elementary/efl_ui_widget.eo18
-rw-r--r--src/lib/elementary/elm_atspi_app_object.c354
-rw-r--r--src/lib/elementary/elm_atspi_app_object.eo20
-rw-r--r--src/lib/elementary/elm_atspi_bridge.c50
-rw-r--r--src/lib/elementary/elm_widget.h21
-rw-r--r--src/lib/elementary/elm_widget_item.eo18
9 files changed, 1239 insertions, 557 deletions
diff --git a/src/lib/elementary/efl_access_object.c b/src/lib/elementary/efl_access_object.c
index c011e62cfc..6a69f4b67a 100644
--- a/src/lib/elementary/efl_access_object.c
+++ b/src/lib/elementary/efl_access_object.c
@@ -8,368 +8,6 @@
8#include "elm_widget.h" 8#include "elm_widget.h"
9#include "elm_priv.h" 9#include "elm_priv.h"
10 10
11const char* Access_Name[] = {
12 "invalid",
13 "accelerator label",
14 "alert",
15 "animation",
16 "arrow",
17 "calendar",
18 "canvas",
19 "check box",
20 "check menu item",
21 "color chooser",
22 "column header",
23 "combo box",
24 "dateeditor",
25 "desktop icon",
26 "desktop frame",
27 "dial",
28 "dialog",
29 "directory pane",
30 "drawing area",
31 "file chooser",
32 "filler",
33 "focus traversable",
34 "font chooser",
35 "frame",
36 "glass pane",
37 "html container",
38 "icon",
39 "image",
40 "internal frame",
41 "label",
42 "layered pane",
43 "list",
44 "list item",
45 "menu",
46 "menu bar",
47 "menu item",
48 "option pane",
49 "page tab",
50 "page tab list",
51 "panel",
52 "password text",
53 "popup menu",
54 "progress bar",
55 "push button",
56 "radio button",
57 "radio menu item",
58 "root pane",
59 "row header",
60 "scroll bar",
61 "scroll pane",
62 "separator",
63 "slider",
64 "spin button",
65 "split pane",
66 "status bar",
67 "table",
68 "table cell",
69 "table column header",
70 "table row header",
71 "tearoff menu item",
72 "terminal",
73 "text",
74 "toggle button",
75 "tool bar",
76 "tool tip",
77 "tree",
78 "tree table",
79 "unknown",
80 "viewport",
81 "window",
82 "extended",
83 "header",
84 "footer",
85 "paragraph",
86 "ruler",
87 "application",
88 "autocomplete",
89 "editbar",
90 "embedded",
91 "entry",
92 "chart",
93 "caption",
94 "document frame",
95 "heading",
96 "page",
97 "section",
98 "redundant object",
99 "form",
100 "link",
101 "input method window",
102 "table row",
103 "tree item",
104 "document spreadsheet",
105 "document presentation",
106 "document text",
107 "document web",
108 "document email",
109 "comment",
110 "list box",
111 "grouping",
112 "image map",
113 "notification",
114 "info bar",
115 "last defined"
116};
117
118struct _Efl_Access_Object_Data
119{
120 Eina_List *relations;
121 Eina_List *attr_list;
122 const char *name;
123 const char *description;
124 const char *translation_domain;
125 Efl_Access_Role role;
126 Efl_Access_Reading_Info_Type reading_info;
127 Efl_Access_Object *access_parent;
128};
129
130typedef struct _Efl_Access_Object_Data Efl_Access_Object_Data;
131
132EOLIAN static int
133_efl_access_object_index_in_parent_get(const Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED)
134{
135 Eina_List *l, *children = NULL;
136 Eo *chld, *parent = NULL;
137 int ret = 0;
138
139 parent = efl_access_object_access_parent_get(obj);
140 if (!parent) return -1;
141
142 children = efl_access_object_access_children_get(parent);
143 if (!children) return -1;
144
145 EINA_LIST_FOREACH(children, l, chld)
146 {
147 if (obj == chld)
148 break;
149 ret++;
150 }
151 if (ret == (int)eina_list_count(children))
152 {
153 ERR("Object %s not present in its AT-SPI parents (%s) children list! This should never happen.", efl_class_name_get(efl_class_get(obj)), efl_class_name_get(efl_class_get(parent)));
154 ret = -1;
155 }
156 eina_list_free(children);
157 return ret;
158}
159
160
161EOLIAN static Efl_Access_Object*
162_efl_access_object_access_parent_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd EINA_UNUSED)
163{
164 return pd->access_parent;
165}
166
167EOLIAN static void
168_efl_access_object_access_parent_set(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd EINA_UNUSED, Efl_Access_Object *parent)
169{
170 pd->access_parent = parent;
171}
172
173EOLIAN Eina_List*
174_efl_access_object_attributes_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd)
175{
176 Eina_List *attr_list = NULL;
177 if (pd->attr_list)
178 {
179 Eina_List *l = NULL;
180 Efl_Access_Attribute *t_attr = NULL;
181 EINA_LIST_FOREACH(pd->attr_list, l, t_attr)
182 {
183 Efl_Access_Attribute *attr = calloc(1, sizeof(Efl_Access_Attribute));
184 if (!attr)
185 return attr_list;
186
187 attr->key = eina_stringshare_add(t_attr->key);
188 attr->value = eina_stringshare_add(t_attr->value);
189 attr_list = eina_list_append(attr_list, attr);
190 }
191 }
192 return attr_list;
193}
194
195EOLIAN static void
196_efl_access_object_attribute_append(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd, const char *key, const char *value)
197{
198 Eina_List *l;
199 Efl_Access_Attribute *attr = NULL;
200
201 if (!key || !value) return;
202
203 /* Check existing attributes has this key */
204 EINA_LIST_FOREACH(pd->attr_list, l, attr)
205 {
206 if (!strcmp((const char *)attr->key, key))
207 {
208 eina_stringshare_replace(&attr->value, value);
209 return;
210 }
211 }
212
213 /* Add new attribute */
214 attr = calloc(1, sizeof(Efl_Access_Attribute));
215 if (!attr) return;
216
217 attr->key = eina_stringshare_add(key);
218 attr->value = eina_stringshare_add(value);
219 pd->attr_list = eina_list_append(pd->attr_list, attr);
220}
221
222EOLIAN static void _efl_access_object_attributes_clear(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd)
223{
224 if (!pd->attr_list) return;
225 Efl_Access_Attribute *attr;
226 EINA_LIST_FREE(pd->attr_list, attr)
227 {
228 eina_stringshare_del(attr->key);
229 eina_stringshare_del(attr->value);
230 free(attr);
231 }
232 pd->attr_list = NULL;
233}
234
235EOLIAN static void
236_efl_access_object_reading_info_type_set(Eo *obj, Efl_Access_Object_Data *pd, Efl_Access_Reading_Info_Type reading_info)
237{
238 Eina_Strbuf *buf = NULL;
239 pd->reading_info = reading_info;
240 buf = eina_strbuf_new();
241 eina_strbuf_reset(buf);
242 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_NAME))
243 {
244 eina_strbuf_append(buf, "name");
245 eina_strbuf_append_char(buf, '|');
246 }
247 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_ROLE))
248 {
249 eina_strbuf_append(buf, "role");
250 eina_strbuf_append_char(buf, '|');
251 }
252 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_DESCRIPTION))
253 {
254 eina_strbuf_append(buf, "description");
255 eina_strbuf_append_char(buf, '|');
256 }
257 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_STATE))
258 {
259 eina_strbuf_append(buf, "state");
260 }
261 efl_access_object_attribute_append(obj, "reading_info_type", eina_strbuf_string_get(buf));
262 eina_strbuf_free(buf);
263}
264
265EOLIAN Efl_Access_Reading_Info_Type
266_efl_access_object_reading_info_type_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd)
267{
268 return pd->reading_info;
269}
270
271EOLIAN static Efl_Access_Role
272_efl_access_object_role_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd)
273{
274 return pd->role;
275}
276
277EOLIAN static void
278_efl_access_object_role_set(Eo *obj, Efl_Access_Object_Data *pd, Efl_Access_Role role)
279{
280 if (pd->role != role)
281 {
282 pd->role = role;
283 efl_access_role_changed_signal_emit(obj);
284 }
285}
286
287EOLIAN const char *
288_efl_access_object_role_name_get(const Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED)
289{
290 Efl_Access_Role role;
291
292 role = efl_access_object_role_get(obj);
293
294 return role > EFL_ACCESS_ROLE_LAST_DEFINED ? "" : Access_Name[role];
295}
296
297EOLIAN const char *
298_efl_access_object_i18n_name_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd)
299{
300#ifdef ENABLE_NLS
301 if (pd->translation_domain)
302 return dgettext(pd->translation_domain, pd->name);
303#endif
304 return pd->name;
305}
306
307EOLIAN static void
308_efl_access_object_i18n_name_set(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd, const char *val)
309{
310 eina_stringshare_replace(&pd->name, val);
311}
312
313const char * _efl_access_object_description_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd)
314{
315#ifdef ENABLE_NLS
316 if (pd->translation_domain)
317 return dgettext(pd->translation_domain, pd->description);
318#endif
319 return pd->description;
320}
321
322EOLIAN static void
323_efl_access_object_description_set(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd, const char *val)
324{
325 eina_stringshare_replace(&pd->description, val);
326}
327
328EOLIAN static const char *
329_efl_access_object_localized_role_name_get(const Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED)
330{
331 const char *ret = NULL;
332 ret = efl_access_object_role_name_get(obj);
333#ifdef ENABLE_NLS
334 ret = gettext(ret);
335#endif
336 return ret;
337}
338
339EOLIAN static Eina_List *
340_efl_access_object_access_children_get(const Eo *obj, Efl_Access_Object_Data *pd EINA_UNUSED)
341{
342 Eina_List *children = NULL;
343 Eina_Iterator *iter = NULL;
344 Eo *chld;
345
346 // By default use Efl_Object object hierarchy
347 /* XXX const */
348 iter = efl_children_iterator_new((Eo *)obj);
349 if (!iter) return NULL;
350
351 EINA_ITERATOR_FOREACH(iter, chld)
352 {
353 if (efl_isa(chld, EFL_ACCESS_OBJECT_MIXIN))
354 children = eina_list_append(children, chld);
355 }
356 eina_iterator_free(iter);
357
358 return children;
359}
360
361EOLIAN static Efl_Access_State_Set
362_efl_access_object_state_set_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd EINA_UNUSED)
363{
364 return 0;
365}
366
367EOLIAN Eina_Iterator *
368_efl_access_object_relations_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd)
369{
370 return eina_list_iterator_new(pd->relations);
371}
372
373EAPI void efl_access_attributes_list_free(Eina_List *list) 11EAPI void efl_access_attributes_list_free(Eina_List *list)
374{ 12{
375 Efl_Access_Attribute *attr; 13 Efl_Access_Attribute *attr;
@@ -381,138 +19,4 @@ EAPI void efl_access_attributes_list_free(Eina_List *list)
381 } 19 }
382} 20}
383 21
384EOLIAN void
385_efl_access_object_translation_domain_set(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd, const char *domain)
386{
387 eina_stringshare_replace(&pd->translation_domain, domain);
388}
389
390
391EOLIAN const char*
392_efl_access_object_translation_domain_get(const Eo *obj EINA_UNUSED, Efl_Access_Object_Data *pd)
393{
394 return pd->translation_domain;
395}
396
397static void
398_on_rel_obj_del(void *data, const Efl_Event *event)
399{
400 Efl_Access_Object_Data *sd = data;
401 Efl_Access_Relation *rel;
402 Eina_List *l, *l2, *p, *p2;
403 Eo *rel_obj;
404
405 EINA_LIST_FOREACH_SAFE(sd->relations, l, l2, rel)
406 {
407 EINA_LIST_FOREACH_SAFE(rel->objects, p, p2, rel_obj)
408 {
409 if (rel_obj == event->object)
410 rel->objects = eina_list_remove_list(rel->objects, p);
411 }
412 if (!rel->objects)
413 {
414 sd->relations = eina_list_remove_list(sd->relations, l);
415 free(rel);
416 }
417 }
418}
419
420EOLIAN static Eina_Bool
421_efl_access_object_relationship_append(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *sd, Efl_Access_Relation_Type type, const Efl_Access_Object *relation)
422{
423 Efl_Access_Relation *rel;
424 Eina_List *l;
425
426 EINA_LIST_FOREACH(sd->relations, l, rel)
427 {
428 if (rel->type == type)
429 {
430 if (!eina_list_data_find(rel->objects, relation))
431 {
432 rel->objects = eina_list_append(rel->objects, relation);
433 efl_event_callback_add((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
434 }
435 return EINA_TRUE;
436 }
437 }
438
439 rel = calloc(1, sizeof(Efl_Access_Relation));
440 if (!rel) return EINA_FALSE;
441
442 rel->type = type;
443 rel->objects = eina_list_append(rel->objects, relation);
444 sd->relations = eina_list_append(sd->relations, rel);
445
446 efl_event_callback_add((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
447
448 return EINA_TRUE;
449}
450
451EOLIAN static void
452_efl_access_object_relationship_remove(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *sd, Efl_Access_Relation_Type type, const Efl_Access_Object *relation)
453{
454 Efl_Access_Relation *rel;
455 Eina_List *l;
456
457 EINA_LIST_FOREACH(sd->relations, l, rel)
458 {
459 if (rel->type == type)
460 {
461 if (relation)
462 {
463 if (eina_list_data_find(rel->objects, relation))
464 {
465 efl_event_callback_del((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
466 rel->objects = eina_list_remove(rel->objects, relation);
467 }
468 if (!rel->objects)
469 {
470 sd->relations = eina_list_remove(sd->relations, rel);
471 free(rel);
472 }
473 }
474 else
475 {
476 Eina_List *ll;
477 Eo *ro;
478
479 EINA_LIST_FOREACH(rel->objects, ll, ro)
480 efl_event_callback_del(ro, EFL_EVENT_DEL, _on_rel_obj_del, sd);
481 sd->relations = eina_list_remove(sd->relations, rel);
482 free(rel);
483 }
484 return ;
485 }
486 }
487}
488
489EOLIAN static void
490_efl_access_object_relationships_clear(Eo *obj EINA_UNUSED, Efl_Access_Object_Data *sd)
491{
492 Efl_Access_Relation *rel;
493
494 EINA_LIST_FREE(sd->relations, rel)
495 {
496 Eina_List *l;
497
498 EINA_LIST_FOREACH(rel->objects, l, obj)
499 efl_event_callback_del(obj, EFL_EVENT_DEL, _on_rel_obj_del, sd);
500 eina_list_free(rel->objects);
501 free(rel);
502 }
503}
504
505EOLIAN void
506_efl_access_object_efl_object_destructor(Eo *obj, Efl_Access_Object_Data *pd)
507{
508 efl_access_object_attributes_clear(obj);
509 efl_access_object_relationships_clear(obj);
510
511 eina_stringshare_del(pd->name);
512 eina_stringshare_del(pd->description);
513 eina_stringshare_del(pd->translation_domain);
514
515 efl_destructor(efl_super(obj, EFL_ACCESS_OBJECT_MIXIN));
516}
517
518#include "efl_access_object.eo.c" 22#include "efl_access_object.eo.c"
diff --git a/src/lib/elementary/efl_access_object.eo b/src/lib/elementary/efl_access_object.eo
index 96f6fc0a00..305385735f 100644
--- a/src/lib/elementary/efl_access_object.eo
+++ b/src/lib/elementary/efl_access_object.eo
@@ -231,11 +231,10 @@ struct Efl.Access.Relation
231 objects: list<Efl.Object>; [[List with relation objects]] 231 objects: list<Efl.Object>; [[List with relation objects]]
232} 232}
233 233
234mixin Efl.Access.Object requires Efl.Object 234interface Efl.Access.Object
235{ 235{
236 [[Accessibility accessible mixin]] 236 [[Accessibility accessible mixin]]
237 eo_prefix: efl_access_object; 237 eo_prefix: efl_access_object;
238 data: Efl_Access_Object_Data;
239 methods { 238 methods {
240 @property localized_role_name @protected @beta { 239 @property localized_role_name @protected @beta {
241 [[Gets an localized string describing accessible object role name.]] 240 [[Gets an localized string describing accessible object role name.]]
@@ -407,9 +406,6 @@ mixin Efl.Access.Object requires Efl.Object
407 [[Removes all relationships in accessible object.]] 406 [[Removes all relationships in accessible object.]]
408 } 407 }
409 } 408 }
410 implements {
411 Efl.Object.destructor;
412 }
413 events { 409 events {
414 property,changed: string; [[Called when property has changed]] 410 property,changed: string; [[Called when property has changed]]
415 children,changed: Efl.Access.Event.Children_Changed.Data; [[Called when children have changed]] 411 children,changed: Efl.Access.Event.Children_Changed.Data; [[Called when children have changed]]
diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c
index 86ea7c6aba..8a69cccb19 100644
--- a/src/lib/elementary/efl_ui_widget.c
+++ b/src/lib/elementary/efl_ui_widget.c
@@ -1479,7 +1479,7 @@ _efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Ob
1479 if (_elm_widget_is(sobj)) 1479 if (_elm_widget_is(sobj))
1480 sdc = efl_data_scope_get(sobj, MY_CLASS); 1480 sdc = efl_data_scope_get(sobj, MY_CLASS);
1481 1481
1482 if (efl_isa(sobj, EFL_ACCESS_OBJECT_MIXIN)) 1482 if (efl_isa(sobj, EFL_ACCESS_OBJECT_INTERFACE))
1483 efl_access_object_access_parent_set(sobj, obj); 1483 efl_access_object_access_parent_set(sobj, obj);
1484 1484
1485 if (sobj == sd->parent_obj) 1485 if (sobj == sd->parent_obj)
@@ -1594,7 +1594,7 @@ _efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Ob
1594 1594
1595 EINA_SAFETY_ON_TRUE_RETURN_VAL(obj == sobj, EINA_FALSE); 1595 EINA_SAFETY_ON_TRUE_RETURN_VAL(obj == sobj, EINA_FALSE);
1596 1596
1597 if (efl_isa(sobj, EFL_ACCESS_OBJECT_MIXIN)) 1597 if (efl_isa(sobj, EFL_ACCESS_OBJECT_INTERFACE))
1598 efl_access_object_access_parent_set(sobj, NULL); 1598 efl_access_object_access_parent_set(sobj, NULL);
1599 1599
1600 sobj_parent = evas_object_data_del(sobj, "elm-parent"); 1600 sobj_parent = evas_object_data_del(sobj, "elm-parent");
@@ -4061,6 +4061,13 @@ _elm_widget_item_efl_object_destructor(Eo *eo_item, Elm_Widget_Item_Data *item)
4061 eina_hash_free(item->labels); 4061 eina_hash_free(item->labels);
4062 4062
4063 efl_access_removed(eo_item); 4063 efl_access_removed(eo_item);
4064 efl_access_object_attributes_clear(eo_item);
4065 efl_access_object_relationships_clear(eo_item);
4066
4067 eina_stringshare_del(item->name);
4068 eina_stringshare_del(item->description);
4069 eina_stringshare_del(item->translation_domain);
4070
4064 4071
4065 EINA_MAGIC_SET(item, EINA_MAGIC_NONE); 4072 EINA_MAGIC_SET(item, EINA_MAGIC_NONE);
4066 4073
@@ -5370,6 +5377,13 @@ _efl_ui_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd)
5370 sd->manager.provider = NULL; 5377 sd->manager.provider = NULL;
5371 } 5378 }
5372 efl_access_removed(obj); 5379 efl_access_removed(obj);
5380 efl_access_object_attributes_clear(obj);
5381 efl_access_object_relationships_clear(obj);
5382
5383 eina_stringshare_del(sd->name);
5384 eina_stringshare_del(sd->description);
5385 eina_stringshare_del(sd->translation_domain);
5386
5373 if (sd->logical.parent) 5387 if (sd->logical.parent)
5374 { 5388 {
5375 efl_weak_unref(&sd->logical.parent); 5389 efl_weak_unref(&sd->logical.parent);
@@ -5455,10 +5469,17 @@ _efl_ui_widget_efl_access_component_focus_grab(Eo *obj, Elm_Widget_Smart_Data *p
5455EOLIAN static const char* 5469EOLIAN static const char*
5456_efl_ui_widget_efl_access_object_i18n_name_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED) 5470_efl_ui_widget_efl_access_object_i18n_name_get(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
5457{ 5471{
5458 const char *ret, *name; 5472 const char *ret;
5459 name = efl_access_object_i18n_name_get(efl_super(obj, EFL_UI_WIDGET_CLASS));
5460 5473
5461 if (name) return name; 5474 if (_pd->name)
5475 {
5476#ifdef ENABLE_NLS
5477 if (_pd->translation_domain)
5478 return dgettext(_pd->translation_domain, _pd->name);
5479 else
5480#endif
5481 return _pd->name;
5482 }
5462 5483
5463 ret = elm_object_text_get(obj); 5484 ret = elm_object_text_get(obj);
5464 if (!ret) return NULL; 5485 if (!ret) return NULL;
@@ -5475,7 +5496,7 @@ _efl_ui_widget_efl_access_object_access_children_get(const Eo *obj EINA_UNUSED,
5475 EINA_LIST_FOREACH(pd->subobjs, l, widget) 5496 EINA_LIST_FOREACH(pd->subobjs, l, widget)
5476 { 5497 {
5477 if (!elm_object_widget_check(widget)) continue; 5498 if (!elm_object_widget_check(widget)) continue;
5478 if (!efl_isa(widget, EFL_ACCESS_OBJECT_MIXIN)) continue; 5499 if (!efl_isa(widget, EFL_ACCESS_OBJECT_INTERFACE)) continue;
5479 accs = eina_list_append(accs, widget); 5500 accs = eina_list_append(accs, widget);
5480 } 5501 }
5481 return accs; 5502 return accs;
@@ -5486,8 +5507,6 @@ _efl_ui_widget_efl_access_object_state_set_get(const Eo *obj, Elm_Widget_Smart_D
5486{ 5507{
5487 Efl_Access_State_Set states = 0; 5508 Efl_Access_State_Set states = 0;
5488 5509
5489 states = efl_access_object_state_set_get(efl_super(obj, EFL_UI_WIDGET_CLASS));
5490
5491 if (evas_object_visible_get(obj)) 5510 if (evas_object_visible_get(obj))
5492 { 5511 {
5493 STATE_TYPE_SET(states, EFL_ACCESS_STATE_VISIBLE); 5512 STATE_TYPE_SET(states, EFL_ACCESS_STATE_VISIBLE);
@@ -5518,7 +5537,21 @@ _efl_ui_widget_efl_access_object_attributes_get(const Eo *obj, Elm_Widget_Smart_
5518 Eina_List *attr_list = NULL; 5537 Eina_List *attr_list = NULL;
5519 Efl_Access_Attribute *attr = NULL; 5538 Efl_Access_Attribute *attr = NULL;
5520 5539
5521 attr_list = efl_access_object_attributes_get(efl_super(obj, EFL_UI_WIDGET_CLASS)); 5540 if (pd->attr_list)
5541 {
5542 Eina_List *l = NULL;
5543 Efl_Access_Attribute *t_attr = NULL;
5544 EINA_LIST_FOREACH(pd->attr_list, l, t_attr)
5545 {
5546 Efl_Access_Attribute *attr = calloc(1, sizeof(Efl_Access_Attribute));
5547 if (!attr)
5548 return attr_list;
5549
5550 attr->key = eina_stringshare_add(t_attr->key);
5551 attr->value = eina_stringshare_add(t_attr->value);
5552 attr_list = eina_list_append(attr_list, attr);
5553 }
5554 }
5522 5555
5523 //Add type and style information in addition. 5556 //Add type and style information in addition.
5524 type = elm_widget_type_get(obj); 5557 type = elm_widget_type_get(obj);
@@ -5555,7 +5588,21 @@ _elm_widget_item_efl_access_object_attributes_get(const Eo *eo_item, Elm_Widget_
5555 Eina_List *attr_list = NULL; 5588 Eina_List *attr_list = NULL;
5556 Efl_Access_Attribute *attr = NULL; 5589 Efl_Access_Attribute *attr = NULL;
5557 5590
5558 attr_list = efl_access_object_attributes_get(efl_super(eo_item, ELM_WIDGET_ITEM_CLASS)); 5591 if (pd->attr_list)
5592 {
5593 Eina_List *l = NULL;
5594 Efl_Access_Attribute *t_attr = NULL;
5595 EINA_LIST_FOREACH(pd->attr_list, l, t_attr)
5596 {
5597 Efl_Access_Attribute *attr = calloc(1, sizeof(Efl_Access_Attribute));
5598 if (!attr)
5599 return attr_list;
5600
5601 attr->key = eina_stringshare_add(t_attr->key);
5602 attr->value = eina_stringshare_add(t_attr->value);
5603 attr_list = eina_list_append(attr_list, attr);
5604 }
5605 }
5559 5606
5560 style = elm_object_item_style_get(eo_item); 5607 style = elm_object_item_style_get(eo_item);
5561 if (style) 5608 if (style)
@@ -5614,7 +5661,7 @@ _efl_ui_widget_efl_object_provider_find(const Eo *obj, Elm_Widget_Smart_Data *pd
5614 if ((klass == EFL_CONFIG_INTERFACE) || (klass == EFL_CONFIG_GLOBAL_CLASS)) 5661 if ((klass == EFL_CONFIG_INTERFACE) || (klass == EFL_CONFIG_GLOBAL_CLASS))
5615 return _efl_config_obj; 5662 return _efl_config_obj;
5616 5663
5617 if (klass == EFL_ACCESS_OBJECT_MIXIN) 5664 if (klass == EFL_ACCESS_OBJECT_INTERFACE)
5618 return (Eo*)obj; 5665 return (Eo*)obj;
5619 5666
5620 if (pd->provider_lookup) return NULL; 5667 if (pd->provider_lookup) return NULL;
@@ -6592,6 +6639,750 @@ _elm_widget_item_access_actions_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_D
6592 6639
6593/* Efl.Access.Action end */ 6640/* Efl.Access.Action end */
6594 6641
6642const char* Access_Name[] = {
6643 "invalid",
6644 "accelerator label",
6645 "alert",
6646 "animation",
6647 "arrow",
6648 "calendar",
6649 "canvas",
6650 "check box",
6651 "check menu item",
6652 "color chooser",
6653 "column header",
6654 "combo box",
6655 "dateeditor",
6656 "desktop icon",
6657 "desktop frame",
6658 "dial",
6659 "dialog",
6660 "directory pane",
6661 "drawing area",
6662 "file chooser",
6663 "filler",
6664 "focus traversable",
6665 "font chooser",
6666 "frame",
6667 "glass pane",
6668 "html container",
6669 "icon",
6670 "image",
6671 "internal frame",
6672 "label",
6673 "layered pane",
6674 "list",
6675 "list item",
6676 "menu",
6677 "menu bar",
6678 "menu item",
6679 "option pane",
6680 "page tab",
6681 "page tab list",
6682 "panel",
6683 "password text",
6684 "popup menu",
6685 "progress bar",
6686 "push button",
6687 "radio button",
6688 "radio menu item",
6689 "root pane",
6690 "row header",
6691 "scroll bar",
6692 "scroll pane",
6693 "separator",
6694 "slider",
6695 "spin button",
6696 "split pane",
6697 "status bar",
6698 "table",
6699 "table cell",
6700 "table column header",
6701 "table row header",
6702 "tearoff menu item",
6703 "terminal",
6704 "text",
6705 "toggle button",
6706 "tool bar",
6707 "tool tip",
6708 "tree",
6709 "tree table",
6710 "unknown",
6711 "viewport",
6712 "window",
6713 "extended",
6714 "header",
6715 "footer",
6716 "paragraph",
6717 "ruler",
6718 "application",
6719 "autocomplete",
6720 "editbar",
6721 "embedded",
6722 "entry",
6723 "chart",
6724 "caption",
6725 "document frame",
6726 "heading",
6727 "page",
6728 "section",
6729 "redundant object",
6730 "form",
6731 "link",
6732 "input method window",
6733 "table row",
6734 "tree item",
6735 "document spreadsheet",
6736 "document presentation",
6737 "document text",
6738 "document web",
6739 "document email",
6740 "comment",
6741 "list box",
6742 "grouping",
6743 "image map",
6744 "notification",
6745 "info bar",
6746 "last defined"
6747};
6748
6749EOLIAN static int
6750_efl_ui_widget_efl_access_object_index_in_parent_get(const Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
6751{
6752 Eina_List *l, *children = NULL;
6753 Eo *chld, *parent = NULL;
6754 int ret = 0;
6755
6756 parent = efl_access_object_access_parent_get(obj);
6757 if (!parent) return -1;
6758
6759 children = efl_access_object_access_children_get(parent);
6760 if (!children) return -1;
6761
6762 EINA_LIST_FOREACH(children, l, chld)
6763 {
6764 if (obj == chld)
6765 break;
6766 ret++;
6767 }
6768 if (ret == (int)eina_list_count(children))
6769 {
6770 ERR("Object %s not present in its AT-SPI parents (%s) children list! This should never happen.", efl_class_name_get(efl_class_get(obj)), efl_class_name_get(efl_class_get(parent)));
6771 ret = -1;
6772 }
6773 eina_list_free(children);
6774 return ret;
6775}
6776
6777
6778EOLIAN static Efl_Access_Object*
6779_efl_ui_widget_efl_access_object_access_parent_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd EINA_UNUSED)
6780{
6781 return pd->access_parent;
6782}
6783
6784EOLIAN static void
6785_efl_ui_widget_efl_access_object_access_parent_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd EINA_UNUSED, Efl_Access_Object *parent)
6786{
6787 pd->access_parent = parent;
6788}
6789
6790EOLIAN static void
6791_efl_ui_widget_efl_access_object_attribute_append(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, const char *key, const char *value)
6792{
6793 Eina_List *l;
6794 Efl_Access_Attribute *attr = NULL;
6795
6796 if (!key || !value) return;
6797
6798 /* Check existing attributes has this key */
6799 EINA_LIST_FOREACH(pd->attr_list, l, attr)
6800 {
6801 if (!strcmp((const char *)attr->key, key))
6802 {
6803 eina_stringshare_replace(&attr->value, value);
6804 return;
6805 }
6806 }
6807
6808 /* Add new attribute */
6809 attr = calloc(1, sizeof(Efl_Access_Attribute));
6810 if (!attr) return;
6811
6812 attr->key = eina_stringshare_add(key);
6813 attr->value = eina_stringshare_add(value);
6814 pd->attr_list = eina_list_append(pd->attr_list, attr);
6815}
6816
6817EOLIAN static void _efl_ui_widget_efl_access_object_attributes_clear(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
6818{
6819 if (!pd->attr_list) return;
6820 Efl_Access_Attribute *attr;
6821 EINA_LIST_FREE(pd->attr_list, attr)
6822 {
6823 eina_stringshare_del(attr->key);
6824 eina_stringshare_del(attr->value);
6825 free(attr);
6826 }
6827 pd->attr_list = NULL;
6828}
6829
6830EOLIAN static void
6831_efl_ui_widget_efl_access_object_reading_info_type_set(Eo *obj, Elm_Widget_Smart_Data *pd, Efl_Access_Reading_Info_Type reading_info)
6832{
6833 Eina_Strbuf *buf = NULL;
6834 pd->reading_info = reading_info;
6835 buf = eina_strbuf_new();
6836 eina_strbuf_reset(buf);
6837 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_NAME))
6838 {
6839 eina_strbuf_append(buf, "name");
6840 eina_strbuf_append_char(buf, '|');
6841 }
6842 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_ROLE))
6843 {
6844 eina_strbuf_append(buf, "role");
6845 eina_strbuf_append_char(buf, '|');
6846 }
6847 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_DESCRIPTION))
6848 {
6849 eina_strbuf_append(buf, "description");
6850 eina_strbuf_append_char(buf, '|');
6851 }
6852 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_STATE))
6853 {
6854 eina_strbuf_append(buf, "state");
6855 }
6856 efl_access_object_attribute_append(obj, "reading_info_type", eina_strbuf_string_get(buf));
6857 eina_strbuf_free(buf);
6858}
6859
6860EOLIAN Efl_Access_Reading_Info_Type
6861_efl_ui_widget_efl_access_object_reading_info_type_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
6862{
6863 return pd->reading_info;
6864}
6865
6866EOLIAN static Efl_Access_Role
6867_efl_ui_widget_efl_access_object_role_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
6868{
6869 return pd->role;
6870}
6871
6872EOLIAN static void
6873_efl_ui_widget_efl_access_object_role_set(Eo *obj, Elm_Widget_Smart_Data *pd, Efl_Access_Role role)
6874{
6875 if (pd->role != role)
6876 {
6877 pd->role = role;
6878 efl_access_role_changed_signal_emit(obj);
6879 }
6880}
6881
6882EOLIAN const char *
6883_efl_ui_widget_efl_access_object_role_name_get(const Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
6884{
6885 Efl_Access_Role role;
6886
6887 role = efl_access_object_role_get(obj);
6888
6889 return role > EFL_ACCESS_ROLE_LAST_DEFINED ? "" : Access_Name[role];
6890}
6891
6892EOLIAN static void
6893_efl_ui_widget_efl_access_object_i18n_name_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, const char *val)
6894{
6895 eina_stringshare_replace(&pd->name, val);
6896}
6897
6898const char * _efl_ui_widget_efl_access_object_description_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
6899{
6900#ifdef ENABLE_NLS
6901 if (pd->translation_domain)
6902 return dgettext(pd->translation_domain, pd->description);
6903#endif
6904 return pd->description;
6905}
6906
6907EOLIAN static void
6908_efl_ui_widget_efl_access_object_description_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, const char *val)
6909{
6910 eina_stringshare_replace(&pd->description, val);
6911}
6912
6913EOLIAN static const char *
6914_efl_ui_widget_efl_access_object_localized_role_name_get(const Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED)
6915{
6916 const char *ret = NULL;
6917 ret = efl_access_object_role_name_get(obj);
6918#ifdef ENABLE_NLS
6919 ret = gettext(ret);
6920#endif
6921 return ret;
6922}
6923
6924EOLIAN Eina_Iterator *
6925_efl_ui_widget_efl_access_object_relations_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
6926{
6927 return eina_list_iterator_new(pd->relations);
6928}
6929
6930EOLIAN void
6931_efl_ui_widget_efl_access_object_translation_domain_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, const char *domain)
6932{
6933 eina_stringshare_replace(&pd->translation_domain, domain);
6934}
6935
6936
6937EOLIAN const char*
6938_efl_ui_widget_efl_access_object_translation_domain_get(const Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
6939{
6940 return pd->translation_domain;
6941}
6942
6943static void
6944_on_rel_obj_del(void *data, const Efl_Event *event)
6945{
6946 Elm_Widget_Smart_Data *sd = data;
6947 Efl_Access_Relation *rel;
6948 Eina_List *l, *l2, *p, *p2;
6949 Eo *rel_obj;
6950
6951 EINA_LIST_FOREACH_SAFE(sd->relations, l, l2, rel)
6952 {
6953 EINA_LIST_FOREACH_SAFE(rel->objects, p, p2, rel_obj)
6954 {
6955 if (rel_obj == event->object)
6956 rel->objects = eina_list_remove_list(rel->objects, p);
6957 }
6958 if (!rel->objects)
6959 {
6960 sd->relations = eina_list_remove_list(sd->relations, l);
6961 free(rel);
6962 }
6963 }
6964}
6965
6966EOLIAN static Eina_Bool
6967_efl_ui_widget_efl_access_object_relationship_append(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Efl_Access_Relation_Type type, const Efl_Access_Object *relation)
6968{
6969 Efl_Access_Relation *rel;
6970 Eina_List *l;
6971
6972 EINA_LIST_FOREACH(sd->relations, l, rel)
6973 {
6974 if (rel->type == type)
6975 {
6976 if (!eina_list_data_find(rel->objects, relation))
6977 {
6978 rel->objects = eina_list_append(rel->objects, relation);
6979 efl_event_callback_add((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
6980 }
6981 return EINA_TRUE;
6982 }
6983 }
6984
6985 rel = calloc(1, sizeof(Efl_Access_Relation));
6986 if (!rel) return EINA_FALSE;
6987
6988 rel->type = type;
6989 rel->objects = eina_list_append(rel->objects, relation);
6990 sd->relations = eina_list_append(sd->relations, rel);
6991
6992 efl_event_callback_add((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
6993
6994 return EINA_TRUE;
6995}
6996
6997EOLIAN static void
6998_efl_ui_widget_efl_access_object_relationship_remove(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Efl_Access_Relation_Type type, const Efl_Access_Object *relation)
6999{
7000 Efl_Access_Relation *rel;
7001 Eina_List *l;
7002
7003 EINA_LIST_FOREACH(sd->relations, l, rel)
7004 {
7005 if (rel->type == type)
7006 {
7007 if (relation)
7008 {
7009 if (eina_list_data_find(rel->objects, relation))
7010 {
7011 efl_event_callback_del((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
7012 rel->objects = eina_list_remove(rel->objects, relation);
7013 }
7014 if (!rel->objects)
7015 {
7016 sd->relations = eina_list_remove(sd->relations, rel);
7017 free(rel);
7018 }
7019 }
7020 else
7021 {
7022 Eina_List *ll;
7023 Eo *ro;
7024
7025 EINA_LIST_FOREACH(rel->objects, ll, ro)
7026 efl_event_callback_del(ro, EFL_EVENT_DEL, _on_rel_obj_del, sd);
7027 sd->relations = eina_list_remove(sd->relations, rel);
7028 free(rel);
7029 }
7030 return ;
7031 }
7032 }
7033}
7034
7035EOLIAN static void
7036_efl_ui_widget_efl_access_object_relationships_clear(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
7037{
7038 Efl_Access_Relation *rel;
7039
7040 EINA_LIST_FREE(sd->relations, rel)
7041 {
7042 Eina_List *l;
7043
7044 EINA_LIST_FOREACH(rel->objects, l, obj)
7045 efl_event_callback_del(obj, EFL_EVENT_DEL, _on_rel_obj_del, sd);
7046 eina_list_free(rel->objects);
7047 free(rel);
7048 }
7049}
7050
7051// Elm.Widget.Item
7052
7053EOLIAN static int
7054_elm_widget_item_efl_access_object_index_in_parent_get(const Eo *obj, Elm_Widget_Item_Data *pd EINA_UNUSED)
7055{
7056 Eina_List *l, *children = NULL;
7057 Eo *chld, *parent = NULL;
7058 int ret = 0;
7059
7060 parent = efl_access_object_access_parent_get(obj);
7061 if (!parent) return -1;
7062
7063 children = efl_access_object_access_children_get(parent);
7064 if (!children) return -1;
7065
7066 EINA_LIST_FOREACH(children, l, chld)
7067 {
7068 if (obj == chld)
7069 break;
7070 ret++;
7071 }
7072 if (ret == (int)eina_list_count(children))
7073 {
7074 ERR("Object %s not present in its AT-SPI parents (%s) children list! This should never happen.", efl_class_name_get(efl_class_get(obj)), efl_class_name_get(efl_class_get(parent)));
7075 ret = -1;
7076 }
7077 eina_list_free(children);
7078 return ret;
7079}
7080
7081
7082EOLIAN static Efl_Access_Object*
7083_elm_widget_item_efl_access_object_access_parent_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd EINA_UNUSED)
7084{
7085 return pd->access_parent;
7086}
7087
7088EOLIAN static void
7089_elm_widget_item_efl_access_object_access_parent_set(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd EINA_UNUSED, Efl_Access_Object *parent)
7090{
7091 pd->access_parent = parent;
7092}
7093
7094EOLIAN static void
7095_elm_widget_item_efl_access_object_attribute_append(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd, const char *key, const char *value)
7096{
7097 Eina_List *l;
7098 Efl_Access_Attribute *attr = NULL;
7099
7100 if (!key || !value) return;
7101
7102 /* Check existing attributes has this key */
7103 EINA_LIST_FOREACH(pd->attr_list, l, attr)
7104 {
7105 if (!strcmp((const char *)attr->key, key))
7106 {
7107 eina_stringshare_replace(&attr->value, value);
7108 return;
7109 }
7110 }
7111
7112 /* Add new attribute */
7113 attr = calloc(1, sizeof(Efl_Access_Attribute));
7114 if (!attr) return;
7115
7116 attr->key = eina_stringshare_add(key);
7117 attr->value = eina_stringshare_add(value);
7118 pd->attr_list = eina_list_append(pd->attr_list, attr);
7119}
7120
7121EOLIAN static void _elm_widget_item_efl_access_object_attributes_clear(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd)
7122{
7123 if (!pd->attr_list) return;
7124 Efl_Access_Attribute *attr;
7125 EINA_LIST_FREE(pd->attr_list, attr)
7126 {
7127 eina_stringshare_del(attr->key);
7128 eina_stringshare_del(attr->value);
7129 free(attr);
7130 }
7131 pd->attr_list = NULL;
7132}
7133
7134EOLIAN static void
7135_elm_widget_item_efl_access_object_reading_info_type_set(Eo *obj, Elm_Widget_Item_Data *pd, Efl_Access_Reading_Info_Type reading_info)
7136{
7137 Eina_Strbuf *buf = NULL;
7138 pd->reading_info = reading_info;
7139 buf = eina_strbuf_new();
7140 eina_strbuf_reset(buf);
7141 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_NAME))
7142 {
7143 eina_strbuf_append(buf, "name");
7144 eina_strbuf_append_char(buf, '|');
7145 }
7146 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_ROLE))
7147 {
7148 eina_strbuf_append(buf, "role");
7149 eina_strbuf_append_char(buf, '|');
7150 }
7151 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_DESCRIPTION))
7152 {
7153 eina_strbuf_append(buf, "description");
7154 eina_strbuf_append_char(buf, '|');
7155 }
7156 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_STATE))
7157 {
7158 eina_strbuf_append(buf, "state");
7159 }
7160 efl_access_object_attribute_append(obj, "reading_info_type", eina_strbuf_string_get(buf));
7161 eina_strbuf_free(buf);
7162}
7163
7164EOLIAN Efl_Access_Reading_Info_Type
7165_elm_widget_item_efl_access_object_reading_info_type_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd)
7166{
7167 return pd->reading_info;
7168}
7169
7170EOLIAN static Efl_Access_Role
7171_elm_widget_item_efl_access_object_role_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd)
7172{
7173 return pd->role;
7174}
7175
7176EOLIAN static void
7177_elm_widget_item_efl_access_object_role_set(Eo *obj, Elm_Widget_Item_Data *pd, Efl_Access_Role role)
7178{
7179 if (pd->role != role)
7180 {
7181 pd->role = role;
7182 efl_access_role_changed_signal_emit(obj);
7183 }
7184}
7185
7186EOLIAN const char *
7187_elm_widget_item_efl_access_object_role_name_get(const Eo *obj, Elm_Widget_Item_Data *pd EINA_UNUSED)
7188{
7189 Efl_Access_Role role;
7190
7191 role = efl_access_object_role_get(obj);
7192
7193 return role > EFL_ACCESS_ROLE_LAST_DEFINED ? "" : Access_Name[role];
7194}
7195
7196EOLIAN const char *
7197_elm_widget_item_efl_access_object_i18n_name_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd)
7198{
7199#ifdef ENABLE_NLS
7200 if (pd->translation_domain)
7201 return dgettext(pd->translation_domain, pd->name);
7202#endif
7203 return pd->name;
7204}
7205
7206EOLIAN static void
7207_elm_widget_item_efl_access_object_i18n_name_set(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd, const char *val)
7208{
7209 eina_stringshare_replace(&pd->name, val);
7210}
7211
7212const char * _elm_widget_item_efl_access_object_description_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd)
7213{
7214#ifdef ENABLE_NLS
7215 if (pd->translation_domain)
7216 return dgettext(pd->translation_domain, pd->description);
7217#endif
7218 return pd->description;
7219}
7220
7221EOLIAN static void
7222_elm_widget_item_efl_access_object_description_set(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd, const char *val)
7223{
7224 eina_stringshare_replace(&pd->description, val);
7225}
7226
7227EOLIAN static const char *
7228_elm_widget_item_efl_access_object_localized_role_name_get(const Eo *obj, Elm_Widget_Item_Data *pd EINA_UNUSED)
7229{
7230 const char *ret = NULL;
7231 ret = efl_access_object_role_name_get(obj);
7232#ifdef ENABLE_NLS
7233 ret = gettext(ret);
7234#endif
7235 return ret;
7236}
7237
7238EOLIAN static Eina_List *
7239_elm_widget_item_efl_access_object_access_children_get(const Eo *obj, Elm_Widget_Item_Data *pd EINA_UNUSED)
7240{
7241 Eina_List *children = NULL;
7242 Eina_Iterator *iter = NULL;
7243 Eo *chld;
7244
7245 // By default use Efl_Object object hierarchy
7246 /* XXX const */
7247 iter = efl_children_iterator_new((Eo *)obj);
7248 if (!iter) return NULL;
7249
7250 EINA_ITERATOR_FOREACH(iter, chld)
7251 {
7252 if (efl_isa(chld, EFL_ACCESS_OBJECT_INTERFACE))
7253 children = eina_list_append(children, chld);
7254 }
7255 eina_iterator_free(iter);
7256
7257 return children;
7258}
7259
7260EOLIAN Eina_Iterator *
7261_elm_widget_item_efl_access_object_relations_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd)
7262{
7263 return eina_list_iterator_new(pd->relations);
7264}
7265
7266EOLIAN void
7267_elm_widget_item_efl_access_object_translation_domain_set(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd, const char *domain)
7268{
7269 eina_stringshare_replace(&pd->translation_domain, domain);
7270}
7271
7272
7273EOLIAN const char*
7274_elm_widget_item_efl_access_object_translation_domain_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *pd)
7275{
7276 return pd->translation_domain;
7277}
7278
7279static void
7280_on_rel_obj_del2(void *data, const Efl_Event *event)
7281{
7282 Elm_Widget_Item_Data *sd = data;
7283 Efl_Access_Relation *rel;
7284 Eina_List *l, *l2, *p, *p2;
7285 Eo *rel_obj;
7286
7287 EINA_LIST_FOREACH_SAFE(sd->relations, l, l2, rel)
7288 {
7289 EINA_LIST_FOREACH_SAFE(rel->objects, p, p2, rel_obj)
7290 {
7291 if (rel_obj == event->object)
7292 rel->objects = eina_list_remove_list(rel->objects, p);
7293 }
7294 if (!rel->objects)
7295 {
7296 sd->relations = eina_list_remove_list(sd->relations, l);
7297 free(rel);
7298 }
7299 }
7300}
7301
7302EOLIAN static Eina_Bool
7303_elm_widget_item_efl_access_object_relationship_append(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd, Efl_Access_Relation_Type type, const Efl_Access_Object *relation)
7304{
7305 Efl_Access_Relation *rel;
7306 Eina_List *l;
7307
7308 EINA_LIST_FOREACH(sd->relations, l, rel)
7309 {
7310 if (rel->type == type)
7311 {
7312 if (!eina_list_data_find(rel->objects, relation))
7313 {
7314 rel->objects = eina_list_append(rel->objects, relation);
7315 efl_event_callback_add((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del2, sd);
7316 }
7317 return EINA_TRUE;
7318 }
7319 }
7320
7321 rel = calloc(1, sizeof(Efl_Access_Relation));
7322 if (!rel) return EINA_FALSE;
7323
7324 rel->type = type;
7325 rel->objects = eina_list_append(rel->objects, relation);
7326 sd->relations = eina_list_append(sd->relations, rel);
7327
7328 efl_event_callback_add((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del2, sd);
7329
7330 return EINA_TRUE;
7331}
7332
7333EOLIAN static void
7334_elm_widget_item_efl_access_object_relationship_remove(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd, Efl_Access_Relation_Type type, const Efl_Access_Object *relation)
7335{
7336 Efl_Access_Relation *rel;
7337 Eina_List *l;
7338
7339 EINA_LIST_FOREACH(sd->relations, l, rel)
7340 {
7341 if (rel->type == type)
7342 {
7343 if (relation)
7344 {
7345 if (eina_list_data_find(rel->objects, relation))
7346 {
7347 efl_event_callback_del((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del2, sd);
7348 rel->objects = eina_list_remove(rel->objects, relation);
7349 }
7350 if (!rel->objects)
7351 {
7352 sd->relations = eina_list_remove(sd->relations, rel);
7353 free(rel);
7354 }
7355 }
7356 else
7357 {
7358 Eina_List *ll;
7359 Eo *ro;
7360
7361 EINA_LIST_FOREACH(rel->objects, ll, ro)
7362 efl_event_callback_del(ro, EFL_EVENT_DEL, _on_rel_obj_del2, sd);
7363 sd->relations = eina_list_remove(sd->relations, rel);
7364 free(rel);
7365 }
7366 return ;
7367 }
7368 }
7369}
7370
7371EOLIAN static void
7372_elm_widget_item_efl_access_object_relationships_clear(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd)
7373{
7374 Efl_Access_Relation *rel;
7375
7376 EINA_LIST_FREE(sd->relations, rel)
7377 {
7378 Eina_List *l;
7379
7380 EINA_LIST_FOREACH(rel->objects, l, obj)
7381 efl_event_callback_del(obj, EFL_EVENT_DEL, _on_rel_obj_del2, sd);
7382 eina_list_free(rel->objects);
7383 free(rel);
7384 }
7385}
6595/* Internal EO APIs and hidden overrides */ 7386/* Internal EO APIs and hidden overrides */
6596 7387
6597EFL_FUNC_BODY_CONST(efl_ui_widget_default_content_part_get, const char *, NULL) 7388EFL_FUNC_BODY_CONST(efl_ui_widget_default_content_part_get, const char *, NULL)
diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo
index 736b9ecca6..36c427fee2 100644
--- a/src/lib/elementary/efl_ui_widget.eo
+++ b/src/lib/elementary/efl_ui_widget.eo
@@ -583,10 +583,26 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object,
583 Efl.Canvas.Group.group_calculate; 583 Efl.Canvas.Group.group_calculate;
584 Efl.Canvas.Group.group_member_del; 584 Efl.Canvas.Group.group_member_del;
585 Efl.Canvas.Group.group_member_add; 585 Efl.Canvas.Group.group_member_add;
586 Efl.Access.Object.i18n_name { get; }
587 Efl.Access.Object.state_set { get; } 586 Efl.Access.Object.state_set { get; }
588 Efl.Access.Object.access_children { get; } 587 Efl.Access.Object.access_children { get; }
589 Efl.Access.Object.attributes { get; } 588 Efl.Access.Object.attributes { get; }
589 //TODO remove
590 Efl.Access.Object.access_parent { get; set; }
591 Efl.Access.Object.localized_role_name { get; }
592 Efl.Access.Object.index_in_parent { get; }
593 Efl.Access.Object.i18n_name { get; set; }
594 Efl.Access.Object.attribute_append;
595 Efl.Access.Object.attributes_clear;
596 Efl.Access.Object.reading_info_type { get; set; }
597 Efl.Access.Object.role { get; set; }
598 Efl.Access.Object.role_name { get; }
599 Efl.Access.Object.description { get; set; }
600 Efl.Access.Object.relations_get;
601 Efl.Access.Object.translation_domain { get; set; }
602 Efl.Access.Object.relationship_append;
603 Efl.Access.Object.relationship_remove;
604 Efl.Access.Object.relationships_clear;
605 //TODO end
590 Efl.Access.Component.focus_grab; 606 Efl.Access.Component.focus_grab;
591 Efl.Access.Component.screen_position { get; set; } 607 Efl.Access.Component.screen_position { get; set; }
592 Efl.Access.Component.contains; 608 Efl.Access.Component.contains;
diff --git a/src/lib/elementary/elm_atspi_app_object.c b/src/lib/elementary/elm_atspi_app_object.c
index 3f4261df57..5b1360dd12 100644
--- a/src/lib/elementary/elm_atspi_app_object.c
+++ b/src/lib/elementary/elm_atspi_app_object.c
@@ -15,7 +15,15 @@ typedef struct _Elm_Atspi_App_Object_Data Elm_Atspi_App_Object_Data;
15 15
16struct _Elm_Atspi_App_Object_Data 16struct _Elm_Atspi_App_Object_Data
17{ 17{
18 const char *descr; 18 //TODO Efl.Access.Object - remove during refactor
19 Eina_List *relations;
20 Eina_List *attr_list;
21 const char *name;
22 const char *description;
23 const char *translation_domain;
24 Efl_Access_Role role;
25 Efl_Access_Reading_Info_Type reading_info;
26 Efl_Access_Object *access_parent;
19}; 27};
20 28
21EOLIAN static Eo* 29EOLIAN static Eo*
@@ -29,13 +37,20 @@ _elm_atspi_app_object_efl_object_constructor(Eo *obj, Elm_Atspi_App_Object_Data
29 obj = efl_constructor(efl_super(obj, ELM_ATSPI_APP_OBJECT_CLASS)); 37 obj = efl_constructor(efl_super(obj, ELM_ATSPI_APP_OBJECT_CLASS));
30 instance = obj; 38 instance = obj;
31 39
40 _pd->role = EFL_ACCESS_ROLE_APPLICATION;
32 return obj; 41 return obj;
33} 42}
34 43
35EOLIAN static void 44EOLIAN static void
36_elm_atspi_app_object_efl_object_destructor(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd) 45_elm_atspi_app_object_efl_object_destructor(Eo *obj, Elm_Atspi_App_Object_Data *_pd)
37{ 46{
38 if (_pd->descr) eina_stringshare_del(_pd->descr); 47 efl_access_removed(obj);
48 efl_access_object_attributes_clear(obj);
49 efl_access_object_relationships_clear(obj);
50
51 eina_stringshare_del(_pd->name);
52 eina_stringshare_del(_pd->description);
53 eina_stringshare_del(_pd->translation_domain);
39 54
40 efl_destructor(efl_super(obj, ELM_ATSPI_APP_OBJECT_CLASS)); 55 efl_destructor(efl_super(obj, ELM_ATSPI_APP_OBJECT_CLASS));
41} 56}
@@ -48,7 +63,7 @@ _elm_atspi_app_object_efl_access_object_access_children_get(const Eo *obj EINA_U
48 63
49 EINA_LIST_FOREACH(_elm_win_list, l, win) 64 EINA_LIST_FOREACH(_elm_win_list, l, win)
50 { 65 {
51 if (!efl_isa(win, EFL_ACCESS_OBJECT_MIXIN)) 66 if (!efl_isa(win, EFL_ACCESS_OBJECT_INTERFACE))
52 continue; 67 continue;
53 accs = eina_list_append(accs, win); 68 accs = eina_list_append(accs, win);
54 } 69 }
@@ -64,30 +79,337 @@ _elm_atspi_app_object_efl_access_object_i18n_name_get(const Eo *obj EINA_UNUSED,
64 return ret; 79 return ret;
65} 80}
66 81
67EOLIAN static const char* 82EOLIAN static Elm_Atspi_App_Object*
68_elm_atspi_app_object_efl_access_object_description_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd) 83_elm_atspi_app_object_instance_get(const Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED)
84{
85 if (!instance)
86 instance = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, efl_main_loop_get());
87 return instance;
88}
89
90EOLIAN static int
91_elm_atspi_app_object_efl_access_object_index_in_parent_get(const Eo *obj, Elm_Atspi_App_Object_Data *pd EINA_UNUSED)
92{
93 Eina_List *l, *children = NULL;
94 Eo *chld, *parent = NULL;
95 int ret = 0;
96
97 parent = efl_access_object_access_parent_get(obj);
98 if (!parent) return -1;
99
100 children = efl_access_object_access_children_get(parent);
101 if (!children) return -1;
102
103 EINA_LIST_FOREACH(children, l, chld)
104 {
105 if (obj == chld)
106 break;
107 ret++;
108 }
109 if (ret == (int)eina_list_count(children))
110 {
111 ERR("Object %s not present in its AT-SPI parents (%s) children list! This should never happen.", efl_class_name_get(efl_class_get(obj)), efl_class_name_get(efl_class_get(parent)));
112 ret = -1;
113 }
114 eina_list_free(children);
115 return ret;
116}
117
118EOLIAN static Efl_Access_Object*
119_elm_atspi_app_object_efl_access_object_access_parent_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd EINA_UNUSED)
120{
121 return pd->access_parent;
122}
123
124EOLIAN static void
125_elm_atspi_app_object_efl_access_object_access_parent_set(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd EINA_UNUSED, Efl_Access_Object *parent)
126{
127 pd->access_parent = parent;
128}
129
130EOLIAN static void
131_elm_atspi_app_object_efl_access_object_attribute_append(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd, const char *key, const char *value)
132{
133 Eina_List *l;
134 Efl_Access_Attribute *attr = NULL;
135
136 if (!key || !value) return;
137
138 /* Check existing attributes has this key */
139 EINA_LIST_FOREACH(pd->attr_list, l, attr)
140 {
141 if (!strcmp((const char *)attr->key, key))
142 {
143 eina_stringshare_replace(&attr->value, value);
144 return;
145 }
146 }
147
148 /* Add new attribute */
149 attr = calloc(1, sizeof(Efl_Access_Attribute));
150 if (!attr) return;
151
152 attr->key = eina_stringshare_add(key);
153 attr->value = eina_stringshare_add(value);
154 pd->attr_list = eina_list_append(pd->attr_list, attr);
155}
156
157EOLIAN static void _elm_atspi_app_object_efl_access_object_attributes_clear(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd)
69{ 158{
70 return _pd->descr; 159 if (!pd->attr_list) return;
160 Efl_Access_Attribute *attr;
161 EINA_LIST_FREE(pd->attr_list, attr)
162 {
163 eina_stringshare_del(attr->key);
164 eina_stringshare_del(attr->value);
165 free(attr);
166 }
167 pd->attr_list = NULL;
71} 168}
72 169
73EOLIAN static void 170EOLIAN static void
74_elm_atspi_app_object_efl_access_object_description_set(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED, const char *descr) 171_elm_atspi_app_object_efl_access_object_reading_info_type_set(Eo *obj, Elm_Atspi_App_Object_Data *pd, Efl_Access_Reading_Info_Type reading_info)
75{ 172{
76 eina_stringshare_replace(&_pd->descr, descr); 173 Eina_Strbuf *buf = NULL;
174 pd->reading_info = reading_info;
175 buf = eina_strbuf_new();
176 eina_strbuf_reset(buf);
177 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_NAME))
178 {
179 eina_strbuf_append(buf, "name");
180 eina_strbuf_append_char(buf, '|');
181 }
182 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_ROLE))
183 {
184 eina_strbuf_append(buf, "role");
185 eina_strbuf_append_char(buf, '|');
186 }
187 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_DESCRIPTION))
188 {
189 eina_strbuf_append(buf, "description");
190 eina_strbuf_append_char(buf, '|');
191 }
192 if (reading_info & (EFL_ACCESS_READING_INFO_TYPE_STATE))
193 {
194 eina_strbuf_append(buf, "state");
195 }
196 efl_access_object_attribute_append(obj, "reading_info_type", eina_strbuf_string_get(buf));
197 eina_strbuf_free(buf);
198}
199
200EOLIAN Efl_Access_Reading_Info_Type
201_elm_atspi_app_object_efl_access_object_reading_info_type_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd)
202{
203 return pd->reading_info;
77} 204}
78 205
79EOLIAN static Efl_Access_Role 206EOLIAN static Efl_Access_Role
80_elm_atspi_app_object_efl_access_object_role_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *_pd EINA_UNUSED) 207_elm_atspi_app_object_efl_access_object_role_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd)
81{ 208{
82 return EFL_ACCESS_ROLE_APPLICATION; 209 return pd->role;
83} 210}
84 211
85EOLIAN static Elm_Atspi_App_Object* 212EOLIAN static void
86_elm_atspi_app_object_instance_get(const Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED) 213_elm_atspi_app_object_efl_access_object_role_set(Eo *obj, Elm_Atspi_App_Object_Data *pd, Efl_Access_Role role)
87{ 214{
88 if (!instance) 215 if (pd->role != role)
89 instance = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, efl_main_loop_get()); 216 {
90 return instance; 217 pd->role = role;
218 efl_access_role_changed_signal_emit(obj);
219 }
220}
221
222EOLIAN const char *
223_elm_atspi_app_object_efl_access_object_role_name_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd EINA_UNUSED)
224{
225 return "application";
226}
227
228EOLIAN static void
229_elm_atspi_app_object_efl_access_object_i18n_name_set(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd, const char *val)
230{
231 eina_stringshare_replace(&pd->name, val);
232}
233
234const char * _elm_atspi_app_object_efl_access_object_description_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd)
235{
236#ifdef ENABLE_NLS
237 if (pd->translation_domain)
238 return dgettext(pd->translation_domain, pd->description);
239#endif
240 return pd->description;
241}
242
243EOLIAN static void
244_elm_atspi_app_object_efl_access_object_description_set(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd, const char *val)
245{
246 eina_stringshare_replace(&pd->description, val);
247}
248
249EOLIAN static const char *
250_elm_atspi_app_object_efl_access_object_localized_role_name_get(const Eo *obj, Elm_Atspi_App_Object_Data *pd EINA_UNUSED)
251{
252 const char *ret = NULL;
253 ret = efl_access_object_role_name_get(obj);
254#ifdef ENABLE_NLS
255 ret = gettext(ret);
256#endif
257 return ret;
258}
259
260EOLIAN Eina_Iterator *
261_elm_atspi_app_object_efl_access_object_relations_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd)
262{
263 return eina_list_iterator_new(pd->relations);
264}
265
266EOLIAN void
267_elm_atspi_app_object_efl_access_object_translation_domain_set(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd, const char *domain)
268{
269 eina_stringshare_replace(&pd->translation_domain, domain);
270}
271
272EOLIAN Efl_Access_State_Set
273_elm_atspi_app_object_efl_access_object_state_set_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd EINA_UNUSED)
274{
275 return 0;
276}
277
278EOLIAN const char*
279_elm_atspi_app_object_efl_access_object_translation_domain_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd)
280{
281 return pd->translation_domain;
282}
283
284static void
285_on_rel_obj_del(void *data, const Efl_Event *event)
286{
287 Elm_Atspi_App_Object_Data *sd = data;
288 Efl_Access_Relation *rel;
289 Eina_List *l, *l2, *p, *p2;
290 Eo *rel_obj;
291
292 EINA_LIST_FOREACH_SAFE(sd->relations, l, l2, rel)
293 {
294 EINA_LIST_FOREACH_SAFE(rel->objects, p, p2, rel_obj)
295 {
296 if (rel_obj == event->object)
297 rel->objects = eina_list_remove_list(rel->objects, p);
298 }
299 if (!rel->objects)
300 {
301 sd->relations = eina_list_remove_list(sd->relations, l);
302 free(rel);
303 }
304 }
305}
306
307EOLIAN static Eina_Bool
308_elm_atspi_app_object_efl_access_object_relationship_append(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *sd, Efl_Access_Relation_Type type, const Efl_Access_Object *relation)
309{
310 Efl_Access_Relation *rel;
311 Eina_List *l;
312
313 EINA_LIST_FOREACH(sd->relations, l, rel)
314 {
315 if (rel->type == type)
316 {
317 if (!eina_list_data_find(rel->objects, relation))
318 {
319 rel->objects = eina_list_append(rel->objects, relation);
320 efl_event_callback_add((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
321 }
322 return EINA_TRUE;
323 }
324 }
325
326 rel = calloc(1, sizeof(Efl_Access_Relation));
327 if (!rel) return EINA_FALSE;
328
329 rel->type = type;
330 rel->objects = eina_list_append(rel->objects, relation);
331 sd->relations = eina_list_append(sd->relations, rel);
332
333 efl_event_callback_add((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
334
335 return EINA_TRUE;
336}
337
338EOLIAN static void
339_elm_atspi_app_object_efl_access_object_relationship_remove(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *sd, Efl_Access_Relation_Type type, const Efl_Access_Object *relation)
340{
341 Efl_Access_Relation *rel;
342 Eina_List *l;
343
344 EINA_LIST_FOREACH(sd->relations, l, rel)
345 {
346 if (rel->type == type)
347 {
348 if (relation)
349 {
350 if (eina_list_data_find(rel->objects, relation))
351 {
352 efl_event_callback_del((Eo *) relation, EFL_EVENT_DEL, _on_rel_obj_del, sd);
353 rel->objects = eina_list_remove(rel->objects, relation);
354 }
355 if (!rel->objects)
356 {
357 sd->relations = eina_list_remove(sd->relations, rel);
358 free(rel);
359 }
360 }
361 else
362 {
363 Eina_List *ll;
364 Eo *ro;
365
366 EINA_LIST_FOREACH(rel->objects, ll, ro)
367 efl_event_callback_del(ro, EFL_EVENT_DEL, _on_rel_obj_del, sd);
368 sd->relations = eina_list_remove(sd->relations, rel);
369 free(rel);
370 }
371 return ;
372 }
373 }
374}
375
376EOLIAN static void
377_elm_atspi_app_object_efl_access_object_relationships_clear(Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *sd)
378{
379 Efl_Access_Relation *rel;
380
381 EINA_LIST_FREE(sd->relations, rel)
382 {
383 Eina_List *l;
384
385 EINA_LIST_FOREACH(rel->objects, l, obj)
386 efl_event_callback_del(obj, EFL_EVENT_DEL, _on_rel_obj_del, sd);
387 eina_list_free(rel->objects);
388 free(rel);
389 }
390}
391
392EOLIAN static Eina_List*
393_elm_atspi_app_object_efl_access_object_attributes_get(const Eo *obj EINA_UNUSED, Elm_Atspi_App_Object_Data *pd)
394{
395 Eina_List *attr_list = NULL;
396
397 if (pd->attr_list)
398 {
399 Eina_List *l = NULL;
400 Efl_Access_Attribute *t_attr = NULL;
401 EINA_LIST_FOREACH(pd->attr_list, l, t_attr)
402 {
403 Efl_Access_Attribute *attr = calloc(1, sizeof(Efl_Access_Attribute));
404 if (!attr)
405 return attr_list;
406
407 attr->key = eina_stringshare_add(t_attr->key);
408 attr->value = eina_stringshare_add(t_attr->value);
409 attr_list = eina_list_append(attr_list, attr);
410 }
411 }
412 return attr_list;
91} 413}
92 414
93#include "elm_atspi_app_object.eo.c" 415#include "elm_atspi_app_object.eo.c"
diff --git a/src/lib/elementary/elm_atspi_app_object.eo b/src/lib/elementary/elm_atspi_app_object.eo
index 456c7f19d5..86ca6b8b25 100644
--- a/src/lib/elementary/elm_atspi_app_object.eo
+++ b/src/lib/elementary/elm_atspi_app_object.eo
@@ -15,9 +15,23 @@ class Elm.Atspi.App.Object extends Efl.Object implements Efl.Access.Object
15 implements { 15 implements {
16 Efl.Object.destructor; 16 Efl.Object.destructor;
17 Efl.Object.constructor; 17 Efl.Object.constructor;
18 Efl.Access.Object.i18n_name { get; } 18 Efl.Access.Object.i18n_name { get; set; }
19 Efl.Access.Object.description { get; set; }
20 Efl.Access.Object.role { get; }
21 Efl.Access.Object.access_children { get; } 19 Efl.Access.Object.access_children { get; }
20 Efl.Access.Object.access_parent { get; set; }
21 Efl.Access.Object.index_in_parent { get; }
22 Efl.Access.Object.attribute_append;
23 Efl.Access.Object.attributes_clear;
24 Efl.Access.Object.attributes { get; }
25 Efl.Access.Object.reading_info_type { get; set; }
26 Efl.Access.Object.state_set { get; }
27 Efl.Access.Object.role { get; set; }
28 Efl.Access.Object.role_name { get; }
29 Efl.Access.Object.localized_role_name { get; }
30 Efl.Access.Object.description { get; set; }
31 Efl.Access.Object.relations_get;
32 Efl.Access.Object.translation_domain { get; set; }
33 Efl.Access.Object.relationship_append;
34 Efl.Access.Object.relationship_remove;
35 Efl.Access.Object.relationships_clear;
22 } 36 }
23} 37}
diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c
index 663d3dcbd5..3ff24fe378 100644
--- a/src/lib/elementary/elm_atspi_bridge.c
+++ b/src/lib/elementary/elm_atspi_bridge.c
@@ -489,7 +489,7 @@ _accessible_get_role(const Eldbus_Service_Interface *iface, const Eldbus_Message
489 AtspiRole atspi_role = ATSPI_ROLE_INVALID; 489 AtspiRole atspi_role = ATSPI_ROLE_INVALID;
490 Efl_Access_Role role; 490 Efl_Access_Role role;
491 491
492 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 492 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
493 493
494 role = efl_access_object_role_get(obj); 494 role = efl_access_object_role_get(obj);
495 495
@@ -508,7 +508,7 @@ _accessible_get_role_name(const Eldbus_Service_Interface *iface, const Eldbus_Me
508 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); 508 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME);
509 Eo *obj = _bridge_object_from_path(bridge, obj_path); 509 Eo *obj = _bridge_object_from_path(bridge, obj_path);
510 510
511 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 511 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
512 512
513 role_name = efl_access_object_role_name_get(obj); 513 role_name = efl_access_object_role_name_get(obj);
514 514
@@ -526,7 +526,7 @@ _accessible_get_localized_role_name(const Eldbus_Service_Interface *iface, const
526 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); 526 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME);
527 Eo *obj = _bridge_object_from_path(bridge, obj_path); 527 Eo *obj = _bridge_object_from_path(bridge, obj_path);
528 528
529 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 529 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
530 530
531 l_role_name = efl_access_object_localized_role_name_get(obj); 531 l_role_name = efl_access_object_localized_role_name_get(obj);
532 EINA_SAFETY_ON_NULL_RETURN_VAL(l_role_name, NULL); 532 EINA_SAFETY_ON_NULL_RETURN_VAL(l_role_name, NULL);
@@ -549,7 +549,7 @@ _accessible_get_children(const Eldbus_Service_Interface *iface, const Eldbus_Mes
549 Eldbus_Message_Iter *iter, *iter_array; 549 Eldbus_Message_Iter *iter, *iter_array;
550 Eo *children; 550 Eo *children;
551 551
552 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 552 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
553 553
554 children_list = efl_access_object_access_children_get(obj); 554 children_list = efl_access_object_access_children_get(obj);
555 555
@@ -584,7 +584,7 @@ _accessible_get_application(const Eldbus_Service_Interface *iface, const Eldbus_
584 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); 584 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME);
585 Eo *obj = _bridge_object_from_path(bridge, obj_path); 585 Eo *obj = _bridge_object_from_path(bridge, obj_path);
586 586
587 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 587 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
588 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN_VAL(bridge, pd, NULL); 588 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN_VAL(bridge, pd, NULL);
589 589
590 ret = eldbus_message_method_return_new(msg); 590 ret = eldbus_message_method_return_new(msg);
@@ -608,7 +608,7 @@ _accessible_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_M
608 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); 608 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME);
609 Eo *obj = _bridge_object_from_path(bridge, obj_path); 609 Eo *obj = _bridge_object_from_path(bridge, obj_path);
610 610
611 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 611 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
612 612
613 ret = eldbus_message_method_return_new(msg); 613 ret = eldbus_message_method_return_new(msg);
614 if (!ret) goto error; 614 if (!ret) goto error;
@@ -650,7 +650,7 @@ _accessible_interfaces_get(const Eldbus_Service_Interface *iface, const Eldbus_M
650 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); 650 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME);
651 Eo *obj = _bridge_object_from_path(bridge, obj_path); 651 Eo *obj = _bridge_object_from_path(bridge, obj_path);
652 652
653 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 653 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
654 654
655 ret = eldbus_message_method_return_new(msg); 655 ret = eldbus_message_method_return_new(msg);
656 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL); 656 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
@@ -720,7 +720,7 @@ _accessible_get_state(const Eldbus_Service_Interface *iface, const Eldbus_Messag
720 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); 720 Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME);
721 Eo *obj = _bridge_object_from_path(bridge, obj_path); 721 Eo *obj = _bridge_object_from_path(bridge, obj_path);
722 722
723 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 723 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
724 724
725 ret = eldbus_message_method_return_new(msg); 725 ret = eldbus_message_method_return_new(msg);
726 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL); 726 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
@@ -756,7 +756,7 @@ _accessible_get_index_in_parent(const Eldbus_Service_Interface *iface EINA_UNUSE
756 Eldbus_Message *ret; 756 Eldbus_Message *ret;
757 int idx = -1; 757 int idx = -1;
758 758
759 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 759 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
760 760
761 ret = eldbus_message_method_return_new(msg); 761 ret = eldbus_message_method_return_new(msg);
762 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL); 762 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
@@ -780,7 +780,7 @@ _accessible_child_at_index(const Eldbus_Service_Interface *iface EINA_UNUSED, co
780 Eldbus_Message *ret; 780 Eldbus_Message *ret;
781 Eldbus_Message_Iter *iter; 781 Eldbus_Message_Iter *iter;
782 782
783 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 783 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
784 784
785 if (!eldbus_message_arguments_get(msg, "i", &idx)) 785 if (!eldbus_message_arguments_get(msg, "i", &idx))
786 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid index type."); 786 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid index type.");
@@ -811,7 +811,7 @@ _accessible_get_relation_set(const Eldbus_Service_Interface *iface EINA_UNUSED,
811 Eina_List *l; 811 Eina_List *l;
812 Eina_Iterator *it; 812 Eina_Iterator *it;
813 813
814 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 814 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
815 815
816 ret = eldbus_message_method_return_new(msg); 816 ret = eldbus_message_method_return_new(msg);
817 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL); 817 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
@@ -1222,7 +1222,7 @@ _image_extents_get(const Eldbus_Service_Interface *iface, const Eldbus_Message *
1222 Eo *obj = _bridge_object_from_path(bridge, obj_path); 1222 Eo *obj = _bridge_object_from_path(bridge, obj_path);
1223 Eina_Rect r; 1223 Eina_Rect r;
1224 1224
1225 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 1225 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
1226 1226
1227 if (!eldbus_message_arguments_get(msg, "u", &type)) 1227 if (!eldbus_message_arguments_get(msg, "u", &type))
1228 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid index type."); 1228 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid index type.");
@@ -1248,7 +1248,7 @@ _image_position_get(const Eldbus_Service_Interface *iface, const Eldbus_Message
1248 int x = -1, y = -1; 1248 int x = -1, y = -1;
1249 Eina_Bool screen_coords; 1249 Eina_Bool screen_coords;
1250 1250
1251 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 1251 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
1252 1252
1253 if (!eldbus_message_arguments_get(msg, "u", &type)) 1253 if (!eldbus_message_arguments_get(msg, "u", &type))
1254 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid index type."); 1254 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.InvalidArgs", "Invalid index type.");
@@ -1276,7 +1276,7 @@ _image_size_get(const Eldbus_Service_Interface *iface, const Eldbus_Message *msg
1276 Eo *obj = _bridge_object_from_path(bridge, obj_path); 1276 Eo *obj = _bridge_object_from_path(bridge, obj_path);
1277 int w = -1, h = -1; 1277 int w = -1, h = -1;
1278 1278
1279 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 1279 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
1280 1280
1281 ret = eldbus_message_method_return_new(msg); 1281 ret = eldbus_message_method_return_new(msg);
1282 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL); 1282 EINA_SAFETY_ON_NULL_RETURN_VAL(ret, NULL);
@@ -2044,7 +2044,7 @@ _bridge_object_from_path(Eo *bridge, const char *path)
2044 return NULL; 2044 return NULL;
2045 } 2045 }
2046 2046
2047 ret = efl_isa(eo, EFL_ACCESS_OBJECT_MIXIN) ? eo : NULL; 2047 ret = efl_isa(eo, EFL_ACCESS_OBJECT_INTERFACE) ? eo : NULL;
2048 2048
2049 return ret; 2049 return ret;
2050} 2050}
@@ -2075,7 +2075,7 @@ _accessible_property_get(const Eldbus_Service_Interface *interface, const char *
2075 Eo *bridge = eldbus_service_object_data_get(interface, ELM_ATSPI_BRIDGE_CLASS_NAME); 2075 Eo *bridge = eldbus_service_object_data_get(interface, ELM_ATSPI_BRIDGE_CLASS_NAME);
2076 Eo *ret_obj = NULL, *obj = _bridge_object_from_path(bridge, obj_path); 2076 Eo *ret_obj = NULL, *obj = _bridge_object_from_path(bridge, obj_path);
2077 2077
2078 ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, request_msg, error); 2078 ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, request_msg, error);
2079 2079
2080 if (!strcmp(property, "Name")) 2080 if (!strcmp(property, "Name"))
2081 { 2081 {
@@ -2235,7 +2235,7 @@ _image_properties_get(const Eldbus_Service_Interface *interface, const char *pro
2235 Eo *bridge = eldbus_service_object_data_get(interface, ELM_ATSPI_BRIDGE_CLASS_NAME); 2235 Eo *bridge = eldbus_service_object_data_get(interface, ELM_ATSPI_BRIDGE_CLASS_NAME);
2236 Eo *obj = _bridge_object_from_path(bridge, obj_path); 2236 Eo *obj = _bridge_object_from_path(bridge, obj_path);
2237 2237
2238 ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, request_msg, error); 2238 ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, request_msg, error);
2239 2239
2240 if (!strcmp(property, "ImageDescription")) 2240 if (!strcmp(property, "ImageDescription"))
2241 { 2241 {
@@ -2984,7 +2984,7 @@ _collection_get_matches_from(const Eldbus_Service_Interface *iface EINA_UNUSED,
2984 AtspiCollectionSortOrder sortby; 2984 AtspiCollectionSortOrder sortby;
2985 Eina_List *result = NULL; 2985 Eina_List *result = NULL;
2986 2986
2987 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 2987 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
2988 2988
2989 iter = eldbus_message_iter_get(msg); 2989 iter = eldbus_message_iter_get(msg);
2990 EINA_SAFETY_ON_NULL_RETURN_VAL(iter, NULL); 2990 EINA_SAFETY_ON_NULL_RETURN_VAL(iter, NULL);
@@ -2996,7 +2996,7 @@ _collection_get_matches_from(const Eldbus_Service_Interface *iface EINA_UNUSED,
2996 2996
2997 current = _bridge_object_from_path(bridge, obj_path); 2997 current = _bridge_object_from_path(bridge, obj_path);
2998 2998
2999 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(current, EFL_ACCESS_OBJECT_MIXIN, msg); 2999 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(current, EFL_ACCESS_OBJECT_INTERFACE, msg);
3000 3000
3001 if (!_collection_iter_match_rule_get(rule_iter, &rule)) 3001 if (!_collection_iter_match_rule_get(rule_iter, &rule))
3002 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Invalid match rule parameters."); 3002 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Invalid match rule parameters.");
@@ -3056,7 +3056,7 @@ _collection_get_matches_to(const Eldbus_Service_Interface *iface EINA_UNUSED, co
3056 Eina_List *result = NULL; 3056 Eina_List *result = NULL;
3057 Eina_Bool limit; 3057 Eina_Bool limit;
3058 3058
3059 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 3059 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
3060 3060
3061 iter = eldbus_message_iter_get(msg); 3061 iter = eldbus_message_iter_get(msg);
3062 EINA_SAFETY_ON_NULL_RETURN_VAL(iter, NULL); 3062 EINA_SAFETY_ON_NULL_RETURN_VAL(iter, NULL);
@@ -3068,7 +3068,7 @@ _collection_get_matches_to(const Eldbus_Service_Interface *iface EINA_UNUSED, co
3068 3068
3069 current = _bridge_object_from_path(bridge, obj_path); 3069 current = _bridge_object_from_path(bridge, obj_path);
3070 3070
3071 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(current, EFL_ACCESS_OBJECT_MIXIN, msg); 3071 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(current, EFL_ACCESS_OBJECT_INTERFACE, msg);
3072 3072
3073 if (!_collection_iter_match_rule_get(rule_iter, &rule)) 3073 if (!_collection_iter_match_rule_get(rule_iter, &rule))
3074 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Invalid match rule parameters."); 3074 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Invalid match rule parameters.");
@@ -3096,7 +3096,7 @@ _collection_get_matches(const Eldbus_Service_Interface *iface, const Eldbus_Mess
3096 AtspiCollectionSortOrder sortby; 3096 AtspiCollectionSortOrder sortby;
3097 Eina_List *result = NULL; 3097 Eina_List *result = NULL;
3098 3098
3099 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_MIXIN, msg); 3099 ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, EFL_ACCESS_OBJECT_INTERFACE, msg);
3100 3100
3101 iter = eldbus_message_iter_get(msg); 3101 iter = eldbus_message_iter_get(msg);
3102 EINA_SAFETY_ON_NULL_RETURN_VAL(iter, NULL); 3102 EINA_SAFETY_ON_NULL_RETURN_VAL(iter, NULL);
@@ -3170,7 +3170,7 @@ _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj)
3170 iter_array = eldbus_message_iter_container_new(iter, 'a', "s"); 3170 iter_array = eldbus_message_iter_container_new(iter, 'a', "s");
3171 if (!iter_array) return; 3171 if (!iter_array) return;
3172 3172
3173 if (efl_isa(obj, EFL_ACCESS_OBJECT_MIXIN)) 3173 if (efl_isa(obj, EFL_ACCESS_OBJECT_INTERFACE))
3174 { 3174 {
3175 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_ACCESSIBLE); 3175 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_ACCESSIBLE);
3176 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_COLLECTION); 3176 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_COLLECTION);
@@ -3183,7 +3183,7 @@ _iter_interfaces_append(Eldbus_Message_Iter *iter, const Eo *obj)
3183 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_COMPONENT); 3183 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_COMPONENT);
3184 if (efl_isa(obj, EFL_ACCESS_EDITABLE_TEXT_INTERFACE)) 3184 if (efl_isa(obj, EFL_ACCESS_EDITABLE_TEXT_INTERFACE))
3185 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_EDITABLE_TEXT); 3185 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_EDITABLE_TEXT);
3186 if (efl_isa(obj, EFL_ACCESS_OBJECT_MIXIN)) 3186 if (efl_isa(obj, EFL_ACCESS_OBJECT_INTERFACE))
3187 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_IMAGE); 3187 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_IMAGE);
3188 if (efl_isa(obj, EFL_ACCESS_SELECTION_INTERFACE)) 3188 if (efl_isa(obj, EFL_ACCESS_SELECTION_INTERFACE))
3189 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_SELECTION); 3189 eldbus_message_iter_basic_append(iter_array, 's', ATSPI_DBUS_INTERFACE_SELECTION);
@@ -4533,7 +4533,7 @@ static void _bridge_object_register(Eo *bridge, Eo *obj)
4533{ 4533{
4534 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd); 4534 ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd);
4535 4535
4536 if (!efl_isa(obj, EFL_ACCESS_OBJECT_MIXIN)) 4536 if (!efl_isa(obj, EFL_ACCESS_OBJECT_INTERFACE))
4537 { 4537 {
4538 WRN("Unable to register class w/o Efl_Access_Object!"); 4538 WRN("Unable to register class w/o Efl_Access_Object!");
4539 return; 4539 return;
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index 99229851f8..628975a2a4 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -382,6 +382,17 @@ typedef struct _Elm_Widget_Smart_Data
382 Evas_Object *prev, *next, *up, *down, *right, *left; 382 Evas_Object *prev, *next, *up, *down, *right, *left;
383 Elm_Object_Item *item_prev, *item_next, *item_up, *item_down, *item_right, *item_left; 383 Elm_Object_Item *item_prev, *item_next, *item_up, *item_down, *item_right, *item_left;
384 } legacy_focus; 384 } legacy_focus;
385
386 //TODO Efl.Access.Object - remove during refactor
387 Eina_List *relations;
388 Eina_List *attr_list;
389 const char *name;
390 const char *description;
391 const char *translation_domain;
392 Efl_Access_Role role;
393 Efl_Access_Reading_Info_Type reading_info;
394 Efl_Access_Object *access_parent;
395
385 Eina_Bool scroll_x_locked : 1; 396 Eina_Bool scroll_x_locked : 1;
386 Eina_Bool scroll_y_locked : 1; 397 Eina_Bool scroll_y_locked : 1;
387 398
@@ -570,6 +581,16 @@ struct _Elm_Widget_Item_Data
570 Eina_Hash *labels; 581 Eina_Hash *labels;
571 Evas_Object *track_obj; 582 Evas_Object *track_obj;
572 583
584 //TODO Efl.Access.Object - remove during refactor
585 Eina_List *relations;
586 Eina_List *attr_list;
587 const char *name;
588 const char *description;
589 const char *translation_domain;
590 Efl_Access_Role role;
591 Efl_Access_Reading_Info_Type reading_info;
592 Efl_Access_Object *access_parent;
593
573 Eina_Bool disabled : 1; 594 Eina_Bool disabled : 1;
574 Eina_Bool on_deletion : 1; 595 Eina_Bool on_deletion : 1;
575 Eina_Bool on_translate : 1; 596 Eina_Bool on_translate : 1;
diff --git a/src/lib/elementary/elm_widget_item.eo b/src/lib/elementary/elm_widget_item.eo
index 3760ace722..b39b5d03af 100644
--- a/src/lib/elementary/elm_widget_item.eo
+++ b/src/lib/elementary/elm_widget_item.eo
@@ -550,6 +550,24 @@ class Elm.Widget.Item extends Efl.Object implements Efl.Access.Object,
550 Efl.Object.invalidate; 550 Efl.Object.invalidate;
551 Efl.Access.Object.state_set { get; } 551 Efl.Access.Object.state_set { get; }
552 Efl.Access.Object.attributes { get; } 552 Efl.Access.Object.attributes { get; }
553 //TODO remove
554 Efl.Access.Object.access_parent { get; set; }
555 Efl.Access.Object.access_children { get; }
556 Efl.Access.Object.localized_role_name { get; }
557 Efl.Access.Object.index_in_parent { get; }
558 Efl.Access.Object.i18n_name { get; set; }
559 Efl.Access.Object.attribute_append;
560 Efl.Access.Object.attributes_clear;
561 Efl.Access.Object.reading_info_type { get; set; }
562 Efl.Access.Object.role { get; set; }
563 Efl.Access.Object.role_name { get; }
564 Efl.Access.Object.description { get; set; }
565 Efl.Access.Object.relations_get;
566 Efl.Access.Object.translation_domain { get; set; }
567 Efl.Access.Object.relationship_append;
568 Efl.Access.Object.relationship_remove;
569 Efl.Access.Object.relationships_clear;
570 //TODO end
553 Efl.Access.Component.extents { get; set; } 571 Efl.Access.Component.extents { get; set; }
554 Efl.Access.Component.focus_grab; 572 Efl.Access.Component.focus_grab;
555 Efl.Access.Component.screen_position { get; set; } 573 Efl.Access.Component.screen_position { get; set; }