- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Data Structures | Typedefs | Enumerations | Functions
Edje Communication Interface: Message
Edje Object

Functions that deal with messages. More...

## Data Structures
struct | _Edje_Message_String
| Structure passed as value on EDJE_MESSAGE_STRING messages. More...
struct | _Edje_Message_Int
| Structure passed as value on EDJE_MESSAGE_INT messages. More...
struct | _Edje_Message_Float
| Structure passed as value on EDJE_MESSAGE_FLOAT messages. More...
struct | _Edje_Message_String_Set
| Structure passed as value on EDJE_MESSAGE_STRING_SET messages. More...
struct | _Edje_Message_Int_Set
| Structure passed as value on EDJE_MESSAGE_INT_SET messages. More...
struct | _Edje_Message_Float_Set
| Structure passed as value on EDJE_MESSAGE_FLOAT_SET messages. More...
struct | _Edje_Message_String_Int
| Structure passed as value on EDJE_MESSAGE_STRING_INT messages. More...
struct | _Edje_Message_String_Float
| Structure passed as value on EDJE_MESSAGE_STRING_FLOAT messages. More...
struct | _Edje_Message_String_Int_Set
| Structure passed as value on EDJE_MESSAGE_STRING_INT_SET messages. More...
struct | _Edje_Message_String_Float_Set
| Structure passed as value on EDJE_MESSAGE_STRING_FLOAT_SET 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...

## Detailed Description

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.

Note
  Messages must be handled by scripts.

## Macro Definition Documentation

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

Since
  1.8

Parameters

  [in] | type |
  [in] | id |
  [in] | msg |

See Also
  edje_object_message_send

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.

Since
  1.8

Parameters

  [in] | func |
  [in] | data |

See Also
  edje_object_message_handler_set

Referenced by edje_object_message_handler_set().

#define edje_obj_message_signal_process | ( |  | ) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MESSAGE_SIGNAL_PROCESS)

Process an object's message queue.

Since
  1.8

See Also
  edje_object_message_signal_process

Referenced by edje_object_message_signal_process().

## Typedef Documentation

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.

See Also
  edje_object_message_send()
  edje_object_message_handler_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.

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

## Enumeration Type Documentation

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.

See Also
  edje_object_message_send()
  edje_object_message_handler_set()

Enumerator
EDJE_MESSAGE_STRING | A message with a string as value. Use #Edje_Message_String structs as message body, for this type.
EDJE_MESSAGE_INT | A message with an integer number as value. Use #Edje_Message_Int structs as message body, for this type.
EDJE_MESSAGE_FLOAT | A message with a floating pointer number as value. Use #Edje_Message_Float structs as message body, for this type.
EDJE_MESSAGE_STRING_SET | A message with a list of strings as value. Use #Edje_Message_String_Set structs as message body, for this type.
EDJE_MESSAGE_INT_SET | A message with a list of integer numbers as value. Use #Edje_Message_Int_Set structs as message body, for this type.
EDJE_MESSAGE_FLOAT_SET | A message with a list of floating point numbers as value. Use #Edje_Message_Float_Set structs as message body, for this type.
EDJE_MESSAGE_STRING_INT | A message with a struct containing a string and an integer number as value. Use #Edje_Message_String_Int structs as message body, for this type.
EDJE_MESSAGE_STRING_FLOAT | A message with a struct containing a string and a floating point number as value. Use #Edje_Message_String_Float structs as message body, for this type.
EDJE_MESSAGE_STRING_INT_SET | A message with a struct containing a string and list of integer numbers as value. Use #Edje_Message_String_Int_Set structs as message body, for this type.
EDJE_MESSAGE_STRING_FLOAT_SET | A message with a struct containing a string and list of floating point numbers as value. Use #Edje_Message_String_Float_Set structs as message body, for this type.

## Function Documentation

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.

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.

Parameters

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

Examples:
  edje-signals-messages.c.

References edje_obj_message_send.

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.

Parameters

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

See Also
  edje_object_message_send()

Examples:
  edje-signals-messages.c.

References edje_obj_message_handler_set.

void edje_object_message_signal_process | ( | Evas_Object * | obj | ) |

Process an object's message queue.

Parameters

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