summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_access.c
diff options
context:
space:
mode:
authorShinwoo Kim <kimcinoo.efl@gmail.com>2013-02-08 06:16:03 +0000
committerShinwoo Kim <kimcinoo.efl@gmail.com>2013-02-08 06:16:03 +0000
commit0a1d984d9bbbb13ca52a9bec7cca36c2e76f4bb8 (patch)
tree0c099662def4136ba971d78cf169204a1e0661da /legacy/elementary/src/lib/elm_access.c
parent26b5a82d4173b91eba48ed6161ddc01f19ca4747 (diff)
[access] unregister an object from application side.
SVN revision: 83761
Diffstat (limited to 'legacy/elementary/src/lib/elm_access.c')
-rw-r--r--legacy/elementary/src/lib/elm_access.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c
index b85f511..9ab964e 100644
--- a/legacy/elementary/src/lib/elm_access.c
+++ b/legacy/elementary/src/lib/elm_access.c
@@ -662,25 +662,35 @@ _access_object_register(Evas_Object *obj, Evas_Object *parent)
662static void 662static void
663_access_object_unregister(Evas_Object *obj) 663_access_object_unregister(Evas_Object *obj)
664{ 664{
665 Elm_Access_Info *ac;
665 Evas_Object *ao; 666 Evas_Object *ao;
666 667
667 if (!obj) return; 668 if (!obj) return;
668 669
669 ao = evas_object_data_get(obj, "_part_access_obj"); 670 ao = evas_object_data_get(obj, "_part_access_obj");
670 if (!ao) return;
671 671
672 evas_object_data_del(obj, "_part_access_obj"); 672 if (ao)
673 {
674 evas_object_data_del(obj, "_part_access_obj");
673 675
674 /* delete callbacks */ 676 /* delete callbacks */
675 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_RESIZE, 677 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_RESIZE,
676 _content_resize, ao); 678 _content_resize, ao);
677 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOVE, 679 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOVE,
678 _content_move, ao); 680 _content_move, ao);
679 681
680 /* unregister access object */ 682 /* unregister access object */
681 _elm_access_object_unregister(ao, obj); 683 _elm_access_object_unregister(ao, obj);
682 684
683 evas_object_del(ao); 685 evas_object_del(ao);
686 }
687 else
688 {
689 /* button, check, label etc. */
690 ac = evas_object_data_get(obj, "_elm_access");
691 if (ac && ac->hoverobj)
692 _elm_access_object_unregister(obj, ac->hoverobj);
693 }
684} 694}
685 695
686EAPI Evas_Object * 696EAPI Evas_Object *
@@ -753,6 +763,8 @@ _elm_access_object_register(Evas_Object *obj, Evas_Object *hoverobj)
753 _access_obj_del_cb, obj); 763 _access_obj_del_cb, obj);
754 ac = calloc(1, sizeof(Elm_Access_Info)); 764 ac = calloc(1, sizeof(Elm_Access_Info));
755 evas_object_data_set(obj, "_elm_access", ac); 765 evas_object_data_set(obj, "_elm_access", ac);
766
767 ac->hoverobj = hoverobj;
756} 768}
757 769
758EAPI void 770EAPI void