typedef enum _Eo_Op_Type Eo_Op_Type;
/** XXX: Hack until fixed in Eolian */
-typedef struct _Eo_Event_Description Eo_Event_Description2;
+typedef struct _Eo_Event Eo_Event2;
/**
* @typedef Eo_Event_Cb
*
* @param event_info additional data passed with the event.
* @return #EO_CALLBACK_STOP to stop calling additional callbacks for the event, #EO_CALLBACK_CONTINUE to continue.
*/
-typedef Eina_Bool (*Eo_Event_Cb)(void *data, Eo *obj, const Eo_Event_Description2 *desc, void *event_info);
+typedef Eina_Bool (*Eo_Event_Cb)(void *data, const Eo_Event2 *event);
#include "eo_base.eo.h"
#define EO_CLASS EO_BASE_CLASS
\@ref EO_CALLBACK_PRIORITY_DEFAULT
]]
+struct Eo.Event {
+ [[Parameter passed in event callbacks holding extra event parameters]]
+ obj: Eo.Base *; [[The object the event was called on.]]
+ desc: const(Eo.Event_Description) *; [[The event description.]]
+ event_info: void *; [[Extra event information passed by the event caller.]]
+}
+
abstract Eo.Base ()
{
eo_prefix: eo;
{
Eina_Bool ret = EINA_TRUE;
Eo_Callback_Description *cb;
+ Eo_Event ev;
+ ev.obj = obj_id;
+ ev.desc = desc;
+ ev.event_info = event_info;
pd->walking_list++;
continue;
/* Abort callback calling if the func says so. */
- if (!it->func((void *) cb->func_data, obj_id, desc,
- (void *) event_info))
+ if (!it->func((void *) cb->func_data, &ev))
{
ret = EINA_FALSE;
goto end;
continue;
/* Abort callback calling if the func says so. */
- if (!cb->items.item.func((void *) cb->func_data, obj_id, desc,
- (void *) event_info))
+ if (!cb->items.item.func((void *) cb->func_data, &ev))
{
ret = EINA_FALSE;
goto end;
}
static Eina_Bool
-_eo_event_forwarder_callback(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
+_eo_event_forwarder_callback(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc, void *event_info)
{
- (void) obj;
Eo *new_obj = (Eo *) data;
Eina_Bool ret = EINA_FALSE;