summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2018-01-17 18:43:35 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-01-17 18:58:30 +0900
commit119c41d7f2f13da0e27ee0d4d879301aa36f90c3 (patch)
tree76e4daa036543ee458bf27a350621b85db16c848
parent08073155b1a4f518bb5b17448df24249081989e6 (diff)
elm_test: Fix to call efl_add with parent
To trace back to the main loop, call efl_add with parent. (See https://phab.enlightenment.org/T6573)
-rw-r--r--src/bin/elementary/test_efl_anim_interpolator.c20
-rw-r--r--src/bin/elementary/test_efl_anim_scale.c2
2 files changed, 11 insertions, 11 deletions
diff --git a/src/bin/elementary/test_efl_anim_interpolator.c b/src/bin/elementary/test_efl_anim_interpolator.c
index 097d030b98..376e726fd1 100644
--- a/src/bin/elementary/test_efl_anim_interpolator.c
+++ b/src/bin/elementary/test_efl_anim_interpolator.c
@@ -22,42 +22,42 @@ typedef struct _App_Data
22} App_Data; 22} App_Data;
23 23
24static Efl_Interpolator * 24static Efl_Interpolator *
25_interpolator_create(int index) 25_interpolator_create(int index, Evas_Object *win)
26{ 26{
27 Efl_Interpolator *interp = NULL; 27 Efl_Interpolator *interp = NULL;
28 28
29 if (index == 0) 29 if (index == 0)
30 { 30 {
31 interp = efl_add(EFL_INTERPOLATOR_LINEAR_CLASS, NULL); 31 interp = efl_add(EFL_INTERPOLATOR_LINEAR_CLASS, win);
32 } 32 }
33 else if (index == 1) 33 else if (index == 1)
34 { 34 {
35 interp = efl_add(EFL_INTERPOLATOR_SINUSOIDAL_CLASS, NULL); 35 interp = efl_add(EFL_INTERPOLATOR_SINUSOIDAL_CLASS, win);
36 efl_interpolator_sinusoidal_factor_set(interp, 1.0); 36 efl_interpolator_sinusoidal_factor_set(interp, 1.0);
37 } 37 }
38 else if (index == 2) 38 else if (index == 2)
39 { 39 {
40 interp = efl_add(EFL_INTERPOLATOR_DECELERATE_CLASS, NULL); 40 interp = efl_add(EFL_INTERPOLATOR_DECELERATE_CLASS, win);
41 efl_interpolator_decelerate_factor_set(interp, 1.0); 41 efl_interpolator_decelerate_factor_set(interp, 1.0);
42 } 42 }
43 else if (index == 3) 43 else if (index == 3)
44 { 44 {
45 interp = efl_add(EFL_INTERPOLATOR_ACCELERATE_CLASS, NULL); 45 interp = efl_add(EFL_INTERPOLATOR_ACCELERATE_CLASS, win);
46 efl_interpolator_accelerate_factor_set(interp, 1.0); 46 efl_interpolator_accelerate_factor_set(interp, 1.0);
47 } 47 }
48 else if (index == 4) 48 else if (index == 4)
49 { 49 {
50 interp = efl_add(EFL_INTERPOLATOR_DIVISOR_CLASS, NULL); 50 interp = efl_add(EFL_INTERPOLATOR_DIVISOR_CLASS, win);
51 efl_interpolator_divisor_factors_set(interp, 1.0, 1.0); 51 efl_interpolator_divisor_factors_set(interp, 1.0, 1.0);
52 } 52 }
53 else if (index == 5) 53 else if (index == 5)
54 { 54 {
55 interp = efl_add(EFL_INTERPOLATOR_BOUNCE_CLASS, NULL); 55 interp = efl_add(EFL_INTERPOLATOR_BOUNCE_CLASS, win);
56 efl_interpolator_bounce_factors_set(interp, 1.0, 1.0); 56 efl_interpolator_bounce_factors_set(interp, 1.0, 1.0);
57 } 57 }
58 else if (index == 6) 58 else if (index == 6)
59 { 59 {
60 interp = efl_add(EFL_INTERPOLATOR_SPRING_CLASS, NULL); 60 interp = efl_add(EFL_INTERPOLATOR_SPRING_CLASS, win);
61 efl_interpolator_spring_factors_set(interp, 1.0, 1.0); 61 efl_interpolator_spring_factors_set(interp, 1.0, 1.0);
62 } 62 }
63 63
@@ -189,12 +189,12 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
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);
191 191
192 Efl_Interpolator *interp = _interpolator_create(i); 192 Efl_Interpolator *interp = _interpolator_create(i, win);
193 efl_animation_interpolator_set(anim, interp); 193 efl_animation_interpolator_set(anim, interp);
194 ad->anim[i] = anim; 194 ad->anim[i] = anim;
195 195
196 //Create Animation Object from Animation 196 //Create Animation Object from Animation
197 Efl_Animation_Player *anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, NULL, 197 Efl_Animation_Player *anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win,
198 efl_animation_player_animation_set(efl_added, anim), 198 efl_animation_player_animation_set(efl_added, anim),
199 efl_animation_player_target_set(efl_added, btn)); 199 efl_animation_player_target_set(efl_added, btn));
200 ad->anim_obj[i] = anim_obj; 200 ad->anim_obj[i] = anim_obj;
diff --git a/src/bin/elementary/test_efl_anim_scale.c b/src/bin/elementary/test_efl_anim_scale.c
index 41d1c88b60..9cc0f768e7 100644
--- a/src/bin/elementary/test_efl_anim_scale.c
+++ b/src/bin/elementary/test_efl_anim_scale.c
@@ -97,7 +97,7 @@ test_efl_anim_scale(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
97 //Initialize App Data 97 //Initialize App Data
98 ad->scale_double_anim = scale_double_anim; 98 ad->scale_double_anim = scale_double_anim;
99 ad->scale_half_anim = scale_half_anim; 99 ad->scale_half_anim = scale_half_anim;
100 ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, NULL, 100 ad->anim_obj = efl_add(EFL_ANIMATION_PLAYER_CLASS, win,
101 efl_animation_player_target_set(efl_added, btn)); 101 efl_animation_player_target_set(efl_added, btn));
102 102
103 //Register callback called when animation starts 103 //Register callback called when animation starts