Edje_program_Group

Langue: en

Version: 378225 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

Program -

These functions provide an abstraction layer between the application code and the interface, while allowing extremely flexible dynamic layouts and animations.

Functions


EAPI void edje_frametime_set (double t)
Set edje trasitions' frame time.
EAPI double edje_frametime_get (void)
Get edje trasitions' frame time.
EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, void(*func)(void *data, Evas_Object *o, const char *emission, const char *source), void *data)
Add a callback for a signal emitted by obj.
EAPI void * edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, void(*func)(void *data, Evas_Object *o, const char *emission, const char *source))
Remove a signal-triggered callback from an object.
EAPI void edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source)
Send a signal to an edje object.
EAPI void edje_object_play_set (Evas_Object *obj, Eina_Bool play)
Set the edje object to playing or paused states.
EAPI Eina_Bool edje_object_play_get (const Evas_Object *obj)
Get the edje object's play/pause state.
EAPI void edje_object_animation_set (Evas_Object *obj, Eina_Bool on)
Set the object's animation state.
EAPI Eina_Bool edje_object_animation_get (const Evas_Object *obj)
Get the edje object's animation state.

Detailed Description

These functions provide an abstraction layer between the application code and the interface, while allowing extremely flexible dynamic layouts and animations.

Function Documentation

EAPI double edje_frametime_get (void)

Get edje trasitions' frame time. Returns:

The frame time, in seconds.

This function returns the edje frame time set by edje_frametime_set().

See also:

edje_frametime_set()

EAPI void edje_frametime_set (double t)

Set edje trasitions' frame time. Parameters:

t The frame time, in seconds. Default value is 1/30.

This function sets the edje built-in animations' frame time (thus, affecting their resolution) by calling ecore_animator_frametime_set(). This frame time can be retrieved with edje_frametime_get().

See also:

edje_frametime_get()

EAPI Eina_Bool edje_object_animation_get (const Evas_Object * obj)

Get the edje object's animation state. Parameters:

obj A valid Evas_Object handle.

Returns:

EINA_FALSE on error or if object is not animated; EINA_TRUE if animated.

This function returns if the animation is playing or not. The animation state is set by edje_object_play_set().

See also:

edje_object_animation_set().

EAPI void edje_object_animation_set (Evas_Object * obj, Eina_Bool on)

Set the object's animation state. Parameters:

obj A valid Evas_Object handle.
on Animation State.

This function starts or stops an edje object's animation. The information if it's runnig can be retrieved by edje_object_animation_get().

See also:

edje_object_animation_get()

References edje_object_animation_set().

Referenced by edje_object_animation_set().

EAPI Eina_Bool edje_object_play_get (const Evas_Object * obj)

Get the edje object's play/pause state. Parameters:

obj A valid Evas_Object handle.

Returns:

EINA_FALSE if the object is not connected, its delete_me flag is set, or it is at paused state; EINA_TRUE if the object is at playing state.

This function tells if an edje object is playing or not. This state is set by edje_object_play_set().

See also:

edje_object_play_set().

EAPI void edje_object_play_set (Evas_Object * obj, Eina_Bool play)

Set the edje object to playing or paused states. Parameters:

obj A valid Evas_Object handle.
play Object state (1 to playing, 0 to pauseed).

This function sets the edje object obj to playing or paused states, depending on the parameter play. This has no effect if the object was already at that state.

See also:

edje_object_play_get().

References edje_object_play_set().

Referenced by edje_object_play_set().

EAPI void edje_object_signal_callback_add (Evas_Object * obj, const char * emission, const char * source, void(*)(void *data, Evas_Object *o, const char *emission, const char *source) func, void * data)

Add a callback for a signal emitted by obj. Parameters:

obj A valid Evas_Object handle.
emission The signal's name.
source The signal's source.
func The callback function to be executed when the signal is emitted.
data A pointer to data to pass in to the callback function.

Connects a callback function to a signal emitted by obj. In EDC, a program can emit a signal as follows:

  program {
    name: 'emit_example';
    action: SIGNAL_EMIT 'a_signal' 'a_source';
  }
 

Assuming a function with the following declaration is definded:

  void cb_signal(void *data, Evas_Object *o, const char *emission, const char *source);
 

a callback is attached using:

  edje_object_callback_add(obj, 'a_signal', 'a_source', cb_signal, data);
 

Here, data is an arbitrary pointer to be used as desired. Note that emission and source correspond respectively to the first and the second parameters at the SIGNAL_EMIT action.

Internal edje signals can also be attached to, and globs can occur in either the emission or source name, e.g.

  edje_object_callback_add(obj, 'mouse,down,*', 'button.*', NULL);
 

Here, any mouse down events on an edje part whose name begins with 'button.' will trigger the callback. The actual signal and source names will be passed in to the emission and source parameters of the callback function (e.g. 'mouse,down,2' and 'button.close').

EAPI void* edje_object_signal_callback_del (Evas_Object * obj, const char * emission, const char * source, void(*)(void *data, Evas_Object *o, const char *emission, const char *source) func)

Remove a signal-triggered callback from an object. Parameters:

obj A valid Evas_Object handle.
emission The emission string.
source The source string.
func The callback function.

Returns:

The data pointer

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.

See also:

edje_object_signal_callback_add().

EAPI void edje_object_signal_emit (Evas_Object * obj, const char * emission, const char * source)

Send a signal to an edje object. Parameters:

obj A valid Evas_Object handle.
emission The signal's name.
source The signal's source.

This function sends a signal to the object obj. An edje program can respond to a signal by specifying matching 'signal' and 'source' fields.

  edje_object_signal_emit(obj, 'a_signal', '');
 

will trigger a program whose EDC block is:

  program {
   name: 'a_program';
   signal: 'a_signal';
   source: '';
   action: ...
  }
 

FIXME: should this signal be sent to children also?

Author

Generated automatically by Doxygen for Edje from the source code.