Tizen Native API
|
Functions | |
void | edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) |
Adds a callback for an arriving edje signal, emitted by a given Ejde object. | |
void * | edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func) |
Deletes a signal-triggered callback from an object. | |
void * | edje_object_signal_callback_del_full (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data) |
Unregisters/deletes a callback set for an arriving edje signal, emitted by a given Ejde object. | |
void | edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source) |
Sends/emits an edje signal to a given edje object. | |
void * | edje_object_signal_callback_extra_data_get (void) |
Gets the extra data passed to callbacks. | |
Typedefs | |
typedef void(* | Edje_Signal_Cb )(void *data, Evas_Object *obj, const char *emission, const char *source) |
Edje signal callback functions's prototype definition. |
This group discusses functions that deal with signals.
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_add | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func, | ||
void * | data | ||
) |
Adds a callback for an arriving edje signal, emitted by a given Ejde object.
Though there are common uses for the two strings, one is free to use them however they like.
program { name: "emit_example"; action: SIGNAL_EMIT "a_signal" "a_source"; }
*
?[\ set of fnmatch()
operators can be used, both for emission and source.By using something like
edje_object_signal_callback_add(obj, "mouse,down,*", "button.*", signal_cb, NULL);
"button.*"
being the pattern for the names of parts implementing buttons on an interface that you would be registering for notifications on events of mouse buttons being pressed down on either of those parts (all those events 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 are passed as the emission and source parameters of the callback function (e.g. "mouse,down,2"
and "button.close"
), for each of those events.
[in] | obj | A handle to an edje object |
[in] | emission | The signal's "emission" string |
[in] | source | The signal's "source" string |
[in] | func | The callback function to be executed when the signal is emitted |
[in] | data | A pointer to the data to pass to func |
void* edje_object_signal_callback_del | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func | ||
) |
Deletes a signal-triggered callback from an object.
This function removes a callback that had been previously attached to the emission of a signal, from the object obj. The parameters emission, source, and func must exactly match those that are passed to a previous call to edje_object_signal_callback_add(). The data pointer that is passed to this call is returned.
[in] | obj | A valid Evas_Object handle |
[in] | emission | The emission string |
[in] | source | The source string |
[in] | func | The callback function |
void* edje_object_signal_callback_del_full | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source, | ||
Edje_Signal_Cb | func, | ||
void * | data | ||
) |
Unregisters/deletes a callback set for an arriving edje signal, emitted by a given Ejde object.
This function removes a callback that had been previously attached to the emission of a signal, from the object obj. The parameters emission, source, func, and data must exactly match those that are passed to a previous call to edje_object_signal_callback_add(). The data pointer that is passed to this call is returned.
[in] | obj | A handle to an edje object |
[in] | emission | The signal's "emission" string |
[in] | source | The signal's "source" string |
[in] | func | The callback function passed on the callback registration |
[in] | data | A pointer to be passed as data to func |
NULL
on errors (or if data has this value)void* edje_object_signal_callback_extra_data_get | ( | void | ) |
Gets the extra data passed to callbacks.
void edje_object_signal_emit | ( | Evas_Object * | obj, |
const char * | emission, | ||
const char * | source | ||
) |
Sends/emits an edje signal to a given edje object.
This function sends a signal to the object obj. An edje program, at obj's EDC specification level, can respond to a signal by declaring matching 'signal'
and 'source'
fields on its block (see the syntax for EDC files).
As an example,
edje_object_signal_emit(obj, "a_signal", "");
would trigger a program which has an EDC declaration block like
program { name: "a_program"; signal: "a_signal"; source: ""; action: ... }
[in] | obj | A handle to an edje object |
[in] | emission | The signal's "emission" string |
[in] | source | The signal's "source" string |