summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2018-06-25 11:30:32 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-06-25 11:36:52 -0400
commiteed3e5dfe9e00b9b27955e8e7e6a42fcf5e87ff4 (patch)
tree9997a8e6a419fa6ee51fb01aa448e2f0989a3f83
parent580100d87dc73936d17caf2930543537150d9128 (diff)
efl_ui_layout_pack: Wrap calls to edje_object_part_object_get with
Summary: freeze/thaw @ref T6884 Depends on D6418 Reviewers: zmike, ManMower Reviewed By: zmike Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T6884 Differential Revision: https://phab.enlightenment.org/D6419
-rw-r--r--src/lib/elementary/efl_ui_layout_pack.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_layout_pack.c b/src/lib/elementary/efl_ui_layout_pack.c
index d4f8293edd..4cd9915bbf 100644
--- a/src/lib/elementary/efl_ui_layout_pack.c
+++ b/src/lib/elementary/efl_ui_layout_pack.c
@@ -76,7 +76,10 @@ EOLIAN static Eina_Iterator *
76_efl_ui_layout_part_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Box_Data *pd) 76_efl_ui_layout_part_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Box_Data *pd)
77{ 77{
78 Eina_Iterator *it; 78 Eina_Iterator *it;
79
80 edje_object_freeze(pd->obj);
79 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 81 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
82 edje_object_thaw(pd->obj);
80 it = evas_object_box_iterator_new(pack); 83 it = evas_object_box_iterator_new(pack);
81 return efl_canvas_iterator_create(obj, it, NULL); 84 return efl_canvas_iterator_create(obj, it, NULL);
82} 85}
@@ -84,7 +87,9 @@ _efl_ui_layout_part_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Box
84EOLIAN static int 87EOLIAN static int
85_efl_ui_layout_part_box_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) 88_efl_ui_layout_part_box_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
86{ 89{
90 edje_object_freeze(pd->obj);
87 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 91 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
92 edje_object_thaw(pd->obj);
88 return evas_obj_box_count(pack); 93 return evas_obj_box_count(pack);
89} 94}
90 95
@@ -142,7 +147,10 @@ _efl_ui_layout_part_box_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED, Efl_Ui_L
142{ 147{
143 const Efl_Gfx_Entity *other; 148 const Efl_Gfx_Entity *other;
144 int index; 149 int index;
150
151 edje_object_freeze(pd->obj);
145 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 152 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
153 edje_object_thaw(pd->obj);
146 index = efl_pack_index_get(pack, existing); 154 index = efl_pack_index_get(pack, existing);
147 if (index < 0) return EINA_FALSE; 155 if (index < 0) return EINA_FALSE;
148 156
@@ -164,7 +172,10 @@ _efl_ui_layout_part_box_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Ef
164{ 172{
165 Evas_Object_Box_Option *opt; 173 Evas_Object_Box_Option *opt;
166 Evas_Object_Box_Data *priv; 174 Evas_Object_Box_Data *priv;
175
176 edje_object_freeze(pd->obj);
167 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 177 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
178 edje_object_thaw(pd->obj);
168 179
169 priv = efl_data_scope_get(pack, EVAS_BOX_CLASS); 180 priv = efl_data_scope_get(pack, EVAS_BOX_CLASS);
170 opt = eina_list_nth(priv->children, index); 181 opt = eina_list_nth(priv->children, index);
@@ -176,7 +187,10 @@ EOLIAN static Efl_Gfx_Entity *
176_efl_ui_layout_part_box_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Layout_Box_Data *pd, int index) 187_efl_ui_layout_part_box_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Layout_Box_Data *pd, int index)
177{ 188{
178 Efl_Gfx_Entity *subobj; 189 Efl_Gfx_Entity *subobj;
190
191 edje_object_freeze(pd->obj);
179 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 192 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
193 edje_object_thaw(pd->obj);
180 194
181 subobj = efl_pack_content_get(pack, index); 195 subobj = efl_pack_content_get(pack, index);
182 if (!subobj) return NULL; 196 if (!subobj) return NULL;
@@ -190,7 +204,9 @@ _efl_ui_layout_part_box_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Layout_Bo
190EOLIAN static int 204EOLIAN static int
191_efl_ui_layout_part_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, const Efl_Gfx_Entity *subobj) 205_efl_ui_layout_part_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, const Efl_Gfx_Entity *subobj)
192{ 206{
207 edje_object_freeze(pd->obj);
193 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 208 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
209 edje_object_thaw(pd->obj);
194 return efl_pack_index_get(pack, subobj); 210 return efl_pack_index_get(pack, subobj);
195} 211}
196 212
@@ -227,7 +243,10 @@ EOLIAN static Eina_Iterator *
227_efl_ui_layout_part_table_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Table_Data *pd) 243_efl_ui_layout_part_table_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Table_Data *pd)
228{ 244{
229 Eina_Iterator *it; 245 Eina_Iterator *it;
246
247 edje_object_freeze(pd->obj);
230 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 248 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
249 edje_object_thaw(pd->obj);
231 250
232 it = evas_object_table_iterator_new(pack); 251 it = evas_object_table_iterator_new(pack);
233 252
@@ -237,7 +256,9 @@ _efl_ui_layout_part_table_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_T
237EOLIAN static int 256EOLIAN static int
238_efl_ui_layout_part_table_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) 257_efl_ui_layout_part_table_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
239{ 258{
259 edje_object_freeze(pd->obj);
240 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 260 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
261 edje_object_thaw(pd->obj);
241 return evas_obj_table_count(pack); 262 return evas_obj_table_count(pack);
242} 263}
243 264
@@ -276,7 +297,9 @@ _efl_ui_layout_part_table_efl_pack_table_pack_table(Eo *obj EINA_UNUSED, Efl_Ui_
276EOLIAN static Efl_Gfx_Entity * 297EOLIAN static Efl_Gfx_Entity *
277_efl_ui_layout_part_table_efl_pack_table_table_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row) 298_efl_ui_layout_part_table_efl_pack_table_table_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row)
278{ 299{
300 edje_object_freeze(pd->obj);
279 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 301 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
302 edje_object_thaw(pd->obj);
280 return evas_object_table_child_get(pack, col, row); 303 return evas_object_table_child_get(pack, col, row);
281} 304}
282 305
@@ -289,7 +312,10 @@ _efl_ui_layout_part_table_efl_pack_table_table_contents_get(Eo *obj EINA_UNUSED,
289 Eina_List *list, *l = NULL; 312 Eina_List *list, *l = NULL;
290 Evas_Object *sobj; 313 Evas_Object *sobj;
291 unsigned short c, r, cs, rs; 314 unsigned short c, r, cs, rs;
315
316 edje_object_freeze(pd->obj);
292 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 317 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
318 edje_object_thaw(pd->obj);
293 319
294 list = evas_object_table_children_get(pack); 320 list = evas_object_table_children_get(pack);
295 EINA_LIST_FREE(list, sobj) 321 EINA_LIST_FREE(list, sobj)
@@ -314,7 +340,10 @@ _efl_ui_layout_part_table_efl_pack_table_table_position_get(const Eo *obj EINA_U
314{ 340{
315 unsigned short c, r, cs, rs; 341 unsigned short c, r, cs, rs;
316 Eina_Bool ret; 342 Eina_Bool ret;
343
344 edje_object_freeze(pd->obj);
317 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 345 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
346 edje_object_thaw(pd->obj);
318 347
319 ret = evas_object_table_pack_get(pack, subobj, &c, &r, &cs, &rs); 348 ret = evas_object_table_pack_get(pack, subobj, &c, &r, &cs, &rs);
320 if (col) *col = c; 349 if (col) *col = c;
@@ -328,7 +357,9 @@ _efl_ui_layout_part_table_efl_pack_table_table_position_get(const Eo *obj EINA_U
328EOLIAN static void 357EOLIAN static void
329_efl_ui_layout_part_table_efl_pack_table_table_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int *cols, int *rows) 358_efl_ui_layout_part_table_efl_pack_table_table_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int *cols, int *rows)
330{ 359{
360 edje_object_freeze(pd->obj);
331 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 361 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
362 edje_object_thaw(pd->obj);
332 evas_object_table_col_row_size_get(pack, cols, rows); 363 evas_object_table_col_row_size_get(pack, cols, rows);
333} 364}
334 365
@@ -336,7 +367,10 @@ EOLIAN static int
336_efl_ui_layout_part_table_efl_pack_table_table_columns_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) 367_efl_ui_layout_part_table_efl_pack_table_table_columns_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
337{ 368{
338 int cols, rows; 369 int cols, rows;
370
371 edje_object_freeze(pd->obj);
339 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 372 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
373 edje_object_thaw(pd->obj);
340 evas_object_table_col_row_size_get(pack, &cols, &rows); 374 evas_object_table_col_row_size_get(pack, &cols, &rows);
341 return cols; 375 return cols;
342} 376}
@@ -345,7 +379,10 @@ EOLIAN static int
345_efl_ui_layout_part_table_efl_pack_table_table_rows_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) 379_efl_ui_layout_part_table_efl_pack_table_table_rows_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
346{ 380{
347 int cols, rows; 381 int cols, rows;
382
383 edje_object_freeze(pd->obj);
348 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 384 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
385 edje_object_thaw(pd->obj);
349 evas_object_table_col_row_size_get(pack, &cols, &rows); 386 evas_object_table_col_row_size_get(pack, &cols, &rows);
350 return rows; 387 return rows;
351} 388}