summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-12-31 09:52:56 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-12-31 09:52:56 -0500
commite1afc7c1816e5d91e4f05c1644c6b4c7d7c53d25 (patch)
tree34a57fbfb51542e2e63cfa6efe3117f0f048d8e6 /src/bin
parent2f8683ef41d69cda1dc299e1920958a7f414be38 (diff)
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
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elementary/test_efl_gfx_vg_value_provider.c24
-rw-r--r--src/bin/elementary/test_efl_ui_animation_view.c24
2 files changed, 32 insertions, 16 deletions
diff --git a/src/bin/elementary/test_efl_gfx_vg_value_provider.c b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
index 9982652..8c246a2 100644
--- a/src/bin/elementary/test_efl_gfx_vg_value_provider.c
+++ b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
@@ -78,15 +78,23 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
78 if (!text) return; 78 if (!text) return;
79 79
80 if (!strcmp("Play", text)) 80 if (!strcmp("Play", text))
81 efl_ui_animation_view_play((Evas_Object*)data); 81 {
82 double speed = efl_player_playback_speed_get(anim_view);
83 efl_player_playback_speed_set(anim_view, speed < 0 ? speed * -1 : speed);
84 efl_player_playing_set(anim_view, EINA_TRUE);
85 }
82 else if (!strcmp("Pause", text)) 86 else if (!strcmp("Pause", text))
83 efl_ui_animation_view_pause((Evas_Object*)data); 87 efl_player_paused_set((Evas_Object*)data, EINA_TRUE);
84 else if (!strcmp("Resume", text)) 88 else if (!strcmp("Resume", text))
85 efl_ui_animation_view_resume((Evas_Object*)data); 89 efl_player_paused_set((Evas_Object*)data, EINA_FALSE);
86 else if (!strcmp("Play Back", text)) 90 else if (!strcmp("Play Back", text))
87 efl_ui_animation_view_play_back((Evas_Object*)data); 91 {
92 double speed = efl_player_playback_speed_get(anim_view);
93 efl_player_playback_speed_set(anim_view, speed > 0 ? speed * -1 : speed);
94 efl_player_playing_set(anim_view, EINA_TRUE);
95 }
88 else if (!strcmp("Stop", text)) 96 else if (!strcmp("Stop", text))
89 efl_ui_animation_view_stop((Evas_Object*)data); 97 efl_player_playing_set((Evas_Object*)data, EINA_FALSE);
90 else if (!strcmp("ADD", text)) 98 else if (!strcmp("ADD", text))
91 { 99 {
92 Evas_Object *list = (Evas_Object*)data; 100 Evas_Object *list = (Evas_Object*)data;
@@ -145,7 +153,7 @@ static void
145check_changed_cb(void *data, const Efl_Event *event) 153check_changed_cb(void *data, const Efl_Event *event)
146{ 154{
147 Evas_Object *anim_view = data; 155 Evas_Object *anim_view = data;
148 efl_ui_animation_view_auto_repeat_set(anim_view, efl_ui_selectable_selected_get(event->object)); 156 efl_ui_animation_view_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object));
149} 157}
150 158
151static void 159static void
@@ -154,7 +162,7 @@ speed_changed_cb(void *data, const Efl_Event *event)
154 Evas_Object *anim_view = data; 162 Evas_Object *anim_view = data;
155 double speed = 1; 163 double speed = 1;
156 if (efl_ui_selectable_selected_get(event->object)) speed = 0.25; 164 if (efl_ui_selectable_selected_get(event->object)) speed = 0.25;
157 efl_ui_animation_view_speed_set(anim_view, speed); 165 efl_player_playback_speed_set(anim_view, speed);
158} 166}
159 167
160static void 168static void
@@ -206,7 +214,7 @@ static void
206_play_updated(void *data, Evas_Object *obj, void *ev EINA_UNUSED) 214_play_updated(void *data, Evas_Object *obj, void *ev EINA_UNUSED)
207{ 215{
208 Evas_Object *slider = data; 216 Evas_Object *slider = data;
209 efl_ui_range_value_set(slider, efl_ui_animation_view_progress_get(obj)); 217 efl_ui_range_value_set(slider, efl_player_playback_progress_get(obj));
210} 218}
211 219
212static void 220static void
diff --git a/src/bin/elementary/test_efl_ui_animation_view.c b/src/bin/elementary/test_efl_ui_animation_view.c
index f5a73df..17163c3 100644
--- a/src/bin/elementary/test_efl_ui_animation_view.c
+++ b/src/bin/elementary/test_efl_ui_animation_view.c
@@ -23,22 +23,30 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
23 if (!text) return; 23 if (!text) return;
24 24
25 if (!strcmp("Play", text)) 25 if (!strcmp("Play", text))
26 efl_ui_animation_view_play(anim_view); 26 {
27 double speed = efl_player_playback_speed_get(anim_view);
28 efl_player_playback_speed_set(anim_view, speed < 0 ? speed * -1 : speed);
29 efl_player_playing_set(anim_view, EINA_TRUE);
30 }
27 else if (!strcmp("Pause", text)) 31 else if (!strcmp("Pause", text))
28 efl_ui_animation_view_pause(anim_view); 32 efl_player_paused_set(anim_view, EINA_TRUE);
29 else if (!strcmp("Resume", text)) 33 else if (!strcmp("Resume", text))
30 efl_ui_animation_view_resume(anim_view); 34 efl_player_paused_set(anim_view, EINA_FALSE);
31 else if (!strcmp("Play Back", text)) 35 else if (!strcmp("Play Back", text))
32 efl_ui_animation_view_play_back(anim_view); 36 {
37 double speed = efl_player_playback_speed_get(anim_view);
38 efl_player_playback_speed_set(anim_view, speed > 0 ? speed * -1 : speed);
39 efl_player_playing_set(anim_view, EINA_TRUE);
40 }
33 else if (!strcmp("Stop", text)) 41 else if (!strcmp("Stop", text))
34 efl_ui_animation_view_stop(anim_view); 42 efl_player_playing_set(anim_view, EINA_FALSE);
35} 43}
36 44
37static void 45static void
38check_changed_cb(void *data, const Efl_Event *event) 46check_changed_cb(void *data, const Efl_Event *event)
39{ 47{
40 Evas_Object *anim_view = data; 48 Evas_Object *anim_view = data;
41 efl_ui_animation_view_auto_repeat_set(anim_view, efl_ui_selectable_selected_get(event->object)); 49 efl_ui_animation_view_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object));
42} 50}
43 51
44static void 52static void
@@ -47,7 +55,7 @@ speed_changed_cb(void *data, const Efl_Event *event)
47 Evas_Object *anim_view = data; 55 Evas_Object *anim_view = data;
48 double speed = 1; 56 double speed = 1;
49 if (efl_ui_selectable_selected_get(event->object)) speed = 0.25; 57 if (efl_ui_selectable_selected_get(event->object)) speed = 0.25;
50 efl_ui_animation_view_speed_set(anim_view, speed); 58 efl_player_playback_speed_set(anim_view, speed);
51} 59}
52 60
53static void 61static void
@@ -99,7 +107,7 @@ static void
99_play_updated(void *data, Evas_Object *obj, void *ev EINA_UNUSED) 107_play_updated(void *data, Evas_Object *obj, void *ev EINA_UNUSED)
100{ 108{
101 Evas_Object *slider = data; 109 Evas_Object *slider = data;
102 efl_ui_range_value_set(slider, efl_ui_animation_view_progress_get(obj)); 110 efl_ui_range_value_set(slider, efl_player_playback_progress_get(obj));
103} 111}
104 112
105static void 113static void