Transit
Elementary

Transit is designed to apply various animated transition effects to `Evas_Object`, such like translation, rotation, etc. More...

## Typedefs

typedef struct _Elm_Transit | Elm_Transit
| The Transit created with elm_transit_add().
typedef void | Elm_Transit_Effect
typedef void(* | Elm_Transit_Effect_Transition_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit, double progress)
| Transition callback called for this effect on each transition iteration.
typedef void(* | Elm_Transit_Effect_End_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit)
| Elm_Transit_Effect_End_Cb.
typedef void(* | Elm_Transit_Del_Cb) (void *data, Elm_Transit *transit)
| Elm_Transit_Del_Cb.

## Enumerations

enum | Elm_Transit_Tween_Mode { ELM_TRANSIT_TWEEN_MODE_LINEAR , ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL , ELM_TRANSIT_TWEEN_MODE_DECELERATE , ELM_TRANSIT_TWEEN_MODE_ACCELERATE , ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP , ELM_TRANSIT_TWEEN_MODE_BOUNCE , ELM_TRANSIT_TWEEN_MODE_SPRING , ELM_TRANSIT_TWEEN_MODE_BEZIER_CURVE }
| The type of acceleration used in the transition. More...
enum | Elm_Transit_Effect_Flip_Axis { ELM_TRANSIT_EFFECT_FLIP_AXIS_X , ELM_TRANSIT_EFFECT_FLIP_AXIS_Y }
| The axis along which flip effect should be applied. More...
enum | Elm_Transit_Effect_Wipe_Dir { ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT , ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT , ELM_TRANSIT_EFFECT_WIPE_DIR_UP , ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN }
| The direction in which the wipe effect should occur. More...
enum | Elm_Transit_Effect_Wipe_Type { ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE , ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW }
| Whether the wipe effect should show or hide the object. More...

## Functions

Elm_Transit * | elm_transit_add (void)
| Create new transit.
void | elm_transit_del (Elm_Transit *transit)
| Stops the animation and delete the `transit` object.
void | elm_transit_effect_add (Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect, Elm_Transit_Effect_End_Cb end_cb)
| Add a new effect to the transit.
void | elm_transit_effect_del (Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect)
| Delete an added effect.
void | elm_transit_object_add (Elm_Transit *transit, Evas_Object *obj)
| Add new object to apply the effects.
void | elm_transit_object_remove (Elm_Transit *transit, Evas_Object *obj)
| Removes an added object from the transit.
const Eina_List * | elm_transit_objects_get (const Elm_Transit *transit)
| Get the objects of the transit.
void | elm_transit_objects_final_state_keep_set (Elm_Transit *transit, Eina_Bool state_keep)
| Enable/disable keeping up the objects states.
Eina_Bool | elm_transit_objects_final_state_keep_get (const Elm_Transit *transit)
| Get a value whether the objects states will be reset or not.
void | elm_transit_event_enabled_set (Elm_Transit *transit, Eina_Bool enabled)
| Set the event enabled when transit is operating.
Eina_Bool | elm_transit_event_enabled_get (const Elm_Transit *transit)
| Get the value of event enabled status.
void | elm_transit_del_cb_set (Elm_Transit *transit, Elm_Transit_Del_Cb cb, void *data)
| Set the user-callback function when the transit is deleted.
void | elm_transit_auto_reverse_set (Elm_Transit *transit, Eina_Bool reverse)
| Set reverse effect automatically.
Eina_Bool | elm_transit_auto_reverse_get (const Elm_Transit *transit)
| Get if the auto reverse is on.
void | elm_transit_repeat_times_set (Elm_Transit *transit, int repeat)
| Set the transit repeat count.
int | elm_transit_repeat_times_get (const Elm_Transit *transit)
| Get the transit repeat count.
int | elm_transit_current_repeat_times_get (const Elm_Transit *transit)
| Get current transit repeated count.
void | elm_transit_tween_mode_set (Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode)
| Set the transit animation acceleration type.
Elm_Transit_Tween_Mode | elm_transit_tween_mode_get (const Elm_Transit *transit)
| Get the transit animation acceleration type.
void | elm_transit_tween_mode_factor_set (Elm_Transit *transit, double v1, double v2)
| Set the transit animation acceleration factor.
void | elm_transit_tween_mode_factor_get (const Elm_Transit *transit, double *v1, double *v2)
| Get the transit animation acceleration factor.
void | elm_transit_tween_mode_factor_n_set (Elm_Transit *transit, unsigned int v_size, double *v)
| Set the transit animation acceleration factor.
void | elm_transit_duration_set (Elm_Transit *transit, double duration)
| Set the transit animation time.
double | elm_transit_duration_get (const Elm_Transit *transit)
| Get the transit animation time.
void | elm_transit_go (Elm_Transit *transit)
| Starts the transition.
Eina_Bool | elm_transit_revert (Elm_Transit *transit)
| This API can be used to reverse play an ongoing transition.
void | elm_transit_go_in (Elm_Transit *transit, double in)
| Starts the transition in given seconds.
void | elm_transit_paused_set (Elm_Transit *transit, Eina_Bool paused)
| Pause/Resume the transition.
Eina_Bool | elm_transit_paused_get (const Elm_Transit *transit)
| Get the value of paused status.
double | elm_transit_progress_value_get (const Elm_Transit *transit)
| Get the time progression of the animation (a double value between 0.0 and 1.0).
void | elm_transit_progress_value_set (Elm_Transit *transit, double progress)
| Set current time progression of the animation.
void | elm_transit_chain_transit_add (Elm_Transit *transit, Elm_Transit *chain_transit)
| Makes the chain relationship between two transits.
void | elm_transit_chain_transit_del (Elm_Transit *transit, Elm_Transit *chain_transit)
| Cut off the chain relationship between two transits.
Eina_List * | elm_transit_chain_transits_get (const Elm_Transit *transit)
| Get the current chain transit list.
void | elm_transit_smooth_set (Elm_Transit *transit, Eina_Bool enabled)
| Set the smooth effect for a transit.
Eina_Bool | elm_transit_smooth_get (const Elm_Transit *transit)
| Get the smooth scaling for transit map rendering.
Elm_Transit_Effect * | elm_transit_effect_resizing_add (Elm_Transit *transit, Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h)
| Add the Resizing Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_translation_add (Elm_Transit *transit, Evas_Coord from_dx, Evas_Coord from_dy, Evas_Coord to_dx, Evas_Coord to_dy)
| Add the Translation Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_zoom_add (Elm_Transit *transit, float from_rate, float to_rate)
| Add the Zoom Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_flip_add (Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw)
| Add the Flip Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_resizable_flip_add (Elm_Transit *transit, Elm_Transit_Effect_Flip_Axis axis, Eina_Bool cw)
| Add the Resizeable Flip Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_wipe_add (Elm_Transit *transit, Elm_Transit_Effect_Wipe_Type type, Elm_Transit_Effect_Wipe_Dir dir)
| Add the Wipe Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_color_add (Elm_Transit *transit, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a)
| Add the Color Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_fade_add (Elm_Transit *transit)
| Add the Fade Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_blend_add (Elm_Transit *transit)
| Add the Blend Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_rotation_add (Elm_Transit *transit, float from_degree, float to_degree)
| Add the Rotation Effect to Elm_Transit.
Elm_Transit_Effect * | elm_transit_effect_image_animation_add (Elm_Transit *transit, Eina_List *images)
| Add the ImageAnimation Effect to Elm_Transit.

## Detailed Description

Transit is designed to apply various animated transition effects to `Evas_Object`, such like translation, rotation, etc.

For using these effects, create an Transit and add the desired transition effects.

Once the effects are added into transit, they will be automatically managed (their callback will be called for the set duration and they will be deleted upon completion).

Example:

Elm_Transit *trans = elm_transit_add();
elm_transit_object_add(trans, obj);
elm_transit_effect_translation_add(trans, 0, 0, 280, 280
elm_transit_duration_set(transit, 1);
elm_transit_auto_reverse_set(transit, EINA_TRUE);
elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
elm_transit_repeat_times_set(transit, 3);
EINA_TRUE
#define EINA_TRUE
boolean value TRUE (numerical value 1)
Definition eina_types.h:539
elm_transit_tween_mode_set
void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode)
Set the transit animation acceleration type.
Definition elm_transit.c:780
elm_transit_effect_translation_add
Elm_Transit_Effect * elm_transit_effect_translation_add(Elm_Transit *transit, Evas_Coord from_dx, Evas_Coord from_dy, Evas_Coord to_dx, Evas_Coord to_dy)
Add the Translation Effect to Elm_Transit.
Definition elm_transit.c:1240
Elm_Transit
struct _Elm_Transit Elm_Transit
The Transit created with elm_transit_add().
Definition elm_transit.h:130
elm_transit_auto_reverse_set
void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse)
Set reverse effect automatically.
Definition elm_transit.c:744
elm_transit_duration_set
void elm_transit_duration_set(Elm_Transit *transit, double duration)
Set the transit animation time.
Definition elm_transit.c:820
elm_transit_add
Elm_Transit * elm_transit_add(void)
Create new transit.
Definition elm_transit.c:566
elm_transit_object_add
void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj)
Add new object to apply the effects.
Definition elm_transit.c:653
elm_transit_repeat_times_set
void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat)
Set the transit repeat count.
Definition elm_transit.c:758
ELM_TRANSIT_TWEEN_MODE_DECELERATE
@ ELM_TRANSIT_TWEEN_MODE_DECELERATE
Starts fast and decrease speed over time, v1 being a power factor.
Definition elm_transit.h:68

Some transition effects are used to change the properties of objects. They are:

- elm_transit_effect_translation_add
- elm_transit_effect_color_add
- elm_transit_effect_rotation_add
- elm_transit_effect_wipe_add
- elm_transit_effect_zoom_add
- elm_transit_effect_resizing_add

Other transition effects are used to make one object disappear and another object appear on its place. These effects are:

- elm_transit_effect_flip_add
- elm_transit_effect_resizable_flip_add
- elm_transit_effect_fade_add
- elm_transit_effect_blend_add

It's also possible to make a transition chain with elm_transit_chain_transit_add.

Warning
  We strongly recommend to use elm_transit just when edje can not do the trick. Edje is better at handling transitions than Elm_Transit. Edje has more flexibility and animations can be manipulated inside the theme.

List of examples:

- elm_transit - Basic transit usage.
- elm_transit - Chained transitions.
- elm_transit - Combined effects and options.
- elm_transit - Combined effects over two objects.

## Typedef Documentation

## Elm_Transit

typedef struct _Elm_Transit Elm_Transit

The Transit created with elm_transit_add().

This type has the information about the objects which the transition will be applied, and the transition effects that will be used. It also contains info about duration, number of repetitions, auto-reverse, etc.

Examples
  transit_example_01.c, transit_example_02.c, transit_example_03.c, and transit_example_04.c.

## Elm_Transit_Effect_End_Cb

typedef void(* Elm_Transit_Effect_End_Cb) (Elm_Transit_Effect *effect, Elm_Transit *transit)

Elm_Transit_Effect_End_Cb.

Transition callback called for this effect when the transition is over.

## Elm_Transit_Del_Cb

typedef void(* Elm_Transit_Del_Cb) (void *data, Elm_Transit *transit)

Elm_Transit_Del_Cb.

A callback called when the transit is deleted.

## Enumeration Type Documentation

## Elm_Transit_Tween_Mode

enum Elm_Transit_Tween_Mode

The type of acceleration used in the transition.

Enumerator
ELM_TRANSIT_TWEEN_MODE_LINEAR | Constant speed.
ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL | Starts slow, increase speed over time, then decrease again and stop slowly, v1 being a power factor.
ELM_TRANSIT_TWEEN_MODE_DECELERATE | Starts fast and decrease speed over time, v1 being a power factor.
ELM_TRANSIT_TWEEN_MODE_ACCELERATE | Starts slow and increase speed over time, v1 being a power factor.
ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP | Start at gradient v1, interpolated via power of v2 curve.
ELM_TRANSIT_TWEEN_MODE_BOUNCE | Start at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1.
ELM_TRANSIT_TWEEN_MODE_SPRING | Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1.

ELM_TRANSIT_TWEEN_MODE_BEZIER_CURVE

Since
  1.13 Follow the cubic-bezier curve calculated with the control points (x1, y1), (x2, y2)

Examples
  transit_example_03.c.

## Elm_Transit_Effect_Flip_Axis

enum Elm_Transit_Effect_Flip_Axis

The axis along which flip effect should be applied.

Enumerator
ELM_TRANSIT_EFFECT_FLIP_AXIS_X | Flip on X axis.
ELM_TRANSIT_EFFECT_FLIP_AXIS_Y | Flip on Y axis.

## Elm_Transit_Effect_Wipe_Dir

enum Elm_Transit_Effect_Wipe_Dir

The direction in which the wipe effect should occur.

Enumerator
ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT | Wipe to the left.
ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT | Wipe to the right.
ELM_TRANSIT_EFFECT_WIPE_DIR_UP | Wipe up.
ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN | Wipe down.

## Elm_Transit_Effect_Wipe_Type

enum Elm_Transit_Effect_Wipe_Type

Whether the wipe effect should show or hide the object.

Enumerator
ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE | Hide the object during the animation.
ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW | Show the object during the animation.

## Function Documentation

## elm_transit_add()

Elm_Transit * elm_transit_add | ( | void |  | ) |

Create new transit.

Note
  It is not necessary to delete the transit object, it will be deleted at the end of its operation.
  The transit will start playing when the program enters the main loop.

Returns
  The transit object.

References EINA_MAGIC_SET, EINA_TRUE, ELM_TRANSIT_TWEEN_MODE_LINEAR, elm_transit_tween_mode_set(), and ERR.

## elm_transit_del()

void elm_transit_del | ( | Elm_Transit * | transit | ) |

Stops the animation and delete the `transit` object.

Call this function if you want to stop the animation before the transit time. Make sure the `transit` object is still alive with elm_transit_del_cb_set() function. All added effects will be deleted, calling its respective data_free_cb functions. The function set by elm_transit_del_cb_set() will be called.

See also
  elm_transit_del_cb_set()

Parameters

  transit | The transit object to be deleted.

References EINA_TRUE.

Referenced by elm_transit_effect_del(), and elm_transit_object_remove().

## elm_transit_effect_add()

void elm_transit_effect_add | ( | Elm_Transit * | transit,
|  | Elm_Transit_Effect_Transition_Cb | transition_cb,
|  | Elm_Transit_Effect * | effect,
|  | Elm_Transit_Effect_End_Cb | end_cb )

Add a new effect to the transit.

Note
  The cb function and the data are the key to the effect. If you try to add an existing effect, nothing is done.
  After the first addition of an effect to `transit`, if its effect list become empty again, the `transit` will be killed by elm_transit_del(transit) function.

Example:

Elm_Transit *transit = elm_transit_add();
elm_transit_effect_add(transit,
elm_transit_effect_blend_op,
elm_transit_effect_blend_context_new(),
elm_transit_effect_blend_context_free);
elm_transit_effect_add
void elm_transit_effect_add(Elm_Transit *transit, Elm_Transit_Effect_Transition_Cb transition_cb, Elm_Transit_Effect *effect, Elm_Transit_Effect_End_Cb end_cb)
Add a new effect to the transit.
Definition elm_transit.c:599

Parameters

  transit | The transit object.
  transition_cb | The operation function. It is called when the animation begins, it is the function that actually performs the animation. It is called with the `data`, `transit` and the time progression of the animation (a double value between 0.0 and 1.0).
  effect | The context data of the effect.
  end_cb | The function to free the context data, it will be called at the end of the effect, it must finalize the animation and free the `data`.

Warning
  The transit will free the context data at the and of the transition with the data_free_cb function. Do not share the context data in between different transit objects.

References eina_inlist_append(), EINA_INLIST_FOREACH, EINA_SAFETY_ON_NULL_RETURN, ERR, and WRN.

Referenced by elm_transit_effect_blend_add(), elm_transit_effect_color_add(), elm_transit_effect_fade_add(), elm_transit_effect_flip_add(), elm_transit_effect_image_animation_add(), elm_transit_effect_resizable_flip_add(), elm_transit_effect_resizing_add(), elm_transit_effect_rotation_add(), elm_transit_effect_translation_add(), elm_transit_effect_wipe_add(), and elm_transit_effect_zoom_add().

## elm_transit_effect_del()

void elm_transit_effect_del | ( | Elm_Transit * | transit,
|  | Elm_Transit_Effect_Transition_Cb | transition_cb,
|  | Elm_Transit_Effect * | effect )

Delete an added effect.

This function will remove the effect from the `transit`, calling the data_free_cb to free the `data`.

See also
  elm_transit_effect_add()

Note
  If the effect is not found, nothing is done.
  If the effect list become empty, this function will call elm_transit_del(transit), i.e., it will kill the `transit`.

Parameters

  transit | The transit object.
  transition_cb | The operation function.
  effect | The context data of the effect.

References EINA_INLIST_FOREACH, EINA_SAFETY_ON_NULL_RETURN, EINA_TRUE, and elm_transit_del().

## elm_transit_object_add()

void elm_transit_object_add | ( | Elm_Transit * | transit,
|  | Evas_Object * | obj )

Add new object to apply the effects.

Note
  After the first addition of an object to `transit`, if its object list become empty again, the `transit` will be killed by elm_transit_del(transit) function.
  If the `obj` belongs to another transit, the `obj` will be removed from it and it will only belong to the other `transit`. If the old transit stays without objects, it will die.
  When you add an object into the `transit`, its state from evas_object_pass_events_get(obj) is saved, and it is applied when the transit ends, if you change this state with evas_object_pass_events_set() after add the object, this state will change again when `transit` stops.

Parameters

  transit | The transit object.
  obj | Object to be animated.

Warning
  It is not allowed to add a new object after transit begins.

References eina_list_append(), eina_list_data_find_list(), EINA_SAFETY_ON_NULL_RETURN, EINA_TRUE, evas_object_freeze_events_set(), and WRN.

## elm_transit_object_remove()

void elm_transit_object_remove | ( | Elm_Transit * | transit,
|  | Evas_Object * | obj )

Removes an added object from the transit.

Note
  If the `obj` is not in the `transit`, nothing is done.
  If the list become empty, this function will call elm_transit_del(transit), i.e., it will kill the `transit`.

Parameters

  transit | The transit object.
  obj | Object to be removed from `transit`.

Warning
  It is not allowed to remove objects after transit begins.

References EINA_SAFETY_ON_NULL_RETURN, and elm_transit_del().

## elm_transit_objects_get()

const Eina_List * elm_transit_objects_get | ( | const Elm_Transit * | transit | ) |

Get the objects of the transit.

Parameters

  transit | The transit object.

Returns
  a Eina_List with the objects from the transit.

## elm_transit_objects_final_state_keep_set()

void elm_transit_objects_final_state_keep_set | ( | Elm_Transit * | transit,
|  | Eina_Bool | state_keep )

Enable/disable keeping up the objects states.

If it is not kept, the objects states will be reset when transition ends.

Note
  `transit` can not be NULL.
  One state includes geometry, color, map data.

Parameters

  transit | The transit object.
  state_keep | retain the state or not.

References WRN.

## elm_transit_objects_final_state_keep_get()

Eina_Bool elm_transit_objects_final_state_keep_get | ( | const Elm_Transit * | transit | ) |

Get a value whether the objects states will be reset or not.

Note
  `transit` can not be NULL

See also
  elm_transit_objects_final_state_keep_set()

Parameters

  transit | The transit object.

Returns
  `EINA_TRUE` means the states of the objects will be reset. If `transit` is NULL, `EINA_FALSE` is returned

References EINA_FALSE.

## elm_transit_event_enabled_set()

void elm_transit_event_enabled_set | ( | Elm_Transit * | transit,
|  | Eina_Bool | enabled )

Set the event enabled when transit is operating.

If `enabled` is `EINA_TRUE`, the objects of the transit will receive events from mouse and keyboard during the animation.

Note
  When you add an object with elm_transit_object_add(), its state from evas_object_freeze_events_get(obj) is saved, and it is applied when the transit ends. If you change this state with evas_object_freeze_events_set() after adding the object, this state will change again when `transit` stops to run.

Parameters

  transit | The transit object.
  enabled | Events are received when enabled is `EINA_TRUE`, and ignored otherwise.

References EINA_LIST_FOREACH, and evas_object_freeze_events_set().

## elm_transit_event_enabled_get()

Eina_Bool elm_transit_event_enabled_get | ( | const Elm_Transit * | transit | ) |

Get the value of event enabled status.

See also
  elm_transit_event_enabled_set()

Parameters

  transit | The Transit object

Returns
  `EINA_TRUE`, when event is enabled. If `transit` is NULL `EINA_FALSE` is returned

References EINA_FALSE.

## elm_transit_del_cb_set()

void elm_transit_del_cb_set | ( | Elm_Transit * | transit,
|  | Elm_Transit_Del_Cb | cb,
|  | void * | data )

Set the user-callback function when the transit is deleted.

Note
  Using this function twice will overwrite the first function set.
  the `transit` object will be deleted after call `cb` function.

Parameters

  transit | The transit object.
  cb | Callback function pointer. This function will be called before the deletion of the transit.
  data | Callback function user data. It is the `op` parameter.

## elm_transit_auto_reverse_set()

void elm_transit_auto_reverse_set | ( | Elm_Transit * | transit,
|  | Eina_Bool | reverse )

Set reverse effect automatically.

If auto reverse is set, after running the effects with the progress parameter from 0 to 1, it will call the effects again with the progress from 1 to 0. The transit will last for a time equal to (2 * duration * repeat), where the duration was set with the function elm_transit_add and the repeat with the function elm_transit_repeat_times_set().

Parameters

  transit | The transit object.
  reverse | `EINA_TRUE` means the auto_reverse is on.

## elm_transit_auto_reverse_get()

Eina_Bool elm_transit_auto_reverse_get | ( | const Elm_Transit * | transit | ) |

Get if the auto reverse is on.

See also
  elm_transit_auto_reverse_set()

Parameters

  transit | The transit object.

Returns
  `EINA_TRUE` means auto reverse is on. If `transit` is NULL `EINA_FALSE` is returned

References EINA_FALSE.

## elm_transit_repeat_times_set()

void elm_transit_repeat_times_set | ( | Elm_Transit * | transit,
|  | int | repeat )

Set the transit repeat count.

Effect will be repeated by repeat count.

This function sets the number of repetition the transit will run after the first one, i.e., if `repeat` is 1, the transit will run 2 times. If the `repeat` is a negative number, it will repeat infinite times.

Note
  If this function is called during the transit execution, the transit will run `repeat` times, ignoring the times it already performed.

Parameters

  transit | The transit object
  repeat | Repeat count

## elm_transit_repeat_times_get()

int elm_transit_repeat_times_get | ( | const Elm_Transit * | transit | ) |

Get the transit repeat count.

See also
  elm_transit_repeat_times_set()

Parameters

  transit | The Transit object.

Returns
  The repeat count. If `transit` is NULL 0 is returned

## elm_transit_current_repeat_times_get()

int elm_transit_current_repeat_times_get | ( | const Elm_Transit * | transit | ) |

Get current transit repeated count.

See also
  elm_transit_repeat_times_set()

Parameters

  transit | The Transit object.

Returns
  Current repeated count. If `transit` is NULL 0 is returned

Warning
  Return value is only valid when repeat times is set.

Since
  1.22

## elm_transit_tween_mode_set()

void elm_transit_tween_mode_set | ( | Elm_Transit * | transit,
|  | Elm_Transit_Tween_Mode | tween_mode )

Set the transit animation acceleration type.

This function sets the tween mode of the transit that can be: ELM_TRANSIT_TWEEN_MODE_LINEAR - The default mode. ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts in accelerate mode and ends decelerating with factor. ELM_TRANSIT_TWEEN_MODE_DECELERATE - The animation will be slowed over time with factor. ELM_TRANSIT_TWEEN_MODE_ACCELERATE - The animation will accelerate over time with factor. ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP - Start at gradient v1, interpolated via power of v2 curve. ELM_TRANSIT_TWEEN_MODE_BOUNCE - Start at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1. ELM_TRANSIT_TWEEN_MODE_SPRING - Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1.

Parameters

  transit | The transit object.
  tween_mode | The tween type.

Referenced by elm_transit_add().

## elm_transit_tween_mode_get()

Elm_Transit_Tween_Mode elm_transit_tween_mode_get | ( | const Elm_Transit * | transit | ) |

Get the transit animation acceleration type.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.

Returns
  The tween type. If `transit` is NULL ELM_TRANSIT_TWEEN_MODE_LINEAR is returned.

References ELM_TRANSIT_TWEEN_MODE_LINEAR.

## elm_transit_tween_mode_factor_set()

void elm_transit_tween_mode_factor_set | ( | Elm_Transit * | transit,
|  | double | v1,
|  | double | v2 )

Set the transit animation acceleration factor.

This function sets the tween mode factor of the transit that can be: If you use the below tween modes, you have to set the factor using this API. ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Start slow, speed up then slow down at end, v1 being a power factor, 0.0 being linear, 1.0 being ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL default, 2.0 being much more pronounced sinusoidal(squared), 3.0 being cubed, etc. ELM_TRANSIT_TWEEN_MODE_DECELERATE - Start fast then slow down, v1 being a power factor, 0.0 being linear, 1.0 being ELM_TRANSIT_TWEEN_MODE_DECELERATE default, 2.0 being much more pronounced decelerate (squared), 3.0 being cubed, etc. ELM_TRANSIT_TWEEN_MODE_ACCELERATE - Start slow then speed up, v1 being a power factor, 0.0 being linear, 1.0 being ELM_TRANSIT_TWEEN_MODE_ACCELERATE default, 2.0 being much more pronounced accelerate (squared), 3.0 being cubed, etc. ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP - Start at gradient * v1, interpolated via power of v2 curve ELM_TRANSIT_TWEEN_MODE_BOUNCE - Start at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1 ELM_TRANSIT_TWEEN_MODE_SPRING - Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1

Parameters

  transit | The transit object.
  v1 | A parameter use by the mapping (default is 1.0)
  v2 | A parameter use by the mapping (default is 0.0)

See also
  elm_transit_tween_mode_factor_get()

## elm_transit_tween_mode_factor_get()

void elm_transit_tween_mode_factor_get | ( | const Elm_Transit * | transit,
|  | double * | v1,
|  | double * | v2 )

Get the transit animation acceleration factor.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.
  v1 | Pointer to an double in which to store the factor value.
  v2 | Pointer to an double in which to store the factor value2.

See also
  elm_transit_tween_mode_factor_set()

## elm_transit_tween_mode_factor_n_set()

void elm_transit_tween_mode_factor_n_set | ( | Elm_Transit * | transit,
|  | unsigned int | v_size,
|  | double * | v )

Set the transit animation acceleration factor.

This function sets the tween mode factor of the transit that can be: If you use the below tween modes, you have to set the factor using this API. ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Start slow, speed up then slow down at end, v[0] being a power factor, 0.0 being linear, 1.0 being ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL default, 2.0 being much more pronounced sinusoidal(squared), 3.0 being cubed, etc. ELM_TRANSIT_TWEEN_MODE_DECELERATE - Start fast then slow down, v[0] being a power factor, 0.0 being linear, 1.0 being ELM_TRANSIT_TWEEN_MODE_DECELERATE default, 2.0 being much more pronounced decelerate (squared), 3.0 being cubed, etc. ELM_TRANSIT_TWEEN_MODE_ACCELERATE - Start slow then speed up, v[0] being a power factor, 0.0 being linear, 1.0 being ELM_TRANSIT_TWEEN_MODE_ACCELERATE default, 2.0 being much more pronounced accelerate (squared), 3.0 being cubed, etc. ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP - Start at gradient v[0], interpolated via power of v[1] curve ELM_TRANSIT_TWEEN_MODE_BOUNCE - Start at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v[1] times, with decay factor of v[0] ELM_TRANSIT_TWEEN_MODE_SPRING - Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v[1] times, with decay factor of v[0] ELM_TRANSIT_TWEEN_MODE_BEZIER_CURVE - Use an interpolated cubic-bezier curve adjusted with parameters from v[0] to v[3]

Parameters

  transit | The transit object.
  v_size | The size of the array pointing to v
  v | The address of an array with the double parameters to be used by the mapping.

See also
  elm_transit_tween_mode_factor_set()

Since
  1.13

## elm_transit_duration_set()

void elm_transit_duration_set | ( | Elm_Transit * | transit,
|  | double | duration )

Set the transit animation time.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.
  duration | The animation time.

## elm_transit_duration_get()

double elm_transit_duration_get | ( | const Elm_Transit * | transit | ) |

Get the transit animation time.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.

Returns
  The transit animation time.

## elm_transit_go()

void elm_transit_go | ( | Elm_Transit * | transit | ) |

Starts the transition.

Once this API is called, the transit begins to measure the time.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.

References ecore_animator_add(), ecore_animator_del(), ecore_evas_ecore_evas_get(), ecore_loop_time_get(), ecore_timer_del(), EINA_FALSE, EINA_LIST_FOREACH, EINA_TRUE, evas_object_evas_get(), and evas_object_freeze_events_set().

## elm_transit_revert()

Eina_Bool elm_transit_revert | ( | Elm_Transit * | transit | ) |

This API can be used to reverse play an ongoing transition.

It shows effect only when an animation is going on. If this API is called twice transition will go in forward direction as normal one. If a repeat count is set, this API call will revert just the ongoing cycle and once it is reverted back completely, the transition will go in forward direction. If an autoreverse is set for the transition and this API is called in the midst of the transition the ongoing transition will be reverted and once it is done, the transition will begin again and complete a full auto reverse cycle.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.

Returns
  `EINA_TRUE` if transition is reverted, `EINA_FALSE` otherwise.

Since
  1.18

References EINA_FALSE, and EINA_TRUE.

## elm_transit_go_in()

void elm_transit_go_in | ( | Elm_Transit * | transit,
|  | double | in )

Starts the transition in given seconds.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.
  in | The interval value in seconds

Since
  1.14

References ecore_timer_add(), and ecore_timer_del().

## elm_transit_paused_set()

void elm_transit_paused_set | ( | Elm_Transit * | transit,
|  | Eina_Bool | paused )

Pause/Resume the transition.

If you call elm_transit_go again, the transit will be started from the beginning, and will be played.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.
  paused | Whether the transition should be paused or not.

References ecore_animator_freeze(), ecore_animator_thaw(), ecore_loop_time_get(), and EINA_DBL_EQ.

## elm_transit_paused_get()

Eina_Bool elm_transit_paused_get | ( | const Elm_Transit * | transit | ) |

Get the value of paused status.

See also
  elm_transit_paused_set()

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.

Returns
  `EINA_TRUE` means transition is paused. If `transit` is NULL `EINA_FALSE` is returned

References EINA_DBL_EQ, EINA_FALSE, and EINA_TRUE.

## elm_transit_progress_value_get()

double elm_transit_progress_value_get | ( | const Elm_Transit * | transit | ) |

Get the time progression of the animation (a double value between 0.0 and 1.0).

The value returned is a fraction (current time / total time). It represents the progression position relative to the total.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.

Returns
  The time progression value. If `transit` is NULL 0 is returned

## elm_transit_progress_value_set()

void elm_transit_progress_value_set | ( | Elm_Transit * | transit,
|  | double | progress )

Set current time progression of the animation.

Intervene current progress instantly when it requires to jump onto a specific frame position.

Note
  `transit` can not be NULL

Parameters

  transit | The transit object.
  progress | The time progression value. The value must be in range of (0.0 ~ 1.0).

See also
  elm_transit_progress_value_get()

Since
  1.22

## elm_transit_chain_transit_add()

void elm_transit_chain_transit_add | ( | Elm_Transit * | transit,
|  | Elm_Transit * | chain_transit )

Makes the chain relationship between two transits.

Note
  `transit` can not be NULL. Transit would have multiple chain transits.
  `chain_transit` can not be NULL. Chain transits could be chained to the only one transit.

Parameters

  transit | The transit object.
  chain_transit | The chain transit object. This transit will be operated after transit is done.

This function adds `chain_transit` transition to a chain after the `transit`, and will be started as soon as `transit` ends. See elm_transit - Chained transitions. for a full example.

References eina_list_append(), eina_list_remove(), and WRN.

## elm_transit_chain_transit_del()

void elm_transit_chain_transit_del | ( | Elm_Transit * | transit,
|  | Elm_Transit * | chain_transit )

Cut off the chain relationship between two transits.

Note
  `transit` can not be NULL. Transit would have the chain relationship with `chain` transit.
  `chain_transit` can not be NULL. Chain transits should be chained to the `transit`.

Parameters

  transit | The transit object.
  chain_transit | The chain transit object.

This function remove the `chain_transit` transition from the `transit`.

References eina_list_remove(), and WRN.

## elm_transit_chain_transits_get()

Eina_List * elm_transit_chain_transits_get | ( | const Elm_Transit * | transit | ) |

Get the current chain transit list.

Note
  `transit` can not be NULL.

Parameters

  transit | The transit object.

Returns
  chain transit list.

## elm_transit_smooth_set()

void elm_transit_smooth_set | ( | Elm_Transit * | transit,
|  | Eina_Bool | enabled )

Set the smooth effect for a transit.

Parameters

  transit | The transit object
  enabled | enable or disable smooth map rendering

This sets smoothing for transit map rendering. If the object added in a transit is a type that has its own smoothing settings, then both the smooth settings for this object and the map must be turned off. By default smooth maps are enabled.

See also
  evas_map_smooth_set()

Since
  1.8

## elm_transit_smooth_get()

Eina_Bool elm_transit_smooth_get | ( | const Elm_Transit * | transit | ) |

Get the smooth scaling for transit map rendering.

This gets smooth scaling for transit map rendering.

Parameters

  transit | The transit object

Returns
  `EINA_TRUE` if the smooth is enabled, `EINA_FALSE` otherwise.

See also
  elm_transit_smooth_set()

Since
  1.8

References EINA_FALSE.

## elm_transit_effect_resizing_add()

Elm_Transit_Effect * elm_transit_effect_resizing_add | ( | Elm_Transit * | transit,
|  | Evas_Coord | from_w,
|  | Evas_Coord | from_h,
|  | Evas_Coord | to_w,
|  | Evas_Coord | to_h )

Add the Resizing Effect to Elm_Transit.

Note
  This API is one of the facades. It creates resizing effect context and add it's required APIs to elm_transit_effect_add.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  from_w | Object width size when effect begins.
  from_h | Object height size when effect begins.
  to_w | Object width size when effect ends.
  to_h | Object height size when effect ends.

Returns
  Resizing effect context data.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_translation_add()

Elm_Transit_Effect * elm_transit_effect_translation_add | ( | Elm_Transit * | transit,
|  | Evas_Coord | from_dx,
|  | Evas_Coord | from_dy,
|  | Evas_Coord | to_dx,
|  | Evas_Coord | to_dy )

Add the Translation Effect to Elm_Transit.

Note
  This API is one of the facades. It creates translation effect context and add it's required APIs to elm_transit_effect_add.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  from_dx | X Position variation when effect begins.
  from_dy | Y Position variation when effect begins.
  to_dx | X Position variation when effect ends.
  to_dy | Y Position variation when effect ends.

Returns
  Translation effect context data.

Warning
  It is highly recommended just create a transit with this effect when the window that the objects of the transit belongs has already been created. This is because this effect needs the geometry information about the objects, and if the window was not created yet, it can get a wrong information.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_zoom_add()

Elm_Transit_Effect * elm_transit_effect_zoom_add | ( | Elm_Transit * | transit,
|  | float | from_rate,
|  | float | to_rate )

Add the Zoom Effect to Elm_Transit.

Note
  This API is one of the facades. It creates zoom effect context and add it's required APIs to elm_transit_effect_add.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  from_rate | Scale rate when effect begins (1 is current rate).
  to_rate | Scale rate when effect ends.

Returns
  Zoom effect context data.

Warning
  It is highly recommended just create a transit with this effect when the window that the objects of the transit belongs has already been created. This is because this effect needs the geometry information about the objects, and if the window was not created yet, it can get a wrong information.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_flip_add()

Elm_Transit_Effect * elm_transit_effect_flip_add | ( | Elm_Transit * | transit,
|  | Elm_Transit_Effect_Flip_Axis | axis,
|  | Eina_Bool | cw )

Add the Flip Effect to Elm_Transit.

Note
  This API is one of the facades. It creates flip effect context and add it's required APIs to elm_transit_effect_add.
  This effect is applied to each pair of objects in the order they are listed in the transit list of objects. The first object in the pair will be the "front" object and the second will be the "back" object.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  axis | Flipping Axis(X or Y).
  cw | Flipping Direction. `EINA_TRUE` is clock-wise.

Returns
  Flip effect context data.

Warning
  It is highly recommended just create a transit with this effect when the window that the objects of the transit belongs has already been created. This is because this effect needs the geometry information about the objects, and if the window was not created yet, it can get a wrong information.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_resizable_flip_add()

Elm_Transit_Effect * elm_transit_effect_resizable_flip_add | ( | Elm_Transit * | transit,
|  | Elm_Transit_Effect_Flip_Axis | axis,
|  | Eina_Bool | cw )

Add the Resizeable Flip Effect to Elm_Transit.

Note
  This API is one of the facades. It creates resizable flip effect context and add it's required APIs to elm_transit_effect_add.
  This effect is applied to each pair of objects in the order they are listed in the transit list of objects. The first object in the pair will be the "front" object and the second will be the "back" object.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  axis | Flipping Axis(X or Y).
  cw | Flipping Direction. `EINA_TRUE` is clock-wise.

Returns
  Resizeable flip effect context data.

Warning
  It is highly recommended just create a transit with this effect when the window that the objects of the transit belongs has already been created. This is because this effect needs the geometry information about the objects, and if the window was not created yet, it can get a wrong information.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_wipe_add()

Elm_Transit_Effect * elm_transit_effect_wipe_add | ( | Elm_Transit * | transit,
|  | Elm_Transit_Effect_Wipe_Type | type,
|  | Elm_Transit_Effect_Wipe_Dir | dir )

Add the Wipe Effect to Elm_Transit.

Note
  This API is one of the facades. It creates wipe effect context and add it's required APIs to elm_transit_effect_add.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  type | Wipe type. Hide or show.
  dir | Wipe Direction.

Returns
  Wipe effect context data.

Warning
  It is highly recommended just create a transit with this effect when the window that the objects of the transit belongs has already been created. This is because this effect needs the geometry information about the objects, and if the window was not created yet, it can get a wrong information.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_color_add()

Elm_Transit_Effect * elm_transit_effect_color_add | ( | Elm_Transit * | transit,
|  | unsigned int | from_r,
|  | unsigned int | from_g,
|  | unsigned int | from_b,
|  | unsigned int | from_a,
|  | unsigned int | to_r,
|  | unsigned int | to_g,
|  | unsigned int | to_b,
|  | unsigned int | to_a )

Add the Color Effect to Elm_Transit.

Note
  This API is one of the facades. It creates color effect context and add it's required APIs to elm_transit_effect_add.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  from_r | RGB R when effect begins.
  from_g | RGB G when effect begins.
  from_b | RGB B when effect begins.
  from_a | RGB A when effect begins.
  to_r | RGB R when effect ends.
  to_g | RGB G when effect ends.
  to_b | RGB B when effect ends.
  to_a | RGB A when effect ends.

Returns
  Color effect context data.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_fade_add()

Elm_Transit_Effect * elm_transit_effect_fade_add | ( | Elm_Transit * | transit | ) |

Add the Fade Effect to Elm_Transit.

Note
  This API is one of the facades. It creates fade effect context and add it's required APIs to elm_transit_effect_add.
  This effect is applied to each pair of objects in the order they are listed in the transit list of objects. The first object in the pair will be the "before" object and the second will be the "after" object.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.

Returns
  Fade effect context data.

Warning
  It is highly recommended just create a transit with this effect when the window that the objects of the transit belongs has already been created. This is because this effect needs the color information about the objects, and if the window was not created yet, it can get a wrong information.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_blend_add()

Elm_Transit_Effect * elm_transit_effect_blend_add | ( | Elm_Transit * | transit | ) |

Add the Blend Effect to Elm_Transit.

Note
  This API is one of the facades. It creates blend effect context and add it's required APIs to elm_transit_effect_add.
  This effect is applied to each pair of objects in the order they are listed in the transit list of objects. The first object in the pair will be the "before" object and the second will be the "after" object.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.

Returns
  Blend effect context data.

Warning
  It is highly recommended just create a transit with this effect when the window that the objects of the transit belongs has already been created. This is because this effect needs the color information about the objects, and if the window was not created yet, it can get a wrong information.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_rotation_add()

Elm_Transit_Effect * elm_transit_effect_rotation_add | ( | Elm_Transit * | transit,
|  | float | from_degree,
|  | float | to_degree )

Add the Rotation Effect to Elm_Transit.

Note
  This API is one of the facades. It creates rotation effect context and add it's required APIs to elm_transit_effect_add.

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  from_degree | Degree when effect begins.
  to_degree | Degree when effect is ends.

Returns
  Rotation effect context data.

Warning
  It is highly recommended just create a transit with this effect when the window that the objects of the transit belongs has already been created. This is because this effect needs the geometry information about the objects, and if the window was not created yet, it can get a wrong information.

References elm_transit_effect_add(), and ERR.

## elm_transit_effect_image_animation_add()

Elm_Transit_Effect * elm_transit_effect_image_animation_add | ( | Elm_Transit * | transit,
|  | Eina_List * | images )

Add the ImageAnimation Effect to Elm_Transit.

Note
  This API is one of the facades. It creates image animation effect context and add it's required APIs to elm_transit_effect_add. The `images` parameter is a list images paths. This list and its contents will be deleted at the end of the effect by elm_transit_effect_image_animation_context_free() function.

Example:

char buf[PATH_MAX];
Eina_List *images = NULL;
Elm_Transit *transi = elm_transit_add();
snprintf(buf, sizeof(buf), "%s/images/icon_11.png", PACKAGE_DATA_DIR);
images = eina_list_append(images, eina_stringshare_add(buf));
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
images = eina_list_append(images, eina_stringshare_add(buf));
elm_transit_effect_image_animation_add(transi, images);
eina_list_append
EINA_API Eina_List * eina_list_append(Eina_List *list, const void *data)
Appends the given data to the given linked list.
Definition eina_list.c:584
Eina_List
struct _Eina_List Eina_List
Type for a generic double linked list.
Definition eina_list.h:304
eina_stringshare_add
EINA_API Eina_Stringshare * eina_stringshare_add(const char *str)
Retrieves an instance of a string for use in a program.
Definition eina_stringshare.c:606
elm_transit_effect_image_animation_add
Elm_Transit_Effect * elm_transit_effect_image_animation_add(Elm_Transit *transit, Eina_List *images)
Add the ImageAnimation Effect to Elm_Transit.
Definition elm_transit.c:2666

See also
  elm_transit_effect_add()

Parameters

  transit | Transit object.
  images | Eina_List of images file paths. This list and its contents will be deleted at the end of the effect by elm_transit_effect_image_animation_context_free() function.

Returns
  Image Animation effect context data.

References elm_transit_effect_add(), and ERR.