summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_container.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-06-19 11:26:46 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-08-21 16:40:31 +0200
commit05fdfcc76a7eb57d00ae52d3ab2b9a1eb3ee0db9 (patch)
tree1e56e909ecaaf0d69b422f5173ea514b56dd84dc /src/lib/evas/canvas/evas_vg_container.c
parent126edbb48c4f065fe68cb4d60760102498d93ad2 (diff)
evas: add logic to duplicate recursively an Efl_VG_Node tree.
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_container.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_vg_container.c b/src/lib/evas/canvas/evas_vg_container.c
index 683f5ce..32ffbfa 100644
--- a/src/lib/evas/canvas/evas_vg_container.c
+++ b/src/lib/evas/canvas/evas_vg_container.c
@@ -135,6 +135,32 @@ _efl_vg_container_efl_vg_base_interpolate(Eo *obj,
135 return r; 135 return r;
136} 136}
137 137
138static void
139_efl_vg_container_efl_vg_base_dup(Eo *obj,
140 Efl_VG_Container_Data *pd,
141 const Efl_VG_Base *from)
142{
143 Efl_VG_Container_Data *fromd;
144 Eina_List *l;
145 Eo *child;
146
147 eo_do_super(obj, EFL_VG_CONTAINER_CLASS, efl_vg_dup(from));
148
149 fromd = eo_data_scope_get(from, EFL_VG_CONTAINER_CLASS);
150
151 EINA_LIST_FREE(pd->children, child)
152 eo_unref(child);
153
154 EINA_LIST_FOREACH(fromd->children, l, child)
155 {
156 // By setting parent, we automatically reference
157 // this new object as a child of obj. Magic at work !
158 eo_add_ref(eo_class_get(child),
159 obj,
160 efl_vg_dup(child));
161 }
162}
163
138EAPI Efl_VG* 164EAPI Efl_VG*
139evas_vg_container_add(Efl_VG *parent) 165evas_vg_container_add(Efl_VG *parent)
140{ 166{