summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-14 12:54:31 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-18 14:53:03 +0100
commitb5967a9fced2f189f5c58053cf58746d3748a980 (patch)
treed2ba39383875780f6ba74d69f6320b833624b12c
parent7645bd72138283c9011a0e898afed0e3bfca3ccd (diff)
remove efl_canvas_animation_playerdevs/bu5hm4n/animation_work
this now all migrated to Efl.Canvas.Object.Animation Differential Revision: https://phab.enlightenment.org/D10667
-rw-r--r--src/lib/evas/Efl_Canvas.h1
-rw-r--r--src/lib/evas/Evas_Eo.h1
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation.eo5
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player.c444
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player.eo62
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player_private.h53
-rw-r--r--src/lib/evas/canvas/meson.build2
7 files changed, 2 insertions, 566 deletions
diff --git a/src/lib/evas/Efl_Canvas.h b/src/lib/evas/Efl_Canvas.h
index 82659a3..cf0db0c 100644
--- a/src/lib/evas/Efl_Canvas.h
+++ b/src/lib/evas/Efl_Canvas.h
@@ -69,7 +69,6 @@ extern "C" {
69#include <canvas/efl_canvas_animation_group.eo.h> 69#include <canvas/efl_canvas_animation_group.eo.h>
70#include <canvas/efl_canvas_animation_group_parallel.eo.h> 70#include <canvas/efl_canvas_animation_group_parallel.eo.h>
71#include <canvas/efl_canvas_animation_group_sequential.eo.h> 71#include <canvas/efl_canvas_animation_group_sequential.eo.h>
72#include <canvas/efl_canvas_animation_player.eo.h>
73#include <canvas/efl_canvas_animation_rotate.eo.h> 72#include <canvas/efl_canvas_animation_rotate.eo.h>
74#include <canvas/efl_canvas_animation_scale.eo.h> 73#include <canvas/efl_canvas_animation_scale.eo.h>
75#include <canvas/efl_canvas_animation_translate.eo.h> 74#include <canvas/efl_canvas_animation_translate.eo.h>
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 13ecde5..5f8d0b4 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -232,7 +232,6 @@ struct _Efl_Canvas_Object_Animation_Event
232#include "canvas/efl_canvas_animation_group.eo.h" 232#include "canvas/efl_canvas_animation_group.eo.h"
233#include "canvas/efl_canvas_animation_group_parallel.eo.h" 233#include "canvas/efl_canvas_animation_group_parallel.eo.h"
234#include "canvas/efl_canvas_animation_group_sequential.eo.h" 234#include "canvas/efl_canvas_animation_group_sequential.eo.h"
235#include "canvas/efl_canvas_animation_player.eo.h"
236#include "canvas/efl_canvas_event_grabber.eo.h" 235#include "canvas/efl_canvas_event_grabber.eo.h"
237 236
238 /** 237 /**
diff --git a/src/lib/evas/canvas/efl_canvas_animation.eo b/src/lib/evas/canvas/efl_canvas_animation.eo
index f8c371c..3640cd2 100644
--- a/src/lib/evas/canvas/efl_canvas_animation.eo
+++ b/src/lib/evas/canvas/efl_canvas_animation.eo
@@ -1,5 +1,4 @@
1import efl_canvas_animation_types; 1import efl_canvas_animation_types;
2parse efl_canvas_animation_player;
3 2
4class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable 3class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
5{ 4{
@@ -16,7 +15,7 @@ class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
16 removed. This means that if the animation does not end in the object's initial state there will be a noticeable 15 removed. This means that if the animation does not end in the object's initial state there will be a noticeable
17 sudden jump. 16 sudden jump.
18 To avoid this, animations must finish in the same state as they begin, or the object's state must be 17 To avoid this, animations must finish in the same state as they begin, or the object's state must be
19 matched to the animation's ending state once the animation finishes (using the @[Efl.Canvas.Animation_Player.ended] 18 matched to the animation's ending state once the animation finishes (using the @[Efl.Canvas.Object_Animation.animation,changed]
20 event). 19 event).
21 ]] 20 ]]
22 c_prefix: efl_animation; 21 c_prefix: efl_animation;
@@ -99,7 +98,7 @@ class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable
99 } 98 }
100 animation_apply { 99 animation_apply {
101 [[Overwrite this method to implement your own animation subclasses. 100 [[Overwrite this method to implement your own animation subclasses.
102 101
103 This is used for example by @Efl.Canvas.Animation_Translate or @Efl.Canvas.Animation_Scale. 102 This is used for example by @Efl.Canvas.Animation_Translate or @Efl.Canvas.Animation_Scale.
104 103
105 Subclasses should call their parent's @.animation_apply to get the adjusted $progress value 104 Subclasses should call their parent's @.animation_apply to get the adjusted $progress value
diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c
deleted file mode 100644
index e8b57cb..0000000
--- a/src/lib/evas/canvas/efl_canvas_animation_player.c
+++ /dev/null
@@ -1,444 +0,0 @@
1#include "efl_canvas_animation_player_private.h"
2
3static void
4_target_del_cb(void *data, const Efl_Event *event EINA_UNUSED)
5{
6 Efl_Canvas_Animation_Player_Data *pd = data;
7 pd->target = NULL;
8}
9
10EOLIAN static void
11_efl_canvas_animation_player_target_set(Eo *eo_obj EINA_UNUSED,
12 Efl_Canvas_Animation_Player_Data *pd,
13 Efl_Canvas_Object *target)
14{
15 if (pd->target == target)
16 return;
17
18 if (pd->target)
19 efl_event_callback_del(pd->target, EFL_EVENT_DEL, _target_del_cb, pd);
20
21 efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, pd);
22
23 pd->target = target;
24}
25
26EOLIAN static Efl_Canvas_Object *
27_efl_canvas_animation_player_target_get(const Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Player_Data *pd)
28{
29 return pd->target;
30}
31
32EOLIAN static void
33_efl_canvas_animation_player_auto_del_set(Eo *eo_obj EINA_UNUSED,
34 Efl_Canvas_Animation_Player_Data *pd,
35 Eina_Bool auto_del)
36{
37 pd->auto_del = auto_del;
38}
39
40EOLIAN static Eina_Bool
41_efl_canvas_animation_player_auto_del_get(const Eo *eo_obj EINA_UNUSED,
42 Efl_Canvas_Animation_Player_Data *pd)
43{
44 return pd->auto_del;
45}
46
47EOLIAN static void
48_efl_canvas_animation_player_animation_set(Eo *eo_obj,
49 Efl_Canvas_Animation_Player_Data *pd,
50 Efl_Canvas_Animation *anim)
51{
52 if (anim == pd->animation)
53 return;
54
55 if (!efl_isa(anim, EFL_CANVAS_ANIMATION_CLASS))
56 {
57 ERR("Passed argument [%p]:[%s] is not an Efl.Animation",
58 anim, efl_class_name_get(efl_class_get(anim)));
59 return;
60 }
61
62 if (pd->animation)
63 {
64 efl_player_playing_set(eo_obj, EINA_FALSE);
65 efl_unref(pd->animation);
66 }
67 pd->animation = anim;
68 efl_ref(pd->animation);
69}
70
71EOLIAN static Efl_Canvas_Animation *
72_efl_canvas_animation_player_animation_get(const Eo *eo_obj EINA_UNUSED,
73 Efl_Canvas_Animation_Player_Data *pd)
74{
75 return pd->animation;
76}
77
78static Eina_Bool
79_animator_cb(void *data)
80{
81 Eo *eo_obj = data;
82 EFL_ANIMATION_PLAYER_DATA_GET(eo_obj, pd);
83 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
84 double duration, elapsed_time, vector;
85
86 if (efl_playable_seekable_get(eo_obj))
87 {
88 pd->time.current = ecore_loop_time_get();
89
90 duration = efl_animation_duration_get(anim);
91 elapsed_time = pd->time.current - pd->time.prev;
92 vector = elapsed_time / duration;
93
94 /* When animation player starts, _animator_cb() is called immediately so
95 * both elapsed time and progress are 0.0.
96 * Since it is the beginning of the animation if progress is 0.0, the
97 * following codes for animation should be executed. */
98 if ((vector <= DBL_EPSILON) && (pd->progress != 0.0))
99 return ECORE_CALLBACK_RENEW; // There is no update.
100
101 //TODO: check negative play_speed.
102 if (!pd->is_direction_forward)
103 vector *= -1;
104 pd->progress += vector;
105
106 if (pd->progress > 1.0)
107 pd->progress = 1.0;
108 else if (pd->progress < 0.0)
109 pd->progress = 0.0;
110 }
111 else
112 {
113 pd->progress = (double)(pd->is_direction_forward);
114 }
115
116 /* The previously applied map effect should be reset before applying the
117 * current map effect. Otherwise, the incrementally added map effects
118 * increase numerical error. */
119 efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj));
120 efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj));
121
122 Efl_Canvas_Animation_Player_Event_Running event_running;
123 event_running.progress = pd->progress;
124 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING,
125 &event_running);
126 pd->time.prev = pd->time.current;
127
128 //Not end. Keep going.
129 if (fabs((!!(pd->is_direction_forward)) - pd->progress) > DBL_EPSILON)
130 return ECORE_CALLBACK_RENEW;
131
132 //Repeat animation
133 if ((efl_animation_repeat_count_get(anim) == EFL_ANIMATION_REPEAT_INFINITE) ||
134 (pd->remaining_repeat_count > 0))
135 {
136 if (pd->remaining_repeat_count > 0)
137 pd->remaining_repeat_count--;
138
139 if (efl_animation_repeat_mode_get(anim) == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE)
140 {
141 pd->is_direction_forward = !pd->is_direction_forward;
142 }
143 else
144 {
145 pd->progress = 0.0;
146 }
147
148 return ECORE_CALLBACK_RENEW;
149 }
150 efl_player_playing_set(eo_obj, EINA_FALSE);
151
152 pd->animator = NULL;
153 return ECORE_CALLBACK_CANCEL;
154}
155
156static void
157_start(Eo *eo_obj, Efl_Canvas_Animation_Player_Data *pd)
158{
159 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
160
161 pd->is_direction_forward = EINA_TRUE;
162
163 pd->remaining_repeat_count = efl_animation_repeat_count_get(anim);
164
165 ecore_animator_del(pd->animator);
166 pd->animator = NULL;
167 pd->time.prev = ecore_loop_time_get();
168
169 //pre started event is supported within class only (protected event)
170 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_PRE_STARTED,
171 NULL);
172 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, NULL);
173
174 pd->animator = ecore_evas_animator_add(pd->target, _animator_cb, eo_obj);
175
176 _animator_cb(eo_obj);
177}
178
179static Eina_Bool
180_start_delay_timer_cb(void *data)
181{
182 Eo *eo_obj = data;
183 EFL_ANIMATION_PLAYER_DATA_GET(eo_obj, pd);
184
185 pd->start_delay_timer = NULL;
186
187 _start(eo_obj, pd);
188
189 return ECORE_CALLBACK_CANCEL;
190}
191
192static Eina_Bool
193_is_final_state(Efl_Canvas_Animation *anim, double progress)
194{
195 if (!anim) return EINA_FALSE;
196 if ((progress != 0.0) && (progress != 1.0)) return EINA_FALSE;
197
198 if (efl_animation_repeat_mode_get(anim) == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE)
199 {
200 if (efl_animation_repeat_count_get(anim) & 1)
201 {
202 if (progress == 0.0)
203 return EINA_TRUE;
204 }
205 else
206 {
207 if (progress == 1.0)
208 return EINA_TRUE;
209 }
210 }
211 else
212 {
213 if (progress == 1.0)
214 return EINA_TRUE;
215 }
216
217 return EINA_FALSE;
218}
219
220static void
221_player_stop(Eo *eo_obj, Efl_Canvas_Animation_Player_Data *pd, Efl_Canvas_Animation *anim)
222{
223 //Reset the state of the target to the initial state
224 efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj));
225
226 if (efl_animation_final_state_keep_get(anim))
227 {
228 if (_is_final_state(anim, pd->progress))
229 {
230 /* Keep the final state only if efl_player_playing_set(EINA_FALSE) is called at
231 * the end of _animator_cb. */
232 efl_animation_apply(anim, pd->progress,
233 efl_animation_player_target_get(eo_obj));
234 }
235 else
236 {
237 pd->progress = 0.0;
238 }
239 }
240 else
241 {
242 pd->progress = 0.0;
243 }
244 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL);
245 if (pd->auto_del) efl_del(eo_obj);
246}
247
248EOLIAN static Eina_Bool
249_efl_canvas_animation_player_efl_player_playing_set(Eo *eo_obj, Efl_Canvas_Animation_Player_Data *pd, Eina_Bool playing)
250{
251 double start_delay;
252 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
253
254 if (!efl_playable_get(eo_obj)) return EINA_FALSE;
255 if ((!playing) && (!pd->is_play)) return EINA_TRUE;
256 if ((playing) && (pd->is_play)) return EINA_TRUE;
257 pd->is_play = !!playing;
258 if (!playing)
259 {
260 if (!pd->is_play) return EINA_TRUE;
261 pd->is_paused = EINA_FALSE;
262 _player_stop(eo_obj, pd, anim);
263 return EINA_TRUE;
264 }
265 //TODO: check this case is correct
266 if (pd->start_delay_timer) return EINA_TRUE;
267
268 pd->progress = 0.0;
269 start_delay = efl_animation_start_delay_get(anim);
270 if (start_delay > 0.0)
271 {
272 pd->start_delay_timer = ecore_timer_add(start_delay,
273 _start_delay_timer_cb, eo_obj);
274 }
275 else
276 _start(eo_obj, pd);
277 return EINA_TRUE;
278}
279
280EOLIAN static Eina_Bool
281_efl_canvas_animation_player_efl_player_playing_get(const Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Player_Data *pd)
282{
283 return pd->is_play;
284}
285
286EOLIAN static Eina_Bool
287_efl_canvas_animation_player_efl_player_paused_set(Eo *eo_obj,
288 Efl_Canvas_Animation_Player_Data *pd,
289 Eina_Bool paused)
290{
291 paused = !!paused;
292 /* can't pause if not playing */
293 if (!pd->is_play) return EINA_FALSE;
294 if (pd->is_paused == paused) return EINA_TRUE;
295 pd->is_paused = paused;
296 if (!paused)
297 {
298 //TODO: check this case is correct.
299 if (pd->start_delay_timer) return EINA_FALSE;
300
301 pd->time.prev = ecore_loop_time_get();
302 pd->animator = ecore_evas_animator_add(pd->target, _animator_cb, eo_obj);
303
304 _animator_cb(eo_obj);
305 }
306 else
307 {
308 ecore_timer_del(pd->start_delay_timer);
309 pd->start_delay_timer = NULL;
310 ecore_animator_del(pd->animator);
311 pd->animator = NULL;
312 }
313 return EINA_TRUE;
314}
315
316EOLIAN static Eina_Bool
317_efl_canvas_animation_player_efl_player_paused_get(const Eo *eo_obj EINA_UNUSED,
318 Efl_Canvas_Animation_Player_Data *pd)
319{
320 return pd->is_paused;
321}
322
323EOLIAN static Eina_Bool
324_efl_canvas_animation_player_efl_playable_playable_get(const Eo *eo_obj,
325 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
326{
327 Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj);
328
329 return efl_playable_get(anim);
330}
331
332EOLIAN static double
333_efl_canvas_animation_player_efl_player_playback_position_get(const Eo *eo_obj,
334 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
335{
336 //TODO: this is not correct
337 Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj);
338 double length = efl_animation_duration_get(anim);
339
340 return length * efl_player_playback_progress_get(eo_obj);
341}
342
343EOLIAN static void
344_efl_canvas_animation_player_efl_player_playback_position_set(Eo *eo_obj,
345 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED,
346 double sec)
347{
348 //TODO: this is not correct
349 if (!efl_playable_seekable_get(eo_obj))
350 return;
351
352 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
353 double length = efl_animation_duration_get(anim);
354 pd->progress = sec / length;
355
356 /* The previously applied map effect should be reset before applying the
357 * current map effect. Otherwise, the incrementally added map effects
358 * increase numerical error. */
359 efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj));
360 efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj));
361}
362
363EOLIAN static double
364_efl_canvas_animation_player_efl_player_playback_progress_get(const Eo *eo_obj EINA_UNUSED,
365 Efl_Canvas_Animation_Player_Data *pd)
366{
367 return pd->progress;
368}
369
370EOLIAN static void
371_efl_canvas_animation_player_efl_player_playback_speed_set(Eo *eo_obj EINA_UNUSED,
372 Efl_Canvas_Animation_Player_Data *pd,
373 double play_speed)
374{
375 //TODO: check reverse play case.
376 if (play_speed < 0)
377 return;
378 pd->play_speed = play_speed;
379}
380
381EOLIAN static double
382_efl_canvas_animation_player_efl_player_playback_speed_get(const Eo *eo_obj EINA_UNUSED,
383 Efl_Canvas_Animation_Player_Data *pd)
384{
385 return pd->play_speed;
386}
387
388EOLIAN static double
389_efl_canvas_animation_player_efl_playable_length_get(const Eo *eo_obj,
390 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
391{
392 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
393 return efl_playable_length_get(anim);
394}
395
396EOLIAN static Eina_Bool
397_efl_canvas_animation_player_efl_playable_seekable_get(const Eo *eo_obj EINA_UNUSED,
398 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
399{
400 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
401 return efl_playable_seekable_get(anim);
402}
403
404EOLIAN static Efl_Object *
405_efl_canvas_animation_player_efl_object_constructor(Eo *eo_obj,
406 Efl_Canvas_Animation_Player_Data *pd)
407{
408 eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
409
410 pd->time.begin = 0.0;
411 pd->time.current = 0.0;
412
413 pd->animation = NULL;
414
415 pd->progress = 0.0;
416
417 //pd->auto_del = EINA_TRUE;
418
419 return eo_obj;
420}
421
422EOLIAN static void
423_efl_canvas_animation_player_efl_object_destructor(Eo *eo_obj,
424 Efl_Canvas_Animation_Player_Data *pd)
425{
426 if (pd->animator)
427 {
428 ecore_animator_del(pd->animator);
429 pd->animator = NULL;
430
431 //Reset the state of the target to the initial state
432 efl_player_playing_set(eo_obj, EINA_FALSE);
433
434 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL);
435 }
436 efl_unref(pd->animation);
437
438 efl_destructor(efl_super(eo_obj, MY_CLASS));
439}
440
441EWAPI const Efl_Event_Description _EFL_ANIMATION_PLAYER_EVENT_PRE_STARTED =
442 EFL_EVENT_DESCRIPTION("pre_started");
443
444#include "efl_canvas_animation_player.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.eo b/src/lib/evas/canvas/efl_canvas_animation_player.eo
deleted file mode 100644
index 9a391cb..0000000
--- a/src/lib/evas/canvas/efl_canvas_animation_player.eo
+++ /dev/null
@@ -1,62 +0,0 @@
1class @beta Efl.Canvas.Animation_Player extends Efl.Object implements Efl.Player, Efl.Playable
2{
3 [[Player object for playing canvas animations.
4
5 This player object can be used to play animations on a @.target canvas object.
6 The type of animation depends on the @.animation object.
7 ]]
8 c_prefix: efl_animation_player;
9 methods {
10 @property animation {
11 [[The animation to play.
12
13 This animation object will be used to change the visual state of the @.target object.
14 ]]
15 values {
16 animation: Efl.Canvas.Animation; [[An already-configured animation object.]]
17 }
18 }
19 @property auto_del {
20 [[Auto delete property]]
21 set {
22 }
23 get {
24 }
25 values {
26 auto_del: bool; [[$true to delete animation object automatically when animation is finished or animation is
27 cancelled, $false otherwise.]]
28 }
29 }
30 @property target {
31 [[The canvas object to apply the effects of the @.animation object on.
32
33 The @.animation object can change several properties of the $target.
34 You should ensure that nothing else is trying to change them too.
35 ]]
36 values {
37 target: Efl.Canvas.Object; [[Canvas object to animate.]]
38 }
39 }
40 }
41 implements {
42 Efl.Object.constructor;
43 Efl.Object.destructor;
44 Efl.Player.playing { get; set; }
45 Efl.Player.paused { get; set; }
46 Efl.Playable.playable { get; }
47 Efl.Player.playback_position { get; set; }
48 Efl.Player.playback_progress { get;}
49 Efl.Player.playback_speed { get; set; }
50 //Efl.Player.volume { get; set; }
51 //Efl.Player.mute { get; set; }
52 Efl.Playable.length { get; }
53 Efl.Playable.seekable { get; }
54 }
55 events {
56 /* FIXME: This event is similar to Efl.Canvas.Object.anim_started but with different type, might be confusing. */
57 started: void; [[Animation is started.]]
58 running: Efl.Canvas.Object_Animation_Event; [[Animation is running.]]
59 /* FIXME: This event is similar to Efl.Canvas.Object.anim_ended but with different type, might be confusing. */
60 ended: void; [[Animation is ended.]]
61 }
62}
diff --git a/src/lib/evas/canvas/efl_canvas_animation_player_private.h b/src/lib/evas/canvas/efl_canvas_animation_player_private.h
deleted file mode 100644
index aff74db..0000000
--- a/src/lib/evas/canvas/efl_canvas_animation_player_private.h
+++ /dev/null
@@ -1,53 +0,0 @@
1#define EFL_ANIMATION_PLAYER_PROTECTED
2
3#include "evas_common_private.h"
4#include <Ecore.h>
5
6#define MY_CLASS EFL_CANVAS_ANIMATION_PLAYER_CLASS
7#define MY_CLASS_NAME efl_class_name_get(MY_CLASS)
8
9#if 0
10typedef struct _Target_State
11{
12 Evas_Coord x, y, w, h;
13 int r, g, b, a;
14
15 Evas_Map *map;
16 Eina_Bool enable_map : 1;
17} Target_State;
18#endif
19
20typedef struct _Efl_Canvas_Animation_Player_Data
21{
22 Ecore_Animator *animator;
23 Ecore_Timer *start_delay_timer;
24
25 struct {
26 double prev;
27 double begin;
28 double current;
29 double pause_begin;
30 } time;
31
32 Efl_Canvas_Animation *animation;
33 Efl_Canvas_Object *target;
34
35 double progress;
36 double play_speed;
37
38 int remaining_repeat_count;
39
40 Efl_Interpolator *interpolator;
41
42 Eina_Bool auto_del : 1;
43 Eina_Bool is_play : 1;
44 Eina_Bool is_paused : 1;
45 Eina_Bool keep_final_state : 1;
46 Eina_Bool is_direction_forward : 1;
47} Efl_Canvas_Animation_Player_Data;
48
49#define EFL_ANIMATION_PLAYER_DATA_GET(o, pd) \
50 Efl_Canvas_Animation_Player_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_PLAYER_CLASS)
51
52#define EFL_ANIMATION_PLAYER_ANIMATION_GET(o, anim) \
53 Efl_Canvas_Animation *anim = efl_animation_player_animation_get(o)
diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build
index c13d333..67134ca 100644
--- a/src/lib/evas/canvas/meson.build
+++ b/src/lib/evas/canvas/meson.build
@@ -39,7 +39,6 @@ pub_eo_files = [
39 'efl_canvas_animation_group.eo', 39 'efl_canvas_animation_group.eo',
40 'efl_canvas_animation_group_parallel.eo', 40 'efl_canvas_animation_group_parallel.eo',
41 'efl_canvas_animation_group_sequential.eo', 41 'efl_canvas_animation_group_sequential.eo',
42 'efl_canvas_animation_player.eo',
43 'efl_canvas_text_factory.eo', 42 'efl_canvas_text_factory.eo',
44 'efl_canvas_rectangle.eo', 43 'efl_canvas_rectangle.eo',
45 'efl_canvas_object.eo', 44 'efl_canvas_object.eo',
@@ -185,7 +184,6 @@ evas_src += files([
185 'efl_canvas_animation_group.c', 184 'efl_canvas_animation_group.c',
186 'efl_canvas_animation_group_parallel.c', 185 'efl_canvas_animation_group_parallel.c',
187 'efl_canvas_animation_group_sequential.c', 186 'efl_canvas_animation_group_sequential.c',
188 'efl_canvas_animation_player.c',
189 'efl_gfx_vg_value_provider.c', 187 'efl_gfx_vg_value_provider.c',
190 'efl_canvas_vg_object.c', 188 'efl_canvas_vg_object.c',
191 'efl_canvas_vg_node.c', 189 'efl_canvas_vg_node.c',