summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_smart.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_object_smart.c')
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index b3da505..44c18f1 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -204,7 +204,7 @@ evas_object_smart_member_add(Evas_Object *eo_obj, Evas_Object *smart_obj)
204 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); 204 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
205 return; 205 return;
206 MAGIC_CHECK_END(); 206 MAGIC_CHECK_END();
207 eo_do(smart_obj, evas_obj_smart_member_add(eo_obj)); 207 evas_obj_smart_member_add(smart_obj, eo_obj);
208} 208}
209 209
210EOLIAN static void 210EOLIAN static void
@@ -293,7 +293,7 @@ evas_object_smart_member_del(Evas_Object *eo_obj)
293 if (!obj->smart.parent) return; 293 if (!obj->smart.parent) return;
294 Evas_Object *smart_obj = obj->smart.parent; 294 Evas_Object *smart_obj = obj->smart.parent;
295 295
296 eo_do(smart_obj, evas_obj_smart_member_del(eo_obj)); 296 evas_obj_smart_member_del(smart_obj, eo_obj);
297} 297}
298 298
299EOLIAN static void 299EOLIAN static void
@@ -571,7 +571,7 @@ evas_object_smart_add(Evas *eo_e, Evas_Smart *s)
571 return NULL; 571 return NULL;
572 MAGIC_CHECK_END(); 572 MAGIC_CHECK_END();
573 eo_obj = eo_add(EVAS_OBJECT_SMART_CLASS, eo_e); 573 eo_obj = eo_add(EVAS_OBJECT_SMART_CLASS, eo_e);
574 eo_do(eo_obj, evas_obj_smart_attach(s)); 574 evas_obj_smart_attach(eo_obj, s);
575 return eo_obj; 575 return eo_obj;
576} 576}
577 577
@@ -584,12 +584,11 @@ _evas_object_smart_eo_base_constructor(Eo *eo_obj, Evas_Smart_Data *class_data E
584 smart->object = eo_obj; 584 smart->object = eo_obj;
585 smart->inherit_paragraph_direction = EINA_TRUE; 585 smart->inherit_paragraph_direction = EINA_TRUE;
586 586
587 eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor()); 587 eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
588 evas_object_smart_init(eo_obj); 588 evas_object_smart_init(eo_obj);
589 589
590 eo_do(eo_obj, 590 evas_obj_type_set(eo_obj, MY_CLASS_NAME_LEGACY);
591 evas_obj_type_set(MY_CLASS_NAME_LEGACY), 591 evas_obj_smart_add(eo_obj);
592 evas_obj_smart_add());
593 592
594 return eo_obj; 593 return eo_obj;
595} 594}
@@ -709,7 +708,7 @@ _evas_object_smart_attach(Eo *eo_obj, Evas_Smart_Data *_pd EINA_UNUSED, Evas_Sma
709 } 708 }
710 } 709 }
711 710
712 eo_do(eo_obj, evas_obj_smart_add()); 711 evas_obj_smart_add(eo_obj);
713} 712}
714 713
715EAPI void 714EAPI void
@@ -741,7 +740,7 @@ evas_object_smart_callback_priority_add(Evas_Object *eo_obj, const char *event,
741 o->callbacks = eina_inlist_append(o->callbacks, 740 o->callbacks = eina_inlist_append(o->callbacks,
742 EINA_INLIST_GET(cb_info)); 741 EINA_INLIST_GET(cb_info));
743 742
744 eo_do(eo_obj, eo_event_callback_priority_add(eo_desc, priority, _eo_evas_smart_cb, cb_info)); 743 eo_event_callback_priority_add(eo_obj, eo_desc, priority, _eo_evas_smart_cb, cb_info);
745} 744}
746 745
747EAPI void * 746EAPI void *
@@ -764,8 +763,7 @@ evas_object_smart_callback_del(Evas_Object *eo_obj, const char *event, Evas_Smar
764 if ((info->func == func) && (info->event == eo_desc)) 763 if ((info->func == func) && (info->event == eo_desc))
765 { 764 {
766 void *tmp = info->data; 765 void *tmp = info->data;
767 eo_do(eo_obj, eo_event_callback_del( 766 eo_event_callback_del(eo_obj, eo_desc, _eo_evas_smart_cb, info);
768 eo_desc, _eo_evas_smart_cb, info));
769 767
770 o->callbacks = 768 o->callbacks =
771 eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info)); 769 eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info));
@@ -796,8 +794,7 @@ evas_object_smart_callback_del_full(Evas_Object *eo_obj, const char *event, Evas
796 if ((info->func == func) && (info->event == eo_desc) && (info->data == data)) 794 if ((info->func == func) && (info->event == eo_desc) && (info->data == data))
797 { 795 {
798 void *tmp = info->data; 796 void *tmp = info->data;
799 eo_do(eo_obj, eo_event_callback_del( 797 eo_event_callback_del(eo_obj, eo_desc, _eo_evas_smart_cb, info);
800 eo_desc, _eo_evas_smart_cb, info));
801 798
802 o->callbacks = 799 o->callbacks =
803 eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info)); 800 eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info));
@@ -817,7 +814,7 @@ evas_object_smart_callback_call(Evas_Object *eo_obj, const char *event, void *ev
817 814
818 if (!event) return; 815 if (!event) return;
819 const Eo_Event_Description *eo_desc = eo_base_legacy_only_event_description_get(event); 816 const Eo_Event_Description *eo_desc = eo_base_legacy_only_event_description_get(event);
820 eo_do(eo_obj, eo_event_callback_call(eo_desc, event_info)); 817 eo_event_callback_call(eo_obj, eo_desc, event_info);
821} 818}
822 819
823EOLIAN static Eina_Bool 820EOLIAN static Eina_Bool
@@ -980,7 +977,7 @@ evas_call_smarts_calculate(Evas *eo_e)
980 if (obj->smart.smart && obj->smart.smart->smart_class->calculate) 977 if (obj->smart.smart && obj->smart.smart->smart_class->calculate)
981 obj->smart.smart->smart_class->calculate(obj->object); 978 obj->smart.smart->smart_class->calculate(obj->object);
982 else 979 else
983 eo_do(obj->object, evas_obj_smart_calculate()); 980 evas_obj_smart_calculate(obj->object);
984 } 981 }
985 } 982 }
986 983
@@ -1003,7 +1000,7 @@ _evas_object_smart_changed(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED)
1003 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); 1000 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
1004 evas_object_async_block(obj); 1001 evas_object_async_block(obj);
1005 evas_object_change(eo_obj, obj); 1002 evas_object_change(eo_obj, obj);
1006 eo_do(eo_obj, evas_obj_smart_need_recalculate_set(1)); 1003 evas_obj_smart_need_recalculate_set(eo_obj, 1);
1007} 1004}
1008 1005
1009Eina_Bool 1006Eina_Bool
@@ -1049,7 +1046,7 @@ evas_object_smart_del(Evas_Object *eo_obj)
1049 if (s && s->smart_class->del) 1046 if (s && s->smart_class->del)
1050 s->smart_class->del(eo_obj); 1047 s->smart_class->del(eo_obj);
1051 else 1048 else
1052 eo_do(eo_obj, evas_obj_smart_del()); 1049 evas_obj_smart_del(eo_obj);
1053 if (obj->smart.parent) evas_object_smart_member_del(eo_obj); 1050 if (obj->smart.parent) evas_object_smart_member_del(eo_obj);
1054 1051
1055 if (s) 1052 if (s)
@@ -1243,14 +1240,13 @@ evas_object_smart_cleanup(Evas_Object *eo_obj)
1243 while (o->callbacks) 1240 while (o->callbacks)
1244 { 1241 {
1245 _eo_evas_smart_cb_info *info = (_eo_evas_smart_cb_info *)o->callbacks; 1242 _eo_evas_smart_cb_info *info = (_eo_evas_smart_cb_info *)o->callbacks;
1246 eo_do(eo_obj, eo_event_callback_del( 1243 eo_event_callback_del(eo_obj, info->event, _eo_evas_smart_cb, info);
1247 info->event, _eo_evas_smart_cb, info));
1248 o->callbacks = eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info)); 1244 o->callbacks = eina_inlist_remove(o->callbacks, EINA_INLIST_GET(info));
1249 free(info); 1245 free(info);
1250 } 1246 }
1251 1247
1252 evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0); 1248 evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
1253 eo_do(eo_obj, evas_obj_smart_data_set(NULL)); 1249 evas_obj_smart_data_set(eo_obj, NULL);
1254 } 1250 }
1255 1251
1256 obj->smart.parent = NULL; 1252 obj->smart.parent = NULL;