diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 387f187714..4ac541fa4b 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -153,19 +153,6 @@ enum _Eo_Op_Type */ typedef enum _Eo_Op_Type Eo_Op_Type; -/** This has to be duplicated here because Eolian doesn't support event callbacks. */ -typedef struct _Eo_Event Eo_Event; -/** - * @typedef Eo_Event_Cb - * - * An event callback prototype. - * - * @param data The user data registered with the callback. - * @param event the object's event structure and information. @see Eo_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, const Eo_Event *event); - /** * @typedef Eo_Del_Intercept * diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index 8a31a35233..aa952c0bbc 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -1,8 +1,5 @@ import eina_types; -/* Event callbacks are a special case and have to be external as eolian doesn't support function pointers. */ -type @extern Eo.Event_Cb: __builtin_event_cb; - struct Eo.Event_Description { [[This struct holds the description of a specific event.]] name: const(char) *; [[name of the event.]] @@ -10,6 +7,17 @@ struct Eo.Event_Description { legacy_is: bool; [[Internal use: if is a legacy event.]] } +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.]] +} + +type Eo.Event_Cb: __builtin_event_cb; [[An event callback prototype. + return $EO_CALLBACK_STOP to stop calling additional callbacks for the event, $EO_CALLBACK_CONTINUE to continue.]] + + struct Eo.Callback_Array_Item { [[An item in an array of callback desc/func. @@ -34,13 +42,6 @@ type Eo.Callback_Priority: short; [[Callback priority value. Range is -32k - 32k \@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;