Tizen Native API
5.5
|
Animation_View widget is designed to show and play animation of vector graphics based content. It hides all efl_canvas_vg details but just open an API to read vector data from file. Also, it implements details of animation control methods of Vector.
Vector data could contain static or animatable vector elements including animation infomation. Currently approved vector data file format is svg, json and eet. Only json(known for Lottie file as well) and eet could contains animation infomation, currently Animation_View is supporting.
This widget emits the following signals, besides the ones sent from Animation View.
Functions | |
void | elm_animation_view_auto_play_set (Elm_Animation_View *obj, Eina_Bool auto_play) |
Animation will be started automatically when it's possible. | |
Eina_Bool | elm_animation_view_auto_play_get (const Elm_Animation_View *obj) |
Animation will be started automatically when it's possible. | |
void | elm_animation_view_auto_repeat_set (Elm_Animation_View *obj, Eina_Bool auto_repeat) |
Turn on/off animation looping. | |
Eina_Bool | elm_animation_view_auto_repeat_get (const Elm_Animation_View *obj) |
Turn on/off animation looping. | |
Eina_Bool | elm_animation_view_speed_set (Elm_Animation_View *obj, double speed) |
Control animation speed. | |
double | elm_animation_view_speed_get (const Elm_Animation_View *obj) |
Control animation speed. | |
double | elm_animation_view_duration_time_get (const Elm_Animation_View *obj) |
Get the duration of animation in seconds. | |
void | elm_animation_view_progress_set (Elm_Animation_View *obj, double progress) |
Set current progress position of animation view object. | |
double | elm_animation_view_progress_get (const Elm_Animation_View *obj) |
Set current progress position of animation view object. | |
void | elm_animation_view_frame_set (Elm_Animation_View *obj, int frame_num) |
Number of current frame. | |
int | elm_animation_view_frame_get (const Elm_Animation_View *obj) |
Number of current frame. | |
Eina_Bool | elm_animation_view_play (Elm_Animation_View *obj) |
Play animation one time instantly when it's available. | |
Eina_Bool | elm_animation_view_play_back (Elm_Animation_View *obj) |
Play back animation one time instantly when it's available. | |
Eina_Bool | elm_animation_view_pause (Elm_Animation_View *obj) |
Pause current animation instantly. | |
Eina_Bool | elm_animation_view_resume (Elm_Animation_View *obj) |
Resume paused animation to continue animation. | |
Eina_Bool | elm_animation_view_stop (Elm_Animation_View *obj) |
Stop playing animation. | |
Eina_Size2D | elm_animation_view_default_size_get (const Elm_Animation_View *obj) |
Eina_Bool | elm_animation_view_is_playing_back (Elm_Animation_View *obj) |
Returns the status whether current animation is on playing forward or backward. warning: If animation view is not on playing, it will return false . | |
int | elm_animation_view_frame_count_get (const Elm_Animation_View *obj) |
Get the index of end frame of the animation view, if it's animated. note : frame number starts with 0. | |
void | elm_animation_view_min_progress_set (Elm_Animation_View *obj, double min_progress) |
The start progress of the play. Default value is 0. | |
double | elm_animation_view_min_progress_get (const Elm_Animation_View *obj) |
The start progress of the play. Default value is 0. | |
void | elm_animation_view_max_progress_set (Elm_Animation_View *obj, double max_progress) |
The last progress of the play. Default value is 1. | |
double | elm_animation_view_max_progress_get (const Elm_Animation_View *obj) |
The last progress of the play. Default value is 1. | |
void | elm_animation_view_min_frame_set (Elm_Animation_View *obj, int min_frame) |
The start frame of the play. Default value is 0. | |
int | elm_animation_view_min_frame_get (const Elm_Animation_View *obj) |
The start frame of the play. Default value is 0. | |
void | elm_animation_view_max_frame_set (Elm_Animation_View *obj, int max_frame) |
The last frame of the play. Default value is elm_animation_view_frame_count_get - 1. | |
int | elm_animation_view_max_frame_get (const Elm_Animation_View *obj) |
The last frame of the play. Default value is elm_animation_view_frame_count_get - 1. | |
Elm_Animation_View * | elm_animation_view_add (Evas_Object *parent) |
Eina_Bool | elm_animation_view_file_set (Elm_Animation_View *obj, const char *file, const char *key) |
Elm_Animation_View_State | elm_animation_view_state_get (Elm_Animation_View *obj) |
Get current animation view state. |
Elm_Animation_View* elm_animation_view_add | ( | Evas_Object * | parent | ) |
Add a new animation view widget to the parent's canvas
parent | The parent object |
NULL
if it failed to create.Eina_Bool elm_animation_view_auto_play_get | ( | const Elm_Animation_View * | obj | ) |
Animation will be started automatically when it's possible.
If elm_animation_view_auto_play_get is true
, animation will be started when it's readied. The condition of auto
play is when animation view opened file successfully, yet to play it plus when the object is visible. If animation view is disabled, invisible, it turns to pause state then resume animation when it's visible again.
Returns auto play mode of an animation view object.
[in] | obj | The object. |
false
void elm_animation_view_auto_play_set | ( | Elm_Animation_View * | obj, |
Eina_Bool | auto_play | ||
) |
Animation will be started automatically when it's possible.
If elm_animation_view_auto_play_get is true
, animation will be started when it's readied. The condition of auto
play is when animation view opened file successfully, yet to play it plus when the object is visible. If animation view is disabled, invisible, it turns to pause state then resume animation when it's visible again.
Set auto play mode of an animation view object. true
Enable auto play mode, disable otherwise
[in] | obj | The object. |
[in] | auto_play | Auto play mode, Default value is false |
Eina_Bool elm_animation_view_auto_repeat_get | ( | const Elm_Animation_View * | obj | ) |
Turn on/off animation looping.
If elm_animation_view_auto_repeat_get is true
, it repeats animation when animation frame is reached to end. This auto repeat mode is valid to both play and play_back cases.
Returns auto repeat mode of an animation view object.
[in] | obj | The object. |
false
.void elm_animation_view_auto_repeat_set | ( | Elm_Animation_View * | obj, |
Eina_Bool | auto_repeat | ||
) |
Turn on/off animation looping.
If elm_animation_view_auto_repeat_get is true
, it repeats animation when animation frame is reached to end. This auto repeat mode is valid to both play and play_back cases.
Enable loop mode if true
, disable otherwise.
[in] | obj | The object. |
[in] | auto_repeat | Loop mode, Defalut is false . |
Eina_Size2D elm_animation_view_default_size_get | ( | const Elm_Animation_View * | obj | ) |
Get the default view size that specified from vector resource.
double elm_animation_view_duration_time_get | ( | const Elm_Animation_View * | obj | ) |
Get the duration of animation in seconds.
This API returns total duration time of current animation in the seconds. If current animation source isn't animatable, it returns zero.
Returns current duration of an animation in seconds.
[in] | obj | The object. |
Eina_Bool elm_animation_view_file_set | ( | Elm_Animation_View * | obj, |
const char * | file, | ||
const char * | key | ||
) |
Set the source file from where an vector object must fetch the real vector data (it may be one of json, svg, eet files).
If the file supports multiple data stored in it (as Eet files do), you can specify the key to be used as the index of the vector in this file.
[in] | file | The vector file path. |
[in] | key | The vector key in file (if its an Eet one), or NULL , otherwise. |
EINA_TRUE
if it's succeed to read file, EINA_FALSE
otherwise.int elm_animation_view_frame_count_get | ( | const Elm_Animation_View * | obj | ) |
Get the index of end frame of the animation view, if it's animated. note : frame number starts with 0.
[in] | obj | The object. |
int elm_animation_view_frame_get | ( | const Elm_Animation_View * | obj | ) |
Number of current frame.
Ranges from 0 to elm_animation_view_frame_count_get - 1.
Returns the current frame of an animation view object.
[in] | obj | The object. |
void elm_animation_view_frame_set | ( | Elm_Animation_View * | obj, |
int | frame_num | ||
) |
Number of current frame.
Ranges from 0 to elm_animation_view_frame_count_get - 1.
Set the current frame of an animation view object.
[in] | obj | The object. |
[in] | frame_num | Current frame number. |
Eina_Bool elm_animation_view_is_playing_back | ( | Elm_Animation_View * | obj | ) |
Returns the status whether current animation is on playing forward or backward. warning: If animation view is not on playing, it will return false
.
[in] | obj | The object. |
true
, if animation on playing back, false
otherwise.int elm_animation_view_max_frame_get | ( | const Elm_Animation_View * | obj | ) |
The last frame of the play. Default value is elm_animation_view_frame_count_get - 1.
Returns maximum frame of an animation object.
[in] | obj | The object. |
void elm_animation_view_max_frame_set | ( | Elm_Animation_View * | obj, |
int | max_frame | ||
) |
The last frame of the play. Default value is elm_animation_view_frame_count_get - 1.
Set maximum frame of an animation object.
[in] | obj | The object. |
[in] | max_frame | The maximum frame for play. Value must be elm_animation_view_min_frame_get ~ (elm_animation_view_frame_count_get - 1) |
double elm_animation_view_max_progress_get | ( | const Elm_Animation_View * | obj | ) |
The last progress of the play. Default value is 1.
Returns last progress of an animation object.
[in] | obj | The object. |
void elm_animation_view_max_progress_set | ( | Elm_Animation_View * | obj, |
double | max_progress | ||
) |
The last progress of the play. Default value is 1.
Set last progress of an animation object.
[in] | obj | The object. |
[in] | max_progress | The maximum progress. Value must be 0 ~ 1. |
int elm_animation_view_min_frame_get | ( | const Elm_Animation_View * | obj | ) |
The start frame of the play. Default value is 0.
Returns minimum frame of an animation object.
[in] | obj | The object. |
void elm_animation_view_min_frame_set | ( | Elm_Animation_View * | obj, |
int | min_frame | ||
) |
The start frame of the play. Default value is 0.
Set minimum frame of an animation object.
[in] | obj | The object. |
[in] | min_frame | The minimum frame for play. Value must be 0 ~ elm_animation_view_max_frame_get |
double elm_animation_view_min_progress_get | ( | const Elm_Animation_View * | obj | ) |
The start progress of the play. Default value is 0.
Returns start progress of an animation object.
[in] | obj | The object. |
void elm_animation_view_min_progress_set | ( | Elm_Animation_View * | obj, |
double | min_progress | ||
) |
The start progress of the play. Default value is 0.
Set start progress of an animation object.
[in] | obj | The object. |
[in] | min_progress | The minimum progress. Value must be 0 ~ 1. |
Eina_Bool elm_animation_view_pause | ( | Elm_Animation_View * | obj | ) |
Pause current animation instantly.
Once animation is paused, animation view must get resume to play continue again.
[in] | obj | The object. |
true
when it's successful. false
otherwise.Eina_Bool elm_animation_view_play | ( | Elm_Animation_View * | obj | ) |
Play animation one time instantly when it's available.
If current keyframe is on a certain position by playing back, this will play forward from there.
[in] | obj | The object. |
true
when it's successful. false
otherwise.Eina_Bool elm_animation_view_play_back | ( | Elm_Animation_View * | obj | ) |
Play back animation one time instantly when it's available.
If current keyframe is on a certain position by playing, this will play backward from there.
[in] | obj | The object. |
true
when it's successful. false
otherwise.double elm_animation_view_progress_get | ( | const Elm_Animation_View * | obj | ) |
Set current progress position of animation view object.
When you required to jump on a certain frame instantly, you can change current position by using this API.
Returns current progress position of an animation view object.
[in] | obj | The object. |
void elm_animation_view_progress_set | ( | Elm_Animation_View * | obj, |
double | progress | ||
) |
Set current progress position of animation view object.
When you required to jump on a certain frame instantly, you can change current position by using this API.
Set the current progress position of an animation view object.
[in] | obj | The object. |
[in] | progress | Progress position. Value must be 0 ~ 1. |
Eina_Bool elm_animation_view_resume | ( | Elm_Animation_View * | obj | ) |
Resume paused animation to continue animation.
[in] | obj | The object. |
true
when it's successful. false
otherwise.double elm_animation_view_speed_get | ( | const Elm_Animation_View * | obj | ) |
Control animation speed.
Control animation speed by multiplying speed
value. If you want to play animation double-time faster, you can give speed
2. If you want to play animation double-time slower, you can give speed
0.5.
Returns current animation speed of an animation view object.
[in] | obj | The object. |
Eina_Bool elm_animation_view_speed_set | ( | Elm_Animation_View * | obj, |
double | speed | ||
) |
Control animation speed.
Control animation speed by multiplying speed
value. If you want to play animation double-time faster, you can give speed
2. If you want to play animation double-time slower, you can give speed
0.5.
[in] | obj | The object. |
[in] | speed | Speed factor. Default value is 1.0 |
true
when it's successful. false
otherwise.Elm_Animation_View_State elm_animation_view_state_get | ( | Elm_Animation_View * | obj | ) |
Get current animation view state.
Eina_Bool elm_animation_view_stop | ( | Elm_Animation_View * | obj | ) |
Stop playing animation.
Stop animation instatly regardless of it's status and reset to show first frame of animation. Even though current animation is paused, the animation status will be stopped.
[in] | obj | The object. |
true
when it's successful. false
otherwise.