summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/canvas
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/evas/src/lib/canvas')
-rw-r--r--legacy/evas/src/lib/canvas/evas_layer.c22
-rw-r--r--legacy/evas/src/lib/canvas/evas_main.c10
2 files changed, 25 insertions, 7 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_layer.c b/legacy/evas/src/lib/canvas/evas_layer.c
index da15d54..241de45 100644
--- a/legacy/evas/src/lib/canvas/evas_layer.c
+++ b/legacy/evas/src/lib/canvas/evas_layer.c
@@ -71,7 +71,19 @@ evas_layer_free(Evas_Layer *lay)
71 obj = (Evas_Object *)lay->objects; 71 obj = (Evas_Object *)lay->objects;
72 evas_object_free(obj, 0); 72 evas_object_free(obj, 0);
73 } 73 }
74 free(lay); 74}
75
76void
77evas_layer_clean(Evas *e)
78{
79 Evas_Layer *tmp;
80
81 while (e->layers)
82 {
83 tmp = e->layers;
84 evas_layer_del(tmp);
85 free(tmp);
86 }
75} 87}
76 88
77Evas_Layer * 89Evas_Layer *
@@ -122,6 +134,9 @@ evas_layer_del(Evas_Layer *lay)
122 134
123/** 135/**
124 * Sets the layer of the evas that the given object will be part of. 136 * Sets the layer of the evas that the given object will be part of.
137 *
138 * It is not possible to change the layer of a smart object's child.
139 *
125 * @param obj The given evas object. 140 * @param obj The given evas object.
126 * @param l The number of the layer to place the object on. 141 * @param l The number of the layer to place the object on.
127 */ 142 */
@@ -170,6 +185,11 @@ evas_object_layer_set(Evas_Object *obj, short l)
170 185
171/** 186/**
172 * Retrieves the layer of the evas that the given object is part of. 187 * Retrieves the layer of the evas that the given object is part of.
188 *
189 * Be carefull, it doesn't make sense to change the layer of smart object's
190 * child. So the returned value could be wrong in some case. Don't rely on
191 * it's accuracy.
192 *
173 * @param obj The given evas object. 193 * @param obj The given evas object.
174 * @return Number of the layer. 194 * @return Number of the layer.
175 */ 195 */
diff --git a/legacy/evas/src/lib/canvas/evas_main.c b/legacy/evas/src/lib/canvas/evas_main.c
index 2d2065b..8e07c54 100644
--- a/legacy/evas/src/lib/canvas/evas_main.c
+++ b/legacy/evas/src/lib/canvas/evas_main.c
@@ -158,12 +158,10 @@ evas_free(Evas *e)
158 } 158 }
159 } 159 }
160 } 160 }
161 while (e->layers) 161 EINA_INLIST_FOREACH(e->layers, lay)
162 { 162 evas_layer_free(lay);
163 lay = e->layers; 163 evas_layer_clean(e);
164 evas_layer_del(lay); 164
165 evas_layer_free(lay);
166 }
167 e->walking_list--; 165 e->walking_list--;
168 166
169 evas_font_path_clear(e); 167 evas_font_path_clear(e);