forked from enlightenment/efl
Eo: Move generation of Eo_Event_Cb to Eolian.
This fixes the type redefinition warning (apparently it's C11). Thanks to bu5hm4n for reporting this.
This commit is contained in:
parent
22875f066c
commit
da37a41fd1
|
@ -153,19 +153,6 @@ enum _Eo_Op_Type
|
||||||
*/
|
*/
|
||||||
typedef enum _Eo_Op_Type 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
|
* @typedef Eo_Del_Intercept
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
import eina_types;
|
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 {
|
struct Eo.Event_Description {
|
||||||
[[This struct holds the description of a specific event.]]
|
[[This struct holds the description of a specific event.]]
|
||||||
name: const(char) *; [[name of the 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.]]
|
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 {
|
struct Eo.Callback_Array_Item {
|
||||||
[[An item in an array of callback desc/func.
|
[[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
|
\@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 ()
|
abstract Eo.Base ()
|
||||||
{
|
{
|
||||||
eo_prefix: eo;
|
eo_prefix: eo;
|
||||||
|
|
Loading…
Reference in New Issue