Data Structures | |
struct | _Efl_Op_Description |
struct | _Efl_Object_Ops |
This struct holds the ops and the size of the ops. More... | |
struct | _Efl_Class_Description |
This struct holds the description of a class. More... | |
Macros | |
#define | EFL_CLASS_CLASS efl_class_class_get() |
Abstract Efl class. | |
#define | EFL_DEFINE_CLASS(class_get_func_name, class_desc, parent_class, ...) |
A convenience macro to be used for creating the class_get function. More... | |
#define | EO_VERSION 2 |
The current version of EO. | |
#define | EFL_OPS_DEFINE(ops, ...) |
Define an array of override functions for efl_object_override. More... | |
Typedefs | |
typedef enum _Efl_Class_Type | Efl_Class_Type |
A convenience typedef for _Efl_Class_Type. | |
typedef struct _Efl_Op_Description | Efl_Op_Description |
typedef struct _Efl_Object_Ops | Efl_Object_Ops |
typedef struct _Efl_Class_Description | Efl_Class_Description |
A convenience typedef for _Efl_Class_Description. | |
Enumerations | |
enum | _Efl_Class_Type { EFL_CLASS_TYPE_REGULAR = 0, EFL_CLASS_TYPE_REGULAR_NO_INSTANT, EFL_CLASS_TYPE_INTERFACE, EFL_CLASS_TYPE_MIXIN } |
An enum representing the possible types of an Eo class. More... | |
Functions | |
const Efl_Class * | efl_class_new (const Efl_Class_Description *desc, const Efl_Class *parent,...) |
Create a new class. More... | |
Eina_Bool | efl_class_functions_set (const Efl_Class *klass_id, const Efl_Object_Ops *object_ops, const Efl_Object_Ops *class_ops) |
Set the functions of a class. More... | |
Eina_Bool | efl_object_override (Eo *obj, const Efl_Object_Ops *ops) |
Override Eo functions of this object. More... | |
Eina_Bool | efl_isa (const Eo *obj, const Efl_Class *klass) |
Check if an object "is a" klass. More... | |
const char * | efl_class_name_get (const Efl_Class *klass) |
Gets the name of the passed class. More... | |
#define EFL_DEFINE_CLASS | ( | class_get_func_name, | |
class_desc, | |||
parent_class, | |||
... | |||
) |
A convenience macro to be used for creating the class_get function.
This macro is fairly simple but should still be used as it'll let us improve things easily.
class_get_func_name | the name of the wanted class_get function name. |
class_desc | the class description. |
parent_class | The parent class for the function. Look at efl_class_new() for more information. |
... | List of extensions. Look at efl_class_new() for more information. |
You must use this macro if you want thread safety in class creation.
#define EFL_OPS_DEFINE | ( | ops, | |
... | |||
) |
Define an array of override functions for efl_object_override.
ops | A name for the Efl_Object_Ops local variable to define |
... | A comma separated list of Efl_Object_Op overrides, using #EFL_OBJECT_OP_FUNC or #EFL_OBJECT_OP_CLASS_FUNC |
This can be used as follows:
enum _Efl_Class_Type |
const Efl_Class* efl_class_new | ( | const Efl_Class_Description * | desc, |
const Efl_Class * | parent, | ||
... | |||
) |
Create a new class.
desc | the class description to create the class with. |
parent | the class to inherit from. |
... | A NULL terminated list of extensions (interfaces, mixins and the classes of any composite objects). |
You should use EFL_DEFINE_CLASS. It'll provide thread safety and other features easily.
Eina_Bool efl_class_functions_set | ( | const Efl_Class * | klass_id, |
const Efl_Object_Ops * | object_ops, | ||
const Efl_Object_Ops * | class_ops | ||
) |
Set the functions of a class.
klass_id | the class whose functions we are setting. |
object_ops | The function structure we are setting for object functions |
class_ops | The function structure we are setting for class functions |
This should only be called from within the initializer function.
References _Efl_Object_Ops::count, EINA_FALSE, EINA_TRUE, and ERR.
Eina_Bool efl_object_override | ( | Eo * | obj, |
const Efl_Object_Ops * | ops | ||
) |
Override Eo functions of this object.
ops | The op description to override with. |
This lets you override all of the Eo functions of this object (this one included) and repalce them with ad-hoc implementation. The contents of the array are copied so they can for example reside on the stack.
You are only allowed to override functions that are defined in the class or any of its interfaces (that is, efl_isa returning true).
If ops
is #NULL, this will revert the obj
to its original class without any function overrides.
It is not possible to override a function table of an object when it's already been overridden. Call efl_object_override(obj, NULL) first if you really need to do that.
References EINA_FALSE, eina_freeq_ptr_main_add(), EINA_TRUE, EINA_UNLIKELY, and ERR.
Referenced by efl_reuse().
Check if an object "is a" klass.
obj | The object to check |
klass | The klass to check against. |
EINA_TRUE
if obj implements klass, EINA_FALSE
otherwise.Notice: This function does not support composite objects.
References EFL_ID_DOMAIN_SHARED, EINA_FALSE, EINA_LIKELY, eina_lock_release(), eina_lock_take(), EINA_UNLIKELY, and ERR.
Referenced by ecore_con_client_fd_get(), ecore_con_client_flush(), ecore_con_server_fd_get(), ecore_con_server_flush(), 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_ipc_client_ip_get(), ecore_ipc_server_ip_get(), elm_win_resize_object_add(), evas_device_parent_get(), evas_object_data_del(), evas_object_data_get(), evas_object_data_set(), evas_object_name_get(), evas_object_name_set(), evas_object_smart_type_check(), evas_object_smart_type_check_ptr(), and evas_object_top_at_pointer_get().
const char* efl_class_name_get | ( | const Efl_Class * | klass | ) |
Gets the name of the passed class.
klass | the class to work on. |