Eobj: Make eobj_event_callback_add a macro.

Thanks to raster for the tip.

SVN revision: 70193
This commit is contained in:
Tom Hacohen 2012-04-15 08:57:20 +00:00
parent f4ad42ffda
commit 36374f49a7
2 changed files with 3 additions and 11 deletions

View File

@ -150,7 +150,9 @@ EAPI Eina_Bool eobj_event_callback_forwarder_add(Eobj *obj, const Eobj_Event_Des
EAPI Eina_Bool eobj_event_callback_forwarder_del(Eobj *obj, const Eobj_Event_Description *desc, Eobj *new_obj);
/* callbacks of the same priority are called in reverse order of creation. */
EAPI Eina_Bool eobj_event_callback_add(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Event_Cb cb, const void *data);
#define eobj_event_callback_add(obj, desc, cb, data) \
eobj_event_callback_priority_add(obj, desc, \
EOBJ_CALLBACK_PRIORITY_DEFAULT, cb, data)
EAPI Eina_Bool eobj_event_callback_priority_add(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Callback_Priority priority, Eobj_Event_Cb cb, const void *data);
EAPI void *eobj_event_callback_del(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Event_Cb func);
EAPI void *eobj_event_callback_del_full(Eobj *obj, const Eobj_Event_Description *desc, Eobj_Event_Cb func, const void *user_data);

View File

@ -1120,16 +1120,6 @@ _callback_priority_cmp(const void *_a, const void *_b)
return 1;
}
EAPI Eina_Bool
eobj_event_callback_add(Eobj *obj,
const Eobj_Event_Description *desc,
Eobj_Event_Cb cb,
const void *data)
{
return eobj_event_callback_priority_add(obj, desc,
EOBJ_CALLBACK_PRIORITY_DEFAULT, cb, data);
}
EAPI Eina_Bool
eobj_event_callback_priority_add(Eobj *obj,
const Eobj_Event_Description *desc,