diff options
Diffstat (limited to 'src/examples/evas/evas-vg-json.c')
-rw-r--r-- | src/examples/evas/evas-vg-json.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/examples/evas/evas-vg-json.c b/src/examples/evas/evas-vg-json.c index 248dcb1054..cf0519f6f3 100644 --- a/src/examples/evas/evas-vg-json.c +++ b/src/examples/evas/evas-vg-json.c | |||
@@ -35,10 +35,9 @@ | |||
35 | static Eo *gvg[5]; | 35 | static Eo *gvg[5]; |
36 | 36 | ||
37 | static void | 37 | static void |
38 | running_cb(void *data EINA_UNUSED, const Efl_Event *event) | 38 | _running_cb(void *data EINA_UNUSED, const Efl_Event *event) |
39 | { | 39 | { |
40 | Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; | 40 | double progress = *((double*)event->info); |
41 | double progress = event_running->progress; | ||
42 | 41 | ||
43 | int i; | 42 | int i; |
44 | for (i = 0; i < 5; i++) | 43 | for (i = 0; i < 5; i++) |
@@ -120,11 +119,8 @@ main(void) | |||
120 | //Play custom animation | 119 | //Play custom animation |
121 | Eo *anim = efl_add(EFL_CANVAS_ANIMATION_CLASS, evas); | 120 | Eo *anim = efl_add(EFL_CANVAS_ANIMATION_CLASS, evas); |
122 | efl_animation_duration_set(anim, efl_gfx_frame_controller_frame_duration_get(vg, 0, 0)); | 121 | efl_animation_duration_set(anim, efl_gfx_frame_controller_frame_duration_get(vg, 0, 0)); |
123 | 122 | efl_event_callback_add(vg, EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _running_cb, NULL); | |
124 | Eo *player = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, evas); | 123 | efl_canvas_object_animation_start(vg, anim, 1.0, 0.0); |
125 | efl_animation_player_animation_set(player, anim); | ||
126 | efl_event_callback_add(player, EFL_ANIMATION_PLAYER_EVENT_RUNNING, running_cb, NULL); | ||
127 | efl_player_playing_set(player, EINA_TRUE); | ||
128 | 124 | ||
129 | ecore_main_loop_begin(); | 125 | ecore_main_loop_begin(); |
130 | ecore_evas_shutdown(); | 126 | ecore_evas_shutdown(); |