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_Object_Op_Call_Data
 
struct  _Efl_Object_Call_Cache_Index
 
struct  _Efl_Object_Call_Cache_Entry
 
struct  _Efl_Object_Call_Cache_Off
 
struct  _Efl_Object_Call_Cache
 

Macros

#define _EFL_CLASS_EO_CLASS_TYPE
 
#define _EFL_OBJECT_EO_CLASS_TYPE
 
#define EO_CLASS   EFL_OBJECT_CLASS
 
#define EFL_NOOP   ((Efl_Object_Op) 0)
 A special Efl_Object_Op meaning "No operation".
 
#define EFL_OBJECT_CALL_CACHE_SIZE   1
 
#define EFL_FUNC_CALL(...)   __VA_ARGS__
 
#define EFL_FUNC_COMMON_OP_FUNC(Name)   ((const void *) Name)
 
#define EFL_FUNC_TLS   __thread
 
#define EFL_FUNC_COMMON_OP(Obj, Name, DefRet)
 
#define EFL_FUNC_COMMON_OP_END(Obj, Name, DefRet)
 
#define _EFL_OBJECT_API_BEFORE_HOOK
 
#define _EFL_OBJECT_API_AFTER_HOOK
 
#define _EFL_OBJECT_API_CALL_HOOK(x)   x
 
#define _EFL_OBJECT_FUNC_BODY(Name, ObjType, Ret, DefRet)
 
#define _EFL_OBJECT_VOID_FUNC_BODY(Name, ObjType)
 
#define _EFL_OBJECT_FUNC_BODYV(Name, ObjType, Ret, DefRet, Arguments, ...)
 
#define _EFL_OBJECT_VOID_FUNC_BODYV(Name, ObjType, Arguments, ...)
 
#define EFL_FUNC_BODY(Name, Ret, DefRet)   _EFL_OBJECT_FUNC_BODY(Name, Eo *, Ret, DefRet)
 
#define EFL_VOID_FUNC_BODY(Name)   _EFL_OBJECT_VOID_FUNC_BODY(Name, Eo *)
 
#define EFL_FUNC_BODYV(Name, Ret, DefRet, Arguments, ...)   _EFL_OBJECT_FUNC_BODYV(Name, Eo *, Ret, DefRet, EFL_FUNC_CALL(Arguments), __VA_ARGS__)
 
#define EFL_VOID_FUNC_BODYV(Name, Arguments, ...)   _EFL_OBJECT_VOID_FUNC_BODYV(Name, Eo *, EFL_FUNC_CALL(Arguments), __VA_ARGS__)
 
#define EFL_FUNC_BODY_CONST(Name, Ret, DefRet)   _EFL_OBJECT_FUNC_BODY(Name, const Eo *, Ret, DefRet)
 
#define EFL_VOID_FUNC_BODY_CONST(Name)   _EFL_OBJECT_VOID_FUNC_BODY(Name, const Eo *)
 
#define EFL_FUNC_BODYV_CONST(Name, Ret, DefRet, Arguments, ...)   _EFL_OBJECT_FUNC_BODYV(Name, const Eo *, Ret, DefRet, EFL_FUNC_CALL(Arguments), __VA_ARGS__)
 
#define EFL_VOID_FUNC_BODYV_CONST(Name, Arguments, ...)   _EFL_OBJECT_VOID_FUNC_BODYV(Name, const Eo *, EFL_FUNC_CALL(Arguments), __VA_ARGS__)
 
#define _EFL_OBJECT_OP_API_ENTRY(a)   (void*)a
 
#define EFL_OBJECT_OP_FUNC(_api, _private)   { _EFL_OBJECT_OP_API_ENTRY(_api), (void*)_private }
 
#define efl_added   _efl_added_get()
 
#define _efl_add_common(klass, parent, is_ref, ...)
 
#define efl_add(klass, parent, ...)   _efl_add_common(klass, parent, EINA_FALSE, ##__VA_ARGS__)
 Create a new object and call its constructor(If it exits). More...
 
#define efl_add_ref(klass, parent, ...)   _efl_add_common(klass, parent, EINA_TRUE, ##__VA_ARGS__)
 Create a new object and call its constructor(If it exists). More...
 
#define efl_data_xref(obj, klass, ref_obj)   efl_data_xref_internal(__FILE__, __LINE__, obj, klass, ref_obj)
 Use this macro if you want to associate a referencer object. More...
 
#define efl_data_ref(obj, klass)   efl_data_xref_internal(__FILE__, __LINE__, obj, klass, (const Eo *)obj)
 Use this macro if you don't want to associate a referencer object. More...
 
#define efl_data_xunref(obj, data, ref_obj)   efl_data_xunref_internal(obj, data, ref_obj)
 Use this function if you used efl_data_xref to reference the data. More...
 
#define efl_data_unref(obj, data)   efl_data_xunref_internal(obj, data, obj)
 Use this function if you used efl_data_ref to reference the data. More...
 
#define efl_xref(obj, ref_obj)   efl_xref_internal(__FILE__, __LINE__, obj, ref_obj)
 Convenience macro around efl_xref_internal() More...
 
#define EAPI
 
#define EAPI
 

Typedefs

typedef struct _Eo_Object _Eo_Object
 
typedef struct _Eo_Opaque Eo
 The basic Object type.
 
typedef Eo Efl_Class
 
typedef Eo Efl_Object
 
typedef void(* Efl_Del_Intercept) (Eo *obj_id)
 A function to be called on object deletion/destruction instead of normal destruction taking place. More...
 
typedef Eo Efl_Future
 The type of Efl Future used in asynchronous operation, the read side of a promise.
 
typedef struct _Efl_Event Efl_Event
 
typedef void(* Efl_Event_Cb) (void *data, const Efl_Event *event)
 An event callback prototype. More...
 
typedef short Efl_Callback_Priority
 Callback priority value. More...
 
typedef struct _Efl_Callback_Array_Item Efl_Callback_Array_Item
 
typedef unsigned int Efl_Object_Op
 The Eo operation type id.
 
typedef struct _Efl_Domain_Data Efl_Domain_Data
 An opaque handle for private domain data.
 
typedef struct _Efl_Object_Op_Call_Data Efl_Object_Op_Call_Data
 
typedef struct _Efl_Object_Call_Cache_Index Efl_Object_Call_Cache_Index
 
typedef struct _Efl_Object_Call_Cache_Entry Efl_Object_Call_Cache_Entry
 
typedef struct _Efl_Object_Call_Cache_Off Efl_Object_Call_Cache_Off
 
typedef struct _Efl_Object_Call_Cache Efl_Object_Call_Cache
 
typedef Eo Efl_Class
 The basic class type - should be removed, just for compat.
 

Enumerations

enum  Efl_Id_Domain {
  EFL_ID_DOMAIN_INVALID = -1,
  EFL_ID_DOMAIN_MAIN = 0,
  EFL_ID_DOMAIN_SHARED = 1,
  EFL_ID_DOMAIN_THREAD
}
 The virtual allocation domain where an object lives. More...
 

Functions

EOAPI Eina_Bool efl_event_callback_priority_add (Eo *obj, const Efl_Event_Description *desc, Efl_Callback_Priority priority, Efl_Event_Cb cb, const void *data)
 Add a callback for an event with a specific priority. More...
 
EOAPI Eina_Bool efl_event_callback_del (Eo *obj, const Efl_Event_Description *desc, Efl_Event_Cb func, const void *user_data)
 Delete a callback with a specific data associated to it for an event. More...
 
EOAPI Eina_Bool efl_event_callback_array_priority_add (Eo *obj, const Efl_Callback_Array_Item *array, Efl_Callback_Priority priority, const void *data)
 Add an array of callbacks created by EFL_CALLBACKS_ARRAY_DEFINE for an event with a specific priority. More...
 
EOAPI Eina_Bool efl_event_callback_array_del (Eo *obj, const Efl_Callback_Array_Item *array, const void *user_data)
 Del a callback array with a specific data associated to it for an event. More...
 
EOAPI Eina_Bool efl_event_callback_call (Eo *obj, const Efl_Event_Description *desc, void *event_info)
 Call the callbacks for an event of an object. More...
 
EOAPI Eina_Bool efl_event_callback_legacy_call (Eo *obj, const Efl_Event_Description *desc, void *event_info)
 Call the callbacks for an event of an object. More...
 
EOAPI Eina_Bool efl_future_link (Eo *obj, Efl_Future *link)
 Track a future life cycle and cancel it if the object dies. More...
 
Eina_Bool efl_object_init (void)
 Init the eo subsystem. More...
 
Eina_Bool efl_object_shutdown (void)
 Shutdown the eo subsystem. More...
 
Efl_Id_Domain efl_domain_get (void)
 Get the native domain for the current thread. More...
 
Eina_Bool efl_domain_switch (Efl_Id_Domain domain)
 Switch the native domain for the current thread. More...
 
Efl_Id_Domain efl_domain_current_get (void)
 Get the current domain used for allocating new objects. More...
 
Eina_Bool efl_domain_current_set (Efl_Id_Domain domain)
 Set the current domain used for allocating new objects. More...
 
Eina_Bool efl_domain_current_push (Efl_Id_Domain domain)
 Push a new domain onto the domain stack. More...
 
void efl_domain_current_pop (void)
 Pop a previously pushed domain from the domain stack. More...
 
Efl_Domain_Dataefl_domain_data_get (void)
 Get an opaque handle to the local native domain eoid data. More...
 
Efl_Id_Domain efl_domain_data_adopt (Efl_Domain_Data *data_in)
 Adopt a single extra domain to be the current domain. More...
 
Eina_Bool efl_domain_data_return (Efl_Id_Domain domain)
 Return a domain to its original owning thread. More...
 
Eina_Bool efl_compatible (const Eo *obj, const Eo *obj_target)
 Check if 2 objects are compatible More...
 
Efl_Object_Op _efl_object_api_op_id_get (const void *api_func) EINA_DEPRECATED
 
Efl_Object_Op _efl_object_op_api_id_get (const void *api_func, const Eo *obj, const char *api_func_name, const char *file, int line)
 
Eina_Bool _efl_object_call_resolve (Eo *obj, const char *func_name, Efl_Object_Op_Call_Data *call, Efl_Object_Call_Cache *callcache, const char *file, int line)
 
void _efl_object_call_end (Efl_Object_Op_Call_Data *call)
 
Eo_efl_add_end (Eo *obj, Eina_Bool is_ref, Eina_Bool is_fallback)
 
Eoefl_super (const Eo *obj, const Efl_Class *cur_klass)
 Prepare a call to the parent class implementation of a function. More...
 
Eoefl_cast (const Eo *obj, const Efl_Class *cur_klass)
 Prepare a call to cast to a parent class implementation of a function. More...
 
const Efl_Classefl_class_get (const Eo *obj)
 Gets the class of the object. More...
 
Eo_efl_added_get (void)
 
Eo_efl_add_internal_start (const char *file, int line, const Efl_Class *klass_id, Eo *parent, Eina_Bool ref, Eina_Bool is_fallback)
 
void * efl_data_scope_get (const Eo *obj, const Efl_Class *klass)
 Get a pointer to the data of an object for a specific class. More...
 
void * efl_data_scope_safe_get (const Eo *obj, const Efl_Class *klass)
 Safely get a pointer to the data of an object for a specific class. More...
 
void * efl_data_xref_internal (const char *file, int line, const Eo *obj, const Efl_Class *klass, const Eo *ref_obj)
 Get a pointer to the data of an object for a specific class and increment the data reference count. More...
 
void efl_data_xunref_internal (const Eo *obj, void *data, const Eo *ref_obj)
 Decrement the object data reference count by 1. More...
 
Eoefl_ref (const Eo *obj)
 Increment the object's reference count by 1. More...
 
void efl_unref (const Eo *obj)
 Decrement the object's reference count by 1 and free it if needed. More...
 
int efl_ref_get (const Eo *obj)
 Return the ref count of the object passed. More...
 
void efl_del_intercept_set (Eo *obj, Efl_Del_Intercept del_intercept_func)
 Set a deletion interceptor function. More...
 
Efl_Del_Intercept efl_del_intercept_get (const Eo *obj)
 Get the deletion interceptor function. More...
 
void efl_reuse (const Eo *obj)
 Clears the object so it can be reused (for example in a cache) More...
 
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...
 
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...
 
void efl_manual_free_set (Eo *obj, Eina_Bool manual_free)
 Enable or disable the manual free feature. More...
 
Eina_Bool efl_manual_free (Eo *obj)
 Frees the object. More...
 
Eina_Bool efl_destructed_is (const Eo *obj)
 Checks if the object was already descructed (only relevant for manual_free objects). More...
 
int ___efl_ref2_get (const Eo *obj_id)
 
void ___efl_ref2_reset (const Eo *obj_id)
 

Variables

EAPI Eina_Lock _efl_class_creation_lock
 This variable is used for locking purposes in the class_get function defined in EFL_DEFINE_CLASS. More...
 
EAPI unsigned int _efl_object_init_generation
 This variable stores the current eo init generation. More...
 
Efl_Object * _Efl_Event::object
 The object the event was called on. More...
 
const Efl_Event_Description_Efl_Event::desc
 The event description. More...
 
void * _Efl_Event::info
 Extra event information passed by the event caller. More...
 
const Efl_Event_Description_Efl_Callback_Array_Item::desc
 The event description. More...
 
Efl_Event_Cb _Efl_Callback_Array_Item::func
 The callback function. More...
 
Eina_Stringshare_Efl_Dbg_Info::name
 The name of the part (stringshare). More...
 
Eina_Value _Efl_Dbg_Info::value
 The value. More...
 
void * _Efl_Op_Description::api_func
 The EAPI function offering this op. More...
 
void * _Efl_Op_Description::func
 The static function to call for the op. More...
 
const Efl_Op_Description_Efl_Object_Ops::descs
 The op descriptions array of size count. More...
 
size_t _Efl_Object_Ops::count
 Number of op descriptions. More...
 
unsigned int _Efl_Class_Description::version
 The current version of eo, use EO_VERSION.
 
const char * _Efl_Class_Description::name
 The name of the class. More...
 
Efl_Class_Type _Efl_Class_Description::type
 The type of the class. More...
 
size_t _Efl_Class_Description::data_size
 The size of data (private + protected + public) this class needs per object. More...
 
Eina_Bool(* _Efl_Class_Description::class_initializer )(Efl_Class *klass)
 The initializer for the class.
 
void(* _Efl_Class_Description::class_constructor )(Efl_Class *klass)
 The constructor of the class. More...
 
void(* _Efl_Class_Description::class_destructor )(Efl_Class *klass)
 The destructor of the class. More...
 
Eo_Efl_Object_Op_Call_Data::eo_id
 
_Eo_Object * _Efl_Object_Op_Call_Data::obj
 
void * _Efl_Object_Op_Call_Data::func
 
void * _Efl_Object_Op_Call_Data::data
 
void * _Efl_Object_Op_Call_Data::extn1
 
void * _Efl_Object_Op_Call_Data::extn2
 
void * _Efl_Object_Op_Call_Data::extn3
 
void * _Efl_Object_Op_Call_Data::extn4
 
const void * _Efl_Object_Call_Cache_Index::klass
 
const void * _Efl_Object_Call_Cache_Entry::func
 
int _Efl_Object_Call_Cache_Off::off
 
Efl_Object_Call_Cache_Index _Efl_Object_Call_Cache::index [EFL_OBJECT_CALL_CACHE_SIZE]
 
Efl_Object_Call_Cache_Entry _Efl_Object_Call_Cache::entry [EFL_OBJECT_CALL_CACHE_SIZE]
 
Efl_Object_Call_Cache_Off _Efl_Object_Call_Cache::off [EFL_OBJECT_CALL_CACHE_SIZE]
 
Efl_Object_Op _Efl_Object_Call_Cache::op
 
unsigned int _Efl_Object_Call_Cache::generation
 
Eina_Lock _efl_class_creation_lock
 This variable is used for locking purposes in the class_get function defined in EFL_DEFINE_CLASS. More...
 
unsigned int _efl_object_init_generation = 1
 This variable stores the current eo init generation. More...
 

Detailed Description

Generic object system.

Macro Definition Documentation

◆ EFL_FUNC_COMMON_OP

#define EFL_FUNC_COMMON_OP (   Obj,
  Name,
  DefRet 
)
Value:
static EFL_FUNC_TLS Efl_Object_Call_Cache ___cache; /* static 0 by default */ \
Efl_Object_Op_Call_Data ___call; \
_Eo_##Name##_func _func_; \
if (EINA_UNLIKELY((___cache.op == EFL_NOOP) || \
(___cache.generation != _efl_object_init_generation))) \
goto __##Name##_op_create; /* yes a goto - see below */ \
__##Name##_op_create_done: \
if (!_efl_object_call_resolve((Eo *) Obj, #Name, &___call, &___cache, \
__FILE__, __LINE__)) return DefRet; \
_func_ = (_Eo_##Name##_func) ___call.func;
#define EINA_UNLIKELY(exp)
Definition: eina_types.h:363
EAPI unsigned int _efl_object_init_generation
This variable stores the current eo init generation.
Definition: eo.c:40
Definition: Eo.h:928
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:169
#define EFL_NOOP
A special Efl_Object_Op meaning "No operation".
Definition: Eo.h:445

◆ EFL_FUNC_COMMON_OP_END

#define EFL_FUNC_COMMON_OP_END (   Obj,
  Name,
  DefRet 
)
Value:
__##Name##_op_create: \
___cache.op = _efl_object_op_api_id_get(EFL_FUNC_COMMON_OP_FUNC(Name), Obj, #Name, __FILE__, __LINE__); \
if (___cache.op == EFL_NOOP) return DefRet; \
___cache.generation = _efl_object_init_generation; \
goto __##Name##_op_create_done;
EAPI unsigned int _efl_object_init_generation
This variable stores the current eo init generation.
Definition: eo.c:40
#define EFL_NOOP
A special Efl_Object_Op meaning "No operation".
Definition: Eo.h:445

◆ _EFL_OBJECT_FUNC_BODY

#define _EFL_OBJECT_FUNC_BODY (   Name,
  ObjType,
  Ret,
  DefRet 
)
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); \
}
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:169

◆ _EFL_OBJECT_VOID_FUNC_BODY

#define _EFL_OBJECT_VOID_FUNC_BODY (   Name,
  ObjType 
)
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, ); \
}
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:169

◆ _EFL_OBJECT_FUNC_BODYV

#define _EFL_OBJECT_FUNC_BODYV (   Name,
  ObjType,
  Ret,
  DefRet,
  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); \
}
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:169

◆ _EFL_OBJECT_VOID_FUNC_BODYV

#define _EFL_OBJECT_VOID_FUNC_BODYV (   Name,
  ObjType,
  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, ); \
}
struct _Eo_Opaque Eo
The basic Object type.
Definition: Eo.h:169

◆ _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:456

◆ efl_add

#define efl_add (   klass,
  parent,
  ... 
)    _efl_add_common(klass, parent, EINA_FALSE, ##__VA_ARGS__)

Create a new object and call its constructor(If it exits).

The object returned by this function will always have 1 ref (reference count) irrespective of whether the parent is NULL or not. If the object is created using this function, then it would automatically gets deleted when the parent object is deleted. There is no need to call efl_unref on the child. This is convenient in C.

If you want a more "consistent" behaviour, take a look at efl_add_ref.

Parameters
klassthe class of the object to create.
parentthe parent to set to the object.
...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(), ecore_exe_pipe_run(), ecore_init(), ecore_main_fd_handler_active_set(), ecore_timer_add(), ecore_timer_loop_add(), edje_3d_object_add(), edje_audio_channel_mute_get(), edje_edit_object_add(), edje_shutdown(), eio_init(), elm_fileselector_entry_path_get(), elm_fileselector_entry_selected_set(), elm_fileselector_path_set(), elm_fileselector_selected_set(), elm_web_add(), elm_win_add(), elm_win_fake_add(), elm_win_floating_mode_get(), elm_win_util_dialog_add(), elm_win_util_standard_add(), emotion_object_add(), evas_device_add_full(), evas_new(), evas_object_box_add(), evas_object_grid_add(), evas_object_polygon_add(), evas_object_rectangle_add(), evas_object_smart_add(), evas_object_table_add(), evas_object_text_add(), evas_object_textblock_add(), and evas_object_textgrid_add().

◆ efl_add_ref

#define efl_add_ref (   klass,
  parent,
  ... 
)    _efl_add_common(klass, parent, EINA_TRUE, ##__VA_ARGS__)

Create a new object and call its constructor(If it exists).

The object returned by this function has 1 ref for itself, 1 ref from the parent (if exists) and possible other refs if were added during construction. If a child object is created using this, then it won't get deleted when the parent object is deleted until you manually remove the ref by calling efl_unref().

Parameters
klassthe class of the object to create.
parentthe parent to set to the object.
...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(), and evas_object_smart_callback_description_find().

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

◆ Efl_Event_Cb

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

An event callback prototype.

◆ Efl_Callback_Priority

typedef short Efl_Callback_Priority

Callback priority value.

Range is -32k - 32k. The lower the number, the higher the priority.

See EFL_CALLBACK_PRIORITY_AFTER, EFL_CALLBACK_PRIORITY_BEFORE EFL_CALLBACK_PRIORITY_DEFAULT

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 that all threads can see but has 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 to it for an event.

The callback will never be emitted again after this call, even if a event emission is going on.

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 elm_store_free(), elm_store_target_genlist_set(), evas_device_seat_id_get(), evas_object_event_callback_del(), evas_object_event_callback_del_full(), evas_object_smart_callback_del(), evas_object_smart_callback_del_full(), evas_object_smart_callback_description_find(), and evas_textblock_text_utf8_to_markup().

◆ 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_idle_enterer_before_add(), and ecore_ipc_client_server_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
Returns
false if one of the callbacks aborted the call, true otherwise

Referenced by ecore_idle_enterer_del(), ecore_idle_exiter_del(), ecore_idler_del(), ecore_timer_dump(), efl_net_connman_technology_type_from_str(), efl_object_legacy_only_event_description_get(), emotion_object_last_position_load(), emotion_object_last_position_save(), emotion_object_priority_get(), evas_device_seat_id_get(), evas_object_image_extension_can_load_fast_get(), and evas_object_textblock_style_set().

◆ efl_event_callback_legacy_call()

EOAPI Eina_Bool efl_event_callback_legacy_call ( Eo obj,
const Efl_Event_Description desc,
void *  event_info 
)

◆ efl_future_link()

EOAPI Eina_Bool efl_future_link ( Eo obj,
Efl_Future link 
)

Track a future life cycle and cancel it if the object dies.

Parameters
[in]linkThe future to link with the object
Returns
true if it succeeded on setting up the tracking.

◆ efl_object_init()

Eina_Bool efl_object_init ( void  )

◆ efl_object_shutdown()

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 eina_log_timing(), and EINA_TRUE.

◆ efl_domain_get()

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 this can only be called before any objects are created/allocated on the thread where it is called. Calling it after this point will result in undefined behavior, so be sure to call this immediaetly after a thread begins to execute, before anything else. You must not change the domain of the main thread.

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

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

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

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 via efl_domain_current_push() and efl_domain_current_pop(). The current domain is the one ont he top of the stack, so this entry is altered without pushing or popping. This only applies to the calling thread.

See also
efl_domain_get()

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

◆ efl_domain_current_push()

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 in that case. This applies only to the calling thread.

See also
efl_domain_get()

◆ efl_domain_current_pop()

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

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 that called efl_domain_data_get() should suspend and not execute anything related to eo or efl objects until the thread that adopted the data called efl_domain_data_return() to return the data to its owner and stop making it available to that thread.

See also
efl_domain_get()

◆ efl_domain_data_adopt()

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 so these might clash (be the same) then undefined behaviour will occur.

This will also push the adopted domain as the current domain so that all newly created objects (unless their parent is of a differing domain) will be part of this adopted domain. You can still access objects from your local domain as well, but be aware that creation will require some switch of domain by push, pop or set. Return the domain with efl_domain_data_return() when done.

See also
efl_domain_get()

References EFL_ID_DOMAIN_INVALID, and ERR.

Referenced by ecore_thread_main_loop_begin().

◆ efl_domain_data_return()

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 that thread after this to continue execution. This will implicitly pop the current domain from the stack, assuming that the current domain is the same one pushed implicitly by efl_domain_data_adopt(). You cannot return your own native local domain, only the one that was adopted by efl_domain_data_adopt().

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

Eina_Bool efl_compatible ( const Eo obj,
const Eo obj_target 
)

Check if 2 objects are compatible

Parameters
objThe basic object
obj_targetThe alternat 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 and could be parent or children of eachother, could reference eachother etc.. There is only a need to call this if you got objects from multiple domains (an adopted domain with efl_domain_data_adopt() or the shared domain EFL_ID_DOMAIN_SHARED where objects may be accessed by any thread).

See also
efl_domain_get()

References DBG, EINA_FALSE, and EINA_TRUE.

◆ efl_super()

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 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_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_thread_global_data_wait(), ecore_timer_dump(), ecore_timer_precision_set(), elm_diskselector_scroller_policy_get(), elm_diskselector_scroller_policy_set(), elm_entry_bounce_set(), elm_entry_scrollbar_policy_set(), elm_fileselector_sort_method_get(), elm_flipselector_first_interval_get(), elm_gengrid_bounce_set(), elm_gengrid_item_class_unref(), elm_gengrid_item_cursor_unset(), elm_gengrid_item_tooltip_content_cb_set(), elm_gengrid_item_tooltip_unset(), elm_gengrid_scroller_policy_get(), elm_gengrid_scroller_policy_set(), elm_genlist_bounce_set(), elm_genlist_item_class_unref(), elm_genlist_item_cursor_unset(), elm_genlist_item_tooltip_content_cb_set(), elm_genlist_item_tooltip_unset(), elm_genlist_scroller_policy_get(), elm_genlist_scroller_policy_set(), elm_list_scroller_policy_set(), elm_separator_horizontal_get(), elm_spinner_special_value_get(), elm_spinner_value_get(), elm_table_pack_get(), elm_toolbar_reorder_mode_get(), elm_win_floating_mode_get(), evas_data_argb_unpremul(), evas_event_thaw(), evas_new(), evas_object_smart_clipped_clipper_get(), evas_object_smart_move_children_relative(), and evas_object_textblock_clear().

◆ efl_cast()

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.

◆ efl_class_get()

const Efl_Class* efl_class_get ( const Eo obj)

◆ efl_data_scope_get()

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_exe_auto_limits_set(), ecore_exe_callback_pre_free_set(), ecore_exe_close_stdin(), ecore_exe_data_get(), ecore_exe_data_set(), ecore_exe_event_data_get(), ecore_exe_flags_get(), ecore_exe_free(), ecore_exe_hup(), ecore_exe_interrupt(), ecore_exe_kill(), ecore_exe_pid_get(), ecore_exe_quit(), ecore_exe_send(), ecore_exe_signal(), ecore_exe_tag_get(), ecore_exe_tag_set(), ecore_exe_terminate(), ecore_idler_del(), ecore_timer_dump(), edje_color_class_list(), edje_edit_sound_tones_list_get(), edje_evas_global_perspective_get(), edje_object_part_text_append(), edje_object_part_text_cursor_content_get(), edje_object_part_text_escaped_set(), edje_object_part_text_hide_visible_password(), edje_object_part_text_insert(), edje_object_part_text_item_geometry_get(), edje_object_part_text_item_list_get(), edje_object_part_text_style_user_peek(), edje_object_part_text_style_user_pop(), edje_object_part_text_style_user_push(), edje_object_part_text_unescaped_get(), edje_object_part_text_unescaped_set(), edje_object_part_text_user_insert(), edje_object_text_insert_filter_callback_add(), edje_object_text_insert_filter_callback_del(), edje_object_text_insert_filter_callback_del_full(), edje_object_text_markup_filter_callback_add(), edje_object_text_markup_filter_callback_del(), edje_object_text_markup_filter_callback_del_full(), edje_perspective_set(), edje_size_class_list(), edje_text_class_list(), efl_data_scope_safe_get(), efl_net_connman_access_point_path_get(), efl_net_connman_access_point_update(), efl_net_connman_control_access_points_reload(), efl_net_connman_control_find_technology_by_type(), efl_net_connman_technology_path_get(), elm_code_widget_selection_clear(), elm_code_widget_selection_end(), elm_code_widget_selection_is_empty(), elm_code_widget_selection_select_all(), elm_code_widget_selection_select_line(), elm_code_widget_selection_select_word(), elm_code_widget_selection_start(), elm_code_widget_selection_text_get(), elm_genlist_scroller_policy_get(), elm_image_animated_get(), elm_image_animated_play_get(), elm_image_animated_play_set(), elm_image_animated_set(), elm_layout_content_swallow_list_get(), elm_progressbar_inverted_get(), elm_win_floating_mode_get(), evas_device_description_set(), evas_device_emulation_source_set(), evas_device_list(), evas_device_name_set(), evas_device_parent_set(), evas_device_pop(), evas_device_push(), evas_device_seat_id_get(), evas_device_subclass_get(), evas_device_subclass_set(), evas_engine_info_get(), evas_engine_info_set(), evas_event_feed_hold(), evas_font_path_global_list(), evas_map_coords_get(), evas_map_util_clockwise_get(), evas_map_util_points_populate_from_object(), evas_map_util_points_populate_from_object_full(), evas_object_del(), evas_object_name_get(), evas_object_name_set(), evas_object_ref(), evas_object_ref_get(), evas_object_smart_callback_description_find(), evas_object_smart_callbacks_descriptions_get(), evas_object_smart_member_add(), evas_object_smart_member_del(), evas_object_smart_members_get(), evas_object_smart_move_children_relative(), evas_object_textblock_clear(), evas_object_textblock_cursor_get(), evas_object_textblock_line_number_geometry_get(), evas_object_textblock_replace_char_get(), evas_object_textblock_replace_char_set(), evas_object_textblock_style_get(), evas_object_textblock_style_set(), evas_object_textblock_style_user_peek(), evas_object_textblock_style_user_pop(), evas_object_textblock_style_user_push(), evas_object_textblock_text_markup_get(), evas_object_textblock_text_markup_prepend(), evas_object_textblock_text_markup_set(), evas_object_textblock_valign_get(), evas_object_textblock_valign_set(), evas_object_top_at_pointer_get(), evas_object_unref(), evas_output_framespace_get(), evas_output_framespace_set(), evas_output_method_get(), evas_output_method_set(), evas_output_size_get(), evas_output_size_set(), evas_output_viewport_get(), evas_output_viewport_set(), evas_render_updates_free(), evas_smart_legacy_type_register(), evas_textblock_cursor_at_format_set(), evas_textblock_cursor_char_coord_set(), evas_textblock_cursor_char_delete(), evas_textblock_cursor_char_geometry_get(), evas_textblock_cursor_char_next(), evas_textblock_cursor_compare(), evas_textblock_cursor_content_get(), evas_textblock_cursor_copy(), evas_textblock_cursor_eol_get(), evas_textblock_cursor_equal(), evas_textblock_cursor_format_append(), evas_textblock_cursor_format_get(), evas_textblock_cursor_format_next(), evas_textblock_cursor_format_prev(), evas_textblock_cursor_free(), evas_textblock_cursor_geometry_bidi_get(), evas_textblock_cursor_geometry_get(), evas_textblock_cursor_line_char_first(), evas_textblock_cursor_line_char_last(), evas_textblock_cursor_line_coord_set(), evas_textblock_cursor_line_geometry_get(), evas_textblock_cursor_line_set(), evas_textblock_cursor_paragraph_char_first(), evas_textblock_cursor_paragraph_char_last(), evas_textblock_cursor_paragraph_first(), evas_textblock_cursor_paragraph_last(), evas_textblock_cursor_paragraph_next(), evas_textblock_cursor_paragraph_text_get(), evas_textblock_cursor_paragraph_text_length_get(), evas_textblock_cursor_pen_geometry_get(), evas_textblock_cursor_pos_set(), evas_textblock_cursor_range_delete(), evas_textblock_cursor_range_formats_get(), evas_textblock_cursor_range_geometry_get(), evas_textblock_cursor_range_simple_geometry_get(), evas_textblock_cursor_text_append(), evas_textblock_cursor_text_prepend(), evas_textblock_cursor_visible_range_get(), evas_textblock_cursor_word_end(), evas_textblock_cursor_word_start(), evas_textblock_node_format_first_get(), evas_textblock_node_format_last_get(), evas_textblock_node_format_list_get(), evas_textblock_node_format_remove_pair(), evas_textblock_node_format_text_get(), evas_textblock_style_set(), and evas_textblock_text_utf8_to_markup().

◆ efl_data_scope_safe_get()

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

Referenced by elm_win_cocoa_window_get(), elm_win_conformant_get(), elm_win_conformant_set(), elm_win_demand_attention_get(), elm_win_demand_attention_set(), elm_win_fake_canvas_set(), elm_win_floating_mode_get(), elm_win_floating_mode_set(), elm_win_icon_name_get(), elm_win_icon_name_set(), elm_win_illume_command_send(), elm_win_indicator_mode_get(), elm_win_indicator_mode_set(), elm_win_indicator_opacity_get(), elm_win_indicator_opacity_set(), elm_win_inlined_image_object_get(), elm_win_keyboard_win_get(), elm_win_keyboard_win_set(), elm_win_layer_get(), elm_win_layer_set(), elm_win_lower(), elm_win_main_menu_get(), elm_win_norender_get(), elm_win_norender_pop(), elm_win_norender_push(), elm_win_override_get(), elm_win_override_set(), elm_win_profile_get(), elm_win_profile_set(), elm_win_quickpanel_get(), elm_win_quickpanel_priority_major_get(), elm_win_quickpanel_priority_major_set(), elm_win_quickpanel_priority_minor_get(), elm_win_quickpanel_priority_minor_set(), elm_win_quickpanel_set(), elm_win_quickpanel_zone_get(), elm_win_quickpanel_zone_set(), elm_win_render(), elm_win_resize_object_add(), elm_win_resize_object_del(), elm_win_rotation_get(), elm_win_rotation_set(), elm_win_rotation_with_resize_set(), elm_win_screen_dpi_get(), elm_win_screen_position_get(), elm_win_screen_size_get(), elm_win_shaped_get(), elm_win_shaped_set(), elm_win_trap_data_get(), elm_win_urgent_get(), elm_win_urgent_set(), elm_win_win32_window_get(), elm_win_window_id_get(), elm_win_withdrawn_get(), elm_win_withdrawn_set(), elm_win_wl_window_get(), elm_win_wm_rotation_manual_rotation_done(), elm_win_wm_rotation_manual_rotation_done_get(), elm_win_wm_rotation_manual_rotation_done_set(), elm_win_wm_rotation_preferred_rotation_get(), elm_win_wm_rotation_supported_get(), elm_win_xwindow_get(), evas_object_event_callback_del(), evas_object_event_callback_del_full(), and evas_object_event_callback_priority_add().

◆ efl_data_xref_internal()

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

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

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. That is why there are efl_xref and efl_xunref that will make debugging easier in such a case. Therefor, these functions should only be used in small scopes, i.e at the start of some section in which the object may get freed, or if you know what you are doing.

See also
efl_unref()
efl_ref_get()

References EINA_UNLIKELY.

Referenced by ecore_thread_global_data_wait(), ecore_timer_dump(), efl_xref_internal(), elm_fileselector_button_path_set(), elm_fileselector_entry_selected_set(), elm_win_floating_mode_get(), evas_device_parent_set(), evas_device_push(), evas_event_feed_hold(), evas_object_image_extension_can_load_fast_get(), evas_object_ref(), and evas_smart_legacy_type_register().

◆ efl_unref()

void efl_unref ( const Eo obj)

◆ efl_ref_get()

int efl_ref_get ( 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 evas_free().

◆ efl_del_intercept_set()

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. It is the job of this interceptor function to handle any further deletion of of the object from here.

Note that by default objects have no interceptor function set, and thus will be destroyed as normal. To return an object to this state, simply set the del_intercept_func to NULL which is the default.

A good use for this feature is to ensure an object is destroyed by its owning main loop and not in a foreign loop. This makes it possible to safely unrefor delete objects from any loop as an interceptor can be set on an object that will abort destruction and instead queue the object on its owning loop to be destroyed at some time in the future and now set the intercept function to NULL so it is not called again on the next "real deletion".

See also
efl_del_intercept_get()
efl_unref()
efl_del()

Referenced by elm_config_web_backend_get().

◆ efl_del_intercept_get()

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, so it is important to be able to get the interceptor function to know if this has happend and if you want to override this interceptor, be sure to call it after your own interceptor function has finished. It would generally be a bad idea though to override these functions.

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, and ERR.

◆ efl_reuse()

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_FALSE, eina_freeq_ptr_main_add(), EINA_INLIST_CONTAINER_GET, EINA_LIKELY, eina_spinlock_release(), eina_spinlock_take(), eina_trash_push(), ERR, _Eina_Inlist::next, and WRN.

◆ efl_xref_internal()

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)

People should not use this function, use efl_xref instead. A compile flag my make it and eobj_xunref() behave the same as eobj_ref() and eobj_unref() respectively. So this should be used wherever possible.

See also
efl_xunref()

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

◆ efl_xunref()

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. I.e 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. This functions should be used when you want to keep track of an object in a safe way, but you don't want to prevent it from being freed.

Parameters
[in]wrefThe weak ref

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

◆ efl_wref_del()

EOAPI void efl_wref_del ( Eo obj,
Efl_Object **  wref 
)

Delete the weak reference passed.

Parameters
[in]wrefThe weak ref

◆ 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(), 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(), ecore_thread_global_data_wait(), ecore_timer_del(), 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 referring object is deleted. If the referenced object is deleted then the key is deleted automatically.

This is the same key store used by key_data and key_value so keys are shared and can store only one thing

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 referring object is deleted. If the referenced object is deleted then the key is deleted automatically.

This is the same key store used by key_data and key_value so keys are shared and can store only one thing

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 so 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 so 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 the referring object is deleted.

This is the same key store used by key_data and key_obj so keys are shared and can store only one thing

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 the referring object is deleted.

This is the same key store used by key_data and key_obj so keys are shared and can store only one thing

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

◆ efl_manual_free_set()

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 to call the function efl_manual_free to free the memory allocated for this object.

Do not use, unless you really know what you are doing. It's used by Evas because evas wants to keep its private data available even after the object is deleted. Setting this to true makes Eo destruct the object but not free the private data or the object itself.

See also
efl_manual_free()

◆ efl_manual_free()

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 before with the parameter EINA_TRUE. An error will be printed if this function is called when the manual free option is not set to EINA_TRUE or the number of refs is not 0.
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()

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 not yet freed (but possibly destructed).
See also
efl_manual_free_set()

References EINA_FALSE.

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 we need to init locks before using them. Don't touch it if you don't know what you are doing.

Referenced by efl_object_init().

◆ _efl_object_init_generation [1/2]

EAPI unsigned int _efl_object_init_generation

This variable stores the current eo init generation.

That is, how many times we have completed full init/shutdown cycles. Starts at 1 and incremeted on every call to shutdown that actually shuts down eo.

◆ object

Efl_Object* _Efl_Event::object

The object the event was called on.

Examples:
emotion_signals_example.c.

Referenced by ecore_timer_precision_set(), evas_object_del(), and evas_textblock_text_utf8_to_markup().

◆ desc [1/2]

const Efl_Event_Description* _Efl_Event::desc

The event description.

◆ info

void* _Efl_Event::info

Extra event information passed by the event caller.

◆ desc [2/2]

const Efl_Event_Description* _Efl_Callback_Array_Item::desc

◆ func [1/2]

Efl_Event_Cb _Efl_Callback_Array_Item::func

The callback function.

Referenced by efl_object_legacy_only_event_description_get().

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

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

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

◆ type

Efl_Class_Type _Efl_Class_Description::type

The type of the class.

◆ data_size

size_t _Efl_Class_Description::data_size

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

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

◆ _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 we need to init locks before using them. Don't touch it if you don't know what you are doing.

Referenced by efl_object_init().

◆ _efl_object_init_generation [2/2]

_efl_object_init_generation = 1

This variable stores the current eo init generation.

That is, how many times we have completed full init/shutdown cycles. Starts at 1 and incremeted on every call to shutdown that actually shuts down eo.