summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2018-01-08 20:32:56 +0900
committerSungtaek Hong <sth253.hong@samsung.com>2018-01-15 11:35:27 +0900
commit65354e025d091e842e6d3e08bc21bb1f88d92be6 (patch)
treed4991c98dbb93650cd23132df1626ab5502bb923
parentbe8618319aba4f9de06b9fb6f66772f28d435eb8 (diff)
efl_animation: add ref to anim in player when anim is setdevs/taxi2se/efl_playable
-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 *
83 evas_object_show(btn); 83 evas_object_show(btn);
84 84
85 //Show Animation 85 //Show Animation
86 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 86 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
87 efl_animation_alpha_set(show_anim, 0.0, 1.0); 87 efl_animation_alpha_set(show_anim, 0.0, 1.0);
88 efl_animation_duration_set(show_anim, 1.0); 88 efl_animation_duration_set(show_anim, 1.0);
89 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 89 efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
90 90
91 //Hide Animation 91 //Hide Animation
92 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 92 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
93 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 93 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
94 efl_animation_duration_set(hide_anim, 1.0); 94 efl_animation_duration_set(hide_anim, 1.0);
95 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 95 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
57 evas_object_move(btn, 100, 50); 57 evas_object_move(btn, 100, 50);
58 58
59 //Show Animation 59 //Show Animation
60 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 60 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
61 efl_animation_alpha_set(show_anim, 0.0, 1.0); 61 efl_animation_alpha_set(show_anim, 0.0, 1.0);
62 efl_animation_duration_set(show_anim, 1.0); 62 efl_animation_duration_set(show_anim, 1.0);
63 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 63 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
67 evas_object_show(btn); 67 evas_object_show(btn);
68 68
69 //Hide Animation 69 //Hide Animation
70 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 70 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
71 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 71 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
72 efl_animation_duration_set(hide_anim, 1.0); 72 efl_animation_duration_set(hide_anim, 1.0);
73 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 73 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
85 85
86 86
87 //Show Animation 87 //Show Animation
88 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 88 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
89 efl_animation_alpha_set(show_anim, 0.0, 1.0); 89 efl_animation_alpha_set(show_anim, 0.0, 1.0);
90 90
91 //Rotate from 45 to 0 degrees Animation 91 //Rotate from 45 to 0 degrees Animation
92 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 92 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
93 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5); 93 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5);
94 94
95 //Scale Animation to zoom out 95 //Scale Animation to zoom out
96 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 96 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
97 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); 97 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5);
98 98
99 //Show Parallel Group Animation 99 //Show Parallel Group Animation
100 Efl_Animation *parallel_show_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, NULL); 100 Efl_Animation *parallel_show_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, win);
101 efl_animation_duration_set(parallel_show_anim, 1.0); 101 efl_animation_duration_set(parallel_show_anim, 1.0);
102 efl_animation_final_state_keep_set(parallel_show_anim, EINA_TRUE); 102 efl_animation_final_state_keep_set(parallel_show_anim, EINA_TRUE);
103 103
@@ -108,19 +108,19 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
108 108
109 109
110 //Hide Animation 110 //Hide Animation
111 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 111 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
112 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 112 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
113 113
114 //Rotate from 0 to 45 degrees Animation 114 //Rotate from 0 to 45 degrees Animation
115 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 115 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
116 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5); 116 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5);
117 117
118 //Scale Animation to zoom in 118 //Scale Animation to zoom in
119 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 119 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
120 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 120 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5);
121 121
122 //Hide Parallel Group Animation 122 //Hide Parallel Group Animation
123 Efl_Animation *parallel_hide_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, NULL); 123 Efl_Animation *parallel_hide_anim = efl_add(EFL_ANIMATION_GROUP_PARALLEL_CLASS, win);
124 efl_animation_duration_set(parallel_hide_anim, 1.0); 124 efl_animation_duration_set(parallel_hide_anim, 1.0);
125 efl_animation_final_state_keep_set(parallel_hide_anim, EINA_TRUE); 125 efl_animation_final_state_keep_set(parallel_hide_anim, EINA_TRUE);
126 126
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
85 85
86 /* Animations to hide button */ 86 /* Animations to hide button */
87 //Rotate from 0 to 45 degrees Animation 87 //Rotate from 0 to 45 degrees Animation
88 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 88 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
89 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5); 89 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5);
90 90
91 //Scale Animation to zoom in 91 //Scale Animation to zoom in
92 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 92 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
93 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 93 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5);
94 94
95 //Hide Animation 95 //Hide Animation
96 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 96 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
97 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 97 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
98 98
99 //Hide Sequential Group Animation 99 //Hide Sequential Group Animation
100 Efl_Animation *sequential_hide_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, NULL); 100 Efl_Animation *sequential_hide_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, win);
101 efl_animation_duration_set(sequential_hide_anim, 1.0); 101 efl_animation_duration_set(sequential_hide_anim, 1.0);
102 efl_animation_final_state_keep_set(sequential_hide_anim, EINA_TRUE); 102 efl_animation_final_state_keep_set(sequential_hide_anim, EINA_TRUE);
103 103
@@ -109,22 +109,22 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
109 109
110 /* Animations to show button */ 110 /* Animations to show button */
111 //Show Animation 111 //Show Animation
112 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 112 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
113 efl_animation_alpha_set(show_anim, 0.0, 1.0); 113 efl_animation_alpha_set(show_anim, 0.0, 1.0);
114 efl_animation_duration_set(show_anim, 1.0); 114 efl_animation_duration_set(show_anim, 1.0);
115 115
116 //Scale Animation to zoom out 116 //Scale Animation to zoom out
117 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 117 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
118 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); 118 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5);
119 efl_animation_duration_set(scale_half_anim, 1.0); 119 efl_animation_duration_set(scale_half_anim, 1.0);
120 120
121 //Rotate from 45 to 0 degrees Animation 121 //Rotate from 45 to 0 degrees Animation
122 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 122 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
123 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5); 123 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5);
124 efl_animation_duration_set(ccw_45_degrees_anim, 1.0); 124 efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
125 125
126 //Show Sequential Group Animation 126 //Show Sequential Group Animation
127 Efl_Animation *sequential_show_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, NULL); 127 Efl_Animation *sequential_show_anim = efl_add(EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS, win);
128 efl_animation_final_state_keep_set(sequential_show_anim, EINA_TRUE); 128 efl_animation_final_state_keep_set(sequential_show_anim, EINA_TRUE);
129 //efl_animation_duration_set() is called for each animation not to set the same duration 129 //efl_animation_duration_set() is called for each animation not to set the same duration
130 130
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,
184 evas_object_smart_callback_add(btn, "clicked", _anim_start, ad); 184 evas_object_smart_callback_add(btn, "clicked", _anim_start, ad);
185 ad->btn[i] = btn; 185 ad->btn[i] = btn;
186 186
187 Efl_Animation *anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL); 187 Efl_Animation *anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
188 efl_animation_translate_set(anim, 0, 0, (WIN_W - BTN_W), 0); 188 efl_animation_translate_set(anim, 0, 0, (WIN_W - BTN_W), 0);
189 efl_animation_duration_set(anim, 2.0); 189 efl_animation_duration_set(anim, 2.0);
190 efl_animation_final_state_keep_set(anim, EINA_FALSE); 190 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 *
120 evas_object_show(btn); 120 evas_object_show(btn);
121 121
122 //Show Animation 122 //Show Animation
123 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 123 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
124 efl_animation_alpha_set(show_anim, 0.0, 1.0); 124 efl_animation_alpha_set(show_anim, 0.0, 1.0);
125 efl_animation_duration_set(show_anim, 2.0); 125 efl_animation_duration_set(show_anim, 2.0);
126 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 126 efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
127 127
128 //Hide Animation 128 //Hide Animation
129 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 129 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
130 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 130 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
131 efl_animation_duration_set(hide_anim, 2.0); 131 efl_animation_duration_set(hide_anim, 2.0);
132 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 132 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
136 evas_object_show(btn); 136 evas_object_show(btn);
137 137
138 //Show Animation 138 //Show Animation
139 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 139 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
140 efl_animation_alpha_set(show_anim, 0.0, 1.0); 140 efl_animation_alpha_set(show_anim, 0.0, 1.0);
141 efl_animation_duration_set(show_anim, 1.0); 141 efl_animation_duration_set(show_anim, 1.0);
142 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 142 efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
143 143
144 //Hide Animation 144 //Hide Animation
145 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 145 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
146 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 146 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
147 efl_animation_duration_set(hide_anim, 1.0); 147 efl_animation_duration_set(hide_anim, 1.0);
148 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 148 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
83 evas_object_show(btn); 83 evas_object_show(btn);
84 84
85 //Rotate from 0 to 45 degrees Animation 85 //Rotate from 0 to 45 degrees Animation
86 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 86 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
87 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0,NULL, 0.5, 0.5); 87 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0,NULL, 0.5, 0.5);
88 efl_animation_duration_set(cw_45_degrees_anim, 1.0); 88 efl_animation_duration_set(cw_45_degrees_anim, 1.0);
89 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); 89 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
90 90
91 //Rotate from 45 to 0 degrees Animation 91 //Rotate from 45 to 0 degrees Animation
92 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 92 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
93 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5); 93 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5);
94 efl_animation_duration_set(ccw_45_degrees_anim, 1.0); 94 efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
95 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); 95 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
150 evas_object_show(pivot); 150 evas_object_show(pivot);
151 151
152 //Rotate from 0 to 45 degrees Animation 152 //Rotate from 0 to 45 degrees Animation
153 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 153 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
154 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, pivot, 0.5, 0.5); 154 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, pivot, 0.5, 0.5);
155 efl_animation_duration_set(cw_45_degrees_anim, 1.0); 155 efl_animation_duration_set(cw_45_degrees_anim, 1.0);
156 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); 156 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
157 157
158 //Rotate from 45 to 0 degrees Animation 158 //Rotate from 45 to 0 degrees Animation
159 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 159 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
160 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, pivot, 0.5, 0.5); 160 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, pivot, 0.5, 0.5);
161 efl_animation_duration_set(ccw_45_degrees_anim, 1.0); 161 efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
162 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); 162 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
218 evas_object_show(abs_center); 218 evas_object_show(abs_center);
219 219
220 //Rotate from 0 to 45 degrees Animation 220 //Rotate from 0 to 45 degrees Animation
221 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 221 Efl_Animation *cw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
222 efl_animation_rotate_absolute_set(cw_45_degrees_anim, 0.0, 45.0, 0, 0); 222 efl_animation_rotate_absolute_set(cw_45_degrees_anim, 0.0, 45.0, 0, 0);
223 efl_animation_duration_set(cw_45_degrees_anim, 1.0); 223 efl_animation_duration_set(cw_45_degrees_anim, 1.0);
224 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); 224 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
225 225
226 //Rotate from 45 to 0 degrees Animation 226 //Rotate from 45 to 0 degrees Animation
227 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, NULL); 227 Efl_Animation *ccw_45_degrees_anim = efl_add(EFL_ANIMATION_ROTATE_CLASS, win);
228 efl_animation_rotate_absolute_set(ccw_45_degrees_anim, 45.0, 0.0, 0, 0); 228 efl_animation_rotate_absolute_set(ccw_45_degrees_anim, 45.0, 0.0, 0, 0);
229 efl_animation_duration_set(ccw_45_degrees_anim, 1.0); 229 efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
230 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); 230 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 *
83 evas_object_show(btn); 83 evas_object_show(btn);
84 84
85 //Scale Animation to zoom in 85 //Scale Animation to zoom in
86 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 86 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
87 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 87 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5);
88 efl_animation_duration_set(scale_double_anim, 1.0); 88 efl_animation_duration_set(scale_double_anim, 1.0);
89 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 89 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
90 90
91 //Scale Animation to zoom out 91 //Scale Animation to zoom out
92 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 92 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
93 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); 93 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5);
94 efl_animation_duration_set(scale_half_anim, 1.0); 94 efl_animation_duration_set(scale_half_anim, 1.0);
95 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 95 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
152 evas_object_show(pivot); 152 evas_object_show(pivot);
153 153
154 //Scale Animation to zoom in 154 //Scale Animation to zoom in
155 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 155 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
156 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, pivot, 0.5, 0.5); 156 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, pivot, 0.5, 0.5);
157 efl_animation_duration_set(scale_double_anim, 1.0); 157 efl_animation_duration_set(scale_double_anim, 1.0);
158 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 158 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
159 159
160 //Scale Animation to zoom out 160 //Scale Animation to zoom out
161 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 161 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
162 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, pivot, 0.5, 0.5); 162 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, pivot, 0.5, 0.5);
163 efl_animation_duration_set(scale_half_anim, 1.0); 163 efl_animation_duration_set(scale_half_anim, 1.0);
164 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 164 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
218 evas_object_show(abs_center); 218 evas_object_show(abs_center);
219 219
220 //Scale Animation to zoom in 220 //Scale Animation to zoom in
221 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 221 Efl_Animation *scale_double_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
222 efl_animation_scale_absolute_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, 0, 0); 222 efl_animation_scale_absolute_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, 0, 0);
223 efl_animation_duration_set(scale_double_anim, 1.0); 223 efl_animation_duration_set(scale_double_anim, 1.0);
224 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 224 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
225 225
226 //Scale Animation to zoom out 226 //Scale Animation to zoom out
227 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, NULL); 227 Efl_Animation *scale_half_anim = efl_add(EFL_ANIMATION_SCALE_CLASS, win);
228 efl_animation_scale_absolute_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, 0, 0); 228 efl_animation_scale_absolute_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, 0, 0);
229 efl_animation_duration_set(scale_half_anim, 1.0); 229 efl_animation_duration_set(scale_half_anim, 1.0);
230 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 230 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,
98 evas_object_show(btn); 98 evas_object_show(btn);
99 99
100 //Show Animation 100 //Show Animation
101 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 101 Efl_Animation *show_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
102 efl_animation_alpha_set(show_anim, 0.0, 1.0); 102 efl_animation_alpha_set(show_anim, 0.0, 1.0);
103 efl_animation_duration_set(show_anim, 1.0); 103 efl_animation_duration_set(show_anim, 1.0);
104 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 104 efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
105 105
106 //Hide Animation 106 //Hide Animation
107 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, NULL); 107 Efl_Animation *hide_anim = efl_add(EFL_ANIMATION_ALPHA_CLASS, win);
108 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 108 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
109 efl_animation_duration_set(hide_anim, 1.0); 109 efl_animation_duration_set(hide_anim, 1.0);
110 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 110 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
83 evas_object_show(btn); 83 evas_object_show(btn);
84 84
85 //Translate Animation to right bottom relatively 85 //Translate Animation to right bottom relatively
86 Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL); 86 Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
87 efl_animation_translate_set(translate_rb_anim, 0, 0, 100, 100); 87 efl_animation_translate_set(translate_rb_anim, 0, 0, 100, 100);
88 efl_animation_duration_set(translate_rb_anim, 1.0); 88 efl_animation_duration_set(translate_rb_anim, 1.0);
89 efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE); 89 efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE);
90 90
91 //Translate Animation to left top relatively 91 //Translate Animation to left top relatively
92 Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL); 92 Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
93 efl_animation_translate_set(translate_lt_anim, 100, 100, 0, 0); 93 efl_animation_translate_set(translate_lt_anim, 100, 100, 0, 0);
94 efl_animation_duration_set(translate_lt_anim, 1.0); 94 efl_animation_duration_set(translate_lt_anim, 1.0);
95 efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE); 95 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
149 evas_object_show(abs_center); 149 evas_object_show(abs_center);
150 150
151 //Translate Animation to right bottom absolutely 151 //Translate Animation to right bottom absolutely
152 Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL); 152 Efl_Animation *translate_rb_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
153 efl_animation_translate_absolute_set(translate_rb_anim, 0, 0, 100, 100); 153 efl_animation_translate_absolute_set(translate_rb_anim, 0, 0, 100, 100);
154 efl_animation_duration_set(translate_rb_anim, 1.0); 154 efl_animation_duration_set(translate_rb_anim, 1.0);
155 efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE); 155 efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE);
156 156
157 //Translate Animation to left top absolutely 157 //Translate Animation to left top absolutely
158 Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, NULL); 158 Efl_Animation *translate_lt_anim = efl_add(EFL_ANIMATION_TRANSLATE_CLASS, win);
159 efl_animation_translate_absolute_set(translate_lt_anim, 100, 100, 0, 0); 159 efl_animation_translate_absolute_set(translate_lt_anim, 100, 100, 0, 0);
160 efl_animation_duration_set(translate_lt_anim, 1.0); 160 efl_animation_duration_set(translate_lt_anim, 1.0);
161 efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE); 161 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,
17 efl_animation_final_state_keep_set(animation, keep_final_state); 17 efl_animation_final_state_keep_set(animation, keep_final_state);
18 18
19 pd->animations = eina_list_append(pd->animations, animation); 19 pd->animations = eina_list_append(pd->animations, animation);
20 efl_ref(animation);
20} 21}
21 22
22EOLIAN static void 23EOLIAN static void
@@ -24,9 +25,19 @@ _efl_animation_group_animation_del(Eo *eo_obj EINA_UNUSED,
24 Efl_Animation_Group_Data *pd, 25 Efl_Animation_Group_Data *pd,
25 Efl_Animation*animation) 26 Efl_Animation*animation)
26{ 27{
28 Eina_List *list;
27 if (!animation) return; 29 if (!animation) return;
28 30
29 pd->animations = eina_list_remove(pd->animations, animation); 31 list = eina_list_data_find_list(pd->animations, animation);
32 if (list)
33 {
34 pd->animations = eina_list_remove_list(pd->animations, list);
35 efl_unref(animation);
36 }
37 else
38 {
39 ERR("Animation(%p) is not in the group animation.");
40 }
30} 41}
31 42
32EOLIAN static Eina_List * 43EOLIAN static Eina_List *
@@ -106,8 +117,8 @@ _efl_animation_group_efl_object_destructor(Eo *eo_obj,
106{ 117{
107 Efl_Animation *anim; 118 Efl_Animation *anim;
108 119
109 EINA_LIST_FREE(pd->animations, anim) 120 EINA_LIST_FREE(pd->animations, anim);
110 efl_del(anim); 121 efl_unref(anim);
111 122
112 efl_destructor(efl_super(eo_obj, MY_CLASS)); 123 efl_destructor(efl_super(eo_obj, MY_CLASS));
113} 124}
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,
53 return; 53 return;
54 } 54 }
55 55
56 if (pd->animation && efl_player_play_get(eo_obj)) 56 if (pd->animation)
57 efl_player_stop(eo_obj); 57 {
58 efl_player_stop(eo_obj);
59 efl_unref(pd->animation);
60 }
58 pd->animation = anim; 61 pd->animation = anim;
62 efl_ref(pd->animation);
59} 63}
60 64
61EOLIAN static Efl_Animation * 65EOLIAN static Efl_Animation *
@@ -365,11 +369,11 @@ _efl_animation_player_efl_object_destructor(Eo *eo_obj,
365 pd->animator = NULL; 369 pd->animator = NULL;
366 370
367 //Reset the state of the target to the initial state 371 //Reset the state of the target to the initial state
368 if (!pd->keep_final_state) 372 efl_player_stop(eo_obj);
369 efl_player_stop(eo_obj);
370 373
371 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL); 374 efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL);
372 } 375 }
376 efl_unref(pd->animation);
373 377
374 efl_destructor(efl_super(eo_obj, MY_CLASS)); 378 efl_destructor(efl_super(eo_obj, MY_CLASS));
375} 379}