### Library
eo_eolian_files = \
- lib/eo/eo_base.eo \
- lib/eo/eo_class.eo \
- lib/eo/eo_override.eo \
- lib/eo/eo_interface.eo
+ lib/eo/efl_object.eo \
+ lib/eo/efl_class.eo \
+ lib/eo/efl_object_override.eo \
+ lib/eo/efl_interface.eo
eo_eolian_c = $(eo_eolian_files:%.eo=%.eo.c)
eo_eolian_h = $(eo_eolian_files:%.eo=%.eo.h)
*
* Recommended reading:
*
- * @li @ref Eo_Class_Base
- * @li @ref Eo_Class
+ * @li @ref Efl_Class_Base
+ * @li @ref Efl_Class
* @li @ref Eo_Events
* @li @ref Eo_Composite_Objects
*
typedef struct _Eo_Opaque Eo;
/**
- * @typedef Eo_Class
+ * @typedef Efl_Class
* The basic class type - should be removed, just for compat.
*/
-typedef Eo Eo_Class;
-#define _EO_CLASS_EO_CLASS_TYPE
+typedef Eo Efl_Class;
+#define _EFL_CLASS_EO_CLASS_TYPE
-typedef Eo Eo_Base;
-#define _EO_BASE_EO_CLASS_TYPE
+typedef Eo Efl_Object;
+#define _EFL_BASE_EO_CLASS_TYPE
#ifdef EFL_BETA_API_SUPPORT
*/
typedef void (*Eo_Del_Intercept) (Eo *obj_id);
-#include "eo_override.eo.h"
-#include "eo_base.eo.h"
-#include "eo_interface.eo.h"
-#define EO_CLASS EO_BASE_CLASS
+#include "efl_object_override.eo.h"
+#include "efl_object.eo.h"
+#include "efl_interface.eo.h"
+#define EO_CLASS EFL_OBJECT_CLASS
/**
* @addtogroup Eo_Debug_Information Eo's Debug information helper.
* @param[in] name name of the list
* @return the new list
*/
-static inline Eo_Dbg_Info *
-EO_DBG_INFO_LIST_APPEND(Eo_Dbg_Info *list, const char *name)
+static inline Efl_Dbg_Info *
+EO_DBG_INFO_LIST_APPEND(Efl_Dbg_Info *list, const char *name)
{
- Eo_Dbg_Info *tmp = (Eo_Dbg_Info *)calloc(1, sizeof(*tmp));
+ Efl_Dbg_Info *tmp = (Efl_Dbg_Info *)calloc(1, sizeof(*tmp));
if (!tmp) return NULL;
tmp->name = eina_stringshare_add(name);
/**
* @def EO_DBG_INFO_APPEND
* Creates a new debug info into a list
- * @param[in] LIST list where to append (Eo_Dbg_Info *)
+ * @param[in] LIST list where to append (Efl_Dbg_Info *)
* @param[in] NAME name of the parameter (const char *)
* @param[in] TYPE type of the parameter (Eina_Value_Type *)
* @param[in] VALUE value of the parameter
*/
#define EO_DBG_INFO_APPEND(LIST, NAME, TYPE, VALUE) \
do { \
- Eo_Dbg_Info *List = LIST; \
+ Efl_Dbg_Info *List = LIST; \
if (List) \
{ \
- Eo_Dbg_Info *Tmp = calloc(1, sizeof(*Tmp)); \
+ Efl_Dbg_Info *Tmp = calloc(1, sizeof(*Tmp)); \
\
if (!Tmp) break; \
Tmp->name = eina_stringshare_add(NAME); \
} while (0)
/**
- * Frees the Eo_Dbg_Info tree. (The whole tree recursively).
+ * Frees the Efl_Dbg_Info tree. (The whole tree recursively).
* @param[in] info The tree to delete.
*/
-EAPI void eo_dbg_info_free(Eo_Dbg_Info *info);
+EAPI void eo_dbg_info_free(Efl_Dbg_Info *info);
/**
* @}
*/
/**
- * @def EO_EVENT_DESCRIPTION(name)
- * An helper macro to help populating #Eo_Event_Description
+ * @def EFL_EVENT_DESCRIPTION(name)
+ * An helper macro to help populating #Efl_Event_Description
* @param name The name of the event.
- * @see Eo_Event_Description
+ * @see Efl_Event_Description
*/
-#define EO_EVENT_DESCRIPTION(name) { name, EINA_FALSE, EINA_FALSE, EINA_FALSE }
+#define EFL_EVENT_DESCRIPTION(name) { name, EINA_FALSE, EINA_FALSE, EINA_FALSE }
/**
- * @def EO_EVENT_DESCRIPTION_HOT(name)
- * An helper macro to help populating #Eo_Event_Description and make
+ * @def EFL_EVENT_DESCRIPTION_HOT(name)
+ * An helper macro to help populating #Efl_Event_Description and make
* the event impossible to freeze.
* @param name The name of the event.
- * @see Eo_Event_Description
- * @see EO_EVENT_DESCRIPTION
+ * @see Efl_Event_Description
+ * @see EFL_EVENT_DESCRIPTION
*/
-#define EO_EVENT_DESCRIPTION_HOT(name) { name, EINA_TRUE, EINA_FALSE, EINA_FALSE }
+#define EFL_EVENT_DESCRIPTION_HOT(name) { name, EINA_TRUE, EINA_FALSE, EINA_FALSE }
/**
- * @def EO_EVENT_DESCRIPTION(name)
- * An helper macro to help populating #Eo_Event_Description
+ * @def EFL_EVENT_DESCRIPTION(name)
+ * An helper macro to help populating #Efl_Event_Description
* @param name The name of the event.
- * @see Eo_Event_Description
+ * @see Efl_Event_Description
*/
-#define EO_EVENT_DESCRIPTION_RESTART(name) { name, EINA_FALSE, EINA_FALSE, EINA_TRUE }
+#define EFL_EVENT_DESCRIPTION_RESTART(name) { name, EINA_FALSE, EINA_FALSE, EINA_TRUE }
/**
- * @def EO_EVENT_DESCRIPTION_HOT(name)
- * An helper macro to help populating #Eo_Event_Description and make
+ * @def EFL_EVENT_DESCRIPTION_HOT(name)
+ * An helper macro to help populating #Efl_Event_Description and make
* the event impossible to freeze.
* @param name The name of the event.
- * @see Eo_Event_Description
- * @see EO_EVENT_DESCRIPTION
+ * @see Efl_Event_Description
+ * @see EFL_EVENT_DESCRIPTION
*/
-#define EO_EVENT_DESCRIPTION_HOT_RESTART(name) { name, EINA_TRUE, EINA_FALSE, EINA_TRUE }
+#define EFL_EVENT_DESCRIPTION_HOT_RESTART(name) { name, EINA_TRUE, EINA_FALSE, EINA_TRUE }
*/
/**
- * @addtogroup Eo_Class Eo Class
+ * @addtogroup Efl_Class Efl Class
* @{
*/
* You must use this macro if you want thread safety in class creation.
*/
#define EO_DEFINE_CLASS(class_get_func_name, class_desc, parent_class, ...) \
-const Eo_Class * \
+const Efl_Class * \
class_get_func_name(void) \
{ \
- const Eo_Class *_tmp_parent_class; \
+ const Efl_Class *_tmp_parent_class; \
static volatile unsigned char lk_init = 0; \
static Eina_Spinlock _my_lock; \
- static const Eo_Class * volatile _my_class = NULL; \
+ static const Efl_Class * volatile _my_class = NULL; \
static unsigned int _my_init_generation = 1; \
if (EINA_UNLIKELY(_eo_init_generation != _my_init_generation)) \
{ \
/**
* An enum representing the possible types of an Eo class.
*/
-enum _Eo_Class_Type
+enum _Efl_Class_Type
{
EO_CLASS_TYPE_REGULAR = 0, /**< Regular class. */
EO_CLASS_TYPE_REGULAR_NO_INSTANT, /**< Regular non instant-able class. */
};
/**
- * @typedef Eo_Class_Type
- * A convenience typedef for #_Eo_Class_Type.
+ * @typedef Efl_Class_Type
+ * A convenience typedef for #_Efl_Class_Type.
*/
-typedef enum _Eo_Class_Type Eo_Class_Type;
+typedef enum _Efl_Class_Type Efl_Class_Type;
/**
* @def EO_VERSION
*/
#define EO_VERSION 2
-typedef struct _Eo_Op_Description
+typedef struct _Efl_Op_Description
{
void *api_func; /**< The EAPI function offering this op. (The name of the func on windows) */
void *func; /**< The static function to call for the op. */
Eo_Op_Type op_type; /**< The type of the Op. */
-} Eo_Op_Description;
+} Efl_Op_Description;
/**
* @struct _Eo_Ops
*/
typedef struct _Eo_Ops
{
- const Eo_Op_Description *descs; /**< The op descriptions array of size count. */
+ const Efl_Op_Description *descs; /**< The op descriptions array of size count. */
size_t count; /**< Number of op descriptions. */
} Eo_Ops;
/**
- * @struct _Eo_Class_Description
+ * @struct _Efl_Class_Description
* This struct holds the description of a class.
* This description should be passed to eo_class_new.
* Please use the #EO_CLASS_DESCRIPTION_OPS macro when populating it.
*/
-struct _Eo_Class_Description
+struct _Efl_Class_Description
{
unsigned int version; /**< The current version of eo, use #EO_VERSION */
const char *name; /**< The name of the class. */
- Eo_Class_Type type; /**< The type of the class. */
+ Efl_Class_Type type; /**< The type of the class. */
Eo_Ops ops; /**< The ops description, should be filled using #EO_CLASS_DESCRIPTION_OPS (later sorted by Eo). */
- const Eo_Event_Description **events; /**< The event descriptions for this class. */
+ const Efl_Event_Description **events; /**< The event descriptions for this class. */
size_t data_size; /**< The size of data (private + protected + public) this class needs per object. */
- void (*class_constructor)(Eo_Class *klass); /**< The constructor of the class. */
- void (*class_destructor)(Eo_Class *klass); /**< The destructor of the class. */
+ void (*class_constructor)(Efl_Class *klass); /**< The constructor of the class. */
+ void (*class_destructor)(Efl_Class *klass); /**< The destructor of the class. */
};
/**
- * @typedef Eo_Class_Description
- * A convenience typedef for #_Eo_Class_Description
+ * @typedef Efl_Class_Description
+ * A convenience typedef for #_Efl_Class_Description
*/
-typedef struct _Eo_Class_Description Eo_Class_Description;
+typedef struct _Efl_Class_Description Efl_Class_Description;
/**
* @brief Create a new class.
*
* @see #EO_DEFINE_CLASS
*/
-EAPI const Eo_Class *eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent, ...);
+EAPI const Efl_Class *eo_class_new(const Efl_Class_Description *desc, const Efl_Class *parent, ...);
/**
* @brief Override Eo functions of this object.
* @see eo_override
*/
#define EO_OVERRIDE_OPS_DEFINE(ops, ...) \
- const Eo_Op_Description _##ops##_descs[] = { __VA_ARGS__ }; \
+ const Efl_Op_Description _##ops##_descs[] = { __VA_ARGS__ }; \
const Eo_Ops ops = { _##ops##_descs, EINA_C_ARRAY_LENGTH(_##ops##_descs) }
/**
*
* Notice: This function does not support composite objects.
*/
-EAPI Eina_Bool eo_isa(const Eo *obj, const Eo_Class *klass);
+EAPI Eina_Bool eo_isa(const Eo *obj, const Efl_Class *klass);
/**
* @brief Gets the name of the passed class.
*
* @see eo_class_get()
*/
-EAPI const char *eo_class_name_get(const Eo_Class *klass);
+EAPI const char *eo_class_name_get(const Efl_Class *klass);
/**
* @}
*/
EAPI Eina_Bool eo_shutdown(void);
-// Helpers macro to help populating #Eo_Class_Description.
+// Helpers macro to help populating #Efl_Class_Description.
#define EO_CLASS_DESCRIPTION_NOOPS() { NULL, 0}
#define EO_CLASS_DESCRIPTION_OPS(op_descs) { op_descs, EINA_C_ARRAY_LENGTH(op_descs) }
// end of the eo_add. Calls finalize among others
EAPI Eo * _eo_add_end(Eo *obj, Eina_Bool is_ref, Eina_Bool is_fallback);
-EAPI Eo *eo_super(const Eo *obj, const Eo_Class *cur_klass);
+EAPI Eo *eo_super(const Eo *obj, const Efl_Class *cur_klass);
/*****************************************************************************/
*
* @see eo_class_name_get()
*/
-EAPI const Eo_Class *eo_class_get(const Eo *obj);
+EAPI const Efl_Class *eo_class_get(const Eo *obj);
EAPI Eo *_eo_self_get(void);
*/
#define eo_add_ref(klass, parent, ...) _eo_add_common(klass, parent, EINA_TRUE, ##__VA_ARGS__)
-EAPI Eo * _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo *parent, Eina_Bool ref, Eina_Bool is_fallback);
+EAPI Eo * _eo_add_internal_start(const char *file, int line, const Efl_Class *klass_id, Eo *parent, Eina_Bool ref, Eina_Bool is_fallback);
/**
* @brief Get a pointer to the data of an object for a specific class.
* @see eo_data_ref()
* @see eo_data_unref()
*/
-EAPI void *eo_data_scope_get(const Eo *obj, const Eo_Class *klass);
+EAPI void *eo_data_scope_get(const Eo *obj, const Efl_Class *klass);
/**
* @def eo_data_xref(obj, klass, ref_obj)
*
* @see eo_data_xunref_internal()
*/
-EAPI void *eo_data_xref_internal(const char *file, int line, const Eo *obj, const Eo_Class *klass, const Eo *ref_obj);
+EAPI void *eo_data_xref_internal(const char *file, int line, const Eo *obj, const Efl_Class *klass, const Eo *ref_obj);
/**
* @def eo_data_xunref(obj, data, ref_obj)
* set the intercept function to NULL so it is not called again on the next
* "real deletion".
*
- * @see eo_del_intercept_get()
+ * @see efl_del_intercept_get()
* @see eo_unref()
- * @see eo_del()
+ * @see efl_del()
*/
-EAPI void eo_del_intercept_set(Eo *obj, Eo_Del_Intercept del_intercept_func);
+EAPI void efl_del_intercept_set(Eo *obj, Eo_Del_Intercept del_intercept_func);
/**
* @brief Get the deletion interceptor function
* @param obj The object to get the interceptor of
* @return The intercept function or NULL if none is set.
*
- * This returns the interceptor function set by eo_del_intercept_set(). Note
+ * This returns the interceptor function set by efl_del_intercept_set(). Note
* that objects by default have no interceptor (NULL) set, but certain
* classes may set one up in a constructor, so it is important to be able
* to get the interceptor function to know if this has happend and
* own interceptor function has finished. It would generally be a bad idea
* though to override these functions.
*
- * @see eo_del_intercept_set()
+ * @see efl_del_intercept_set()
*/
-EAPI Eo_Del_Intercept eo_del_intercept_get(const Eo *obj);
+EAPI Eo_Del_Intercept efl_del_intercept_get(const Eo *obj);
/**
* @def eo_xref(obj, ref_obj)
EAPI Eina_Bool eo_destructed_is(const Eo *obj);
/**
- * @addtogroup Eo_Class_Class Eo's Class class.
+ * @addtogroup Efl_Class_Class Eo's Class class.
* @{
*/
-#include "eo_class.eo.h"
+#include "efl_class.eo.h"
/**
* @}
*/
/**
- * @addtogroup Eo_Class_Base Eo's Base class.
+ * @addtogroup Efl_Class_Base Eo's Base class.
* @{
*/
/**
- * @typedef eo_key_data_free_func
+ * @typedef efl_key_data_free_func
* Data free func prototype.
* XXX: DO NOT USE, only here for legacy.
*/
-typedef void (*eo_key_data_free_func)(void *);
+typedef void (*efl_key_data_free_func)(void *);
/**
* @def eo_weak_ref
* @param wref the pointer to use for the weak ref
*
* @see eo_weak_unref
- * @see eo_wref_add
+ * @see efl_wref_add
*/
#define eo_weak_ref(wref) \
do { \
- if (*wref) eo_wref_add(*wref, wref); \
+ if (*wref) efl_wref_add(*wref, wref); \
} while (0)
/**
* @param wref the pointer to use for the weak unref
*
* @see eo_weak_ref
- * @see eo_wref_del
- * @see eo_wref_del_safe
+ * @see efl_wref_del
+ * @see efl_wref_del_safe
*/
#define eo_weak_unref(wref) \
do { \
- if (*wref) eo_wref_del(*wref, wref); \
+ if (*wref) efl_wref_del(*wref, wref); \
} while (0)
/**
- * @def eo_wref_del_safe
+ * @def efl_wref_del_safe
* @brief Delete the weak reference passed.
* @param wref the weak reference to free.
*
- * @see #eo_wref_del
+ * @see #efl_wref_del
*/
-#define eo_wref_del_safe(wref) eo_weak_unref(wref)
+#define efl_wref_del_safe(wref) eo_weak_unref(wref)
/**
* @addtogroup Eo_Events Eo's Event Handling
* anything about them.
* @internal
*/
-EAPI const Eo_Event_Description *eo_base_legacy_only_event_description_get(const char *_event_name);
+EAPI const Efl_Event_Description *efl_object_legacy_only_event_description_get(const char *_event_name);
/**
* @def EO_CALLBACK_PRIORITY_BEFORE
* external symbols in it, because the addresses are only known at runtime.
*/
#define EO_CALLBACKS_ARRAY_DEFINE(Name, ...) \
- static Eo_Callback_Array_Item * \
+ static Efl_Callback_Array_Item * \
Name(void) \
{ \
- static Eo_Callback_Array_Item internal[sizeof ((Eo_Callback_Array_Item[]) { __VA_ARGS__ }) / \
- sizeof (Eo_Callback_Array_Item) + \
+ static Efl_Callback_Array_Item internal[sizeof ((Efl_Callback_Array_Item[]) { __VA_ARGS__ }) / \
+ sizeof (Efl_Callback_Array_Item) + \
1] = { { 0, 0 } }; \
if (internal[0].desc == NULL) \
{ \
memcpy(internal, \
- ((Eo_Callback_Array_Item[]) { __VA_ARGS__, { NULL, NULL } }), \
- sizeof (Eo_Callback_Array_Item) + \
- sizeof ((Eo_Callback_Array_Item[]) { __VA_ARGS__ })); \
+ ((Efl_Callback_Array_Item[]) { __VA_ARGS__, { NULL, NULL } }), \
+ sizeof (Efl_Callback_Array_Item) + \
+ sizeof ((Efl_Callback_Array_Item[]) { __VA_ARGS__ })); \
} \
return internal; \
}
/**
- * @def eo_event_callback_add(obj, desc, cb, data)
+ * @def efl_event_callback_add(obj, desc, cb, data)
* Add a callback for an event.
* @param[in] desc The description of the event to listen to.
* @param[in] cb the callback to call.
*
* callbacks of the same priority are called in reverse order of creation.
*
- * @see eo_event_callback_priority_add()
+ * @see efl_event_callback_priority_add()
*/
-#define eo_event_callback_add(obj, desc, cb, data) \
- eo_event_callback_priority_add(obj, desc, \
+#define efl_event_callback_add(obj, desc, cb, data) \
+ efl_event_callback_priority_add(obj, desc, \
EO_CALLBACK_PRIORITY_DEFAULT, cb, data)
/**
- * @def eo_event_callback_array_add(obj, desc, cb, data)
+ * @def efl_event_callback_array_add(obj, desc, cb, data)
* Add a callback array for an event.
- * @param[in] array an #Eo_Callback_Array_Item of events to listen to.
+ * @param[in] array an #Efl_Callback_Array_Item of events to listen to.
* @param[in] data additional data to pass to the callback.
*
* callbacks of the same priority are called in reverse order of creation.
*
- * @see eo_event_callback_array_priority_add()
+ * @see efl_event_callback_array_priority_add()
*/
-#define eo_event_callback_array_add(obj, array, data) \
- eo_event_callback_array_priority_add(obj, array, \
+#define efl_event_callback_array_add(obj, array, data) \
+ efl_event_callback_array_priority_add(obj, array, \
EO_CALLBACK_PRIORITY_DEFAULT, data)
/**
--- /dev/null
+abstract Efl.Class ()
+{
+ data: null;
+}
-interface Eo.Interface ()
+interface Efl.Interface ()
{
[[An interface for other interfaces to inherit from.
This is useful when you want to create interfaces and mixins that expose
- functions from a normal class, like for example @Eo.Base.constructor.]]
+ functions from a normal class, like for example @Efl.Object.constructor.]]
}
import eina_types;
-struct Eo.Event.Description {
+struct Efl.Event.Description {
[[This struct holds the description of a specific event.]]
name: string; [[name of the event.]]
unfreezable: bool; [[Eina_True if the event cannot be frozen.]]
struct Eo.Event {
[[Parameter passed in event callbacks holding extra event parameters]]
- object: Eo.Base; [[The object the event was called on.]]
- desc: ref(const(Eo.Event.Description)); [[The event description.]]
+ object: Efl.Object; [[The object the event was called on.]]
+ desc: ref(const(Efl.Event.Description)); [[The event description.]]
info: void_ptr; [[Extra event information passed by the event caller.]]
}
-type Eo.Event_Cb: __builtin_event_cb; [[An event callback prototype.
+type Efl.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 Efl.Callback_Array_Item {
[[An item in an array of callback desc/func.
- See also \@ref eo_event_callback_array_add.
+ See also \@ref efl_event_callback_array_add.
]]
- desc: ref(const(Eo.Event.Description)); [[The event description.]]
- func: Eo.Event_Cb; [[The callback function.]]
+ desc: ref(const(Efl.Event.Description)); [[The event description.]]
+ func: Efl.Event_Cb; [[The callback function.]]
}
-struct Eo.Dbg_Info {
+struct Efl.Dbg_Info {
[[The structure for the debug info used by Eo.]]
name: stringshare; [[The name of the part (stringshare).]]
value: generic_value; [[The value.]]
}
-type Eo.Callback_Priority: short; [[Callback priority value. Range is -32k - 32k.
+type Efl.Callback_Priority: short; [[Callback priority value. Range is -32k - 32k.
The lower the number, the higher the priority.
See \@ref EO_CALLBACK_PRIORITY_AFTER,
\@ref EO_CALLBACK_PRIORITY_DEFAULT
]]
-abstract Eo.Base ()
+abstract Efl.Object ()
{
- eo_prefix: eo;
+ eo_prefix: efl;
methods {
@property parent {
Parents keep references to their children so in order to
delete objects that have parents you need to set parent to
- NULL or use eo_del() that does that for you (and also unrefs
+ NULL or use efl_del() that does that for you (and also unrefs
the object).
The Eo parent is conceptually user set. That means that a parent
get {
}
values {
- parent: Eo.Base @nullable; [[the new parent]]
+ parent: Efl.Object @nullable; [[the new parent]]
}
}
del @const {
[[Unrefs the object and reparents it to NULL.
- Because eo_del() unrefs and reparents to NULL, it doesn't really delete the object.
+ Because efl_del() unrefs and reparents to NULL, it doesn't really delete the object.
This method accepts a const object for convenience, so all objects
could be passed to it easily.
If this is not done the class cannot be found up in the object tree.
]]
params {
- klass : const(Eo.Base); [[The class identifier to search for]]
+ klass : const(Efl.Object); [[The class identifier to search for]]
}
- return : Eo.Base;
+ return : Efl.Object;
}
constructor {
[[Call the object's constructor.
Should not be used with #eo_do. Only use it with #eo_do_super.
]]
- return: Eo.Base; [[The new object created, can be NULL if aborting]]
+ return: Efl.Object; [[The new object created, can be NULL if aborting]]
}
destructor {
[[Call the object's destructor.
}
finalize {
[[Called at the end of #eo_add. Should not be called, just overridden.]]
- return: Eo.Base; [[The new object created, can be NULL if aborting]]
+ return: Efl.Object; [[The new object created, can be NULL if aborting]]
}
name_find {
[[Find a child object with the given name and return it.
params {
@in search: string; [[the name search string]]
}
- return: Eo.Base; [[the first object found]]
+ return: Efl.Object; [[the first object found]]
}
wref_add {
[[Add a new weak reference to obj.
being freed.
]]
params {
- @in wref: ref(Eo.Base);
+ @in wref: ref(Efl.Object);
}
}
wref_del {
[[Delete the weak reference passed.]]
params {
- @in wref: ref(Eo.Base);
+ @in wref: ref(Efl.Object);
}
}
@property key_data {
}
set {
values {
- objdata: const(Eo.Base); [[the object to set]]
+ objdata: const(Efl.Object); [[the object to set]]
}
}
get {
values {
- objdata: Eo.Base; [[the object to set]]
+ objdata: Efl.Object; [[the object to set]]
}
}
}
}
set {
values {
- objdata: const(Eo.Base); [[the object to set]]
+ objdata: const(Efl.Object); [[the object to set]]
}
}
get {
values {
- objdata: Eo.Base; [[the object to set]]
+ objdata: Efl.Object; [[the object to set]]
}
}
}
]]
return: bool; [[Return true when the callback has been successfully added.]]
params {
- @in desc: ref(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: ref(const(Efl.Event.Description)); [[The description of the event to listen to]]
+ @in priority: Efl.Callback_Priority; [[The priority of the callback]]
+ @in cb: Efl.Event_Cb; [[the callback to call]]
@in data: const(void_ptr); [[additional data to pass to the callback]]
}
}
[[Del a callback with a specific data associated to it for an event.]]
return: bool; [[Return true when the callback has been successfully removed.]]
params {
- @in desc: ref(const(Eo.Event.Description)); [[The description of the event to listen to]]
- @in func: Eo.Event_Cb; [[the callback to delete]]
+ @in desc: ref(const(Efl.Event.Description)); [[The description of the event to listen to]]
+ @in func: Efl.Event_Cb; [[the callback to delete]]
@in user_data: const(void_ptr); [[The data to compare]]
}
}
]]
return: bool; [[Return true when the callback has been successfully added.]]
params {
- @in array: ref(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: ref(const(Efl.Callback_Array_Item)); [[an #Efl_Callback_Array_Item of events to listen to]]
+ @in priority: Efl.Callback_Priority; [[The priority of the callback]]
@in data: const(void_ptr); [[additional data to pass to the callback]]
}
}
]]
return: bool; [[Return true when the callback has been successfully removed.]]
params {
- @in array: ref(const(Eo.Callback_Array_Item)); [[an #Eo_Callback_Array_Item of events to listen to]]
+ @in array: ref(const(Efl.Callback_Array_Item)); [[an #Efl_Callback_Array_Item of events to listen to]]
@in user_data: const(void_ptr); [[The data to compare]]
}
}
event_callback_call {
[[Call the callbacks for an event of an object.]]
params {
- @in desc: ref(const(Eo.Event.Description)); [[The description of the event to call]]
+ @in desc: ref(const(Efl.Event.Description)); [[The description of the event to call]]
@in event_info: void_ptr; [[Extra event info to pass to the callbacks]]
}
return: bool; [[$false if one of the callbacks aborted the call,
event_callback_forwarder_add {
[[Add an event callback forwarder for an event and an object.]]
params {
- @in desc: ref(const(Eo.Event.Description)); [[The description of the event to listen to]]
- @in new_obj: Eo.Base; [[The object to emit events from]]
+ @in desc: ref(const(Efl.Event.Description)); [[The description of the event to listen to]]
+ @in new_obj: Efl.Object; [[The object to emit events from]]
}
}
event_callback_forwarder_del {
[[Remove an event callback forwarder for an event and an object.]]
params {
- @in desc: ref(const(Eo.Event.Description)); [[The description of the event to listen to]]
- @in new_obj: Eo.Base; [[The object to emit events from]]
+ @in desc: ref(const(Efl.Event.Description)); [[The description of the event to listen to]]
+ @in new_obj: Efl.Object; [[The object to emit events from]]
}
}
dbg_info_get {
[[Get dbg information from the object.]]
params {
- @in root_node: ref(Eo.Dbg_Info); [[node of the tree]]
+ @in root_node: ref(Efl.Dbg_Info); [[node of the tree]]
}
}
children_iterator_new {
[[Get an iterator on all childrens]]
- return: free(own(iterator<Eo.Base>), eina_iterator_free) @warn_unused;
+ return: free(own(iterator<Efl.Object>), eina_iterator_free) @warn_unused;
}
composite_attach {
[[Make an object a composite object of another.
See @.composite_detach, @.composite_part_is.
]]
params {
- @in comp_obj: Eo.Base; [[the object that will be used to composite the parent.]]
+ @in comp_obj: Efl.Object; [[the object that will be used to composite the parent.]]
}
return: bool; [[$true if successful. $false otherwise.]]
}
See @.composite_attach, @.composite_part_is.
]]
params {
- @in comp_obj: Eo.Base; [[the object that will be removed from the parent.]]
+ @in comp_obj: Efl.Object; [[the object that will be removed from the parent.]]
}
return: bool; [[$true if successful. $false otherwise.]]
}
-abstract Eo.Override ()
+abstract Efl.Object.Override ()
{
[[A special class to pass to #eo_super() when using #eo_override()
#include "eo_private.h"
#include "eo_add_fallback.h"
-#include "eo_override.eo.c"
+#include "efl_object_override.eo.c"
#define EO_CLASS_IDS_FIRST 1
#define EO_OP_IDS_FIRST 1
EAPI unsigned int _eo_init_generation = 1;
int _eo_log_dom = -1;
-static _Eo_Class **_eo_classes = NULL;
+static _Efl_Class **_eo_classes = NULL;
static Eo_Id _eo_classes_last_id = 0;
static Eo_Id _eo_classes_alloc = 0;
static int _eo_init_count = 0;
static size_t _eo_class_sz = 0;
static void _eo_condtor_reset(_Eo_Object *obj);
-static inline void *_eo_data_scope_get(const _Eo_Object *obj, const _Eo_Class *klass);
-static inline void *_eo_data_xref_internal(const char *file, int line, _Eo_Object *obj, const _Eo_Class *klass, const _Eo_Object *ref_obj);
+static inline void *_eo_data_scope_get(const _Eo_Object *obj, const _Efl_Class *klass);
+static inline void *_eo_data_xref_internal(const char *file, int line, _Eo_Object *obj, const _Efl_Class *klass, const _Eo_Object *ref_obj);
static inline void _eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj);
/* Start of Dich */
* substraction at compile time. */
#define _UNMASK_ID(id) ((id) - MASK_CLASS_TAG)
#define ID_CLASS_GET(id) ({ \
- (_Eo_Class *) (((_UNMASK_ID(id) <= _eo_classes_last_id) && (_UNMASK_ID(id) > 0)) ? \
+ (_Efl_Class *) (((_UNMASK_ID(id) <= _eo_classes_last_id) && (_UNMASK_ID(id) > 0)) ? \
(_eo_classes[_UNMASK_ID(id) - 1]) : NULL); \
})
}
/* XXX: Only used for a debug message below. Doesn't matter that it's slow. */
-static const _Eo_Class *
+static const _Efl_Class *
_eo_op_class_get(Eo_Op op)
{
- _Eo_Class **itr = _eo_classes;
+ _Efl_Class **itr = _eo_classes;
int mid, max, min;
min = 0;
}
static inline Eina_Bool
-_vtable_func_set(Eo_Vtable *vtable, const _Eo_Class *klass, Eo_Op op, eo_op_func_type func)
+_vtable_func_set(Eo_Vtable *vtable, const _Efl_Class *klass, Eo_Op op, eo_op_func_type func)
{
op_type_funcs *fsrc;
size_t idx1 = DICH_CHAIN1(op);
fsrc = &chain1->funcs[DICH_CHAIN_LAST(op)];
if (fsrc->src == klass)
{
- const _Eo_Class *op_kls = _eo_op_class_get(op);
+ const _Efl_Class *op_kls = _eo_op_class_get(op);
ERR("Class '%s': Overriding already set func %p for op %d (%s) with %p.",
klass->desc->name, fsrc->func, op, op_kls->desc->name, func);
return EINA_FALSE;
return !!(oid & MASK_CLASS_TAG);
}
-static inline _Eo_Class *
-_eo_class_pointer_get(const Eo_Class *klass_id)
+static inline _Efl_Class *
+_eo_class_pointer_get(const Efl_Class *klass_id)
{
#ifdef HAVE_EO_ID
return ID_CLASS_GET((Eo_Id)klass_id);
#else
- return (_Eo_Class *) klass_id;
+ return (_Efl_Class *) klass_id;
#endif
}
static const char *
-_eo_op_desc_name_get(const Eo_Op_Description *desc)
+_eo_op_desc_name_get(const Efl_Op_Description *desc)
{
static const char *fct_name = "unknown";
}
static inline const op_type_funcs *
-_eo_kls_itr_next(const _Eo_Class *orig_kls, const _Eo_Class *cur_klass, Eo_Op op)
+_eo_kls_itr_next(const _Efl_Class *orig_kls, const _Efl_Class *cur_klass, Eo_Op op)
{
- const _Eo_Class **kls_itr = NULL;
+ const _Efl_Class **kls_itr = NULL;
/* Find the kls itr. */
kls_itr = orig_kls->mro;
/************************************ EO ************************************/
-static const _Eo_Class *_super_class = NULL;
+static const _Efl_Class *_super_class = NULL;
static Eina_Spinlock _super_class_lock;
EAPI Eo *
-eo_super(const Eo *obj, const Eo_Class *cur_klass)
+eo_super(const Eo *obj, const Efl_Class *cur_klass)
{
EO_CLASS_POINTER_RETURN_VAL(cur_klass, klass, NULL);
EAPI Eina_Bool
_eo_call_resolve(Eo *eo_id, const char *func_name, Eo_Op_Call_Data *call, Eo_Call_Cache *cache, const char *file, int line)
{
- const _Eo_Class *klass, *inputklass, *main_klass;
- const _Eo_Class *cur_klass = NULL;
+ const _Efl_Class *klass, *inputklass, *main_klass;
+ const _Efl_Class *cur_klass = NULL;
_Eo_Object *obj = NULL;
const Eo_Vtable *vtable = NULL;
const op_type_funcs *func;
vtable = obj->vtable;
if (_obj_is_override(obj) && cur_klass &&
- (_eo_class_id_get(cur_klass) == EO_OVERRIDE_CLASS))
+ (_eo_class_id_get(cur_klass) == EFL_OBJECT_OVERRIDE_CLASS))
{
- /* Doing a eo_super(obj, EO_OVERRIDE_CLASS) should result in calling
+ /* Doing a eo_super(obj, EFL_OBJECT_OVERRIDE_CLASS) should result in calling
* as if it's a normal class. */
vtable = &klass->vtable;
cur_klass = NULL;
/* api_func should be the pointer to the function on all platforms except windows,
* in which it should be the the name of the function (string).
*/
-static inline const Eo_Op_Description *
-_eo_api_desc_get(const void *api_func, const _Eo_Class *klass, const _Eo_Class **extns)
+static inline const Efl_Op_Description *
+_eo_api_desc_get(const void *api_func, const _Efl_Class *klass, const _Efl_Class **extns)
{
- const _Eo_Class *cur_klass;
- const _Eo_Class **kls_itr = NULL;
- const Eo_Op_Description *op_desc;
- const Eo_Op_Description *op_descs;
+ const _Efl_Class *cur_klass;
+ const _Efl_Class **kls_itr = NULL;
+ const Efl_Op_Description *op_desc;
+ const Efl_Op_Description *op_descs;
if (klass)
{
/* klass is the klass we are working on. hierarchy_klass is the class whe should
* use when validating. */
static Eina_Bool
-_eo_class_funcs_set(Eo_Vtable *vtable, const Eo_Ops *ops, const _Eo_Class *hierarchy_klass, const _Eo_Class *klass, Eina_Bool override_only)
+_eo_class_funcs_set(Eo_Vtable *vtable, const Eo_Ops *ops, const _Efl_Class *hierarchy_klass, const _Efl_Class *klass, Eina_Bool override_only)
{
unsigned int i;
int op_id;
const void *last_api_func;
- const Eo_Op_Description *op_desc;
- const Eo_Op_Description *op_descs;
+ const Efl_Op_Description *op_desc;
+ const Efl_Op_Description *op_descs;
op_id = hierarchy_klass->base_id;
op_descs = ops->descs;
}
else if ((op_desc->op_type == EO_OP_TYPE_REGULAR_OVERRIDE) || (op_desc->op_type == EO_OP_TYPE_CLASS_OVERRIDE))
{
- const Eo_Op_Description *api_desc;
+ const Efl_Op_Description *api_desc;
if (override_only)
{
api_desc = _eo_api_desc_get(op_desc->api_func, hierarchy_klass, NULL);
}
EAPI Eo *
-_eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo *parent_id, Eina_Bool ref EINA_UNUSED, Eina_Bool is_fallback)
+_eo_add_internal_start(const char *file, int line, const Efl_Class *klass_id, Eo *parent_id, Eina_Bool ref EINA_UNUSED, Eina_Bool is_fallback)
{
_Eo_Object *obj;
Eo_Stack_Frame *fptr = NULL;
eo_ref(eo_id);
/* Reference for the parent if is_ref is done in _eo_add_end */
- eo_parent_set(eo_id, parent_id);
+ efl_parent_set(eo_id, parent_id);
/* eo_id can change here. Freeing is done on the resolved object. */
- eo_id = eo_constructor(eo_id);
+ eo_id = efl_constructor(eo_id);
if (!eo_id)
{
ERR("Object of class '%s' - Error while constructing object",
/* We have two refs at this point. */
_eo_unref(obj);
- eo_del((Eo *) obj->header.id);
+ efl_del((Eo *) obj->header.id);
return NULL;
}
else if (eo_id != _eo_obj_id_get(obj))
EO_OBJ_POINTER_RETURN_VAL(eo_id, new_obj, NULL);
/* We have two refs at this point. */
_eo_unref(obj);
- eo_del((Eo *) obj->header.id);
+ efl_del((Eo *) obj->header.id);
_eo_ref(new_obj);
}
if (!obj->condtor_done)
{
- const _Eo_Class *klass = obj->klass;
+ const _Efl_Class *klass = obj->klass;
ERR("Object of class '%s' - Not all of the object constructors have been executed.",
klass->desc->name);
cleanup:
_eo_unref(obj);
- eo_del((Eo *) obj->header.id);
+ efl_del((Eo *) obj->header.id);
return NULL;
}
EAPI Eo *
_eo_add_end(Eo *eo_id, Eina_Bool is_ref, Eina_Bool is_fallback)
{
- Eo *ret = eo_finalize(eo_id);
+ Eo *ret = efl_finalize(eo_id);
ret = _eo_add_internal_end(eo_id, ret);
- if (is_ref && eo_parent_get(eo_id))
+ if (is_ref && efl_parent_get(eo_id))
{
eo_ref(eo_id);
}
/*****************************************************************************/
-EAPI const Eo_Class *
+EAPI const Efl_Class *
eo_class_get(const Eo *eo_id)
{
if (_eo_is_a_class(eo_id))
}
EAPI const char *
-eo_class_name_get(const Eo_Class *eo_id)
+eo_class_name_get(const Efl_Class *eo_id)
{
- const _Eo_Class *klass;
+ const _Efl_Class *klass;
if (_eo_is_a_class(eo_id))
{
}
static void
-_eo_class_base_op_init(_Eo_Class *klass)
+_eo_class_base_op_init(_Efl_Class *klass)
{
- const Eo_Class_Description *desc = klass->desc;
+ const Efl_Class_Description *desc = klass->desc;
klass->base_id = _eo_ops_last_id;
#ifdef EO_DEBUG
static Eina_Bool
-_eo_class_mro_has(const _Eo_Class *klass, const _Eo_Class *find)
+_eo_class_mro_has(const _Efl_Class *klass, const _Efl_Class *find)
{
- const _Eo_Class **itr;
+ const _Efl_Class **itr;
for (itr = klass->mro ; *itr ; itr++)
{
if (*itr == find)
}
static Eina_List *
-_eo_class_mro_add(Eina_List *mro, const _Eo_Class *klass)
+_eo_class_mro_add(Eina_List *mro, const _Efl_Class *klass)
{
if (!klass)
return mro;
/* Recursively add MIXINS extensions. */
{
- const _Eo_Class **extn_itr;
+ const _Efl_Class **extn_itr;
for (extn_itr = klass->extensions ; *extn_itr ; extn_itr++)
{
- const _Eo_Class *extn = *extn_itr;
+ const _Efl_Class *extn = *extn_itr;
if (extn->desc->type == EO_CLASS_TYPE_MIXIN)
mro = _eo_class_mro_add(mro, extn);
}
}
static Eina_List *
-_eo_class_mro_init(const Eo_Class_Description *desc, const _Eo_Class *parent, Eina_List *extensions)
+_eo_class_mro_init(const Efl_Class_Description *desc, const _Efl_Class *parent, Eina_List *extensions)
{
Eina_List *mro = NULL;
Eina_List *extn_itr = NULL;
Eina_List *extn_pos = NULL;
- const _Eo_Class *extn = NULL;
+ const _Efl_Class *extn = NULL;
/* Add MIXINS extensions. */
EINA_LIST_FOREACH(extensions, extn_itr, extn)
}
static void
-_eo_class_constructor(_Eo_Class *klass)
+_eo_class_constructor(_Efl_Class *klass)
{
klass->constructed = EINA_TRUE;
}
static void
-eo_class_free(_Eo_Class *klass)
+eo_class_free(_Efl_Class *klass)
{
void *data;
#ifdef HAVE_MMAP
size_t size;
- size = _eo_classes_alloc * sizeof(_Eo_Class *);
+ size = _eo_classes_alloc * sizeof(_Efl_Class *);
if (_eo_classes) munmap(_eo_classes, size);
#else
free(_eo_classes);
_eo_classes_last_id++;
if (_eo_classes_last_id <= _eo_classes_alloc) return;
- psize = _eo_classes_alloc * sizeof(_Eo_Class *);
+ psize = _eo_classes_alloc * sizeof(_Efl_Class *);
#ifdef HAVE_MMAP
- _eo_classes_alloc += (MEM_PAGE_SIZE / sizeof(_Eo_Class *));
- newsize = _eo_classes_alloc * sizeof(_Eo_Class *);
+ _eo_classes_alloc += (MEM_PAGE_SIZE / sizeof(_Efl_Class *));
+ newsize = _eo_classes_alloc * sizeof(_Efl_Class *);
ptr = mmap(NULL, newsize, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
if (ptr == MAP_FAILED)
if (_eo_classes) munmap(_eo_classes, psize);
#else
_eo_classes_alloc += 128;
- newsize = _eo_classes_alloc * sizeof(_Eo_Class *);
+ newsize = _eo_classes_alloc * sizeof(_Efl_Class *);
ptr = realloc(_eo_classes, newsize);
if (!ptr)
{
}
#endif
memset(ptr + psize, 0, newsize - psize);
- _eo_classes = (_Eo_Class **)ptr;
+ _eo_classes = (_Efl_Class **)ptr;
}
-EAPI const Eo_Class *
-eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
+EAPI const Efl_Class *
+eo_class_new(const Efl_Class_Description *desc, const Efl_Class *parent_id, ...)
{
- _Eo_Class *klass;
+ _Efl_Class *klass;
va_list p_list;
size_t extn_sz, mro_sz, mixins_sz;
Eina_List *extn_list, *mro, *mixins;
EINA_SAFETY_ON_NULL_RETURN_VAL(desc, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(desc->name, NULL);
- _Eo_Class *parent = _eo_class_pointer_get(parent_id);
+ _Efl_Class *parent = _eo_class_pointer_get(parent_id);
#ifndef HAVE_EO_ID
if (parent && !EINA_MAGIC_CHECK((Eo_Header *) parent, EO_CLASS_EINA_MAGIC))
{
{
DBG("Started building extensions list for class '%s'", desc->name);
extn_list = NULL;
- const _Eo_Class *extn = NULL;
+ const _Efl_Class *extn = NULL;
const Eo_Id *extn_id = NULL;
va_start(p_list, parent_id);
extn_id = va_arg(p_list, Eo_Id *);
while (extn_id)
{
- extn = _eo_class_pointer_get((Eo_Class *)extn_id);
+ extn = _eo_class_pointer_get((Efl_Class *)extn_id);
switch (extn->desc->type)
{
case EO_CLASS_TYPE_REGULAR_NO_INSTANT:
extn_list = _eo_class_list_remove_duplicates(extn_list);
- extn_sz = sizeof(_Eo_Class *) * (eina_list_count(extn_list) + 1);
+ extn_sz = sizeof(_Efl_Class *) * (eina_list_count(extn_list) + 1);
DBG("Finished building extensions list for class '%s'", desc->name);
}
return NULL;
}
- mro_sz = sizeof(_Eo_Class *) * (eina_list_count(mro) + 1);
+ mro_sz = sizeof(_Efl_Class *) * (eina_list_count(mro) + 1);
DBG("Finished building MRO list for class '%s'", desc->name);
}
/* Prepare mixins list */
{
Eina_List *itr;
- const _Eo_Class *kls_itr;
+ const _Efl_Class *kls_itr;
DBG("Started building Mixins list for class '%s'", desc->name);
eina_spinlock_new(&klass->iterators.trash_lock);
klass->parent = parent;
klass->desc = desc;
- klass->extensions = (const _Eo_Class **) ((char *) klass + _eo_class_sz);
- klass->mro = (const _Eo_Class **) ((char *) klass->extensions + extn_sz);
+ klass->extensions = (const _Efl_Class **) ((char *) klass + _eo_class_sz);
+ klass->mro = (const _Efl_Class **) ((char *) klass->extensions + extn_sz);
klass->extn_data_off = (Eo_Extension_Data_Offset *) ((char *) klass->mro + mro_sz);
if (klass->parent)
{
/* Copy the extensions and free the list */
{
- const _Eo_Class *extn = NULL;
- const _Eo_Class **extn_itr = klass->extensions;
+ const _Efl_Class *extn = NULL;
+ const _Efl_Class **extn_itr = klass->extensions;
EINA_LIST_FREE(extn_list, extn)
{
*(extn_itr++) = extn;
/* Copy the mro and free the list. */
{
- const _Eo_Class *kls_itr = NULL;
- const _Eo_Class **mro_itr = klass->mro;
+ const _Efl_Class *kls_itr = NULL;
+ const _Efl_Class **mro_itr = klass->mro;
EINA_LIST_FREE(mro, kls_itr)
{
*(mro_itr++) = kls_itr;
/* Feed the mixins data offsets and free the mixins list. */
{
- const _Eo_Class *kls_itr = NULL;
+ const _Efl_Class *kls_itr = NULL;
Eo_Extension_Data_Offset *extn_data_itr = klass->extn_data_off;
EINA_LIST_FREE(mixins, kls_itr)
{
/* Flatten the function array */
{
- const _Eo_Class **mro_itr = klass->mro;
+ const _Efl_Class **mro_itr = klass->mro;
for ( ; *mro_itr ; mro_itr++)
;
/* Mark which classes we implement */
{
- const _Eo_Class **extn_itr;
+ const _Efl_Class **extn_itr;
for (extn_itr = klass->extensions ; *extn_itr ; extn_itr++)
{
- const _Eo_Class *extn = *extn_itr;
+ const _Efl_Class *extn = *extn_itr;
/* Set it in the dich. */
_vtable_func_set(&klass->vtable, klass, extn->base_id +
extn->desc->ops.count, _eo_class_isa_func);
eo_override(Eo *eo_id, const Eo_Ops *ops)
{
EO_OBJ_POINTER_RETURN_VAL(eo_id, obj, EINA_FALSE);
- EO_CLASS_POINTER_RETURN_VAL(EO_OVERRIDE_CLASS, klass, EINA_FALSE);
+ EO_CLASS_POINTER_RETURN_VAL(EFL_OBJECT_OVERRIDE_CLASS, klass, EINA_FALSE);
Eo_Vtable *previous = obj->vtable;
if (!ops)
}
EAPI Eina_Bool
-eo_isa(const Eo *eo_id, const Eo_Class *klass_id)
+eo_isa(const Eo *eo_id, const Efl_Class *klass_id)
{
EO_OBJ_POINTER_RETURN_VAL(eo_id, obj, EINA_FALSE);
EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, EINA_FALSE);
EAPI void
-eo_del_intercept_set(Eo *obj_id, Eo_Del_Intercept del_intercept_func)
+efl_del_intercept_set(Eo *obj_id, Eo_Del_Intercept del_intercept_func)
{
EO_OBJ_POINTER_RETURN(obj_id, obj);
}
EAPI Eo_Del_Intercept
-eo_del_intercept_get(const Eo *obj_id)
+efl_del_intercept_get(const Eo *obj_id)
{
EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
}
static inline void *
-_eo_data_scope_safe_get(const _Eo_Object *obj, const _Eo_Class *klass)
+_eo_data_scope_safe_get(const _Eo_Object *obj, const _Efl_Class *klass)
{
if (EINA_LIKELY(klass->desc->data_size > 0))
{
}
static inline void *
-_eo_data_scope_get(const _Eo_Object *obj, const _Eo_Class *klass)
+_eo_data_scope_get(const _Eo_Object *obj, const _Efl_Class *klass)
{
if (EINA_LIKELY(klass->desc->type != EO_CLASS_TYPE_MIXIN))
return ((char *) obj) + klass->data_offset;
}
static inline void *
-_eo_data_xref_internal(const char *file, int line, _Eo_Object *obj, const _Eo_Class *klass, const _Eo_Object *ref_obj)
+_eo_data_xref_internal(const char *file, int line, _Eo_Object *obj, const _Efl_Class *klass, const _Eo_Object *ref_obj)
{
void *data = NULL;
if (klass != NULL)
_eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj)
{
#ifdef EO_DEBUG
- const _Eo_Class *klass = obj->klass;
+ const _Efl_Class *klass = obj->klass;
Eina_Bool in_range = (((char *)data >= (((char *) obj) + _eo_sz)) &&
((char *)data < (((char *) obj) + klass->obj_size)));
if (!in_range)
}
EAPI void *
-eo_data_scope_get(const Eo *obj_id, const Eo_Class *klass_id)
+eo_data_scope_get(const Eo *obj_id, const Efl_Class *klass_id)
{
void *ret;
EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
}
EAPI void *
-eo_data_xref_internal(const char *file, int line, const Eo *obj_id, const Eo_Class *klass_id, const Eo *ref_obj_id)
+eo_data_xref_internal(const char *file, int line, const Eo *obj_id, const Efl_Class *klass_id, const Eo *ref_obj_id)
{
void *ret;
EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
EO_OBJ_POINTER_RETURN_VAL(ref_obj_id, ref_obj, NULL);
- _Eo_Class *klass = NULL;
+ _Efl_Class *klass = NULL;
if (klass_id)
{
EO_CLASS_POINTER_RETURN_VAL(klass_id, klass2, NULL);
eina_init();
_eo_sz = EO_ALIGN_SIZE(sizeof(_Eo_Object));
- _eo_class_sz = EO_ALIGN_SIZE(sizeof(_Eo_Class));
+ _eo_class_sz = EO_ALIGN_SIZE(sizeof(_Efl_Class));
_eo_classes = NULL;
_eo_classes_last_id = EO_CLASS_IDS_FIRST - 1;
eo_shutdown(void)
{
size_t i;
- _Eo_Class **cls_itr = _eo_classes + _eo_classes_last_id - 1;
+ _Efl_Class **cls_itr = _eo_classes + _eo_classes_last_id - 1;
if (--_eo_init_count > 0)
return EINA_TRUE;
Eo *composite_parent;
Eina_Inlist *generic_data;
Eo ***wrefs;
-} Eo_Base_Extension;
+} Efl_Object_Extension;
typedef struct
{
Eina_Inlist *children;
Eo *parent;
- Eo_Base_Extension *ext;
+ Efl_Object_Extension *ext;
Eo_Callback_Description *callbacks;
Eina_Inlist *current;
unsigned short event_freeze_count;
Eina_Bool deletions_waiting : 1;
Eina_Bool callback_stopped : 1;
-} Eo_Base_Data;
+} Efl_Object_Data;
typedef enum {
DATA_PTR,
typedef struct
{
EINA_INLIST;
- const Eo_Event_Description *desc;
+ const Efl_Event_Description *desc;
Eo_Callback_Description *current;
} Eo_Current_Callback_Description;
static inline void
-_eo_base_extension_free(Eo_Base_Extension *ext)
+_efl_object_extension_free(Efl_Object_Extension *ext)
{
free(ext);
}
static inline void
-_eo_base_extension_need(Eo_Base_Data *pd)
+_efl_object_extension_need(Efl_Object_Data *pd)
{
if (pd->ext) return;
- pd->ext = calloc(1, sizeof(Eo_Base_Extension));
+ pd->ext = calloc(1, sizeof(Efl_Object_Extension));
}
static inline void
-_eo_base_extension_noneed(Eo_Base_Data *pd)
+_efl_object_extension_noneed(Efl_Object_Data *pd)
{
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
if ((!ext) || (ext->name) || (ext->comment) || (ext->generic_data) ||
(ext->wrefs) || (ext->composite_parent)) return;
- _eo_base_extension_free(pd->ext);
+ _efl_object_extension_free(pd->ext);
pd->ext = NULL;
}
case DATA_PTR:
break;
case DATA_OBJ:
- eo_event_callback_del(node->d.obj, EO_EVENT_DEL, _key_generic_cb_del, node);
+ efl_event_callback_del(node->d.obj, EFL_EVENT_DEL, _key_generic_cb_del, node);
eo_unref(node->d.obj);
break;
case DATA_OBJ_WEAK:
- eo_event_callback_del(node->d.obj, EO_EVENT_DEL, _key_generic_cb_del, node);
+ efl_event_callback_del(node->d.obj, EFL_EVENT_DEL, _key_generic_cb_del, node);
break;
case DATA_VAL:
eina_value_free(node->d.val);
}
static void
-_eo_generic_data_del_all(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
+_eo_generic_data_del_all(Eo *obj EINA_UNUSED, Efl_Object_Data *pd)
{
Eo_Generic_Data_Node *node;
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
if (!ext) return;
}
static void
-_eo_key_generic_direct_del(Eo_Base_Data *pd, Eo_Generic_Data_Node *node, Eina_Bool call_free)
+_eo_key_generic_direct_del(Efl_Object_Data *pd, Eo_Generic_Data_Node *node, Eina_Bool call_free)
{
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
ext->generic_data = eina_inlist_remove
(ext->generic_data, EINA_INLIST_GET(node));
}
static void
-_eo_key_generic_del(const Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, Eina_Bool call_free)
+_eo_key_generic_del(const Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char *key, Eina_Bool call_free)
{
Eo_Generic_Data_Node *node;
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
EINA_INLIST_FOREACH(ext->generic_data, node)
{
/* Return TRUE if the object was newly added. */
static Eo_Generic_Data_Node *
-_key_generic_set(const Eo *obj, Eo_Base_Data *pd, const char *key, const void *data, Eo_Generic_Data_Node_Type d_type, Eina_Bool call_free)
+_key_generic_set(const Eo *obj, Efl_Object_Data *pd, const char *key, const void *data, Eo_Generic_Data_Node_Type d_type, Eina_Bool call_free)
{
Eo_Generic_Data_Node *node;
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
if (!key) return NULL;
if (ext)
}
}
- _eo_base_extension_need(pd);
+ _efl_object_extension_need(pd);
ext = pd->ext;
if (ext)
{
}
static void *
-_key_generic_get(const Eo *obj, Eo_Base_Data *pd, const char *key, Eo_Generic_Data_Node_Type d_type)
+_key_generic_get(const Eo *obj, Efl_Object_Data *pd, const char *key, Eo_Generic_Data_Node_Type d_type)
{
Eo_Generic_Data_Node *node;
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
if (!key) return NULL;
if (!ext) return NULL;
_key_generic_cb_del(void *data, const Eo_Event *event EINA_UNUSED)
{
Eo_Generic_Data_Node *node = data;
- Eo_Base_Data *pd = eo_data_scope_get(node->obj, EO_BASE_CLASS);
+ Efl_Object_Data *pd = eo_data_scope_get(node->obj, EFL_OBJECT_CLASS);
_eo_key_generic_direct_del(pd, node, EINA_FALSE);
}
EOLIAN static void
-_eo_base_key_data_set(Eo *obj, Eo_Base_Data *pd, const char *key, const void *data)
+_efl_object_key_data_set(Eo *obj, Efl_Object_Data *pd, const char *key, const void *data)
{
_key_generic_set(obj, pd, key, data, DATA_PTR, EINA_TRUE);
}
EOLIAN static void *
-_eo_base_key_data_get(Eo *obj, Eo_Base_Data *pd, const char *key)
+_efl_object_key_data_get(Eo *obj, Efl_Object_Data *pd, const char *key)
{
return _key_generic_get(obj, pd, key, DATA_PTR);
}
EOLIAN static void
-_eo_base_key_ref_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, const Eo *objdata)
+_efl_object_key_ref_set(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char *key, const Eo *objdata)
{
Eo_Generic_Data_Node *node;
if (node)
{
eo_ref(objdata);
- eo_event_callback_add((Eo *)objdata, EO_EVENT_DEL, _key_generic_cb_del, node);
+ efl_event_callback_add((Eo *)objdata, EFL_EVENT_DEL, _key_generic_cb_del, node);
}
}
EOLIAN static Eo *
-_eo_base_key_ref_get(Eo *obj, Eo_Base_Data *pd, const char *key)
+_efl_object_key_ref_get(Eo *obj, Efl_Object_Data *pd, const char *key)
{
return _key_generic_get(obj, pd, key, DATA_OBJ);
}
EOLIAN static void
-_eo_base_key_wref_set(Eo *obj, Eo_Base_Data *pd, const char * key, const Eo_Base *objdata)
+_efl_object_key_wref_set(Eo *obj, Efl_Object_Data *pd, const char * key, const Efl_Object *objdata)
{
Eo_Generic_Data_Node *node;
node = _key_generic_set(obj, pd, key, objdata, DATA_OBJ_WEAK, EINA_TRUE);
if (node)
{
- eo_event_callback_add((Eo *)objdata, EO_EVENT_DEL, _key_generic_cb_del, node);
+ efl_event_callback_add((Eo *)objdata, EFL_EVENT_DEL, _key_generic_cb_del, node);
}
}
EOLIAN static Eo *
-_eo_base_key_wref_get(Eo *obj, Eo_Base_Data *pd, const char * key)
+_efl_object_key_wref_get(Eo *obj, Efl_Object_Data *pd, const char * key)
{
return _key_generic_get(obj, pd, key, DATA_OBJ_WEAK);
}
EOLIAN static void
-_eo_base_key_value_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, Eina_Value *value)
+_efl_object_key_value_set(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char *key, Eina_Value *value)
{
_key_generic_set(obj, pd, key, value, DATA_VAL, EINA_TRUE);
}
EOLIAN static Eina_Value *
-_eo_base_key_value_get(Eo *obj, Eo_Base_Data *pd, const char *key)
+_efl_object_key_value_get(Eo *obj, Efl_Object_Data *pd, const char *key)
{
return _key_generic_get(obj, pd, key, DATA_VAL);
}
EOLIAN static void
-_eo_base_name_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *name)
+_efl_object_name_set(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char *name)
{
if ((name) && (!name[0])) name = NULL;
if (name)
{
- _eo_base_extension_need(pd);
+ _efl_object_extension_need(pd);
if (pd->ext) eina_stringshare_replace(&(pd->ext->name), name);
}
else
if (pd->ext->name)
{
eina_stringshare_replace(&(pd->ext->name), name);
- _eo_base_extension_noneed(pd);
+ _efl_object_extension_noneed(pd);
}
}
}
EOLIAN static const char *
-_eo_base_name_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
+_efl_object_name_get(Eo *obj EINA_UNUSED, Efl_Object_Data *pd)
{
if (!pd->ext) return NULL;
return pd->ext->name;
return EINA_FALSE;
}
-EOLIAN static Eo_Base *
-_eo_base_name_find(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *search)
+EOLIAN static Efl_Object *
+_efl_object_name_find(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char *search)
{
Eo *child;
_Eo_Object *child_eo;
EINA_INLIST_FOREACH(pd->children, child_eo)
{
child = _eo_obj_id_get(child_eo);
- name = eo_name_get(child);
+ name = efl_name_get(child);
klass_name = eo_class_name_get(eo_class_get(child));
if (_name_match(klass, klass_glob, klass_name) &&
(((!_matchall(klass)) && (!name) && (_matchall(search_name))) ||
((name) && _name_match(search_name, name_glob, name))))
return child;
- child = eo_name_find(child, search);
+ child = efl_name_find(child, search);
if (child) return child;
}
}
EINA_INLIST_FOREACH(pd->children, child_eo)
{
child = _eo_obj_id_get(child_eo);
- name = eo_name_get(child);
+ name = efl_name_get(child);
if ((name) && (_name_match(search, EINA_TRUE, name)))
return child;
- child = eo_name_find(child, search);
+ child = efl_name_find(child, search);
if (child) return child;
}
}
EINA_INLIST_FOREACH(pd->children, child_eo)
{
child = _eo_obj_id_get(child_eo);
- name = eo_name_get(child);
+ name = efl_name_get(child);
if ((name) && (_name_match(search, EINA_FALSE, name)))
return child;
- child = eo_name_find(child, search);
+ child = efl_name_find(child, search);
if (child) return child;
}
}
}
EOLIAN static void
-_eo_base_comment_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *comment)
+_efl_object_comment_set(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const char *comment)
{
if ((comment) && (!comment[0])) comment = NULL;
if (comment)
{
- _eo_base_extension_need(pd);
+ _efl_object_extension_need(pd);
if (pd->ext) eina_stringshare_replace(&(pd->ext->comment), comment);
}
else
if (pd->ext->comment)
{
eina_stringshare_replace(&(pd->ext->comment), comment);
- _eo_base_extension_noneed(pd);
+ _efl_object_extension_noneed(pd);
}
}
}
EOLIAN static const char *
-_eo_base_comment_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
+_efl_object_comment_get(Eo *obj EINA_UNUSED, Efl_Object_Data *pd)
{
if (!pd->ext) return NULL;
return pd->ext->comment;
}
EOLIAN static void
-_eo_base_del(const Eo *obj, Eo_Base_Data *pd EINA_UNUSED)
+_efl_object_del(const Eo *obj, Efl_Object_Data *pd EINA_UNUSED)
{
- if (eo_parent_get((Eo *) obj))
+ if (efl_parent_get((Eo *) obj))
{
- eo_parent_set((Eo *) obj, NULL);
+ efl_parent_set((Eo *) obj, NULL);
}
else
{
}
EOLIAN static void
-_eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id)
+_efl_object_parent_set(Eo *obj, Efl_Object_Data *pd, Eo *parent_id)
{
if (pd->parent == parent_id)
return;
if (pd->parent)
{
- Eo_Base_Data *old_parent_pd;
+ Efl_Object_Data *old_parent_pd;
- old_parent_pd = eo_data_scope_get(pd->parent, EO_BASE_CLASS);
+ old_parent_pd = eo_data_scope_get(pd->parent, EFL_OBJECT_CLASS);
if (old_parent_pd)
{
old_parent_pd->children = eina_inlist_remove(old_parent_pd->children,
/* Set new parent */
if (parent_id)
{
- Eo_Base_Data *parent_pd = NULL;
- parent_pd = eo_data_scope_get(parent_id, EO_BASE_CLASS);
+ Efl_Object_Data *parent_pd = NULL;
+ parent_pd = eo_data_scope_get(parent_id, EFL_OBJECT_CLASS);
if (EINA_LIKELY(parent_pd != NULL))
{
}
EOLIAN static Eo *
-_eo_base_parent_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
+_efl_object_parent_get(Eo *obj EINA_UNUSED, Efl_Object_Data *pd)
{
return pd->parent;
}
EOLIAN static Eina_Bool
-_eo_base_finalized_get(Eo *obj_id, Eo_Base_Data *pd EINA_UNUSED)
+_efl_object_finalized_get(Eo *obj_id, Efl_Object_Data *pd EINA_UNUSED)
{
EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, EINA_FALSE);
return obj->finalized;
}
-EOLIAN static Eo_Base *
-_eo_base_provider_find(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const Eo_Base *klass)
+EOLIAN static Efl_Object *
+_efl_object_provider_find(Eo *obj EINA_UNUSED, Efl_Object_Data *pd, const Efl_Object *klass)
{
- if (pd->parent) return eo_provider_find(pd->parent, klass);
+ if (pd->parent) return efl_provider_find(pd->parent, klass);
return NULL;
}
};
static Eina_Bool
-_eo_children_iterator_next(Eo_Children_Iterator *it, void **data)
+_efl_children_iterator_next(Eo_Children_Iterator *it, void **data)
{
if (!it->current) return EINA_FALSE;
}
static Eo *
-_eo_children_iterator_container(Eo_Children_Iterator *it)
+_efl_children_iterator_container(Eo_Children_Iterator *it)
{
return it->obj_id;
}
static void
-_eo_children_iterator_free(Eo_Children_Iterator *it)
+_efl_children_iterator_free(Eo_Children_Iterator *it)
{
- _Eo_Class *klass;
+ _Efl_Class *klass;
_Eo_Object *obj;
- klass = (_Eo_Class*) it->obj->klass;
+ klass = (_Efl_Class*) it->obj->klass;
obj = it->obj;
eina_spinlock_take(&klass->iterators.trash_lock);
}
EOLIAN static Eina_Iterator *
-_eo_base_children_iterator_new(Eo *obj_id, Eo_Base_Data *pd)
+_efl_object_children_iterator_new(Eo *obj_id, Efl_Object_Data *pd)
{
- _Eo_Class *klass;
+ _Efl_Class *klass;
Eo_Children_Iterator *it;
EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
if (!pd->children) return NULL;
- klass = (_Eo_Class *) obj->klass;
+ klass = (_Efl_Class *) obj->klass;
eina_spinlock_take(&klass->iterators.trash_lock);
it = eina_trash_pop(&klass->iterators.trash);
it->obj = _eo_ref(obj);
it->obj_id = obj_id;
- it->iterator.next = FUNC_ITERATOR_NEXT(_eo_children_iterator_next);
- it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_eo_children_iterator_container);
- it->iterator.free = FUNC_ITERATOR_FREE(_eo_children_iterator_free);
+ it->iterator.next = FUNC_ITERATOR_NEXT(_efl_children_iterator_next);
+ it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_efl_children_iterator_container);
+ it->iterator.free = FUNC_ITERATOR_FREE(_efl_children_iterator_free);
return (Eina_Iterator *)it;
}
EOLIAN static void
-_eo_base_dbg_info_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd EINA_UNUSED, Eo_Dbg_Info *root_node EINA_UNUSED)
+_efl_object_dbg_info_get(Eo *obj EINA_UNUSED, Efl_Object_Data *pd EINA_UNUSED, Efl_Dbg_Info *root_node EINA_UNUSED)
{ /* No info required in the meantime */
return;
}
/* Weak reference. */
static inline size_t
-_wref_count(Eo_Base_Data *pd)
+_wref_count(Efl_Object_Data *pd)
{
Eo ***itr;
size_t count = 0;
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
if ((!ext) || (!ext->wrefs)) return 0;
for (itr = ext->wrefs; *itr; itr++) count++;
}
EOLIAN static void
-_eo_base_wref_add(Eo *obj, Eo_Base_Data *pd, Eo **wref)
+_efl_object_wref_add(Eo *obj, Efl_Object_Data *pd, Eo **wref)
{
size_t count;
Eo ***tmp;
- Eo_Base_Extension *ext;
+ Efl_Object_Extension *ext;
count = _wref_count(pd);
count += 1; /* New wref. */
- _eo_base_extension_need(pd);
+ _efl_object_extension_need(pd);
ext = pd->ext;
if (!ext) return;
}
EOLIAN static void
-_eo_base_wref_del(Eo *obj, Eo_Base_Data *pd, Eo **wref)
+_efl_object_wref_del(Eo *obj, Efl_Object_Data *pd, Eo **wref)
{
size_t count;
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
if (*wref != obj)
{
{
free(ext->wrefs);
ext->wrefs = NULL;
- _eo_base_extension_noneed(pd);
+ _efl_object_extension_noneed(pd);
}
*wref = NULL;
}
static inline void
-_wref_destruct(Eo_Base_Data *pd)
+_wref_destruct(Efl_Object_Data *pd)
{
Eo ***itr;
- Eo_Base_Extension *ext = pd->ext;
+ Efl_Object_Extension *ext = pd->ext;
if ((!ext) || (!ext->wrefs)) return;
for (itr = ext->wrefs; *itr; itr++) **itr = NULL;
/* XXX: Legacy support, remove when legacy is dead. */
static Eina_Hash *_legacy_events_hash = NULL;
-EAPI const Eo_Event_Description *
-eo_base_legacy_only_event_description_get(const char *_event_name)
+EAPI const Efl_Event_Description *
+efl_object_legacy_only_event_description_get(const char *_event_name)
{
Eina_Stringshare *event_name = eina_stringshare_add(_event_name);
- Eo_Event_Description *event_desc = eina_hash_find(_legacy_events_hash, event_name);
+ Efl_Event_Description *event_desc = eina_hash_find(_legacy_events_hash, event_name);
if (!event_desc)
{
- event_desc = calloc(1, sizeof(Eo_Event_Description));
+ event_desc = calloc(1, sizeof(Efl_Event_Description));
event_desc->name = event_name;
event_desc->legacy_is = EINA_TRUE;
eina_hash_add(_legacy_events_hash, event_name, event_desc);
}
static inline Eina_Bool
-_legacy_event_desc_is(const Eo_Event_Description *desc)
+_legacy_event_desc_is(const Efl_Event_Description *desc)
{
return desc->legacy_is;
}
static void
_legacy_events_hash_free_cb(void *_desc)
{
- Eo_Event_Description *desc = _desc;
+ Efl_Event_Description *desc = _desc;
eina_stringshare_del(desc->name);
free(desc);
}
union
{
- Eo_Callback_Array_Item item;
- const Eo_Callback_Array_Item *item_array;
+ Efl_Callback_Array_Item item;
+ const Efl_Callback_Array_Item *item_array;
} items;
void *func_data;
- Eo_Callback_Priority priority;
+ Efl_Callback_Priority priority;
Eina_Bool delete_me : 1;
Eina_Bool func_array : 1;
/* Actually remove, doesn't care about walking list, or delete_me */
static void
-_eo_callback_remove(Eo_Base_Data *pd, Eo_Callback_Description *cb)
+_eo_callback_remove(Efl_Object_Data *pd, Eo_Callback_Description *cb)
{
Eo_Callback_Description *itr, *pitr = NULL;
/* Actually remove, doesn't care about walking list, or delete_me */
static void
-_eo_callback_remove_all(Eo_Base_Data *pd)
+_eo_callback_remove_all(Efl_Object_Data *pd)
{
while (pd->callbacks)
{
}
static void
-_eo_callbacks_clear(Eo_Base_Data *pd)
+_eo_callbacks_clear(Efl_Object_Data *pd)
{
Eo_Callback_Description *cb = NULL;
}
static void
-_eo_callbacks_sorted_insert(Eo_Base_Data *pd, Eo_Callback_Description *cb)
+_eo_callbacks_sorted_insert(Efl_Object_Data *pd, Eo_Callback_Description *cb)
{
Eo_Callback_Description *itr, *itrp = NULL;
for (itr = pd->callbacks; itr && (itr->priority < cb->priority);
}
EOLIAN static Eina_Bool
-_eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data *pd,
- const Eo_Event_Description *desc,
- Eo_Callback_Priority priority,
- Eo_Event_Cb func,
+_efl_object_event_callback_priority_add(Eo *obj, Efl_Object_Data *pd,
+ const Efl_Event_Description *desc,
+ Efl_Callback_Priority priority,
+ Efl_Event_Cb func,
const void *user_data)
{
- const Eo_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}};
+ const Efl_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}};
Eo_Callback_Description *cb;
cb = calloc(1, sizeof(*cb));
cb->priority = priority;
_eo_callbacks_sorted_insert(pd, cb);
- eo_event_callback_call(obj, EO_EVENT_CALLBACK_ADD, (void *)arr);
+ efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, (void *)arr);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
-_eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd,
- const Eo_Event_Description *desc,
- Eo_Event_Cb func,
+_efl_object_event_callback_del(Eo *obj, Efl_Object_Data *pd,
+ const Efl_Event_Description *desc,
+ Efl_Event_Cb func,
const void *user_data)
{
Eo_Callback_Description *cb;
if (!cb->delete_me && (cb->items.item.desc == desc) &&
(cb->items.item.func == func) && (cb->func_data == user_data))
{
- const Eo_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}};
+ const Efl_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}};
cb->delete_me = EINA_TRUE;
pd->deletions_waiting = EINA_TRUE;
_eo_callbacks_clear(pd);
- eo_event_callback_call(obj, EO_EVENT_CALLBACK_DEL, (void *)arr);
+ efl_event_callback_call(obj, EFL_EVENT_CALLBACK_DEL, (void *)arr);
return EINA_TRUE;
}
}
}
EOLIAN static Eina_Bool
-_eo_base_event_callback_array_priority_add(Eo *obj, Eo_Base_Data *pd,
- const Eo_Callback_Array_Item *array,
- Eo_Callback_Priority priority,
+_efl_object_event_callback_array_priority_add(Eo *obj, Efl_Object_Data *pd,
+ const Efl_Callback_Array_Item *array,
+ Efl_Callback_Priority priority,
const void *user_data)
{
Eo_Callback_Description *cb;
cb->func_array = EINA_TRUE;
_eo_callbacks_sorted_insert(pd, cb);
- eo_event_callback_call(obj, EO_EVENT_CALLBACK_ADD, (void *)array);
+ efl_event_callback_call(obj, EFL_EVENT_CALLBACK_ADD, (void *)array);
return EINA_TRUE;
}
EOLIAN static Eina_Bool
-_eo_base_event_callback_array_del(Eo *obj, Eo_Base_Data *pd,
- const Eo_Callback_Array_Item *array,
+_efl_object_event_callback_array_del(Eo *obj, Efl_Object_Data *pd,
+ const Efl_Callback_Array_Item *array,
const void *user_data)
{
Eo_Callback_Description *cb;
pd->deletions_waiting = EINA_TRUE;
_eo_callbacks_clear(pd);
- eo_event_callback_call(obj, EO_EVENT_CALLBACK_DEL, (void *)array);
+ efl_event_callback_call(obj, EFL_EVENT_CALLBACK_DEL, (void *)array);
return EINA_TRUE;
}
}
}
static Eina_Bool
-_cb_desc_match(const Eo_Event_Description *a, const Eo_Event_Description *b)
+_cb_desc_match(const Efl_Event_Description *a, const Efl_Event_Description *b)
{
/* If one is legacy and the other is not, strcmp. Else, pointer compare. */
if (EINA_UNLIKELY(_legacy_event_desc_is(a) != _legacy_event_desc_is(b)))
}
EOLIAN static Eina_Bool
-_eo_base_event_callback_call(Eo *obj_id, Eo_Base_Data *pd,
- const Eo_Event_Description *desc,
+_efl_object_event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
+ const Efl_Event_Description *desc,
void *event_info)
{
Eina_Bool callback_already_stopped = pd->callback_stopped;
{
if (cb->func_array)
{
- const Eo_Callback_Array_Item *it;
+ const Efl_Callback_Array_Item *it;
for (it = cb->items.item_array; it->func; it++)
{
}
EOLIAN static void
-_eo_base_event_callback_stop(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
+_efl_object_event_callback_stop(Eo *obj EINA_UNUSED, Efl_Object_Data *pd)
{
pd->callback_stopped = EINA_TRUE;
}
static void
-_eo_event_forwarder_callback(void *data, const Eo_Event *event)
+_efl_event_forwarder_callback(void *data, const Eo_Event *event)
{
Eo *new_obj = (Eo *) data;
Eina_Bool ret = EINA_FALSE;
- ret = eo_event_callback_call(new_obj, event->desc, event->info);
+ ret = efl_event_callback_call(new_obj, event->desc, event->info);
if (!ret)
{
- eo_event_callback_stop(event->object);
+ efl_event_callback_stop(event->object);
}
}
/* FIXME: Change default priority? Maybe call later? */
EOLIAN static void
-_eo_base_event_callback_forwarder_add(Eo *obj, Eo_Base_Data *pd EINA_UNUSED,
- const Eo_Event_Description *desc,
+_efl_object_event_callback_forwarder_add(Eo *obj, Efl_Object_Data *pd EINA_UNUSED,
+ const Efl_Event_Description *desc,
Eo *new_obj)
{
/* FIXME: Add it EO_MAGIC_RETURN(new_obj, EO_EINA_MAGIC); */
- eo_event_callback_add(obj, desc, _eo_event_forwarder_callback, new_obj);
+ efl_event_callback_add(obj, desc, _efl_event_forwarder_callback, new_obj);
}
EOLIAN static void
-_eo_base_event_callback_forwarder_del(Eo *obj, Eo_Base_Data *pd EINA_UNUSED,
- const Eo_Event_Description *desc,
+_efl_object_event_callback_forwarder_del(Eo *obj, Efl_Object_Data *pd EINA_UNUSED,
+ const Efl_Event_Description *desc,
Eo *new_obj)
{
/* FIXME: Add it EO_MAGIC_RETURN(new_obj, EO_EINA_MAGIC); */
- eo_event_callback_del(obj, desc, _eo_event_forwarder_callback, new_obj);
+ efl_event_callback_del(obj, desc, _efl_event_forwarder_callback, new_obj);
}
EOLIAN static void
-_eo_base_event_freeze(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
+_efl_object_event_freeze(Eo *obj EINA_UNUSED, Efl_Object_Data *pd)
{
pd->event_freeze_count++;
}
EOLIAN static void
-_eo_base_event_thaw(Eo *obj, Eo_Base_Data *pd)
+_efl_object_event_thaw(Eo *obj, Efl_Object_Data *pd)
{
if (pd->event_freeze_count > 0)
{
}
EOLIAN static int
-_eo_base_event_freeze_count_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd)
+_efl_object_event_freeze_count_get(Eo *obj EINA_UNUSED, Efl_Object_Data *pd)
{
return pd->event_freeze_count;
}
EOLIAN static void
-_eo_base_event_global_freeze(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED)
+_efl_object_event_global_freeze(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED)
{
event_freeze_count++;
}
EOLIAN static void
-_eo_base_event_global_thaw(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED)
+_efl_object_event_global_thaw(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED)
{
if (event_freeze_count > 0)
{
}
EOLIAN static int
-_eo_base_event_global_freeze_count_get(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED)
+_efl_object_event_global_freeze_count_get(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED)
{
return event_freeze_count;
}
EOLIAN static Eina_Bool
-_eo_base_composite_attach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_obj_id)
+_efl_object_composite_attach(Eo *parent_id, Efl_Object_Data *pd EINA_UNUSED, Eo *comp_obj_id)
{
EO_OBJ_POINTER_RETURN_VAL(comp_obj_id, comp_obj, EINA_FALSE);
EO_OBJ_POINTER_RETURN_VAL(parent_id, parent, EINA_FALSE);
- Eo_Base_Data *comp_pd = eo_data_scope_get(comp_obj_id, EO_BASE_CLASS);
+ Efl_Object_Data *comp_pd = eo_data_scope_get(comp_obj_id, EFL_OBJECT_CLASS);
/* Don't composite if we already have a composite object of this type */
{
Eina_List *itr;
}
}
- if (eo_composite_part_is(comp_obj_id))
+ if (efl_composite_part_is(comp_obj_id))
{
- eo_composite_detach(comp_pd->ext->composite_parent, comp_obj_id);
+ efl_composite_detach(comp_pd->ext->composite_parent, comp_obj_id);
}
/* Set the parent comp on the child. */
- _eo_base_extension_need(comp_pd);
+ _efl_object_extension_need(comp_pd);
comp_pd->ext->composite_parent = parent_id;
parent->composite_objects = eina_list_prepend(parent->composite_objects, comp_obj_id);
}
EOLIAN static Eina_Bool
-_eo_base_composite_detach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_obj_id)
+_efl_object_composite_detach(Eo *parent_id, Efl_Object_Data *pd EINA_UNUSED, Eo *comp_obj_id)
{
EO_OBJ_POINTER_RETURN_VAL(comp_obj_id, comp_obj, EINA_FALSE);
EO_OBJ_POINTER_RETURN_VAL(parent_id, parent, EINA_FALSE);
- if (!eo_composite_part_is(comp_obj_id))
+ if (!efl_composite_part_is(comp_obj_id))
return EINA_FALSE;
parent->composite_objects = eina_list_remove(parent->composite_objects, comp_obj_id);
/* Clear the comp parent on the child. */
{
- Eo_Base_Data *comp_pd = eo_data_scope_get(comp_obj_id, EO_BASE_CLASS);
+ Efl_Object_Data *comp_pd = eo_data_scope_get(comp_obj_id, EFL_OBJECT_CLASS);
comp_pd->ext->composite_parent = NULL;
- _eo_base_extension_noneed(comp_pd);
+ _efl_object_extension_noneed(comp_pd);
}
return EINA_TRUE;
}
EOLIAN static Eina_Bool
-_eo_base_composite_part_is(Eo *comp_obj_id EINA_UNUSED, Eo_Base_Data *pd)
+_efl_object_composite_part_is(Eo *comp_obj_id EINA_UNUSED, Efl_Object_Data *pd)
{
return pd->ext && pd->ext->composite_parent;
}
/* Eo_Dbg */
EAPI void
-eo_dbg_info_free(Eo_Dbg_Info *info)
+eo_dbg_info_free(Efl_Dbg_Info *info)
{
eina_value_flush(&(info->value));
free(info);
static Eina_Bool
_eo_dbg_info_flush(const Eina_Value_Type *type EINA_UNUSED, void *_mem)
{
- Eo_Dbg_Info *mem = *(Eo_Dbg_Info **) _mem;
+ Efl_Dbg_Info *mem = *(Efl_Dbg_Info **) _mem;
eina_stringshare_del(mem->name);
eina_value_flush(&(mem->value));
free(mem);
static Eina_Bool
_eo_dbg_info_copy(const Eina_Value_Type *type EINA_UNUSED, const void *_src, void *_dst)
{
- const Eo_Dbg_Info **src = (const Eo_Dbg_Info **) _src;
- Eo_Dbg_Info **dst = _dst;
+ const Efl_Dbg_Info **src = (const Efl_Dbg_Info **) _src;
+ Efl_Dbg_Info **dst = _dst;
- *dst = calloc(1, sizeof(Eo_Dbg_Info));
+ *dst = calloc(1, sizeof(Efl_Dbg_Info));
if (!*dst) return EINA_FALSE;
(*dst)->name = eina_stringshare_ref((*src)->name);
eina_value_copy(&((*src)->value), &((*dst)->value));
_eo_dbg_info_convert_to(const Eina_Value_Type *type EINA_UNUSED, const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
{
/* FIXME: For the meanwhile, just use the inner type for the value. */
- const Eo_Dbg_Info **src = (const Eo_Dbg_Info **) type_mem;
+ const Efl_Dbg_Info **src = (const Efl_Dbg_Info **) type_mem;
if (convert == EINA_VALUE_TYPE_STRINGSHARE ||
convert == EINA_VALUE_TYPE_STRING)
{
static Eina_Bool
_eo_dbg_info_pset(const Eina_Value_Type *type EINA_UNUSED, void *_mem, const void *_ptr)
{
- Eo_Dbg_Info **mem = _mem;
+ Efl_Dbg_Info **mem = _mem;
if (*mem)
free(*mem);
*mem = (void *) _ptr;
static Eina_Bool
_eo_dbg_info_pget(const Eina_Value_Type *type EINA_UNUSED, const void *_mem, void *_ptr)
{
- Eo_Dbg_Info **ptr = _ptr;
+ Efl_Dbg_Info **ptr = _ptr;
*ptr = (void *) _mem;
return EINA_TRUE;
}
static const Eina_Value_Type _EO_DBG_INFO_TYPE = {
EINA_VALUE_TYPE_VERSION,
- sizeof(Eo_Dbg_Info *),
- "Eo_Dbg_Info_Ptr",
+ sizeof(Efl_Dbg_Info *),
+ "Efl_Dbg_Info_Ptr",
_eo_dbg_info_setup,
_eo_dbg_info_flush,
_eo_dbg_info_copy,
/* EOF event callbacks */
-/* EO_BASE_CLASS stuff */
-#define MY_CLASS EO_BASE_CLASS
+/* EFL_OBJECT_CLASS stuff */
+#define MY_CLASS EFL_OBJECT_CLASS
EOLIAN static Eo *
-_eo_base_constructor(Eo *obj, Eo_Base_Data *pd EINA_UNUSED)
+_efl_object_constructor(Eo *obj, Efl_Object_Data *pd EINA_UNUSED)
{
DBG("%p - %s.", obj, eo_class_name_get(obj));
}
EOLIAN static void
-_eo_base_destructor(Eo *obj, Eo_Base_Data *pd)
+_efl_object_destructor(Eo *obj, Efl_Object_Data *pd)
{
Eo *child;
- Eo_Base_Extension *ext;
+ Efl_Object_Extension *ext;
DBG("%p - %s.", obj, eo_class_name_get(obj));
while (pd->children)
{
child = _eo_obj_id_get(EINA_INLIST_CONTAINER_GET(pd->children, _Eo_Object));
- eo_parent_set(child, NULL);
+ efl_parent_set(child, NULL);
}
/* If we are a composite object, detach children */
Eo *emb_obj_id;
EINA_LIST_FOREACH_SAFE(obj_data->composite_objects, itr, next, emb_obj_id)
{
- eo_composite_detach(obj, emb_obj_id);
+ efl_composite_detach(obj, emb_obj_id);
}
}
if (pd->ext && pd->ext->composite_parent)
{
- eo_composite_detach(pd->ext->composite_parent, obj);
+ efl_composite_detach(pd->ext->composite_parent, obj);
}
if (pd->parent)
{
ERR("Object '%p' still has a parent at the time of destruction.", obj);
- eo_parent_set(obj, NULL);
+ efl_parent_set(obj, NULL);
}
_eo_generic_data_del_all(obj, pd);
ext->name = NULL;
eina_stringshare_del(ext->comment);
ext->comment = NULL;
- _eo_base_extension_free(ext);
+ _efl_object_extension_free(ext);
pd->ext = NULL;
}
}
EOLIAN static Eo *
-_eo_base_finalize(Eo *obj, Eo_Base_Data *pd EINA_UNUSED)
+_efl_object_finalize(Eo *obj, Efl_Object_Data *pd EINA_UNUSED)
{
return obj;
}
EOLIAN static void
-_eo_base_class_constructor(Eo_Class *klass EINA_UNUSED)
+_efl_object_class_constructor(Efl_Class *klass EINA_UNUSED)
{
event_freeze_count = 0;
_legacy_events_hash = eina_hash_stringshared_new(_legacy_events_hash_free_cb);
}
EOLIAN static void
-_eo_base_class_destructor(Eo_Class *klass EINA_UNUSED)
+_efl_object_class_destructor(Efl_Class *klass EINA_UNUSED)
{
eina_hash_free(_legacy_events_hash);
}
-#include "eo_base.eo.c"
+#include "efl_object.eo.c"
+++ /dev/null
-abstract Eo.Class ()
-{
- data: null;
-}
#include "Eo.h"
-#include "eo_class.eo.c"
-#include "eo_interface.eo.c"
+#include "efl_class.eo.c"
+#include "efl_interface.eo.c"
#define EO_FREED_EINA_MAGIC 0xa186bb32
#define EO_FREED_EINA_MAGIC_STR "Eo - Freed object"
#define EO_CLASS_EINA_MAGIC 0xa186ba32
-#define EO_CLASS_EINA_MAGIC_STR "Eo Class"
+#define EO_CLASS_EINA_MAGIC_STR "Efl Class"
#define EO_MAGIC_RETURN_VAL(d, magic, ret) \
do { \
#define DBG(...) EINA_LOG_DOM_DBG(_eo_log_dom, __VA_ARGS__)
typedef uintptr_t Eo_Id;
-typedef struct _Eo_Class _Eo_Class;
+typedef struct _Efl_Class _Eo_Class;
typedef struct _Eo_Header Eo_Header;
/* Retrieves the pointer to the object from the id */
{
Eo_Header header;
EINA_INLIST;
- const _Eo_Class *klass;
+ const _Efl_Class *klass;
#ifdef EO_DEBUG
Eina_Inlist *xrefs;
Eina_Inlist *data_xrefs;
typedef struct
{
eo_op_func_type func;
- const _Eo_Class *src;
+ const _Efl_Class *src;
} op_type_funcs;
struct _Dich_Chain1
typedef struct
{
- const _Eo_Class *klass;
+ const _Efl_Class *klass;
size_t offset;
} Eo_Extension_Data_Offset;
-struct _Eo_Class
+struct _Efl_Class
{
Eo_Header header;
- const _Eo_Class *parent;
- const Eo_Class_Description *desc;
+ const _Efl_Class *parent;
+ const Efl_Class_Description *desc;
Eo_Vtable vtable;
- const _Eo_Class **extensions;
+ const _Efl_Class **extensions;
Eo_Extension_Data_Offset *extn_data_off;
- const _Eo_Class **mro;
+ const _Efl_Class **mro;
/* cached object for faster allocation */
struct {
}
static inline
-Eo_Class *_eo_class_id_get(const _Eo_Class *klass)
+Efl_Class *_eo_class_id_get(const _Eo_Class *klass)
{
return _eo_header_id_get((Eo_Header *) klass);
}
}
static inline void
-_eo_del_internal(const char *file, int line, _Eo_Object *obj)
+_efl_del_internal(const char *file, int line, _Eo_Object *obj)
{
/* We need that for the event callbacks that may ref/unref. */
obj->refcount++;
- const _Eo_Class *klass = obj->klass;
+ const _Efl_Class *klass = obj->klass;
- eo_event_callback_call(_eo_obj_id_get(obj), EO_EVENT_DEL, NULL);
+ efl_event_callback_call(_eo_obj_id_get(obj), EFL_EVENT_DEL, NULL);
_eo_condtor_reset(obj);
- eo_destructor(_eo_obj_id_get(obj));
+ efl_destructor(_eo_obj_id_get(obj));
if (!obj->condtor_done)
{
Eo *emb_obj;
EINA_LIST_FOREACH_SAFE(obj->composite_objects, itr, itr_n, emb_obj)
{
- eo_composite_detach(_eo_obj_id_get(obj), emb_obj);
+ efl_composite_detach(_eo_obj_id_get(obj), emb_obj);
}
}
static inline void
_eo_free(_Eo_Object *obj)
{
- _Eo_Class *klass = (_Eo_Class*) obj->klass;
+ _Efl_Class *klass = (_Eo_Class*) obj->klass;
#ifdef EO_DEBUG
if (obj->datarefcount)
obj->del_triggered = EINA_TRUE;
- _eo_del_internal(__FILE__, __LINE__, obj);
+ _efl_del_internal(__FILE__, __LINE__, obj);
#ifdef EO_DEBUG
/* If for some reason it's not empty, clear it. */
while (obj->xrefs)
} while (0)
#define EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, ret) \
- _Eo_Class *klass; \
+ _Efl_Class *klass; \
do { \
if (!klass_id) return ret; \
klass = _eo_class_pointer_get(klass_id); \
} while (0)
#define EO_CLASS_POINTER_RETURN(klass_id, klass) \
- _Eo_Class *klass; \
+ _Efl_Class *klass; \
do { \
if (!klass_id) return; \
klass = _eo_class_pointer_get(klass_id); \
} while (0)
#define EO_CLASS_POINTER_RETURN_VAL(klass_id, klass, ret) \
- _Eo_Class *klass; \
+ _Efl_Class *klass; \
do { \
klass = _eo_class_pointer_get(klass_id); \
if (!klass) return (ret); \
} while (0)
#define EO_CLASS_POINTER_RETURN(klass_id, klass) \
- _Eo_Class *klass; \
+ _Efl_Class *klass; \
do { \
klass = _eo_class_pointer_get(klass_id); \
if (!klass) return; \