summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_box.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_object_box.c')
-rw-r--r--src/lib/evas/canvas/evas_object_box.c61
1 files changed, 30 insertions, 31 deletions
diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c
index 3b664c1..55e7ca5 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -125,7 +125,7 @@ _on_child_del(void *data, const Eo_Event *event)
125 Evas_Object *box = data; 125 Evas_Object *box = data;
126 126
127 Evas_Object *ret = NULL; 127 Evas_Object *ret = NULL;
128 eo_do(box, ret = evas_obj_box_internal_remove(event->obj)); 128 ret = evas_obj_box_internal_remove(box, event->obj);
129 if (!ret) 129 if (!ret)
130 ERR("child removal failed"); 130 ERR("child removal failed");
131 evas_object_smart_changed(box); 131 evas_object_smart_changed(box);
@@ -157,7 +157,7 @@ _evas_object_box_option_new(Evas_Object *o, Evas_Object_Box_Data *priv EINA_UNUS
157{ 157{
158 Evas_Object_Box_Option *opt = NULL; 158 Evas_Object_Box_Option *opt = NULL;
159 159
160 eo_do(o, opt = evas_obj_box_internal_option_new(child)); 160 opt = evas_obj_box_internal_option_new(o, child);
161 if (!opt) 161 if (!opt)
162 { 162 {
163 ERR("option_new failed"); 163 ERR("option_new failed");
@@ -177,7 +177,7 @@ static const Eo_Callback_Array_Item evas_object_box_callbacks[] = {
177static void 177static void
178_evas_object_box_child_callbacks_unregister(Evas_Object *obj, Evas_Object *parent) 178_evas_object_box_child_callbacks_unregister(Evas_Object *obj, Evas_Object *parent)
179{ 179{
180 eo_do(obj, eo_event_callback_array_del(evas_object_box_callbacks, parent)); 180 eo_event_callback_array_del(obj, evas_object_box_callbacks, parent);
181} 181}
182 182
183static Evas_Object_Box_Option * 183static Evas_Object_Box_Option *
@@ -185,7 +185,7 @@ _evas_object_box_option_callbacks_register(Evas_Object *o, Evas_Object_Box_Data
185{ 185{
186 Evas_Object *obj = opt->obj; 186 Evas_Object *obj = opt->obj;
187 187
188 eo_do(obj, eo_event_callback_array_add(evas_object_box_callbacks, o)); 188 eo_event_callback_array_add(obj, evas_object_box_callbacks, o);
189 189
190 return opt; 190 return opt;
191} 191}
@@ -221,7 +221,7 @@ _evas_box_internal_append(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child)
221 221
222 priv->children = eina_list_append(priv->children, opt); 222 priv->children = eina_list_append(priv->children, opt);
223 priv->children_changed = EINA_TRUE; 223 priv->children_changed = EINA_TRUE;
224 eo_do(o, eo_event_callback_call(EVAS_BOX_EVENT_CHILD_ADDED, opt)); 224 eo_event_callback_call(o, EVAS_BOX_EVENT_CHILD_ADDED, opt);
225 225
226 return opt; 226 return opt;
227} 227}
@@ -237,7 +237,7 @@ _evas_box_internal_prepend(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child
237 237
238 priv->children = eina_list_prepend(priv->children, opt); 238 priv->children = eina_list_prepend(priv->children, opt);
239 priv->children_changed = EINA_TRUE; 239 priv->children_changed = EINA_TRUE;
240 eo_do(o, eo_event_callback_call(EVAS_BOX_EVENT_CHILD_ADDED, opt)); 240 eo_event_callback_call(o, EVAS_BOX_EVENT_CHILD_ADDED, opt);
241 241
242 return opt; 242 return opt;
243} 243}
@@ -261,7 +261,7 @@ _evas_box_internal_insert_before(Eo *o, Evas_Object_Box_Data *priv, Evas_Object
261 priv->children = eina_list_prepend_relative 261 priv->children = eina_list_prepend_relative
262 (priv->children, new_opt, opt); 262 (priv->children, new_opt, opt);
263 priv->children_changed = EINA_TRUE; 263 priv->children_changed = EINA_TRUE;
264 eo_do(o, eo_event_callback_call(EVAS_BOX_EVENT_CHILD_ADDED, new_opt)); 264 eo_event_callback_call(o, EVAS_BOX_EVENT_CHILD_ADDED, new_opt);
265 return new_opt; 265 return new_opt;
266 } 266 }
267 } 267 }
@@ -288,7 +288,7 @@ _evas_box_internal_insert_after(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *
288 priv->children = eina_list_append_relative 288 priv->children = eina_list_append_relative
289 (priv->children, new_opt, opt); 289 (priv->children, new_opt, opt);
290 priv->children_changed = EINA_TRUE; 290 priv->children_changed = EINA_TRUE;
291 eo_do(o, eo_event_callback_call(EVAS_BOX_EVENT_CHILD_ADDED, new_opt)); 291 eo_event_callback_call(o, EVAS_BOX_EVENT_CHILD_ADDED, new_opt);
292 return new_opt; 292 return new_opt;
293 } 293 }
294 } 294 }
@@ -311,7 +311,7 @@ _evas_box_internal_insert_at(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *chi
311 311
312 priv->children = eina_list_prepend(priv->children, new_opt); 312 priv->children = eina_list_prepend(priv->children, new_opt);
313 priv->children_changed = EINA_TRUE; 313 priv->children_changed = EINA_TRUE;
314 eo_do(o, eo_event_callback_call(EVAS_BOX_EVENT_CHILD_ADDED, new_opt)); 314 eo_event_callback_call(o, EVAS_BOX_EVENT_CHILD_ADDED, new_opt);
315 return new_opt; 315 return new_opt;
316 } 316 }
317 317
@@ -330,7 +330,7 @@ _evas_box_internal_insert_at(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *chi
330 priv->children = eina_list_prepend_relative 330 priv->children = eina_list_prepend_relative
331 (priv->children, new_opt, opt); 331 (priv->children, new_opt, opt);
332 priv->children_changed = EINA_TRUE; 332 priv->children_changed = EINA_TRUE;
333 eo_do(o, eo_event_callback_call(EVAS_BOX_EVENT_CHILD_ADDED, new_opt)); 333 eo_event_callback_call(o, EVAS_BOX_EVENT_CHILD_ADDED, new_opt);
334 return new_opt; 334 return new_opt;
335 } 335 }
336 } 336 }
@@ -350,9 +350,9 @@ _evas_box_internal_remove(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child)
350 if (obj == child) 350 if (obj == child)
351 { 351 {
352 priv->children = eina_list_remove(priv->children, opt); 352 priv->children = eina_list_remove(priv->children, opt);
353 eo_do(o, evas_obj_box_internal_option_free(opt)); 353 evas_obj_box_internal_option_free(o, opt);
354 priv->children_changed = EINA_TRUE; 354 priv->children_changed = EINA_TRUE;
355 eo_do(o, eo_event_callback_call(EVAS_BOX_EVENT_CHILD_REMOVED, obj)); 355 eo_event_callback_call(o, EVAS_BOX_EVENT_CHILD_REMOVED, obj);
356 356
357 return obj; 357 return obj;
358 } 358 }
@@ -378,16 +378,16 @@ _evas_box_internal_remove_at(Eo *o, Evas_Object_Box_Data *priv, unsigned int pos
378 obj = opt->obj; 378 obj = opt->obj;
379 379
380 priv->children = eina_list_remove_list(priv->children, node); 380 priv->children = eina_list_remove_list(priv->children, node);
381 eo_do(o, evas_obj_box_internal_option_free(opt)); 381 evas_obj_box_internal_option_free(o, opt);
382 priv->children_changed = EINA_TRUE; 382 priv->children_changed = EINA_TRUE;
383 eo_do(o, eo_event_callback_call(EVAS_BOX_EVENT_CHILD_REMOVED, obj)); 383 eo_event_callback_call(o, EVAS_BOX_EVENT_CHILD_REMOVED, obj);
384 return obj; 384 return obj;
385} 385}
386 386
387EOLIAN static void 387EOLIAN static void
388_evas_box_evas_object_smart_add(Eo *o, Evas_Object_Box_Data *priv) 388_evas_box_evas_object_smart_add(Eo *o, Evas_Object_Box_Data *priv)
389{ 389{
390 eo_do_super(o, MY_CLASS, evas_obj_smart_add()); 390 evas_obj_smart_add(eo_super(o, MY_CLASS));
391 391
392 evas_object_event_callback_add 392 evas_object_event_callback_add
393 (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, o); 393 (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, o);
@@ -412,14 +412,14 @@ _evas_box_evas_object_smart_del(Eo *o, Evas_Object_Box_Data *priv)
412 Evas_Object_Box_Option *opt = l->data; 412 Evas_Object_Box_Option *opt = l->data;
413 413
414 _evas_object_box_child_callbacks_unregister(opt->obj, o); 414 _evas_object_box_child_callbacks_unregister(opt->obj, o);
415 eo_do(o, evas_obj_box_internal_option_free(opt)); 415 evas_obj_box_internal_option_free(o, opt);
416 l = eina_list_remove_list(l, l); 416 l = eina_list_remove_list(l, l);
417 } 417 }
418 418
419 if (priv->layout.data && priv->layout.free_data) 419 if (priv->layout.data && priv->layout.free_data)
420 priv->layout.free_data(priv->layout.data); 420 priv->layout.free_data(priv->layout.data);
421 421
422 eo_do_super(o, MY_CLASS, evas_obj_smart_del()); 422 evas_obj_smart_del(eo_super(o, MY_CLASS));
423} 423}
424 424
425EOLIAN static void 425EOLIAN static void
@@ -465,10 +465,9 @@ evas_object_box_add(Evas *evas)
465EOLIAN static Eo * 465EOLIAN static Eo *
466_evas_box_eo_base_constructor(Eo *obj, Evas_Object_Box_Data *class_data EINA_UNUSED) 466_evas_box_eo_base_constructor(Eo *obj, Evas_Object_Box_Data *class_data EINA_UNUSED)
467{ 467{
468 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 468 obj = eo_constructor(eo_super(obj, MY_CLASS));
469 eo_do(obj, 469 evas_obj_smart_callbacks_descriptions_set(obj, _signals);
470 evas_obj_smart_callbacks_descriptions_set(_signals), 470 evas_obj_type_set(obj, MY_CLASS_NAME_LEGACY);
471 evas_obj_type_set(MY_CLASS_NAME_LEGACY));
472 471
473 return obj; 472 return obj;
474} 473}
@@ -1696,7 +1695,7 @@ _evas_box_append(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child)
1696 if (!child || (evas_object_smart_parent_get(child) == o)) 1695 if (!child || (evas_object_smart_parent_get(child) == o))
1697 return NULL; 1696 return NULL;
1698 1697
1699 eo_do(o, opt = evas_obj_box_internal_append(child)); 1698 opt = evas_obj_box_internal_append(o, child);
1700 1699
1701 if (opt) 1700 if (opt)
1702 { 1701 {
@@ -1715,7 +1714,7 @@ _evas_box_prepend(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child)
1715 if (!child) 1714 if (!child)
1716 return NULL; 1715 return NULL;
1717 1716
1718 eo_do(o, opt = evas_obj_box_internal_prepend(child)); 1717 opt = evas_obj_box_internal_prepend(o, child);
1719 1718
1720 if (opt) 1719 if (opt)
1721 { 1720 {
@@ -1733,7 +1732,7 @@ _evas_box_insert_before(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, c
1733 if (!child) 1732 if (!child)
1734 return NULL; 1733 return NULL;
1735 1734
1736 eo_do(o, opt = evas_obj_box_internal_insert_before(child, reference)); 1735 opt = evas_obj_box_internal_insert_before(o, child, reference);
1737 1736
1738 if (opt) 1737 if (opt)
1739 { 1738 {
@@ -1752,7 +1751,7 @@ _evas_box_insert_after(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, co
1752 if (!child) 1751 if (!child)
1753 return NULL; 1752 return NULL;
1754 1753
1755 eo_do(o, opt = evas_obj_box_internal_insert_after(child, reference)); 1754 opt = evas_obj_box_internal_insert_after(o, child, reference);
1756 1755
1757 if (opt) 1756 if (opt)
1758 { 1757 {
@@ -1771,7 +1770,7 @@ _evas_box_insert_at(Eo *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsig
1771 if (!child) 1770 if (!child)
1772 return NULL; 1771 return NULL;
1773 1772
1774 eo_do(o, opt = evas_obj_box_internal_insert_at(child, pos)); 1773 opt = evas_obj_box_internal_insert_at(o, child, pos);
1775 1774
1776 if (opt) 1775 if (opt)
1777 { 1776 {
@@ -1788,7 +1787,7 @@ _evas_box_remove(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Object *chil
1788{ 1787{
1789 Evas_Object *obj = NULL; 1788 Evas_Object *obj = NULL;
1790 1789
1791 eo_do(o, obj = evas_obj_box_internal_remove(child)); 1790 obj = evas_obj_box_internal_remove(o, child);
1792 1791
1793 if (obj) 1792 if (obj)
1794 { 1793 {
@@ -1806,7 +1805,7 @@ _evas_box_remove_at(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, unsigned int p
1806{ 1805{
1807 Evas_Object *obj = NULL; 1806 Evas_Object *obj = NULL;
1808 1807
1809 eo_do(o, obj = evas_obj_box_internal_remove_at(pos)); 1808 obj = evas_obj_box_internal_remove_at(o, pos);
1810 1809
1811 if (obj) 1810 if (obj)
1812 { 1811 {
@@ -1829,7 +1828,7 @@ _evas_box_remove_all(Eo *o, Evas_Object_Box_Data *priv, Eina_Bool clear)
1829 Evas_Object_Box_Option *opt = priv->children->data; 1828 Evas_Object_Box_Option *opt = priv->children->data;
1830 Evas_Object *obj = NULL; 1829 Evas_Object *obj = NULL;
1831 1830
1832 eo_do(o, obj = evas_obj_box_internal_remove(opt->obj)); 1831 obj = evas_obj_box_internal_remove(o, opt->obj);
1833 if (obj) 1832 if (obj)
1834 { 1833 {
1835 _evas_object_box_child_callbacks_unregister(obj, o); 1834 _evas_object_box_child_callbacks_unregister(obj, o);
@@ -1931,7 +1930,7 @@ EAPI Eina_Bool
1931evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) 1930evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args)
1932{ 1931{
1933 Eina_Bool ret = EINA_FALSE; 1932 Eina_Bool ret = EINA_FALSE;
1934 eo_do(o, ret = evas_obj_box_option_property_vset(opt, property, (va_list *) &args)); 1933 ret = evas_obj_box_option_property_vset(o, opt, property, (va_list *) &args);
1935 return ret; 1934 return ret;
1936} 1935}
1937 1936
@@ -1958,7 +1957,7 @@ EAPI Eina_Bool
1958evas_object_box_option_property_vget(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) 1957evas_object_box_option_property_vget(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args)
1959{ 1958{
1960 Eina_Bool ret = EINA_FALSE; 1959 Eina_Bool ret = EINA_FALSE;
1961 eo_do((Eo *)o, ret = evas_obj_box_option_property_vget(opt, property, (va_list *) &args)); 1960 ret = evas_obj_box_option_property_vget((Eo *)o, opt, property, (va_list *) &args);
1962 return ret; 1961 return ret;
1963} 1962}
1964 1963