Tizen Native API
Edje Communication Interface: Message

This group discusses functions that deal with messages.

Remarks:
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.
Messages must be handled by scripts.

Functions

void edje_object_message_send (Evas_Object *obj, Edje_Message_Type type, int id, void *msg)
 Sends an (edje) message to a given edje object.
void edje_object_message_handler_set (Evas_Object *obj, Edje_Message_Handler_Cb func, void *data)
 Sets an edje message handler function for a given edje object.
void edje_object_message_signal_process (Evas_Object *obj)
 Processes an object's message queue.
void edje_message_signal_process (void)
 Processes all queued up edje messages.

Typedefs

typedef enum _Edje_Message_Type Edje_Message_Type
 Enumeration of identifiers of edje message types, which can be sent back and forth through code and a given edje object's theme file/group.
typedef struct _Edje_Message_String Edje_Message_String
 typedef of struct _Edje_Message_String
typedef struct _Edje_Message_Int Edje_Message_Int
 typedef of struct _Edje_Message_Int
typedef struct _Edje_Message_Float Edje_Message_Float
 typedef of struct _Edje_Message_Float
typedef struct
_Edje_Message_String_Set 
Edje_Message_String_Set
 typedef of struct _Edje_Message_String_Set
typedef struct
_Edje_Message_Int_Set 
Edje_Message_Int_Set
 typedef of struct _Edje_Message_Int_Set
typedef struct
_Edje_Message_Float_Set 
Edje_Message_Float_Set
 typedef of struct _Edje_Message_Float_Set
typedef struct
_Edje_Message_String_Int 
Edje_Message_String_Int
 typedef of struct _Edje_Message_String_Int_Set
typedef struct
_Edje_Message_String_Float 
Edje_Message_String_Float
 typedef of struct _Edje_Message_String_Int_Set
typedef struct
_Edje_Message_String_Int_Set 
Edje_Message_String_Int_Set
 typedef of struct _Edje_Message_String_Int_Set
typedef struct
_Edje_Message_String_Float_Set 
Edje_Message_String_Float_Set
 typedef of struct _Edje_Message_String_Float_Set
typedef void(* Edje_Message_Handler_Cb )(void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg)

Typedef Documentation

typedef void(* Edje_Message_Handler_Cb)(void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg)

Edje message handler callback functions' prototype definition. data has an auxiliary data pointer set at the time of the callback registration. obj is a pointer to the Edje object from where the message comes. type identifies the type of the given message and msg is a pointer to the message's contents, de facto, which depend on type

Enumeration of identifiers of edje message types, which can be sent back and forth through code and a given edje object's theme file/group.

See also:
edje_object_message_send()
edje_object_message_handler_set()

Enumeration Type Documentation

Enumeration of identifiers of edje message types, which can be sent back and forth through code and a given edje object's theme file/group.

See also:
edje_object_message_send()
edje_object_message_handler_set()
Enumerator:
EDJE_MESSAGE_STRING 

A message with a string as a value. Use Edje_Message_String structs as the message body, for this type

EDJE_MESSAGE_INT 

A message with an integer number as a value. Use Edje_Message_Int structs as the message body, for this type

EDJE_MESSAGE_FLOAT 

A message with a floating pointer number as a value. Use Edje_Message_Float structs as the message body, for this type

EDJE_MESSAGE_STRING_SET 

A message with a list of strings as values. Use Edje_Message_String_Set structs as the message body, for this type

EDJE_MESSAGE_INT_SET 

A message with a list of integer numbers as values. Use Edje_Message_Int_Set structs as the message body, for this type

EDJE_MESSAGE_FLOAT_SET 

A message with a list of floating point numbers as values. Use Edje_Message_Float_Set structs as the message body, for this type

EDJE_MESSAGE_STRING_INT 

A message with a struct containing a string and an integer number as values. Use Edje_Message_String_Int structs as the message body, for this type

EDJE_MESSAGE_STRING_FLOAT 

A message with a struct containing a string and a floating point number as values. Use Edje_Message_String_Float structs as the message body, for this type

EDJE_MESSAGE_STRING_INT_SET 

A message with a struct containing a string and a list of integer numbers as values. Use Edje_Message_String_Int_Set structs as the message body, for this type

EDJE_MESSAGE_STRING_FLOAT_SET 

A message with a struct containing a string and a list of floating point numbers as values. Use Edje_Message_String_Float_Set structs as the message body, for this type


Function Documentation

void edje_message_signal_process ( void  )

Processes all queued up edje messages.

This function triggers the processing of messages addressed to any (alive) edje objects.

Since :
2.3.1
void edje_object_message_handler_set ( Evas_Object obj,
Edje_Message_Handler_Cb  func,
void *  data 
)

Sets an edje message handler function for a given edje object.

Since :
2.3.1
Remarks:
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.
Parameters:
[in]objA handle to an edje object
[in]funcThe function to handle messages coming from obj
[in]dataThe auxiliary data to be passed to func
See also:
edje_object_message_send()
void edje_object_message_send ( Evas_Object obj,
Edje_Message_Type  type,
int  id,
void *  msg 
)

Sends an (edje) message to a given edje object.

This function sends an edje message to obj and to all of its child objects, if it has any (swallowed objects are a kind of child object). type and msg must be matched accordingly, as documented in Edje_Message_Type.

Since :
2.3.1
Remarks:
The id argument is a form of code and theme defining a common interface on message communication. One should define the same IDs on both the code and the 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().
Parameters:
[in]objA handle to an edje object
[in]typeThe type of message to send to obj
[in]idAn identification number for the message to be sent
[in]msgThe message's body, a struct depending on type

Processes an object's message queue.

This function goes through the object message queue and processes the pending messages for this specific edje object. Normally they are processed only at idle time.

Since :
2.3.1
Parameters:
[in]objA handle to an edje object