Functions that deal with messages. More...
Typedefs | |
typedef enum _Edje_Message_Type | Edje_Message_Type |
Identifiers of Edje message types, which can be sent back and forth code and a given Edje object's theme file/group. More... | |
typedef struct _Edje_Message_String | Edje_Message_String |
typedef struct _Edje_Message_Int | Edje_Message_Int |
typedef struct _Edje_Message_Float | Edje_Message_Float |
typedef struct _Edje_Message_String_Set | Edje_Message_String_Set |
typedef struct _Edje_Message_Int_Set | Edje_Message_Int_Set |
typedef struct _Edje_Message_Float_Set | Edje_Message_Float_Set |
typedef struct _Edje_Message_String_Int | Edje_Message_String_Int |
typedef struct _Edje_Message_String_Float | Edje_Message_String_Float |
typedef struct _Edje_Message_String_Int_Set | Edje_Message_String_Int_Set |
typedef struct _Edje_Message_String_Float_Set | Edje_Message_String_Float_Set |
typedef void(* | Edje_Message_Handler_Cb) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg) |
Edje message handler callback functions's prototype definition. More... | |
Enumerations | |
enum | _Edje_Message_Type { EDJE_MESSAGE_NONE = 0, EDJE_MESSAGE_SIGNAL = 1, EDJE_MESSAGE_STRING = 2, EDJE_MESSAGE_INT = 3, EDJE_MESSAGE_FLOAT = 4, EDJE_MESSAGE_STRING_SET = 5, EDJE_MESSAGE_INT_SET = 6, EDJE_MESSAGE_FLOAT_SET = 7, EDJE_MESSAGE_STRING_INT = 8, EDJE_MESSAGE_STRING_FLOAT = 9, EDJE_MESSAGE_STRING_INT_SET = 10, EDJE_MESSAGE_STRING_FLOAT_SET = 11 } |
Identifiers of Edje message types, which can be sent back and forth code and a given Edje object's theme file/group. More... | |
Functions | |
void | edje_message_signal_process (void) |
Process all queued up edje messages. More... | |
#define | edje_obj_message_send(type, id, msg) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MESSAGE_SEND), EO_TYPECHECK(Edje_Message_Type, type), EO_TYPECHECK(int, id), EO_TYPECHECK(void *, msg) |
Send an (Edje) message to a given Edje object. More... | |
#define | edje_obj_message_handler_set(func, data) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MESSAGE_HANDLER_SET), EO_TYPECHECK(Edje_Message_Handler_Cb, func), EO_TYPECHECK(void *, data) |
Set an Edje message handler function for a given Edje object. More... | |
#define | edje_obj_message_signal_process() EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MESSAGE_SIGNAL_PROCESS) |
Process an object's message queue. More... | |
void | edje_object_message_send (Evas_Object *obj, Edje_Message_Type type, int id, void *msg) |
Send an (Edje) message to a given Edje object. More... | |
void | edje_object_message_handler_set (Evas_Object *obj, Edje_Message_Handler_Cb func, void *data) |
Set an Edje message handler function for a given Edje object. More... | |
void | edje_object_message_signal_process (Evas_Object *obj) |
Process an object's message queue. More... | |
Functions that deal with messages.
Edje has two communication interfaces between code and theme. Signals and messages.
Edje messages are one of the communication interfaces between code and a given Edje object's theme. With messages, one can communicate values like strings, float numbers and integer numbers. Moreover, messages can be identified by integer numbers. See Edje_Message_Type for the full list of message types.
#define edje_obj_message_send | ( | type, | |
id, | |||
msg | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MESSAGE_SEND), EO_TYPECHECK(Edje_Message_Type, type), EO_TYPECHECK(int, id), EO_TYPECHECK(void *, msg) |
Send an (Edje) message to a given Edje object.
[in] | type | |
[in] | id | |
[in] | msg |
Referenced by edje_object_message_send().
#define edje_obj_message_handler_set | ( | func, | |
data | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MESSAGE_HANDLER_SET), EO_TYPECHECK(Edje_Message_Handler_Cb, func), EO_TYPECHECK(void *, data) |
Set an Edje message handler function for a given Edje object.
[in] | func | |
[in] | data |
Referenced by edje_object_message_handler_set().
#define edje_obj_message_signal_process | ( | ) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MESSAGE_SIGNAL_PROCESS) |
typedef enum _Edje_Message_Type Edje_Message_Type |
Identifiers of Edje message types, which can be sent back and forth code and a given Edje object's theme file/group.
typedef void(* Edje_Message_Handler_Cb) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg) |
Edje message handler callback functions's prototype definition.
data
will have the auxiliary data pointer set at the time the callback registration. obj
will be a pointer the Edje object where the message comes from. type
will identify the type of the given message and msg
will be a pointer the message's contents, de facto, which depend on type
.
enum _Edje_Message_Type |
Identifiers of Edje message types, which can be sent back and forth code and a given Edje object's theme file/group.
void edje_message_signal_process | ( | void | ) |
Process all queued up edje messages.
This function triggers the processing of messages addressed to any (alive) edje objects.
References _Edje_Message_String_Set::count, _Edje_Message_Int_Set::count, _Edje_Message_Float_Set::count, _Edje_Message_String_Int_Set::count, _Edje_Message_String_Float_Set::count, _Eina_List::data, ECORE_CALLBACK_CANCEL, ecore_job_add(), ecore_job_del(), ecore_timer_add(), ecore_timer_del(), EDJE_MESSAGE_FLOAT, EDJE_MESSAGE_FLOAT_SET, EDJE_MESSAGE_INT, EDJE_MESSAGE_INT_SET, EDJE_MESSAGE_STRING, EDJE_MESSAGE_STRING_FLOAT, EDJE_MESSAGE_STRING_FLOAT_SET, EDJE_MESSAGE_STRING_INT, EDJE_MESSAGE_STRING_INT_SET, EDJE_MESSAGE_STRING_SET, EINA_FALSE, eina_list_append(), eina_list_data_get(), EINA_LIST_FOREACH, eina_list_next(), eina_list_remove_list(), eina_stringshare_add(), eina_stringshare_del(), embryo_error_string_get(), EMBRYO_FLOAT_TO_CELL, EMBRYO_FUNCTION_NONE, embryo_parameter_cell_array_push(), embryo_parameter_string_push(), embryo_program_data_get(), embryo_program_error_get(), embryo_program_function_find(), embryo_program_max_cycle_run_get(), embryo_program_max_cycle_run_set(), embryo_program_run(), embryo_program_vm_pop(), embryo_program_vm_push(), _Edje_Message_String::str, _Edje_Message_String_Set::str, _Edje_Message_String_Int::str, _Edje_Message_String_Float::str, _Edje_Message_String_Int_Set::str, _Edje_Message_String_Float_Set::str, _Edje_Message_Int::val, _Edje_Message_Float::val, _Edje_Message_Int_Set::val, _Edje_Message_Float_Set::val, _Edje_Message_String_Int::val, _Edje_Message_String_Float::val, _Edje_Message_String_Int_Set::val, and _Edje_Message_String_Float_Set::val.
void edje_object_message_send | ( | Evas_Object * | obj, |
Edje_Message_Type | type, | ||
int | id, | ||
void * | msg | ||
) |
Send an (Edje) message to a given Edje object.
obj | A handle to an Edje object |
type | The type of message to send to obj |
id | A identification number for the message to be sent |
msg | The message's body, a struct depending on type |
This function sends an Edje message to obj
and to all of its child objects, if it has any (swallowed objects are one kind of child object). type
and msg
must be matched accordingly, as documented in Edje_Message_Type.
The id
argument as a form of code and theme defining a common interface on message communication. One should define the same IDs on both code and EDC declaration (see the syntax for EDC files), to individualize messages (binding them to a given context).
The function to handle messages arriving from obj is set with edje_object_message_handler_set().
References EAPI, edje_obj_message_send, EINA_FALSE, and EINA_UNUSED.
Referenced by edje_object_animation_get().
void edje_object_message_handler_set | ( | Evas_Object * | obj, |
Edje_Message_Handler_Cb | func, | ||
void * | data | ||
) |
Set an Edje message handler function for a given Edje object.
obj | A handle to an Edje object |
func | The function to handle messages coming from obj |
data | Auxiliary data to be passed to func |
For scriptable programs on an Edje object's defining EDC file which send messages with the send_message()
primitive, one can attach handler functions, to be called in the code which creates that object (see the syntax for EDC files).
This function associates a message handler function and the attached data pointer to the object obj
.
References EAPI, and edje_obj_message_handler_set.
void edje_object_message_signal_process | ( | Evas_Object * | obj | ) |
Process an object's message queue.
obj | A handle to an Edje object. |
This function goes through the object message queue processing the pending messages for this specific Edje object. Normally they'd be processed only at idle time.
References EAPI, edje_obj_message_signal_process, eina_list_append(), EINA_LIST_FOREACH, EINA_LIST_FOREACH_SAFE, EINA_LIST_FREE, and eina_list_remove_list().