summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_container.c
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-01 21:57:43 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-01 21:57:43 -0200
commitfa88a2337f4c1ed74dbe5f8e9b8ab9e80aa94215 (patch)
tree289d1f0e30abe7aeb9100ab9ed3e3a755d1c18b7 /src/lib/evas/canvas/evas_vg_container.c
parentb9a6a8e7384fc79fced2132407208abfedf77fe1 (diff)
Eo: Partial implementation to remove eo_dodevs/felipealmeida/eo_optimisations
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_container.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/lib/evas/canvas/evas_vg_container.c b/src/lib/evas/canvas/evas_vg_container.c
index 32ffbfa..12de25e 100644
--- a/src/lib/evas/canvas/evas_vg_container.c
+++ b/src/lib/evas/canvas/evas_vg_container.c
@@ -33,7 +33,7 @@ _efl_vg_container_eo_base_constructor(Eo *obj,
33 33
34 pd->names = eina_hash_stringshared_new(NULL); 34 pd->names = eina_hash_stringshared_new(NULL);
35 35
36 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 36 obj = eo_super_eo_constructor( MY_CLASS, obj);
37 37
38 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS); 38 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS);
39 nd->render_pre = _efl_vg_container_render_pre; 39 nd->render_pre = _efl_vg_container_render_pre;
@@ -46,7 +46,7 @@ static void
46_efl_vg_container_eo_base_destructor(Eo *obj, 46_efl_vg_container_eo_base_destructor(Eo *obj,
47 Efl_VG_Container_Data *pd EINA_UNUSED) 47 Efl_VG_Container_Data *pd EINA_UNUSED)
48{ 48{
49 eo_do_super(obj, MY_CLASS, eo_destructor()); 49 eo_super_eo_destructor(MY_CLASS, obj);
50 50
51 eina_hash_free(pd->names); 51 eina_hash_free(pd->names);
52 pd->names = NULL; 52 pd->names = NULL;
@@ -68,12 +68,12 @@ _efl_vg_container_efl_vg_base_bounds_get(Eo *obj EINA_UNUSED,
68 { 68 {
69 if (first) 69 if (first)
70 { 70 {
71 eo_do(child, efl_vg_bounds_get(r)); 71 eo_do(child, efl_vg_bounds_get(child, r));
72 first = EINA_FALSE; 72 first = EINA_FALSE;
73 } 73 }
74 else 74 else
75 { 75 {
76 eo_do(child, efl_vg_bounds_get(&s)); 76 eo_do(child, efl_vg_bounds_get(child, &s));
77 eina_rectangle_union(r, &s); 77 eina_rectangle_union(r, &s);
78 } 78 }
79 } 79 }
@@ -109,7 +109,7 @@ _efl_vg_container_efl_vg_base_interpolate(Eo *obj,
109 Eina_Hash_Tuple *tuple; 109 Eina_Hash_Tuple *tuple;
110 Eina_Bool r; 110 Eina_Bool r;
111 111
112 eo_do_super(obj, EFL_VG_CONTAINER_CLASS, r = efl_vg_interpolate(from, to, pos_map)); 112 r = eo_super_efl_vg_interpolate(EFL_VG_CONTAINER_CLASS, obj, from, to, pos_map);
113 113
114 if (!r) return EINA_FALSE; 114 if (!r) return EINA_FALSE;
115 115
@@ -128,7 +128,7 @@ _efl_vg_container_efl_vg_base_interpolate(Eo *obj,
128 if (!toc || !fromc) continue ; 128 if (!toc || !fromc) continue ;
129 if (eo_class_get(toc) != eo_class_get(fromc)) continue ; 129 if (eo_class_get(toc) != eo_class_get(fromc)) continue ;
130 130
131 eo_do(cc, r &= efl_vg_interpolate(fromc, toc, pos_map)); 131 eo_do(cc, r &= efl_vg_interpolate(cc, fromc, toc, pos_map));
132 } 132 }
133 eina_iterator_free(it); 133 eina_iterator_free(it);
134 134
@@ -144,7 +144,7 @@ _efl_vg_container_efl_vg_base_dup(Eo *obj,
144 Eina_List *l; 144 Eina_List *l;
145 Eo *child; 145 Eo *child;
146 146
147 eo_do_super(obj, EFL_VG_CONTAINER_CLASS, efl_vg_dup(from)); 147 eo_super_efl_vg_dup(EFL_VG_CONTAINER_CLASS, obj, from);
148 148
149 fromd = eo_data_scope_get(from, EFL_VG_CONTAINER_CLASS); 149 fromd = eo_data_scope_get(from, EFL_VG_CONTAINER_CLASS);
150 150
@@ -155,16 +155,19 @@ _efl_vg_container_efl_vg_base_dup(Eo *obj,
155 { 155 {
156 // By setting parent, we automatically reference 156 // By setting parent, we automatically reference
157 // this new object as a child of obj. Magic at work ! 157 // this new object as a child of obj. Magic at work !
158 eo_add_ref(eo_class_get(child), 158 Eo* tmp;
159 eo_add_ref(tmp, eo_class_get(child),
159 obj, 160 obj,
160 efl_vg_dup(child)); 161 efl_vg_dup(eo_class_get(child), child));
161 } 162 }
162} 163}
163 164
164EAPI Efl_VG* 165EAPI Efl_VG*
165evas_vg_container_add(Efl_VG *parent) 166evas_vg_container_add(Efl_VG *parent)
166{ 167{
167 return eo_add(EFL_VG_CONTAINER_CLASS, parent); 168 Eo* o;
169 eo_add(o, EFL_VG_CONTAINER_CLASS, parent);
170 return o;
168} 171}
169 172
170#include "efl_vg_container.eo.c" 173#include "efl_vg_container.eo.c"