Functions that deal with signals. More...
Typedefs | |
typedef void(* | Edje_Signal_Cb) (void *data, Evas_Object *obj, const char *emission, const char *source) |
Edje signal callback functions's prototype definition. More... | |
Functions | |
void * | edje_object_signal_callback_extra_data_get (void) |
Get extra data passed to callbacks. More... | |
#define | edje_obj_signal_callback_add(emission, source, func, data) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIGNAL_CALLBACK_ADD), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Edje_Signal_Cb, func), EO_TYPECHECK(void *, data) |
Add a callback for an arriving Edje signal, emitted by a given Ejde object. More... | |
#define | edje_obj_signal_callback_del(emission, source, func, data, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIGNAL_CALLBACK_DEL), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Edje_Signal_Cb, func), EO_TYPECHECK(void *, data), EO_TYPECHECK(void **, ret) |
Remove a signal-triggered callback from an object. More... | |
#define | edje_obj_signal_emit(emission, source) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIGNAL_EMIT), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source) |
Send/emit an Edje signal to a given Edje object. More... | |
void | edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) |
Add a callback for an arriving Edje signal, emitted by a given Edje object. More... | |
void * | edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func) |
Remove a signal-triggered callback from an object. More... | |
void * | edje_object_signal_callback_del_full (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) |
Unregister/delete a callback set for an arriving Edje signal, emitted by a given Edje object. More... | |
void | edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source) |
Send/emit an Edje signal to a given Edje object. More... | |
Functions that deal with signals.
Edje has two communication interfaces between code and theme. Signals and messages.
This group has functions that deal with signals. One can either emit a signal from code to a theme or create handles for the ones emitted from themes. Signals are identified by strings.
#define edje_obj_signal_callback_add | ( | emission, | |
source, | |||
func, | |||
data | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIGNAL_CALLBACK_ADD), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Edje_Signal_Cb, func), EO_TYPECHECK(void *, data) |
Add a callback for an arriving Edje signal, emitted by a given Ejde object.
[in] | emission | |
[in] | source | |
[in] | func | |
[in] | data |
Referenced by edje_frametime_get().
#define edje_obj_signal_callback_del | ( | emission, | |
source, | |||
func, | |||
data, | |||
ret | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIGNAL_CALLBACK_DEL), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Edje_Signal_Cb, func), EO_TYPECHECK(void *, data), EO_TYPECHECK(void **, ret) |
Remove a signal-triggered callback from an object.
[in] | emission | |
[in] | source | |
[in] | func | |
[out] | ret |
Referenced by edje_frametime_get(), and edje_object_signal_callback_del_full().
#define edje_obj_signal_emit | ( | emission, | |
source | |||
) | EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_SIGNAL_EMIT), EO_TYPECHECK(const char *, emission), EO_TYPECHECK(const char *, source) |
Send/emit an Edje signal to a given Edje object.
[in] | emission | |
[in] | source |
Referenced by edje_object_signal_emit().
typedef void(* Edje_Signal_Cb) (void *data, Evas_Object *obj, const char *emission, const char *source) |
Edje signal 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 signal comes from. emission
will identify the exact signal's emission string and source
the exact signal's source one.
void* edje_object_signal_callback_extra_data_get | ( | void | ) |
Get extra data passed to callbacks.
Some callbacks pass extra information. This function gives access to that extra information. It's somehow like event_info in smart callbacks.
References eina_inarray_count(), EINA_INARRAY_FOREACH, EINA_REFCOUNT_REF, evas_object_data_get(), _Edje_External_Param::name, _Edje_External_Param_Info::name, _Edje_External_Type::parameters_info, _Edje_External_Param::type, and _Edje_External_Param_Info::type.
void edje_object_signal_callback_add | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func, | ||
void * | data | ||
) |
Add a callback for an arriving Edje signal, emitted by a given Edje object.
obj | A handle to an Edje object |
emission | The signal's "emission" string |
source | The signal's "source" string |
func | The callback function to be executed when the signal is emitted. |
data | A pointer to data to pass in to func . |
Edje signals are one of the communication interfaces between code and a given Edje object's theme. With signals, one can communicate two string values at a time, which are:
Though there are those common uses for the two strings, one is free to use them however they like.
This function adds a callback function to a signal emitted by obj, to be issued every time an EDC program like the following
is run, if emission
and source
are given those same values, here.
Signal callback registration is powerful, in the way that blobs may be used to match multiple signals at once. All the "*?[\"
set of fnmatch()
operators can be used, both for emission
and source
.
Edje has internal signals it will emit, automatically, on various actions taking place on group parts. For example, the mouse cursor being moved, pressed, released, etc., over a given part's area, all generate individual signals.
By using something like
being "button.*"
the pattern for the names of parts implementing buttons on an interface, you'd be registering for notifications on events of mouse buttons being pressed down on either of those parts (those events all have the "mouse,down,"
common prefix on their names, with a suffix giving the button number). The actual emission and source strings of an event will be passed in as the emission and source parameters of the callback function (e.g. "mouse,down,2"
and "button.close"
), for each of those events.
Referenced by edje_frametime_get().
void* edje_object_signal_callback_del | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func | ||
) |
Remove a signal-triggered callback from an object.
obj | A valid Evas_Object handle. |
emission | The emission string. |
source | The source string. |
func | The callback function. |
This function removes a callback, previously attached to the emittion of a signal, from the object obj. The parameters emission, source and func must match exactly those passed to a previous call to edje_object_signal_callback_add(). The data pointer that was passed to this call will be returned.
Referenced by edje_frametime_get().
void* edje_object_signal_callback_del_full | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func, | ||
void * | data | ||
) |
Unregister/delete a callback set for an arriving Edje signal, emitted by a given Edje object.
obj | A handle to an Edje object |
emission | The signal's "emission" string |
source | The signal's "source" string |
func | The callback function passed on the callback's registration |
data | The pointer given to be passed as data to func |
data
, on success or NULL
, on errors (or if data
had this value)This function removes a callback, previously attached to the emittion of a signal, from the object obj. The parameters emission, source, func and data must match exactly those passed to a previous call to edje_object_signal_callback_add(). The data pointer that was passed to this call will be returned.
References EAPI, and edje_obj_signal_callback_del.
void edje_object_signal_emit | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source | ||
) |
Send/emit an Edje signal to a given Edje object.
obj | A handle to an Edje object |
emission | The signal's "emission" string |
source | The signal's "source" string |
This function sends a signal to the object obj. An Edje program, at obj's
EDC specification level, can respond to a signal by having declared matching 'signal'
and 'source'
fields on its block (see the syntax for EDC files).
As an example,
would trigger a program which had an EDC declaration block like
References EAPI, edje_obj_signal_emit, and EINA_UNUSED.
Referenced by edje_object_mirrored_get().