From e64e120a51972c44fb8cae88a78bb4aa34f502c7 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 9 Aug 2016 14:10:05 +0100 Subject: [PATCH] Eo: Rename most of Eo to the Efl prefix. This includes Eo.Base -> Efl.Object and many (but not all) of the eo functions. This commit is only for eo itself, not the rest of the EFL. --- src/Makefile_Eo.am | 8 +- src/lib/eo/Eo.h | 204 +++++------ src/lib/eo/efl_class.eo | 4 + .../eo/{eo_interface.eo => efl_interface.eo} | 4 +- src/lib/eo/{eo_base.eo => efl_object.eo} | 86 ++--- ...{eo_override.eo => efl_object_override.eo} | 2 +- src/lib/eo/eo.c | 184 +++++----- src/lib/eo/eo_base_class.c | 340 +++++++++--------- src/lib/eo/eo_class.eo | 4 - src/lib/eo/eo_class_class.c | 4 +- src/lib/eo/eo_private.h | 36 +- src/lib/eo/eo_ptr_indirection.h | 8 +- 12 files changed, 442 insertions(+), 442 deletions(-) create mode 100644 src/lib/eo/efl_class.eo rename src/lib/eo/{eo_interface.eo => efl_interface.eo} (56%) rename src/lib/eo/{eo_base.eo => efl_object.eo} (81%) rename src/lib/eo/{eo_override.eo => efl_object_override.eo} (82%) delete mode 100644 src/lib/eo/eo_class.eo diff --git a/src/Makefile_Eo.am b/src/Makefile_Eo.am index 7d4c09b3af..f41c09f3c9 100644 --- a/src/Makefile_Eo.am +++ b/src/Makefile_Eo.am @@ -2,10 +2,10 @@ ### 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) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index b3b4df6781..5821288015 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -89,8 +89,8 @@ extern "C" { * * 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 * @@ -113,14 +113,14 @@ typedef struct _Eo_Object _Eo_Object; 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 @@ -174,10 +174,10 @@ typedef enum _Eo_Op_Type Eo_Op_Type; */ 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. @@ -196,10 +196,10 @@ EAPI extern const Eina_Value_Type *EO_DBG_INFO_TYPE; * @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); @@ -214,17 +214,17 @@ EO_DBG_INFO_LIST_APPEND(Eo_Dbg_Info *list, const char *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); \ @@ -235,10 +235,10 @@ do { \ } 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); /** * @} @@ -262,40 +262,40 @@ typedef unsigned int Eo_Op; */ /** - * @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 } @@ -304,7 +304,7 @@ typedef unsigned int Eo_Op; */ /** - * @addtogroup Eo_Class Eo Class + * @addtogroup Efl_Class Efl Class * @{ */ @@ -321,13 +321,13 @@ typedef unsigned int Eo_Op; * 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)) \ { \ @@ -365,7 +365,7 @@ class_get_func_name(void) \ /** * 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. */ @@ -374,10 +374,10 @@ enum _Eo_Class_Type }; /** - * @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 @@ -385,12 +385,12 @@ typedef enum _Eo_Class_Type Eo_Class_Type; */ #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 @@ -400,33 +400,33 @@ typedef struct _Eo_Op_Description */ 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. @@ -440,7 +440,7 @@ typedef struct _Eo_Class_Description Eo_Class_Description; * * @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. @@ -479,7 +479,7 @@ EAPI Eina_Bool eo_override(Eo *obj, const Eo_Ops *ops); * @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) } /** @@ -490,7 +490,7 @@ EAPI Eina_Bool eo_override(Eo *obj, const Eo_Ops *ops); * * 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. @@ -499,7 +499,7 @@ EAPI Eina_Bool eo_isa(const Eo *obj, const Eo_Class *klass); * * @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); /** * @} @@ -521,7 +521,7 @@ EAPI Eina_Bool eo_init(void); */ 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) } @@ -679,7 +679,7 @@ EAPI void _eo_call_end(Eo_Op_Call_Data *call); // 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); /*****************************************************************************/ @@ -690,7 +690,7 @@ EAPI Eo *eo_super(const Eo *obj, const Eo_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); @@ -757,7 +757,7 @@ 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. @@ -770,7 +770,7 @@ EAPI Eo * _eo_add_internal_start(const char *file, int line, const Eo_Class *kla * @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) @@ -798,7 +798,7 @@ EAPI void *eo_data_scope_get(const Eo *obj, const Eo_Class *klass); * * @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) @@ -888,18 +888,18 @@ EAPI int eo_ref_get(const Eo *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 @@ -907,9 +907,9 @@ EAPI void eo_del_intercept_set(Eo *obj, Eo_Del_Intercept del_intercept_func); * 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) @@ -988,27 +988,27 @@ EAPI Eina_Bool eo_manual_free(Eo *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 @@ -1016,11 +1016,11 @@ typedef void (*eo_key_data_free_func)(void *); * @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) /** @@ -1029,22 +1029,22 @@ typedef void (*eo_key_data_free_func)(void *); * @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 @@ -1057,7 +1057,7 @@ typedef void (*eo_key_data_free_func)(void *); * 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 @@ -1081,24 +1081,24 @@ EAPI const Eo_Event_Description *eo_base_legacy_only_event_description_get(const * 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. @@ -1106,24 +1106,24 @@ EAPI const Eo_Event_Description *eo_base_legacy_only_event_description_get(const * * 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) /** diff --git a/src/lib/eo/efl_class.eo b/src/lib/eo/efl_class.eo new file mode 100644 index 0000000000..367848a49e --- /dev/null +++ b/src/lib/eo/efl_class.eo @@ -0,0 +1,4 @@ +abstract Efl.Class () +{ + data: null; +} diff --git a/src/lib/eo/eo_interface.eo b/src/lib/eo/efl_interface.eo similarity index 56% rename from src/lib/eo/eo_interface.eo rename to src/lib/eo/efl_interface.eo index e2a3e9cf58..4e404065f7 100644 --- a/src/lib/eo/eo_interface.eo +++ b/src/lib/eo/efl_interface.eo @@ -1,7 +1,7 @@ -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.]] } diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/efl_object.eo similarity index 81% rename from src/lib/eo/eo_base.eo rename to src/lib/eo/efl_object.eo index d8387776b5..ab03526d42 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/efl_object.eo @@ -1,6 +1,6 @@ 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.]] @@ -10,32 +10,32 @@ struct Eo.Event.Description { 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, @@ -43,9 +43,9 @@ type Eo.Callback_Priority: short; [[Callback priority value. Range is -32k - 32k \@ref EO_CALLBACK_PRIORITY_DEFAULT ]] -abstract Eo.Base () +abstract Efl.Object () { - eo_prefix: eo; + eo_prefix: efl; methods { @property parent { @@ -53,7 +53,7 @@ abstract Eo.Base () 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 @@ -70,13 +70,13 @@ abstract Eo.Base () 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. @@ -156,16 +156,16 @@ abstract Eo.Base () 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. @@ -175,7 +175,7 @@ abstract Eo.Base () } 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. @@ -188,7 +188,7 @@ abstract Eo.Base () 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. @@ -200,13 +200,13 @@ abstract Eo.Base () 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 { @@ -244,12 +244,12 @@ abstract Eo.Base () } 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]] } } } @@ -267,12 +267,12 @@ abstract Eo.Base () } 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]] } } } @@ -325,9 +325,9 @@ abstract Eo.Base () ]] 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]] } } @@ -335,8 +335,8 @@ abstract Eo.Base () [[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]] } } @@ -348,8 +348,8 @@ abstract Eo.Base () ]] 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]] } } @@ -359,14 +359,14 @@ abstract Eo.Base () ]] 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, @@ -385,26 +385,26 @@ abstract Eo.Base () 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), eina_iterator_free) @warn_unused; + return: free(own(iterator), eina_iterator_free) @warn_unused; } composite_attach { [[Make an object a composite object of another. @@ -416,7 +416,7 @@ abstract Eo.Base () 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.]] } @@ -428,7 +428,7 @@ abstract Eo.Base () 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.]] } diff --git a/src/lib/eo/eo_override.eo b/src/lib/eo/efl_object_override.eo similarity index 82% rename from src/lib/eo/eo_override.eo rename to src/lib/eo/efl_object_override.eo index 8a3c404d9b..4d2074b6e2 100644 --- a/src/lib/eo/eo_override.eo +++ b/src/lib/eo/efl_object_override.eo @@ -1,4 +1,4 @@ -abstract Eo.Override () +abstract Efl.Object.Override () { [[A special class to pass to #eo_super() when using #eo_override() diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 0690c446f9..33406df0c0 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -13,7 +13,7 @@ #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 @@ -23,7 +23,7 @@ EAPI Eina_Spinlock _eo_class_creation_lock; 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; @@ -35,8 +35,8 @@ static size_t _eo_sz = 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 */ @@ -53,7 +53,7 @@ static inline void _eo_data_xunref_internal(_Eo_Object *obj, void *data, const _ * 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); \ }) @@ -106,10 +106,10 @@ _vtable_func_get(const Eo_Vtable *vtable, Eo_Op op) } /* 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; @@ -130,7 +130,7 @@ _eo_op_class_get(Eo_Op op) } 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); @@ -139,7 +139,7 @@ _vtable_func_set(Eo_Vtable *vtable, const _Eo_Class *klass, Eo_Op op, eo_op_func 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; @@ -189,18 +189,18 @@ _eo_is_a_class(const Eo *eo_id) 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"; @@ -222,9 +222,9 @@ _eo_op_desc_name_get(const Eo_Op_Description *desc) } 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; @@ -251,11 +251,11 @@ _eo_kls_itr_next(const _Eo_Class *orig_kls, const _Eo_Class *cur_klass, Eo_Op op /************************************ 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); @@ -269,8 +269,8 @@ eo_super(const Eo *obj, const Eo_Class *cur_klass) 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; @@ -301,9 +301,9 @@ _eo_call_resolve(Eo *eo_id, const char *func_name, Eo_Op_Call_Data *call, Eo_Cal 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; @@ -494,13 +494,13 @@ _eo_api_func_equal(const void *api_func1, const void *api_func2) /* 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) { @@ -555,13 +555,13 @@ _eo_api_op_id_get(const void *api_func) /* 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; @@ -610,7 +610,7 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const Eo_Ops *ops, const _Eo_Class *hiera } 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); @@ -649,7 +649,7 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const Eo_Ops *ops, const _Eo_Class *hiera } 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; @@ -700,10 +700,10 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo 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", @@ -711,7 +711,7 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo /* 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)) @@ -719,7 +719,7 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo 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); } @@ -739,7 +739,7 @@ _eo_add_internal_end(Eo *eo_id, Eo *finalized_id) 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); @@ -770,17 +770,17 @@ _eo_add_internal_end(Eo *eo_id, Eo *finalized_id) 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); } @@ -795,7 +795,7 @@ _eo_add_end(Eo *eo_id, Eina_Bool is_ref, Eina_Bool is_fallback) /*****************************************************************************/ -EAPI const Eo_Class * +EAPI const Efl_Class * eo_class_get(const Eo *eo_id) { if (_eo_is_a_class(eo_id)) @@ -810,9 +810,9 @@ eo_class_get(const Eo *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)) { @@ -836,9 +836,9 @@ _vtable_init(Eo_Vtable *vtable, size_t size) } 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; @@ -849,9 +849,9 @@ _eo_class_base_op_init(_Eo_Class *klass) #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) @@ -892,7 +892,7 @@ _eo_class_list_remove_duplicates(Eina_List* list) } 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; @@ -901,11 +901,11 @@ _eo_class_mro_add(Eina_List *mro, const _Eo_Class *klass) /* 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); } @@ -917,12 +917,12 @@ _eo_class_mro_add(Eina_List *mro, const _Eo_Class *klass) } 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) @@ -969,7 +969,7 @@ _eo_class_mro_init(const Eo_Class_Description *desc, const _Eo_Class *parent, Ei } static void -_eo_class_constructor(_Eo_Class *klass) +_eo_class_constructor(_Efl_Class *klass) { klass->constructed = EINA_TRUE; @@ -978,7 +978,7 @@ _eo_class_constructor(_Eo_Class *klass) } static void -eo_class_free(_Eo_Class *klass) +eo_class_free(_Efl_Class *klass) { void *data; @@ -1015,7 +1015,7 @@ _eo_classes_release(void) #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); @@ -1033,10 +1033,10 @@ _eo_classes_expand(void) _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) @@ -1048,7 +1048,7 @@ _eo_classes_expand(void) 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) { @@ -1057,13 +1057,13 @@ _eo_classes_expand(void) } #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; @@ -1071,7 +1071,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) 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)) { @@ -1119,7 +1119,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) { 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); @@ -1127,7 +1127,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *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: @@ -1145,7 +1145,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) 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); } @@ -1161,7 +1161,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) 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); } @@ -1169,7 +1169,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) /* 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); @@ -1196,8 +1196,8 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) 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) { @@ -1218,8 +1218,8 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) /* 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; @@ -1231,8 +1231,8 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) /* 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; @@ -1248,7 +1248,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) /* 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) { @@ -1275,7 +1275,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) /* Flatten the function array */ { - const _Eo_Class **mro_itr = klass->mro; + const _Efl_Class **mro_itr = klass->mro; for ( ; *mro_itr ; mro_itr++) ; @@ -1288,11 +1288,11 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...) /* 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); @@ -1341,7 +1341,7 @@ EAPI Eina_Bool 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) @@ -1377,7 +1377,7 @@ eo_override(Eo *eo_id, const Eo_Ops *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); @@ -1496,7 +1496,7 @@ ___eo_ref2_reset(const Eo *obj_id) 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); @@ -1504,7 +1504,7 @@ eo_del_intercept_set(Eo *obj_id, Eo_Del_Intercept del_intercept_func) } 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); @@ -1525,7 +1525,7 @@ _eo_condtor_done(Eo *obj_id) } 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)) { @@ -1536,7 +1536,7 @@ _eo_data_scope_safe_get(const _Eo_Object *obj, const _Eo_Class *klass) } 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; @@ -1564,7 +1564,7 @@ _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) +_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) @@ -1592,7 +1592,7 @@ static inline void _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) @@ -1634,7 +1634,7 @@ _eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj) } 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); @@ -1661,12 +1661,12 @@ eo_data_scope_get(const Eo *obj_id, const Eo_Class *klass_id) } 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); @@ -1711,7 +1711,7 @@ eo_init(void) 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; @@ -1775,7 +1775,7 @@ EAPI Eina_Bool 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; diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index e7742b80df..89d3618a2f 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -20,14 +20,14 @@ typedef struct 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; @@ -36,7 +36,7 @@ typedef struct 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, @@ -61,30 +61,30 @@ typedef struct 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; } @@ -98,11 +98,11 @@ _eo_generic_data_node_free(Eo_Generic_Data_Node *node) 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); @@ -113,10 +113,10 @@ _eo_generic_data_node_free(Eo_Generic_Data_Node *node) } 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; @@ -131,9 +131,9 @@ _eo_generic_data_del_all(Eo *obj EINA_UNUSED, Eo_Base_Data *pd) } 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)); @@ -141,10 +141,10 @@ _eo_key_generic_direct_del(Eo_Base_Data *pd, Eo_Generic_Data_Node *node, Eina_Bo } 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) { @@ -160,10 +160,10 @@ _eo_key_generic_del(const Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key /* 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) @@ -187,7 +187,7 @@ _key_generic_set(const Eo *obj, Eo_Base_Data *pd, const char *key, const void *d } } - _eo_base_extension_need(pd); + _efl_object_extension_need(pd); ext = pd->ext; if (ext) { @@ -206,10 +206,10 @@ _key_generic_set(const Eo *obj, Eo_Base_Data *pd, const char *key, const void *d } 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; @@ -238,24 +238,24 @@ static void _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; @@ -263,53 +263,53 @@ _eo_base_key_ref_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key, con 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 @@ -318,13 +318,13 @@ _eo_base_name_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *name) 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; @@ -386,8 +386,8 @@ _ismultiglob(const char *match) 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; @@ -441,13 +441,13 @@ _eo_base_name_find(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *search) 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; } } @@ -459,10 +459,10 @@ _eo_base_name_find(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *search) 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; } } @@ -472,10 +472,10 @@ _eo_base_name_find(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *search) 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; } } @@ -485,12 +485,12 @@ _eo_base_name_find(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *search) } 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 @@ -499,24 +499,24 @@ _eo_base_comment_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *comment) 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 { @@ -525,7 +525,7 @@ _eo_base_del(const Eo *obj, Eo_Base_Data *pd EINA_UNUSED) } 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; @@ -534,9 +534,9 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id) 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, @@ -559,8 +559,8 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id) /* 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)) { @@ -582,23 +582,23 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id) } 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; } @@ -614,7 +614,7 @@ struct _Eo_Children_Iterator }; 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; @@ -629,18 +629,18 @@ _eo_children_iterator_next(Eo_Children_Iterator *it, void **data) } 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); @@ -659,16 +659,16 @@ _eo_children_iterator_free(Eo_Children_Iterator *it) } 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); @@ -689,15 +689,15 @@ _eo_base_children_iterator_new(Eo *obj_id, Eo_Base_Data *pd) 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; } @@ -705,11 +705,11 @@ _eo_base_dbg_info_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd EINA_UNUSED, Eo_Dbg_ /* 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++; @@ -718,16 +718,16 @@ _wref_count(Eo_Base_Data *pd) } 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; @@ -741,10 +741,10 @@ _eo_base_wref_add(Eo *obj, Eo_Base_Data *pd, Eo **wref) } 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) { @@ -795,17 +795,17 @@ _eo_base_wref_del(Eo *obj, Eo_Base_Data *pd, Eo **wref) { 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; @@ -822,14 +822,14 @@ _wref_destruct(Eo_Base_Data *pd) /* 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); @@ -843,7 +843,7 @@ eo_base_legacy_only_event_description_get(const char *_event_name) } 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; } @@ -851,7 +851,7 @@ _legacy_event_desc_is(const Eo_Event_Description *desc) 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); } @@ -864,12 +864,12 @@ struct _Eo_Callback_Description 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; @@ -877,7 +877,7 @@ struct _Eo_Callback_Description /* 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; @@ -909,7 +909,7 @@ _eo_callback_remove(Eo_Base_Data *pd, Eo_Callback_Description *cb) /* 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) { @@ -920,7 +920,7 @@ _eo_callback_remove_all(Eo_Base_Data *pd) } static void -_eo_callbacks_clear(Eo_Base_Data *pd) +_eo_callbacks_clear(Efl_Object_Data *pd) { Eo_Callback_Description *cb = NULL; @@ -947,7 +947,7 @@ _eo_callbacks_clear(Eo_Base_Data *pd) } 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); @@ -969,13 +969,13 @@ _eo_callbacks_sorted_insert(Eo_Base_Data *pd, Eo_Callback_Description *cb) } 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)); @@ -991,15 +991,15 @@ _eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data *pd, 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; @@ -1009,12 +1009,12 @@ _eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd, 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; } } @@ -1024,9 +1024,9 @@ _eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd, } 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; @@ -1044,14 +1044,14 @@ _eo_base_event_callback_array_priority_add(Eo *obj, Eo_Base_Data *pd, 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; @@ -1065,7 +1065,7 @@ _eo_base_event_callback_array_del(Eo *obj, Eo_Base_Data *pd, 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; } } @@ -1075,7 +1075,7 @@ _eo_base_event_callback_array_del(Eo *obj, Eo_Base_Data *pd, } 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))) @@ -1087,8 +1087,8 @@ _cb_desc_match(const Eo_Event_Description *a, const Eo_Event_Description *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; @@ -1138,7 +1138,7 @@ _eo_base_event_callback_call(Eo *obj_id, Eo_Base_Data *pd, { 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++) { @@ -1205,56 +1205,56 @@ end: } 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) { @@ -1267,19 +1267,19 @@ _eo_base_event_thaw(Eo *obj, Eo_Base_Data *pd) } 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) { @@ -1292,18 +1292,18 @@ _eo_base_event_global_thaw(Eo *klass EINA_UNUSED, void *pd EINA_UNUSED) } 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; @@ -1316,13 +1316,13 @@ _eo_base_composite_attach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_ } } - 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); @@ -1331,35 +1331,35 @@ _eo_base_composite_attach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_ } 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); @@ -1375,7 +1375,7 @@ _eo_dbg_info_setup(const Eina_Value_Type *type, void *mem) 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); @@ -1385,10 +1385,10 @@ _eo_dbg_info_flush(const Eina_Value_Type *type EINA_UNUSED, void *_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)); @@ -1399,7 +1399,7 @@ static Eina_Bool _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) { @@ -1419,7 +1419,7 @@ _eo_dbg_info_convert_to(const Eina_Value_Type *type EINA_UNUSED, const Eina_Valu 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; @@ -1429,15 +1429,15 @@ _eo_dbg_info_pset(const Eina_Value_Type *type EINA_UNUSED, void *_mem, const voi 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, @@ -1454,11 +1454,11 @@ EAPI const Eina_Value_Type *EO_DBG_INFO_TYPE = &_EO_DBG_INFO_TYPE; /* 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)); @@ -1468,10 +1468,10 @@ _eo_base_constructor(Eo *obj, Eo_Base_Data *pd EINA_UNUSED) } 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)); @@ -1481,7 +1481,7 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *pd) 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 */ @@ -1491,19 +1491,19 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *pd) 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); @@ -1517,7 +1517,7 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *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; } @@ -1525,22 +1525,22 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *pd) } 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" diff --git a/src/lib/eo/eo_class.eo b/src/lib/eo/eo_class.eo deleted file mode 100644 index 4e37f3413e..0000000000 --- a/src/lib/eo/eo_class.eo +++ /dev/null @@ -1,4 +0,0 @@ -abstract Eo.Class () -{ - data: null; -} diff --git a/src/lib/eo/eo_class_class.c b/src/lib/eo/eo_class_class.c index 9d563f7264..e89b177543 100644 --- a/src/lib/eo/eo_class_class.c +++ b/src/lib/eo/eo_class_class.c @@ -4,5 +4,5 @@ #include "Eo.h" -#include "eo_class.eo.c" -#include "eo_interface.eo.c" +#include "efl_class.eo.c" +#include "efl_interface.eo.c" diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h index d47fcca93a..4b2d4d1163 100644 --- a/src/lib/eo/eo_private.h +++ b/src/lib/eo/eo_private.h @@ -9,7 +9,7 @@ #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 { \ @@ -58,7 +58,7 @@ extern int _eo_log_dom; #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 */ @@ -98,7 +98,7 @@ struct _Eo_Object { Eo_Header header; EINA_INLIST; - const _Eo_Class *klass; + const _Efl_Class *klass; #ifdef EO_DEBUG Eina_Inlist *xrefs; Eina_Inlist *data_xrefs; @@ -129,7 +129,7 @@ typedef void (*eo_op_func_type)(Eo *, void *class_data, va_list *list); typedef struct { eo_op_func_type func; - const _Eo_Class *src; + const _Efl_Class *src; } op_type_funcs; struct _Dich_Chain1 @@ -139,23 +139,23 @@ 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 { @@ -200,7 +200,7 @@ Eo *_eo_header_id_get(const Eo_Header *header) } 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); } @@ -218,18 +218,18 @@ _eo_condtor_reset(_Eo_Object *obj) } 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) { @@ -243,7 +243,7 @@ _eo_del_internal(const char *file, int line, _Eo_Object *obj) 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); } } @@ -260,7 +260,7 @@ _obj_is_override(_Eo_Object *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) @@ -331,7 +331,7 @@ _eo_unref(_Eo_Object *obj) 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) diff --git a/src/lib/eo/eo_ptr_indirection.h b/src/lib/eo/eo_ptr_indirection.h index 7d7fc84bc2..d7f6dd3b15 100644 --- a/src/lib/eo/eo_ptr_indirection.h +++ b/src/lib/eo/eo_ptr_indirection.h @@ -46,7 +46,7 @@ void _eo_pointer_error(const char *msg); } 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); \ @@ -57,7 +57,7 @@ void _eo_pointer_error(const char *msg); } 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); \ @@ -96,7 +96,7 @@ void _eo_pointer_error(const char *msg); } 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); \ @@ -104,7 +104,7 @@ void _eo_pointer_error(const char *msg); } 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; \