Generic object system. More...
Modules | |
Eo's Debug information helper. | |
Eo's Event Handling | |
Efl Class | |
Eo's Class class. | |
Eo's Base class. | |
Data Structures | |
struct | _Efl_Event |
A parameter passed in event callbacks holding extra event parameters. More... | |
struct | _Efl_Callback_Array_Item |
An item in an array of callback desc/func. More... | |
struct | _Efl_Object_Op_Call_Data |
struct | _Efl_Object_Call_Cache_Index |
struct | _Efl_Object_Call_Cache_Entry |
struct | _Efl_Object_Call_Cache_Off |
struct | _Efl_Object_Call_Cache |
Macros | |
#define | _EFL_CLASS_EO_CLASS_TYPE |
#define | _EFL_OBJECT_EO_CLASS_TYPE |
#define | EO_CLASS EFL_OBJECT_CLASS |
#define | EFL_NOOP ((Efl_Object_Op) 0) |
A special Efl_Object_Op meaning "No operation". | |
#define | EFL_OBJECT_CALL_CACHE_SIZE 1 |
#define | EFL_FUNC_CALL(...) __VA_ARGS__ |
#define | EFL_FUNC_COMMON_OP_FUNC(Name) ((const void *) Name) |
#define | EFL_FUNC_TLS __thread |
#define | EFL_FUNC_COMMON_OP(Obj, Name, DefRet) |
#define | EFL_FUNC_COMMON_OP_END(Obj, Name, DefRet) |
#define | _EFL_OBJECT_API_BEFORE_HOOK |
#define | _EFL_OBJECT_API_AFTER_HOOK |
#define | _EFL_OBJECT_API_CALL_HOOK(x) x |
#define | _EFL_OBJECT_FUNC_BODY(Name, ObjType, Ret, DefRet) |
#define | _EFL_OBJECT_VOID_FUNC_BODY(Name, ObjType) |
#define | _EFL_OBJECT_FUNC_BODYV(Name, ObjType, Ret, DefRet, Arguments, ...) |
#define | _EFL_OBJECT_VOID_FUNC_BODYV(Name, ObjType, Arguments, ...) |
#define | EFL_FUNC_BODY(Name, Ret, DefRet) _EFL_OBJECT_FUNC_BODY(Name, Eo *, Ret, DefRet) |
#define | EFL_VOID_FUNC_BODY(Name) _EFL_OBJECT_VOID_FUNC_BODY(Name, Eo *) |
#define | EFL_FUNC_BODYV(Name, Ret, DefRet, Arguments, ...) _EFL_OBJECT_FUNC_BODYV(Name, Eo *, Ret, DefRet, EFL_FUNC_CALL(Arguments), __VA_ARGS__) |
#define | EFL_VOID_FUNC_BODYV(Name, Arguments, ...) _EFL_OBJECT_VOID_FUNC_BODYV(Name, Eo *, EFL_FUNC_CALL(Arguments), __VA_ARGS__) |
#define | EFL_FUNC_BODY_CONST(Name, Ret, DefRet) _EFL_OBJECT_FUNC_BODY(Name, const Eo *, Ret, DefRet) |
#define | EFL_VOID_FUNC_BODY_CONST(Name) _EFL_OBJECT_VOID_FUNC_BODY(Name, const Eo *) |
#define | EFL_FUNC_BODYV_CONST(Name, Ret, DefRet, Arguments, ...) _EFL_OBJECT_FUNC_BODYV(Name, const Eo *, Ret, DefRet, EFL_FUNC_CALL(Arguments), __VA_ARGS__) |
#define | EFL_VOID_FUNC_BODYV_CONST(Name, Arguments, ...) _EFL_OBJECT_VOID_FUNC_BODYV(Name, const Eo *, EFL_FUNC_CALL(Arguments), __VA_ARGS__) |
#define | _EFL_OBJECT_OP_API_ENTRY(a) (void*)a |
#define | EFL_OBJECT_OP_FUNC(_api, _private) { _EFL_OBJECT_OP_API_ENTRY(_api), (void*)_private } |
#define | efl_added _efl_added_get() |
#define | _efl_add_common(klass, parent, is_ref, ...) |
#define | efl_add(klass, parent, ...) _efl_add_common(klass, parent, EINA_FALSE, ##__VA_ARGS__) |
Create a new object and call its constructor(If it exits). More... | |
#define | efl_add_ref(klass, parent, ...) _efl_add_common(klass, parent, EINA_TRUE, ##__VA_ARGS__) |
Create a new object and call its constructor(If it exists). More... | |
#define | efl_data_xref(obj, klass, ref_obj) efl_data_xref_internal(__FILE__, __LINE__, obj, klass, ref_obj) |
Use this macro if you want to associate a referencer object. More... | |
#define | efl_data_ref(obj, klass) efl_data_xref_internal(__FILE__, __LINE__, obj, klass, (const Eo *)obj) |
Use this macro if you don't want to associate a referencer object. More... | |
#define | efl_data_xunref(obj, data, ref_obj) efl_data_xunref_internal(obj, data, ref_obj) |
Use this function if you used efl_data_xref to reference the data. More... | |
#define | efl_data_unref(obj, data) efl_data_xunref_internal(obj, data, obj) |
Use this function if you used efl_data_ref to reference the data. More... | |
#define | efl_xref(obj, ref_obj) efl_xref_internal(__FILE__, __LINE__, obj, ref_obj) |
Convenience macro around efl_xref_internal() More... | |
#define | EAPI |
#define | EAPI |
Typedefs | |
typedef struct _Eo_Object | _Eo_Object |
typedef struct _Eo_Opaque | Eo |
The basic Object type. | |
typedef Eo | Efl_Class |
typedef Eo | Efl_Object |
typedef void(* | Efl_Del_Intercept) (Eo *obj_id) |
A function to be called on object deletion/destruction instead of normal destruction taking place. More... | |
typedef Eo | Efl_Future |
The type of Efl Future used in asynchronous operation, the read side of a promise. | |
typedef struct _Efl_Event | Efl_Event |
typedef void(* | Efl_Event_Cb) (void *data, const Efl_Event *event) |
An event callback prototype. More... | |
typedef short | Efl_Callback_Priority |
Callback priority value. More... | |
typedef struct _Efl_Callback_Array_Item | Efl_Callback_Array_Item |
typedef unsigned int | Efl_Object_Op |
The Eo operation type id. | |
typedef struct _Efl_Domain_Data | Efl_Domain_Data |
An opaque handle for private domain data. | |
typedef struct _Efl_Object_Op_Call_Data | Efl_Object_Op_Call_Data |
typedef struct _Efl_Object_Call_Cache_Index | Efl_Object_Call_Cache_Index |
typedef struct _Efl_Object_Call_Cache_Entry | Efl_Object_Call_Cache_Entry |
typedef struct _Efl_Object_Call_Cache_Off | Efl_Object_Call_Cache_Off |
typedef struct _Efl_Object_Call_Cache | Efl_Object_Call_Cache |
typedef Eo | Efl_Class |
The basic class type - should be removed, just for compat. | |
Enumerations | |
enum | Efl_Id_Domain { EFL_ID_DOMAIN_INVALID = -1, EFL_ID_DOMAIN_MAIN = 0, EFL_ID_DOMAIN_SHARED = 1, EFL_ID_DOMAIN_THREAD } |
The virtual allocation domain where an object lives. More... | |
Functions | |
EOAPI Eina_Bool | efl_event_callback_priority_add (Eo *obj, const Efl_Event_Description *desc, Efl_Callback_Priority priority, Efl_Event_Cb cb, const void *data) |
Add a callback for an event with a specific priority. More... | |
EOAPI Eina_Bool | efl_event_callback_del (Eo *obj, const Efl_Event_Description *desc, Efl_Event_Cb func, const void *user_data) |
Delete a callback with a specific data associated to it for an event. More... | |
EOAPI Eina_Bool | efl_event_callback_array_priority_add (Eo *obj, const Efl_Callback_Array_Item *array, Efl_Callback_Priority priority, const void *data) |
Add an array of callbacks created by EFL_CALLBACKS_ARRAY_DEFINE for an event with a specific priority. More... | |
EOAPI Eina_Bool | efl_event_callback_array_del (Eo *obj, const Efl_Callback_Array_Item *array, const void *user_data) |
Del a callback array with a specific data associated to it for an event. More... | |
EOAPI Eina_Bool | efl_event_callback_call (Eo *obj, const Efl_Event_Description *desc, void *event_info) |
Call the callbacks for an event of an object. More... | |
EOAPI Eina_Bool | efl_event_callback_legacy_call (Eo *obj, const Efl_Event_Description *desc, void *event_info) |
Call the callbacks for an event of an object. More... | |
EOAPI Eina_Bool | efl_future_link (Eo *obj, Efl_Future *link) |
Track a future life cycle and cancel it if the object dies. More... | |
Eina_Bool | efl_object_init (void) |
Init the eo subsystem. More... | |
Eina_Bool | efl_object_shutdown (void) |
Shutdown the eo subsystem. More... | |
Efl_Id_Domain | efl_domain_get (void) |
Get the native domain for the current thread. More... | |
Eina_Bool | efl_domain_switch (Efl_Id_Domain domain) |
Switch the native domain for the current thread. More... | |
Efl_Id_Domain | efl_domain_current_get (void) |
Get the current domain used for allocating new objects. More... | |
Eina_Bool | efl_domain_current_set (Efl_Id_Domain domain) |
Set the current domain used for allocating new objects. More... | |
Eina_Bool | efl_domain_current_push (Efl_Id_Domain domain) |
Push a new domain onto the domain stack. More... | |
void | efl_domain_current_pop (void) |
Pop a previously pushed domain from the domain stack. More... | |
Efl_Domain_Data * | efl_domain_data_get (void) |
Get an opaque handle to the local native domain eoid data. More... | |
Efl_Id_Domain | efl_domain_data_adopt (Efl_Domain_Data *data_in) |
Adopt a single extra domain to be the current domain. More... | |
Eina_Bool | efl_domain_data_return (Efl_Id_Domain domain) |
Return a domain to its original owning thread. More... | |
Eina_Bool | efl_compatible (const Eo *obj, const Eo *obj_target) |
Check if 2 objects are compatible More... | |
Efl_Object_Op | _efl_object_api_op_id_get (const void *api_func) EINA_DEPRECATED |
Efl_Object_Op | _efl_object_op_api_id_get (const void *api_func, const Eo *obj, const char *api_func_name, const char *file, int line) |
Eina_Bool | _efl_object_call_resolve (Eo *obj, const char *func_name, Efl_Object_Op_Call_Data *call, Efl_Object_Call_Cache *callcache, const char *file, int line) |
void | _efl_object_call_end (Efl_Object_Op_Call_Data *call) |
Eo * | _efl_add_end (Eo *obj, Eina_Bool is_ref, Eina_Bool is_fallback) |
Eo * | efl_super (const Eo *obj, const Efl_Class *cur_klass) |
Prepare a call to the parent class implementation of a function. More... | |
Eo * | efl_cast (const Eo *obj, const Efl_Class *cur_klass) |
Prepare a call to cast to a parent class implementation of a function. More... | |
const Efl_Class * | efl_class_get (const Eo *obj) |
Gets the class of the object. More... | |
Eo * | _efl_added_get (void) |
Eo * | _efl_add_internal_start (const char *file, int line, const Efl_Class *klass_id, Eo *parent, Eina_Bool ref, Eina_Bool is_fallback) |
void * | efl_data_scope_get (const Eo *obj, const Efl_Class *klass) |
Get a pointer to the data of an object for a specific class. More... | |
void * | efl_data_scope_safe_get (const Eo *obj, const Efl_Class *klass) |
Safely get a pointer to the data of an object for a specific class. More... | |
void * | efl_data_xref_internal (const char *file, int line, const Eo *obj, const Efl_Class *klass, const Eo *ref_obj) |
Get a pointer to the data of an object for a specific class and increment the data reference count. More... | |
void | efl_data_xunref_internal (const Eo *obj, void *data, const Eo *ref_obj) |
Decrement the object data reference count by 1. More... | |
Eo * | efl_ref (const Eo *obj) |
Increment the object's reference count by 1. More... | |
void | efl_unref (const Eo *obj) |
Decrement the object's reference count by 1 and free it if needed. More... | |
int | efl_ref_get (const Eo *obj) |
Return the ref count of the object passed. More... | |
void | efl_del_intercept_set (Eo *obj, Efl_Del_Intercept del_intercept_func) |
Set a deletion interceptor function. More... | |
Efl_Del_Intercept | efl_del_intercept_get (const Eo *obj) |
Get the deletion interceptor function. More... | |
void | efl_reuse (const Eo *obj) |
Clears the object so it can be reused (for example in a cache) More... | |
Eo * | efl_xref_internal (const char *file, int line, Eo *obj, const Eo *ref_obj) |
Increment the object's reference count by 1 (and associate the ref with ref_obj) More... | |
void | efl_xunref (Eo *obj, const Eo *ref_obj) |
Decrement the object's reference count by 1 and free it if needed. More... | |
EOAPI void | efl_wref_add (Eo *obj, Efl_Object **wref) |
Add a new weak reference to obj. More... | |
EOAPI void | efl_wref_del (Eo *obj, Efl_Object **wref) |
Delete the weak reference passed. More... | |
EOAPI void | efl_key_data_set (Eo *obj, const char *key, const void *data) |
Generic data with string key on an object. More... | |
EOAPI void * | efl_key_data_get (const Eo *obj, const char *key) |
Generic data with string key on an object. More... | |
EOAPI void | efl_key_ref_set (Eo *obj, const char *key, const Efl_Object *objdata) |
Generic object reference with string key to object. More... | |
EOAPI Efl_Object * | efl_key_ref_get (const Eo *obj, const char *key) |
Generic object reference with string key to object. More... | |
EOAPI void | efl_key_wref_set (Eo *obj, const char *key, const Efl_Object *objdata) |
Generic weak object reference with string key to object. More... | |
EOAPI Efl_Object * | efl_key_wref_get (const Eo *obj, const char *key) |
Generic weak object reference with string key to object. More... | |
EOAPI void | efl_key_value_set (Eo *obj, const char *key, Eina_Value *value) |
Value on with string key on the object. More... | |
EOAPI Eina_Value * | efl_key_value_get (const Eo *obj, const char *key) |
Value on with string key on the object. More... | |
void | efl_manual_free_set (Eo *obj, Eina_Bool manual_free) |
Enable or disable the manual free feature. More... | |
Eina_Bool | efl_manual_free (Eo *obj) |
Frees the object. More... | |
Eina_Bool | efl_destructed_is (const Eo *obj) |
Checks if the object was already descructed (only relevant for manual_free objects). More... | |
int | ___efl_ref2_get (const Eo *obj_id) |
void | ___efl_ref2_reset (const Eo *obj_id) |
Variables | |
EAPI Eina_Lock | _efl_class_creation_lock |
This variable is used for locking purposes in the class_get function defined in EFL_DEFINE_CLASS. More... | |
EAPI unsigned int | _efl_object_init_generation |
This variable stores the current eo init generation. More... | |
Efl_Object * | _Efl_Event::object |
The object the event was called on. More... | |
const Efl_Event_Description * | _Efl_Event::desc |
The event description. More... | |
void * | _Efl_Event::info |
Extra event information passed by the event caller. More... | |
const Efl_Event_Description * | _Efl_Callback_Array_Item::desc |
The event description. More... | |
Efl_Event_Cb | _Efl_Callback_Array_Item::func |
The callback function. More... | |
Eina_Stringshare * | _Efl_Dbg_Info::name |
The name of the part (stringshare). More... | |
Eina_Value | _Efl_Dbg_Info::value |
The value. More... | |
void * | _Efl_Op_Description::api_func |
The EAPI function offering this op. More... | |
void * | _Efl_Op_Description::func |
The static function to call for the op. More... | |
const Efl_Op_Description * | _Efl_Object_Ops::descs |
The op descriptions array of size count. More... | |
size_t | _Efl_Object_Ops::count |
Number of op descriptions. More... | |
unsigned int | _Efl_Class_Description::version |
The current version of eo, use EO_VERSION. | |
const char * | _Efl_Class_Description::name |
The name of the class. More... | |
Efl_Class_Type | _Efl_Class_Description::type |
The type of the class. More... | |
size_t | _Efl_Class_Description::data_size |
The size of data (private + protected + public) this class needs per object. More... | |
Eina_Bool(* | _Efl_Class_Description::class_initializer )(Efl_Class *klass) |
The initializer for the class. | |
void(* | _Efl_Class_Description::class_constructor )(Efl_Class *klass) |
The constructor of the class. More... | |
void(* | _Efl_Class_Description::class_destructor )(Efl_Class *klass) |
The destructor of the class. More... | |
Eo * | _Efl_Object_Op_Call_Data::eo_id |
_Eo_Object * | _Efl_Object_Op_Call_Data::obj |
void * | _Efl_Object_Op_Call_Data::func |
void * | _Efl_Object_Op_Call_Data::data |
void * | _Efl_Object_Op_Call_Data::extn1 |
void * | _Efl_Object_Op_Call_Data::extn2 |
void * | _Efl_Object_Op_Call_Data::extn3 |
void * | _Efl_Object_Op_Call_Data::extn4 |
const void * | _Efl_Object_Call_Cache_Index::klass |
const void * | _Efl_Object_Call_Cache_Entry::func |
int | _Efl_Object_Call_Cache_Off::off |
Efl_Object_Call_Cache_Index | _Efl_Object_Call_Cache::index [EFL_OBJECT_CALL_CACHE_SIZE] |
Efl_Object_Call_Cache_Entry | _Efl_Object_Call_Cache::entry [EFL_OBJECT_CALL_CACHE_SIZE] |
Efl_Object_Call_Cache_Off | _Efl_Object_Call_Cache::off [EFL_OBJECT_CALL_CACHE_SIZE] |
Efl_Object_Op | _Efl_Object_Call_Cache::op |
unsigned int | _Efl_Object_Call_Cache::generation |
Eina_Lock | _efl_class_creation_lock |
This variable is used for locking purposes in the class_get function defined in EFL_DEFINE_CLASS. More... | |
unsigned int | _efl_object_init_generation = 1 |
This variable stores the current eo init generation. More... | |
Generic object system.
#define EFL_FUNC_COMMON_OP | ( | Obj, | |
Name, | |||
DefRet | |||
) |
#define EFL_FUNC_COMMON_OP_END | ( | Obj, | |
Name, | |||
DefRet | |||
) |
#define _EFL_OBJECT_FUNC_BODY | ( | Name, | |
ObjType, | |||
Ret, | |||
DefRet | |||
) |
#define _EFL_OBJECT_VOID_FUNC_BODY | ( | Name, | |
ObjType | |||
) |
#define _EFL_OBJECT_FUNC_BODYV | ( | Name, | |
ObjType, | |||
Ret, | |||
DefRet, | |||
Arguments, | |||
... | |||
) |
#define _EFL_OBJECT_VOID_FUNC_BODYV | ( | Name, | |
ObjType, | |||
Arguments, | |||
... | |||
) |
#define _efl_add_common | ( | klass, | |
parent, | |||
is_ref, | |||
... | |||
) |
#define efl_add | ( | klass, | |
parent, | |||
... | |||
) | _efl_add_common(klass, parent, EINA_FALSE, ##__VA_ARGS__) |
Create a new object and call its constructor(If it exits).
The object returned by this function will always have 1 ref (reference count) irrespective of whether the parent is NULL or not. If the object is created using this function, then it would automatically gets deleted when the parent object is deleted. There is no need to call efl_unref on the child. This is convenient in C.
If you want a more "consistent" behaviour, take a look at efl_add_ref.
klass | the class of the object to create. |
parent | the parent to set to the object. |
... | The ops to run. |
Referenced by ecore_con_eet_client_new(), ecore_con_eet_server_new(), ecore_exe_pipe_run(), ecore_init(), ecore_main_fd_handler_active_set(), ecore_timer_add(), ecore_timer_loop_add(), edje_3d_object_add(), edje_audio_channel_mute_get(), edje_edit_object_add(), edje_shutdown(), eio_init(), elm_fileselector_entry_path_get(), elm_fileselector_entry_selected_set(), elm_fileselector_path_set(), elm_fileselector_selected_set(), elm_web_add(), elm_win_add(), elm_win_fake_add(), elm_win_floating_mode_get(), elm_win_util_dialog_add(), elm_win_util_standard_add(), emotion_object_add(), evas_device_add_full(), evas_new(), evas_object_box_add(), evas_object_grid_add(), evas_object_polygon_add(), evas_object_rectangle_add(), evas_object_smart_add(), evas_object_table_add(), evas_object_text_add(), evas_object_textblock_add(), and evas_object_textgrid_add().
#define efl_add_ref | ( | klass, | |
parent, | |||
... | |||
) | _efl_add_common(klass, parent, EINA_TRUE, ##__VA_ARGS__) |
Create a new object and call its constructor(If it exists).
The object returned by this function has 1 ref for itself, 1 ref from the parent (if exists) and possible other refs if were added during construction. If a child object is created using this, then it won't get deleted when the parent object is deleted until you manually remove the ref by calling efl_unref().
klass | the class of the object to create. |
parent | the parent to set to the object. |
... | The ops to run. |
#define efl_data_xref | ( | obj, | |
klass, | |||
ref_obj | |||
) | efl_data_xref_internal(__FILE__, __LINE__, obj, klass, ref_obj) |
Use this macro if you want to associate a referencer object.
Convenience macro around efl_data_xref_internal()
#define efl_data_ref | ( | obj, | |
klass | |||
) | efl_data_xref_internal(__FILE__, __LINE__, obj, klass, (const Eo *)obj) |
Use this macro if you don't want to associate a referencer object.
Convenience macro around efl_data_xref_internal()
Referenced by evas_gl_new(), and evas_object_smart_callback_description_find().
#define efl_data_xunref | ( | obj, | |
data, | |||
ref_obj | |||
) | efl_data_xunref_internal(obj, data, ref_obj) |
Use this function if you used efl_data_xref to reference the data.
Convenience macro around efl_data_xunref_internal()
#define efl_data_unref | ( | obj, | |
data | |||
) | efl_data_xunref_internal(obj, data, obj) |
Use this function if you used efl_data_ref to reference the data.
Convenience macro around efl_data_unref_internal()
Referenced by evas_gl_free(), and evas_gl_new().
#define efl_xref | ( | obj, | |
ref_obj | |||
) | efl_xref_internal(__FILE__, __LINE__, obj, ref_obj) |
Convenience macro around efl_xref_internal()
Efl_Del_Intercept |
A function to be called on object deletion/destruction instead of normal destruction taking place.
obj_id | The object needing destruction |
typedef void(* Efl_Event_Cb) (void *data, const Efl_Event *event) |
An event callback prototype.
typedef short Efl_Callback_Priority |
Callback priority value.
Range is -32k - 32k. The lower the number, the higher the priority.
See EFL_CALLBACK_PRIORITY_AFTER, EFL_CALLBACK_PRIORITY_BEFORE EFL_CALLBACK_PRIORITY_DEFAULT
enum Efl_Id_Domain |
The virtual allocation domain where an object lives.
You cannot mix objects between domains in the object tree or as direct or indirect references unless you explicitly handle it and ensure the other domain is adopted into your local thread space
EOAPI Eina_Bool efl_event_callback_priority_add | ( | Eo * | obj, |
const Efl_Event_Description * | desc, | ||
Efl_Callback_Priority | priority, | ||
Efl_Event_Cb | cb, | ||
const void * | data | ||
) |
Add a callback for an event with a specific priority.
callbacks of the same priority are called in reverse order of creation.
A callback is only executed on events emitted after this call finished.
[in] | desc | The description of the event to listen to |
[in] | priority | The priority of the callback |
[in] | cb | the callback to call |
[in] | data | additional data to pass to the callback |
true
when the callback has been successfully added. Referenced by evas_object_event_callback_priority_add(), and evas_object_smart_callback_priority_add().
EOAPI Eina_Bool efl_event_callback_del | ( | Eo * | obj, |
const Efl_Event_Description * | desc, | ||
Efl_Event_Cb | func, | ||
const void * | user_data | ||
) |
Delete a callback with a specific data associated to it for an event.
The callback will never be emitted again after this call, even if a event emission is going on.
[in] | desc | The description of the event to listen to |
[in] | func | The callback to delete |
[in] | user_data | The data to compare |
true
when the callback has been successfully removed. Referenced by elm_store_free(), elm_store_target_genlist_set(), evas_device_seat_id_get(), evas_object_event_callback_del(), evas_object_event_callback_del_full(), evas_object_smart_callback_del(), evas_object_smart_callback_del_full(), evas_object_smart_callback_description_find(), and evas_textblock_text_utf8_to_markup().
EOAPI Eina_Bool efl_event_callback_array_priority_add | ( | Eo * | obj, |
const Efl_Callback_Array_Item * | array, | ||
Efl_Callback_Priority | priority, | ||
const void * | data | ||
) |
Add an array of callbacks created by EFL_CALLBACKS_ARRAY_DEFINE for an event with a specific priority.
The array need to be sorted with efl_callbacks_cmp if you are not using the EFL_CALLBACKS_ARRAY_DEFINE macro.
callbacks of the same priority are called in reverse order of creation.
A callback from the array is only executed on events emitted after this call finished.
[in] | array | An #Efl_Callback_Array_Item of events to listen to |
[in] | priority | The priority of the callback |
[in] | data | Additional data to pass to the callback |
true
when the callback has been successfully added. Referenced by ecore_idle_enterer_before_add().
EOAPI Eina_Bool efl_event_callback_array_del | ( | Eo * | obj, |
const Efl_Callback_Array_Item * | array, | ||
const void * | user_data | ||
) |
Del a callback array with a specific data associated to it for an event.
The callbacks from the array will never be emitted again after this call, even if a event emission is going on.
[in] | array | An #Efl_Callback_Array_Item of events to listen to |
[in] | user_data | The data to compare |
true
when the callback has been successfully removed. Referenced by ecore_idle_enterer_before_add(), and ecore_ipc_client_server_get().
EOAPI Eina_Bool efl_event_callback_call | ( | Eo * | obj, |
const Efl_Event_Description * | desc, | ||
void * | event_info | ||
) |
Call the callbacks for an event of an object.
[in] | desc | The description of the event to call |
[in] | event_info | Extra event info to pass to the callbacks |
false
if one of the callbacks aborted the call, true
otherwise Referenced by ecore_idle_enterer_del(), ecore_idle_exiter_del(), ecore_idler_del(), ecore_timer_dump(), efl_net_connman_technology_type_from_str(), efl_object_legacy_only_event_description_get(), emotion_object_last_position_load(), emotion_object_last_position_save(), emotion_object_priority_get(), evas_device_seat_id_get(), evas_object_image_extension_can_load_fast_get(), and evas_object_textblock_style_set().
EOAPI Eina_Bool efl_event_callback_legacy_call | ( | Eo * | obj, |
const Efl_Event_Description * | desc, | ||
void * | event_info | ||
) |
Call the callbacks for an event of an object.
Like efl_event_callback_call, but also call legacy smart callbacks that have the same name of the given event.
[in] | desc | The description of the event to call |
[in] | event_info | Extra event info to pass to the callbacks |
false
if one of the callbacks aborted the call, true
otherwiseReferenced by elm_code_widget_selection_clear(), elm_code_widget_selection_copy(), elm_code_widget_selection_cut(), elm_code_widget_selection_end(), elm_code_widget_selection_start(), elm_entry_entry_get(), elm_flip_perspective_set(), elm_win_render(), evas_object_smart_callback_call(), evas_object_textblock_text_markup_set(), evas_textblock_cursor_char_delete(), evas_textblock_cursor_char_next(), evas_textblock_cursor_char_prev(), evas_textblock_cursor_copy(), evas_textblock_cursor_line_char_last(), evas_textblock_cursor_line_set(), evas_textblock_cursor_paragraph_char_first(), evas_textblock_cursor_paragraph_char_last(), evas_textblock_cursor_paragraph_first(), evas_textblock_cursor_paragraph_last(), evas_textblock_cursor_paragraph_next(), evas_textblock_cursor_paragraph_prev(), evas_textblock_cursor_pos_set(), evas_textblock_cursor_text_prepend(), evas_textblock_cursor_word_end(), evas_textblock_cursor_word_start(), and evas_textblock_string_escape_get().
EOAPI Eina_Bool efl_future_link | ( | Eo * | obj, |
Efl_Future * | link | ||
) |
Track a future life cycle and cancel it if the object dies.
[in] | link | The future to link with the object |
true
if it succeeded on setting up the tracking. Eina_Bool efl_object_init | ( | void | ) |
Init the eo subsystem.
EINA_TRUE
if eo is init, EINA_FALSE
otherwise.References _efl_class_creation_lock, EFL_ID_DOMAIN_MAIN, EFL_ID_DOMAIN_SHARED, eina_cow_add(), EINA_FALSE, eina_hash_pointer_new(), eina_hash_string_superfast_new(), eina_init(), eina_lock_recursive_new(), eina_log_domain_register(), EINA_LOG_ERR, eina_log_timing(), eina_magic_string_static_set(), eina_spinlock_new(), eina_thread_self(), eina_tls_cb_new(), eina_tls_set(), EINA_TRUE, and ERR.
Referenced by ecore_audio_init(), ecore_init(), ector_init(), and evas_init().
Eina_Bool efl_object_shutdown | ( | void | ) |
Shutdown the eo subsystem.
EINA_TRUE
if eo is init, EINA_FALSE
otherwise.References eina_log_timing(), and EINA_TRUE.
Efl_Id_Domain efl_domain_get | ( | void | ) |
Get the native domain for the current thread.
This will return the native eo object allocation domain for the current thread. This can only be changed with efl_domain_switch() and this can only be called before any objects are created/allocated on the thread where it is called. Calling it after this point will result in undefined behavior, so be sure to call this immediaetly after a thread begins to execute, before anything else. You must not change the domain of the main thread.
Eina_Bool efl_domain_switch | ( | Efl_Id_Domain | domain | ) |
Switch the native domain for the current thread.
domain | The domain to switch to |
Permanently switch the native domain for new objects for the calling thread. All objects created on this thread UNLESS it has switched to a new domain temporarily with efl_domain_current_set(), efl_domain_current_push() or efl_domain_current_pop(), efl_domain_data_adopt() and efl_domain_data_return().
References EFL_ID_DOMAIN_MAIN, EFL_ID_DOMAIN_SHARED, EFL_ID_DOMAIN_THREAD, EINA_FALSE, eina_tls_set(), EINA_TRUE, and ERR.
Efl_Id_Domain efl_domain_current_get | ( | void | ) |
Get the current domain used for allocating new objects.
Get the currently used domain that is at the top of the domain stack. There is actually a stack of domans to use you can alter via efl_domain_current_push() and efl_domain_current_pop(). This only gets the domain for the current thread.
Eina_Bool efl_domain_current_set | ( | Efl_Id_Domain | domain | ) |
Set the current domain used for allocating new objects.
Temporarily switch the current domain being used for allocation. There is actually a stack of domans to use you can alter via efl_domain_current_push() and efl_domain_current_pop(). The current domain is the one ont he top of the stack, so this entry is altered without pushing or popping. This only applies to the calling thread.
References EFL_ID_DOMAIN_MAIN, EFL_ID_DOMAIN_THREAD, EINA_FALSE, EINA_TRUE, and ERR.
Eina_Bool efl_domain_current_push | ( | Efl_Id_Domain | domain | ) |
Push a new domain onto the domain stack.
domain | The domain to push |
This pushes a domain on the domain stack that can be popped later with efl_domain_current_pop(). If the stack is full this may fail and return EINA_FALSE in that case. This applies only to the calling thread.
void efl_domain_current_pop | ( | void | ) |
Pop a previously pushed domain from the domain stack.
This pops the top domain off the domain stack for the calling thread that was pushed with efl_domain_current_push().
Efl_Domain_Data* efl_domain_data_get | ( | void | ) |
Get an opaque handle to the local native domain eoid data.
This gets a handle to the domain data for the current thread, intended to be used by another thread to adopt with efl_domain_data_adopt(). Once you use efl_domain_data_adopt() the thread that called efl_domain_data_get() should suspend and not execute anything related to eo or efl objects until the thread that adopted the data called efl_domain_data_return() to return the data to its owner and stop making it available to that thread.
Efl_Id_Domain efl_domain_data_adopt | ( | Efl_Domain_Data * | data_in | ) |
Adopt a single extra domain to be the current domain.
datas_in | The domain data to adopt |
This will adopt the given domain data pointed to by data_in
as an extra domain locally. The adopted domain must have a domain ID that is not the same as the current thread domain or local domain. You may not adopt a domain that clashes with the current domain. If you set, push or pop domains so these might clash (be the same) then undefined behaviour will occur.
This will also push the adopted domain as the current domain so that all newly created objects (unless their parent is of a differing domain) will be part of this adopted domain. You can still access objects from your local domain as well, but be aware that creation will require some switch of domain by push, pop or set. Return the domain with efl_domain_data_return() when done.
References EFL_ID_DOMAIN_INVALID, and ERR.
Referenced by ecore_thread_main_loop_begin().
Eina_Bool efl_domain_data_return | ( | Efl_Id_Domain | domain | ) |
Return a domain to its original owning thread.
domain | The domain to return |
This returns the domain specified by domain
to the thread it came from, allowing that thread after this to continue execution. This will implicitly pop the current domain from the stack, assuming that the current domain is the same one pushed implicitly by efl_domain_data_adopt(). You cannot return your own native local domain, only the one that was adopted by efl_domain_data_adopt().
References EFL_ID_DOMAIN_MAIN, EFL_ID_DOMAIN_THREAD, EINA_FALSE, EINA_TRUE, and ERR.
Referenced by ecore_thread_main_loop_end().
Check if 2 objects are compatible
obj | The basic object |
obj_target | The alternat object that may be referenced by obj |
This checks to see if 2 objects are compatible and could be parent or children of eachother, could reference eachother etc.. There is only a need to call this if you got objects from multiple domains (an adopted domain with efl_domain_data_adopt() or the shared domain EFL_ID_DOMAIN_SHARED where objects may be accessed by any thread).
References DBG, EINA_FALSE, and EINA_TRUE.
Prepare a call to the parent class implementation of a function.
obj | The object to call (can be a class) |
cur_klass | The current class |
Usage:
A common usage pattern is to forward function calls to the parent function:
cur_klass
must be a valid class in the inheritance hierarchy of obj's
class. Invalid values will lead to undefined behaviour.
References EINA_TRUE.
Referenced by ecore_exe_free(), ecore_thread_global_data_wait(), ecore_timer_dump(), ecore_timer_precision_set(), elm_diskselector_scroller_policy_get(), elm_diskselector_scroller_policy_set(), elm_entry_bounce_set(), elm_entry_scrollbar_policy_set(), elm_fileselector_sort_method_get(), elm_flipselector_first_interval_get(), elm_gengrid_bounce_set(), elm_gengrid_item_class_unref(), elm_gengrid_item_cursor_unset(), elm_gengrid_item_tooltip_content_cb_set(), elm_gengrid_item_tooltip_unset(), elm_gengrid_scroller_policy_get(), elm_gengrid_scroller_policy_set(), elm_genlist_bounce_set(), elm_genlist_item_class_unref(), elm_genlist_item_cursor_unset(), elm_genlist_item_tooltip_content_cb_set(), elm_genlist_item_tooltip_unset(), elm_genlist_scroller_policy_get(), elm_genlist_scroller_policy_set(), elm_list_scroller_policy_set(), elm_separator_horizontal_get(), elm_spinner_special_value_get(), elm_spinner_value_get(), elm_table_pack_get(), elm_toolbar_reorder_mode_get(), elm_win_floating_mode_get(), evas_data_argb_unpremul(), evas_event_thaw(), evas_new(), evas_object_smart_clipped_clipper_get(), evas_object_smart_move_children_relative(), and evas_object_textblock_clear().
Prepare a call to cast to a parent class implementation of a function.
obj | The object to call (can be a class) |
cur_klass | The class to cast into |
Usage:
In the above example, obj
is assumed to inherit from SOME_OTHER_CLASS
as either a mixin or direct class inheritance. If SOME_OTHER_CLASS
implements my_property.set
then that implementation shall be called, otherwise the call will be propagated to the parent implementation (if any).
cur_klass
must be a valid class in the inheritance hierarchy of obj's
class. Invalid values will lead to undefined behaviour.
References EINA_FALSE.
Gets the class of the object.
obj | The object to work on |
References EFL_CLASS_CLASS.
Referenced by elm_fileselector_entry_path_get(), elm_fileselector_path_get(), elm_fileselector_path_set(), elm_fileselector_selected_get(), elm_fileselector_selected_paths_get(), and elm_fileselector_selected_set().
Get a pointer to the data of an object for a specific class.
The data reference count is not incremented. The pointer must be used only in the scope of the function and its callees.
obj | the object to work on. |
klass | the klass associated with the data. |
References ERR.
Referenced by ecore_con_eet_client_connect_callback_add(), ecore_con_eet_client_connect_callback_del(), ecore_con_eet_client_disconnect_callback_add(), ecore_con_eet_client_disconnect_callback_del(), ecore_con_eet_server_connect_callback_add(), ecore_con_eet_server_connect_callback_del(), ecore_con_eet_server_disconnect_callback_add(), ecore_con_eet_server_disconnect_callback_del(), ecore_exe_auto_limits_set(), ecore_exe_callback_pre_free_set(), ecore_exe_close_stdin(), ecore_exe_data_get(), ecore_exe_data_set(), ecore_exe_event_data_get(), ecore_exe_flags_get(), ecore_exe_free(), ecore_exe_hup(), ecore_exe_interrupt(), ecore_exe_kill(), ecore_exe_pid_get(), ecore_exe_quit(), ecore_exe_send(), ecore_exe_signal(), ecore_exe_tag_get(), ecore_exe_tag_set(), ecore_exe_terminate(), ecore_idler_del(), ecore_timer_dump(), edje_color_class_list(), edje_edit_sound_tones_list_get(), edje_evas_global_perspective_get(), edje_object_part_text_append(), edje_object_part_text_cursor_content_get(), edje_object_part_text_escaped_set(), edje_object_part_text_hide_visible_password(), edje_object_part_text_insert(), edje_object_part_text_item_geometry_get(), edje_object_part_text_item_list_get(), edje_object_part_text_style_user_peek(), edje_object_part_text_style_user_pop(), edje_object_part_text_style_user_push(), edje_object_part_text_unescaped_get(), edje_object_part_text_unescaped_set(), edje_object_part_text_user_insert(), edje_object_text_insert_filter_callback_add(), edje_object_text_insert_filter_callback_del(), edje_object_text_insert_filter_callback_del_full(), edje_object_text_markup_filter_callback_add(), edje_object_text_markup_filter_callback_del(), edje_object_text_markup_filter_callback_del_full(), edje_perspective_set(), edje_size_class_list(), edje_text_class_list(), efl_data_scope_safe_get(), efl_net_connman_access_point_path_get(), efl_net_connman_access_point_update(), efl_net_connman_control_access_points_reload(), efl_net_connman_control_find_technology_by_type(), efl_net_connman_technology_path_get(), elm_code_widget_selection_clear(), elm_code_widget_selection_end(), elm_code_widget_selection_is_empty(), elm_code_widget_selection_select_all(), elm_code_widget_selection_select_line(), elm_code_widget_selection_select_word(), elm_code_widget_selection_start(), elm_code_widget_selection_text_get(), elm_genlist_scroller_policy_get(), elm_image_animated_get(), elm_image_animated_play_get(), elm_image_animated_play_set(), elm_image_animated_set(), elm_layout_content_swallow_list_get(), elm_progressbar_inverted_get(), elm_win_floating_mode_get(), evas_device_description_set(), evas_device_emulation_source_set(), evas_device_list(), evas_device_name_set(), evas_device_parent_set(), evas_device_pop(), evas_device_push(), evas_device_seat_id_get(), evas_device_subclass_get(), evas_device_subclass_set(), evas_engine_info_get(), evas_engine_info_set(), evas_event_feed_hold(), evas_font_path_global_list(), evas_map_coords_get(), evas_map_util_clockwise_get(), evas_map_util_points_populate_from_object(), evas_map_util_points_populate_from_object_full(), evas_object_del(), evas_object_name_get(), evas_object_name_set(), evas_object_ref(), evas_object_ref_get(), evas_object_smart_callback_description_find(), evas_object_smart_callbacks_descriptions_get(), evas_object_smart_member_add(), evas_object_smart_member_del(), evas_object_smart_members_get(), evas_object_smart_move_children_relative(), evas_object_textblock_clear(), evas_object_textblock_cursor_get(), evas_object_textblock_line_number_geometry_get(), evas_object_textblock_replace_char_get(), evas_object_textblock_replace_char_set(), evas_object_textblock_style_get(), evas_object_textblock_style_set(), evas_object_textblock_style_user_peek(), evas_object_textblock_style_user_pop(), evas_object_textblock_style_user_push(), evas_object_textblock_text_markup_get(), evas_object_textblock_text_markup_prepend(), evas_object_textblock_text_markup_set(), evas_object_textblock_valign_get(), evas_object_textblock_valign_set(), evas_object_top_at_pointer_get(), evas_object_unref(), evas_output_framespace_get(), evas_output_framespace_set(), evas_output_method_get(), evas_output_method_set(), evas_output_size_get(), evas_output_size_set(), evas_output_viewport_get(), evas_output_viewport_set(), evas_render_updates_free(), evas_smart_legacy_type_register(), evas_textblock_cursor_at_format_set(), evas_textblock_cursor_char_coord_set(), evas_textblock_cursor_char_delete(), evas_textblock_cursor_char_geometry_get(), evas_textblock_cursor_char_next(), evas_textblock_cursor_compare(), evas_textblock_cursor_content_get(), evas_textblock_cursor_copy(), evas_textblock_cursor_eol_get(), evas_textblock_cursor_equal(), evas_textblock_cursor_format_append(), evas_textblock_cursor_format_get(), evas_textblock_cursor_format_next(), evas_textblock_cursor_format_prev(), evas_textblock_cursor_free(), evas_textblock_cursor_geometry_bidi_get(), evas_textblock_cursor_geometry_get(), evas_textblock_cursor_line_char_first(), evas_textblock_cursor_line_char_last(), evas_textblock_cursor_line_coord_set(), evas_textblock_cursor_line_geometry_get(), evas_textblock_cursor_line_set(), evas_textblock_cursor_paragraph_char_first(), evas_textblock_cursor_paragraph_char_last(), evas_textblock_cursor_paragraph_first(), evas_textblock_cursor_paragraph_last(), evas_textblock_cursor_paragraph_next(), evas_textblock_cursor_paragraph_text_get(), evas_textblock_cursor_paragraph_text_length_get(), evas_textblock_cursor_pen_geometry_get(), evas_textblock_cursor_pos_set(), evas_textblock_cursor_range_delete(), evas_textblock_cursor_range_formats_get(), evas_textblock_cursor_range_geometry_get(), evas_textblock_cursor_range_simple_geometry_get(), evas_textblock_cursor_text_append(), evas_textblock_cursor_text_prepend(), evas_textblock_cursor_visible_range_get(), evas_textblock_cursor_word_end(), evas_textblock_cursor_word_start(), evas_textblock_node_format_first_get(), evas_textblock_node_format_last_get(), evas_textblock_node_format_list_get(), evas_textblock_node_format_remove_pair(), evas_textblock_node_format_text_get(), evas_textblock_style_set(), and evas_textblock_text_utf8_to_markup().
Safely get a pointer to the data of an object for a specific class.
This call runs a dynamic check and returns NULL if there is no valid data to return.
The data reference count is not incremented. The pointer must be used only in the scope of the function and its callees. This function will return NULL if there is no data for this class, or if this object is not an instance of the given class. The function will return NULL if the data size is 0. Note that objects of class A inheriting from another class C as an interface (like: class A(B, C) {} ) will have no data for class C. This means that efl_isa(a, C) will return true but there is no data for C. This function's behaviour is similar to efl_data_scope_get() when running in debug mode (but this prints less error logs).
obj | the object to work on. |
klass | the klass associated with the data. |
References efl_data_scope_get().
Referenced by elm_win_cocoa_window_get(), elm_win_conformant_get(), elm_win_conformant_set(), elm_win_demand_attention_get(), elm_win_demand_attention_set(), elm_win_fake_canvas_set(), elm_win_floating_mode_get(), elm_win_floating_mode_set(), elm_win_icon_name_get(), elm_win_icon_name_set(), elm_win_illume_command_send(), elm_win_indicator_mode_get(), elm_win_indicator_mode_set(), elm_win_indicator_opacity_get(), elm_win_indicator_opacity_set(), elm_win_inlined_image_object_get(), elm_win_keyboard_win_get(), elm_win_keyboard_win_set(), elm_win_layer_get(), elm_win_layer_set(), elm_win_lower(), elm_win_main_menu_get(), elm_win_norender_get(), elm_win_norender_pop(), elm_win_norender_push(), elm_win_override_get(), elm_win_override_set(), elm_win_profile_get(), elm_win_profile_set(), elm_win_quickpanel_get(), elm_win_quickpanel_priority_major_get(), elm_win_quickpanel_priority_major_set(), elm_win_quickpanel_priority_minor_get(), elm_win_quickpanel_priority_minor_set(), elm_win_quickpanel_set(), elm_win_quickpanel_zone_get(), elm_win_quickpanel_zone_set(), elm_win_render(), elm_win_resize_object_add(), elm_win_resize_object_del(), elm_win_rotation_get(), elm_win_rotation_set(), elm_win_rotation_with_resize_set(), elm_win_screen_dpi_get(), elm_win_screen_position_get(), elm_win_screen_size_get(), elm_win_shaped_get(), elm_win_shaped_set(), elm_win_trap_data_get(), elm_win_urgent_get(), elm_win_urgent_set(), elm_win_win32_window_get(), elm_win_window_id_get(), elm_win_withdrawn_get(), elm_win_withdrawn_set(), elm_win_wl_window_get(), elm_win_wm_rotation_manual_rotation_done(), elm_win_wm_rotation_manual_rotation_done_get(), elm_win_wm_rotation_manual_rotation_done_set(), elm_win_wm_rotation_preferred_rotation_get(), elm_win_wm_rotation_supported_get(), elm_win_xwindow_get(), evas_object_event_callback_del(), evas_object_event_callback_del_full(), and evas_object_event_callback_priority_add().
void* efl_data_xref_internal | ( | const char * | file, |
int | line, | ||
const Eo * | obj, | ||
const Efl_Class * | klass, | ||
const Eo * | ref_obj | ||
) |
Get a pointer to the data of an object for a specific class and increment the data reference count.
obj | the object to work on. |
klass | the klass associated with the data. |
ref_obj | the object that references the data. |
file | the call's filename. |
line | the call's line number. |
References ERR.
Decrement the object data reference count by 1.
obj | the object to work on. |
data | a pointer to the data to unreference |
file | the call's filename. |
line | the call's line number. |
Increment the object's reference count by 1.
obj | the object to work on. |
It's very easy to get a refcount leak and start leaking memory because of a forgotten unref or an extra ref. That is why there are efl_xref and efl_xunref that will make debugging easier in such a case. Therefor, these functions should only be used in small scopes, i.e at the start of some section in which the object may get freed, or if you know what you are doing.
References EINA_UNLIKELY.
Referenced by ecore_thread_global_data_wait(), ecore_timer_dump(), efl_xref_internal(), elm_fileselector_button_path_set(), elm_fileselector_entry_selected_set(), elm_win_floating_mode_get(), evas_device_parent_set(), evas_device_push(), evas_event_feed_hold(), evas_object_image_extension_can_load_fast_get(), evas_object_ref(), and evas_smart_legacy_type_register().
void efl_unref | ( | const Eo * | obj | ) |
Decrement the object's reference count by 1 and free it if needed.
obj | the object to work on. |
References EINA_LOG_LEVEL_ERR, EINA_UNLIKELY, and ERR.
Referenced by ecore_ipc_client_server_get(), ecore_thread_global_data_wait(), ecore_timer_del(), ecore_timer_dump(), efl_xunref(), elm_fileselector_button_path_set(), evas_device_pop(), evas_device_seat_id_get(), evas_event_feed_hold(), evas_free(), evas_object_unref(), and evas_smart_legacy_type_register().
int efl_ref_get | ( | const Eo * | obj | ) |
Return the ref count of the object passed.
obj | the object to work on. |
Referenced by evas_free().
void efl_del_intercept_set | ( | Eo * | obj, |
Efl_Del_Intercept | del_intercept_func | ||
) |
Set a deletion interceptor function.
obj | The object to set the interceptor on |
del_intercept_func | The interceptor function to call |
This sets the function del_intercept_func
to be called when an object is about to go from a reference count of 1 to 0, thus triggering actual destruction of the object. Instead of going to a reference count of 0 and being destroyed, the object will stay alive with a reference count of 1 and this intercept function will be called instead. It is the job of this interceptor function to handle any further deletion of of the object from here.
Note that by default objects have no interceptor function set, and thus will be destroyed as normal. To return an object to this state, simply set the del_intercept_func
to NULL which is the default.
A good use for this feature is to ensure an object is destroyed by its owning main loop and not in a foreign loop. This makes it possible to safely unrefor delete objects from any loop as an interceptor can be set on an object that will abort destruction and instead queue the object on its owning loop to be destroyed at some time in the future and now set the intercept function to NULL so it is not called again on the next "real deletion".
Referenced by elm_config_web_backend_get().
Efl_Del_Intercept efl_del_intercept_get | ( | const Eo * | obj | ) |
Get the deletion interceptor function.
obj | The object to get the interceptor of |
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 if you want to override this interceptor, be sure to call it after your own interceptor function has finished. It would generally be a bad idea though to override these functions.
References EFL_CLASS_TYPE_MIXIN, eina_freeq_ptr_main_add(), EINA_INLIST_FOREACH, EINA_INLIST_GET, eina_inlist_prepend(), eina_inlist_remove(), EINA_LIKELY, EINA_TRUE, EINA_UNLIKELY, and ERR.
void efl_reuse | ( | const Eo * | obj | ) |
Clears the object so it can be reused (for example in a cache)
obj | The object to mark for reusal |
This assumes the destructor has been called on the object, so it should probably only be used from the del intercept.
References efl_object_override(), eina_cow_free(), EINA_FALSE, eina_freeq_ptr_main_add(), EINA_INLIST_CONTAINER_GET, EINA_LIKELY, eina_spinlock_release(), eina_spinlock_take(), eina_trash_push(), ERR, _Eina_Inlist::next, and WRN.
Increment the object's reference count by 1 (and associate the ref with ref_obj)
obj | the object to work on. |
ref_obj | the object that references obj. |
file | the call's filename. |
line | the call's line number. |
People should not use this function, use efl_xref instead. A compile flag my make it and eobj_xunref() behave the same as eobj_ref() and eobj_unref() respectively. So this should be used wherever possible.
References efl_ref(), EINA_INLIST_GET, and eina_inlist_prepend().
Decrement the object's reference count by 1 and free it if needed.
Will free the ref associated with ref_obj).
obj | the object to work on. |
ref_obj | the object that references obj. |
This function only enforces the checks for object association. I.e don't rely on it. If such enforces are compiled out, this function behaves the same as efl_unref().
References efl_unref(), eina_freeq_ptr_main_add(), EINA_INLIST_FOREACH, EINA_INLIST_GET, eina_inlist_remove(), and ERR.
EOAPI void efl_wref_add | ( | Eo * | obj, |
Efl_Object ** | wref | ||
) |
Add a new weak reference to obj.
This function registers the object handle pointed by wref to obj so when obj is deleted it'll be updated to NULL. This functions should be used when you want to keep track of an object in a safe way, but you don't want to prevent it from being freed.
[in] | wref | The weak ref |
Referenced by ecore_timer_precision_set(), efl_future_use(), and elm_win_floating_mode_get().
EOAPI void efl_wref_del | ( | Eo * | obj, |
Efl_Object ** | wref | ||
) |
Delete the weak reference passed.
[in] | wref | The weak ref |
EOAPI void efl_key_data_set | ( | Eo * | obj, |
const char * | key, | ||
const void * | data | ||
) |
Generic data with string key on an object.
The user is in charge of freeing the data.
[in] | key | The key associated with the data |
[in] | data | The data to set |
Referenced by ecore_con_eet_data_set(), evas_object_data_del(), and evas_object_data_set().
EOAPI void* efl_key_data_get | ( | const Eo * | obj, |
const char * | key | ||
) |
Generic data with string key on an object.
The user is in charge of freeing the data.
[in] | key | The key associated with the data |
Referenced by ecore_con_eet_data_get(), ecore_thread_global_data_wait(), ecore_timer_del(), evas_object_data_del(), and evas_object_data_get().
EOAPI void efl_key_ref_set | ( | Eo * | obj, |
const char * | key, | ||
const Efl_Object * | objdata | ||
) |
Generic object reference with string key to object.
The object will be automatically ref'd when set and unref'd when replaced or deleted or referring object is deleted. If the referenced object is deleted then the key is deleted automatically.
This is the same key store used by key_data and key_value so keys are shared and can store only one thing
[in] | key | The key associated with the object ref |
[in] | objdata | The object to set |
EOAPI Efl_Object* efl_key_ref_get | ( | const Eo * | obj, |
const char * | key | ||
) |
Generic object reference with string key to object.
The object will be automatically ref'd when set and unref'd when replaced or deleted or referring object is deleted. If the referenced object is deleted then the key is deleted automatically.
This is the same key store used by key_data and key_value so keys are shared and can store only one thing
[in] | key | The key associated with the object ref |
EOAPI void efl_key_wref_set | ( | Eo * | obj, |
const char * | key, | ||
const Efl_Object * | objdata | ||
) |
Generic weak object reference with string key to object.
The object key will be removed if the object is removed, but will not take or removed references like key_obj.
This is the same key store used by key_data and key_value so keys are shared and can store only one thing
[in] | key | The key associated with the object ref |
[in] | objdata | The object to set |
EOAPI Efl_Object* efl_key_wref_get | ( | const Eo * | obj, |
const char * | key | ||
) |
Generic weak object reference with string key to object.
The object key will be removed if the object is removed, but will not take or removed references like key_obj.
This is the same key store used by key_data and key_value so keys are shared and can store only one thing
[in] | key | The key associated with the object ref |
EOAPI void efl_key_value_set | ( | Eo * | obj, |
const char * | key, | ||
Eina_Value * | value | ||
) |
Value on with string key on the object.
This stores the value with the given string key on the object and it will be freed when replaced or deleted or the referring object is deleted.
This is the same key store used by key_data and key_obj so keys are shared and can store only one thing
[in] | key | The key associated with the value |
[in] | value | The value to set |
EOAPI Eina_Value* efl_key_value_get | ( | const Eo * | obj, |
const char * | key | ||
) |
Value on with string key on the object.
This stores the value with the given string key on the object and it will be freed when replaced or deleted or the referring object is deleted.
This is the same key store used by key_data and key_obj so keys are shared and can store only one thing
[in] | key | The key associated with the value |
Enable or disable the manual free feature.
obj | the object to work on. |
manual_free | indicates if the free is manual (EINA_TRUE) or automatic (EINA_FALSE). |
The developer is in charge to call the function efl_manual_free to free the memory allocated for this object.
Do not use, unless you really know what you are doing. It's used by Evas because evas wants to keep its private data available even after the object is deleted. Setting this to true makes Eo destruct the object but not free the private data or the object itself.
Frees the object.
obj | the object to work on. This function must be called by the developer if the function efl_manual_free_set has been called before with the parameter EINA_TRUE. An error will be printed if this function is called when the manual free option is not set to EINA_TRUE or the number of refs is not 0. |
References EINA_FALSE, EINA_TRUE, and ERR.
Checks if the object was already descructed (only relevant for manual_free objects).
obj | the object to check. This function checks if the object was already destructed (but not alraedy freed). It should only be used with objects that are supposed to be manually freed, but not yet freed (but possibly destructed). |
References EINA_FALSE.
EAPI Eina_Lock _efl_class_creation_lock |
This variable is used for locking purposes in the class_get function defined in EFL_DEFINE_CLASS.
This is just to work around the fact that we need to init locks before using them. Don't touch it if you don't know what you are doing.
Referenced by efl_object_init().
EAPI unsigned int _efl_object_init_generation |
This variable stores the current eo init generation.
That is, how many times we have completed full init/shutdown cycles. Starts at 1 and incremeted on every call to shutdown that actually shuts down eo.
Efl_Object* _Efl_Event::object |
The object the event was called on.
Referenced by ecore_timer_precision_set(), evas_object_del(), and evas_textblock_text_utf8_to_markup().
const Efl_Event_Description* _Efl_Event::desc |
The event description.
void* _Efl_Event::info |
Extra event information passed by the event caller.
const Efl_Event_Description* _Efl_Callback_Array_Item::desc |
The event description.
Referenced by ecore_timer_precision_set(), efl_callbacks_cmp(), and efl_object_legacy_only_event_description_get().
Efl_Event_Cb _Efl_Callback_Array_Item::func |
The callback function.
Referenced by efl_object_legacy_only_event_description_get().
Eina_Stringshare* _Efl_Dbg_Info::name |
The name of the part (stringshare).
Referenced by efl_dbg_info_free(), and EFL_DBG_INFO_LIST_APPEND().
Eina_Value _Efl_Dbg_Info::value |
The value.
Referenced by efl_dbg_info_free(), and EFL_DBG_INFO_LIST_APPEND().
void* _Efl_Op_Description::api_func |
The EAPI function offering this op.
(The name of the func on windows)
void* _Efl_Op_Description::func |
The static function to call for the op.
const Efl_Op_Description* _Efl_Object_Ops::descs |
The op descriptions array of size count.
size_t _Efl_Object_Ops::count |
Number of op descriptions.
Referenced by efl_class_functions_set().
const char* _Efl_Class_Description::name |
The name of the class.
Referenced by efl_class_name_get().
Efl_Class_Type _Efl_Class_Description::type |
The type of the class.
size_t _Efl_Class_Description::data_size |
The size of data (private + protected + public) this class needs per object.
void(* _Efl_Class_Description::class_constructor) (Efl_Class *klass) |
The constructor of the class.
void(* _Efl_Class_Description::class_destructor) (Efl_Class *klass) |
The destructor of the class.
_efl_class_creation_lock |
This variable is used for locking purposes in the class_get function defined in EFL_DEFINE_CLASS.
This is just to work around the fact that we need to init locks before using them. Don't touch it if you don't know what you are doing.
Referenced by efl_object_init().
_efl_object_init_generation = 1 |
This variable stores the current eo init generation.
That is, how many times we have completed full init/shutdown cycles. Starts at 1 and incremeted on every call to shutdown that actually shuts down eo.