From: Gustavo Lima Chaves Date: Tue, 17 Jul 2012 14:50:25 +0000 (+0000) Subject: [evas] Interfaces improvement. X-Git-Tag: submit/devel/efl/20131022.203902~4905 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb2a822637c26302e5aefd59ec3574a113fe91b1;p=platform%2Fupstream%2Fefl.git [evas] Interfaces improvement. iface add() before smart add() is better. SVN revision: 73991 --- diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h index f159fd2..4dda353 100644 --- a/legacy/evas/src/lib/Evas.h +++ b/legacy/evas/src/lib/Evas.h @@ -9675,8 +9675,8 @@ struct _Evas_Smart_Interface { const char *name; /**< Name of the given interface */ unsigned private_size; /**< Size, in bytes, of the interface's private dada blob. This will be allocated and freed automatically for you. Get it with evas_object_smart_interface_data_get(). */ - Eina_Bool (*add)(Evas_Object *obj); /**< Function to be called at object creation time */ - void (*del)(Evas_Object *obj); /**< Function to be called at object deletion time */ + Eina_Bool (*add)(Evas_Object *obj); /**< Function to be called at object creation time. This will take place @b before the object's smart @c add() function. */ + void (*del)(Evas_Object *obj); /**< Function to be called at object deletion time. This will take place @b after the object's smart @c del() function. */ }; /** diff --git a/legacy/evas/src/lib/canvas/evas_object_smart.c b/legacy/evas/src/lib/canvas/evas_object_smart.c index 82f0368..3db0c4c 100644 --- a/legacy/evas/src/lib/canvas/evas_object_smart.c +++ b/legacy/evas/src/lib/canvas/evas_object_smart.c @@ -448,8 +448,6 @@ evas_object_smart_add(Evas *e, Evas_Smart *s) _evas_smart_class_ifaces_private_data_alloc(obj, s); - if (s->smart_class->add) s->smart_class->add(obj); - for (i = 0; i < s->interfaces.size; i++) { const Evas_Smart_Interface *iface; @@ -466,6 +464,8 @@ evas_object_smart_add(Evas *e, Evas_Smart *s) } } + if (s->smart_class->add) s->smart_class->add(obj); + return obj; }