Efl.Ui.Animation_View: Implement Min/Max_Progress/Frame_Set/Get 77/198777/1
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 29 Jan 2019 09:59:51 +0000 (18:59 +0900)
committerHermet Park <hermetpark@gmail.com>
Tue, 29 Jan 2019 10:03:34 +0000 (19:03 +0900)
commita2d5a652d023d1180529e4637000ade05ec4c893
tree90ec70f16140e871e959ac80518961edcfad6f9a
parentd6c23305bfec48362733ac6648ff40cccc395329
Efl.Ui.Animation_View: Implement Min/Max_Progress/Frame_Set/Get

Summary:
Implements APIs to set the range when playing.
If we set progress or frame's min and max, it will play within the set value.
keyframe sets the value based on min/max, not the whole frame.

void efl_ui_animation_view_min_progress_set(Eo *obj, double min_progress);
double efl_ui_animation_view_min_progress_get(const Eo *obj);
void efl_ui_animation_view_max_progress_set(Eo *obj, double max_progress);
double efl_ui_animation_view_max_progress_get(const Eo *obj);
void efl_ui_animation_view_min_frame_set(Eo *obj, int min_frame);
int efl_ui_animation_view_min_frame_get(const Eo *obj);
void efl_ui_animation_view_max_frame_set(Eo *obj, int max_frame);
int efl_ui_animation_view_max_frame_get(const Eo *obj);

Test Plan:
Evas_Object *anim_view = elm_animation_view_add(win);
elm_animation_view_auto_repeat_set(anim_view, 1);
elm_animation_view_file_set(anim_view, "a.json", NULL);
elm_animation_view_play(anim_view);
evas_object_show(anim_view);

evas_object_size_hint_align_set(anim_view, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(anim_view, 1, 1);

elm_animation_view_min_progress_set(anim_view, 0.3);
elm_animation_view_max_progress_set(anim_view, 0.8);

//or
elm_animation_view_min_frame_set(anim_view, 5);
elm_animation_view_max_frame_set(anim_view, 15);

Reviewers: Hermet

Subscribers: cedric, smohanty, #reviewers, SanghyeonLee, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7818

Change-Id: Ie49ae9d4e24b9710a89102141c67a91d6b0d6371
src/lib/elementary/efl_ui_animation_view.c
src/lib/elementary/efl_ui_animation_view.eo
src/lib/elementary/efl_ui_animation_view_private.h