efl_event_callback_array_priority_add(obj, array, \
EFL_CALLBACK_PRIORITY_DEFAULT, data)
+
+/**
+ * @def efl_event_callback_forwarder_add(obj, desc, new_obj)
+ * @brief Add an event callback forwarder for an event and an object.
+ *
+ * @param[in] obj The object.
+ * @param[in] desc The description of the event to listen to
+ * @param[in] new_obj The object to emit events from
+ *
+ * @ingroup Efl_Object
+ */
+#define efl_event_callback_forwarder_add(obj, desc, new_obj) efl_event_callback_forwarder_priority_add(obj, desc, EFL_CALLBACK_PRIORITY_DEFAULT, new_obj)
+
/**
* @def Replace the previous Eo pointer with new content.
*
under certain conditions to block a certain event.
]]
}
- event_callback_forwarder_add {
+ event_callback_forwarder_priority_add {
[[Add an event callback forwarder for an event and an object.]]
params {
@cref desc: Efl.Event_Description; [[The description of the event to listen to]]
- @in new_obj: Efl.Object; [[The object to emit events from]]
+ @in priority: short; [[The priority at which to insert the callback handler.]]
+ @in new_obj: Efl.Object @nonull; [[The object to emit events from]]
}
}
event_callback_forwarder_del {
[[Remove an event callback forwarder for an event and an object.]]
params {
@cref desc: Efl.Event_Description; [[The description of the event to listen to]]
- @in new_obj: Efl.Object; [[The object to emit events from]]
+ @in new_obj: Efl.Object @nonull; [[The object to emit events from]]
}
}
children_iterator_new {
}
}
-/* FIXME: Change default priority? Maybe call later? */
EOLIAN static void
-_efl_object_event_callback_forwarder_add(Eo *obj, Efl_Object_Data *pd EINA_UNUSED,
- const Efl_Event_Description *desc,
- Eo *new_obj)
+_efl_object_event_callback_forwarder_priority_add(Eo *obj, Efl_Object_Data *pd EINA_UNUSED,
+ const Efl_Event_Description *desc,
+ short priority,
+ Eo *new_obj)
{
+ EO_OBJ_POINTER_RETURN(new_obj, new_data);
+ EO_OBJ_DONE(new_obj);
- /* FIXME: Add it EO_MAGIC_RETURN(new_obj, EO_EINA_MAGIC); */
-
- efl_event_callback_add(obj, desc, _efl_event_forwarder_callback, new_obj);
+ efl_event_callback_priority_add(obj, desc, priority, _efl_event_forwarder_callback, new_obj);
}
EOLIAN static void
_efl_object_event_callback_forwarder_del(Eo *obj, Efl_Object_Data *pd EINA_UNUSED,
- const Efl_Event_Description *desc,
- Eo *new_obj)
+ const Efl_Event_Description *desc,
+ Eo *new_obj)
{
-
- /* FIXME: Add it EO_MAGIC_RETURN(new_obj, EO_EINA_MAGIC); */
+ EO_OBJ_POINTER_RETURN(new_obj, new_data);
+ EO_OBJ_DONE(new_obj);
efl_event_callback_del(obj, desc, _efl_event_forwarder_callback, new_obj);
}