summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_canvas_animation_player.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-21 13:38:39 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-21 14:06:43 -0500
commita0a80fc74af9f874c67bb8388d2d7de5d9feb24e (patch)
tree5d6d102faa168428874dcbab4f5ab41b03bcd98e /src/lib/evas/canvas/efl_canvas_animation_player.c
parent7eb0375c0e0ad42f9e6be264c27cc5a04af054b7 (diff)
Efl.Animator: rename to Efl.Canvas.Animator
most C api remains unchanged ref T6714 ref T6716
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player.c (renamed from src/lib/evas/canvas/efl_animation_player.c)102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/lib/evas/canvas/efl_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c
index 50af3d33d6..032bf57de7 100644
--- a/src/lib/evas/canvas/efl_animation_player.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_player.c
@@ -1,15 +1,15 @@
1#include "efl_animation_player_private.h" 1#include "efl_canvas_animation_player_private.h"
2 2
3static void 3static void
4_target_del_cb(void *data, const Efl_Event *event EINA_UNUSED) 4_target_del_cb(void *data, const Efl_Event *event EINA_UNUSED)
5{ 5{
6 Efl_Animation_Player_Data *pd = data; 6 Efl_Canvas_Animation_Player_Data *pd = data;
7 pd->target = NULL; 7 pd->target = NULL;
8} 8}
9 9
10EOLIAN static void 10EOLIAN static void
11_efl_animation_player_target_set(Eo *eo_obj EINA_UNUSED, 11_efl_canvas_animation_player_target_set(Eo *eo_obj EINA_UNUSED,
12 Efl_Animation_Player_Data *pd, 12 Efl_Canvas_Animation_Player_Data *pd,
13 Efl_Canvas_Object *target) 13 Efl_Canvas_Object *target)
14{ 14{
15 efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, pd); 15 efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, pd);
@@ -18,35 +18,35 @@ _efl_animation_player_target_set(Eo *eo_obj EINA_UNUSED,
18} 18}
19 19
20EOLIAN static Efl_Canvas_Object * 20EOLIAN static Efl_Canvas_Object *
21_efl_animation_player_target_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Player_Data *pd) 21_efl_canvas_animation_player_target_get(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Player_Data *pd)
22{ 22{
23 return pd->target; 23 return pd->target;
24} 24}
25 25
26EOLIAN static void 26EOLIAN static void
27_efl_animation_player_auto_del_set(Eo *eo_obj EINA_UNUSED, 27_efl_canvas_animation_player_auto_del_set(Eo *eo_obj EINA_UNUSED,
28 Efl_Animation_Player_Data *pd, 28 Efl_Canvas_Animation_Player_Data *pd,
29 Eina_Bool auto_del) 29 Eina_Bool auto_del)
30{ 30{
31 pd->auto_del = auto_del; 31 pd->auto_del = auto_del;
32} 32}
33 33
34EOLIAN static Eina_Bool 34EOLIAN static Eina_Bool
35_efl_animation_player_auto_del_get(Eo *eo_obj EINA_UNUSED, 35_efl_canvas_animation_player_auto_del_get(Eo *eo_obj EINA_UNUSED,
36 Efl_Animation_Player_Data *pd) 36 Efl_Canvas_Animation_Player_Data *pd)
37{ 37{
38 return pd->auto_del; 38 return pd->auto_del;
39} 39}
40 40
41EOLIAN static void 41EOLIAN static void
42_efl_animation_player_animation_set(Eo *eo_obj, 42_efl_canvas_animation_player_animation_set(Eo *eo_obj,
43 Efl_Animation_Player_Data *pd, 43 Efl_Canvas_Animation_Player_Data *pd,
44 Efl_Animation *anim) 44 Efl_Canvas_Animation *anim)
45{ 45{
46 if (anim == pd->animation) 46 if (anim == pd->animation)
47 return; 47 return;
48 48
49 if (!efl_isa(anim, EFL_ANIMATION_CLASS)) 49 if (!efl_isa(anim, EFL_CANVAS_ANIMATION_CLASS))
50 { 50 {
51 ERR("Passed argument [%p]:[%s] is not an Efl.Animation", 51 ERR("Passed argument [%p]:[%s] is not an Efl.Animation",
52 anim, efl_class_name_get(efl_class_get(anim))); 52 anim, efl_class_name_get(efl_class_get(anim)));
@@ -62,9 +62,9 @@ _efl_animation_player_animation_set(Eo *eo_obj,
62 efl_ref(pd->animation); 62 efl_ref(pd->animation);
63} 63}
64 64
65EOLIAN static Efl_Animation * 65EOLIAN static Efl_Canvas_Animation *
66_efl_animation_player_animation_get(Eo *eo_obj EINA_UNUSED, 66_efl_canvas_animation_player_animation_get(Eo *eo_obj EINA_UNUSED,
67 Efl_Animation_Player_Data *pd) 67 Efl_Canvas_Animation_Player_Data *pd)
68{ 68{
69 return pd->animation; 69 return pd->animation;
70} 70}
@@ -105,7 +105,7 @@ _animator_cb(void *data)
105 105
106 efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj)); 106 efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj));
107 107
108 Efl_Animation_Player_Running_Event_Info event_info; 108 Efl_Canvas_Animation_Player_Running_Event_Info event_info;
109 event_info.progress = pd->progress; 109 event_info.progress = pd->progress;
110 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, 110 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING,
111 &event_info); 111 &event_info);
@@ -122,7 +122,7 @@ _animator_cb(void *data)
122 if (pd->remaining_repeat_count > 0) 122 if (pd->remaining_repeat_count > 0)
123 pd->remaining_repeat_count--; 123 pd->remaining_repeat_count--;
124 124
125 if (efl_animation_repeat_mode_get(anim) == EFL_ANIMATION_REPEAT_MODE_REVERSE) 125 if (efl_animation_repeat_mode_get(anim) == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE)
126 { 126 {
127 pd->is_direction_forward = !pd->is_direction_forward; 127 pd->is_direction_forward = !pd->is_direction_forward;
128 } 128 }
@@ -139,7 +139,7 @@ _animator_cb(void *data)
139} 139}
140 140
141static void 141static void
142_start(Eo *eo_obj, Efl_Animation_Player_Data *pd) 142_start(Eo *eo_obj, Efl_Canvas_Animation_Player_Data *pd)
143{ 143{
144 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); 144 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
145 145
@@ -175,8 +175,8 @@ _start_delay_timer_cb(void *data)
175} 175}
176 176
177EOLIAN static void 177EOLIAN static void
178_efl_animation_player_efl_player_start(Eo *eo_obj, 178_efl_canvas_animation_player_efl_player_start(Eo *eo_obj,
179 Efl_Animation_Player_Data *pd) 179 Efl_Canvas_Animation_Player_Data *pd)
180{ 180{
181 double start_delay; 181 double start_delay;
182 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); 182 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
@@ -199,8 +199,8 @@ _efl_animation_player_efl_player_start(Eo *eo_obj,
199} 199}
200 200
201EOLIAN static void 201EOLIAN static void
202_efl_animation_player_efl_player_stop(Eo *eo_obj, 202_efl_canvas_animation_player_efl_player_stop(Eo *eo_obj,
203 Efl_Animation_Player_Data *pd) 203 Efl_Canvas_Animation_Player_Data *pd)
204{ 204{
205 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); 205 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
206 Eina_Bool play = efl_player_play_get(eo_obj); 206 Eina_Bool play = efl_player_play_get(eo_obj);
@@ -209,7 +209,7 @@ _efl_animation_player_efl_player_stop(Eo *eo_obj,
209 efl_player_play_set(eo_obj, EINA_FALSE); 209 efl_player_play_set(eo_obj, EINA_FALSE);
210 //Reset the state of the target to the initial state 210 //Reset the state of the target to the initial state
211 if ((efl_animation_final_state_keep_get(anim)) && 211 if ((efl_animation_final_state_keep_get(anim)) &&
212 (efl_animation_repeat_mode_get(anim) != EFL_ANIMATION_REPEAT_MODE_REVERSE) && 212 (efl_animation_repeat_mode_get(anim) != EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) &&
213 (!(efl_animation_repeat_count_get(anim) & 1))) 213 (!(efl_animation_repeat_count_get(anim) & 1)))
214 { 214 {
215 pd->progress = 1.0; 215 pd->progress = 1.0;
@@ -231,8 +231,8 @@ _efl_animation_player_efl_player_stop(Eo *eo_obj,
231} 231}
232 232
233EOLIAN static void 233EOLIAN static void
234_efl_animation_player_efl_player_play_set(Eo *eo_obj, 234_efl_canvas_animation_player_efl_player_play_set(Eo *eo_obj,
235 Efl_Animation_Player_Data *pd, 235 Efl_Canvas_Animation_Player_Data *pd,
236 Eina_Bool play) 236 Eina_Bool play)
237{ 237{
238 if (efl_player_play_get(eo_obj) == !!play) 238 if (efl_player_play_get(eo_obj) == !!play)
@@ -259,35 +259,35 @@ _efl_animation_player_efl_player_play_set(Eo *eo_obj,
259} 259}
260 260
261EOLIAN static Eina_Bool 261EOLIAN static Eina_Bool
262_efl_animation_player_efl_player_play_get(Eo *eo_obj EINA_UNUSED, 262_efl_canvas_animation_player_efl_player_play_get(Eo *eo_obj EINA_UNUSED,
263 Efl_Animation_Player_Data *pd) 263 Efl_Canvas_Animation_Player_Data *pd)
264{ 264{
265 return pd->is_play; 265 return pd->is_play;
266} 266}
267 267
268EOLIAN static Eina_Bool 268EOLIAN static Eina_Bool
269_efl_animation_player_efl_player_playable_get(Eo *eo_obj, 269_efl_canvas_animation_player_efl_player_playable_get(Eo *eo_obj,
270 Efl_Animation_Player_Data *pd EINA_UNUSED) 270 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
271{ 271{
272 Efl_Animation *anim = efl_animation_player_animation_get(eo_obj); 272 Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj);
273 273
274 return efl_playable_get(anim); 274 return efl_playable_get(anim);
275} 275}
276 276
277EOLIAN static double 277EOLIAN static double
278_efl_animation_player_efl_player_pos_get(Eo *eo_obj, 278_efl_canvas_animation_player_efl_player_pos_get(Eo *eo_obj,
279 Efl_Animation_Player_Data *pd EINA_UNUSED) 279 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
280{ 280{
281 //TODO: this is not correct 281 //TODO: this is not correct
282 Efl_Animation *anim = efl_animation_player_animation_get(eo_obj); 282 Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj);
283 double length = efl_player_length_get(anim); 283 double length = efl_player_length_get(anim);
284 284
285 return length * efl_player_progress_get(anim); 285 return length * efl_player_progress_get(anim);
286} 286}
287 287
288EOLIAN static void 288EOLIAN static void
289_efl_animation_player_efl_player_pos_set(Eo *eo_obj, 289_efl_canvas_animation_player_efl_player_pos_set(Eo *eo_obj,
290 Efl_Animation_Player_Data *pd EINA_UNUSED, 290 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED,
291 double sec) 291 double sec)
292{ 292{
293 //TODO: this is not correct 293 //TODO: this is not correct
@@ -301,15 +301,15 @@ _efl_animation_player_efl_player_pos_set(Eo *eo_obj,
301} 301}
302 302
303EOLIAN static double 303EOLIAN static double
304_efl_animation_player_efl_player_progress_get(Eo *eo_obj EINA_UNUSED, 304_efl_canvas_animation_player_efl_player_progress_get(Eo *eo_obj EINA_UNUSED,
305 Efl_Animation_Player_Data *pd) 305 Efl_Canvas_Animation_Player_Data *pd)
306{ 306{
307 return pd->progress; 307 return pd->progress;
308} 308}
309 309
310EOLIAN static void 310EOLIAN static void
311_efl_animation_player_efl_player_play_speed_set(Eo *eo_obj EINA_UNUSED, 311_efl_canvas_animation_player_efl_player_play_speed_set(Eo *eo_obj EINA_UNUSED,
312 Efl_Animation_Player_Data *pd, 312 Efl_Canvas_Animation_Player_Data *pd,
313 double play_speed) 313 double play_speed)
314{ 314{
315 //TODO: check reverse play case. 315 //TODO: check reverse play case.
@@ -319,31 +319,31 @@ _efl_animation_player_efl_player_play_speed_set(Eo *eo_obj EINA_UNUSED,
319} 319}
320 320
321EOLIAN static double 321EOLIAN static double
322_efl_animation_player_efl_player_play_speed_get(Eo *eo_obj EINA_UNUSED, 322_efl_canvas_animation_player_efl_player_play_speed_get(Eo *eo_obj EINA_UNUSED,
323 Efl_Animation_Player_Data *pd) 323 Efl_Canvas_Animation_Player_Data *pd)
324{ 324{
325 return pd->play_speed; 325 return pd->play_speed;
326} 326}
327 327
328EOLIAN static double 328EOLIAN static double
329_efl_animation_player_efl_player_length_get(Eo *eo_obj, 329_efl_canvas_animation_player_efl_player_length_get(Eo *eo_obj,
330 Efl_Animation_Player_Data *pd EINA_UNUSED) 330 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
331{ 331{
332 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); 332 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
333 return efl_playable_length_get(anim); 333 return efl_playable_length_get(anim);
334} 334}
335 335
336EOLIAN static Eina_Bool 336EOLIAN static Eina_Bool
337_efl_animation_player_efl_player_seekable_get(Eo *eo_obj EINA_UNUSED, 337_efl_canvas_animation_player_efl_player_seekable_get(Eo *eo_obj EINA_UNUSED,
338 Efl_Animation_Player_Data *pd EINA_UNUSED) 338 Efl_Canvas_Animation_Player_Data *pd EINA_UNUSED)
339{ 339{
340 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); 340 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
341 return efl_playable_seekable_get(anim); 341 return efl_playable_seekable_get(anim);
342} 342}
343 343
344EOLIAN static Efl_Object * 344EOLIAN static Efl_Object *
345_efl_animation_player_efl_object_constructor(Eo *eo_obj, 345_efl_canvas_animation_player_efl_object_constructor(Eo *eo_obj,
346 Efl_Animation_Player_Data *pd) 346 Efl_Canvas_Animation_Player_Data *pd)
347{ 347{
348 eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); 348 eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS));
349 349
@@ -360,8 +360,8 @@ _efl_animation_player_efl_object_constructor(Eo *eo_obj,
360} 360}
361 361
362EOLIAN static void 362EOLIAN static void
363_efl_animation_player_efl_object_destructor(Eo *eo_obj, 363_efl_canvas_animation_player_efl_object_destructor(Eo *eo_obj,
364 Efl_Animation_Player_Data *pd) 364 Efl_Canvas_Animation_Player_Data *pd)
365{ 365{
366 if (pd->animator) 366 if (pd->animator)
367 { 367 {
@@ -381,4 +381,4 @@ _efl_animation_player_efl_object_destructor(Eo *eo_obj,
381EWAPI const Efl_Event_Description _EFL_ANIMATION_PLAYER_EVENT_PRE_STARTED = 381EWAPI const Efl_Event_Description _EFL_ANIMATION_PLAYER_EVENT_PRE_STARTED =
382 EFL_EVENT_DESCRIPTION("pre_started"); 382 EFL_EVENT_DESCRIPTION("pre_started");
383 383
384#include "efl_animation_player.eo.c" 384#include "efl_canvas_animation_player.eo.c"