summaryrefslogtreecommitdiff
path: root/src/examples/evas
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-18 11:44:15 +0900
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-20 10:03:47 +0100
commit80e58dd79ad98267d2069a62661e6ae4db6bf11f (patch)
tree7fb371bd0240c6132662a5bbebe9e9b9a6f36ebc /src/examples/evas
parentd4c004ab5db3bb97ee05a3bb0f8c4d70a26a3c60 (diff)
downloadefl-80e58dd79ad98267d2069a62661e6ae4db6bf11f.tar.gz
evas: migrate the vg json example
Summary: i was not able to run the example before this commit, nor after this commit. However, i had to migrate this, as i want to remove the player object. Depends on D10637 Reviewers: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Reviewed-by: Hermet Park <hermetpark@gmail.com> Differential Revision: https://phab.enlightenment.org/D10666
Diffstat (limited to 'src/examples/evas')
-rw-r--r--src/examples/evas/evas-vg-json.c12
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 @@
static Eo *gvg[5];
static void
-running_cb(void *data EINA_UNUSED, const Efl_Event *event)
+_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
{
- Efl_Canvas_Animation_Player_Event_Running *event_running = event->info;
- double progress = event_running->progress;
+ double progress = *((double*)event->info);
int i;
for (i = 0; i < 5; i++)
@@ -120,11 +119,8 @@ main(void)
//Play custom animation
Eo *anim = efl_add(EFL_CANVAS_ANIMATION_CLASS, evas);
efl_animation_duration_set(anim, efl_gfx_frame_controller_frame_duration_get(vg, 0, 0));
-
- Eo *player = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, evas);
- efl_animation_player_animation_set(player, anim);
- efl_event_callback_add(player, EFL_ANIMATION_PLAYER_EVENT_RUNNING, running_cb, NULL);
- efl_player_playing_set(player, EINA_TRUE);
+ efl_event_callback_add(vg, EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _running_cb, NULL);
+ efl_canvas_object_animation_start(vg, anim, 1.0, 0.0);
ecore_main_loop_begin();
ecore_evas_shutdown();