summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_access.c
diff options
context:
space:
mode:
authorKim Shinwoo <kimcinoo.efl@gmail.com>2012-09-12 08:25:10 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-09-12 08:25:10 +0000
commit7aacc9fc4b324c0f5564392bea18f45a806d5424 (patch)
treec89f093a0d445ffe66de2f8c9a5e4869a965db24 /legacy/elementary/src/lib/elm_access.c
parentcb43cc94bd175b11fe9d839d09063d509c80ce69 (diff)
From: Kim Shinwoo <kimcinoo.efl@gmail.com>
Subject: [E-devel] [patch][elementary] calendar - add access feature, access - add _elm_access_edje_object_part_object_unregister(); the attachment has accessibility feature which is for the elm_calendar. and moreover.. it would be better to keep one more api for the access which name is _elm_access_edje_object_part_object_unregister(); in the case of calendar item, its text part could be set with empty value in run time(dynamically), even though it had a value (1~31) previously. so if there is an empty field(item), then previously registered item should be unregistered. the api would be useful not only this case but also others. then, please review the patch and give feedback. thanks. SVN revision: 76502
Diffstat (limited to 'legacy/elementary/src/lib/elm_access.c')
-rw-r--r--legacy/elementary/src/lib/elm_access.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c
index 4de3517..5224882 100644
--- a/legacy/elementary/src/lib/elm_access.c
+++ b/legacy/elementary/src/lib/elm_access.c
@@ -164,6 +164,9 @@ _access_obj_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event
164 _elm_access_clear(ac); 164 _elm_access_clear(ac);
165 free(ac); 165 free(ac);
166 } 166 }
167
168 // _elm_access_edje_object_part_object_register(); set below object data
169 evas_object_data_del(obj, "_part_access_obj");
167} 170}
168 171
169static void 172static void
@@ -506,6 +509,11 @@ _elm_access_edje_object_part_object_register(Evas_Object* obj,
506 509
507 if (!obj || !po) return NULL; 510 if (!obj || !po) return NULL;
508 511
512 // check previous access object
513 ao = evas_object_data_get(po, "_part_access_obj");
514 if (ao)
515 _elm_access_edje_object_part_object_unregister(obj, eobj, part);
516
509 // create access object 517 // create access object
510 ao = _elm_access_add(obj); 518 ao = _elm_access_add(obj);
511 evas_object_event_callback_add(po, EVAS_CALLBACK_RESIZE, 519 evas_object_event_callback_add(po, EVAS_CALLBACK_RESIZE,
@@ -528,10 +536,44 @@ _elm_access_edje_object_part_object_register(Evas_Object* obj,
528 _elm_access_callback_set(_elm_access_object_get(ao), 536 _elm_access_callback_set(_elm_access_object_get(ao),
529 ELM_ACCESS_INFO, 537 ELM_ACCESS_INFO,
530 _part_access_info_cb, eobj); 538 _part_access_info_cb, eobj);
539
540 // set access object
541 evas_object_data_set(po, "_part_access_obj", ao);
542
531 return ao; 543 return ao;
532} 544}
533 545
534EAPI void 546EAPI void
547_elm_access_edje_object_part_object_unregister(Evas_Object* obj,
548 const Evas_Object *eobj,
549 const char* part)
550{
551 Evas_Object *ao;
552 Evas_Object *po = (Evas_Object *)edje_object_part_object_get(eobj, part);
553
554 if (!obj || !po) return;
555
556 ao = evas_object_data_get(po, "_part_access_obj");
557 if (!ao) return;
558
559 evas_object_data_del(po, "_part_access_obj");
560
561 // delete callbacks
562 evas_object_event_callback_del_full(po, EVAS_CALLBACK_RESIZE,
563 _content_resize, ao);
564 evas_object_event_callback_del_full(po, EVAS_CALLBACK_MOVE,
565 _content_move, ao);
566
567 evas_object_event_callback_del_full(po, EVAS_CALLBACK_MOUSE_IN,
568 _access_obj_mouse_in_cb, ao);
569 evas_object_event_callback_del_full(po, EVAS_CALLBACK_MOUSE_OUT,
570 _access_obj_mouse_out_cb, ao);
571 evas_object_event_callback_del_full(po, EVAS_CALLBACK_DEL,
572 _access_obj_del_cb, ao);
573 evas_object_del(ao);
574}
575
576EAPI void
535_elm_access_object_hilight_disable(Evas *e) 577_elm_access_object_hilight_disable(Evas *e)
536{ 578{
537 Evas_Object *o, *ptarget; 579 Evas_Object *o, *ptarget;