diff options
author | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2017-10-23 13:58:59 +0900 |
---|---|---|
committer | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2017-10-23 15:05:08 +0900 |
commit | 74155b6e3424fe2cf9c6a92e0853e627ba865359 (patch) | |
tree | e13b7e85a2c54997e3589eadb68d84adbbd1b155 | |
parent | 348fc0b06ef11be539066faee291cdbda8a58ebe (diff) |
efl_animation: Remove unnecessary macro
Diffstat (limited to '')
34 files changed, 49 insertions, 496 deletions
diff --git a/src/lib/evas/canvas/efl_animation.c b/src/lib/evas/canvas/efl_animation.c index 874e4107dd..99b8907012 100644 --- a/src/lib/evas/canvas/efl_animation.c +++ b/src/lib/evas/canvas/efl_animation.c | |||
@@ -5,7 +5,6 @@ _target_del_cb(void *data, const Efl_Event *event EINA_UNUSED) | |||
5 | { | 5 | { |
6 | Eo *eo_obj = data; | 6 | Eo *eo_obj = data; |
7 | 7 | ||
8 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
9 | EFL_ANIMATION_DATA_GET(eo_obj, pd); | 8 | EFL_ANIMATION_DATA_GET(eo_obj, pd); |
10 | 9 | ||
11 | pd->target = NULL; | 10 | pd->target = NULL; |
@@ -16,18 +15,14 @@ _efl_animation_target_set(Eo *eo_obj, | |||
16 | Efl_Animation_Data *pd, | 15 | Efl_Animation_Data *pd, |
17 | Efl_Canvas_Object *target) | 16 | Efl_Canvas_Object *target) |
18 | { | 17 | { |
19 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
20 | |||
21 | efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, eo_obj); | 18 | efl_event_callback_add(target, EFL_EVENT_DEL, _target_del_cb, eo_obj); |
22 | 19 | ||
23 | pd->target = target; | 20 | pd->target = target; |
24 | } | 21 | } |
25 | 22 | ||
26 | EOLIAN static Efl_Canvas_Object * | 23 | EOLIAN static Efl_Canvas_Object * |
27 | _efl_animation_target_get(Eo *eo_obj, Efl_Animation_Data *pd) | 24 | _efl_animation_target_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd) |
28 | { | 25 | { |
29 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, NULL); | ||
30 | |||
31 | return pd->target; | 26 | return pd->target; |
32 | } | 27 | } |
33 | 28 | ||
@@ -36,82 +31,60 @@ _efl_animation_duration_set(Eo *eo_obj, | |||
36 | Efl_Animation_Data *pd, | 31 | Efl_Animation_Data *pd, |
37 | double duration) | 32 | double duration) |
38 | { | 33 | { |
39 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
40 | |||
41 | efl_animation_total_duration_set(eo_obj, duration); | 34 | efl_animation_total_duration_set(eo_obj, duration); |
42 | 35 | ||
43 | pd->duration = duration; | 36 | pd->duration = duration; |
44 | } | 37 | } |
45 | 38 | ||
46 | EOLIAN static double | 39 | EOLIAN static double |
47 | _efl_animation_duration_get(Eo *eo_obj, Efl_Animation_Data *pd) | 40 | _efl_animation_duration_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd) |
48 | { | 41 | { |
49 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, 0.0); | ||
50 | |||
51 | return pd->duration; | 42 | return pd->duration; |
52 | } | 43 | } |
53 | 44 | ||
54 | EOLIAN static void | 45 | EOLIAN static void |
55 | _efl_animation_duration_only_set(Eo *eo_obj, | 46 | _efl_animation_duration_only_set(Eo *eo_obj EINA_UNUSED, |
56 | Efl_Animation_Data *pd, | 47 | Efl_Animation_Data *pd, |
57 | double duration) | 48 | double duration) |
58 | { | 49 | { |
59 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
60 | |||
61 | pd->duration = duration; | 50 | pd->duration = duration; |
62 | } | 51 | } |
63 | 52 | ||
64 | EOLIAN static void | 53 | EOLIAN static void |
65 | _efl_animation_total_duration_set(Eo *eo_obj, | 54 | _efl_animation_total_duration_set(Eo *eo_obj EINA_UNUSED, |
66 | Efl_Animation_Data *pd, | 55 | Efl_Animation_Data *pd, |
67 | double total_duration) | 56 | double total_duration) |
68 | { | 57 | { |
69 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
70 | |||
71 | pd->total_duration = total_duration; | 58 | pd->total_duration = total_duration; |
72 | } | 59 | } |
73 | 60 | ||
74 | EOLIAN static double | 61 | EOLIAN static double |
75 | _efl_animation_total_duration_get(Eo *eo_obj, Efl_Animation_Data *pd) | 62 | _efl_animation_total_duration_get(Eo *eo_obj EINA_UNUSED, |
63 | Efl_Animation_Data *pd) | ||
76 | { | 64 | { |
77 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, 0.0); | ||
78 | |||
79 | return pd->total_duration; | 65 | return pd->total_duration; |
80 | } | 66 | } |
81 | 67 | ||
82 | EOLIAN static Eina_Bool | ||
83 | _efl_animation_is_deleted(Eo *eo_obj, Efl_Animation_Data *pd) | ||
84 | { | ||
85 | EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, EINA_TRUE); | ||
86 | |||
87 | return pd->is_deleted; | ||
88 | } | ||
89 | |||
90 | EOLIAN static void | 68 | EOLIAN static void |
91 | _efl_animation_final_state_keep_set(Eo *eo_obj, | 69 | _efl_animation_final_state_keep_set(Eo *eo_obj EINA_UNUSED, |
92 | Efl_Animation_Data *pd, | 70 | Efl_Animation_Data *pd, |
93 | Eina_Bool keep_final_state) | 71 | Eina_Bool keep_final_state) |
94 | { | 72 | { |
95 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
96 | |||
97 | if (pd->keep_final_state == keep_final_state) return; | 73 | if (pd->keep_final_state == keep_final_state) return; |
98 | 74 | ||
99 | pd->keep_final_state = !!keep_final_state; | 75 | pd->keep_final_state = !!keep_final_state; |
100 | } | 76 | } |
101 | 77 | ||
102 | EOLIAN static Eina_Bool | 78 | EOLIAN static Eina_Bool |
103 | _efl_animation_final_state_keep_get(Eo *eo_obj, Efl_Animation_Data *pd) | 79 | _efl_animation_final_state_keep_get(Eo *eo_obj EINA_UNUSED, |
80 | Efl_Animation_Data *pd) | ||
104 | { | 81 | { |
105 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, EINA_FALSE); | ||
106 | |||
107 | return pd->keep_final_state; | 82 | return pd->keep_final_state; |
108 | } | 83 | } |
109 | 84 | ||
110 | EOLIAN static Efl_Animation_Object * | 85 | EOLIAN static Efl_Animation_Object * |
111 | _efl_animation_object_create(Eo *eo_obj, Efl_Animation_Data *pd EINA_UNUSED) | 86 | _efl_animation_object_create(Eo *eo_obj, Efl_Animation_Data *pd EINA_UNUSED) |
112 | { | 87 | { |
113 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, NULL); | ||
114 | |||
115 | Efl_Animation_Object *anim_obj | 88 | Efl_Animation_Object *anim_obj |
116 | = efl_add(EFL_ANIMATION_OBJECT_CLASS, NULL); | 89 | = efl_add(EFL_ANIMATION_OBJECT_CLASS, NULL); |
117 | 90 | ||
@@ -134,33 +107,26 @@ _efl_animation_object_create(Eo *eo_obj, Efl_Animation_Data *pd EINA_UNUSED) | |||
134 | } | 107 | } |
135 | 108 | ||
136 | EOLIAN static void | 109 | EOLIAN static void |
137 | _efl_animation_repeat_mode_set(Eo *eo_obj, | 110 | _efl_animation_repeat_mode_set(Eo *eo_obj EINA_UNUSED, |
138 | Efl_Animation_Data *pd, | 111 | Efl_Animation_Data *pd, |
139 | Efl_Animation_Repeat_Mode mode) | 112 | Efl_Animation_Repeat_Mode mode) |
140 | { | 113 | { |
141 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
142 | |||
143 | if ((mode == EFL_ANIMATION_REPEAT_MODE_RESTART) || | 114 | if ((mode == EFL_ANIMATION_REPEAT_MODE_RESTART) || |
144 | (mode == EFL_ANIMATION_REPEAT_MODE_REVERSE)) | 115 | (mode == EFL_ANIMATION_REPEAT_MODE_REVERSE)) |
145 | pd->repeat_mode = mode; | 116 | pd->repeat_mode = mode; |
146 | } | 117 | } |
147 | 118 | ||
148 | EOLIAN static Efl_Animation_Repeat_Mode | 119 | EOLIAN static Efl_Animation_Repeat_Mode |
149 | _efl_animation_repeat_mode_get(Eo *eo_obj, Efl_Animation_Data *pd) | 120 | _efl_animation_repeat_mode_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd) |
150 | { | 121 | { |
151 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, | ||
152 | EFL_ANIMATION_REPEAT_MODE_RESTART); | ||
153 | |||
154 | return pd->repeat_mode; | 122 | return pd->repeat_mode; |
155 | } | 123 | } |
156 | 124 | ||
157 | EOLIAN static void | 125 | EOLIAN static void |
158 | _efl_animation_repeat_count_set(Eo *eo_obj, | 126 | _efl_animation_repeat_count_set(Eo *eo_obj EINA_UNUSED, |
159 | Efl_Animation_Data *pd, | 127 | Efl_Animation_Data *pd, |
160 | int count) | 128 | int count) |
161 | { | 129 | { |
162 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
163 | |||
164 | //EFL_ANIMATION_REPEAT_INFINITE repeats animation infinitely | 130 | //EFL_ANIMATION_REPEAT_INFINITE repeats animation infinitely |
165 | if ((count < 0) && (count != EFL_ANIMATION_REPEAT_INFINITE)) return; | 131 | if ((count < 0) && (count != EFL_ANIMATION_REPEAT_INFINITE)) return; |
166 | 132 | ||
@@ -168,50 +134,40 @@ _efl_animation_repeat_count_set(Eo *eo_obj, | |||
168 | } | 134 | } |
169 | 135 | ||
170 | EOLIAN static int | 136 | EOLIAN static int |
171 | _efl_animation_repeat_count_get(Eo *eo_obj, Efl_Animation_Data *pd) | 137 | _efl_animation_repeat_count_get(Eo *eo_obj EINA_UNUSED, Efl_Animation_Data *pd) |
172 | { | 138 | { |
173 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, 0); | ||
174 | |||
175 | return pd->repeat_count; | 139 | return pd->repeat_count; |
176 | } | 140 | } |
177 | 141 | ||
178 | EOLIAN static void | 142 | EOLIAN static void |
179 | _efl_animation_start_delay_set(Eo *eo_obj, | 143 | _efl_animation_start_delay_set(Eo *eo_obj EINA_UNUSED, |
180 | Efl_Animation_Data *pd, | 144 | Efl_Animation_Data *pd, |
181 | double delay_time) | 145 | double delay_time) |
182 | { | 146 | { |
183 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
184 | |||
185 | if (delay_time < 0.0) return; | 147 | if (delay_time < 0.0) return; |
186 | 148 | ||
187 | pd->start_delay_time = delay_time; | 149 | pd->start_delay_time = delay_time; |
188 | } | 150 | } |
189 | 151 | ||
190 | EOLIAN static double | 152 | EOLIAN static double |
191 | _efl_animation_start_delay_get(Eo *eo_obj, | 153 | _efl_animation_start_delay_get(Eo *eo_obj EINA_UNUSED, |
192 | Efl_Animation_Data *pd) | 154 | Efl_Animation_Data *pd) |
193 | { | 155 | { |
194 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, 0.0); | ||
195 | |||
196 | return pd->start_delay_time; | 156 | return pd->start_delay_time; |
197 | } | 157 | } |
198 | 158 | ||
199 | EOLIAN static void | 159 | EOLIAN static void |
200 | _efl_animation_interpolator_set(Eo *eo_obj, | 160 | _efl_animation_interpolator_set(Eo *eo_obj EINA_UNUSED, |
201 | Efl_Animation_Data *pd, | 161 | Efl_Animation_Data *pd, |
202 | Efl_Interpolator *interpolator) | 162 | Efl_Interpolator *interpolator) |
203 | { | 163 | { |
204 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj); | ||
205 | |||
206 | pd->interpolator = interpolator; | 164 | pd->interpolator = interpolator; |
207 | } | 165 | } |
208 | 166 | ||
209 | EOLIAN static Efl_Interpolator * | 167 | EOLIAN static Efl_Interpolator * |
210 | _efl_animation_interpolator_get(Eo *eo_obj, | 168 | _efl_animation_interpolator_get(Eo *eo_obj EINA_UNUSED, |
211 | Efl_Animation_Data *pd) | 169 | Efl_Animation_Data *pd) |
212 | { | 170 | { |
213 | EFL_ANIMATION_CHECK_OR_RETURN(eo_obj, NULL); | ||
214 | |||
215 | return pd->interpolator; | 171 | return pd->interpolator; |
216 | } | 172 | } |
217 | 173 | ||
@@ -231,7 +187,6 @@ _efl_animation_efl_object_constructor(Eo *eo_obj, | |||
231 | 187 | ||
232 | pd->interpolator = NULL; | 188 | pd->interpolator = NULL; |
233 | 189 | ||
234 | pd->is_deleted = EINA_FALSE; | ||
235 | pd->keep_final_state = EINA_FALSE; | 190 | pd->keep_final_state = EINA_FALSE; |
236 | 191 | ||
237 | return eo_obj; | 192 | return eo_obj; |
@@ -240,8 +195,6 @@ _efl_animation_efl_object_constructor(Eo *eo_obj, | |||
240 | EOLIAN static void | 195 | EOLIAN static void |
241 | _efl_animation_efl_object_destructor(Eo *eo_obj, Efl_Animation_Data *pd) | 196 | _efl_animation_efl_object_destructor(Eo *eo_obj, Efl_Animation_Data *pd) |
242 | { | 197 | { |
243 | pd->is_deleted = EINA_TRUE; | ||
244 | |||
245 | if (pd->target) | 198 | if (pd->target) |
246 | efl_event_callback_del(pd->target, EFL_EVENT_DEL, _target_del_cb, eo_obj); | 199 | efl_event_callback_del(pd->target, EFL_EVENT_DEL, _target_del_cb, eo_obj); |
247 | 200 | ||
diff --git a/src/lib/evas/canvas/efl_animation.eo b/src/lib/evas/canvas/efl_animation.eo index 4dc169b0f8..617a109f67 100644 --- a/src/lib/evas/canvas/efl_animation.eo +++ b/src/lib/evas/canvas/efl_animation.eo | |||
@@ -83,9 +83,6 @@ class Efl.Animation (Efl.Object) | |||
83 | interpolator: Efl.Object; [[Interpolator which indicates interpolation fucntion. Efl_Interpolator is required.]] | 83 | interpolator: Efl.Object; [[Interpolator which indicates interpolation fucntion. Efl_Interpolator is required.]] |
84 | } | 84 | } |
85 | } | 85 | } |
86 | is_deleted @protected { | ||
87 | return: bool; [[$true if animation is deleted, $false otherwise.]] | ||
88 | } | ||
89 | object_create { | 86 | object_create { |
90 | [[Create object of the animation.]] | 87 | [[Create object of the animation.]] |
91 | return: Efl.Animation.Object; [[Created object of the animation]] | 88 | return: Efl.Animation.Object; [[Created object of the animation]] |
diff --git a/src/lib/evas/canvas/efl_animation_alpha.c b/src/lib/evas/canvas/efl_animation_alpha.c index 2e21e6a24b..8b14a37162 100644 --- a/src/lib/evas/canvas/efl_animation_alpha.c +++ b/src/lib/evas/canvas/efl_animation_alpha.c | |||
@@ -1,13 +1,11 @@ | |||
1 | #include "efl_animation_alpha_private.h" | 1 | #include "efl_animation_alpha_private.h" |
2 | 2 | ||
3 | EOLIAN static void | 3 | EOLIAN static void |
4 | _efl_animation_alpha_alpha_set(Eo *eo_obj, | 4 | _efl_animation_alpha_alpha_set(Eo *eo_obj EINA_UNUSED, |
5 | Efl_Animation_Alpha_Data *pd, | 5 | Efl_Animation_Alpha_Data *pd, |
6 | double from_alpha, | 6 | double from_alpha, |
7 | double to_alpha) | 7 | double to_alpha) |
8 | { | 8 | { |
9 | EFL_ANIMATION_ALPHA_CHECK_OR_RETURN(eo_obj); | ||
10 | |||
11 | pd->from.alpha = from_alpha; | 9 | pd->from.alpha = from_alpha; |
12 | pd->to.alpha = to_alpha; | 10 | pd->to.alpha = to_alpha; |
13 | } | 11 | } |
@@ -18,8 +16,6 @@ _efl_animation_alpha_alpha_get(Eo *eo_obj EINA_UNUSED, | |||
18 | double *from_alpha, | 16 | double *from_alpha, |
19 | double *to_alpha) | 17 | double *to_alpha) |
20 | { | 18 | { |
21 | EFL_ANIMATION_ALPHA_CHECK_OR_RETURN(eo_obj); | ||
22 | |||
23 | if (from_alpha) | 19 | if (from_alpha) |
24 | *from_alpha = pd->from.alpha; | 20 | *from_alpha = pd->from.alpha; |
25 | if (to_alpha) | 21 | if (to_alpha) |
@@ -30,8 +26,6 @@ EOLIAN static Efl_Animation_Object * | |||
30 | _efl_animation_alpha_efl_animation_object_create(Eo *eo_obj, | 26 | _efl_animation_alpha_efl_animation_object_create(Eo *eo_obj, |
31 | Efl_Animation_Alpha_Data *pd) | 27 | Efl_Animation_Alpha_Data *pd) |
32 | { | 28 | { |
33 | EFL_ANIMATION_ALPHA_CHECK_OR_RETURN(eo_obj, NULL); | ||
34 | |||
35 | Efl_Animation_Object_Alpha *anim_obj | 29 | Efl_Animation_Object_Alpha *anim_obj |
36 | = efl_add(EFL_ANIMATION_OBJECT_ALPHA_CLASS, NULL); | 30 | = efl_add(EFL_ANIMATION_OBJECT_ALPHA_CLASS, NULL); |
37 | 31 | ||
diff --git a/src/lib/evas/canvas/efl_animation_alpha_private.h b/src/lib/evas/canvas/efl_animation_alpha_private.h index fc08be75bc..9350fd1d77 100644 --- a/src/lib/evas/canvas/efl_animation_alpha_private.h +++ b/src/lib/evas/canvas/efl_animation_alpha_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_ALPHA_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_ALPHA_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_ALPHA_CHECK_OR_RETURN(anim, ...) \ | ||
10 | do { \ | ||
11 | if (!anim) { \ | ||
12 | CRI("Efl_Animation " # anim " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_is_deleted(anim)) { \ | ||
16 | ERR("Efl_Animation " # anim " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_ALPHA_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_ALPHA_DATA_GET(o, pd) \ |
22 | Efl_Animation_Alpha_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_ALPHA_CLASS) | 10 | Efl_Animation_Alpha_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_ALPHA_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_group.c b/src/lib/evas/canvas/efl_animation_group.c index dd2b30a20e..9f1b105c30 100644 --- a/src/lib/evas/canvas/efl_animation_group.c +++ b/src/lib/evas/canvas/efl_animation_group.c | |||
@@ -5,8 +5,6 @@ _efl_animation_group_animation_add(Eo *eo_obj, | |||
5 | Efl_Animation_Group_Data *pd, | 5 | Efl_Animation_Group_Data *pd, |
6 | Efl_Animation *animation) | 6 | Efl_Animation *animation) |
7 | { | 7 | { |
8 | EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj); | ||
9 | |||
10 | if (!animation) return; | 8 | if (!animation) return; |
11 | 9 | ||
12 | Efl_Canvas_Object *target = efl_animation_target_get(eo_obj); | 10 | Efl_Canvas_Object *target = efl_animation_target_get(eo_obj); |
@@ -26,23 +24,19 @@ _efl_animation_group_animation_add(Eo *eo_obj, | |||
26 | } | 24 | } |
27 | 25 | ||
28 | EOLIAN static void | 26 | EOLIAN static void |
29 | _efl_animation_group_animation_del(Eo *eo_obj, | 27 | _efl_animation_group_animation_del(Eo *eo_obj EINA_UNUSED, |
30 | Efl_Animation_Group_Data *pd, | 28 | Efl_Animation_Group_Data *pd, |
31 | Efl_Animation*animation) | 29 | Efl_Animation*animation) |
32 | { | 30 | { |
33 | EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj); | ||
34 | |||
35 | if (!animation) return; | 31 | if (!animation) return; |
36 | 32 | ||
37 | pd->animations = eina_list_remove(pd->animations, animation); | 33 | pd->animations = eina_list_remove(pd->animations, animation); |
38 | } | 34 | } |
39 | 35 | ||
40 | EOLIAN static Eina_List * | 36 | EOLIAN static Eina_List * |
41 | _efl_animation_group_animations_get(Eo *eo_obj, | 37 | _efl_animation_group_animations_get(Eo *eo_obj EINA_UNUSED, |
42 | Efl_Animation_Group_Data *pd) | 38 | Efl_Animation_Group_Data *pd) |
43 | { | 39 | { |
44 | EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj, NULL); | ||
45 | |||
46 | return pd->animations; | 40 | return pd->animations; |
47 | } | 41 | } |
48 | 42 | ||
@@ -51,8 +45,6 @@ _efl_animation_group_efl_animation_target_set(Eo *eo_obj, | |||
51 | Efl_Animation_Group_Data *pd, | 45 | Efl_Animation_Group_Data *pd, |
52 | Efl_Canvas_Object *target) | 46 | Efl_Canvas_Object *target) |
53 | { | 47 | { |
54 | EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj); | ||
55 | |||
56 | Eina_List *l; | 48 | Eina_List *l; |
57 | Efl_Animation *anim; | 49 | Efl_Animation *anim; |
58 | EINA_LIST_FOREACH(pd->animations, l, anim) | 50 | EINA_LIST_FOREACH(pd->animations, l, anim) |
@@ -68,8 +60,6 @@ _efl_animation_group_efl_animation_duration_set(Eo *eo_obj, | |||
68 | Efl_Animation_Group_Data *pd, | 60 | Efl_Animation_Group_Data *pd, |
69 | double duration) | 61 | double duration) |
70 | { | 62 | { |
71 | EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj); | ||
72 | |||
73 | if (duration == EFL_ANIMATION_GROUP_DURATION_NONE) goto end; | 63 | if (duration == EFL_ANIMATION_GROUP_DURATION_NONE) goto end; |
74 | 64 | ||
75 | if (duration < 0.0) return; | 65 | if (duration < 0.0) return; |
@@ -94,8 +84,6 @@ _efl_animation_group_efl_animation_final_state_keep_set(Eo *eo_obj, | |||
94 | Efl_Animation_Group_Data *pd, | 84 | Efl_Animation_Group_Data *pd, |
95 | Eina_Bool keep_final_state) | 85 | Eina_Bool keep_final_state) |
96 | { | 86 | { |
97 | EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj); | ||
98 | |||
99 | Eina_List *l; | 87 | Eina_List *l; |
100 | Efl_Animation *anim; | 88 | Efl_Animation *anim; |
101 | EINA_LIST_FOREACH(pd->animations, l, anim) | 89 | EINA_LIST_FOREACH(pd->animations, l, anim) |
@@ -111,8 +99,6 @@ _efl_animation_group_efl_animation_interpolator_set(Eo *eo_obj, | |||
111 | Efl_Animation_Group_Data *pd, | 99 | Efl_Animation_Group_Data *pd, |
112 | Efl_Interpolator *interpolator) | 100 | Efl_Interpolator *interpolator) |
113 | { | 101 | { |
114 | EFL_ANIMATION_GROUP_CHECK_OR_RETURN(eo_obj); | ||
115 | |||
116 | Eina_List *l; | 102 | Eina_List *l; |
117 | Efl_Animation *anim; | 103 | Efl_Animation *anim; |
118 | EINA_LIST_FOREACH(pd->animations, l, anim) | 104 | EINA_LIST_FOREACH(pd->animations, l, anim) |
diff --git a/src/lib/evas/canvas/efl_animation_group_parallel.c b/src/lib/evas/canvas/efl_animation_group_parallel.c index 1a0bb460ab..fc98c0a02d 100644 --- a/src/lib/evas/canvas/efl_animation_group_parallel.c +++ b/src/lib/evas/canvas/efl_animation_group_parallel.c | |||
@@ -5,8 +5,6 @@ _efl_animation_group_parallel_efl_animation_group_animation_add(Eo *eo_obj, | |||
5 | Efl_Animation_Group_Parallel_Data *pd EINA_UNUSED, | 5 | Efl_Animation_Group_Parallel_Data *pd EINA_UNUSED, |
6 | Efl_Animation *animation) | 6 | Efl_Animation *animation) |
7 | { | 7 | { |
8 | EFL_ANIMATION_GROUP_PARALLEL_CHECK_OR_RETURN(eo_obj); | ||
9 | |||
10 | if (!animation) return; | 8 | if (!animation) return; |
11 | 9 | ||
12 | efl_animation_group_animation_add(efl_super(eo_obj, MY_CLASS), | 10 | efl_animation_group_animation_add(efl_super(eo_obj, MY_CLASS), |
@@ -26,8 +24,6 @@ _efl_animation_group_parallel_efl_animation_group_animation_del(Eo *eo_obj, | |||
26 | Efl_Animation_Group_Parallel_Data *pd EINA_UNUSED, | 24 | Efl_Animation_Group_Parallel_Data *pd EINA_UNUSED, |
27 | Efl_Animation *animation) | 25 | Efl_Animation *animation) |
28 | { | 26 | { |
29 | EFL_ANIMATION_GROUP_PARALLEL_CHECK_OR_RETURN(eo_obj); | ||
30 | |||
31 | if (!animation) return; | 27 | if (!animation) return; |
32 | 28 | ||
33 | efl_animation_group_animation_del(efl_super(eo_obj, MY_CLASS), | 29 | efl_animation_group_animation_del(efl_super(eo_obj, MY_CLASS), |
@@ -46,8 +42,6 @@ EOLIAN static double | |||
46 | _efl_animation_group_parallel_efl_animation_total_duration_get(Eo *eo_obj, | 42 | _efl_animation_group_parallel_efl_animation_total_duration_get(Eo *eo_obj, |
47 | Efl_Animation_Group_Parallel_Data *pd EINA_UNUSED) | 43 | Efl_Animation_Group_Parallel_Data *pd EINA_UNUSED) |
48 | { | 44 | { |
49 | EFL_ANIMATION_GROUP_PARALLEL_CHECK_OR_RETURN(eo_obj, 0.0); | ||
50 | |||
51 | Eina_List *animations = | 45 | Eina_List *animations = |
52 | efl_animation_group_animations_get(eo_obj); | 46 | efl_animation_group_animations_get(eo_obj); |
53 | if (!animations) return 0.0; | 47 | if (!animations) return 0.0; |
@@ -77,8 +71,6 @@ EOLIAN static Efl_Animation_Object * | |||
77 | _efl_animation_group_parallel_efl_animation_object_create(Eo *eo_obj, | 71 | _efl_animation_group_parallel_efl_animation_object_create(Eo *eo_obj, |
78 | Efl_Animation_Group_Parallel_Data *pd EINA_UNUSED) | 72 | Efl_Animation_Group_Parallel_Data *pd EINA_UNUSED) |
79 | { | 73 | { |
80 | EFL_ANIMATION_GROUP_PARALLEL_CHECK_OR_RETURN(eo_obj, NULL); | ||
81 | |||
82 | Efl_Animation_Object_Group_Parallel *group_anim_obj | 74 | Efl_Animation_Object_Group_Parallel *group_anim_obj |
83 | = efl_add(EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CLASS, NULL); | 75 | = efl_add(EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CLASS, NULL); |
84 | 76 | ||
diff --git a/src/lib/evas/canvas/efl_animation_group_parallel_private.h b/src/lib/evas/canvas/efl_animation_group_parallel_private.h index a2f00cd3dd..963a8adf74 100644 --- a/src/lib/evas/canvas/efl_animation_group_parallel_private.h +++ b/src/lib/evas/canvas/efl_animation_group_parallel_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_GROUP_PARALLEL_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_GROUP_PARALLEL_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_GROUP_PARALLEL_CHECK_OR_RETURN(anim, ...) \ | ||
10 | do { \ | ||
11 | if (!anim) { \ | ||
12 | CRI("Efl_Animation " # anim " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_is_deleted(anim)) { \ | ||
16 | ERR("Efl_Animation " # anim " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_GROUP_PARALLEL_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_GROUP_PARALLEL_DATA_GET(o, pd) \ |
22 | Efl_Animation_Group_Parallel_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_GROUP_PARALLEL_CLASS) | 10 | Efl_Animation_Group_Parallel_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_GROUP_PARALLEL_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_group_private.h b/src/lib/evas/canvas/efl_animation_group_private.h index c107828c74..28c6b8b947 100644 --- a/src/lib/evas/canvas/efl_animation_group_private.h +++ b/src/lib/evas/canvas/efl_animation_group_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_GROUP_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_GROUP_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_GROUP_CHECK_OR_RETURN(anim, ...) \ | ||
10 | do { \ | ||
11 | if (!anim) { \ | ||
12 | CRI("Efl_Animation " # anim " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_is_deleted(anim)) { \ | ||
16 | ERR("Efl_Animation " # anim " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_GROUP_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_GROUP_DATA_GET(o, pd) \ |
22 | Efl_Animation_Group_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_GROUP_CLASS) | 10 | Efl_Animation_Group_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_GROUP_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_group_sequential.c b/src/lib/evas/canvas/efl_animation_group_sequential.c index 5f858586fc..d70974b1d8 100644 --- a/src/lib/evas/canvas/efl_animation_group_sequential.c +++ b/src/lib/evas/canvas/efl_animation_group_sequential.c | |||
@@ -5,8 +5,6 @@ _efl_animation_group_sequential_efl_animation_group_animation_add(Eo *eo_obj, | |||
5 | Efl_Animation_Group_Sequential_Data *pd EINA_UNUSED, | 5 | Efl_Animation_Group_Sequential_Data *pd EINA_UNUSED, |
6 | Efl_Animation *animation) | 6 | Efl_Animation *animation) |
7 | { | 7 | { |
8 | EFL_ANIMATION_GROUP_SEQUENTIAL_CHECK_OR_RETURN(eo_obj); | ||
9 | |||
10 | if (!animation) return; | 8 | if (!animation) return; |
11 | 9 | ||
12 | efl_animation_group_animation_add(efl_super(eo_obj, MY_CLASS), animation); | 10 | efl_animation_group_animation_add(efl_super(eo_obj, MY_CLASS), animation); |
@@ -24,8 +22,6 @@ _efl_animation_group_sequential_efl_animation_group_animation_del(Eo *eo_obj, | |||
24 | Efl_Animation_Group_Sequential_Data *pd EINA_UNUSED, | 22 | Efl_Animation_Group_Sequential_Data *pd EINA_UNUSED, |
25 | Efl_Animation *animation) | 23 | Efl_Animation *animation) |
26 | { | 24 | { |
27 | EFL_ANIMATION_GROUP_SEQUENTIAL_CHECK_OR_RETURN(eo_obj); | ||
28 | |||
29 | if (!animation) return; | 25 | if (!animation) return; |
30 | 26 | ||
31 | efl_animation_group_animation_del(efl_super(eo_obj, MY_CLASS), animation); | 27 | efl_animation_group_animation_del(efl_super(eo_obj, MY_CLASS), animation); |
@@ -42,8 +38,6 @@ EOLIAN static double | |||
42 | _efl_animation_group_sequential_efl_animation_total_duration_get(Eo *eo_obj, | 38 | _efl_animation_group_sequential_efl_animation_total_duration_get(Eo *eo_obj, |
43 | Efl_Animation_Group_Sequential_Data *pd EINA_UNUSED) | 39 | Efl_Animation_Group_Sequential_Data *pd EINA_UNUSED) |
44 | { | 40 | { |
45 | EFL_ANIMATION_GROUP_SEQUENTIAL_CHECK_OR_RETURN(eo_obj, 0.0); | ||
46 | |||
47 | Eina_List *animations = efl_animation_group_animations_get(eo_obj); | 41 | Eina_List *animations = efl_animation_group_animations_get(eo_obj); |
48 | if (!animations) return 0.0; | 42 | if (!animations) return 0.0; |
49 | 43 | ||
@@ -71,8 +65,6 @@ EOLIAN static Efl_Animation_Object * | |||
71 | _efl_animation_group_sequential_efl_animation_object_create(Eo *eo_obj, | 65 | _efl_animation_group_sequential_efl_animation_object_create(Eo *eo_obj, |
72 | Efl_Animation_Group_Sequential_Data *pd EINA_UNUSED) | 66 | Efl_Animation_Group_Sequential_Data *pd EINA_UNUSED) |
73 | { | 67 | { |
74 | EFL_ANIMATION_GROUP_SEQUENTIAL_CHECK_OR_RETURN(eo_obj, NULL); | ||
75 | |||
76 | Efl_Animation_Object_Group_Sequential *group_anim_obj | 68 | Efl_Animation_Object_Group_Sequential *group_anim_obj |
77 | = efl_add(EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CLASS, NULL); | 69 | = efl_add(EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CLASS, NULL); |
78 | 70 | ||
diff --git a/src/lib/evas/canvas/efl_animation_group_sequential_private.h b/src/lib/evas/canvas/efl_animation_group_sequential_private.h index 4fe4dc08d7..69503e9751 100644 --- a/src/lib/evas/canvas/efl_animation_group_sequential_private.h +++ b/src/lib/evas/canvas/efl_animation_group_sequential_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_GROUP_SEQUENTIAL_CHECK_OR_RETURN(anim, ...) \ | ||
10 | do { \ | ||
11 | if (!anim) { \ | ||
12 | CRI("Efl_Animation " # anim " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_is_deleted(anim)) { \ | ||
16 | ERR("Efl_Animation " # anim " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_GROUP_SEQUENTIAL_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_GROUP_SEQUENTIAL_DATA_GET(o, pd) \ |
22 | Efl_Animation_Group_Sequential_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS) | 10 | Efl_Animation_Group_Sequential_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_GROUP_SEQUENTIAL_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object.c b/src/lib/evas/canvas/efl_animation_object.c index 37ec4fe53c..d863289615 100644 --- a/src/lib/evas/canvas/efl_animation_object.c +++ b/src/lib/evas/canvas/efl_animation_object.c | |||
@@ -1,21 +1,17 @@ | |||
1 | #include "efl_animation_object_private.h" | 1 | #include "efl_animation_object_private.h" |
2 | 2 | ||
3 | EOLIAN static void | 3 | EOLIAN static void |
4 | _efl_animation_object_auto_del_set(Eo *eo_obj, | 4 | _efl_animation_object_auto_del_set(Eo *eo_obj EINA_UNUSED, |
5 | Efl_Animation_Object_Data *pd, | 5 | Efl_Animation_Object_Data *pd, |
6 | Eina_Bool auto_del) | 6 | Eina_Bool auto_del) |
7 | { | 7 | { |
8 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
9 | |||
10 | pd->auto_del = auto_del; | 8 | pd->auto_del = auto_del; |
11 | } | 9 | } |
12 | 10 | ||
13 | EOLIAN static Eina_Bool | 11 | EOLIAN static Eina_Bool |
14 | _efl_animation_object_auto_del_get(Eo *eo_obj, | 12 | _efl_animation_object_auto_del_get(Eo *eo_obj EINA_UNUSED, |
15 | Efl_Animation_Object_Data *pd) | 13 | Efl_Animation_Object_Data *pd) |
16 | { | 14 | { |
17 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj, EINA_TRUE); | ||
18 | |||
19 | return pd->auto_del; | 15 | return pd->auto_del; |
20 | } | 16 | } |
21 | 17 | ||
@@ -24,7 +20,6 @@ _target_del_cb(void *data, const Efl_Event *event EINA_UNUSED) | |||
24 | { | 20 | { |
25 | Eo *eo_obj = data; | 21 | Eo *eo_obj = data; |
26 | 22 | ||
27 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
28 | EFL_ANIMATION_OBJECT_DATA_GET(eo_obj, pd); | 23 | EFL_ANIMATION_OBJECT_DATA_GET(eo_obj, pd); |
29 | 24 | ||
30 | pd->target = NULL; | 25 | pd->target = NULL; |
@@ -36,8 +31,6 @@ _efl_animation_object_target_set(Eo *eo_obj, | |||
36 | Efl_Animation_Object_Data *pd, | 31 | Efl_Animation_Object_Data *pd, |
37 | Efl_Canvas_Object *target) | 32 | Efl_Canvas_Object *target) |
38 | { | 33 | { |
39 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
40 | |||
41 | if (pd->target == target) return; | 34 | if (pd->target == target) return; |
42 | 35 | ||
43 | if (pd->target) | 36 | if (pd->target) |
@@ -49,10 +42,9 @@ _efl_animation_object_target_set(Eo *eo_obj, | |||
49 | } | 42 | } |
50 | 43 | ||
51 | EOLIAN static Efl_Canvas_Object * | 44 | EOLIAN static Efl_Canvas_Object * |
52 | _efl_animation_object_target_get(Eo *eo_obj, Efl_Animation_Object_Data *pd) | 45 | _efl_animation_object_target_get(Eo *eo_obj EINA_UNUSED, |
46 | Efl_Animation_Object_Data *pd) | ||
53 | { | 47 | { |
54 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN((Eo *)eo_obj, NULL); | ||
55 | |||
56 | return pd->target; | 48 | return pd->target; |
57 | } | 49 | } |
58 | 50 | ||
@@ -61,79 +53,63 @@ _efl_animation_object_duration_set(Eo *eo_obj, | |||
61 | Efl_Animation_Object_Data *pd, | 53 | Efl_Animation_Object_Data *pd, |
62 | double duration) | 54 | double duration) |
63 | { | 55 | { |
64 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
65 | |||
66 | efl_animation_object_total_duration_set(eo_obj, duration); | 56 | efl_animation_object_total_duration_set(eo_obj, duration); |
67 | 57 | ||
68 | pd->duration = duration; | 58 | pd->duration = duration; |
69 | } | 59 | } |
70 | 60 | ||
71 | EOLIAN static double | 61 | EOLIAN static double |
72 | _efl_animation_object_duration_get(Eo *eo_obj, | 62 | _efl_animation_object_duration_get(Eo *eo_obj EINA_UNUSED, |
73 | Efl_Animation_Object_Data *pd) | 63 | Efl_Animation_Object_Data *pd) |
74 | { | 64 | { |
75 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN((Eo *)eo_obj, 0.0); | ||
76 | |||
77 | return pd->duration; | 65 | return pd->duration; |
78 | } | 66 | } |
79 | 67 | ||
80 | EOLIAN static void | 68 | EOLIAN static void |
81 | _efl_animation_object_duration_only_set(Eo *eo_obj, | 69 | _efl_animation_object_duration_only_set(Eo *eo_obj EINA_UNUSED, |
82 | Efl_Animation_Object_Data *pd, | 70 | Efl_Animation_Object_Data *pd, |
83 | double duration) | 71 | double duration) |
84 | { | 72 | { |
85 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
86 | |||
87 | pd->duration = duration; | 73 | pd->duration = duration; |
88 | } | 74 | } |
89 | 75 | ||
90 | EOLIAN static void | 76 | EOLIAN static void |
91 | _efl_animation_object_total_duration_set(Eo *eo_obj, | 77 | _efl_animation_object_total_duration_set(Eo *eo_obj EINA_UNUSED, |
92 | Efl_Animation_Object_Data *pd, | 78 | Efl_Animation_Object_Data *pd, |
93 | double total_duration) | 79 | double total_duration) |
94 | { | 80 | { |
95 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
96 | |||
97 | pd->total_duration = total_duration; | 81 | pd->total_duration = total_duration; |
98 | } | 82 | } |
99 | 83 | ||
100 | EOLIAN static double | 84 | EOLIAN static double |
101 | _efl_animation_object_total_duration_get(Eo *eo_obj, Efl_Animation_Object_Data *pd) | 85 | _efl_animation_object_total_duration_get(Eo *eo_obj EINA_UNUSED, |
86 | Efl_Animation_Object_Data *pd) | ||
102 | { | 87 | { |
103 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj, 0.0); | ||
104 | |||
105 | return pd->total_duration; | 88 | return pd->total_duration; |
106 | } | 89 | } |
107 | 90 | ||
108 | EOLIAN static void | 91 | EOLIAN static void |
109 | _efl_animation_object_repeat_mode_set(Eo *eo_obj, | 92 | _efl_animation_object_repeat_mode_set(Eo *eo_obj EINA_UNUSED, |
110 | Efl_Animation_Object_Data *pd, | 93 | Efl_Animation_Object_Data *pd, |
111 | Efl_Animation_Object_Repeat_Mode mode) | 94 | Efl_Animation_Object_Repeat_Mode mode) |
112 | { | 95 | { |
113 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
114 | |||
115 | if ((mode == EFL_ANIMATION_OBJECT_REPEAT_MODE_RESTART) || | 96 | if ((mode == EFL_ANIMATION_OBJECT_REPEAT_MODE_RESTART) || |
116 | (mode == EFL_ANIMATION_OBJECT_REPEAT_MODE_REVERSE)) | 97 | (mode == EFL_ANIMATION_OBJECT_REPEAT_MODE_REVERSE)) |
117 | pd->repeat_mode = mode; | 98 | pd->repeat_mode = mode; |
118 | } | 99 | } |
119 | 100 | ||
120 | EOLIAN static Efl_Animation_Object_Repeat_Mode | 101 | EOLIAN static Efl_Animation_Object_Repeat_Mode |
121 | _efl_animation_object_repeat_mode_get(const Eo *eo_obj, | 102 | _efl_animation_object_repeat_mode_get(const Eo *eo_obj EINA_UNUSED, |
122 | Efl_Animation_Object_Data *pd) | 103 | Efl_Animation_Object_Data *pd) |
123 | { | 104 | { |
124 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN((Eo *)eo_obj, | ||
125 | EFL_ANIMATION_OBJECT_REPEAT_MODE_RESTART); | ||
126 | |||
127 | return pd->repeat_mode; | 105 | return pd->repeat_mode; |
128 | } | 106 | } |
129 | 107 | ||
130 | EOLIAN static void | 108 | EOLIAN static void |
131 | _efl_animation_object_repeat_count_set(Eo *eo_obj, | 109 | _efl_animation_object_repeat_count_set(Eo *eo_obj EINA_UNUSED, |
132 | Efl_Animation_Object_Data *pd, | 110 | Efl_Animation_Object_Data *pd, |
133 | int count) | 111 | int count) |
134 | { | 112 | { |
135 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
136 | |||
137 | //EFL_ANIMATION_OBJECT_REPEAT_INFINITE repeats animation infinitely | 113 | //EFL_ANIMATION_OBJECT_REPEAT_INFINITE repeats animation infinitely |
138 | if ((count < 0) && (count != EFL_ANIMATION_OBJECT_REPEAT_INFINITE)) return; | 114 | if ((count < 0) && (count != EFL_ANIMATION_OBJECT_REPEAT_INFINITE)) return; |
139 | 115 | ||
@@ -141,69 +117,48 @@ _efl_animation_object_repeat_count_set(Eo *eo_obj, | |||
141 | } | 117 | } |
142 | 118 | ||
143 | EOLIAN static int | 119 | EOLIAN static int |
144 | _efl_animation_object_repeat_count_get(const Eo *eo_obj, | 120 | _efl_animation_object_repeat_count_get(const Eo *eo_obj EINA_UNUSED, |
145 | Efl_Animation_Object_Data *pd) | 121 | Efl_Animation_Object_Data *pd) |
146 | { | 122 | { |
147 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN((Eo *)eo_obj, 0); | ||
148 | |||
149 | return pd->repeat_count; | 123 | return pd->repeat_count; |
150 | } | 124 | } |
151 | 125 | ||
152 | EOLIAN static void | 126 | EOLIAN static void |
153 | _efl_animation_object_start_delay_set(Eo *eo_obj, | 127 | _efl_animation_object_start_delay_set(Eo *eo_obj EINA_UNUSED, |
154 | Efl_Animation_Object_Data *pd, | 128 | Efl_Animation_Object_Data *pd, |
155 | double delay_time) | 129 | double delay_time) |
156 | { | 130 | { |
157 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
158 | |||
159 | if (delay_time < 0.0) return; | 131 | if (delay_time < 0.0) return; |
160 | 132 | ||
161 | pd->start_delay_time = delay_time; | 133 | pd->start_delay_time = delay_time; |
162 | } | 134 | } |
163 | 135 | ||
164 | EOLIAN static double | 136 | EOLIAN static double |
165 | _efl_animation_object_start_delay_get(Eo *eo_obj, | 137 | _efl_animation_object_start_delay_get(Eo *eo_obj EINA_UNUSED, |
166 | Efl_Animation_Object_Data *pd) | 138 | Efl_Animation_Object_Data *pd) |
167 | { | 139 | { |
168 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj, 0.0); | ||
169 | |||
170 | return pd->start_delay_time; | 140 | return pd->start_delay_time; |
171 | } | 141 | } |
172 | 142 | ||
173 | EOLIAN static void | 143 | EOLIAN static void |
174 | _efl_animation_object_interpolator_set(Eo *eo_obj, | 144 | _efl_animation_object_interpolator_set(Eo *eo_obj EINA_UNUSED, |
175 | Efl_Animation_Object_Data *pd, | 145 | Efl_Animation_Object_Data *pd, |
176 | Efl_Interpolator *interpolator) | 146 | Efl_Interpolator *interpolator) |
177 | { | 147 | { |
178 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
179 | |||
180 | pd->interpolator = interpolator; | 148 | pd->interpolator = interpolator; |
181 | } | 149 | } |
182 | 150 | ||
183 | EOLIAN static Efl_Interpolator * | 151 | EOLIAN static Efl_Interpolator * |
184 | _efl_animation_object_interpolator_get(Eo *eo_obj, | 152 | _efl_animation_object_interpolator_get(Eo *eo_obj EINA_UNUSED, |
185 | Efl_Animation_Object_Data *pd) | 153 | Efl_Animation_Object_Data *pd) |
186 | { | 154 | { |
187 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj, NULL); | ||
188 | |||
189 | return pd->interpolator; | 155 | return pd->interpolator; |
190 | } | 156 | } |
191 | 157 | ||
192 | EOLIAN static Eina_Bool | ||
193 | _efl_animation_object_is_deleted(Eo *eo_obj, | ||
194 | Efl_Animation_Object_Data *pd) | ||
195 | { | ||
196 | EINA_SAFETY_ON_NULL_RETURN_VAL(eo_obj, EINA_TRUE); | ||
197 | |||
198 | return pd->is_deleted; | ||
199 | } | ||
200 | |||
201 | EOLIAN static void | 158 | EOLIAN static void |
202 | _efl_animation_object_target_state_save(Eo *eo_obj, | 159 | _efl_animation_object_target_state_save(Eo *eo_obj EINA_UNUSED, |
203 | Efl_Animation_Object_Data *pd) | 160 | Efl_Animation_Object_Data *pd) |
204 | { | 161 | { |
205 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
206 | |||
207 | if (!pd->target || !pd->target_state) return; | 162 | if (!pd->target || !pd->target_state) return; |
208 | 163 | ||
209 | Evas_Coord x, y, w, h; | 164 | Evas_Coord x, y, w, h; |
@@ -230,11 +185,9 @@ _efl_animation_object_target_state_save(Eo *eo_obj, | |||
230 | } | 185 | } |
231 | 186 | ||
232 | EOLIAN static void | 187 | EOLIAN static void |
233 | _efl_animation_object_target_state_reset(Eo *eo_obj, | 188 | _efl_animation_object_target_state_reset(Eo *eo_obj EINA_UNUSED, |
234 | Efl_Animation_Object_Data *pd) | 189 | Efl_Animation_Object_Data *pd) |
235 | { | 190 | { |
236 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
237 | |||
238 | if (!pd->target) return; | 191 | if (!pd->target) return; |
239 | 192 | ||
240 | if (efl_gfx_map_has(pd->target)) | 193 | if (efl_gfx_map_has(pd->target)) |
@@ -267,11 +220,9 @@ _efl_animation_object_target_state_reset(Eo *eo_obj, | |||
267 | } | 220 | } |
268 | 221 | ||
269 | EOLIAN static void | 222 | EOLIAN static void |
270 | _efl_animation_object_target_map_reset(Eo *eo_obj, | 223 | _efl_animation_object_target_map_reset(Eo *eo_obj EINA_UNUSED, |
271 | Efl_Animation_Object_Data *pd) | 224 | Efl_Animation_Object_Data *pd) |
272 | { | 225 | { |
273 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
274 | |||
275 | if (!pd->target) return; | 226 | if (!pd->target) return; |
276 | 227 | ||
277 | if (efl_gfx_map_has(pd->target)) | 228 | if (efl_gfx_map_has(pd->target)) |
@@ -279,23 +230,19 @@ _efl_animation_object_target_map_reset(Eo *eo_obj, | |||
279 | } | 230 | } |
280 | 231 | ||
281 | EOLIAN static void | 232 | EOLIAN static void |
282 | _efl_animation_object_final_state_keep_set(Eo *eo_obj, | 233 | _efl_animation_object_final_state_keep_set(Eo *eo_obj EINA_UNUSED, |
283 | Efl_Animation_Object_Data *pd, | 234 | Efl_Animation_Object_Data *pd, |
284 | Eina_Bool keep_final_state) | 235 | Eina_Bool keep_final_state) |
285 | { | 236 | { |
286 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
287 | |||
288 | if (pd->keep_final_state == keep_final_state) return; | 237 | if (pd->keep_final_state == keep_final_state) return; |
289 | 238 | ||
290 | pd->keep_final_state = !!keep_final_state; | 239 | pd->keep_final_state = !!keep_final_state; |
291 | } | 240 | } |
292 | 241 | ||
293 | EOLIAN static Eina_Bool | 242 | EOLIAN static Eina_Bool |
294 | _efl_animation_object_final_state_keep_get(Eo *eo_obj, | 243 | _efl_animation_object_final_state_keep_get(Eo *eo_obj EINA_UNUSED, |
295 | Efl_Animation_Object_Data *pd) | 244 | Efl_Animation_Object_Data *pd) |
296 | { | 245 | { |
297 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN((Eo *)eo_obj, EINA_FALSE); | ||
298 | |||
299 | return pd->keep_final_state; | 246 | return pd->keep_final_state; |
300 | } | 247 | } |
301 | 248 | ||
@@ -451,8 +398,6 @@ EOLIAN static void | |||
451 | _efl_animation_object_start(Eo *eo_obj, | 398 | _efl_animation_object_start(Eo *eo_obj, |
452 | Efl_Animation_Object_Data *pd) | 399 | Efl_Animation_Object_Data *pd) |
453 | { | 400 | { |
454 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
455 | |||
456 | if (pd->start_delay_timer) return; | 401 | if (pd->start_delay_timer) return; |
457 | 402 | ||
458 | if (pd->start_delay_time > 0.0) | 403 | if (pd->start_delay_time > 0.0) |
@@ -469,8 +414,6 @@ EOLIAN static void | |||
469 | _efl_animation_object_cancel(Eo *eo_obj, | 414 | _efl_animation_object_cancel(Eo *eo_obj, |
470 | Efl_Animation_Object_Data *pd) | 415 | Efl_Animation_Object_Data *pd) |
471 | { | 416 | { |
472 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
473 | |||
474 | ecore_timer_del(pd->start_delay_timer); | 417 | ecore_timer_del(pd->start_delay_timer); |
475 | pd->start_delay_timer = NULL; | 418 | pd->start_delay_timer = NULL; |
476 | 419 | ||
@@ -497,8 +440,6 @@ _efl_animation_object_progress_set(Eo *eo_obj, | |||
497 | Efl_Animation_Object_Data *pd EINA_UNUSED, | 440 | Efl_Animation_Object_Data *pd EINA_UNUSED, |
498 | double progress) | 441 | double progress) |
499 | { | 442 | { |
500 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
501 | |||
502 | if ((progress < 0.0) || (progress > 1.0)) return; | 443 | if ((progress < 0.0) || (progress > 1.0)) return; |
503 | 444 | ||
504 | if (!pd->is_direction_forward) | 445 | if (!pd->is_direction_forward) |
@@ -519,11 +460,9 @@ _efl_animation_object_progress_set(Eo *eo_obj, | |||
519 | } | 460 | } |
520 | 461 | ||
521 | EOLIAN static void | 462 | EOLIAN static void |
522 | _efl_animation_object_pause(Eo *eo_obj, | 463 | _efl_animation_object_pause(Eo *eo_obj EINA_UNUSED, |
523 | Efl_Animation_Object_Data *pd) | 464 | Efl_Animation_Object_Data *pd) |
524 | { | 465 | { |
525 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
526 | |||
527 | if (!pd->is_started) return; | 466 | if (!pd->is_started) return; |
528 | if (pd->is_ended) return; | 467 | if (pd->is_ended) return; |
529 | if (pd->is_paused) return; | 468 | if (pd->is_paused) return; |
@@ -542,8 +481,6 @@ EOLIAN static void | |||
542 | _efl_animation_object_resume(Eo *eo_obj, | 481 | _efl_animation_object_resume(Eo *eo_obj, |
543 | Efl_Animation_Object_Data *pd) | 482 | Efl_Animation_Object_Data *pd) |
544 | { | 483 | { |
545 | EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(eo_obj); | ||
546 | |||
547 | if (!pd->is_started) return; | 484 | if (!pd->is_started) return; |
548 | if (pd->is_ended) return; | 485 | if (pd->is_ended) return; |
549 | if (!pd->is_paused) return; | 486 | if (!pd->is_paused) return; |
@@ -580,7 +517,6 @@ _efl_animation_object_efl_object_constructor(Eo *eo_obj, | |||
580 | pd->repeat_count = 0; | 517 | pd->repeat_count = 0; |
581 | 518 | ||
582 | pd->auto_del = EINA_TRUE; | 519 | pd->auto_del = EINA_TRUE; |
583 | pd->is_deleted = EINA_FALSE; | ||
584 | pd->is_cancelled = EINA_FALSE; | 520 | pd->is_cancelled = EINA_FALSE; |
585 | pd->keep_final_state = EINA_FALSE; | 521 | pd->keep_final_state = EINA_FALSE; |
586 | 522 | ||
@@ -591,8 +527,6 @@ EOLIAN static void | |||
591 | _efl_animation_object_efl_object_destructor(Eo *eo_obj, | 527 | _efl_animation_object_efl_object_destructor(Eo *eo_obj, |
592 | Efl_Animation_Object_Data *pd) | 528 | Efl_Animation_Object_Data *pd) |
593 | { | 529 | { |
594 | pd->is_deleted = EINA_TRUE; | ||
595 | |||
596 | if (pd->animator) | 530 | if (pd->animator) |
597 | { | 531 | { |
598 | ecore_animator_del(pd->animator); | 532 | ecore_animator_del(pd->animator); |
diff --git a/src/lib/evas/canvas/efl_animation_object.eo b/src/lib/evas/canvas/efl_animation_object.eo index 8596836359..f7aa02b225 100644 --- a/src/lib/evas/canvas/efl_animation_object.eo +++ b/src/lib/evas/canvas/efl_animation_object.eo | |||
@@ -26,9 +26,6 @@ class Efl.Animation.Object (Efl.Object) | |||
26 | resume { | 26 | resume { |
27 | [[Resume animation.]] | 27 | [[Resume animation.]] |
28 | } | 28 | } |
29 | is_deleted @protected { | ||
30 | return: bool; [[$true if animation object is deleted, $false otherwise.]] | ||
31 | } | ||
32 | target_state_save @protected { | 29 | target_state_save @protected { |
33 | [[Save the state of the target.]] | 30 | [[Save the state of the target.]] |
34 | } | 31 | } |
diff --git a/src/lib/evas/canvas/efl_animation_object_alpha.c b/src/lib/evas/canvas/efl_animation_object_alpha.c index f489b31404..d98b0590c3 100644 --- a/src/lib/evas/canvas/efl_animation_object_alpha.c +++ b/src/lib/evas/canvas/efl_animation_object_alpha.c | |||
@@ -1,13 +1,11 @@ | |||
1 | #include "efl_animation_object_alpha_private.h" | 1 | #include "efl_animation_object_alpha_private.h" |
2 | 2 | ||
3 | EOLIAN static void | 3 | EOLIAN static void |
4 | _efl_animation_object_alpha_alpha_set(Eo *eo_obj, | 4 | _efl_animation_object_alpha_alpha_set(Eo *eo_obj EINA_UNUSED, |
5 | Efl_Animation_Object_Alpha_Data *pd, | 5 | Efl_Animation_Object_Alpha_Data *pd, |
6 | double from_alpha, | 6 | double from_alpha, |
7 | double to_alpha) | 7 | double to_alpha) |
8 | { | 8 | { |
9 | EFL_ANIMATION_OBJECT_ALPHA_CHECK_OR_RETURN(eo_obj); | ||
10 | |||
11 | pd->from.alpha = from_alpha; | 9 | pd->from.alpha = from_alpha; |
12 | pd->to.alpha = to_alpha; | 10 | pd->to.alpha = to_alpha; |
13 | } | 11 | } |
@@ -18,8 +16,6 @@ _efl_animation_object_alpha_alpha_get(Eo *eo_obj EINA_UNUSED, | |||
18 | double *from_alpha, | 16 | double *from_alpha, |
19 | double *to_alpha) | 17 | double *to_alpha) |
20 | { | 18 | { |
21 | EFL_ANIMATION_OBJECT_ALPHA_CHECK_OR_RETURN(eo_obj); | ||
22 | |||
23 | if (from_alpha) | 19 | if (from_alpha) |
24 | *from_alpha = pd->from.alpha; | 20 | *from_alpha = pd->from.alpha; |
25 | if (to_alpha) | 21 | if (to_alpha) |
@@ -57,8 +53,6 @@ _efl_animation_object_alpha_efl_animation_object_progress_set(Eo *eo_obj, | |||
57 | Efl_Animation_Object_Alpha_Data *pd EINA_UNUSED, | 53 | Efl_Animation_Object_Alpha_Data *pd EINA_UNUSED, |
58 | double progress) | 54 | double progress) |
59 | { | 55 | { |
60 | EFL_ANIMATION_OBJECT_ALPHA_CHECK_OR_RETURN(eo_obj); | ||
61 | |||
62 | if ((progress < 0.0) || (progress > 1.0)) return; | 56 | if ((progress < 0.0) || (progress > 1.0)) return; |
63 | 57 | ||
64 | _progress_set(eo_obj, progress); | 58 | _progress_set(eo_obj, progress); |
diff --git a/src/lib/evas/canvas/efl_animation_object_alpha_private.h b/src/lib/evas/canvas/efl_animation_object_alpha_private.h index a953107cf3..799edc1b66 100644 --- a/src/lib/evas/canvas/efl_animation_object_alpha_private.h +++ b/src/lib/evas/canvas/efl_animation_object_alpha_private.h | |||
@@ -9,18 +9,6 @@ | |||
9 | #define MY_CLASS EFL_ANIMATION_OBJECT_ALPHA_CLASS | 9 | #define MY_CLASS EFL_ANIMATION_OBJECT_ALPHA_CLASS |
10 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 10 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
11 | 11 | ||
12 | #define EFL_ANIMATION_OBJECT_ALPHA_CHECK_OR_RETURN(anim_obj, ...) \ | ||
13 | do { \ | ||
14 | if (!anim_obj) { \ | ||
15 | CRI("Efl_Animation_Object " # anim_obj " is NULL!"); \ | ||
16 | return __VA_ARGS__; \ | ||
17 | } \ | ||
18 | if (efl_animation_object_is_deleted(anim_obj)) { \ | ||
19 | ERR("Efl_Animation_Object " # anim_obj " has already been deleted!"); \ | ||
20 | return __VA_ARGS__; \ | ||
21 | } \ | ||
22 | } while (0) | ||
23 | |||
24 | #define EFL_ANIMATION_OBJECT_ALPHA_DATA_GET(o, pd) \ | 12 | #define EFL_ANIMATION_OBJECT_ALPHA_DATA_GET(o, pd) \ |
25 | Efl_Animation_Object_Alpha_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_ALPHA_CLASS) | 13 | Efl_Animation_Object_Alpha_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_ALPHA_CLASS) |
26 | 14 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_group.c b/src/lib/evas/canvas/efl_animation_object_group.c index 6c8c1b2893..09d45141c2 100644 --- a/src/lib/evas/canvas/efl_animation_object_group.c +++ b/src/lib/evas/canvas/efl_animation_object_group.c | |||
@@ -5,8 +5,6 @@ _efl_animation_object_group_object_add(Eo *eo_obj, | |||
5 | Efl_Animation_Object_Group_Data *pd, | 5 | Efl_Animation_Object_Group_Data *pd, |
6 | Efl_Animation_Object *anim_obj) | 6 | Efl_Animation_Object *anim_obj) |
7 | { | 7 | { |
8 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
9 | |||
10 | if (!anim_obj) return; | 8 | if (!anim_obj) return; |
11 | 9 | ||
12 | Efl_Canvas_Object *target = efl_animation_object_target_get(eo_obj); | 10 | Efl_Canvas_Object *target = efl_animation_object_target_get(eo_obj); |
@@ -26,23 +24,19 @@ _efl_animation_object_group_object_add(Eo *eo_obj, | |||
26 | } | 24 | } |
27 | 25 | ||
28 | EOLIAN static void | 26 | EOLIAN static void |
29 | _efl_animation_object_group_object_del(Eo *eo_obj, | 27 | _efl_animation_object_group_object_del(Eo *eo_obj EINA_UNUSED, |
30 | Efl_Animation_Object_Group_Data *pd, | 28 | Efl_Animation_Object_Group_Data *pd, |
31 | Efl_Animation_Object *anim_obj) | 29 | Efl_Animation_Object *anim_obj) |
32 | { | 30 | { |
33 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
34 | |||
35 | if (!anim_obj) return; | 31 | if (!anim_obj) return; |
36 | 32 | ||
37 | pd->anim_objs = eina_list_remove(pd->anim_objs, anim_obj); | 33 | pd->anim_objs = eina_list_remove(pd->anim_objs, anim_obj); |
38 | } | 34 | } |
39 | 35 | ||
40 | EOLIAN static Eina_List * | 36 | EOLIAN static Eina_List * |
41 | _efl_animation_object_group_objects_get(Eo *eo_obj, | 37 | _efl_animation_object_group_objects_get(Eo *eo_obj EINA_UNUSED, |
42 | Efl_Animation_Object_Group_Data *pd) | 38 | Efl_Animation_Object_Group_Data *pd) |
43 | { | 39 | { |
44 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj, NULL); | ||
45 | |||
46 | return pd->anim_objs; | 40 | return pd->anim_objs; |
47 | } | 41 | } |
48 | 42 | ||
@@ -51,8 +45,6 @@ _efl_animation_object_group_efl_animation_object_target_set(Eo *eo_obj, | |||
51 | Efl_Animation_Object_Group_Data *pd, | 45 | Efl_Animation_Object_Group_Data *pd, |
52 | Efl_Canvas_Object *target) | 46 | Efl_Canvas_Object *target) |
53 | { | 47 | { |
54 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
55 | |||
56 | Eina_List *l; | 48 | Eina_List *l; |
57 | Efl_Animation_Object *anim_obj; | 49 | Efl_Animation_Object *anim_obj; |
58 | 50 | ||
@@ -69,8 +61,6 @@ _efl_animation_object_group_efl_animation_object_duration_set(Eo *eo_obj, | |||
69 | Efl_Animation_Object_Group_Data *pd, | 61 | Efl_Animation_Object_Group_Data *pd, |
70 | double duration) | 62 | double duration) |
71 | { | 63 | { |
72 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
73 | |||
74 | if (duration == EFL_ANIMATION_OBJECT_GROUP_DURATION_NONE) goto end; | 64 | if (duration == EFL_ANIMATION_OBJECT_GROUP_DURATION_NONE) goto end; |
75 | 65 | ||
76 | if (duration < 0.0) return; | 66 | if (duration < 0.0) return; |
@@ -98,8 +88,6 @@ _efl_animation_object_group_efl_animation_object_final_state_keep_set(Eo *eo_obj | |||
98 | Efl_Animation_Object_Group_Data *pd, | 88 | Efl_Animation_Object_Group_Data *pd, |
99 | Eina_Bool state_keep) | 89 | Eina_Bool state_keep) |
100 | { | 90 | { |
101 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
102 | |||
103 | Eina_List *l; | 91 | Eina_List *l; |
104 | Efl_Animation_Object *anim_obj; | 92 | Efl_Animation_Object *anim_obj; |
105 | 93 | ||
@@ -117,8 +105,6 @@ _efl_animation_object_group_efl_animation_object_interpolator_set(Eo *eo_obj, | |||
117 | Efl_Animation_Object_Group_Data *pd, | 105 | Efl_Animation_Object_Group_Data *pd, |
118 | Efl_Interpolator *interpolator) | 106 | Efl_Interpolator *interpolator) |
119 | { | 107 | { |
120 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
121 | |||
122 | Eina_List *l; | 108 | Eina_List *l; |
123 | Efl_Animation_Object *anim_obj; | 109 | Efl_Animation_Object *anim_obj; |
124 | 110 | ||
@@ -159,11 +145,9 @@ _efl_animation_object_group_efl_object_destructor(Eo *eo_obj, | |||
159 | } | 145 | } |
160 | 146 | ||
161 | EOLIAN static void | 147 | EOLIAN static void |
162 | _efl_animation_object_group_efl_animation_object_target_state_save(Eo *eo_obj, | 148 | _efl_animation_object_group_efl_animation_object_target_state_save(Eo *eo_obj EINA_UNUSED, |
163 | Efl_Animation_Object_Group_Data *pd) | 149 | Efl_Animation_Object_Group_Data *pd) |
164 | { | 150 | { |
165 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
166 | |||
167 | Eina_List *l; | 151 | Eina_List *l; |
168 | Efl_Animation_Object *anim_obj; | 152 | Efl_Animation_Object *anim_obj; |
169 | 153 | ||
@@ -174,11 +158,9 @@ _efl_animation_object_group_efl_animation_object_target_state_save(Eo *eo_obj, | |||
174 | } | 158 | } |
175 | 159 | ||
176 | EOLIAN static void | 160 | EOLIAN static void |
177 | _efl_animation_object_group_efl_animation_object_target_state_reset(Eo *eo_obj, | 161 | _efl_animation_object_group_efl_animation_object_target_state_reset(Eo *eo_obj EINA_UNUSED, |
178 | Efl_Animation_Object_Group_Data *pd) | 162 | Efl_Animation_Object_Group_Data *pd) |
179 | { | 163 | { |
180 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
181 | |||
182 | Eina_List *l; | 164 | Eina_List *l; |
183 | Efl_Animation_Object *anim_obj; | 165 | Efl_Animation_Object *anim_obj; |
184 | 166 | ||
@@ -189,11 +171,9 @@ _efl_animation_object_group_efl_animation_object_target_state_reset(Eo *eo_obj, | |||
189 | } | 171 | } |
190 | 172 | ||
191 | EOLIAN static void | 173 | EOLIAN static void |
192 | _efl_animation_object_group_efl_animation_object_target_map_reset(Eo *eo_obj, | 174 | _efl_animation_object_group_efl_animation_object_target_map_reset(Eo *eo_obj EINA_UNUSED, |
193 | Efl_Animation_Object_Group_Data *pd) | 175 | Efl_Animation_Object_Group_Data *pd) |
194 | { | 176 | { |
195 | EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(eo_obj); | ||
196 | |||
197 | Eina_List *l; | 177 | Eina_List *l; |
198 | Efl_Animation_Object *anim_obj; | 178 | Efl_Animation_Object *anim_obj; |
199 | 179 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_group_parallel.c b/src/lib/evas/canvas/efl_animation_object_group_parallel.c index dd6043608f..120b1e5fde 100644 --- a/src/lib/evas/canvas/efl_animation_object_group_parallel.c +++ b/src/lib/evas/canvas/efl_animation_object_group_parallel.c | |||
@@ -59,8 +59,6 @@ _efl_animation_object_group_parallel_efl_animation_object_group_object_add(Eo *e | |||
59 | Efl_Animation_Object_Group_Parallel_Data *pd, | 59 | Efl_Animation_Object_Group_Parallel_Data *pd, |
60 | Efl_Animation_Object *anim_obj) | 60 | Efl_Animation_Object *anim_obj) |
61 | { | 61 | { |
62 | EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CHECK_OR_RETURN(eo_obj); | ||
63 | |||
64 | if (!anim_obj) return; | 62 | if (!anim_obj) return; |
65 | 63 | ||
66 | efl_animation_object_group_object_add(efl_super(eo_obj, MY_CLASS), anim_obj); | 64 | efl_animation_object_group_object_add(efl_super(eo_obj, MY_CLASS), anim_obj); |
@@ -83,8 +81,6 @@ _efl_animation_object_group_parallel_efl_animation_object_group_object_del(Eo *e | |||
83 | Efl_Animation_Object_Group_Parallel_Data *pd EINA_UNUSED, | 81 | Efl_Animation_Object_Group_Parallel_Data *pd EINA_UNUSED, |
84 | Efl_Animation_Object *anim_obj) | 82 | Efl_Animation_Object *anim_obj) |
85 | { | 83 | { |
86 | EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CHECK_OR_RETURN(eo_obj); | ||
87 | |||
88 | if (!anim_obj) return; | 84 | if (!anim_obj) return; |
89 | 85 | ||
90 | efl_animation_object_group_object_del(efl_super(eo_obj, MY_CLASS), anim_obj); | 86 | efl_animation_object_group_object_del(efl_super(eo_obj, MY_CLASS), anim_obj); |
@@ -106,8 +102,6 @@ EOLIAN static double | |||
106 | _efl_animation_object_group_parallel_efl_animation_object_total_duration_get(Eo *eo_obj, | 102 | _efl_animation_object_group_parallel_efl_animation_object_total_duration_get(Eo *eo_obj, |
107 | Efl_Animation_Object_Group_Parallel_Data *pd EINA_UNUSED) | 103 | Efl_Animation_Object_Group_Parallel_Data *pd EINA_UNUSED) |
108 | { | 104 | { |
109 | EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CHECK_OR_RETURN(eo_obj, 0.0); | ||
110 | |||
111 | Eina_List *anim_objs = efl_animation_object_group_objects_get(eo_obj); | 105 | Eina_List *anim_objs = efl_animation_object_group_objects_get(eo_obj); |
112 | if (!anim_objs) return 0.0; | 106 | if (!anim_objs) return 0.0; |
113 | 107 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_group_parallel_private.h b/src/lib/evas/canvas/efl_animation_object_group_parallel_private.h index d6119623ba..e0026ec6f4 100644 --- a/src/lib/evas/canvas/efl_animation_object_group_parallel_private.h +++ b/src/lib/evas/canvas/efl_animation_object_group_parallel_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CHECK_OR_RETURN(anim_obj, ...) \ | ||
10 | do { \ | ||
11 | if (!anim_obj) { \ | ||
12 | CRI("Efl_Animation_Object " # anim_obj " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_object_is_deleted(anim_obj)) { \ | ||
16 | ERR("Efl_Animation_Object " # anim_obj " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_OBJECT_GROUP_PARALLEL_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_OBJECT_GROUP_PARALLEL_DATA_GET(o, pd) \ |
22 | Efl_Animation_Object_Group_Parallel_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CLASS) | 10 | Efl_Animation_Object_Group_Parallel_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_GROUP_PARALLEL_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_group_private.h b/src/lib/evas/canvas/efl_animation_object_group_private.h index 52456b3f89..5342e2c22f 100644 --- a/src/lib/evas/canvas/efl_animation_object_group_private.h +++ b/src/lib/evas/canvas/efl_animation_object_group_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_OBJECT_GROUP_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_OBJECT_GROUP_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_OBJECT_GROUP_CHECK_OR_RETURN(anim_obj, ...) \ | ||
10 | do { \ | ||
11 | if (!anim_obj) { \ | ||
12 | CRI("Efl_Animation_Object " # anim_obj " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_object_is_deleted(anim_obj)) { \ | ||
16 | ERR("Efl_Animation_Object " # anim_obj " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_OBJECT_GROUP_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_OBJECT_GROUP_DATA_GET(o, pd) \ |
22 | Efl_Animation_Object_Group_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_GROUP_CLASS) | 10 | Efl_Animation_Object_Group_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_GROUP_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_group_sequential.c b/src/lib/evas/canvas/efl_animation_object_group_sequential.c index 0f07a597f1..d7f717885b 100644 --- a/src/lib/evas/canvas/efl_animation_object_group_sequential.c +++ b/src/lib/evas/canvas/efl_animation_object_group_sequential.c | |||
@@ -61,8 +61,6 @@ _efl_animation_object_group_sequential_efl_animation_object_group_object_add(Eo | |||
61 | Efl_Animation_Object_Group_Sequential_Data *pd EINA_UNUSED, | 61 | Efl_Animation_Object_Group_Sequential_Data *pd EINA_UNUSED, |
62 | Efl_Animation_Object *anim_obj) | 62 | Efl_Animation_Object *anim_obj) |
63 | { | 63 | { |
64 | EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CHECK_OR_RETURN(eo_obj); | ||
65 | |||
66 | if (!anim_obj) return; | 64 | if (!anim_obj) return; |
67 | 65 | ||
68 | efl_animation_object_group_object_add(efl_super(eo_obj, MY_CLASS), anim_obj); | 66 | efl_animation_object_group_object_add(efl_super(eo_obj, MY_CLASS), anim_obj); |
@@ -85,8 +83,6 @@ _efl_animation_object_group_sequential_efl_animation_object_group_object_del(Eo | |||
85 | Efl_Animation_Object_Group_Sequential_Data *pd EINA_UNUSED, | 83 | Efl_Animation_Object_Group_Sequential_Data *pd EINA_UNUSED, |
86 | Efl_Animation_Object *anim_obj) | 84 | Efl_Animation_Object *anim_obj) |
87 | { | 85 | { |
88 | EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CHECK_OR_RETURN(eo_obj); | ||
89 | |||
90 | if (!anim_obj) return; | 86 | if (!anim_obj) return; |
91 | 87 | ||
92 | efl_animation_object_group_object_del(efl_super(eo_obj, MY_CLASS), anim_obj); | 88 | efl_animation_object_group_object_del(efl_super(eo_obj, MY_CLASS), anim_obj); |
@@ -108,8 +104,6 @@ EOLIAN static double | |||
108 | _efl_animation_object_group_sequential_efl_animation_object_total_duration_get(Eo *eo_obj, | 104 | _efl_animation_object_group_sequential_efl_animation_object_total_duration_get(Eo *eo_obj, |
109 | Efl_Animation_Object_Group_Sequential_Data *pd EINA_UNUSED) | 105 | Efl_Animation_Object_Group_Sequential_Data *pd EINA_UNUSED) |
110 | { | 106 | { |
111 | EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CHECK_OR_RETURN(eo_obj, 0.0); | ||
112 | |||
113 | Eina_List *anim_objs = efl_animation_object_group_objects_get(eo_obj); | 107 | Eina_List *anim_objs = efl_animation_object_group_objects_get(eo_obj); |
114 | if (!anim_objs) return 0.0; | 108 | if (!anim_objs) return 0.0; |
115 | 109 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_group_sequential_private.h b/src/lib/evas/canvas/efl_animation_object_group_sequential_private.h index f0bbe8f7a1..2c8515a68c 100644 --- a/src/lib/evas/canvas/efl_animation_object_group_sequential_private.h +++ b/src/lib/evas/canvas/efl_animation_object_group_sequential_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CHECK_OR_RETURN(anim_obj, ...) \ | ||
10 | do { \ | ||
11 | if (!anim_obj) { \ | ||
12 | CRI("Efl_Animation_Object " # anim_obj " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_object_is_deleted(anim_obj)) { \ | ||
16 | ERR("Efl_Animation_Object " # anim_obj " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_DATA_GET(o, pd) \ |
22 | Efl_Animation_Object_Group_Sequential_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CLASS) | 10 | Efl_Animation_Object_Group_Sequential_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_GROUP_SEQUENTIAL_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_private.h b/src/lib/evas/canvas/efl_animation_object_private.h index f3cbecb159..578e478537 100644 --- a/src/lib/evas/canvas/efl_animation_object_private.h +++ b/src/lib/evas/canvas/efl_animation_object_private.h | |||
@@ -44,7 +44,6 @@ typedef struct _Efl_Animation_Object_Data | |||
44 | Efl_Interpolator *interpolator; | 44 | Efl_Interpolator *interpolator; |
45 | 45 | ||
46 | Eina_Bool auto_del : 1; | 46 | Eina_Bool auto_del : 1; |
47 | Eina_Bool is_deleted : 1; | ||
48 | Eina_Bool is_started : 1; | 47 | Eina_Bool is_started : 1; |
49 | Eina_Bool is_cancelled : 1; | 48 | Eina_Bool is_cancelled : 1; |
50 | Eina_Bool is_ended : 1; | 49 | Eina_Bool is_ended : 1; |
@@ -54,17 +53,5 @@ typedef struct _Efl_Animation_Object_Data | |||
54 | Eina_Bool is_direction_changed : 1; | 53 | Eina_Bool is_direction_changed : 1; |
55 | } Efl_Animation_Object_Data; | 54 | } Efl_Animation_Object_Data; |
56 | 55 | ||
57 | #define EFL_ANIMATION_OBJECT_CHECK_OR_RETURN(anim_obj, ...) \ | ||
58 | do { \ | ||
59 | if (!anim_obj) { \ | ||
60 | CRI("Efl_Animation_Object " # anim_obj " is NULL!"); \ | ||
61 | return __VA_ARGS__; \ | ||
62 | } \ | ||
63 | if (efl_animation_object_is_deleted(anim_obj)) { \ | ||
64 | ERR("Efl_Animation_Object " # anim_obj " has already been deleted!"); \ | ||
65 | return __VA_ARGS__; \ | ||
66 | } \ | ||
67 | } while (0) | ||
68 | |||
69 | #define EFL_ANIMATION_OBJECT_DATA_GET(o, pd) \ | 56 | #define EFL_ANIMATION_OBJECT_DATA_GET(o, pd) \ |
70 | Efl_Animation_Object_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_CLASS) | 57 | Efl_Animation_Object_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_CLASS) |
diff --git a/src/lib/evas/canvas/efl_animation_object_rotate.c b/src/lib/evas/canvas/efl_animation_object_rotate.c index 7fbcc250cf..65972d090d 100644 --- a/src/lib/evas/canvas/efl_animation_object_rotate.c +++ b/src/lib/evas/canvas/efl_animation_object_rotate.c | |||
@@ -9,8 +9,6 @@ _efl_animation_object_rotate_rotate_set(Eo *eo_obj, | |||
9 | double cx, | 9 | double cx, |
10 | double cy) | 10 | double cy) |
11 | { | 11 | { |
12 | EFL_ANIMATION_OBJECT_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
13 | |||
14 | pd->from.degree = from_degree; | 12 | pd->from.degree = from_degree; |
15 | pd->to.degree = to_degree; | 13 | pd->to.degree = to_degree; |
16 | 14 | ||
@@ -48,8 +46,6 @@ _efl_animation_object_rotate_rotate_get(Eo *eo_obj, | |||
48 | double *cx, | 46 | double *cx, |
49 | double *cy) | 47 | double *cy) |
50 | { | 48 | { |
51 | EFL_ANIMATION_OBJECT_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
52 | |||
53 | //Update relative pivot based on absolute pivot | 49 | //Update relative pivot based on absolute pivot |
54 | if (!pd->use_rel_pivot) | 50 | if (!pd->use_rel_pivot) |
55 | { | 51 | { |
@@ -97,8 +93,6 @@ _efl_animation_object_rotate_rotate_absolute_set(Eo *eo_obj, | |||
97 | Evas_Coord cx, | 93 | Evas_Coord cx, |
98 | Evas_Coord cy) | 94 | Evas_Coord cy) |
99 | { | 95 | { |
100 | EFL_ANIMATION_OBJECT_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
101 | |||
102 | pd->from.degree = from_degree; | 96 | pd->from.degree = from_degree; |
103 | pd->to.degree = to_degree; | 97 | pd->to.degree = to_degree; |
104 | 98 | ||
@@ -138,8 +132,6 @@ _efl_animation_object_rotate_rotate_absolute_get(Eo *eo_obj, | |||
138 | Evas_Coord *cx, | 132 | Evas_Coord *cx, |
139 | Evas_Coord *cy) | 133 | Evas_Coord *cy) |
140 | { | 134 | { |
141 | EFL_ANIMATION_OBJECT_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
142 | |||
143 | //Update absolute pivot based on relative pivot | 135 | //Update absolute pivot based on relative pivot |
144 | if (pd->use_rel_pivot) | 136 | if (pd->use_rel_pivot) |
145 | { | 137 | { |
@@ -206,8 +198,6 @@ _efl_animation_object_rotate_efl_animation_object_progress_set(Eo *eo_obj, | |||
206 | Efl_Animation_Object_Rotate_Data *pd EINA_UNUSED, | 198 | Efl_Animation_Object_Rotate_Data *pd EINA_UNUSED, |
207 | double progress) | 199 | double progress) |
208 | { | 200 | { |
209 | EFL_ANIMATION_OBJECT_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
210 | |||
211 | if ((progress < 0.0) || (progress > 1.0)) return; | 201 | if ((progress < 0.0) || (progress > 1.0)) return; |
212 | 202 | ||
213 | _progress_set(eo_obj, progress); | 203 | _progress_set(eo_obj, progress); |
diff --git a/src/lib/evas/canvas/efl_animation_object_rotate_private.h b/src/lib/evas/canvas/efl_animation_object_rotate_private.h index b58860a448..f1bfed9a3c 100644 --- a/src/lib/evas/canvas/efl_animation_object_rotate_private.h +++ b/src/lib/evas/canvas/efl_animation_object_rotate_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_OBJECT_ROTATE_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_OBJECT_ROTATE_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_OBJECT_ROTATE_CHECK_OR_RETURN(anim_obj, ...) \ | ||
10 | do { \ | ||
11 | if (!anim_obj) { \ | ||
12 | CRI("Efl_Animation_Object " # anim_obj " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_object_is_deleted(anim_obj)) { \ | ||
16 | ERR("Efl_Animation_Object " # anim_obj " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_OBJECT_ROTATE_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_OBJECT_ROTATE_DATA_GET(o, pd) \ |
22 | Efl_Animation_Object_Rotate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_ROTATE_CLASS) | 10 | Efl_Animation_Object_Rotate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_ROTATE_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_scale.c b/src/lib/evas/canvas/efl_animation_object_scale.c index a84edc7c4c..1e1ed28fd9 100644 --- a/src/lib/evas/canvas/efl_animation_object_scale.c +++ b/src/lib/evas/canvas/efl_animation_object_scale.c | |||
@@ -11,8 +11,6 @@ _efl_animation_object_scale_scale_set(Eo *eo_obj, | |||
11 | double cx, | 11 | double cx, |
12 | double cy) | 12 | double cy) |
13 | { | 13 | { |
14 | EFL_ANIMATION_OBJECT_SCALE_CHECK_OR_RETURN(eo_obj); | ||
15 | |||
16 | pd->from.scale_x = from_scale_x; | 14 | pd->from.scale_x = from_scale_x; |
17 | pd->from.scale_y = from_scale_y; | 15 | pd->from.scale_y = from_scale_y; |
18 | 16 | ||
@@ -55,8 +53,6 @@ _efl_animation_object_scale_scale_get(Eo *eo_obj, | |||
55 | double *cx, | 53 | double *cx, |
56 | double *cy) | 54 | double *cy) |
57 | { | 55 | { |
58 | EFL_ANIMATION_OBJECT_SCALE_CHECK_OR_RETURN(eo_obj); | ||
59 | |||
60 | //Update relative pivot based on absolute pivot | 56 | //Update relative pivot based on absolute pivot |
61 | if (!pd->use_rel_pivot) | 57 | if (!pd->use_rel_pivot) |
62 | { | 58 | { |
@@ -112,8 +108,6 @@ _efl_animation_object_scale_scale_absolute_set(Eo *eo_obj, | |||
112 | Evas_Coord cx, | 108 | Evas_Coord cx, |
113 | Evas_Coord cy) | 109 | Evas_Coord cy) |
114 | { | 110 | { |
115 | EFL_ANIMATION_OBJECT_SCALE_CHECK_OR_RETURN(eo_obj); | ||
116 | |||
117 | pd->from.scale_x = from_scale_x; | 111 | pd->from.scale_x = from_scale_x; |
118 | pd->from.scale_y = from_scale_y; | 112 | pd->from.scale_y = from_scale_y; |
119 | 113 | ||
@@ -158,8 +152,6 @@ _efl_animation_object_scale_scale_absolute_get(Eo *eo_obj, | |||
158 | Evas_Coord *cx, | 152 | Evas_Coord *cx, |
159 | Evas_Coord *cy) | 153 | Evas_Coord *cy) |
160 | { | 154 | { |
161 | EFL_ANIMATION_OBJECT_SCALE_CHECK_OR_RETURN(eo_obj); | ||
162 | |||
163 | //Update absolute pivot based on relative pivot | 155 | //Update absolute pivot based on relative pivot |
164 | if (pd->use_rel_pivot) | 156 | if (pd->use_rel_pivot) |
165 | { | 157 | { |
@@ -235,8 +227,6 @@ _efl_animation_object_scale_efl_animation_object_progress_set(Eo *eo_obj, | |||
235 | Efl_Animation_Object_Scale_Data *pd EINA_UNUSED, | 227 | Efl_Animation_Object_Scale_Data *pd EINA_UNUSED, |
236 | double progress) | 228 | double progress) |
237 | { | 229 | { |
238 | EFL_ANIMATION_OBJECT_SCALE_CHECK_OR_RETURN(eo_obj); | ||
239 | |||
240 | if ((progress < 0.0) || (progress > 1.0)) return; | 230 | if ((progress < 0.0) || (progress > 1.0)) return; |
241 | 231 | ||
242 | _progress_set(eo_obj, progress); | 232 | _progress_set(eo_obj, progress); |
diff --git a/src/lib/evas/canvas/efl_animation_object_scale_private.h b/src/lib/evas/canvas/efl_animation_object_scale_private.h index bfdae64bf9..2b049005f5 100644 --- a/src/lib/evas/canvas/efl_animation_object_scale_private.h +++ b/src/lib/evas/canvas/efl_animation_object_scale_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_OBJECT_SCALE_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_OBJECT_SCALE_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_OBJECT_SCALE_CHECK_OR_RETURN(anim_obj, ...) \ | ||
10 | do { \ | ||
11 | if (!anim_obj) { \ | ||
12 | CRI("Efl_Animation_Object " # anim_obj " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_object_is_deleted(anim_obj)) { \ | ||
16 | ERR("Efl_Animation_Object " # anim_obj " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_OBJECT_SCALE_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_OBJECT_SCALE_DATA_GET(o, pd) \ |
22 | Efl_Animation_Object_Scale_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_SCALE_CLASS) | 10 | Efl_Animation_Object_Scale_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_SCALE_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_object_translate.c b/src/lib/evas/canvas/efl_animation_object_translate.c index b1593089e4..78ac9e7ee5 100644 --- a/src/lib/evas/canvas/efl_animation_object_translate.c +++ b/src/lib/evas/canvas/efl_animation_object_translate.c | |||
@@ -8,8 +8,6 @@ _efl_animation_object_translate_translate_set(Eo *eo_obj, | |||
8 | Evas_Coord to_x, | 8 | Evas_Coord to_x, |
9 | Evas_Coord to_y) | 9 | Evas_Coord to_y) |
10 | { | 10 | { |
11 | EFL_ANIMATION_OBJECT_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
12 | |||
13 | pd->from.move_x = from_x; | 11 | pd->from.move_x = from_x; |
14 | pd->from.move_y = from_y; | 12 | pd->from.move_y = from_y; |
15 | 13 | ||
@@ -41,8 +39,6 @@ _efl_animation_object_translate_translate_get(Eo *eo_obj, | |||
41 | Evas_Coord *to_x, | 39 | Evas_Coord *to_x, |
42 | Evas_Coord *to_y) | 40 | Evas_Coord *to_y) |
43 | { | 41 | { |
44 | EFL_ANIMATION_OBJECT_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
45 | |||
46 | //Update relative move based on absolute coordinate | 42 | //Update relative move based on absolute coordinate |
47 | if (!pd->use_rel_move) | 43 | if (!pd->use_rel_move) |
48 | { | 44 | { |
@@ -79,8 +75,6 @@ _efl_animation_object_translate_translate_absolute_set(Eo *eo_obj, | |||
79 | Evas_Coord to_x, | 75 | Evas_Coord to_x, |
80 | Evas_Coord to_y) | 76 | Evas_Coord to_y) |
81 | { | 77 | { |
82 | EFL_ANIMATION_OBJECT_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
83 | |||
84 | pd->from.x = from_x; | 78 | pd->from.x = from_x; |
85 | pd->from.y = from_y; | 79 | pd->from.y = from_y; |
86 | 80 | ||
@@ -112,8 +106,6 @@ _efl_animation_object_translate_translate_absolute_get(Eo *eo_obj, | |||
112 | Evas_Coord *to_x, | 106 | Evas_Coord *to_x, |
113 | Evas_Coord *to_y) | 107 | Evas_Coord *to_y) |
114 | { | 108 | { |
115 | EFL_ANIMATION_OBJECT_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
116 | |||
117 | //Update absolute coordinate based on relative move | 109 | //Update absolute coordinate based on relative move |
118 | if (pd->use_rel_move) | 110 | if (pd->use_rel_move) |
119 | { | 111 | { |
@@ -196,8 +188,6 @@ _efl_animation_object_translate_efl_animation_object_progress_set(Eo *eo_obj, | |||
196 | Efl_Animation_Object_Translate_Data *pd EINA_UNUSED, | 188 | Efl_Animation_Object_Translate_Data *pd EINA_UNUSED, |
197 | double progress) | 189 | double progress) |
198 | { | 190 | { |
199 | EFL_ANIMATION_OBJECT_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
200 | |||
201 | if ((progress < 0.0) || (progress > 1.0)) return; | 191 | if ((progress < 0.0) || (progress > 1.0)) return; |
202 | 192 | ||
203 | _progress_set(eo_obj, progress); | 193 | _progress_set(eo_obj, progress); |
diff --git a/src/lib/evas/canvas/efl_animation_object_translate_private.h b/src/lib/evas/canvas/efl_animation_object_translate_private.h index 99a57d9ab8..6431c3e2c7 100644 --- a/src/lib/evas/canvas/efl_animation_object_translate_private.h +++ b/src/lib/evas/canvas/efl_animation_object_translate_private.h | |||
@@ -5,18 +5,6 @@ | |||
5 | #define MY_CLASS EFL_ANIMATION_OBJECT_TRANSLATE_CLASS | 5 | #define MY_CLASS EFL_ANIMATION_OBJECT_TRANSLATE_CLASS |
6 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 6 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
7 | 7 | ||
8 | #define EFL_ANIMATION_OBJECT_TRANSLATE_CHECK_OR_RETURN(anim_obj, ...) \ | ||
9 | do { \ | ||
10 | if (!anim_obj) { \ | ||
11 | CRI("Efl_Animation_Object " # anim_obj " is NULL!"); \ | ||
12 | return __VA_ARGS__; \ | ||
13 | } \ | ||
14 | if (efl_animation_object_is_deleted(anim_obj)) { \ | ||
15 | ERR("Efl_Animation_Object " # anim_obj " has already been deleted!"); \ | ||
16 | return __VA_ARGS__; \ | ||
17 | } \ | ||
18 | } while (0) | ||
19 | |||
20 | #define EFL_ANIMATION_OBJECT_TRANSLATE_DATA_GET(o, pd) \ | 8 | #define EFL_ANIMATION_OBJECT_TRANSLATE_DATA_GET(o, pd) \ |
21 | Efl_Animation_Object_Translate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_TRANSLATE_CLASS) | 9 | Efl_Animation_Object_Translate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_OBJECT_TRANSLATE_CLASS) |
22 | 10 | ||
diff --git a/src/lib/evas/canvas/efl_animation_private.h b/src/lib/evas/canvas/efl_animation_private.h index 466bbfdcf2..0d79ae901e 100644 --- a/src/lib/evas/canvas/efl_animation_private.h +++ b/src/lib/evas/canvas/efl_animation_private.h | |||
@@ -20,21 +20,8 @@ typedef struct _Efl_Animation_Data | |||
20 | 20 | ||
21 | Efl_Interpolator *interpolator; | 21 | Efl_Interpolator *interpolator; |
22 | 22 | ||
23 | Eina_Bool is_deleted : 1; | ||
24 | Eina_Bool keep_final_state : 1; | 23 | Eina_Bool keep_final_state : 1; |
25 | } Efl_Animation_Data; | 24 | } Efl_Animation_Data; |
26 | 25 | ||
27 | #define EFL_ANIMATION_CHECK_OR_RETURN(anim, ...) \ | ||
28 | do { \ | ||
29 | if (!anim) { \ | ||
30 | CRI("Efl_Animation " # anim " is NULL!"); \ | ||
31 | return __VA_ARGS__; \ | ||
32 | } \ | ||
33 | if (efl_animation_is_deleted(anim)) { \ | ||
34 | ERR("Efl_Animation " # anim " has already been deleted!"); \ | ||
35 | return __VA_ARGS__; \ | ||
36 | } \ | ||
37 | } while (0) | ||
38 | |||
39 | #define EFL_ANIMATION_DATA_GET(o, pd) \ | 26 | #define EFL_ANIMATION_DATA_GET(o, pd) \ |
40 | Efl_Animation_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_CLASS) | 27 | Efl_Animation_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_CLASS) |
diff --git a/src/lib/evas/canvas/efl_animation_rotate.c b/src/lib/evas/canvas/efl_animation_rotate.c index 53c7de7c72..18edfa5465 100644 --- a/src/lib/evas/canvas/efl_animation_rotate.c +++ b/src/lib/evas/canvas/efl_animation_rotate.c | |||
@@ -9,8 +9,6 @@ _efl_animation_rotate_rotate_set(Eo *eo_obj, | |||
9 | double cx, | 9 | double cx, |
10 | double cy) | 10 | double cy) |
11 | { | 11 | { |
12 | EFL_ANIMATION_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
13 | |||
14 | pd->from.degree = from_degree; | 12 | pd->from.degree = from_degree; |
15 | pd->to.degree = to_degree; | 13 | pd->to.degree = to_degree; |
16 | 14 | ||
@@ -48,8 +46,6 @@ _efl_animation_rotate_rotate_get(Eo *eo_obj, | |||
48 | double *cx, | 46 | double *cx, |
49 | double *cy) | 47 | double *cy) |
50 | { | 48 | { |
51 | EFL_ANIMATION_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
52 | |||
53 | //Update relative pivot based on absolute pivot | 49 | //Update relative pivot based on absolute pivot |
54 | if (!pd->use_rel_pivot) | 50 | if (!pd->use_rel_pivot) |
55 | { | 51 | { |
@@ -97,8 +93,6 @@ _efl_animation_rotate_rotate_absolute_set(Eo *eo_obj, | |||
97 | Evas_Coord cx, | 93 | Evas_Coord cx, |
98 | Evas_Coord cy) | 94 | Evas_Coord cy) |
99 | { | 95 | { |
100 | EFL_ANIMATION_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
101 | |||
102 | pd->from.degree = from_degree; | 96 | pd->from.degree = from_degree; |
103 | pd->to.degree = to_degree; | 97 | pd->to.degree = to_degree; |
104 | 98 | ||
@@ -138,8 +132,6 @@ _efl_animation_rotate_rotate_absolute_get(Eo *eo_obj, | |||
138 | Evas_Coord *cx, | 132 | Evas_Coord *cx, |
139 | Evas_Coord *cy) | 133 | Evas_Coord *cy) |
140 | { | 134 | { |
141 | EFL_ANIMATION_ROTATE_CHECK_OR_RETURN(eo_obj); | ||
142 | |||
143 | //Update relative pivot based on absolute pivot | 135 | //Update relative pivot based on absolute pivot |
144 | if (pd->use_rel_pivot) | 136 | if (pd->use_rel_pivot) |
145 | { | 137 | { |
@@ -178,8 +170,6 @@ EOLIAN static Efl_Animation_Object * | |||
178 | _efl_animation_rotate_efl_animation_object_create(Eo *eo_obj, | 170 | _efl_animation_rotate_efl_animation_object_create(Eo *eo_obj, |
179 | Efl_Animation_Rotate_Data *pd) | 171 | Efl_Animation_Rotate_Data *pd) |
180 | { | 172 | { |
181 | EFL_ANIMATION_ROTATE_CHECK_OR_RETURN(eo_obj, NULL); | ||
182 | |||
183 | Efl_Animation_Object_Rotate *anim_obj | 173 | Efl_Animation_Object_Rotate *anim_obj |
184 | = efl_add(EFL_ANIMATION_OBJECT_ROTATE_CLASS, NULL); | 174 | = efl_add(EFL_ANIMATION_OBJECT_ROTATE_CLASS, NULL); |
185 | 175 | ||
diff --git a/src/lib/evas/canvas/efl_animation_rotate_private.h b/src/lib/evas/canvas/efl_animation_rotate_private.h index 6dcda258cb..63d3a0b390 100644 --- a/src/lib/evas/canvas/efl_animation_rotate_private.h +++ b/src/lib/evas/canvas/efl_animation_rotate_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_ROTATE_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_ROTATE_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_ROTATE_CHECK_OR_RETURN(anim, ...) \ | ||
10 | do { \ | ||
11 | if (!anim) { \ | ||
12 | CRI("Efl_Animation " # anim " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_is_deleted(anim)) { \ | ||
16 | ERR("Efl_Animation " # anim " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_ROTATE_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_ROTATE_DATA_GET(o, pd) \ |
22 | Efl_Animation_Rotate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_ROTATE_CLASS) | 10 | Efl_Animation_Rotate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_ROTATE_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_scale.c b/src/lib/evas/canvas/efl_animation_scale.c index 11f27c211d..da676910b6 100644 --- a/src/lib/evas/canvas/efl_animation_scale.c +++ b/src/lib/evas/canvas/efl_animation_scale.c | |||
@@ -11,8 +11,6 @@ _efl_animation_scale_scale_set(Eo *eo_obj, | |||
11 | double cx, | 11 | double cx, |
12 | double cy) | 12 | double cy) |
13 | { | 13 | { |
14 | EFL_ANIMATION_SCALE_CHECK_OR_RETURN(eo_obj); | ||
15 | |||
16 | pd->from.scale_x = from_scale_x; | 14 | pd->from.scale_x = from_scale_x; |
17 | pd->from.scale_y = from_scale_y; | 15 | pd->from.scale_y = from_scale_y; |
18 | 16 | ||
@@ -55,8 +53,6 @@ _efl_animation_scale_scale_get(Eo *eo_obj, | |||
55 | double *cx, | 53 | double *cx, |
56 | double *cy) | 54 | double *cy) |
57 | { | 55 | { |
58 | EFL_ANIMATION_SCALE_CHECK_OR_RETURN(eo_obj); | ||
59 | |||
60 | //Update relative pivot based on absolute pivot | 56 | //Update relative pivot based on absolute pivot |
61 | if (!pd->use_rel_pivot) | 57 | if (!pd->use_rel_pivot) |
62 | { | 58 | { |
@@ -112,8 +108,6 @@ _efl_animation_scale_scale_absolute_set(Eo *eo_obj, | |||
112 | Evas_Coord cx, | 108 | Evas_Coord cx, |
113 | Evas_Coord cy) | 109 | Evas_Coord cy) |
114 | { | 110 | { |
115 | EFL_ANIMATION_SCALE_CHECK_OR_RETURN(eo_obj); | ||
116 | |||
117 | pd->from.scale_x = from_scale_x; | 111 | pd->from.scale_x = from_scale_x; |
118 | pd->from.scale_y = from_scale_y; | 112 | pd->from.scale_y = from_scale_y; |
119 | 113 | ||
@@ -158,8 +152,6 @@ _efl_animation_scale_scale_absolute_get(Eo *eo_obj, | |||
158 | Evas_Coord *cx, | 152 | Evas_Coord *cx, |
159 | Evas_Coord *cy) | 153 | Evas_Coord *cy) |
160 | { | 154 | { |
161 | EFL_ANIMATION_SCALE_CHECK_OR_RETURN(eo_obj); | ||
162 | |||
163 | //Update absolute pivot based on relative pivot | 155 | //Update absolute pivot based on relative pivot |
164 | if (pd->use_rel_pivot) | 156 | if (pd->use_rel_pivot) |
165 | { | 157 | { |
@@ -204,8 +196,6 @@ EOLIAN static Efl_Animation_Object * | |||
204 | _efl_animation_scale_efl_animation_object_create(Eo *eo_obj, | 196 | _efl_animation_scale_efl_animation_object_create(Eo *eo_obj, |
205 | Efl_Animation_Scale_Data *pd) | 197 | Efl_Animation_Scale_Data *pd) |
206 | { | 198 | { |
207 | EFL_ANIMATION_SCALE_CHECK_OR_RETURN(eo_obj, NULL); | ||
208 | |||
209 | Efl_Animation_Object_Scale *anim_obj | 199 | Efl_Animation_Object_Scale *anim_obj |
210 | = efl_add(EFL_ANIMATION_OBJECT_SCALE_CLASS, NULL); | 200 | = efl_add(EFL_ANIMATION_OBJECT_SCALE_CLASS, NULL); |
211 | 201 | ||
diff --git a/src/lib/evas/canvas/efl_animation_scale_private.h b/src/lib/evas/canvas/efl_animation_scale_private.h index f9be19f3b7..96a6030289 100644 --- a/src/lib/evas/canvas/efl_animation_scale_private.h +++ b/src/lib/evas/canvas/efl_animation_scale_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_SCALE_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_SCALE_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_SCALE_CHECK_OR_RETURN(anim, ...) \ | ||
10 | do { \ | ||
11 | if (!anim) { \ | ||
12 | CRI("Efl_Animation " # anim " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_is_deleted(anim)) { \ | ||
16 | ERR("Efl_Animation " # anim " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_SCALE_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_SCALE_DATA_GET(o, pd) \ |
22 | Efl_Animation_Scale_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_SCALE_CLASS) | 10 | Efl_Animation_Scale_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_SCALE_CLASS) |
23 | 11 | ||
diff --git a/src/lib/evas/canvas/efl_animation_translate.c b/src/lib/evas/canvas/efl_animation_translate.c index 79cf8f131d..074971d294 100644 --- a/src/lib/evas/canvas/efl_animation_translate.c +++ b/src/lib/evas/canvas/efl_animation_translate.c | |||
@@ -8,8 +8,6 @@ _efl_animation_translate_translate_set(Eo *eo_obj, | |||
8 | Evas_Coord to_x, | 8 | Evas_Coord to_x, |
9 | Evas_Coord to_y) | 9 | Evas_Coord to_y) |
10 | { | 10 | { |
11 | EFL_ANIMATION_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
12 | |||
13 | pd->from.move_x = from_x; | 11 | pd->from.move_x = from_x; |
14 | pd->from.move_y = from_y; | 12 | pd->from.move_y = from_y; |
15 | 13 | ||
@@ -41,8 +39,6 @@ _efl_animation_translate_translate_get(Eo *eo_obj, | |||
41 | Evas_Coord *to_x, | 39 | Evas_Coord *to_x, |
42 | Evas_Coord *to_y) | 40 | Evas_Coord *to_y) |
43 | { | 41 | { |
44 | EFL_ANIMATION_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
45 | |||
46 | //Update relative move based on absolute coordinate | 42 | //Update relative move based on absolute coordinate |
47 | if (!pd->use_rel_move) | 43 | if (!pd->use_rel_move) |
48 | { | 44 | { |
@@ -79,8 +75,6 @@ _efl_animation_translate_translate_absolute_set(Eo *eo_obj, | |||
79 | Evas_Coord to_x, | 75 | Evas_Coord to_x, |
80 | Evas_Coord to_y) | 76 | Evas_Coord to_y) |
81 | { | 77 | { |
82 | EFL_ANIMATION_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
83 | |||
84 | pd->from.x = from_x; | 78 | pd->from.x = from_x; |
85 | pd->from.y = from_y; | 79 | pd->from.y = from_y; |
86 | 80 | ||
@@ -112,8 +106,6 @@ _efl_animation_translate_translate_absolute_get(Eo *eo_obj, | |||
112 | Evas_Coord *to_x, | 106 | Evas_Coord *to_x, |
113 | Evas_Coord *to_y) | 107 | Evas_Coord *to_y) |
114 | { | 108 | { |
115 | EFL_ANIMATION_TRANSLATE_CHECK_OR_RETURN(eo_obj); | ||
116 | |||
117 | //Update absolute coordinate based on relative move | 109 | //Update absolute coordinate based on relative move |
118 | if (pd->use_rel_move) | 110 | if (pd->use_rel_move) |
119 | { | 111 | { |
@@ -146,8 +138,6 @@ EOLIAN static Efl_Animation_Object * | |||
146 | _efl_animation_translate_efl_animation_object_create(Eo *eo_obj, | 138 | _efl_animation_translate_efl_animation_object_create(Eo *eo_obj, |
147 | Efl_Animation_Translate_Data *pd) | 139 | Efl_Animation_Translate_Data *pd) |
148 | { | 140 | { |
149 | EFL_ANIMATION_TRANSLATE_CHECK_OR_RETURN(eo_obj, NULL); | ||
150 | |||
151 | Efl_Animation_Object_Translate *anim_obj | 141 | Efl_Animation_Object_Translate *anim_obj |
152 | = efl_add(EFL_ANIMATION_OBJECT_TRANSLATE_CLASS, NULL); | 142 | = efl_add(EFL_ANIMATION_OBJECT_TRANSLATE_CLASS, NULL); |
153 | 143 | ||
diff --git a/src/lib/evas/canvas/efl_animation_translate_private.h b/src/lib/evas/canvas/efl_animation_translate_private.h index 6b4a69c697..8243ee8bea 100644 --- a/src/lib/evas/canvas/efl_animation_translate_private.h +++ b/src/lib/evas/canvas/efl_animation_translate_private.h | |||
@@ -6,18 +6,6 @@ | |||
6 | #define MY_CLASS EFL_ANIMATION_TRANSLATE_CLASS | 6 | #define MY_CLASS EFL_ANIMATION_TRANSLATE_CLASS |
7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) | 7 | #define MY_CLASS_NAME efl_class_name_get(MY_CLASS) |
8 | 8 | ||
9 | #define EFL_ANIMATION_TRANSLATE_CHECK_OR_RETURN(anim, ...) \ | ||
10 | do { \ | ||
11 | if (!anim) { \ | ||
12 | CRI("Efl_Animation " # anim " is NULL!"); \ | ||
13 | return __VA_ARGS__; \ | ||
14 | } \ | ||
15 | if (efl_animation_is_deleted(anim)) { \ | ||
16 | ERR("Efl_Animation " # anim " has already been deleted!"); \ | ||
17 | return __VA_ARGS__; \ | ||
18 | } \ | ||
19 | } while (0) | ||
20 | |||
21 | #define EFL_ANIMATION_TRANSLATE_DATA_GET(o, pd) \ | 9 | #define EFL_ANIMATION_TRANSLATE_DATA_GET(o, pd) \ |
22 | Efl_Animation_Translate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_TRANSLATE_CLASS) | 10 | Efl_Animation_Translate_Data *pd = efl_data_scope_get(o, EFL_ANIMATION_TRANSLATE_CLASS) |
23 | 11 | ||