Tizen Native API
|
This group provides functions to handle the effects of transition of Elementary widgets.
Transit is designed to apply various animated transition effects to Evas_Object
, such as translation, rotation, etc. For using these effects, create Elm_Transit and add the desired transition effects.
Once the effects are added into transit, they are automatically managed (their callback is called for the set duration and they are 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);
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.
- Remarks:
- We strongly recommend to use elm_transit just when edje cannot do the trick. Edje is better at handling transitions than Elm_Transit. Edje has more flexibility and animations can be manipulated inside the theme.
Functions | |
Elm_Transit * | elm_transit_add (void) |
Creates a new transit. | |
void | elm_transit_del (Elm_Transit *transit) |
Stops the animation and deletes 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) |
Adds 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) |
Deletes an added effect. | |
void | elm_transit_object_add (Elm_Transit *transit, Evas_Object *obj) |
Adds a 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) |
Gets the objects of the transit. | |
void | elm_transit_objects_final_state_keep_set (Elm_Transit *transit, Eina_Bool state_keep) |
Enables or disables keeping up the object's states. If it is not kept, the object's states are reset when transition ends. | |
Eina_Bool | elm_transit_objects_final_state_keep_get (const Elm_Transit *transit) |
Gets a value that indicates whether the object's states are reset. | |
void | elm_transit_event_enabled_set (Elm_Transit *transit, Eina_Bool enabled) |
Sets the events that are enabled when transit is operating. | |
Eina_Bool | elm_transit_event_enabled_get (const Elm_Transit *transit) |
Gets the value of the event enabled status. | |
void | elm_transit_del_cb_set (Elm_Transit *transit, Elm_Transit_Del_Cb cb, void *data) |
Sets the user-callback function when the transit is deleted. | |
void | elm_transit_auto_reverse_set (Elm_Transit *transit, Eina_Bool reverse) |
Sets the reverse effect automatically. | |
Eina_Bool | elm_transit_auto_reverse_get (const Elm_Transit *transit) |
Gets whether the auto reverse is on. | |
void | elm_transit_repeat_times_set (Elm_Transit *transit, int repeat) |
Sets the transit repeat count. The effect is repeated as per the repeat count. | |
int | elm_transit_repeat_times_get (const Elm_Transit *transit) |
Gets the transit repeat count. | |
void | elm_transit_tween_mode_set (Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode) |
Sets the transit animation acceleration type. | |
Elm_Transit_Tween_Mode | elm_transit_tween_mode_get (const Elm_Transit *transit) |
Gets the transit animation acceleration type. | |
void | elm_transit_tween_mode_factor_set (Elm_Transit *transit, double v1, double v2) |
Sets the transit animation acceleration factor. | |
void | elm_transit_tween_mode_factor_get (const Elm_Transit *transit, double *v1, double *v2) |
Gets the transit animation acceleration factor. | |
void | elm_transit_duration_set (Elm_Transit *transit, double duration) |
Sets the transit animation time. | |
void | elm_transit_tween_mode_factor_n_set (Elm_Transit *transit, unsigned int v_size, double *v) |
double | elm_transit_duration_get (const Elm_Transit *transit) |
Gets the transit animation time. | |
void | elm_transit_go (Elm_Transit *transit) |
Starts the transition. | |
void | elm_transit_paused_set (Elm_Transit *transit, Eina_Bool paused) |
Pauses and resumes the transition. | |
Eina_Bool | elm_transit_paused_get (const Elm_Transit *transit) |
Gets the value of the paused status. | |
double | elm_transit_progress_value_get (const Elm_Transit *transit) |
Gets the time progression of the animation (a double value between 0.0 and 1.0 ). | |
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) |
Cuts off the chain relationship between two transits. | |
Eina_List * | elm_transit_chain_transits_get (const Elm_Transit *transit) |
Gets the current chain transit list. | |
void | elm_transit_smooth_set (Elm_Transit *transit, Eina_Bool smooth) |
Sets the smooth effect for a transit. | |
Eina_Bool | elm_transit_smooth_get (const Elm_Transit *transit) |
Gets 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) |
Adds 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) |
Adds the translation effect to Elm_Transit. | |
Elm_Transit_Effect * | elm_transit_effect_zoom_add (Elm_Transit *transit, float from_rate, float to_rate) |
Adds 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) |
Adds 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) |
Adds 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) |
Adds 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) |
Adds the color effect to Elm_Transit. | |
Elm_Transit_Effect * | elm_transit_effect_fade_add (Elm_Transit *transit) |
Adds the fade effect to Elm_Transit. | |
Elm_Transit_Effect * | elm_transit_effect_blend_add (Elm_Transit *transit) |
Adds the blend effect to Elm_Transit. | |
Elm_Transit_Effect * | elm_transit_effect_rotation_add (Elm_Transit *transit, float from_degree, float to_degree) |
Adds the rotation effect to Elm_Transit. | |
Elm_Transit_Effect * | elm_transit_effect_image_animation_add (Elm_Transit *transit, Eina_List *images) |
Adds the image animation effect to Elm_Transit. | |
Typedefs | |
typedef struct _Elm_Transit | Elm_Transit |
The Transit structure type created with elm_transit_add(). This type has the information about the objects to which the transition is applied, and the transition effects that are used. It also contains info about duration, number of repetitions, auto-reverse, etc. | |
typedef void(* | Elm_Transit_Effect_Transition_Cb )(Elm_Transit_Effect *effect, Elm_Transit *transit, double progress) |
Called for this effect on each transition iteration. | |
typedef void(* | Elm_Transit_Effect_End_Cb )(Elm_Transit_Effect *effect, Elm_Transit *transit) |
Called for this effect when the transition is over. | |
typedef void(* | Elm_Transit_Del_Cb )(void *data, Elm_Transit *transit) |
Called when the transit is deleted. |
Typedef Documentation
The Transit structure type created with elm_transit_add(). This type has the information about the objects to which the transition is applied, and the transition effects that are used. It also contains info about duration, number of repetitions, auto-reverse, etc.
- Since :
- 2.3.1
typedef void(* Elm_Transit_Del_Cb)(void *data, Elm_Transit *transit) |
Called when the transit is deleted.
Elm_Transit_Del_Cb
- Since :
- 2.3.1
typedef void(* Elm_Transit_Effect_End_Cb)(Elm_Transit_Effect *effect, Elm_Transit *transit) |
Called for this effect when the transition is over.
Elm_Transit_Effect_End_Cb
- Since :
- 2.3.1
Called for this effect on each transition iteration.
- Since :
- 2.3.1
Enumeration Type Documentation
Enumeration of acceleration used in the transition.
- Since :
- 2.3.1
- Enumerator:
Function Documentation
Elm_Transit* elm_transit_add | ( | void | ) |
Creates a new transit.
- Since :
- 2.3.1
- Remarks:
- It is not necessary to delete the transit object, it is deleted at the end of its operation.
- The transit starts playing when the program enters the main loop.
- Returns:
- The transit object
Eina_Bool elm_transit_auto_reverse_get | ( | const Elm_Transit * | transit | ) |
Gets whether the auto reverse is on.
- Since :
- 2.3.1
- Parameters:
-
[in] transit The transit object
- Returns:
EINA_TRUE
if the auto reverse is on, otherwiseEINA_FALSE
is returned if transit isNULL
- See also:
- elm_transit_auto_reverse_set()
void elm_transit_auto_reverse_set | ( | Elm_Transit * | transit, |
Eina_Bool | reverse | ||
) |
Sets the reverse effect automatically.
- Since :
- 2.3.1
- Remarks:
- If auto reverse is set, after running the effects with the progress parameter from
0
to1
, it calls the effects again with the progress from1
to0
. The transit lasts for a time equal to (2 * duration * repeat), where the duration is set using the function elm_transit_add and the repeat using the function elm_transit_repeat_times_set().
- Parameters:
-
[in] transit The transit object [in] reverse If EINA_TRUE
the auto_reverse is on, otherwiseEINA_FALSE
void elm_transit_chain_transit_add | ( | Elm_Transit * | transit, |
Elm_Transit * | chain_transit | ||
) |
Makes the chain relationship between two transits.
- Since :
- 2.3.1
- Remarks:
- This function adds the chain_transit transition to a chain after the transit, and is started as soon as transit ends.
-
transit cannot be
NULL
. Transit would have multiple chain transits. -
chain_transit
cannot beNULL
. Chain transits could be chained to only one transit.
- Parameters:
-
[in] transit The transit object [in] chain_transit The chain transit object
This transit is operated after transit is done.
void elm_transit_chain_transit_del | ( | Elm_Transit * | transit, |
Elm_Transit * | chain_transit | ||
) |
Cuts off the chain relationship between two transits.
- Since :
- 2.3.1
- Remarks:
- This function removes the chain_transit transition from the transit.
-
transit cannot be
NULL
. Transit would have a chain relationship with chain transit. -
chain_transit cannot be
NULL
. Chain transits should be chained to the transit.
- Parameters:
-
[in] transit The transit object [in] chain_transit The chain transit object
Eina_List* elm_transit_chain_transits_get | ( | const Elm_Transit * | transit | ) |
Gets the current chain transit list.
- Since :
- 2.3.1
- Remarks:
- transit cannot be
NULL
.
- Parameters:
-
[in] transit The transit object
- Returns:
- The chain transit list
void elm_transit_del | ( | Elm_Transit * | transit | ) |
Stops the animation and deletes the transit object.
- Since :
- 2.3.1
- Remarks:
- Call this function if you want to stop the animation before the transit time. Make sure the transit object is still alive using the elm_transit_del_cb_set() function. All added effects are deleted, calling its respective data_free_cb functions. The function set by elm_transit_del_cb_set() is called.
- Parameters:
-
[in] transit The transit object to be deleted
- See also:
- elm_transit_del_cb_set()
void elm_transit_del_cb_set | ( | Elm_Transit * | transit, |
Elm_Transit_Del_Cb | cb, | ||
void * | data | ||
) |
Sets the user-callback function when the transit is deleted.
- Since :
- 2.3.1
- Remarks:
- Using this function twice overwrites the first function set.
- The transit object is deleted after calling the cb function.
- Parameters:
-
[in] transit The transit object [in] cb The callback function pointer
This function is called before the deletion of the transit.[in] data The callback function for user data
It is the op parameter.
double elm_transit_duration_get | ( | const Elm_Transit * | transit | ) |
Gets the transit animation time.
- Since :
- 2.3.1
- Remarks:
- transit cannot be
NULL
.
- Parameters:
-
[in] transit The transit object
- Returns:
- The transit animation time
void elm_transit_duration_set | ( | Elm_Transit * | transit, |
double | duration | ||
) |
Sets the transit animation time.
- Since :
- 2.3.1
- Remarks:
- transit cannot be
NULL
.
- Parameters:
-
[in] transit The transit object [in] duration The animation time
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 | ||
) |
Adds a new effect to the transit.
- Since :
- 2.3.1
- Remarks:
- The cb function and 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 is killed by the 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);
- Remarks:
- The transit frees the context data at the end of the transition with the data_free_cb function.
- Do not share the context data in between different transit objects.
- Parameters:
-
[in] transit The transit object [in] 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 between0.0
and1.0
).[in] effect The context data of the effect [in] end_cb The function to free the context data, it is called at the end of the effect, it must finalize the animation and free the data.
Elm_Transit_Effect* elm_transit_effect_blend_add | ( | Elm_Transit * | transit | ) |
Adds the blend effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates blend effect context and adds its 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 is the "before" object and the second is the "after" object.
- It is highly recommended to 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 is not created yet, it can get wrong information.
- Parameters:
-
[in] transit The transit object
- Returns:
- The blend effect context data
- See also:
- elm_transit_effect_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 | ||
) |
Adds the color effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates color effect context and adds its required APIs to elm_transit_effect_add().
- Parameters:
-
[in] transit The transit object [in] from_r The RGB from R when the effect begins [in] from_g The RGB from G when the effect begins [in] from_b The RGB from B when the effect begins [in] from_a The RGB from A when the effect begins [in] to_r The RGB to R when the effect ends [in] to_g The RGB to G when the effect ends [in] to_b The RGB to B when the effect ends [in] to_a The RGB to A when the effect ends
- Returns:
- The color effect context data
- See also:
- elm_transit_effect_add()
void elm_transit_effect_del | ( | Elm_Transit * | transit, |
Elm_Transit_Effect_Transition_Cb | transition_cb, | ||
Elm_Transit_Effect * | effect | ||
) |
Deletes an added effect.
This function removes the effect from the transit, calling the data_free_cb to free the data.
- Since :
- 2.3.1
- Remarks:
- If the effect is not found, nothing is done.
- If the effect list becomes empty, this function calls elm_transit_del(transit), i.e., it kills the transit.
- Parameters:
-
[in] transit The transit object [in] transition_cb The operation function [in] effect The context data of the effect
- See also:
- elm_transit_effect_add()
Elm_Transit_Effect* elm_transit_effect_fade_add | ( | Elm_Transit * | transit | ) |
Adds the fade effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates fade effect context and adds its 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 is the "before" object and the second is the "after" object.
- It is highly recommended to just create a transit with this effect when the window to which the objects of the transit belong has already been created. This is because this effect needs the color information about the objects, and if the window is not created yet, it can get wrong information.
- Parameters:
-
[in] transit The transit object
- Returns:
- The fade effect context data
- See also:
- elm_transit_effect_add()
Elm_Transit_Effect* elm_transit_effect_flip_add | ( | Elm_Transit * | transit, |
Elm_Transit_Effect_Flip_Axis | axis, | ||
Eina_Bool | cw | ||
) |
Adds the flip effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates flip effect context and adds its 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 is the "front" object and the second is the "back" object.
- It is highly recommended to just create a transit with this effect when the window to which the objects of the transit belong has already been created. This is because this effect needs the geometry information about the objects, and if the window is not created yet, it can get wrong information.
- Parameters:
-
[in] transit The transit object [in] axis The flipping axis(x or y) [in] cw The flipping direction
EINA_TRUE
is clock-wise.
- Returns:
- The flip effect context data
- See also:
- elm_transit_effect_add()
Elm_Transit_Effect* elm_transit_effect_image_animation_add | ( | Elm_Transit * | transit, |
Eina_List * | images | ||
) |
Adds the image animation effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates image animation effect context and adds its required APIs to elm_transit_effect_add. The images parameter is a list images paths. This list and its contents is deleted at the end of the effect by the 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);
- Parameters:
-
[in] transit The transit object [in] images The Eina_List of images file paths
This list and its contents are deleted at the end of the effect by the elm_transit_effect_image_animation_context_free() function.
- Returns:
- The image animation effect context data
- See also:
- elm_transit_effect_add()
Elm_Transit_Effect* elm_transit_effect_resizable_flip_add | ( | Elm_Transit * | transit, |
Elm_Transit_Effect_Flip_Axis | axis, | ||
Eina_Bool | cw | ||
) |
Adds the resizeable flip effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates resizable flip effect context and adds its 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 is the "front" object and the second is the "back" object.
- It is highly recommended to just create a transit with this effect when the window to which the objects of the transit belong has already been created. This is because this effect needs the geometry information about the objects, and if the window is not created yet, it can get wrong information.
- Parameters:
-
[in] transit The transit object [in] axis The flipping axis(x or y) [in] cw The flipping direction
EINA_TRUE
is clock-wise.
- Returns:
- The resizeable flip effect context data
- See also:
- elm_transit_effect_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 | ||
) |
Adds the resizing effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates resizing effect context and adds its required APIs to elm_transit_effect_add().
- Parameters:
-
[in] transit The transit object [in] from_w The object width size when the effect begins [in] from_h The object height size when the effect begins [in] to_w The object width size when the effect ends [in] to_h The object height size when the effect ends
- Returns:
- The resizing effect context data
- See also:
- elm_transit_effect_add()
Elm_Transit_Effect* elm_transit_effect_rotation_add | ( | Elm_Transit * | transit, |
float | from_degree, | ||
float | to_degree | ||
) |
Adds the rotation effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates rotation effect context and adds its required APIs to elm_transit_effect_add().
- It is highly recommended to just create a transit with this effect when the window to which the objects of the transit belong has already been created. This is because this effect needs the geometry information about the objects, and if the window is not created yet, it can get wrong information.
- Parameters:
-
[in] transit The transit object [in] from_degree The degree when the effect begins [in] to_degree The degree when the effect is ends
- Returns:
- The rotation effect context data
- See also:
- elm_transit_effect_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 | ||
) |
Adds the translation effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates translation effect context and adds its required APIs to elm_transit_effect_add().
- It is highly recommended to just create a transit with this effect when the window to which the objects of the transit belong has already been created. This is because this effect needs the geometry information about the objects, and if the window is not created yet, it can get wrong information.
- Parameters:
-
[in] transit The transit object [in] from_dx The x position variation when the effect begins [in] from_dy The y position variation when the effect begins [in] to_dx The x position variation when the effect ends [in] to_dy The y position variation when the effect ends
- Returns:
- The translation effect context data
- See also:
- elm_transit_effect_add()
Elm_Transit_Effect* elm_transit_effect_wipe_add | ( | Elm_Transit * | transit, |
Elm_Transit_Effect_Wipe_Type | type, | ||
Elm_Transit_Effect_Wipe_Dir | dir | ||
) |
Adds the wipe effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates wipe effect context and adds its required APIs to elm_transit_effect_add().
- It is highly recommended to just create a transit with this effect when the window to which the objects of the transit belong has already been created. This is because this effect needs the geometry information about the objects, and if the window is not created yet, it can get wrong information.
- Parameters:
-
[in] transit The transit object [in] type The wipe type which is either hide or show [in] dir The wipe direction
- Returns:
- The wipe effect context data
- See also:
- elm_transit_effect_add()
Elm_Transit_Effect* elm_transit_effect_zoom_add | ( | Elm_Transit * | transit, |
float | from_rate, | ||
float | to_rate | ||
) |
Adds the zoom effect to Elm_Transit.
- Since :
- 2.3.1
- Remarks:
- This API is one of the facades. It creates zoom effect context and adds its required APIs to elm_transit_effect_add().
- It is highly recommended to just create a transit with this effect when the window to which the objects of the transit belong has already been created. This is because this effect needs the geometry information about the objects, and if the window is not created yet, it can get wrong information.
- Parameters:
-
[in] transit The transit object [in] from_rate The scale rate when the effect begins ( 1
is the current rate)[in] to_rate The scale rate when the effect ends
- Returns:
- The zoom effect context data
- See also:
- elm_transit_effect_add()
Eina_Bool elm_transit_event_enabled_get | ( | const Elm_Transit * | transit | ) |
Gets the value of the event enabled status.
- Since :
- 2.3.1
- Parameters:
-
[in] transit The transit object
- Returns:
EINA_TRUE
if the event is enabled, otherwiseEINA_FALSE
is returned if transit isNULL
- See also:
- elm_transit_event_enabled_set()
void elm_transit_event_enabled_set | ( | Elm_Transit * | transit, |
Eina_Bool | enabled | ||
) |
Sets the events that are enabled when transit is operating.
- Since :
- 2.3.1
- Remarks:
- If enabled is
EINA_TRUE
, the objects of the transit receive events from a mouse and keyboard during the animation. - 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 using evas_object_freeze_events_set() after adding the object, this state changes again when transit stops to run.
- Parameters:
-
[in] transit The transit object [in] enabled Events are received when enabled is EINA_TRUE
, otherwise it is ignored
void elm_transit_go | ( | Elm_Transit * | transit | ) |
Starts the transition.
- Since :
- 2.3.1
- Remarks:
- Once this API is called, the transit begins to measure the time.
-
transit cannot be
NULL
.
- Parameters:
-
[in] transit The transit object
void elm_transit_object_add | ( | Elm_Transit * | transit, |
Evas_Object * | obj | ||
) |
Adds a new object to apply the effects.
- Since :
- 2.3.1
- Remarks:
- After the first addition of an object to transit, if its object list becomes empty again, the transit is killed by the elm_transit_del(transit) function.
- If the obj belongs to another transit, the obj is removed from it and it only belongs to the other transit. If the old transit stays without objects, it dies.
- When you add an object into 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 using evas_object_pass_events_set() after adding the object, this state changes again when transit stops.
- It is not allowed to add a new object after transit begins.
- Parameters:
-
[in] transit The transit object [in] obj The object to be animated
void elm_transit_object_remove | ( | Elm_Transit * | transit, |
Evas_Object * | obj | ||
) |
Removes an added object from the transit.
- Since :
- 2.3.1
- Remarks:
- If the obj is not in the transit, nothing is done.
- If the list becomes empty, this function calls elm_transit_del(transit), i.e., it kills the transit.
- It is not allowed to remove objects after transit begins.
- Parameters:
-
[in] transit The transit object [in] obj The object to be removed from transit
Eina_Bool elm_transit_objects_final_state_keep_get | ( | const Elm_Transit * | transit | ) |
Gets a value that indicates whether the object's states are reset.
- Since :
- 2.3.1
- Remarks:
- transit cannot be
NULL
- Parameters:
-
[in] transit The transit object
- Returns:
EINA_TRUE
indicates that the states of the objects are reset
If transit isNULL
,EINA_FALSE
is returned
void elm_transit_objects_final_state_keep_set | ( | Elm_Transit * | transit, |
Eina_Bool | state_keep | ||
) |
Enables or disables keeping up the object's states. If it is not kept, the object's states are reset when transition ends.
- Since :
- 2.3.1
- Remarks:
- transit cannot be
NULL
. - One state includes geometry, color, and map data.
- Parameters:
-
[in] transit The transit object [in] state_keep The boolean value that indicates whether to retain the state
const Eina_List* elm_transit_objects_get | ( | const Elm_Transit * | transit | ) |
Gets the objects of the transit.
- Since :
- 2.3.1
- Parameters:
-
[in] transit The transit object
- Returns:
- a The Eina_List with the objects from the transit
Eina_Bool elm_transit_paused_get | ( | const Elm_Transit * | transit | ) |
Gets the value of the paused status.
- Since :
- 2.3.1
- Remarks:
- transit cannot be
NULL
.
- Parameters:
-
[in] transit The transit object
- Returns:
EINA_TRUE
if the transition is paused, otherwiseEINA_FALSE
is returned if transit isNULL
- See also:
- elm_transit_paused_set()
void elm_transit_paused_set | ( | Elm_Transit * | transit, |
Eina_Bool | paused | ||
) |
Pauses and resumes the transition.
- Since :
- 2.3.1
- Remarks:
- If you call elm_transit_go() again, the transit is started from the beginning, and is played.
-
transit cannot be
NULL
- Parameters:
-
[in] transit The transit object [in] paused The boolean value that indicates whether the transition should be paused
double elm_transit_progress_value_get | ( | const Elm_Transit * | transit | ) |
Gets the time progression of the animation (a double value between 0.0
and 1.0
).
- Since :
- 2.3.1
- Remarks:
- The value returned is a fraction (current time / total time). It represents the progression position relative to the total.
-
transit cannot be
NULL
- Parameters:
-
[in] transit The transit object
- Returns:
- The time progression value
If transit isNULL
,0
is returned
int elm_transit_repeat_times_get | ( | const Elm_Transit * | transit | ) |
Gets the transit repeat count.
- Since :
- 2.3.1
- Parameters:
-
[in] transit The transit object
- Returns:
- The repeat count
If transit isNULL
,0
is returned
- See also:
- elm_transit_repeat_times_set()
void elm_transit_repeat_times_set | ( | Elm_Transit * | transit, |
int | repeat | ||
) |
Sets the transit repeat count. The effect is repeated as per the repeat count.
This function sets the number of repetitions that the transit runs after the first one, i.e., if repeat is 1
, the transit runs 2
times. If repeat is a negative number, it repeats infinite times.
- Since :
- 2.3.1
- Remarks:
- If this function is called during the transit execution, the transit runs repeat times, ignoring the times it already performed.
- Parameters:
-
[in] transit The transit object [in] repeat The repeat count
Eina_Bool elm_transit_smooth_get | ( | const Elm_Transit * | transit | ) |
Gets smooth scaling for transit map rendering.
This gets smooth scaling for transit map rendering.
- Since (EFL) :
- 1.8
- Since :
- 2.3.1
- Parameters:
-
[in] transit The transit object
- Returns:
EINA_TRUE
if smooth scaling is enabled, otherwiseEINA_FALSE
- See also:
- elm_transit_smooth_set()
void elm_transit_smooth_set | ( | Elm_Transit * | transit, |
Eina_Bool | smooth | ||
) |
Sets the smooth effect for a transit.
This sets smoothing for transit map rendering. If the object added in a transit is of 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.
- Since (EFL) :
- 1.8
- Since :
- 2.3.1
- Parameters:
-
[in] transit The transit object [in] smooth enabled The boolean value that enables or disables smooth map rendering
- See also:
- evas_map_smooth_set()
void elm_transit_tween_mode_factor_get | ( | const Elm_Transit * | transit, |
double * | v1, | ||
double * | v2 | ||
) |
Gets the transit animation acceleration factor.
- Since :
- 2.3.1
- Remarks:
- transit cannot be
NULL
.
- Parameters:
-
[in] transit The transit object [out] v1 The pointer to a double in which to store the factor value [out] v2 The pointer to a double in which to store the factor value2
- See also:
- elm_transit_tween_mode_factor_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 ajusted 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 :
- 2.3.1
void elm_transit_tween_mode_factor_set | ( | Elm_Transit * | transit, |
double | v1, | ||
double | v2 | ||
) |
Sets the transit animation acceleration factor.
This function sets the tween mode factor of the transit which can be: If you use the below tween modes, you have to set the factor using this API. ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts slow, speeds up then slows down at the end, v1 being a power factor, 0.0
being linear, 1.0
being ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Default, 2.0
being a much more pronounced sinusoidal(squared), 3.0
being cubed, etc. ELM_TRANSIT_TWEEN_MODE_DECELERATE - Starts fast then slows down, v1 being a power factor, 0.0
being linear, 1.0
being ELM_TRANSIT_TWEEN_MODE_DECELERATE default, 2.0
being a much more pronounced decelerate (squared), 3.0
being cubed, etc. ELM_TRANSIT_TWEEN_MODE_ACCELERATE - Starts slow then speeds up, v1 being a power factor, 0.0
being linear, 1.0
being ELM_TRANSIT_TWEEN_MODE_ACCELERATE default, 2.0
being a much more pronounced accelerate (squared), 3.0
being cubed, etc. ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP - Starts at gradient * v1, interpolated via power of the v2 curve. ELM_TRANSIT_TWEEN_MODE_BOUNCE - Starts at 0.0
then a "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 - Starts at 0.0
then a "wobble" like a spring in rest position 1.0
, and wobble v2 times, with decay factor of v1.
- Since :
- 2.3.1
- Parameters:
-
[in] transit The transit object [in] v1 A parameter used by the mapping (default is 1.0
)[in] v2 A parameter used by the mapping (default is 0.0
)
- See also:
- elm_transit_tween_mode_factor_get()
Elm_Transit_Tween_Mode elm_transit_tween_mode_get | ( | const Elm_Transit * | transit | ) |
Gets the transit animation acceleration type.
- Since :
- 2.3.1
- Remarks:
- transit cannot be
NULL
.
- Parameters:
-
[in] transit The transit object
- Returns:
- The tween type
If transit isNULL
,ELM_TRANSIT_TWEEN_MODE_LINEAR
is returned.
void elm_transit_tween_mode_set | ( | Elm_Transit * | transit, |
Elm_Transit_Tween_Mode | tween_mode | ||
) |
Sets the transit animation acceleration type.
This function sets the tween mode of the transit which can be: ELM_TRANSIT_TWEEN_MODE_LINEAR - The default mode. ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL - Starts in the accelerate mode and ends decelerating with factor. ELM_TRANSIT_TWEEN_MODE_DECELERATE - The animation is slowed over time with factor. ELM_TRANSIT_TWEEN_MODE_ACCELERATE - The animation accelerates over time with factor. ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP - Starts at gradient v1, interpolated via power of the v2 curve. ELM_TRANSIT_TWEEN_MODE_BOUNCE - Starts at 0.0
then a "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 - Starts at 0.0
then a "wobble" like a spring in rest position 1.0
, and wobble v2 times, with decay factor of v1.
- Since :
- 2.3.1
- Parameters:
-
[in] transit The transit object [in] tween_mode The tween type