forked from enlightenment/efl
Eo base: move type definitions into eo_base.eo.
This commit is contained in:
parent
cab1391471
commit
5b89cf1633
|
@ -112,18 +112,6 @@ typedef struct _Eo_Opaque Eo;
|
|||
*/
|
||||
typedef Eo Eo_Class;
|
||||
|
||||
/**
|
||||
* @typedef Eo_Callback_Priority
|
||||
*
|
||||
* Callback priority value. Range is -32k - 32k. The lower the number, the
|
||||
* higher the priority.
|
||||
*
|
||||
* @see EO_CALLBACK_PRIORITY_AFTER
|
||||
* @see EO_CALLBACK_PRIORITY_BEFORE
|
||||
* @see EO_CALLBACK_PRIORITY_DEFAULT
|
||||
*/
|
||||
typedef short Eo_Callback_Priority;
|
||||
|
||||
/**
|
||||
* @var _eo_class_creation_lock
|
||||
* This variable is used for locking purposes in the class_get function
|
||||
|
@ -153,33 +141,35 @@ enum _Eo_Op_Type
|
|||
*/
|
||||
typedef enum _Eo_Op_Type Eo_Op_Type;
|
||||
|
||||
/** XXX: Hack until fixed in Eolian */
|
||||
typedef struct _Eo_Event_Description Eo_Event_Description2;
|
||||
/**
|
||||
* @typedef Eo_Event_Cb
|
||||
*
|
||||
* An event callback prototype.
|
||||
*
|
||||
* @param data The user data registered with the callback.
|
||||
* @param obj The object which initiated the event.
|
||||
* @param desc The event's description.
|
||||
* @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);
|
||||
|
||||
#include "eo_base.eo.h"
|
||||
#define EO_CLASS EO_BASE_CLASS
|
||||
|
||||
/**
|
||||
* @addtogroup Eo_Debug_Information Eo's Debug information helper.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @struct _Eo_Dbg_Info
|
||||
* The structure for the debug info used by Eo.
|
||||
*/
|
||||
struct _Eo_Dbg_Info
|
||||
{
|
||||
Eina_Stringshare *name; /**< The name of the part (stringshare). */
|
||||
Eina_Value value; /**< The value. */
|
||||
};
|
||||
|
||||
/**
|
||||
* @var EO_DBG_INFO_TYPE
|
||||
* The Eina_Value_Type for the debug info.
|
||||
*/
|
||||
EAPI extern const Eina_Value_Type *EO_DBG_INFO_TYPE;
|
||||
|
||||
/**
|
||||
* @typedef Eo_Dbg_Info
|
||||
* A convenience typedef for #_Eo_Dbg_Info
|
||||
*/
|
||||
typedef struct _Eo_Dbg_Info Eo_Dbg_Info;
|
||||
|
||||
/**
|
||||
* Creates a list inside debug info list.
|
||||
* @param[in] list list where to append
|
||||
|
@ -247,24 +237,6 @@ typedef unsigned int Eo_Op;
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @struct _Eo_Event_Description
|
||||
* This struct holds the description of a specific event.
|
||||
*/
|
||||
struct _Eo_Event_Description
|
||||
{
|
||||
const char *name; /**< name of the event. */
|
||||
const char *doc; /**< Explanation about the event. */
|
||||
|
||||
Eina_Bool unfreezable; /**< Eina_True if the event cannot be frozen */
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef Eo_Event_Description
|
||||
* A convenience typedef for #_Eo_Event_Description
|
||||
*/
|
||||
typedef struct _Eo_Event_Description Eo_Event_Description;
|
||||
|
||||
/**
|
||||
* @def EO_EVENT_DESCRIPTION(name, doc)
|
||||
* An helper macro to help populating #Eo_Event_Description
|
||||
|
@ -983,36 +955,6 @@ EAPI const Eo_Event_Description *eo_base_legacy_only_event_description_get(const
|
|||
*/
|
||||
#define EO_CALLBACK_CONTINUE EINA_TRUE
|
||||
|
||||
/**
|
||||
* @typedef Eo_Event_Cb
|
||||
*
|
||||
* An event callback prototype.
|
||||
*
|
||||
* @param data The user data registered with the callback.
|
||||
* @param obj The object which initiated the event.
|
||||
* @param desc The event's description.
|
||||
* @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_Description *desc, void *event_info);
|
||||
|
||||
/**
|
||||
* @typedef Eo_Callback_Array_Item
|
||||
* A convenience typedef for #_Eo_Callback_Array_Item
|
||||
*/
|
||||
typedef struct _Eo_Callback_Array_Item Eo_Callback_Array_Item;
|
||||
|
||||
/**
|
||||
* @struct _Eo_Callback_Array_Item
|
||||
* An item in an array of callback desc/func.
|
||||
* @see eo_event_callback_array_add()
|
||||
*/
|
||||
struct _Eo_Callback_Array_Item
|
||||
{
|
||||
const Eo_Event_Description *desc; /**< The event description. */
|
||||
Eo_Event_Cb func; /**< The callback function. */
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper for creating global callback arrays.
|
||||
* The problem is on windows where you can't declare a static array with
|
||||
|
@ -1077,10 +1019,6 @@ struct _Eo_Callback_Array_Item
|
|||
* @}
|
||||
*/
|
||||
|
||||
#include "eo_base.eo.h"
|
||||
|
||||
#define EO_CLASS EO_BASE_CLASS
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -1,3 +1,41 @@
|
|||
/* XXX: Hack until Eolian is ready. */
|
||||
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. */
|
||||
doc: const(char) *; /*@< Explanation about the event. */
|
||||
unfreezable: bool; /*@< Eina_True if the event cannot be frozen */
|
||||
}
|
||||
|
||||
struct Eo.Callback_Array_Item {
|
||||
/*@
|
||||
* An item in an array of callback desc/func.
|
||||
* @see eo_event_callback_array_add()
|
||||
*/
|
||||
desc: const(Eo.Event_Description) *; /*@< The event description. */
|
||||
func: Eo.Event_Cb; /*@< The callback function. */
|
||||
}
|
||||
|
||||
struct Eo.Dbg_Info {
|
||||
/*@
|
||||
* The structure for the debug info used by Eo.
|
||||
*/
|
||||
name: Eina_Stringshare *; /*@< The name of the part (stringshare). */
|
||||
value: Eina_Value; /*@< The value. */
|
||||
}
|
||||
|
||||
|
||||
type Eo.Callback_Priority: short; /*@ * Callback priority value. Range is -32k - 32k.
|
||||
*The lower the number, the higher the priority.
|
||||
*
|
||||
* @see EO_CALLBACK_PRIORITY_AFTER
|
||||
* @see EO_CALLBACK_PRIORITY_BEFORE
|
||||
* @see EO_CALLBACK_PRIORITY_DEFAULT
|
||||
*/
|
||||
|
||||
abstract Eo.Base ()
|
||||
{
|
||||
eo_prefix: eo;
|
||||
|
@ -109,17 +147,17 @@ Prevents event callbacks from being called for the object. */
|
|||
/*@ Add a callback for an event with a specific priority.
|
||||
callbacks of the same priority are called in reverse order of creation. */
|
||||
params {
|
||||
@in desc: const(Eo_Event_Description)*; /*@ The description of the event to listen to */
|
||||
@in priority: Eo_Callback_Priority; /*@ The priority of the callback */
|
||||
@in cb: Eo_Event_Cb; /*@ the callback to call */
|
||||
@in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */
|
||||
@in priority: Eo.Callback_Priority; /*@ The priority of the callback */
|
||||
@in cb: Eo.Event_Cb; /*@ the callback to call */
|
||||
@in data: const(void)*; /*@ additional data to pass to the callback */
|
||||
}
|
||||
}
|
||||
event_callback_del {
|
||||
/*@ Del a callback with a specific data associated to it for an event. */
|
||||
params {
|
||||
@in desc: const(Eo_Event_Description)*; /*@ The description of the event to listen to */
|
||||
@in func: Eo_Event_Cb; /*@ the callback to delete */
|
||||
@in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */
|
||||
@in func: Eo.Event_Cb; /*@ the callback to delete */
|
||||
@in user_data: const(void)*; /*@ The data to compare */
|
||||
}
|
||||
}
|
||||
|
@ -127,22 +165,22 @@ callbacks of the same priority are called in reverse order of creation. */
|
|||
/*@ Add a callback array for an event with a specific priority.
|
||||
callbacks of the same priority are called in reverse order of creation. */
|
||||
params {
|
||||
@in array: const(Eo_Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */
|
||||
@in priority: Eo_Callback_Priority; /*@ The priority of the callback */
|
||||
@in array: const(Eo.Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */
|
||||
@in priority: Eo.Callback_Priority; /*@ The priority of the callback */
|
||||
@in data: const(void)*; /*@ additional data to pass to the callback */
|
||||
}
|
||||
}
|
||||
event_callback_array_del {
|
||||
/*@ Del a callback array with a specific data associated to it for an event. */
|
||||
params {
|
||||
@in array: const(Eo_Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */
|
||||
@in array: const(Eo.Callback_Array_Item)*; /*@ an #Eo_Callback_Array_Item of events to listen to */
|
||||
@in user_data: const(void)*; /*@ The data to compare */
|
||||
}
|
||||
}
|
||||
event_callback_call {
|
||||
/*@ Call the callbacks for an event of an object. */
|
||||
params {
|
||||
@in desc: const(Eo_Event_Description)*; /*@ The description of the event to call */
|
||||
@in desc: const(Eo.Event_Description)*; /*@ The description of the event to call */
|
||||
@in event_info: void *; /*@ Extra event info to pass to the callbacks */
|
||||
}
|
||||
return: bool; /*@ @c EINA_TRUE if one of the callbacks aborted the call, @c EINA_FALSE otherwise */
|
||||
|
@ -150,21 +188,21 @@ callbacks of the same priority are called in reverse order of creation. */
|
|||
event_callback_forwarder_add {
|
||||
/*@ Add an event callback forwarder for an event and an object. */
|
||||
params {
|
||||
@in desc: const(Eo_Event_Description)*; /*@ The description of the event to listen to */
|
||||
@in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */
|
||||
@in new_obj: Eo.Base *; /*@ The object to emit events from */
|
||||
}
|
||||
}
|
||||
event_callback_forwarder_del {
|
||||
/*@ Remove an event callback forwarder for an event and an object. */
|
||||
params {
|
||||
@in desc: const(Eo_Event_Description)*; /*@ The description of the event to listen to */
|
||||
@in desc: const(Eo.Event_Description)*; /*@ The description of the event to listen to */
|
||||
@in new_obj: Eo.Base *; /*@ The object to emit events from */
|
||||
}
|
||||
}
|
||||
dbg_info_get {
|
||||
/*@ Get dbg information from the object. */
|
||||
params {
|
||||
@in root_node: Eo_Dbg_Info*; /*@ node of the tree */
|
||||
@in root_node: Eo.Dbg_Info*; /*@ node of the tree */
|
||||
}
|
||||
}
|
||||
children_iterator_new {
|
||||
|
|
Loading…
Reference in New Issue