aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bin/elementary/test_efl_anim_alpha.c4
-rw-r--r--src/bin/elementary/test_efl_anim_event_anim.c4
-rw-r--r--src/bin/elementary/test_efl_anim_group_parallel.c16
-rw-r--r--src/bin/elementary/test_efl_anim_group_sequential.c16
-rw-r--r--src/bin/elementary/test_efl_anim_interpolator.c2
-rw-r--r--src/bin/elementary/test_efl_anim_pause.c4
-rw-r--r--src/bin/elementary/test_efl_anim_repeat.c4
-rw-r--r--src/bin/elementary/test_efl_anim_rotate.c12
-rw-r--r--src/bin/elementary/test_efl_anim_scale.c12
-rw-r--r--src/bin/elementary/test_efl_anim_start_delay.c4
-rw-r--r--src/bin/elementary/test_efl_anim_translate.c8
-rw-r--r--src/lib/evas/canvas/efl_animation_group.c17
-rw-r--r--src/lib/evas/canvas/efl_animation_player.c12
13 files changed, 65 insertions, 50 deletions
diff --git a/src/bin/elementary/test_efl_anim_alpha.c b/src/bin/elementary/test_efl_anim_alpha.c
index 856b024781..90e0f43fc8 100644
--- a/src/bin/elementary/test_efl_anim_alpha.c
+++ b/src/bin/elementary/test_efl_anim_alpha.c
@@ -83,13 +83,13 @@ test_efl_anim_alpha(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
evas_object_show(btn);
//Show Animation
- Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 1.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
//Hide Animation
- Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 1.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
diff --git a/src/bin/elementary/test_efl_anim_event_anim.c b/src/bin/elementary/test_efl_anim_event_anim.c
index dd24c92ed6..88c465ef03 100644
--- a/src/bin/elementary/test_efl_anim_event_anim.c
+++ b/src/bin/elementary/test_efl_anim_event_anim.c
@@ -57,7 +57,7 @@ test_efl_anim_event_anim(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
evas_object_move(btn, 100, 50);
//Show Animation
- Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 1.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
@@ -67,7 +67,7 @@ test_efl_anim_event_anim(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
evas_object_show(btn);
//Hide Animation
- Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 1.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
diff --git a/src/bin/elementary/test_efl_anim_group_parallel.c b/src/bin/elementary/test_efl_anim_group_parallel.c
index d9a34031e3..1250d223ca 100644
--- a/src/bin/elementary/test_efl_anim_group_parallel.c
+++ b/src/bin/elementary/test_efl_anim_group_parallel.c
@@ -85,19 +85,19 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
//Show Animation
- Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
//Rotate from 45 to 0 degrees Animation
- Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5);
//Scale Animation to zoom out
- Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5);
//Show Parallel Group Animation
- Efl_Animation *parallel_show_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, NULL);
+ Efl_Animation *parallel_show_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, win);
efl_animation_duration_set(parallel_show_anim, 1.0);
efl_animation_final_state_keep_set(parallel_show_anim, EINA_TRUE);
@@ -108,19 +108,19 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
//Hide Animation
- Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
//Rotate from 0 to 45 degrees Animation
- Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5);
//Scale Animation to zoom in
- Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5);
//Hide Parallel Group Animation
- Efl_Animation *parallel_hide_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, NULL);
+ Efl_Animation *parallel_hide_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, win);
efl_animation_duration_set(parallel_hide_anim, 1.0);
efl_animation_final_state_keep_set(parallel_hide_anim, EINA_TRUE);
diff --git a/src/bin/elementary/test_efl_anim_group_sequential.c b/src/bin/elementary/test_efl_anim_group_sequential.c
index 567390a292..abb6056f01 100644
--- a/src/bin/elementary/test_efl_anim_group_sequential.c
+++ b/src/bin/elementary/test_efl_anim_group_sequential.c
@@ -85,19 +85,19 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
/* Animations to hide button */
//Rotate from 0 to 45 degrees Animation
- Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5);
//Scale Animation to zoom in
- Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5);
//Hide Animation
- Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
//Hide Sequential Group Animation
- Efl_Animation *sequential_hide_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, NULL);
+ Efl_Animation *sequential_hide_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, win);
efl_animation_duration_set(sequential_hide_anim, 1.0);
efl_animation_final_state_keep_set(sequential_hide_anim, EINA_TRUE);
@@ -109,22 +109,22 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
/* Animations to show button */
//Show Animation
- Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 1.0);
//Scale Animation to zoom out
- Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5);
efl_animation_duration_set(scale_half_anim, 1.0);
//Rotate from 45 to 0 degrees Animation
- Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5);
efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
//Show Sequential Group Animation
- Efl_Animation *sequential_show_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, NULL);
+ Efl_Animation *sequential_show_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, win);
efl_animation_final_state_keep_set(sequential_show_anim, EINA_TRUE);
//efl_animation_duration_set() is called for each animation not to set the same duration
diff --git a/src/bin/elementary/test_efl_anim_interpolator.c b/src/bin/elementary/test_efl_anim_interpolator.c
index e3dbb68139..097d030b98 100644
--- a/src/bin/elementary/test_efl_anim_interpolator.c
+++ b/src/bin/elementary/test_efl_anim_interpolator.c
@@ -184,7 +184,7 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
evas_object_smart_callback_add(btn, "clicked", _anim_start, ad);
ad->btn[i] = btn;
- Efl_Animation *anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL);
+ Efl_Animation *anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
efl_animation_translate_set(anim, 0, 0, (WIN_W - BTN_W), 0);
efl_animation_duration_set(anim, 2.0);
efl_animation_final_state_keep_set(anim, EINA_FALSE);
diff --git a/src/bin/elementary/test_efl_anim_pause.c b/src/bin/elementary/test_efl_anim_pause.c
index 5bd382cc0d..ae5b3a50ed 100644
--- a/src/bin/elementary/test_efl_anim_pause.c
+++ b/src/bin/elementary/test_efl_anim_pause.c
@@ -120,13 +120,13 @@ test_efl_anim_pause(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
evas_object_show(btn);
//Show Animation
- Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 2.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
//Hide Animation
- Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 2.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
diff --git a/src/bin/elementary/test_efl_anim_repeat.c b/src/bin/elementary/test_efl_anim_repeat.c
index 310ff5221d..47da4f1a92 100644
--- a/src/bin/elementary/test_efl_anim_repeat.c
+++ b/src/bin/elementary/test_efl_anim_repeat.c
@@ -136,13 +136,13 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
evas_object_show(btn);
//Show Animation
- Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 1.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
//Hide Animation
- Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 1.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
diff --git a/src/bin/elementary/test_efl_anim_rotate.c b/src/bin/elementary/test_efl_anim_rotate.c
index 6914514c59..888e7ef1e4 100644
--- a/src/bin/elementary/test_efl_anim_rotate.c
+++ b/src/bin/elementary/test_efl_anim_rotate.c
@@ -83,13 +83,13 @@ test_efl_anim_rotate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
evas_object_show(btn);
//Rotate from 0 to 45 degrees Animation
- Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0,NULL, 0.5, 0.5);
efl_animation_duration_set(cw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
//Rotate from 45 to 0 degrees Animation
- Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5);
efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);
@@ -150,13 +150,13 @@ test_efl_anim_rotate_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
evas_object_show(pivot);
//Rotate from 0 to 45 degrees Animation
- Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, pivot, 0.5, 0.5);
efl_animation_duration_set(cw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
//Rotate from 45 to 0 degrees Animation
- Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, pivot, 0.5, 0.5);
efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);
@@ -218,13 +218,13 @@ test_efl_anim_rotate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
evas_object_show(abs_center);
//Rotate from 0 to 45 degrees Animation
- Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_absolute_set(cw_45_degrees_anim, 0.0, 45.0, 0, 0);
efl_animation_duration_set(cw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
//Rotate from 45 to 0 degrees Animation
- Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL);
+ Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
efl_animation_rotate_absolute_set(ccw_45_degrees_anim, 45.0, 0.0, 0, 0);
efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);
diff --git a/src/bin/elementary/test_efl_anim_scale.c b/src/bin/elementary/test_efl_anim_scale.c
index 258c847cf6..41d1c88b60 100644
--- a/src/bin/elementary/test_efl_anim_scale.c
+++ b/src/bin/elementary/test_efl_anim_scale.c
@@ -83,13 +83,13 @@ test_efl_anim_scale(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
evas_object_show(btn);
//Scale Animation to zoom in
- Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5);
efl_animation_duration_set(scale_double_anim, 1.0);
efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
//Scale Animation to zoom out
- Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5);
efl_animation_duration_set(scale_half_anim, 1.0);
efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
@@ -152,13 +152,13 @@ test_efl_anim_scale_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
evas_object_show(pivot);
//Scale Animation to zoom in
- Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, pivot, 0.5, 0.5);
efl_animation_duration_set(scale_double_anim, 1.0);
efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
//Scale Animation to zoom out
- Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, pivot, 0.5, 0.5);
efl_animation_duration_set(scale_half_anim, 1.0);
efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
@@ -218,13 +218,13 @@ test_efl_anim_scale_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
evas_object_show(abs_center);
//Scale Animation to zoom in
- Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_absolute_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, 0, 0);
efl_animation_duration_set(scale_double_anim, 1.0);
efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
//Scale Animation to zoom out
- Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL);
+ Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
efl_animation_scale_absolute_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, 0, 0);
efl_animation_duration_set(scale_half_anim, 1.0);
efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
diff --git a/src/bin/elementary/test_efl_anim_start_delay.c b/src/bin/elementary/test_efl_anim_start_delay.c
index b2f9b34da9..06101e2eeb 100644
--- a/src/bin/elementary/test_efl_anim_start_delay.c
+++ b/src/bin/elementary/test_efl_anim_start_delay.c
@@ -98,13 +98,13 @@ test_efl_anim_start_delay(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
evas_object_show(btn);
//Show Animation
- Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(show_anim, 0.0, 1.0);
efl_animation_duration_set(show_anim, 1.0);
efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
//Hide Animation
- Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL);
+ Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
efl_animation_alpha_set(hide_anim, 1.0, 0.0);
efl_animation_duration_set(hide_anim, 1.0);
efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
diff --git a/src/bin/elementary/test_efl_anim_translate.c b/src/bin/elementary/test_efl_anim_translate.c
index 972d3e46cc..2ba1ff4e19 100644
--- a/src/bin/elementary/test_efl_anim_translate.c
+++ b/src/bin/elementary/test_efl_anim_translate.c
@@ -83,13 +83,13 @@ test_efl_anim_translate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
evas_object_show(btn);
//Translate Animation to right bottom relatively
- Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL);
+ Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
efl_animation_translate_set(translate_rb_anim, 0, 0, 100, 100);
efl_animation_duration_set(translate_rb_anim, 1.0);
efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE);
//Translate Animation to left top relatively
- Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL);
+ Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
efl_animation_translate_set(translate_lt_anim, 100, 100, 0, 0);
efl_animation_duration_set(translate_lt_anim, 1.0);
efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE);
@@ -149,13 +149,13 @@ test_efl_anim_translate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_U
evas_object_show(abs_center);
//Translate Animation to right bottom absolutely
- Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL);
+ Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
efl_animation_translate_absolute_set(translate_rb_anim, 0, 0, 100, 100);
efl_animation_duration_set(translate_rb_anim, 1.0);
efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE);
//Translate Animation to left top absolutely
- Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL);
+ Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
efl_animation_translate_absolute_set(translate_lt_anim, 100, 100, 0, 0);
efl_animation_duration_set(translate_lt_anim, 1.0);
efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE);
diff --git a/src/lib/evas/canvas/efl_animation_group.c b/src/lib/evas/canvas/efl_animation_group.c
index d7b9e1b57a..0aef2eac51 100644
--- a/src/lib/evas/canvas/efl_animation_group.c
+++ b/src/lib/evas/canvas/efl_animation_group.c
@@ -17,6 +17,7 @@ _efl_animation_group_animation_add(Eo *eo_obj,
efl_animation_final_state_keep_set(animation, keep_final_state);
pd->animations = eina_list_append(pd->animations, animation);
+ efl_ref(animation);
}
EOLIAN static void
@@ -24,9 +25,19 @@ _efl_animation_group_animation_del(Eo *eo_obj EINA_UNUSED,
Efl_Animation_Group_Data *pd,
Efl_Animation*animation)
{
+ Eina_List *list;
if (!animation) return;
- pd->animations = eina_list_remove(pd->animations, animation);
+ list = eina_list_data_find_list(pd->animations, animation);
+ if (list)
+ {
+ pd->animations = eina_list_remove_list(pd->animations, list);
+ efl_unref(animation);
+ }
+ else
+ {
+ ERR("Animation(%p) is not in the group animation.");
+ }
}
EOLIAN static Eina_List *
@@ -106,8 +117,8 @@ _efl_animation_group_efl_object_destructor(Eo *eo_obj,
{
Efl_Animation *anim;
- EINA_LIST_FREE(pd->animations, anim)
- efl_del(anim);
+ EINA_LIST_FREE(pd->animations, anim);
+ efl_unref(anim);
efl_destructor(efl_super(eo_obj, MY_CLASS));
}
diff --git a/src/lib/evas/canvas/efl_animation_player.c b/src/lib/evas/canvas/efl_animation_player.c
index 491014c8c7..8b31524f34 100644
--- a/src/lib/evas/canvas/efl_animation_player.c
+++ b/src/lib/evas/canvas/efl_animation_player.c
@@ -53,9 +53,13 @@ _efl_animation_player_animation_set(Eo *eo_obj,
return;
}
- if (pd->animation && efl_player_play_get(eo_obj))
- efl_player_stop(eo_obj);
+ if (pd->animation)
+ {
+ efl_player_stop(eo_obj);
+ efl_unref(pd->animation);
+ }
pd->animation = anim;
+ efl_ref(pd->animation);
}
EOLIAN static Efl_Animation *
@@ -365,11 +369,11 @@ _efl_animation_player_efl_object_destructor(Eo *eo_obj,
pd->animator = NULL;
//Reset the state of the target to the initial state
- if (!pd->keep_final_state)
- efl_player_stop(eo_obj);
+ efl_player_stop(eo_obj);
efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL);
}
+ efl_unref(pd->animation);
efl_destructor(efl_super(eo_obj, MY_CLASS));
}