Edje Object Animation

Functions that deal with animations. More...

Typedefs

typedef enum _Edje_Tween_Mode Edje_Tween_Mode
 
typedef enum _Edje_Action_Type Edje_Action_Type
 

Enumerations

enum  _Edje_Tween_Mode {
  EDJE_TWEEN_MODE_NONE = 0,
  EDJE_TWEEN_MODE_LINEAR = 1,
  EDJE_TWEEN_MODE_SINUSOIDAL = 2,
  EDJE_TWEEN_MODE_ACCELERATE = 3,
  EDJE_TWEEN_MODE_DECELERATE = 4,
  EDJE_TWEEN_MODE_ACCELERATE_FACTOR = 5,
  EDJE_TWEEN_MODE_DECELERATE_FACTOR = 6,
  EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR = 7,
  EDJE_TWEEN_MODE_DIVISOR_INTERP = 8,
  EDJE_TWEEN_MODE_BOUNCE = 9,
  EDJE_TWEEN_MODE_SPRING = 10,
  EDJE_TWEEN_MODE_LAST = 11,
  EDJE_TWEEN_MODE_MASK = 0xff,
  EDJE_TWEEN_MODE_OPT_FROM_CURRENT = (1 << 31)
}
 
enum  _Edje_Action_Type {
  EDJE_ACTION_TYPE_NONE = 0,
  EDJE_ACTION_TYPE_STATE_SET = 1,
  EDJE_ACTION_TYPE_ACTION_STOP = 2,
  EDJE_ACTION_TYPE_SIGNAL_EMIT = 3,
  EDJE_ACTION_TYPE_DRAG_VAL_SET = 4,
  EDJE_ACTION_TYPE_DRAG_VAL_STEP = 5,
  EDJE_ACTION_TYPE_DRAG_VAL_PAGE = 6,
  EDJE_ACTION_TYPE_SCRIPT = 7,
  EDJE_ACTION_TYPE_FOCUS_SET = 8,
  EDJE_ACTION_TYPE_RESERVED00 = 9,
  EDJE_ACTION_TYPE_FOCUS_OBJECT = 10,
  EDJE_ACTION_TYPE_PARAM_COPY = 11,
  EDJE_ACTION_TYPE_PARAM_SET = 12,
  EDJE_ACTION_TYPE_SOUND_SAMPLE = 13,
  EDJE_ACTION_TYPE_SOUND_TONE = 14,
  EDJE_ACTION_TYPE_PHYSICS_IMPULSE = 15,
  EDJE_ACTION_TYPE_PHYSICS_TORQUE_IMPULSE = 16,
  EDJE_ACTION_TYPE_PHYSICS_FORCE = 17,
  EDJE_ACTION_TYPE_PHYSICS_TORQUE = 18,
  EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR = 19,
  EDJE_ACTION_TYPE_PHYSICS_VEL_SET = 20,
  EDJE_ACTION_TYPE_PHYSICS_ANG_VEL_SET = 21,
  EDJE_ACTION_TYPE_PHYSICS_STOP = 22,
  EDJE_ACTION_TYPE_PHYSICS_ROT_SET = 23,
  EDJE_ACTION_TYPE_LAST = 24
}
 

Functions

void edje_frametime_set (double t)
 Set edje trasitions' frame time. More...
 
double edje_frametime_get (void)
 Get edje trasitions' frame time. More...
 
void edje_freeze (void)
 Freeze Edje objects. More...
 
void edje_thaw (void)
 Thaw Edje objects. More...
 
#define edje_obj_play_set(play)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PLAY_SET), EO_TYPECHECK(Eina_Bool, play)
 Set the Edje object to playing or paused states. More...
 
#define edje_obj_play_get(ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PLAY_GET), EO_TYPECHECK(Eina_Bool *, ret)
 Get the Edje object's state. More...
 
#define edje_obj_animation_set(on)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_ANIMATION_SET), EO_TYPECHECK(Eina_Bool, on)
 Set the object's animation state. More...
 
#define edje_obj_animation_get(ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_ANIMATION_GET), EO_TYPECHECK(Eina_Bool *, ret)
 Get the Edje object's animation state. More...
 
#define edje_obj_freeze(ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_FREEZE), EO_TYPECHECK(int *, ret)
 Freezes the Edje object. More...
 
#define edje_obj_thaw(ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_THAW), EO_TYPECHECK(int *, ret)
 Thaws the Edje object. More...
 
#define edje_obj_part_state_get(part, val_ret, ret)   EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_STATE_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, val_ret), EO_TYPECHECK(const char **, ret)
 Returns the state of the Edje part. More...
 
void edje_object_play_set (Evas_Object *obj, Eina_Bool play)
 Set the Edje object to playing or paused states. More...
 
Eina_Bool edje_object_play_get (const Evas_Object *obj)
 Get the Edje object's state. More...
 
void edje_object_animation_set (Evas_Object *obj, Eina_Bool on)
 Set the object's animation state. More...
 
Eina_Bool edje_object_animation_get (const Evas_Object *obj)
 Get the Edje object's animation state. More...
 
int edje_object_freeze (Evas_Object *obj)
 Freezes the Edje object. More...
 
int edje_object_thaw (Evas_Object *obj)
 Thaws the Edje object. More...
 
const char * edje_object_part_state_get (const Evas_Object *obj, const char *part, double *val_ret)
 Returns the state of the Edje part. More...
 

Detailed Description

Functions that deal with animations.

Edje has the ability to animate objects. One can start, stop, play, pause, freeze and thaw edje animations using the functions of this section.

Macro Definition Documentation

#define edje_obj_play_set (   play)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PLAY_SET), EO_TYPECHECK(Eina_Bool, play)

Set the Edje object to playing or paused states.

Since
1.8
Parameters
[in]play
See also
edje_object_play_set

Referenced by edje_object_play_set().

#define edje_obj_play_get (   ret)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PLAY_GET), EO_TYPECHECK(Eina_Bool *, ret)

Get the Edje object's state.

Since
1.8
Parameters
[out]ret
See also
edje_object_play_get

Referenced by edje_object_play_get().

#define edje_obj_animation_set (   on)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_ANIMATION_SET), EO_TYPECHECK(Eina_Bool, on)

Set the object's animation state.

Since
1.8
Parameters
[in]on
See also
edje_object_animation_set

Referenced by edje_object_animation_set().

#define edje_obj_animation_get (   ret)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_ANIMATION_GET), EO_TYPECHECK(Eina_Bool *, ret)

Get the Edje object's animation state.

Since
1.8
Parameters
[out]ret
See also
edje_object_animation_get

Referenced by edje_object_animation_get().

#define edje_obj_freeze (   ret)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_FREEZE), EO_TYPECHECK(int *, ret)

Freezes the Edje object.

Since
1.8
Parameters
[out]ret
See also
edje_object_freeze

Referenced by edje_object_freeze().

#define edje_obj_thaw (   ret)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_THAW), EO_TYPECHECK(int *, ret)

Thaws the Edje object.

Since
1.8
Parameters
[out]ret
See also
edje_object_thaw

Referenced by edje_object_thaw().

#define edje_obj_part_state_get (   part,
  val_ret,
  ret 
)    EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_PART_STATE_GET), EO_TYPECHECK(const char *, part), EO_TYPECHECK(double *, val_ret), EO_TYPECHECK(const char **, ret)

Returns the state of the Edje part.

Since
1.8
Parameters
[in]part
[out]val_ret
[out]ret
See also
edje_object_part_state_get

Referenced by edje_object_part_state_get().

Enumeration Type Documentation

Enumerator
EDJE_ACTION_TYPE_SOUND_SAMPLE 
Since
1.1
EDJE_ACTION_TYPE_SOUND_TONE 
Since
1.1
EDJE_ACTION_TYPE_PHYSICS_IMPULSE 
Since
1.8
EDJE_ACTION_TYPE_PHYSICS_TORQUE_IMPULSE 
Since
1.8
EDJE_ACTION_TYPE_PHYSICS_FORCE 
Since
1.8
EDJE_ACTION_TYPE_PHYSICS_TORQUE 
Since
1.8
EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR 
Since
1.8
EDJE_ACTION_TYPE_PHYSICS_VEL_SET 
Since
1.8
EDJE_ACTION_TYPE_PHYSICS_ANG_VEL_SET 
Since
1.8
EDJE_ACTION_TYPE_PHYSICS_STOP 
Since
1.8
EDJE_ACTION_TYPE_PHYSICS_ROT_SET 
Since
1.8

Function Documentation

void edje_frametime_set ( double  t)

Set edje trasitions' frame time.

Parameters
tThe 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()
Examples:
edje-perspective.c.

References EAPI, and ecore_animator_frametime_set().

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() or the default value 1/30.

See also
edje_frametime_set()

References EAPI, ecore_animator_frametime_get(), edje_obj_signal_callback_add, edje_obj_signal_callback_del, edje_object_signal_callback_add(), edje_object_signal_callback_del(), EINA_FALSE, eina_stringshare_add(), eina_stringshare_del(), EINA_TRUE, and EINA_UNUSED.

void edje_freeze ( void  )

Freeze Edje objects.

This function freezes all Edje animations in the current process.

Note
: for freeze a specific object
See also
edje_object_freeze().
edje_thaw()

References EAPI, edje_object_freeze(), and EINA_LIST_FOREACH.

void edje_thaw ( void  )

Thaw Edje objects.

This function thaws all Edje animations in the current process.

Note
for thaw a specific object
See also
edje_object_thaw().
edje_freeze()

References EAPI, edje_object_thaw(), EINA_FALSE, EINA_LIST_FOREACH, and EINA_LIST_FREE.

void edje_object_play_set ( Evas_Object obj,
Eina_Bool  play 
)

Set the Edje object to playing or paused states.

Parameters
objA handle to an Edje object.
playObject state (EINA_TRUE to playing, EINA_FALSE to paused).

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 EAPI, ecore_time_get(), edje_obj_play_set, EINA_FALSE, EINA_LIST_FOREACH, EINA_TRUE, and EINA_UNUSED.

Eina_Bool edje_object_play_get ( const Evas_Object obj)

Get the Edje object's state.

Parameters
objA handle to an Edje object.
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().

References EAPI, edje_obj_play_get, EINA_FALSE, EINA_TRUE, and EINA_UNUSED.

void edje_object_animation_set ( Evas_Object obj,
Eina_Bool  on 
)

Set the object's animation state.

Parameters
objA handle to an Edje object.
onThe animation state. EINA_TRUE to starts or EINA_FALSE to stops.

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

See also
edje_object_animation_get()

References EAPI, edje_obj_animation_set, eina_list_append(), eina_list_data_get(), EINA_LIST_FOREACH, eina_list_free(), eina_list_remove(), evas_object_hide(), evas_object_show(), and evas_object_visible_get().

Eina_Bool edje_object_animation_get ( const Evas_Object obj)

Get the Edje object's animation state.

Parameters
objA handle to an Edje object.
Returns
EINA_FALSE on error or if object is not animated; EINA_TRUE if animated.

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

See also
edje_object_animation_set().

References _Eina_List::data, EAPI, ecore_animator_add(), ecore_loop_time_get(), ecore_timer_add(), ecore_timer_del(), EDJE_ACTION_TYPE_PHYSICS_ANG_VEL_SET, EDJE_ACTION_TYPE_PHYSICS_FORCE, EDJE_ACTION_TYPE_PHYSICS_FORCES_CLEAR, EDJE_ACTION_TYPE_PHYSICS_IMPULSE, EDJE_ACTION_TYPE_PHYSICS_ROT_SET, EDJE_ACTION_TYPE_PHYSICS_STOP, EDJE_ACTION_TYPE_PHYSICS_TORQUE, EDJE_ACTION_TYPE_PHYSICS_TORQUE_IMPULSE, EDJE_ACTION_TYPE_PHYSICS_VEL_SET, EDJE_ACTION_TYPE_SOUND_SAMPLE, EDJE_ACTION_TYPE_SOUND_TONE, edje_obj_animation_get, edje_object_message_send(), eina_cow_alloc(), eina_cow_free(), EINA_FALSE, eina_hash_add(), eina_hash_find(), eina_hash_string_superfast_new(), EINA_INARRAY_FOREACH, eina_list_append(), EINA_LIST_FOREACH, eina_list_free(), EINA_LIST_FREE, eina_list_remove(), EINA_TRUE, EINA_UNUSED, ephysics_body_angular_velocity_set(), ephysics_body_central_force_apply(), ephysics_body_central_impulse_apply(), ephysics_body_forces_clear(), ephysics_body_linear_velocity_set(), ephysics_body_rotation_set(), ephysics_body_stop(), ephysics_body_torque_apply(), ephysics_body_torque_impulse_apply(), ephysics_quaternion_normalize(), ephysics_quaternion_set(), evas_focus_get(), evas_object_evas_get(), evas_object_focus_set(), _Eina_List::next, and _EPhysics_Quaternion::x.

int edje_object_freeze ( Evas_Object obj)

Freezes the Edje object.

Parameters
objA handle to an Edje object.
Returns
The frozen state or 0 on Error

This function puts all changes on hold. Successive freezes will nest, requiring an equal number of thaws.

See also
edje_object_thaw()

References EAPI, and edje_obj_freeze.

Referenced by edje_freeze().

int edje_object_thaw ( Evas_Object obj)

Thaws the Edje object.

Parameters
objA handle to an Edje object.
Returns
The frozen state or 0 if the object is not frozen or on error.

This function thaws the given Edje object.

Note
: If sucessives freezes were done, an equal number of thaws will be required.
See also
edje_object_freeze()

References EAPI, and edje_obj_thaw.

Referenced by edje_thaw().

const char* edje_object_part_state_get ( const Evas_Object obj,
const char *  part,
double *  val_ret 
)

Returns the state of the Edje part.

Parameters
objA valid Evas_Object handle
partThe part name
val_ret
Returns
The part state:
"default" for the default state
"" for other states

References EAPI, and edje_obj_part_state_get.