Modules | Data Structures | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables
Eo

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_Dataefl_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 Eoefl_super (const Eo *obj, const Efl_Class *cur_klass)
 Prepare a call to the parent class implementation of a function. More...
 
EAPI Eoefl_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_Classefl_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 Eoefl_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 Eoefl_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_Valueefl_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...
 

Detailed Description

Generic object system.

Macro Definition Documentation

◆ EFL_TRANSFER_OWNERSHIP

#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.

◆ efl_future_cb

#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:

eina_future_then_from_desc(future, efl_future_cb(my_object, .succes = success, .success_type = EINA_VALUE_TYPE_INT));
See also
efl_future_cb_from_desc()
efl_future_then()

◆ efl_future_then

#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:

efl_future_then(o, future, .success = success, .success_type = EINA_VALUE_TYPE_INT);

◆ efl_future_chain

#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:

Eina_Future *f = efl_future_chain(my_object, prev_future, {}, {});
See also
efl_future_chain_array()

◆ EFL_FUNC_COMMON_OP

#define EFL_FUNC_COMMON_OP (   Obj,
  Name,
  DefRet 
)
Value:
static Efl_Object_Op ___op = 0; \
static unsigned int ___generation = 0; \
Efl_Object_Op_Call_Data ___call; \
_Eo_##Name##_func _func_; \
if (EINA_UNLIKELY((___op == EFL_NOOP) || \
(___generation != _efl_object_init_generation))) \
goto __##Name##_op_create; /* yes a goto - see below */ \
__##Name##_op_create_done: EINA_HOT; \
if (EINA_UNLIKELY(!_efl_object_call_resolve( \
(Eo *) Obj, #Name, &___call, ___op, __FILE__, __LINE__))) \
goto __##Name##_failed; \
_func_ = (_Eo_##Name##_func) ___call.func;
#define EINA_UNLIKELY(exp)
Definition: eina_types.h:398
EAPI unsigned int _efl_object_init_generation
This variable stores the current eo init generation.
Definition: eo.c:42
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:173
#define EFL_NOOP
A special Efl_Object_Op meaning "No operation".
Definition: Eo.h:722
unsigned int Efl_Object_Op
The Eo operation type id.
Definition: Eo.h:716

◆ EFL_FUNC_COMMON_OP_END

#define EFL_FUNC_COMMON_OP_END (   Obj,
  Name,
  DefRet,
  ErrorCase 
)
Value:
__##Name##_op_create: EINA_COLD; \
___op = _efl_object_op_api_id_get(EFL_FUNC_COMMON_OP_FUNC(Name), Obj, #Name, __FILE__, __LINE__); \
___generation = _efl_object_init_generation; \
if (EINA_UNLIKELY(___op == EFL_NOOP)) goto __##Name##_failed; \
goto __##Name##_op_create_done; \
__##Name##_failed: EINA_COLD; \
ErrorCase \
return DefRet;
#define EINA_UNLIKELY(exp)
Definition: eina_types.h:398
EAPI unsigned int _efl_object_init_generation
This variable stores the current eo init generation.
Definition: eo.c:42
#define EFL_NOOP
A special Efl_Object_Op meaning "No operation".
Definition: Eo.h:722

◆ _EFL_OBJECT_FUNC_BODY

#define _EFL_OBJECT_FUNC_BODY (   Name,
  ObjType,
  Ret,
  DefRet,
  ErrorCase 
)
Value:
Ret \
Name(ObjType obj) \
{ \
typedef Ret (*_Eo_##Name##_func)(Eo *, void *obj_data); \
Ret _r; \
EFL_FUNC_COMMON_OP(obj, Name, DefRet); \
_EFL_OBJECT_API_BEFORE_HOOK \
_r = _EFL_OBJECT_API_CALL_HOOK(_func_(___call.eo_id, ___call.data)); \
_efl_object_call_end(&___call); \
_EFL_OBJECT_API_AFTER_HOOK \
return _r; \
EFL_FUNC_COMMON_OP_END(obj, Name, DefRet, ErrorCase); \
}
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:173

◆ _EFL_OBJECT_VOID_FUNC_BODY

#define _EFL_OBJECT_VOID_FUNC_BODY (   Name,
  ObjType,
  ErrorCase 
)
Value:
void \
Name(ObjType obj) \
{ \
typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data); \
EFL_FUNC_COMMON_OP(obj, Name, ); \
_EFL_OBJECT_API_BEFORE_HOOK \
_EFL_OBJECT_API_CALL_HOOK(_func_(___call.eo_id, ___call.data)); \
_efl_object_call_end(&___call); \
_EFL_OBJECT_API_AFTER_HOOK \
return; \
EFL_FUNC_COMMON_OP_END(obj, Name, , ErrorCase); \
}
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:173

◆ _EFL_OBJECT_FUNC_BODYV

#define _EFL_OBJECT_FUNC_BODYV (   Name,
  ObjType,
  Ret,
  DefRet,
  ErrorCase,
  Arguments,
  ... 
)
Value:
Ret \
Name(ObjType obj, __VA_ARGS__) \
{ \
typedef Ret (*_Eo_##Name##_func)(Eo *, void *obj_data, __VA_ARGS__); \
Ret _r; \
EFL_FUNC_COMMON_OP(obj, Name, DefRet); \
_EFL_OBJECT_API_BEFORE_HOOK \
_r = _EFL_OBJECT_API_CALL_HOOK(_func_(___call.eo_id, ___call.data, Arguments)); \
_efl_object_call_end(&___call); \
_EFL_OBJECT_API_AFTER_HOOK \
return _r; \
EFL_FUNC_COMMON_OP_END(obj, Name, DefRet, ErrorCase); \
}
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:173

◆ _EFL_OBJECT_VOID_FUNC_BODYV

#define _EFL_OBJECT_VOID_FUNC_BODYV (   Name,
  ObjType,
  ErrorCase,
  Arguments,
  ... 
)
Value:
void \
Name(ObjType obj, __VA_ARGS__) \
{ \
typedef void (*_Eo_##Name##_func)(Eo *, void *obj_data, __VA_ARGS__); \
EFL_FUNC_COMMON_OP(obj, Name, ); \
_EFL_OBJECT_API_BEFORE_HOOK \
_EFL_OBJECT_API_CALL_HOOK(_func_(___call.eo_id, ___call.data, Arguments)); \
_efl_object_call_end(&___call); \
_EFL_OBJECT_API_AFTER_HOOK \
return; \
EFL_FUNC_COMMON_OP_END(obj, Name, , ErrorCase); \
}
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:173

◆ _efl_add_common

#define _efl_add_common (   klass,
  parent,
  is_ref,
  ... 
)
Value:
( \
_efl_add_internal_start(__FILE__, __LINE__, klass, parent, is_ref, EINA_TRUE), \
##__VA_ARGS__, \
(Eo *) _efl_add_end(efl_added, is_ref, EINA_TRUE) \
)
#define EINA_TRUE
boolean value TRUE (numerical value 1)
Definition: eina_types.h:508

◆ efl_add

#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.

Parameters
klassThe class of the object to create.
parentThe parent to set to the object (MUST not be NULL)
...The ops to run.
Returns
An handle to the new object on success, NULL otherwise.

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().

◆ efl_add_ref

#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.

Parameters
klassThe class of the object to create.
parentThe parent to set to the object (can be NULL).
...The ops to run.
Returns
An handle to the new object on success, NULL otherwise.

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().

◆ efl_new

#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.

Parameters
klassThe class of the object to create.
...The ops to run.
Returns
An handle to the new object on success, NULL otherwise.

◆ efl_data_xref

#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()

◆ efl_data_ref

#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().

◆ efl_data_xunref

#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().

See also
efl_data_xref()

◆ efl_data_unref

#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().

See also
efl_data_ref()

Referenced by evas_gl_free(), and evas_gl_new().

◆ efl_xref

#define efl_xref (   obj,
  ref_obj 
)    efl_xref_internal(__FILE__, __LINE__, obj, ref_obj)

Convenience macro around efl_xref_internal()

See also
efl_xref()

Typedef Documentation

◆ Efl_Del_Intercept

Efl_Del_Intercept

A function to be called on object deletion/destruction instead of normal destruction taking place.

Parameters
obj_idThe object needing to be destroyed.

◆ Efl_Event

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.

Since
1.22

◆ Efl_Event_Cb

typedef void(* Efl_Event_Cb) (void *data, const Efl_Event *event)

An event callback prototype.

◆ Efl_Substitute_Ctor_Cb

Efl_Substitute_Ctor_Cb

Callback to be called instead of the object constructor.

Only intended for binding creators.

Parameters
dataAdditional data previously supplied by the user
obj_idThe object being constructed.
Returns
The constructed object in case of success, NULL otherwise.

Enumeration Type Documentation

◆ 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.

Enumerator
EFL_ID_DOMAIN_INVALID 

Invalid.

EFL_ID_DOMAIN_MAIN 

The main loop domain where eo_init() is called.

EFL_ID_DOMAIN_SHARED 

A special shared domain visible to all threads but with extra locking and unlocking costs to access.

EFL_ID_DOMAIN_THREAD 

The normal domain for threads so they can adopt the main loop domain at times.

Function Documentation

◆ efl_event_callback_priority_add()

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.

Parameters
[in]descThe description of the event to listen to
[in]priorityThe priority of the callback
[in]cbthe callback to call
[in]dataadditional data to pass to the callback
Returns
Return true when the callback has been successfully added.

Referenced by evas_object_event_callback_priority_add(), and evas_object_smart_callback_priority_add().

◆ efl_event_callback_del()

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.

Parameters
[in]descThe description of the event to listen to
[in]funcThe callback to delete
[in]user_dataThe data to compare
Returns
Return true when the callback has been successfully removed.
Examples:
emotion_signals_example.c.

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().

◆ efl_event_callback_array_priority_add()

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.

Parameters
[in]arrayAn #Efl_Callback_Array_Item of events to listen to
[in]priorityThe priority of the callback
[in]dataAdditional data to pass to the callback
Returns
Return true when the callback has been successfully added.

Referenced by ecore_idle_enterer_before_add().

◆ efl_event_callback_array_del()

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.

Parameters
[in]arrayAn #Efl_Callback_Array_Item of events to listen to
[in]user_dataThe data to compare
Returns
Return 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().

◆ efl_event_callback_call()

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.

Parameters
[in]descThe description of the event to call.
[in]event_infoExtra 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.
Returns
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().

◆ efl_event_callback_legacy_call()

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.

Parameters
[in]descThe description of the event to call.
[in]event_infoExtra event info to pass to the callbacks.
Returns
false If one of the callbacks aborted the call, true otherwise
Since
1.19

Referenced 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().

◆ efl_future_cb_from_desc()

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.

Note
In case context info is required for the #Efl_Future_Desc, callbacks efl_key_data_set() can be used.

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.

static Eina_Bool
_timeout(void *data)
{
Eo *downloader = data;
//In case the download is not completed yet.
//Delete the downloader (cancels the file download and the future)
efl_key_data_set(downloader, "timer", NULL);
efl_unref(downloader);
return EINA_FALSE;
}
static Eina_Value
_file_ok(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const Eina_Value value)
{
const char *data;
//There's no need to check the value type since EO infra already has done so.
eina_value_get(&value, &data);
//Deliver the data to the user
data_deliver(data);
return v;
}
static Eina_Value
_file_err(Eo *o EINA_UNUSED, void *data EINA_UNUSED, Eina_Error error)
{
//In case the downloader is deleted before the future is resolved, the future will be canceled thus this callback will be called.
fprintf(stderr, "Could not download the file. Reason: %s\n", eina_error_msg_get(error));
}
static void
_downlader_free(Eo *o, void *data EINA_UNUSED, const Eina_Future *dead_future EINA_UNUSED)
{
Ecore_Timer *t = efl_key_data_get(o, "timer");
//The download finished before the timer expired. Cancel it...
if (t)
{
efl_unref(o); //Delete the object
} //else - In this case the future was canceled due efl_unref() in _timeout - No need to call efl_unref()
}
void download_file(const char *file)
{
//This could be rewritten using eina_future_race()
Eo *downloader = efl_add(MY_DOWNLOADER_CLASS, NULL);
Eina_Future *f = downloader_download_file(downloader, file);
timer = ecore_timer_add(30, _timeout, downloader);
//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.
efl_key_data_set(downloader, "timer", timer);
efl_future_then(downloader, f, .success = _file_ok, .error = _file_err, .success_type = EINA_VALUE_TYPE_STRING, .free = downloader_free);
}
Parameters
objThe object to create the link.
descAn Efl_Future_Cb_Desc
Returns
An Eina_Future_Desc to be used by eina_future_then(), eina_future_chain() and friends.
See also
efl_future_chain_array()
efl_future_cb()
#Efl_Future_Cb_Desc
efl_key_data_set()

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().

◆ 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.

Parameters
objAn EO object to link to the future
prevThe previous future
descsAn array of Efl_Future_Cb_Desc
Returns
An Eina_Future or NULL on error.
Note
If an error occurs the whole future chain will be CANCELED, causing desc.error to be called passing ENOMEM or EINVAL and desc.free to free the obj if necessary.
See also
efl_future_chain()
efl_future_cb()
eina_future_then_from_desc()
#Efl_Future_Cb_Desc

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.

◆ efl_object_init()

EAPI Eina_Bool efl_object_init ( void  )

◆ efl_object_shutdown()

EAPI Eina_Bool efl_object_shutdown ( void  )

Shutdown the eo subsystem.

Returns
EINA_TRUE if eo is init, EINA_FALSE otherwise.
See also
efl_object_init()

References efl_class_name_get(), efl_ref_count(), EINA_ITERATOR_FOREACH, eina_iterator_free(), eina_log_timing(), EINA_TRUE, and eo_objects_iterator_new().

◆ efl_domain_get()

EAPI Efl_Id_Domain efl_domain_get ( void  )

Get the native domain for the current thread.

Returns
The native domain

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.

See also
efl_domain_switch()
efl_domain_current_get()
efl_domain_current_set()
efl_domain_current_push()
efl_domain_current_pop()
efl_domain_data_get()
efl_domain_data_adopt()
efl_domain_data_return()
efl_compatible()

◆ efl_domain_switch()

EAPI Eina_Bool efl_domain_switch ( Efl_Id_Domain  domain)

Switch the native domain for the current thread.

Parameters
domainThe domain to switch to
Returns
EINA_TRUE if the switch succeeds and EINA_FALSE if it fails.

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().

See also
efl_domain_get()

References EFL_ID_DOMAIN_MAIN, EFL_ID_DOMAIN_SHARED, EFL_ID_DOMAIN_THREAD, EINA_FALSE, eina_tls_set(), EINA_TRUE, and ERR.

◆ efl_domain_current_get()

EAPI Efl_Id_Domain efl_domain_current_get ( void  )

Get the current domain used for allocating new objects.

Returns
The current domain

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.

See also
efl_domain_get()

◆ efl_domain_current_set()

EAPI Eina_Bool efl_domain_current_set ( Efl_Id_Domain  domain)

Set the current domain used for allocating new objects.

Returns
EINA_TRUE if it succeeds and EINA_FALSE on failure.

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.

See also
efl_domain_get()

References EFL_ID_DOMAIN_MAIN, EFL_ID_DOMAIN_THREAD, EINA_FALSE, EINA_TRUE, and ERR.

◆ efl_domain_current_push()

EAPI Eina_Bool efl_domain_current_push ( Efl_Id_Domain  domain)

Push a new domain onto the domain stack.

Parameters
domainThe domain to push.
Returns
EINA_TRUE if it succeeds and EINA_FALSE on failure.

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.

See also
efl_domain_get()

◆ efl_domain_current_pop()

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().

See also
efl_domain_get()

◆ efl_domain_data_get()

EAPI Efl_Domain_Data* efl_domain_data_get ( void  )

Get an opaque handle to the local native domain eoid data.

Returns
A handle to the local native domain data or NULl on failure

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.

See also
efl_domain_get()

◆ efl_domain_data_adopt()

EAPI Efl_Id_Domain efl_domain_data_adopt ( Efl_Domain_Data data_in)

Adopt a single extra domain to be the current domain.

Parameters
datas_inThe domain data to adopt
Returns
The domain that was adopted or EFL_ID_DOMAIN_INVALID on failure

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.

See also
efl_domain_get()

References EFL_ID_DOMAIN_INVALID, and ERR.

Referenced by ecore_thread_main_loop_begin().

◆ efl_domain_data_return()

EAPI Eina_Bool efl_domain_data_return ( Efl_Id_Domain  domain)

Return a domain to its original owning thread.

Parameters
domainThe domain to return
Returns
EINA_TRUE on success EINA_FALSE on failure

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().

See also
efl_domain_get()

References EFL_ID_DOMAIN_MAIN, EFL_ID_DOMAIN_THREAD, EINA_FALSE, EINA_TRUE, and ERR.

Referenced by ecore_thread_main_loop_end().

◆ efl_compatible()

EAPI Eina_Bool efl_compatible ( const Eo obj,
const Eo obj_target 
)

Check if 2 objects are compatible

Parameters
objThe basic object
obj_targetThe alternate object that may be referenced by obj
Returns
EINA_TRUE if compatible, EINA_FALSE if not

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).

See also
efl_domain_get()

References DBG, EINA_FALSE, and EINA_TRUE.

◆ efl_super()

EAPI Eo* efl_super ( const Eo obj,
const Efl_Class cur_klass 
)

Prepare a call to the parent class implementation of a function.

Parameters
objThe object to call (can be a class).
cur_klassThe current class.
Returns
An EO handle which must be used as part of an EO function call.
Warning
The returned value must always be used as the first argument (the object) of a method or property function call, and should never be handled in any other way. Do not call any function from this file on the returned value (eg. efl_ref, etc...).

Usage:

// Inside the implementation code for MY_CLASS
my_property_set(efl_super(obj, MY_CLASS), value);

A common usage pattern is to forward function calls to the parent function:

EOLIAN static void
_my_class_my_property_set(Eo *obj, My_Class_Data *pd, int value)
{
// Do some processing on this class data, or on the value
if (value < 0) value = 0;
pd->last_value = value;
// Pass the call to the parent class
my_property_set(efl_super(obj, MY_CLASS), value);
// Do some more processing
}

cur_klass must be a valid class in the inheritance hierarchy of obj's class. Invalid values will lead to undefined behaviour.

See also
efl_cast

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().

◆ efl_cast()

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.

Parameters
objThe object to call (can be a class).
cur_klassThe class to cast into.
Returns
An EO handle that must be used as part of an EO function call.
Warning
The returned value must always be used as the first argument (the object) of a method or property function call and should never be handled in any other way. Do not call any function from this file on the returned value (eg. efl_ref, etc...).

Usage:

// Inside the implementation code for MY_CLASS
my_property_set(efl_cast(obj, SOME_OTHER_CLASS), value);

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.

See also
efl_cast
Since
1.20

References EINA_FALSE.

Referenced by efl_debug_name_get(), and elm_panel_add().

◆ efl_class_get()

EAPI const Efl_Class* efl_class_get ( const Eo obj)

◆ _efl_add_internal_start_bindings()

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.

Parameters
fileFile name of the call site, used for debug logs.
lineLine number of the call site, used for debug logs.
klass_idPointer for the class being instantiated.
refWhether or not the object will have an additional reference if it has a parent.
parentObject parent, can be NULL.
is_fallbackWhether or not the fallback efl_added behaviour is to be used.
substitute_ctorOptional callback to replace the call for efl_constructor(), if NULL efl_constructor() will be called normally.
sub_ctor_dataAdditional data to be passed to the substitute_ctor callback.
Returns
An handle to the new object on success, NULL otherwise.

◆ efl_del()

EAPI void efl_del ( const Eo obj)

◆ efl_class_override_register()

EAPI Eina_Bool efl_class_override_register ( const Efl_Class klass,
const Efl_Class override 
)

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.

Parameters
[in]klassThe class to be overridden
[in]overrideThe class to override with; must inherit from or implement klass
Returns
Return 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.

◆ efl_class_override_unregister()

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.

Parameters
[in]klassThe class to unset the override from
[in]overrideThe class override to be removed
Returns
Return 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.

◆ efl_data_scope_get()

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.

The data reference count is not incremented. The pointer must be used only in the scope of the function and its callees.

Parameters
objthe object to work on.
klassthe klass associated with the data.
Returns
a pointer to the data.
See also
efl_data_ref()
efl_data_unref()
efl_data_scope_safe_get()

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().

◆ efl_data_scope_safe_get()

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.

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).

Parameters
objthe object to work on.
klassthe klass associated with the data.
Returns
a pointer to the data or NULL in case of error or $obj was NULL.
See also
efl_data_scope_get()
Since
1.20

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().

◆ efl_data_xref_internal()

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.

Parameters
objthe object to work on.
klassthe klass associated with the data.
ref_objthe object that references the data.
filethe call's filename.
linethe call's line number.
Returns
a pointer to the data.
See also
efl_data_xunref_internal()

References ERR.

◆ efl_data_xunref_internal()

EAPI void efl_data_xunref_internal ( const Eo obj,
void *  data,
const Eo ref_obj 
)

Decrement the object data reference count by 1.

Parameters
objthe object to work on.
dataa pointer to the data to unreference.
filethe call's filename.
linethe call's line number.
See also
efl_data_xref_internal()

◆ efl_ref()

EAPI Eo* efl_ref ( const Eo obj)

Increment the object's reference count by 1.

Parameters
objthe object to work on.
Returns
The object passed.

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.

See also
efl_unref()
efl_ref_count()

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().

◆ efl_unref()

EAPI void efl_unref ( const Eo obj)

◆ efl_ref_count()

EAPI int efl_ref_count ( const Eo obj)

Return the ref count of the object passed.

Parameters
objthe object to work on.
Returns
the ref count of the object.
See also
efl_ref()
efl_unref()

Referenced by efl_object_shutdown(), efl_ownable_get(), elm_object_item_del(), and elm_theme_free().

◆ efl_del_intercept_set()

EAPI void efl_del_intercept_set ( Eo obj,
Efl_Del_Intercept  del_intercept_func 
)

Set a deletion interceptor function.

Parameters
objThe object to set the interceptor on.
del_intercept_funcThe 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".

See also
efl_del_intercept_get()
efl_unref()
efl_del()

Referenced by elm_config_drag_anim_duration_set().

◆ efl_del_intercept_get()

EAPI Efl_Del_Intercept efl_del_intercept_get ( const Eo obj)

Get the deletion interceptor function.

Parameters
objThe object to get the interceptor of
Returns
The intercept function or NULL if none is set.

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.

See also
efl_del_intercept_set()

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.

◆ efl_reuse()

EAPI void efl_reuse ( const Eo obj)

Clears the object so it can be reused (for example in a cache).

Parameters
objThe 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.

See also
efl_del_intercept_set()

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.

◆ efl_xref_internal()

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).

Parameters
objthe object to work on.
ref_objthe object that references obj.
filethe call's filename.
linethe call's line number.
Returns
The object passed (obj)

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.

See also
efl_xunref()

References efl_ref(), EINA_INLIST_GET, and eina_inlist_prepend().

◆ efl_xunref()

EAPI void efl_xunref ( Eo obj,
const Eo ref_obj 
)

Decrement the object's reference count by 1 and free it if needed.

Will free the ref associated with ref_obj).

Parameters
objthe object to work on.
ref_objthe 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().

See also
efl_xref_internal()

References efl_unref(), eina_freeq_ptr_main_add(), EINA_INLIST_FOREACH, EINA_INLIST_GET, eina_inlist_remove(), and ERR.

◆ efl_wref_add()

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.

Parameters
[in]wrefThe weak ref

Referenced by ecore_timer_precision_set(), elm_win_floating_mode_get(), and evas_new().

◆ efl_wref_del()

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.

Parameters
[in]wrefThe weak ref

Referenced by evas_output_viewport_get().

◆ efl_key_data_set()

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.

Parameters
[in]keyThe key associated with the data
[in]dataThe 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().

◆ efl_key_data_get()

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.

Parameters
[in]keyThe key associated with the data
Returns
The data to set

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().

◆ efl_key_ref_set()

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.

Parameters
[in]keyThe key associated with the object ref
[in]objdataThe object to set

◆ efl_key_ref_get()

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.

Parameters
[in]keyThe key associated with the object ref
Returns
The object to set

◆ efl_key_wref_set()

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.

Parameters
[in]keyThe key associated with the object ref
[in]objdataThe object to set

◆ efl_key_wref_get()

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

Parameters
[in]keyThe key associated with the object ref
Returns
The object to set

◆ efl_key_value_set()

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.

Parameters
[in]keyThe key associated with the value
[in]valueThe value to set

◆ efl_key_value_get()

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.

Parameters
[in]keyThe key associated with the value
Returns
The value to set

◆ efl_manual_free_set()

EAPI void efl_manual_free_set ( Eo obj,
Eina_Bool  manual_free 
)

Enable or disable the manual free feature.

Parameters
objthe object to work on.
manual_freeindicates 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.

See also
efl_manual_free()

Referenced by evas_object_del().

◆ efl_manual_free()

EAPI Eina_Bool efl_manual_free ( Eo obj)

Frees the object.

Parameters
objthe 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.
Returns
EINA_TRUE if successfully freed. EINA_FALSE otherwise.
See also
efl_manual_free_set()

References EINA_FALSE, EINA_TRUE, and ERR.

◆ efl_destructed_is()

EAPI Eina_Bool efl_destructed_is ( const Eo obj)

Checks if the object was already descructed (only relevant for manual_free objects).

Parameters
objthe 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.
See also
efl_manual_free_set()

References EINA_FALSE.

◆ efl_property_reflection_set()

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.

Parameters
objThe object to set the property on
property_nameThe name of the property to modify.
valueThe value to set, the value passed here will be flushed by the function
See also
efl_property_reflection_get() and efl_property_reflection_exist()

◆ efl_property_reflection_get()

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.

Parameters
objThe object to set the property on
property_nameThe name of the property to get.
Returns
The value that got returned by the actual property in form of a generic Eina_Value. The user of this API is owning the returned Value.
See also
efl_property_reflection_set() and efl_property_reflection_exist()

References eina_value_error_init().

◆ efl_property_reflection_exist()

EAPI Eina_Bool efl_property_reflection_exist ( Eo obj,
const char *  property_name 
)

Check if a property exist for reflection.

Parameters
objThe object to inspect.
property_nameThe name of the property to check if it exist.
Returns
EINA_TRUE if the property exist, EINA_FALSE otherwise.
See also
efl_property_reflection_set() and efl_property_reflection_get()

References EINA_FALSE, and EINA_TRUE.

Variable Documentation

◆ _efl_class_creation_lock [1/2]

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 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/2]

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.

◆ object

Efl_Object* _Efl_Event::object

◆ desc [1/3]

const Efl_Event_Description* _Efl_Event::desc

The event description.

Since
1.22

Referenced by elm_win_rotation_get().

◆ info

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.

Since
1.22

Referenced by elm_entry_add(), elm_fileselector_selected_set(), elm_gengrid_add(), and elm_win_rotation_get().

◆ desc [2/3]

const Efl_Event_Description* _Efl_Callback_Array_Item::desc

The event description.

Referenced by efl_callbacks_cmp().

◆ func [1/3]

Efl_Event_Cb _Efl_Callback_Array_Item::func

The callback function.

◆ desc [3/3]

const Efl_Event_Description* _Efl_Callback_Array_Item_Full::desc

The event description.

Referenced by ecore_timer_precision_set(), and elm_win_rotation_get().

◆ func [2/3]

Efl_Event_Cb _Efl_Callback_Array_Item_Full::func

< The priorit of the event

The callback function.

◆ success

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.

Note
This function is always called from a safe context (main loop or some platform defined safe context).
Parameters
oThe object used to create the link in efl_future_cb_from_desc() or efl_future_chain_array().
valueThe operation result
Returns
An Eina_Value to pass to the next Eina_Future in the chain (if any). If there is no need to convert the received value, it's recommended to passthrough 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().

◆ error

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.

Note
On future creation errors and future cancellation this function is called from the current context with the following errors respectively: EINVAL, ENOMEM and ECANCELED. Otherwise this function is called from a safe context.
Parameters
oThe object used to create the link in efl_future_cb_from_desc() or efl_future_chain_array().
errorThe operation error
Returns
An Eina_Value to pass to the next Eina_Future in the chain (if any). 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 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().

◆ free

void(* _Efl_Future_Cb_Desc::free) (Eo *o, void *data, const Eina_Future *dead_future)

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.

Note
On future creation errors and future cancellation this function is called from the current context with the following errors respectively: EINVAL, ENOMEM and ECANCELED. Otherwise this function is called from a safe context.
Parameters
oThe object used to create the link in efl_future_cb_from_desc() or efl_future_chain_array().
dead_futureThe future that's been freed.

Referenced by efl_future_chain_array().

◆ success_type

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().

◆ data

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.

◆ storage

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.

◆ name [1/2]

Eina_Stringshare* _Efl_Dbg_Info::name

The name of the part (stringshare).

Referenced by efl_dbg_info_free(), and EFL_DBG_INFO_LIST_APPEND().

◆ value

Eina_Value _Efl_Dbg_Info::value

The value.

Referenced by efl_dbg_info_free(), and EFL_DBG_INFO_LIST_APPEND().

◆ api_func

void* _Efl_Op_Description::api_func

The EAPI function offering this op.

(The name of the func on windows)

◆ func [3/3]

void* _Efl_Op_Description::func

The static function to call for the op.

◆ descs

const Efl_Op_Description* _Efl_Object_Ops::descs

The op descriptions array of size count.

◆ count [1/2]

size_t _Efl_Object_Ops::count

Number of op descriptions.

Referenced by efl_class_functions_set().

◆ name [2/2]

const char* _Efl_Class_Description::name

The name of the class.

Referenced by efl_class_memory_size_get(), and efl_class_new().

◆ type

Efl_Class_Type _Efl_Class_Description::type

The type of the class.

Referenced by efl_class_new().

◆ data_size

size_t _Efl_Class_Description::data_size

The size of data (private + protected + public) this class needs per object.

Referenced by efl_class_new().

◆ class_constructor

void(* _Efl_Class_Description::class_constructor) (Efl_Class *klass)

The constructor of the class.

◆ class_destructor

void(* _Efl_Class_Description::class_destructor) (Efl_Class *klass)

The destructor of the class.

◆ set

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.

◆ get

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.

◆ table

const Efl_Object_Property_Reflection* _Efl_Object_Property_Reflection_Ops::table

The reflection table.

◆ count [2/2]

size_t _Efl_Object_Property_Reflection_Ops::count

Number of table lines descriptions.

◆ _efl_class_creation_lock [2/2]

_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 [2/2]

_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.