summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2015-12-01 14:14:15 +0100
committerLukasz Stanislawski <l.stanislaws@samsung.com>2016-01-05 15:37:48 +0100
commit11c859833876fdbe75a3f2a45c8161a9a6ac38c0 (patch)
tree5ca18f0296d6a4ccd9a989a42d3a5ccd8f02e08d
parenta8d3df85a28de104597d909544ef1f19b3f06d91 (diff)
widget: improve accessibile_at_point getter
-rw-r--r--src/bin/Makefile.am1
-rw-r--r--src/bin/test.c2
-rw-r--r--src/bin/test_atspi.c108
-rw-r--r--src/lib/Makefile.am1
-rw-r--r--src/lib/elm_gengrid.c15
-rw-r--r--src/lib/elm_gengrid.eo1
-rw-r--r--src/lib/elm_genlist.c15
-rw-r--r--src/lib/elm_genlist.eo1
-rw-r--r--src/lib/elm_index.c30
-rw-r--r--src/lib/elm_index.eo1
-rw-r--r--src/lib/elm_interface_atspi_component.c20
-rw-r--r--src/lib/elm_interface_atspi_component.h22
-rw-r--r--src/lib/elm_interfaces.h3
-rw-r--r--src/lib/elm_list.c15
-rw-r--r--src/lib/elm_list.eo1
-rw-r--r--src/lib/elm_toolbar.c31
-rw-r--r--src/lib/elm_toolbar.eo1
-rw-r--r--src/lib/elm_widget.c38
-rw-r--r--src/lib/elm_widget.eo1
19 files changed, 305 insertions, 2 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 46db673e5..492525fb7 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -33,6 +33,7 @@ test_access.c \
33test_actionslider.c \ 33test_actionslider.c \
34test_anim.c \ 34test_anim.c \
35test_application_server.c \ 35test_application_server.c \
36test_atspi.c \
36test_bg.c \ 37test_bg.c \
37test_box.c \ 38test_box.c \
38test_bubble.c \ 39test_bubble.c \
diff --git a/src/bin/test.c b/src/bin/test.c
index a3ae31d1b..f98d2c72c 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -13,6 +13,7 @@ int _log_domain = -1;
13void test_access(void *data, Evas_Object *obj, void *event_info); 13void test_access(void *data, Evas_Object *obj, void *event_info);
14void test_access2(void *data, Evas_Object *obj, void *event_info); 14void test_access2(void *data, Evas_Object *obj, void *event_info);
15void test_access3(void *data, Evas_Object *obj, void *event_info); 15void test_access3(void *data, Evas_Object *obj, void *event_info);
16void test_atspi(void *data, Evas_Object *obj, void *event_info);
16void test_bg_plain(void *data, Evas_Object *obj, void *event_info); 17void test_bg_plain(void *data, Evas_Object *obj, void *event_info);
17void test_bg_image(void *data, Evas_Object *obj, void *event_info); 18void test_bg_image(void *data, Evas_Object *obj, void *event_info);
18void test_bg_options(void *data, Evas_Object *obj, void *event_info); 19void test_bg_options(void *data, Evas_Object *obj, void *event_info);
@@ -869,6 +870,7 @@ add_tests:
869 ADD_TEST(NULL, "Miscellaneous", "Accessibility", test_access); 870 ADD_TEST(NULL, "Miscellaneous", "Accessibility", test_access);
870 ADD_TEST(NULL, "Miscellaneous", "Accessibility2", test_access2); 871 ADD_TEST(NULL, "Miscellaneous", "Accessibility2", test_access2);
871 ADD_TEST(NULL, "Miscellaneous", "Accessibility3", test_access3); 872 ADD_TEST(NULL, "Miscellaneous", "Accessibility3", test_access3);
873 ADD_TEST(NULL, "Miscellaneous", "AT-SPI", test_atspi);
872 874
873 //------------------------------// 875 //------------------------------//
874 ADD_TEST(NULL, "Application client/server", "Task switcher", test_task_switcher); 876 ADD_TEST(NULL, "Application client/server", "Task switcher", test_task_switcher);
diff --git a/src/bin/test_atspi.c b/src/bin/test_atspi.c
new file mode 100644
index 000000000..d706c472b
--- /dev/null
+++ b/src/bin/test_atspi.c
@@ -0,0 +1,108 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
7#include <Elementary.h>
8
9static Ecore_Event_Handler *hdl;
10
11static Eina_Bool
12_mouse_move_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *info)
13{
14 Ecore_Event_Mouse_Move *mm = info;
15 Elm_Interface_Atspi_Accessible *root, *child, *new;
16 Eina_List *children, *l;
17
18 eo_do(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, root = elm_interface_atspi_accessible_root_get());
19 if (!root)
20 return EINA_TRUE;
21
22 eo_do(root, children = elm_interface_atspi_accessible_children_get());
23
24 EINA_LIST_FOREACH(children, l, child)
25 {
26 if (eo_isa(child, ELM_WIN_CLASS))
27 {
28 if (elm_win_window_id_get(child) == mm->window)
29 break;
30 }
31 }
32 eina_list_free(children);
33
34 if (child)
35 {
36 new = child;
37 do {
38 child = new;
39 eo_do(child, new = elm_interface_atspi_component_accessible_at_point_get(EINA_FALSE, mm->x, mm->y));
40 } while (new && eo_isa(new, ELM_INTERFACE_ATSPI_COMPONENT_MIXIN));
41 }
42 if (child)
43 {
44 char *name;
45 eo_do(child, name = elm_interface_atspi_accessible_name_get());
46 fprintf(stderr, "%s (%s)\n", name, eo_class_name_get(child));
47 free(name);
48 }
49
50 return EINA_TRUE;
51}
52
53static void
54_accessible_at_point_start(void)
55{
56 hdl = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _mouse_move_cb, NULL);
57}
58
59static void
60_accessible_at_point_end(void)
61{
62 if (hdl) ecore_event_handler_del(hdl);
63 hdl = NULL;
64}
65
66static void
67_cleanup_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
68{
69 _accessible_at_point_end();
70}
71
72
73static void
74_accessible_at_point(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
75{
76 if (elm_check_state_get(obj))
77 _accessible_at_point_start();
78 else
79 _accessible_at_point_end();
80}
81
82void
83test_atspi(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
84{
85 Evas_Object *win, *box, *btn;
86
87 win = elm_win_util_standard_add("AT-SPI", "AT-SPI");
88 elm_win_autodel_set(win, EINA_TRUE);
89 evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, NULL);
90
91 box = elm_box_add(win);
92 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
93 elm_win_resize_object_add(win, box);
94 evas_object_show(box);
95
96 btn = elm_check_add(win);
97 elm_object_text_set(btn, "AccessibleAtPoint");
98 elm_object_style_set(btn, "toggle");
99 evas_object_smart_callback_add(btn, "changed", _accessible_at_point, NULL);
100 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
101 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
102 evas_object_show(btn);
103
104 elm_box_pack_end(box, btn);
105
106 evas_object_resize(win, 300, 300);
107 evas_object_show(win);
108}
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 40fb59746..4d3be8b8b 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -38,6 +38,7 @@ includesunstable_HEADERS = \
38elm_gen_common.h \ 38elm_gen_common.h \
39elm_atspi_bridge.h \ 39elm_atspi_bridge.h \
40elm_interface_atspi_accessible.h \ 40elm_interface_atspi_accessible.h \
41elm_interface_atspi_component.h \
41elm_interface_atspi_text.h \ 42elm_interface_atspi_text.h \
42elm_interface_atspi_widget_action.h \ 43elm_interface_atspi_widget_action.h \
43elm_interface_atspi_window.h \ 44elm_interface_atspi_window.h \
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 7661995a2..38bd45b53 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -5,6 +5,7 @@
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
7#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 7#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
8#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
8#define ELM_WIDGET_ITEM_PROTECTED 9#define ELM_WIDGET_ITEM_PROTECTED
9 10
10#include <Elementary.h> 11#include <Elementary.h>
@@ -5797,5 +5798,19 @@ _elm_gengrid_elm_interface_atspi_selection_child_deselect(Eo *obj EINA_UNUSED, E
5797 return EINA_FALSE; 5798 return EINA_FALSE;
5798} 5799}
5799 5800
5801EOLIAN static Eo *
5802_elm_gengrid_elm_interface_atspi_component_accessible_at_point_get(Eo *obj, Elm_Gengrid_Data *_pd EINA_UNUSED, Eina_Bool screen_coords, int x, int y)
5803{
5804 Eo *ret;
5805 eo_do_super(obj, ELM_GENGRID_CLASS, ret = elm_interface_atspi_component_accessible_at_point_get(screen_coords, x, y));
5806
5807 if (ret) return ret;
5808
5809 if (screen_coords)
5810 elm_atspi_componenet_coords_convert(ELM_ATSPI_COMPONENT_CONVERT_SCREEN_2_WINDOW, evas_object_evas_get(obj), &x, &y);
5811
5812 return eo_do_ret(obj, ret, elm_obj_gengrid_at_xy_item_get(x, y, NULL, NULL));
5813}
5814
5800#include "elm_gengrid.eo.c" 5815#include "elm_gengrid.eo.c"
5801#include "elm_gengrid_item.eo.c" 5816#include "elm_gengrid_item.eo.c"
diff --git a/src/lib/elm_gengrid.eo b/src/lib/elm_gengrid.eo
index d5ca4efff..78f4c0c6e 100644
--- a/src/lib/elm_gengrid.eo
+++ b/src/lib/elm_gengrid.eo
@@ -569,6 +569,7 @@ class Elm.Gengrid (Elm.Layout, Elm_Interface_Scrollable,
569 Elm_Interface_Atspi_Selection.is_child_selected; 569 Elm_Interface_Atspi_Selection.is_child_selected;
570 Elm_Interface_Atspi_Selection.all_children_select; 570 Elm_Interface_Atspi_Selection.all_children_select;
571 Elm_Interface_Atspi_Selection.clear; 571 Elm_Interface_Atspi_Selection.clear;
572 Elm_Interface_Atspi_Component.accessible_at_point_get;
572 } 573 }
573 events { 574 events {
574 language,changed; 575 language,changed;
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index b78081f84..25ba7ee10 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -7,6 +7,7 @@
7#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 7#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
8#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED 8#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
9#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 9#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
10#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
10#define ELM_WIDGET_ITEM_PROTECTED 11#define ELM_WIDGET_ITEM_PROTECTED
11 12
12#include <Elementary.h> 13#include <Elementary.h>
@@ -8395,5 +8396,19 @@ _elm_genlist_elm_interface_atspi_selection_child_deselect(Eo *obj EINA_UNUSED, E
8395 return EINA_FALSE; 8396 return EINA_FALSE;
8396} 8397}
8397 8398
8399EOLIAN static Eo *
8400_elm_genlist_elm_interface_atspi_component_accessible_at_point_get(Eo *obj, Elm_Genlist_Data *_pd EINA_UNUSED, Eina_Bool screen_coords, int x, int y)
8401{
8402 Eo *ret;
8403 eo_do_super(obj, ELM_GENLIST_CLASS, ret = elm_interface_atspi_component_accessible_at_point_get(screen_coords, x, y));
8404
8405 if (ret) return ret;
8406
8407 if (screen_coords)
8408 elm_atspi_componenet_coords_convert(ELM_ATSPI_COMPONENT_CONVERT_SCREEN_2_WINDOW, evas_object_evas_get(obj), &x, &y);
8409
8410 return eo_do_ret(obj, ret, elm_obj_genlist_at_xy_item_get(x, y, NULL));
8411}
8412
8398#include "elm_genlist.eo.c" 8413#include "elm_genlist.eo.c"
8399#include "elm_genlist_item.eo.c" 8414#include "elm_genlist_item.eo.c"
diff --git a/src/lib/elm_genlist.eo b/src/lib/elm_genlist.eo
index ebe07333a..b147e3715 100644
--- a/src/lib/elm_genlist.eo
+++ b/src/lib/elm_genlist.eo
@@ -546,6 +546,7 @@ class Elm.Genlist (Elm.Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
546 Elm_Interface_Atspi_Selection.is_child_selected; 546 Elm_Interface_Atspi_Selection.is_child_selected;
547 Elm_Interface_Atspi_Selection.all_children_select; 547 Elm_Interface_Atspi_Selection.all_children_select;
548 Elm_Interface_Atspi_Selection.clear; 548 Elm_Interface_Atspi_Selection.clear;
549 Elm_Interface_Atspi_Component.accessible_at_point_get;
549 } 550 }
550 events { 551 events {
551 language,changed; 552 language,changed;
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 17f844a3b..b7736499d 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -1722,5 +1722,35 @@ _elm_index_item_elm_interface_atspi_widget_action_elm_actions_get(Eo *eo_it EINA
1722 return &atspi_actions[0]; 1722 return &atspi_actions[0];
1723} 1723}
1724 1724
1725EOLIAN static Eo *
1726_elm_index_elm_interface_atspi_component_accessible_at_point_get(Eo *obj, Elm_Index_Data *_pd, Eina_Bool screen_coords, int x, int y)
1727{
1728 Eo *ret, *item;
1729 Eina_Rectangle in_rect;
1730 Eina_List *l;
1731 eo_do_super(obj, ELM_INDEX_CLASS, ret = elm_interface_atspi_component_accessible_at_point_get(screen_coords, x, y));
1732
1733 if (ret) return ret;
1734 if (screen_coords)
1735 elm_atspi_componenet_coords_convert(ELM_ATSPI_COMPONENT_CONVERT_SCREEN_2_WINDOW, evas_object_evas_get(obj), &x, &y);
1736
1737 in_rect.x = x;
1738 in_rect.y = y;
1739 in_rect.w = in_rect.h = 1;
1740
1741 EINA_LIST_FOREACH(_pd->items, l, item)
1742 {
1743 ELM_INDEX_ITEM_DATA_GET(item, it);
1744 if (VIEW(it))
1745 {
1746 Eina_Rectangle rect;
1747 evas_object_geometry_get(VIEW(it), &rect.x, &rect.y, &rect.w, &rect.h);
1748 if (eina_rectangle_intersection(&in_rect, &rect))
1749 return EO_OBJ(it);
1750 }
1751 }
1752 return NULL;
1753}
1754
1725#include "elm_index_item.eo.c" 1755#include "elm_index_item.eo.c"
1726#include "elm_index.eo.c" 1756#include "elm_index.eo.c"
diff --git a/src/lib/elm_index.eo b/src/lib/elm_index.eo
index 5f10880b8..ff4cff68d 100644
--- a/src/lib/elm_index.eo
+++ b/src/lib/elm_index.eo
@@ -244,6 +244,7 @@ class Elm.Index (Elm.Layout, Evas.Clickable_Interface, Evas.Selectable_Interface
244 Elm.Widget.focus_next; 244 Elm.Widget.focus_next;
245 Elm.Layout.sizing_eval; 245 Elm.Layout.sizing_eval;
246 Elm_Interface_Atspi_Accessible.children.get; 246 Elm_Interface_Atspi_Accessible.children.get;
247 Elm_Interface_Atspi_Component.accessible_at_point_get;
247 } 248 }
248 events { 249 events {
249 changed; 250 changed;
diff --git a/src/lib/elm_interface_atspi_component.c b/src/lib/elm_interface_atspi_component.c
index 5d3eb728a..6c49f2629 100644
--- a/src/lib/elm_interface_atspi_component.c
+++ b/src/lib/elm_interface_atspi_component.c
@@ -149,4 +149,24 @@ _elm_interface_atspi_component_focus_grab(Eo *obj EINA_UNUSED, void *_pd EINA_UN
149 return evas_object_focus_get(obj); 149 return evas_object_focus_get(obj);
150} 150}
151 151
152void
153elm_atspi_componenet_coords_convert(Elm_Atspi_Component_Convert_Direction dir, Evas *evas, int *x, int *y)
154{
155 Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas);
156 int ee_x, ee_y;
157 if (!ee) return;
158
159 ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
160 switch (dir)
161 {
162 case ELM_ATSPI_COMPONENT_CONVERT_SCREEN_2_WINDOW:
163 if (x) *x -= ee_x;
164 if (y) *y -= ee_y;
165 break;
166 case ELM_ATSPI_COMPONENT_CONVERT_WINDOW_2_SCREEN:
167 if (x) *x += ee_x;
168 if (y) *y += ee_y;
169 }
170}
171
152#include "elm_interface_atspi_component.eo.c" 172#include "elm_interface_atspi_component.eo.c"
diff --git a/src/lib/elm_interface_atspi_component.h b/src/lib/elm_interface_atspi_component.h
new file mode 100644
index 000000000..4da92ea0b
--- /dev/null
+++ b/src/lib/elm_interface_atspi_component.h
@@ -0,0 +1,22 @@
1#ifndef ELM_INTERFACE_ATSPI_COMPONENT_H
2#define ELM_INTERFACE_ATSPI_COMPONENT_H
3
4#ifdef EFL_BETA_API_SUPPORT
5
6typedef enum
7{
8 ELM_ATSPI_COMPONENT_CONVERT_SCREEN_2_WINDOW,
9 ELM_ATSPI_COMPONENT_CONVERT_WINDOW_2_SCREEN
10} Elm_Atspi_Component_Convert_Direction;
11
12void elm_atspi_componenet_coords_convert(Elm_Atspi_Component_Convert_Direction dir, Evas_Object *obj, int *x, int *y);
13
14#ifdef EFL_EO_API_SUPPORT
15#include "elm_interface_atspi_component.eo.h"
16#endif
17#ifndef EFL_NOLEGACY_API_SUPPORT
18#include "elm_interface_atspi_component.eo.legacy.h"
19#endif
20
21#endif
22#endif
diff --git a/src/lib/elm_interfaces.h b/src/lib/elm_interfaces.h
index 78e262f09..4c9a9e955 100644
--- a/src/lib/elm_interfaces.h
+++ b/src/lib/elm_interfaces.h
@@ -2,12 +2,12 @@
2#include "elm_interface_atspi_text.h" 2#include "elm_interface_atspi_text.h"
3#include "elm_interface_atspi_widget_action.h" 3#include "elm_interface_atspi_widget_action.h"
4#include "elm_interface_atspi_window.h" 4#include "elm_interface_atspi_window.h"
5#include "elm_interface_atspi_component.h"
5 6
6#ifdef EFL_EO_API_SUPPORT 7#ifdef EFL_EO_API_SUPPORT
7#include "elm_interface_scrollable.h" 8#include "elm_interface_scrollable.h"
8#ifdef EFL_BETA_API_SUPPORT 9#ifdef EFL_BETA_API_SUPPORT
9#include "elm_interface_atspi_action.eo.h" 10#include "elm_interface_atspi_action.eo.h"
10#include "elm_interface_atspi_component.eo.h"
11#include "elm_interface_atspi_editable_text.eo.h" 11#include "elm_interface_atspi_editable_text.eo.h"
12#include "elm_interface_atspi_image.eo.h" 12#include "elm_interface_atspi_image.eo.h"
13#include "elm_interface_atspi_selection.eo.h" 13#include "elm_interface_atspi_selection.eo.h"
@@ -17,7 +17,6 @@
17#ifndef EFL_NOLEGACY_API_SUPPORT 17#ifndef EFL_NOLEGACY_API_SUPPORT
18#ifdef EFL_BETA_API_SUPPORT 18#ifdef EFL_BETA_API_SUPPORT
19#include "elm_interface_atspi_action.eo.legacy.h" 19#include "elm_interface_atspi_action.eo.legacy.h"
20#include "elm_interface_atspi_component.eo.legacy.h"
21#include "elm_interface_atspi_editable_text.eo.legacy.h" 20#include "elm_interface_atspi_editable_text.eo.legacy.h"
22#include "elm_interface_atspi_image.eo.legacy.h" 21#include "elm_interface_atspi_image.eo.legacy.h"
23#include "elm_interface_atspi_selection.eo.legacy.h" 22#include "elm_interface_atspi_selection.eo.legacy.h"
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index bf928fc2b..0ac46cc84 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -5,6 +5,7 @@
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED 7#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
8#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
8#define ELM_WIDGET_ITEM_PROTECTED 9#define ELM_WIDGET_ITEM_PROTECTED
9 10
10#include <Elementary.h> 11#include <Elementary.h>
@@ -3295,5 +3296,19 @@ _elm_list_elm_interface_atspi_selection_child_deselect(Eo *obj EINA_UNUSED, Elm_
3295 return EINA_FALSE; 3296 return EINA_FALSE;
3296} 3297}
3297 3298
3299EOLIAN static Eo *
3300_elm_list_elm_interface_atspi_component_accessible_at_point_get(Eo *obj, Elm_List_Data *_pd EINA_UNUSED, Eina_Bool screen_coords, int x, int y)
3301{
3302 Eo *ret;
3303 eo_do_super(obj, ELM_LIST_CLASS, ret = elm_interface_atspi_component_accessible_at_point_get(screen_coords, x, y));
3304
3305 if (ret) return ret;
3306
3307 if (screen_coords)
3308 elm_atspi_componenet_coords_convert(ELM_ATSPI_COMPONENT_CONVERT_SCREEN_2_WINDOW, evas_object_evas_get(obj), &x, &y);
3309
3310 return eo_do_ret(obj, ret, elm_obj_list_at_xy_item_get(x, y, NULL));
3311}
3312
3298#include "elm_list.eo.c" 3313#include "elm_list.eo.c"
3299#include "elm_list_item.eo.c" 3314#include "elm_list_item.eo.c"
diff --git a/src/lib/elm_list.eo b/src/lib/elm_list.eo
index 0505e0760..f8a1321d2 100644
--- a/src/lib/elm_list.eo
+++ b/src/lib/elm_list.eo
@@ -458,6 +458,7 @@ class Elm.List (Elm.Layout, Elm_Interface_Scrollable,
458 Elm_Interface_Atspi_Selection.is_child_selected; 458 Elm_Interface_Atspi_Selection.is_child_selected;
459 Elm_Interface_Atspi_Selection.all_children_select; 459 Elm_Interface_Atspi_Selection.all_children_select;
460 Elm_Interface_Atspi_Selection.clear; 460 Elm_Interface_Atspi_Selection.clear;
461 Elm_Interface_Atspi_Component.accessible_at_point_get;
461 } 462 }
462 events { 463 events {
463 activated; 464 activated;
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index a899bb95f..c34cd4f3b 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -5,6 +5,7 @@
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_SELECTION_PROTECTED
7#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 7#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
8#define ELM_INTERFACE_ATSPI_COMPONENT_PROTECTED
8#define ELM_WIDGET_ITEM_PROTECTED 9#define ELM_WIDGET_ITEM_PROTECTED
9 10
10#include <Elementary.h> 11#include <Elementary.h>
@@ -4002,6 +4003,36 @@ _elm_toolbar_evas_object_smart_calculate(Eo *obj, Elm_Toolbar_Data *pd EINA_UNUS
4002 _sizing_eval(obj); 4003 _sizing_eval(obj);
4003} 4004}
4004 4005
4006EOLIAN static Eo *
4007_elm_toolbar_elm_interface_atspi_component_accessible_at_point_get(Eo *obj, Elm_Toolbar_Data *_pd EINA_UNUSED, Eina_Bool screen_coords, int x, int y)
4008{
4009 Eo *ret;
4010 Elm_Toolbar_Item_Data *it;
4011 Eina_Rectangle in_rect;
4012 eo_do_super(obj, ELM_TOOLBAR_CLASS, ret = elm_interface_atspi_component_accessible_at_point_get(screen_coords, x, y));
4013
4014 if (ret) return ret;
4015 if (screen_coords)
4016 elm_atspi_componenet_coords_convert(ELM_ATSPI_COMPONENT_CONVERT_SCREEN_2_WINDOW, evas_object_evas_get(obj), &x, &y);
4017
4018 in_rect.x = x;
4019 in_rect.y = y;
4020 in_rect.w = in_rect.h = 1;
4021
4022 EINA_INLIST_FOREACH(_pd->items, it)
4023 {
4024 if (it->separator) continue;
4025 if (VIEW(it))
4026 {
4027 Eina_Rectangle rect;
4028 evas_object_geometry_get(VIEW(it), &rect.x, &rect.y, &rect.w, &rect.h);
4029 if (eina_rectangle_intersection(&in_rect, &rect))
4030 return EO_OBJ(it);
4031 }
4032 }
4033 return NULL;
4034}
4035
4005 4036
4006#include "elm_toolbar.eo.c" 4037#include "elm_toolbar.eo.c"
4007#include "elm_toolbar_item.eo.c" 4038#include "elm_toolbar_item.eo.c"
diff --git a/src/lib/elm_toolbar.eo b/src/lib/elm_toolbar.eo
index 7d27c1558..9fc90df96 100644
--- a/src/lib/elm_toolbar.eo
+++ b/src/lib/elm_toolbar.eo
@@ -393,6 +393,7 @@ class Elm.Toolbar (Elm.Widget, Elm_Interface_Scrollable,
393 Elm_Interface_Atspi_Selection.is_child_selected; 393 Elm_Interface_Atspi_Selection.is_child_selected;
394 Elm_Interface_Atspi_Selection.all_children_select; 394 Elm_Interface_Atspi_Selection.all_children_select;
395 Elm_Interface_Atspi_Selection.clear; 395 Elm_Interface_Atspi_Selection.clear;
396 Elm_Interface_Atspi_Component.accessible_at_point_get;
396 } 397 }
397 events { 398 events {
398 language,changed; 399 language,changed;
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index f917d2917..d1775195a 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -5979,5 +5979,43 @@ _elm_widget_item_elm_interface_atspi_component_alpha_get(Eo *obj EINA_UNUSED, El
5979 return (double)alpha / 255.0; 5979 return (double)alpha / 255.0;
5980} 5980}
5981 5981
5982EOLIAN static Eo *
5983_elm_widget_elm_interface_atspi_component_accessible_at_point_get(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Eina_Bool screen_coords, int x, int y)
5984{
5985 Eina_List *l;
5986 Evas_Object *stack_item;
5987
5988 if (screen_coords)
5989 elm_atspi_componenet_coords_convert(ELM_ATSPI_COMPONENT_CONVERT_SCREEN_2_WINDOW, evas_object_evas_get(obj), &x, &y);
5990
5991 /* Get evas_object stacked at given x,y coordinates starting from top */
5992 Eina_List *stack = evas_tree_objects_at_xy_get(evas_object_evas_get(obj), NULL, x, y);
5993
5994 /* Foreach stacked object starting from top */
5995 EINA_LIST_FOREACH(stack, l, stack_item)
5996 {
5997 Evas_Object *smart_parent = stack_item;
5998 while (smart_parent)
5999 {
6000 if (evas_object_repeat_events_get(smart_parent))
6001 break;
6002 if (eo_isa(smart_parent, ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN))
6003 {
6004 Elm_Atspi_Type type;
6005 eo_do(smart_parent, type = elm_interface_atspi_accessible_type_get());
6006 if (type == ELM_ATSPI_TYPE_REGULAR)
6007 {
6008 eina_list_free(stack);
6009 return smart_parent == obj ? NULL : smart_parent;
6010 }
6011 }
6012 smart_parent = evas_object_smart_parent_get(smart_parent);
6013 }
6014 }
6015
6016 eina_list_free(stack);
6017 return NULL;
6018}
6019
5982#include "elm_widget_item.eo.c" 6020#include "elm_widget_item.eo.c"
5983#include "elm_widget.eo.c" 6021#include "elm_widget.eo.c"
diff --git a/src/lib/elm_widget.eo b/src/lib/elm_widget.eo
index 35bed55f1..764ac035c 100644
--- a/src/lib/elm_widget.eo
+++ b/src/lib/elm_widget.eo
@@ -772,6 +772,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm_Interface_Atspi_Accessible, Elm_Inte
772 Elm_Interface_Atspi_Accessible.parent.get; 772 Elm_Interface_Atspi_Accessible.parent.get;
773 Elm_Interface_Atspi_Accessible.attributes.get; 773 Elm_Interface_Atspi_Accessible.attributes.get;
774 Elm_Interface_Atspi_Component.focus_grab; 774 Elm_Interface_Atspi_Component.focus_grab;
775 Elm_Interface_Atspi_Component.accessible_at_point_get;
775 } 776 }
776 events { 777 events {
777 moved; 778 moved;