summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_access.c
diff options
context:
space:
mode:
authorKim Shinwoo <kimcinoo.efl@gmail.com>2012-06-30 06:21:14 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-06-30 06:21:14 +0000
commit4709f16668129071fb2bda2526ed4b87b2ed4518 (patch)
tree79b9f1a447eb467982c25895616ec086f6db698d /legacy/elementary/src/lib/elm_access.c
parent577a6469244798e758522c3478b598d32a8d7ea8 (diff)
From: Kim Shinwoo <kimcinoo.efl@gmail.com>
Subject: [E-devel] [Patch][elementary] elm_access, use widget_item in focus chain It has been possible to use widget_item in access mode. The mouse-in event makes the widget_item speak. But focus chain is not useful in access mode, because the widget_item cannot get the focus as the edje object. The accessibility highlight will move by keeping the attached patch and you can hear the sound of widget item information. Please review the patch and give some feedbacks. There would be further works such as dynamic setting focus next hook, the previous _elm_access_list_register();, but please keep this first if there is no big trouble. I'll do those also. Thanks. SVN revision: 73074
Diffstat (limited to 'legacy/elementary/src/lib/elm_access.c')
-rw-r--r--legacy/elementary/src/lib/elm_access.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c
index eb7605d..533fa07 100644
--- a/legacy/elementary/src/lib/elm_access.c
+++ b/legacy/elementary/src/lib/elm_access.c
@@ -106,6 +106,7 @@ _access_obj_over_timeout_cb(void *data)
106 if (!ac) return EINA_FALSE; 106 if (!ac) return EINA_FALSE;
107 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF) 107 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
108 { 108 {
109 if (ac->on_highlight) ac->on_highlight(ac->on_highlight_data);
109 _elm_access_object_hilight(data); 110 _elm_access_object_hilight(data);
110 _elm_access_read(ac, ELM_ACCESS_CANCEL, data, NULL); 111 _elm_access_read(ac, ELM_ACCESS_CANCEL, data, NULL);
111 _elm_access_read(ac, ELM_ACCESS_TYPE, data, NULL); 112 _elm_access_read(ac, ELM_ACCESS_TYPE, data, NULL);
@@ -279,6 +280,16 @@ _elm_access_callback_set(Elm_Access_Info *ac, int type, Elm_Access_Content_Cb fu
279 ai->data = data; 280 ai->data = data;
280} 281}
281 282
283EAPI void
284_elm_access_on_highlight_hook_set(Elm_Access_Info *ac,
285 Elm_Access_On_Highlight_Cb func,
286 void *data)
287{
288 if (!ac) return;
289 ac->on_highlight = func;
290 ac->on_highlight_data = data;
291}
292
282EAPI char * 293EAPI char *
283_elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item) 294_elm_access_text_get(const Elm_Access_Info *ac, int type, Evas_Object *obj, Elm_Widget_Item *item)
284{ 295{
@@ -628,6 +639,33 @@ _access_item_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
628} 639}
629 640
630EAPI void 641EAPI void
642_elm_access_widget_item_register(Elm_Widget_Item *item)
643{
644 Evas_Object *ao;
645 Evas_Object *ho = item->view;
646 Evas_Coord x, y, w, h;
647
648 if (!item) return;
649
650 // create access object
651 ao = _elm_access_add(item->widget);
652 evas_object_event_callback_add(ho, EVAS_CALLBACK_RESIZE,
653 _content_resize, ao);
654 evas_object_event_callback_add(ho, EVAS_CALLBACK_MOVE,
655 _content_move, ao);
656
657 evas_object_geometry_get(ho, &x, &y, &w, &h);
658 evas_object_move(ao, x, y);
659 evas_object_resize(ao, w, h);
660 evas_object_show(ao);
661
662 // register access object
663 _elm_access_object_register(ao, ho);
664
665 item->access_obj = ao;
666}
667
668EAPI void
631_elm_access_item_register(Elm_Widget_Item *item, Evas_Object *hoverobj) 669_elm_access_item_register(Elm_Widget_Item *item, Evas_Object *hoverobj)
632{ 670{
633 Elm_Access_Info *ac; 671 Elm_Access_Info *ac;