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_Callback_Array_Item_Full |
An item provided by EFL_EVENT_CALLBACK_ADD/EFL_EVENT_CALLBACK_DEL. More... | |
struct | _Efl_Future_Cb_Desc |
A structure with callbacks to be used by efl_future_cb_from_desc() and efl_future_chain_array() More... | |
struct | _Efl_Object_Op_Call_Data |
Macros | |
#define | _EFL_CLASS_EO_CLASS_TYPE |
#define | _EFL_OBJECT_EO_CLASS_TYPE |
#define | EFL_TRANSFER_OWNERSHIP |
This is a no-operation. More... | |
#define | EO_CLASS EFL_OBJECT_CLASS |
#define | efl_future_cb(_eo, ...) efl_future_cb_from_desc(_eo, (Efl_Future_Cb_Desc){__VA_ARGS__}) |
Syntax suger over efl_future_cb_from_desc() More... | |
#define | efl_future_then(_eo, _future, ...) eina_future_then_from_desc(_future, efl_future_cb(_eo, ## __VA_ARGS__)) |
Syntax sugar over eina_future_then_from_desc() and efl_future_cb(). More... | |
#define | efl_future_chain(_eo, _prev, ...) efl_future_chain_array(_eo, _prev, (Efl_Future_Cb_Desc []){__VA_ARGS__, {NULL, NULL, NULL, NULL, NULL}}) |
Syntax suger over efl_future_chain_array() More... | |
#define | EFL_NOOP ((Efl_Object_Op) 0) |
A special Efl_Object_Op meaning "No operation". | |
#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, ErrorCase) |
#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, ErrorCase) |
#define | _EFL_OBJECT_VOID_FUNC_BODY(Name, ObjType, ErrorCase) |
#define | _EFL_OBJECT_FUNC_BODYV(Name, ObjType, Ret, DefRet, ErrorCase, Arguments, ...) |
#define | _EFL_OBJECT_VOID_FUNC_BODYV(Name, ObjType, ErrorCase, 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_FUNC_BODY_FALLBACK(Name, Ret, DefRet, FallbackCall) _EFL_OBJECT_FUNC_BODY(Name, Eo *, Ret, DefRet, FallbackCall) |
#define | EFL_VOID_FUNC_BODY_FALLBACK(Name, FallbackCall) _EFL_OBJECT_VOID_FUNC_BODY(Name, Eo *, FallbackCall) |
#define | EFL_FUNC_BODYV_FALLBACK(Name, Ret, DefRet, FallbackCall, Arguments, ...) _EFL_OBJECT_FUNC_BODYV(Name, Eo *, Ret, DefRet, FallbackCall, EFL_FUNC_CALL(Arguments), __VA_ARGS__) |
#define | EFL_VOID_FUNC_BODYV_FALLBACK(Name, FallbackCall, Arguments, ...) _EFL_OBJECT_VOID_FUNC_BODYV(Name, Eo *, FallbackCall, EFL_FUNC_CALL(Arguments), __VA_ARGS__) |
#define | EFL_FUNC_BODY_CONST_FALLBACK(Name, Ret, DefRet, FallbackCall) _EFL_OBJECT_FUNC_BODY(Name, const Eo *, Ret, DefRet, FallbackCall) |
#define | EFL_VOID_FUNC_BODY_CONST_FALLBACK(Name, FallbackCall) _EFL_OBJECT_VOID_FUNC_BODY(Name, const Eo *, FallbackCall) |
#define | EFL_FUNC_BODYV_CONST_FALLBACK(Name, Ret, DefRet, FallbackCall, Arguments, ...) _EFL_OBJECT_FUNC_BODYV(Name, const Eo *, Ret, DefRet, FallbackCall, EFL_FUNC_CALL(Arguments), __VA_ARGS__) |
#define | EFL_VOID_FUNC_BODYV_CONST_FALLBACK(Name, FallbackCall, Arguments, ...) _EFL_OBJECT_VOID_FUNC_BODYV(Name, const Eo *, FallbackCall, 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 add it to an existing parent object. More... | |
#define | efl_add_ref(klass, parent, ...) _efl_add_common(klass, parent, EINA_TRUE, ##__VA_ARGS__) |
Create a new object, add it to an existing parent object and return an extra reference for further manipulation. More... | |
#define | efl_new(klass, ...) efl_add_ref(klass, NULL, ##__VA_ARGS__) |
Create a new object. 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 |
#define | EOAPI EAPI EAPI_WEAK |
#define | EOAPI |
Typedefs | |
typedef struct _Eo_Object | _Eo_Object |
typedef struct _Eo_Opaque | Eo |
The basic Object type. | |
typedef Eo | Efl_Class |
The basic class type - should be removed, for compatibility reasons. | |
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 struct _Efl_Event | Efl_Event |
A parameter passed in event callbacks holding extra event parameters. More... | |
typedef void(* | Efl_Event_Cb) (void *data, const Efl_Event *event) |
An event callback prototype. More... | |
typedef struct _Efl_Callback_Array_Item | Efl_Callback_Array_Item |
typedef struct _Efl_Callback_Array_Item_Full | Efl_Callback_Array_Item_Full |
typedef struct _Efl_Future_Cb_Desc | Efl_Future_Cb_Desc |
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 Eo *(* | Efl_Substitute_Ctor_Cb) (void *data, Eo *obj_id) |
Callback to be called instead of the object constructor. More... | |
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 with 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_Future_Desc | efl_future_cb_from_desc (const Eo *obj, const Efl_Future_Cb_Desc desc) |
Creates an Eina_Future_Desc for an EO object. More... | |
EOAPI Eina_Future * | efl_future_chain_array (Eo *obj, Eina_Future *prev, const Efl_Future_Cb_Desc descs[]) |
Creates a Future chain based on #Efl_Future_Cb_Desc. More... | |
EAPI Eina_Bool | efl_object_init (void) |
Init the eo subsystem. More... | |
EAPI Eina_Bool | efl_object_shutdown (void) |
Shutdown the eo subsystem. More... | |
EAPI Efl_Id_Domain | efl_domain_get (void) |
Get the native domain for the current thread. More... | |
EAPI Eina_Bool | efl_domain_switch (Efl_Id_Domain domain) |
Switch the native domain for the current thread. More... | |
EAPI Efl_Id_Domain | efl_domain_current_get (void) |
Get the current domain used for allocating new objects. More... | |
EAPI Eina_Bool | efl_domain_current_set (Efl_Id_Domain domain) |
Set the current domain used for allocating new objects. More... | |
EAPI Eina_Bool | efl_domain_current_push (Efl_Id_Domain domain) |
Push a new domain onto the domain stack. More... | |
EAPI void | efl_domain_current_pop (void) |
Pop a previously pushed domain from the domain stack. More... | |
EAPI Efl_Domain_Data * | efl_domain_data_get (void) |
Get an opaque handle to the local native domain eoid data. More... | |
EAPI Efl_Id_Domain | efl_domain_data_adopt (Efl_Domain_Data *data_in) |
Adopt a single extra domain to be the current domain. More... | |
EAPI Eina_Bool | efl_domain_data_return (Efl_Id_Domain domain) |
Return a domain to its original owning thread. More... | |
EAPI Eina_Bool | efl_compatible (const Eo *obj, const Eo *obj_target) |
Check if 2 objects are compatible More... | |
EAPI Efl_Object_Op | _efl_object_api_op_id_get (const void *api_func) EINA_DEPRECATED |
EAPI 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) |
EAPI Eina_Bool | _efl_object_call_resolve (Eo *obj, const char *func_name, Efl_Object_Op_Call_Data *call, Efl_Object_Op op, const char *file, int line) |
EAPI void | _efl_object_call_end (Efl_Object_Op_Call_Data *call) |
EAPI Eo * | _efl_add_end (Eo *obj, Eina_Bool is_ref, Eina_Bool is_fallback) |
EAPI Eo * | efl_super (const Eo *obj, const Efl_Class *cur_klass) |
Prepare a call to the parent class implementation of a function. More... | |
EAPI 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... | |
EAPI const Efl_Class * | efl_class_get (const Eo *obj) |
Gets the class of the object. More... | |
EAPI Eo * | _efl_added_get (void) |
EAPI Eo * | _efl_add_internal_start (const char *file, int line, const Efl_Class *klass_id, Eo *parent, Eina_Bool ref, Eina_Bool is_fallback) |
EAPI Eo * | _efl_add_internal_start_bindings (const char *file, int line, const Efl_Class *klass_id, Eo *parent, Eina_Bool ref, Eina_Bool is_fallback, Efl_Substitute_Ctor_Cb substitute_ctor, void *sub_ctor_data) |
Just like _efl_add_internal_start() but with additional options. More... | |
EAPI void | efl_del (const Eo *obj) |
Unrefs the object and reparents it to NULL. More... | |
EAPI Eina_Bool | efl_class_override_register (const Efl_Class *klass, const Efl_Class *override) |
Set an override for a class. More... | |
EAPI Eina_Bool | efl_class_override_unregister (const Efl_Class *klass, const Efl_Class *override) |
Unset an override for a class. More... | |
EAPI 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... | |
EAPI 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... | |
EAPI 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... | |
EAPI void | efl_data_xunref_internal (const Eo *obj, void *data, const Eo *ref_obj) |
Decrement the object data reference count by 1. More... | |
EAPI Eo * | efl_ref (const Eo *obj) |
Increment the object's reference count by 1. More... | |
EAPI void | efl_unref (const Eo *obj) |
Decrement the object's reference count by 1 and free it if needed. More... | |
EAPI int | efl_ref_count (const Eo *obj) |
Return the ref count of the object passed. More... | |
EAPI void | efl_del_intercept_set (Eo *obj, Efl_Del_Intercept del_intercept_func) |
Set a deletion interceptor function. More... | |
EAPI Efl_Del_Intercept | efl_del_intercept_get (const Eo *obj) |
Get the deletion interceptor function. More... | |
EAPI void | efl_reuse (const Eo *obj) |
Clears the object so it can be reused (for example in a cache). More... | |
EAPI 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... | |
EAPI 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... | |
EAPI void | efl_manual_free_set (Eo *obj, Eina_Bool manual_free) |
Enable or disable the manual free feature. More... | |
EAPI Eina_Bool | efl_manual_free (Eo *obj) |
Frees the object. More... | |
EAPI Eina_Bool | efl_destructed_is (const Eo *obj) |
Checks if the object was already descructed (only relevant for manual_free objects). More... | |
EAPI Eina_Error | efl_property_reflection_set (Eo *obj, const char *property_name, Eina_Value value) |
Set the given Eina_Value to the property with the specified property_name . More... | |
EAPI Eina_Value | efl_property_reflection_get (const Eo *obj, const char *property_name) |
Retrieve an Eina_Value containing the current value of the property specified with property_name . More... | |
EAPI Eina_Bool | efl_property_reflection_exist (Eo *obj, const char *property_name) |
Check if a property exist for reflection. More... | |
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 callback 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... | |
const Efl_Event_Description * | _Efl_Callback_Array_Item_Full::desc |
The event description. More... | |
Efl_Callback_Priority | _Efl_Callback_Array_Item_Full::priority |
Efl_Event_Cb | _Efl_Callback_Array_Item_Full::func |
< The priorit of the event More... | |
void * | _Efl_Callback_Array_Item_Full::user_data |
The user data pointer to be passed to the func. | |
Eina_Value(* | _Efl_Future_Cb_Desc::success )(Eo *o, void *data, const Eina_Value value) |
Called on success (value.type is not EINA_VALUE_TYPE_ERROR ). More... | |
Eina_Value(* | _Efl_Future_Cb_Desc::error )(Eo *o, void *data, Eina_Error error) |
Called on error (value.type is EINA_VALUE_TYPE_ERROR ). More... | |
void(* | _Efl_Future_Cb_Desc::free )(Eo *o, void *data, const Eina_Future *dead_future) |
Called on all situations to notify future destruction. More... | |
const Eina_Value_Type * | _Efl_Future_Cb_Desc::success_type |
If provided, then success will only be called if the value type matches the given pointer. More... | |
const void * | _Efl_Future_Cb_Desc::data |
Context data given to every callback. More... | |
Eina_Future ** | _Efl_Future_Cb_Desc::storage |
This is used by Eo to cancel pending futures in case an Eo object is deleted. 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... | |
const char * | _Efl_Object_Property_Reflection::property_name |
The name of the property. | |
Efl_Object_Property_Reflection_Setter | _Efl_Object_Property_Reflection::set |
The function used to set a generic Eina_Value on this property of the object. More... | |
Efl_Object_Property_Reflection_Getter | _Efl_Object_Property_Reflection::get |
The function used to retrieve a generic Eina_Value from this property of the object. More... | |
const Efl_Object_Property_Reflection * | _Efl_Object_Property_Reflection_Ops::table |
The reflection table. More... | |
size_t | _Efl_Object_Property_Reflection_Ops::count |
Number of table lines descriptions. 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 |
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 = 1 |
This variable stores the current eo init generation. More... | |
Generic object system.
#define EFL_TRANSFER_OWNERSHIP |
This is a no-operation.
Its presence behind a function parameter indicates that ownership of the parameter is transferred to the callee. When present after a method, it indicates that the return value of the method is transferred to the caller. For objects, ownership transfer means that exactly one reference is transferred. If you transfer ownership without owning a reference in the first place, you will get unexpected behavior. For non-Objects, ownership transfer means that the responsibility of freeing a segment of memory is passed on.
#define efl_future_cb | ( | _eo, | |
... | |||
) | efl_future_cb_from_desc(_eo, (Efl_Future_Cb_Desc){__VA_ARGS__}) |
Syntax suger over efl_future_cb_from_desc()
Usage:
#define efl_future_then | ( | _eo, | |
_future, | |||
... | |||
) | eina_future_then_from_desc(_future, efl_future_cb(_eo, ## __VA_ARGS__)) |
Syntax sugar over eina_future_then_from_desc() and efl_future_cb().
Usage:
#define efl_future_chain | ( | _eo, | |
_prev, | |||
... | |||
) | efl_future_chain_array(_eo, _prev, (Efl_Future_Cb_Desc []){__VA_ARGS__, {NULL, NULL, NULL, NULL, NULL}}) |
Syntax suger over efl_future_chain_array()
Usage:
#define EFL_FUNC_COMMON_OP | ( | Obj, | |
Name, | |||
DefRet | |||
) |
#define EFL_FUNC_COMMON_OP_END | ( | Obj, | |
Name, | |||
DefRet, | |||
ErrorCase | |||
) |
#define _EFL_OBJECT_FUNC_BODY | ( | Name, | |
ObjType, | |||
Ret, | |||
DefRet, | |||
ErrorCase | |||
) |
#define _EFL_OBJECT_VOID_FUNC_BODY | ( | Name, | |
ObjType, | |||
ErrorCase | |||
) |
#define _EFL_OBJECT_FUNC_BODYV | ( | Name, | |
ObjType, | |||
Ret, | |||
DefRet, | |||
ErrorCase, | |||
Arguments, | |||
... | |||
) |
#define _EFL_OBJECT_VOID_FUNC_BODYV | ( | Name, | |
ObjType, | |||
ErrorCase, | |||
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 add it to an existing parent object.
The object returned by this function will always have 1 ref (reference count) which belongs to its parent. Therefore, it is not safe to use the returned object outside the constructor methods passed as parameters. If you need to further manipulate the object, use efl_add_ref and remember to efl_unref the object when done.
If the object is created using this function, then it will automatically be deleted when the parent object is. There is no need to call efl_unref on the child. This is convenient in C.
If the object's class has a constructor, it is called.
klass | The class of the object to create. |
parent | The parent to set to the object (MUST not be NULL ) |
... | The ops to run. |
Referenced by ecore_exe_pipe_run(), ecore_file_download_full(), ecore_init(), ecore_ipc_client_server_get(), ecore_timer_add(), ecore_timer_loop_add(), edje_3d_object_add(), edje_edit_object_add(), edje_init(), edje_shutdown(), efl_net_connman_access_point_new(), efl_net_connman_technology_new(), eio_init(), elm_colorselector_palette_item_color_set(), elm_ctxpopup_add(), elm_entry_bounce_get(), elm_gengrid_add(), elm_genlist_add(), elm_hoversel_add(), elm_menu_add(), elm_menu_parent_get(), elm_popup_add(), elm_slideshow_add(), elm_theme_new(), elm_win_floating_mode_get(), emotion_object_add(), evas_new(), evas_object_box_add(), evas_object_grid_add(), evas_object_image_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, add it to an existing parent object and return an extra reference for further manipulation.
The object returned by this function has 1 ref which belongs to the caller. If a parent object is provided (parent
is not NULL
) then the object has an additional reference for the parent. Note that if a child object is created in this way then it won't get automatically deleted with the parent. You need to manually remove the extra ref by calling efl_unref.
If the object's class has a constructor, it is called.
klass | The class of the object to create. |
parent | The parent to set to the object (can be NULL ). |
... | The ops to run. |
Referenced by ecore_con_eet_client_new(), ecore_con_eet_server_new(), edje_audio_channel_mute_get(), elm_fileselector_add(), elm_fileselector_entry_path_get(), elm_fileselector_path_set(), and evas_device_add_full().
#define efl_new | ( | klass, | |
... | |||
) | efl_add_ref(klass, NULL, ##__VA_ARGS__) |
Create a new object.
The object returned by this function has 1 ref which belongs to the caller. You need to manually remove the ref by calling efl_unref when you are done working with the object. The object will be destroyed when all other refs obtained with efl_ref have been returned with efl_unref.
If the object's class has a constructor, it is called.
klass | The class of the object to create. |
... | 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().
#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 to be destroyed. |
typedef struct _Efl_Event Efl_Event |
A parameter passed in event callbacks holding extra event parameters.
This is the full event information passed to callbacks in C.
typedef void(* Efl_Event_Cb) (void *data, const Efl_Event *event) |
An event callback prototype.
Efl_Substitute_Ctor_Cb |
Callback to be called instead of the object constructor.
Only intended for binding creators.
data | Additional data previously supplied by the user |
obj_id | The object being constructed. |
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 with it for an event.
The callback will never be emitted again after this call, even if a event emission is taking place.
[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 edje_transition_duration_factor_set(), elm_box_transition_free(), elm_drag_cancel(), elm_drop_target_del(), elm_object_focus_set(), elm_policy_set(), elm_store_free(), elm_store_target_genlist_set(), elm_win_rotation_get(), evas_device_seat_id_get(), evas_object_del(), 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_event_current_event_get(), ecore_idle_enterer_before_add(), ecore_ipc_client_server_get(), edje_file_data_get(), elm_hoversel_add(), and elm_win_rotation_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. Please provide objects of the same type as advertised in the EO file, as this is what listeners of this event will be expecting. Keep in mind that: 1) Objects must be passed as a normal Eo*. Event subscribers can call functions on these objects. 2) Structs, built-in types and containers must be passed as const pointers, with one level of indirection. |
false
If one of the callbacks aborted the call, true
otherwise Referenced by ecore_main_fd_handler_active_set(), ecore_shutdown(), ecore_timer_dump(), efl_net_connman_access_point_update(), efl_net_connman_technology_type_from_str(), efl_ref(), efl_unref(), elm_fileselector_add(), elm_win_rotation_get(), emotion_object_last_position_load(), emotion_object_last_position_save(), emotion_object_priority_get(), evas_device_seat_id_get(), evas_event_thaw_eval(), evas_object_smart_member_add(), evas_object_smart_member_del(), evas_object_textblock_text_markup_prepend(), evas_object_textblock_text_markup_set(), evas_textblock_cursor_char_delete(), evas_textblock_cursor_range_delete(), and evas_textblock_cursor_text_prepend().
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 ecore_evas_psl1ght_new(), 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_combobox_add(), elm_entry_entry_get(), elm_entry_filter_accept_set(), elm_entry_filter_limit_size(), elm_flip_perspective_set(), elm_genlist_bounce_get(), elm_map_overlay_del(), elm_naviframe_add(), elm_popup_add(), elm_prefs_file_set(), elm_slideshow_add(), elm_win_rotation_get(), evas_object_image_extension_can_load_fast_get(), evas_object_smart_callback_call(), evas_textblock_cursor_char_next(), evas_textblock_cursor_char_prev(), evas_textblock_cursor_cluster_next(), evas_textblock_cursor_cluster_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_word_end(), evas_textblock_cursor_word_start(), and evas_textblock_string_escape_get().
EOAPI Eina_Future_Desc efl_future_cb_from_desc | ( | const Eo * | obj, |
const Efl_Future_Cb_Desc | desc | ||
) |
Creates an Eina_Future_Desc for an EO object.
This function creates an Eina_Future_Desc based on an Efl_Future_Cb_Desc. The main purpose of this function is create a "link" between the future and the object. In case the object is deleted before the future is resolved/rejected, the object destructor will cancel the future.
The example below demonstrates a file download using an Eo object. If the download lasts more than 30 seconds the Eo object will be deleted along with the future. Usually this would be done with an eina_future_race() of the download promise and a timeout promise, however the following example is useful to illustrate efl_key_data_set() usage.
obj | The object to create the link. |
desc | An Efl_Future_Cb_Desc |
References efl_data_scope_get(), eina_inlist_append(), EINA_INLIST_GET, EINA_SAFETY_ON_NULL_GOTO, and EINA_SAFETY_ON_TRUE_GOTO.
Referenced by efl_future_chain_array().
EOAPI Eina_Future* efl_future_chain_array | ( | Eo * | obj, |
Eina_Future * | prev, | ||
const Efl_Future_Cb_Desc | descs[] | ||
) |
Creates a Future chain based on #Efl_Future_Cb_Desc.
This function is an wrapper around efl_future_cb_from_desc() and eina_future_then_from_desc()
For more information about these check the documentation.
obj | An EO object to link to the future |
prev | The previous future |
descs | An array of Efl_Future_Cb_Desc |
NULL
on error. ENOMEM
or EINVAL
and desc.free to free the obj
if necessary.References DBG, efl_class_name_get(), efl_future_cb_from_desc(), EINA_FALSE, eina_future_then_from_desc(), EINA_INLIST_FOREACH_SAFE, EINA_LIKELY, EINA_LIST_FOREACH_SAFE, EINA_SAFETY_ON_NULL_GOTO, eina_stringshare_del(), EINA_UNLIKELY, eina_value_flush(), ERR, _Efl_Future_Cb_Desc::error, _Efl_Future_Cb_Desc::free, _Efl_Future_Cb_Desc::success, and _Efl_Future_Cb_Desc::success_type.
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().
Shutdown the eo subsystem.
EINA_TRUE
if eo is init, EINA_FALSE
otherwise.References efl_class_name_get(), efl_ref_count(), EINA_ITERATOR_FOREACH, eina_iterator_free(), eina_log_timing(), EINA_TRUE, and eo_objects_iterator_new().
EAPI 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 can only be called before any objects are created/allocated on the thread where it's called. Calling it after this point will result in undefined behavior, so be sure to call this immediaetly after a thread begins to execute. You must not change the domain of the main thread.
EAPI 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.
EAPI 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 this via efl_domain_current_push() and efl_domain_current_pop(). This only gets the domain for the current thread.
EAPI 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 this via efl_domain_current_push() and efl_domain_current_pop(). The current domain is the one on the 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.
EAPI 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. This applies only to the calling thread.
EAPI 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().
EAPI 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 which called efl_domain_data_get() should suspend and not execute anything related to eo or efl objects until the thread that adopted the data calls efl_domain_data_return() to return the data to its owner and stop making it available to that thread.
EAPI 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 in such a way that these are 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().
EAPI 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 said thread to continue execution afterwards. 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 alternate object that may be referenced by obj |
This checks to see if 2 objects are compatible : whether they are parent or children of each other, could reference each other etc. You only need to call this if you have 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_timer_dump(), ecore_timer_freeze(), ecore_timer_precision_set(), ecore_timer_thaw(), efl_debug_name_get(), efl_net_connman_technology_type_from_str(), elm_access_highlight_next_set(), elm_actionslider_add(), elm_bg_color_get(), elm_bg_color_set(), elm_bg_file_get(), elm_box_add(), elm_bubble_add(), elm_button_autorepeat_get(), elm_calendar_add(), elm_check_state_pointer_set(), elm_clock_add(), elm_colorselector_add(), elm_colorselector_palette_item_selected_get(), elm_combobox_add(), elm_conformant_add(), elm_ctxpopup_add(), elm_dayselector_add(), elm_diskselector_add(), elm_diskselector_scroller_policy_get(), elm_diskselector_scroller_policy_set(), elm_entry_add(), elm_entry_bounce_get(), elm_entry_bounce_set(), elm_entry_file_set(), elm_entry_scrollbar_policy_set(), elm_fileselector_add(), elm_fileselector_button_add(), elm_fileselector_entry_add(), elm_fileselector_sort_method_get(), elm_flipselector_add(), elm_gengrid_add(), elm_gengrid_bounce_set(), elm_gengrid_item_class_unref(), elm_gengrid_item_cursor_set(), elm_gengrid_item_cursor_unset(), elm_gengrid_item_tooltip_content_cb_set(), elm_gengrid_item_tooltip_style_set(), elm_gengrid_item_tooltip_unset(), elm_gengrid_scroller_policy_get(), elm_gengrid_scroller_policy_set(), elm_gengrid_wheel_disabled_get(), elm_genlist_add(), elm_genlist_bounce_set(), elm_genlist_item_class_unref(), elm_genlist_item_cursor_set(), elm_genlist_item_cursor_unset(), elm_genlist_item_tooltip_content_cb_set(), elm_genlist_item_tooltip_style_set(), elm_genlist_item_tooltip_unset(), elm_genlist_scroller_policy_get(), elm_genlist_scroller_policy_set(), elm_gesture_layer_add(), elm_grid_add(), elm_hover_add(), elm_hover_parent_get(), elm_hoversel_add(), elm_icon_add(), elm_icon_memfile_set(), elm_image_aspect_fixed_get(), elm_label_add(), elm_layout_edje_object_can_access_get(), elm_list_add(), elm_list_scroller_policy_set(), elm_map_add(), elm_map_zoom_mode_get(), elm_mapbuf_add(), elm_menu_parent_get(), elm_multibuttonentry_add(), elm_naviframe_add(), elm_notify_add(), elm_panel_add(), elm_photo_add(), elm_player_add(), elm_plug_add(), elm_popup_add(), elm_prefs_add(), elm_route_add(), elm_scroller_add(), elm_scroller_propagate_events_get(), elm_segment_control_add(), elm_separator_add(), elm_slideshow_add(), elm_spinner_special_value_get(), elm_spinner_value_get(), elm_table_add(), elm_thumb_add(), elm_toolbar_add(), elm_toolbar_reorder_mode_get(), elm_win_floating_mode_get(), elm_win_inwin_add(), elm_win_rotation_get(), emotion_object_file_set(), evas_data_argb_unpremul(), evas_event_feed_axis_update(), evas_event_thaw(), evas_new(), evas_object_del(), evas_object_name_child_find(), 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.
Referenced by efl_debug_name_get(), and elm_panel_add().
Gets the class of the object.
obj | The object to work on |
Referenced by elm_fileselector_add(), elm_fileselector_entry_path_get(), elm_fileselector_path_get(), elm_fileselector_path_set(), elm_fileselector_selected_get(), elm_fileselector_selected_paths_get(), elm_fileselector_selected_set(), and elm_object_item_data_get().
EAPI Eo* _efl_add_internal_start_bindings | ( | const char * | file, |
int | line, | ||
const Efl_Class * | klass_id, | ||
Eo * | parent, | ||
Eina_Bool | ref, | ||
Eina_Bool | is_fallback, | ||
Efl_Substitute_Ctor_Cb | substitute_ctor, | ||
void * | sub_ctor_data | ||
) |
Just like _efl_add_internal_start() but with additional options.
Only intended for binding creators.
file | File name of the call site, used for debug logs. |
line | Line number of the call site, used for debug logs. |
klass_id | Pointer for the class being instantiated. |
ref | Whether or not the object will have an additional reference if it has a parent. |
parent | Object parent, can be NULL. |
is_fallback | Whether or not the fallback efl_added behaviour is to be used. |
substitute_ctor | Optional callback to replace the call for efl_constructor(), if NULL efl_constructor() will be called normally. |
sub_ctor_data | Additional data to be passed to the substitute_ctor callback. |
Unrefs the object and reparents it to NULL.
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 can be passed to it easily.
[in] | obj | The object. |
References efl_class_name_get(), efl_data_scope_get(), efl_debug_name_get(), efl_isa(), efl_ref(), efl_unref(), EINA_FALSE, EINA_FREE_CB, eina_freeq_ptr_main_add(), eina_hash_add(), eina_hash_del(), eina_hash_find(), eina_hash_free(), eina_hash_pointer_new(), eina_hash_population(), eina_inlist_append(), EINA_INLIST_CONTAINER_GET, EINA_INLIST_GET, eina_inlist_remove(), EINA_LIKELY, EINA_MAGIC_SET, eina_spinlock_release(), eina_spinlock_take(), eina_trash_pop(), eina_trash_push(), EINA_TRUE, ERR, FUNC_ITERATOR_FREE, FUNC_ITERATOR_GET_CONTAINER, and FUNC_ITERATOR_NEXT.
Referenced by ecore_exe_free(), ecore_ipc_client_server_get(), ecore_ipc_shutdown(), ecore_main_fd_handler_active_set(), ecore_timer_del(), ecore_timer_precision_set(), edje_shutdown(), efl_net_connman_access_point_new(), efl_net_connman_technology_new(), efl_unref(), elm_config_drag_anim_duration_set(), elm_diskselector_scroller_policy_set(), elm_hoversel_add(), elm_list_scroller_policy_get(), elm_menu_parent_get(), elm_naviframe_add(), elm_object_focus_region_show_mode_get(), elm_object_item_del(), elm_segment_control_add(), elm_theme_free(), elm_toolbar_add(), evas_device_del(), evas_free(), and evas_object_del().
Set an override for a class.
This can be used to override a class with another class such that when klass
is added with efl_add(), an object of type override
is returned.
[in] | klass | The class to be overridden |
[in] | override | The class to override with; must inherit from or implement klass |
true
if the override was successfully set References efl_isa(), EINA_FALSE, eina_hash_pointer_new(), eina_hash_set(), EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_SAFETY_ON_TRUE_RETURN_VAL, and EINA_TRUE.
EAPI Eina_Bool efl_class_override_unregister | ( | const Efl_Class * | klass, |
const Efl_Class * | override | ||
) |
Unset an override for a class.
This is used to unset a previously-set override on a given class. It will only succeed if override
is the currently-set override for klass
.
[in] | klass | The class to unset the override from |
[in] | override | The class override to be removed |
true
if the override was successfully unset References EINA_FALSE, eina_hash_del_by_key(), eina_hash_find(), EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.
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_con_local_path_new(), 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_timer_dump(), ecore_timer_precision_set(), edje_color_class_list(), edje_edit_sound_tones_list_get(), edje_perspective_set(), edje_size_class_list(), edje_text_class_list(), efl_del(), efl_future_cb_from_desc(), efl_net_connman_access_point_new(), efl_net_connman_access_point_path_get(), efl_net_connman_access_point_update(), efl_net_connman_control_find_technology_by_type(), efl_net_connman_technology_new(), efl_net_connman_technology_path_get(), efl_net_connman_technology_type_from_str(), 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_ctxpopup_add(), elm_genlist_scroller_policy_get(), elm_hoversel_add(), elm_image_animated_get(), elm_image_animated_play_get(), elm_image_animated_play_set(), elm_image_animated_set(), elm_image_async_open_set(), elm_layout_content_swallow_list_get(), elm_layout_part_cursor_engine_only_get(), elm_layout_part_cursor_engine_only_set(), elm_layout_part_cursor_get(), elm_layout_part_cursor_set(), elm_layout_part_cursor_style_get(), elm_layout_part_cursor_style_set(), elm_layout_part_cursor_unset(), elm_menu_parent_get(), elm_naviframe_add(), elm_object_focus_region_show_mode_get(), elm_object_focus_region_show_mode_set(), elm_prefs_file_get(), elm_prefs_file_set(), elm_scroller_add(), elm_slideshow_add(), elm_theme_copy(), elm_theme_new(), elm_theme_ref_set(), elm_win_floating_mode_get(), elm_win_rotation_get(), evas_device_class_set(), 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_axis_update(), evas_event_feed_hold(), evas_event_feed_key_down(), evas_event_feed_key_down_with_keycode(), evas_event_feed_key_up(), evas_event_feed_key_up_with_keycode(), evas_event_feed_mouse_cancel(), evas_event_feed_mouse_move(), evas_event_feed_mouse_out(), evas_event_feed_mouse_wheel(), evas_event_input_mouse_move(), evas_event_thaw_eval(), 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_freeze_events_get(), 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_delete(), evas_textblock_cursor_char_geometry_get(), 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_string_escape_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 ERR.
Referenced by ecore_timer_del(), elm_combobox_add(), elm_layout_edje_object_can_access_get(), elm_layout_edje_object_can_access_set(), elm_layout_signal_callback_add(), elm_layout_signal_callback_del(), elm_layout_sizing_restricted_eval(), elm_object_item_del(), elm_win_autodel_get(), 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_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_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(), emotion_object_image_get(), evas_object_event_callback_del(), evas_object_event_callback_del_full(), evas_object_event_callback_priority_add(), evas_object_smart_member_add(), evas_object_smart_member_del(), and evas_smart_legacy_type_register().
EAPI 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. Both efl_xref and efl_xunref that make debugging easier in these situations. These functions should only be used on a small scale i.e at the start of some section in which an object may be freed unless you really know what you are doing.
References efl_event_callback_call(), and EINA_UNLIKELY.
Referenced by ecore_evas_psl1ght_new(), ecore_ipc_client_server_get(), ecore_timer_dump(), efl_class_functions_set(), efl_del(), efl_xref_internal(), elm_layout_text_set(), elm_list_scroller_policy_get(), elm_naviframe_add(), elm_theme_copy(), elm_theme_ref_set(), elm_win_floating_mode_get(), evas_device_parent_set(), evas_device_push(), evas_event_feed_axis_update(), evas_event_feed_hold(), evas_event_feed_mouse_cancel(), evas_event_feed_mouse_move(), evas_event_feed_mouse_out(), evas_event_feed_mouse_wheel(), evas_event_thaw_eval(), evas_object_image_extension_can_load_fast_get(), evas_object_ref(), and evas_smart_legacy_type_register().
Decrement the object's reference count by 1 and free it if needed.
obj | the object to work on. |
References efl_del(), efl_event_callback_call(), EINA_FALSE, EINA_LOG_LEVEL_ERR, EINA_TRUE, EINA_UNLIKELY, and ERR.
Referenced by ecore_con_eet_server_free(), ecore_evas_psl1ght_new(), ecore_ipc_client_server_get(), ecore_timer_del(), ecore_timer_dump(), efl_class_functions_set(), efl_del(), efl_xunref(), elm_layout_text_set(), elm_list_scroller_policy_get(), elm_naviframe_add(), elm_theme_free(), elm_win_rotation_get(), eo_objects_iterator_new(), evas_device_del(), evas_device_pop(), evas_device_seat_id_get(), evas_event_feed_axis_update(), evas_event_feed_hold(), evas_event_feed_mouse_cancel(), evas_event_feed_mouse_move(), evas_event_feed_mouse_out(), evas_event_feed_mouse_wheel(), evas_event_thaw_eval(), evas_free(), evas_object_image_extension_can_load_fast_get(), evas_object_unref(), and evas_smart_legacy_type_register().
Return the ref count of the object passed.
obj | the object to work on. |
Referenced by efl_object_shutdown(), efl_ownable_get(), elm_object_item_del(), and elm_theme_free().
EAPI 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. The interceptor function handles 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_drag_anim_duration_set().
EAPI 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. Make sure that the interceptor function knows if this has happened. If you want to override the interceptor be sure to call it after your own interceptor function has finished. It's generally be a bad idea to override these functions however.
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, EINA_UNUSED, and ERR.
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_freeq_ptr_main_add(), EINA_INLIST_CONTAINER_GET, EINA_LIKELY, eina_spinlock_release(), eina_spinlock_take(), eina_trash_push(), EINA_UNUSED, 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. |
Do not use this function, use efl_xref instead. A compile flag may make it and eobj_xunref() behave the same as eobj_ref() and eobj_unref() respectively. 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. 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. The function 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(), elm_win_floating_mode_get(), and evas_new().
EOAPI void efl_wref_del | ( | Eo * | obj, |
Efl_Object ** | wref | ||
) |
Delete the weak reference passed.
This function will set *wref to NULL after its execution.
[in] | wref | The weak ref |
Referenced by evas_output_viewport_get().
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(), elm_drag_cancel(), elm_drag_item_container_add(), elm_drop_item_container_add(), elm_drop_item_container_del(), elm_drop_target_add(), elm_drop_target_del(), elm_object_orientation_mode_disabled_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(), elm_drag_cancel(), elm_drag_item_container_add(), elm_drop_item_container_add(), elm_drop_item_container_del(), elm_drop_target_add(), elm_drop_target_del(), elm_object_orientation_mode_disabled_get(), 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 when the 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. 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 when the 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. 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. 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. 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 when the referring object is deleted.
This is the same key store used by key_data and key_obj. 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 when the referring object is deleted.
This is the same key store used by key_data and key_obj. 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 of calling the function efl_manual_free to free the memory allocated for this object.
Do not use this 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 destroy the object but doesn't free the private data nor the object itself.
Referenced by evas_object_del().
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 beforehand with the parameter EINA_TRUE. An error will display 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 are not yet free such as those which have been destroyed. |
References EINA_FALSE.
EAPI Eina_Error efl_property_reflection_set | ( | Eo * | obj, |
const char * | property_name, | ||
Eina_Value | value | ||
) |
Set the given Eina_Value to the property with the specified property_name
.
obj | The object to set the property on |
property_name | The name of the property to modify. |
value | The value to set, the value passed here will be flushed by the function |
EAPI Eina_Value efl_property_reflection_get | ( | const Eo * | obj, |
const char * | property_name | ||
) |
Retrieve an Eina_Value containing the current value of the property specified with property_name
.
obj | The object to set the property on |
property_name | The name of the property to get. |
References eina_value_error_init().
Check if a property exist for reflection.
obj | The object to inspect. |
property_name | The name of the property to check if it exist. |
References EINA_FALSE, and EINA_TRUE.
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 you need to init locks before using them. Don't touch it if you don't know what you are doing.
Referenced by efl_class_new(), and efl_object_init().
EAPI unsigned int _efl_object_init_generation |
This variable stores the current eo init generation.
In other words how many times you have completed full init/shutdown cycles. This starts at 1 and is incremeted on every call to shutdown that actually shuts down eo.
Efl_Object* _Efl_Event::object |
The object the callback was called on.
Referenced by ecore_ipc_client_server_get(), ecore_timer_precision_set(), edje_file_data_get(), elm_drop_target_del(), elm_entry_add(), elm_fileselector_selected_set(), elm_gengrid_add(), elm_genlist_add(), elm_object_focus_region_show_mode_get(), elm_object_focus_set(), elm_scroller_add(), elm_validator_regexp_helper(), elm_win_rotation_get(), evas_object_del(), and evas_textblock_text_utf8_to_markup().
const Efl_Event_Description* _Efl_Event::desc |
void* _Efl_Event::info |
Extra event information passed by the event caller.
Must be cast to the event type declared in the EO file. Keep in mind that: 1) Objects are passed as a normal Eo*. Event subscribers can call functions on these objects. 2) Structs, built-in types and containers are passed as const pointers, with one level of indirection.
Referenced by elm_entry_add(), elm_fileselector_selected_set(), elm_gengrid_add(), and elm_win_rotation_get().
const Efl_Event_Description* _Efl_Callback_Array_Item::desc |
The event description.
Referenced by efl_callbacks_cmp().
Efl_Event_Cb _Efl_Callback_Array_Item::func |
The callback function.
const Efl_Event_Description* _Efl_Callback_Array_Item_Full::desc |
The event description.
Referenced by ecore_timer_precision_set(), and elm_win_rotation_get().
Efl_Event_Cb _Efl_Callback_Array_Item_Full::func |
< The priorit of the event
The callback function.
Eina_Value(* _Efl_Future_Cb_Desc::success) (Eo *o, void *data, const Eina_Value value) |
Called on success (value.type is not EINA_VALUE_TYPE_ERROR
).
If success_type
is not NULL, then the value is guaranteed to be of that type. If not, it will trigger error
with EINVAL
.
After this function returns, free
callback is called if provided.
o | The object used to create the link in efl_future_cb_from_desc() or efl_future_chain_array(). |
value | The operation result |
value
argument. If you need to convert to a different type or generate a new value, use eina_value_setup()
on another Eina_Value and return it. By returning a promise Eina_Value (eina_promise_as_value()) the whole chain will wait until the promise is resolved in order to continue execution. Note that the value contents must survive this function scope. In other words, do not use stack allocated blobs, arrays, structures or types that keeps references to memory you assign. Values will be automatically cleaned up using eina_value_flush()
once they are unused (no more future or futures returned a new value). Referenced by efl_future_chain_array().
Eina_Value(* _Efl_Future_Cb_Desc::error) (Eo *o, void *data, Eina_Error error) |
Called on error (value.type is EINA_VALUE_TYPE_ERROR
).
This function can return another error then propagate or convert it. However it may also return a non-error, in which case the next future in the chain will receive a regular value, which may call its success
.
If this function is not provided, then it will passthrough the error to the next error handler.
It may be called with EINVAL
if success_type
is provided and doesn't match the received type.
It may be called with ECANCELED
if future was canceled.
It may be called with ENOMEM
if memory allocation failed during callback creation.
After this function returns, free
callback is called if provided.
EINVAL
, ENOMEM
and ECANCELED
. Otherwise this function is called from a safe context.o | The object used to create the link in efl_future_cb_from_desc() or efl_future_chain_array(). |
error | The operation error |
eina_value_setup()
on another Eina_Value and return it. By returning a promise Eina_Value (eina_promise_as_value()) the whole chain will wait until the promise is resolved in order to continue execution. Note that the value contents must survive this function scope. In other words not use stack allocated blobs, arrays, structures or types that keeps references to memory you give. Values will be automatically cleaned up using eina_value_flush()
once they are unused (no more future or futures returned a new value). Referenced by efl_future_chain_array().
Called on all situations to notify future destruction.
This is called after success
or error
, as well as it's called if none of them are provided. Thus can be used as a "weak ref" mechanism.
EINVAL
, ENOMEM
and ECANCELED
. Otherwise this function is called from a safe context.o | The object used to create the link in efl_future_cb_from_desc() or efl_future_chain_array(). |
dead_future | The future that's been freed. |
Referenced by efl_future_chain_array().
const Eina_Value_Type* _Efl_Future_Cb_Desc::success_type |
If provided, then success
will only be called if the value type matches the given pointer.
If provided and no match is found, error
will be called with EINVAL
. If there's no error
, then it will be propagated to the next future in the chain.
Referenced by efl_future_chain_array().
const void* _Efl_Future_Cb_Desc::data |
Context data given to every callback.
This must be freed only by free
callback as it's called from every case, otherwise it may lead to memory leaks.
Eina_Future** _Efl_Future_Cb_Desc::storage |
This is used by Eo to cancel pending futures in case an Eo object is deleted.
It can be NULL
.
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_memory_size_get(), and efl_class_new().
Efl_Class_Type _Efl_Class_Description::type |
The type of the class.
Referenced by efl_class_new().
size_t _Efl_Class_Description::data_size |
The size of data (private + protected + public) this class needs per object.
Referenced by efl_class_new().
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_Object_Property_Reflection_Setter _Efl_Object_Property_Reflection::set |
The function used to set a generic Eina_Value on this property of the object.
Efl_Object_Property_Reflection_Getter _Efl_Object_Property_Reflection::get |
The function used to retrieve a generic Eina_Value from this property of the object.
const Efl_Object_Property_Reflection* _Efl_Object_Property_Reflection_Ops::table |
The reflection table.
size_t _Efl_Object_Property_Reflection_Ops::count |
Number of table lines descriptions.
_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 you need to init locks before using them. Don't touch it if you don't know what you are doing.
Referenced by efl_class_new(), and efl_object_init().
_efl_object_init_generation = 1 |
This variable stores the current eo init generation.
In other words how many times you have completed full init/shutdown cycles. This starts at 1 and is incremeted on every call to shutdown that actually shuts down eo.