summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-02-27 13:17:22 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-02-27 13:17:22 -0500
commit235dadb1abdbace96c33f871e5b5b3d3f4da6214 (patch)
tree6cc68090bfe6e053024dc94be1d2e00c3fdd07ca
parent335936e79d9473b72b6afe2902565b9e25701209 (diff)
efl.canvas.group: add events for member add/remove
Summary: ref T7554 Depends on D8032 Reviewers: segfaultxavi, bu5hm4n Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7554 Differential Revision: https://phab.enlightenment.org/D8034
-rw-r--r--src/lib/evas/canvas/efl_canvas_group.eo4
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo
index f21ffda3e5..5ef8016e9e 100644
--- a/src/lib/evas/canvas/efl_canvas_group.eo
+++ b/src/lib/evas/canvas/efl_canvas_group.eo
@@ -123,6 +123,10 @@ class @beta Efl.Canvas.Group extends Efl.Canvas.Object
123 } 123 }
124 } 124 }
125 } 125 }
126 events {
127 member,added: Efl.Gfx.Entity; [[Called when a member is added to the group.]]
128 member,removed: Efl.Gfx.Entity; [[Called when a member is removed from the group.]]
129 }
126 implements { 130 implements {
127 class.constructor; 131 class.constructor;
128 class.destructor; 132 class.destructor;
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 03e036beab..16b697042a 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -329,6 +329,7 @@ _efl_canvas_group_group_member_add(Eo *smart_obj, Evas_Smart_Data *o, Evas_Objec
329 if (smart->smart.smart && smart->smart.smart->smart_class->member_add) 329 if (smart->smart.smart && smart->smart.smart->smart_class->member_add)
330 smart->smart.smart->smart_class->member_add(smart_obj, eo_obj); 330 smart->smart.smart->smart_class->member_add(smart_obj, eo_obj);
331 evas_object_update_bounding_box(eo_obj, obj, member_o); 331 evas_object_update_bounding_box(eo_obj, obj, member_o);
332 efl_event_callback_call(smart_obj, EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED, eo_obj);
332} 333}
333 334
334EAPI void 335EAPI void
@@ -355,6 +356,8 @@ _efl_canvas_group_group_member_del(Eo *smart_obj, Evas_Smart_Data *_pd EINA_UNUS
355 356
356 evas_object_async_block(obj); 357 evas_object_async_block(obj);
357 358
359 efl_event_callback_call(smart_obj, EFL_CANVAS_GROUP_EVENT_MEMBER_REMOVED, eo_obj);
360
358 smart = efl_data_scope_get(smart_obj, EFL_CANVAS_OBJECT_CLASS); 361 smart = efl_data_scope_get(smart_obj, EFL_CANVAS_OBJECT_CLASS);
359 if (smart->smart.smart && smart->smart.smart->smart_class->member_del) 362 if (smart->smart.smart && smart->smart.smart->smart_class->member_del)
360 smart->smart.smart->smart_class->member_del(smart_obj, eo_obj); 363 smart->smart.smart->smart_class->member_del(smart_obj, eo_obj);