2019-12-31 06:53:16 -08:00
|
|
|
#ifndef EFL_UI_VG_ANIMATION_PRIVATE_H
|
|
|
|
#define EFL_UI_VG_ANIMATION_PRIVATE_H
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
|
|
|
|
#include "Elementary.h"
|
2019-12-31 06:53:16 -08:00
|
|
|
#include "efl_ui_vg_animation.eo.h"
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
|
2019-12-31 06:53:16 -08:00
|
|
|
typedef struct _Efl_Ui_Vg_Animation_Data Efl_Ui_Vg_Animation_Data;
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
|
2019-12-31 06:53:16 -08:00
|
|
|
struct _Efl_Ui_Vg_Animation_Data
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
{
|
|
|
|
Eo* vg; //Evas_Object_Vg
|
2019-12-31 06:53:16 -08:00
|
|
|
Efl_Ui_Vg_Animation_State state;
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
Elm_Transit *transit;
|
|
|
|
Eina_Stringshare *file;
|
Efl.Ui.Animation_View: Implements Efl.Player interface
Summary:
Chnaged API
.speed.set => Efl.Player.playback_speed.set
.speed.get => Efl.Player.playback_speed.get
.progress.get => Efl.Player.playback_progress.get
.play => Efl.Player.playing.set(true)
.stop => Efl.Player.playing.set(false)
.pause => Efl.Player.paused.set(true)
.resume => Efl.Player.paused.set(false)
.play_sector => .playing_sector
.auto_play => .autoplay
.auto_repeat => .autorepeat
Remove API
.is_playing_back
.playback => (use negative speed value)
New feature API
Efl.Player.playback_position.set
Efl.Player.playback_position.get
Efl.Player.playing.get
Efl.Player.paused.get
ref T8476
Test Plan:
meson_option.txt -> remove json in evas-loaders-disabler option
elementary_test -to "animation view"
Reviewers: Hermet, bu5hm4n, kimcinoo, Jaehyun_Cho, segfaultxavi, zmike
Reviewed By: segfaultxavi, zmike
Subscribers: zmike, segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8476
Differential Revision: https://phab.enlightenment.org/D10862
2019-12-31 06:52:56 -08:00
|
|
|
double playback_speed;
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
double progress;
|
|
|
|
double frame_cnt;
|
|
|
|
int repeat_times;
|
|
|
|
double frame_duration;
|
|
|
|
double min_progress;
|
|
|
|
double max_progress;
|
2019-10-01 21:21:35 -07:00
|
|
|
Eina_List *vp_list;
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
|
Efl.Ui.Animation_View: Implements Efl.Player interface
Summary:
Chnaged API
.speed.set => Efl.Player.playback_speed.set
.speed.get => Efl.Player.playback_speed.get
.progress.get => Efl.Player.playback_progress.get
.play => Efl.Player.playing.set(true)
.stop => Efl.Player.playing.set(false)
.pause => Efl.Player.paused.set(true)
.resume => Efl.Player.paused.set(false)
.play_sector => .playing_sector
.auto_play => .autoplay
.auto_repeat => .autorepeat
Remove API
.is_playing_back
.playback => (use negative speed value)
New feature API
Efl.Player.playback_position.set
Efl.Player.playback_position.get
Efl.Player.playing.get
Efl.Player.paused.get
ref T8476
Test Plan:
meson_option.txt -> remove json in evas-loaders-disabler option
elementary_test -to "animation view"
Reviewers: Hermet, bu5hm4n, kimcinoo, Jaehyun_Cho, segfaultxavi, zmike
Reviewed By: segfaultxavi, zmike
Subscribers: zmike, segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8476
Differential Revision: https://phab.enlightenment.org/D10862
2019-12-31 06:52:56 -08:00
|
|
|
Eina_Bool playing_reverse : 1;
|
|
|
|
Eina_Bool autoplay : 1;
|
|
|
|
Eina_Bool autoplay_pause: 1;
|
2020-01-28 07:36:33 -08:00
|
|
|
Eina_Bool loop : 1;
|
Efl.Ui.Animation_View: Implements Efl.Player interface
Summary:
Chnaged API
.speed.set => Efl.Player.playback_speed.set
.speed.get => Efl.Player.playback_speed.get
.progress.get => Efl.Player.playback_progress.get
.play => Efl.Player.playing.set(true)
.stop => Efl.Player.playing.set(false)
.pause => Efl.Player.paused.set(true)
.resume => Efl.Player.paused.set(false)
.play_sector => .playing_sector
.auto_play => .autoplay
.auto_repeat => .autorepeat
Remove API
.is_playing_back
.playback => (use negative speed value)
New feature API
Efl.Player.playback_position.set
Efl.Player.playback_position.get
Efl.Player.playing.get
Efl.Player.paused.get
ref T8476
Test Plan:
meson_option.txt -> remove json in evas-loaders-disabler option
elementary_test -to "animation view"
Reviewers: Hermet, bu5hm4n, kimcinoo, Jaehyun_Cho, segfaultxavi, zmike
Reviewed By: segfaultxavi, zmike
Subscribers: zmike, segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T8476
Differential Revision: https://phab.enlightenment.org/D10862
2019-12-31 06:52:56 -08:00
|
|
|
Eina_Bool playback_direction_changed : 1;
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
};
|
|
|
|
|
2019-12-31 06:53:16 -08:00
|
|
|
#define EFL_UI_VG_ANIMATION_DATA_GET(o, sd) \
|
|
|
|
Efl_Ui_Vg_Animation_Data * sd = efl_data_scope_safe_get(o, EFL_UI_VG_ANIMATION_CLASS)
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
|
2019-12-31 06:53:16 -08:00
|
|
|
#define EFL_UI_VG_ANIMATION_DATA_GET_OR_RETURN(o, ptr) \
|
|
|
|
EFL_UI_VG_ANIMATION_DATA_GET(o, ptr); \
|
efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.
Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.
Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>
@feature
Reviewers: #committers, jsuya, zmike, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: zmike, bu5hm4n, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 01:39:43 -07:00
|
|
|
if (EINA_UNLIKELY(!ptr)) \
|
|
|
|
{ \
|
|
|
|
ERR("No widget data for object %p (%s)", \
|
|
|
|
o, evas_object_type_get(o)); \
|
|
|
|
return; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|