diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/evas/src/lib/canvas/evas_callbacks.c | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to '')
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_callbacks.c | 274 |
1 files changed, 137 insertions, 137 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_callbacks.c b/libraries/evas/src/lib/canvas/evas_callbacks.c index 33b93bc..93f34f2 100644 --- a/libraries/evas/src/lib/canvas/evas_callbacks.c +++ b/libraries/evas/src/lib/canvas/evas_callbacks.c | |||
@@ -23,7 +23,7 @@ _evas_post_event_callback_call(Evas *e) | |||
23 | { | 23 | { |
24 | if (!pc->func((void*)pc->data, e)) skip = 1; | 24 | if (!pc->func((void*)pc->data, e)) skip = 1; |
25 | } | 25 | } |
26 | EVAS_MEMPOOL_FREE(_mp_pc, pc); | 26 | EVAS_MEMPOOL_FREE(_mp_pc, pc); |
27 | } | 27 | } |
28 | _evas_unwalk(e); | 28 | _evas_unwalk(e); |
29 | } | 29 | } |
@@ -32,10 +32,10 @@ void | |||
32 | _evas_post_event_callback_free(Evas *e) | 32 | _evas_post_event_callback_free(Evas *e) |
33 | { | 33 | { |
34 | Evas_Post_Callback *pc; | 34 | Evas_Post_Callback *pc; |
35 | 35 | ||
36 | EINA_LIST_FREE(e->post_events, pc) | 36 | EINA_LIST_FREE(e->post_events, pc) |
37 | { | 37 | { |
38 | EVAS_MEMPOOL_FREE(_mp_pc, pc); | 38 | EVAS_MEMPOOL_FREE(_mp_pc, pc); |
39 | } | 39 | } |
40 | _evas_unwalk(e); | 40 | _evas_unwalk(e); |
41 | } | 41 | } |
@@ -48,15 +48,15 @@ evas_event_callback_list_post_free(Eina_Inlist **list) | |||
48 | /* MEM OK */ | 48 | /* MEM OK */ |
49 | for (l = *list; l;) | 49 | for (l = *list; l;) |
50 | { | 50 | { |
51 | Evas_Func_Node *fn; | 51 | Evas_Func_Node *fn; |
52 | 52 | ||
53 | fn = (Evas_Func_Node *)l; | 53 | fn = (Evas_Func_Node *)l; |
54 | l = l->next; | 54 | l = l->next; |
55 | if (fn->delete_me) | 55 | if (fn->delete_me) |
56 | { | 56 | { |
57 | *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn)); | 57 | *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn)); |
58 | EVAS_MEMPOOL_FREE(_mp_fn, fn); | 58 | EVAS_MEMPOOL_FREE(_mp_fn, fn); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
@@ -70,7 +70,7 @@ evas_object_event_callback_clear(Evas_Object *obj) | |||
70 | if (!obj->callbacks->callbacks) | 70 | if (!obj->callbacks->callbacks) |
71 | { | 71 | { |
72 | EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); | 72 | EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); |
73 | obj->callbacks = NULL; | 73 | obj->callbacks = NULL; |
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
@@ -84,7 +84,7 @@ evas_event_callback_clear(Evas *e) | |||
84 | if (!e->callbacks->callbacks) | 84 | if (!e->callbacks->callbacks) |
85 | { | 85 | { |
86 | EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); | 86 | EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); |
87 | e->callbacks = NULL; | 87 | e->callbacks = NULL; |
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
@@ -95,7 +95,7 @@ evas_object_event_callback_all_del(Evas_Object *obj) | |||
95 | 95 | ||
96 | if (!obj->callbacks) return; | 96 | if (!obj->callbacks) return; |
97 | EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) | 97 | EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) |
98 | fn->delete_me = 1; | 98 | fn->delete_me = 1; |
99 | } | 99 | } |
100 | 100 | ||
101 | void | 101 | void |
@@ -115,7 +115,7 @@ evas_event_callback_all_del(Evas *e) | |||
115 | 115 | ||
116 | if (!e->callbacks) return; | 116 | if (!e->callbacks) return; |
117 | EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) | 117 | EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) |
118 | fn->delete_me = 1; | 118 | fn->delete_me = 1; |
119 | } | 119 | } |
120 | 120 | ||
121 | void | 121 | void |
@@ -136,25 +136,25 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) | |||
136 | _evas_walk(e); | 136 | _evas_walk(e); |
137 | if (e->callbacks) | 137 | if (e->callbacks) |
138 | { | 138 | { |
139 | l_mod = &e->callbacks->callbacks; | 139 | l_mod = &e->callbacks->callbacks; |
140 | e->callbacks->walking_list++; | 140 | e->callbacks->walking_list++; |
141 | for (l = *l_mod; l; l = l->next) | 141 | for (l = *l_mod; l; l = l->next) |
142 | { | 142 | { |
143 | Evas_Func_Node *fn; | 143 | Evas_Func_Node *fn; |
144 | 144 | ||
145 | fn = (Evas_Func_Node *)l; | 145 | fn = (Evas_Func_Node *)l; |
146 | if ((fn->type == type) && (!fn->delete_me)) | 146 | if ((fn->type == type) && (!fn->delete_me)) |
147 | { | 147 | { |
148 | Evas_Event_Cb func = fn->func; | 148 | Evas_Event_Cb func = fn->func; |
149 | if (func) | 149 | if (func) |
150 | func(fn->data, e, event_info); | 150 | func(fn->data, e, event_info); |
151 | } | 151 | } |
152 | if (e->delete_me) break; | 152 | if (e->delete_me) break; |
153 | } | 153 | } |
154 | e->callbacks->walking_list--; | 154 | e->callbacks->walking_list--; |
155 | if (!e->callbacks->walking_list) | 155 | if (!e->callbacks->walking_list) |
156 | { | 156 | { |
157 | evas_event_callback_clear(e); | 157 | evas_event_callback_clear(e); |
158 | l_mod = NULL; | 158 | l_mod = NULL; |
159 | } | 159 | } |
160 | } | 160 | } |
@@ -162,7 +162,7 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | void | 164 | void |
165 | evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info) | 165 | evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id) |
166 | { | 166 | { |
167 | /* MEM OK */ | 167 | /* MEM OK */ |
168 | Eina_Inlist **l_mod = NULL, *l; | 168 | Eina_Inlist **l_mod = NULL, *l; |
@@ -170,67 +170,67 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void | |||
170 | Evas *e; | 170 | Evas *e; |
171 | 171 | ||
172 | if ((obj->delete_me) || (!obj->layer)) return; | 172 | if ((obj->delete_me) || (!obj->layer)) return; |
173 | if ((obj->last_event == _evas_event_counter) && | 173 | if ((obj->last_event == event_id) && |
174 | (obj->last_event_type == type)) return; | 174 | (obj->last_event_type == type)) return; |
175 | obj->last_event = _evas_event_counter; | 175 | obj->last_event = event_id; |
176 | obj->last_event_type = type; | 176 | obj->last_event_type = type; |
177 | if (!(e = obj->layer->evas)) return; | 177 | if (!(e = obj->layer->evas)) return; |
178 | 178 | ||
179 | _evas_walk(e); | 179 | _evas_walk(e); |
180 | if (obj->callbacks) | 180 | if (obj->callbacks) |
181 | { | 181 | { |
182 | l_mod = &obj->callbacks->callbacks; | 182 | l_mod = &obj->callbacks->callbacks; |
183 | switch (type) | 183 | switch (type) |
184 | { | 184 | { |
185 | case EVAS_CALLBACK_MOUSE_DOWN: | 185 | case EVAS_CALLBACK_MOUSE_DOWN: |
186 | { | 186 | { |
187 | Evas_Event_Mouse_Down *ev = event_info; | 187 | Evas_Event_Mouse_Down *ev = event_info; |
188 | 188 | ||
189 | flags = ev->flags; | 189 | flags = ev->flags; |
190 | if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) | 190 | if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) |
191 | { | 191 | { |
192 | if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) | 192 | if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) |
193 | ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); | 193 | ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); |
194 | } | 194 | } |
195 | obj->last_mouse_down_counter = e->last_mouse_down_counter; | 195 | obj->last_mouse_down_counter = e->last_mouse_down_counter; |
196 | break; | 196 | break; |
197 | } | 197 | } |
198 | case EVAS_CALLBACK_MOUSE_UP: | 198 | case EVAS_CALLBACK_MOUSE_UP: |
199 | { | 199 | { |
200 | Evas_Event_Mouse_Up *ev = event_info; | 200 | Evas_Event_Mouse_Up *ev = event_info; |
201 | 201 | ||
202 | flags = ev->flags; | 202 | flags = ev->flags; |
203 | if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) | 203 | if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) |
204 | { | 204 | { |
205 | if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) | 205 | if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) |
206 | ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); | 206 | ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); |
207 | } | 207 | } |
208 | obj->last_mouse_up_counter = e->last_mouse_up_counter; | 208 | obj->last_mouse_up_counter = e->last_mouse_up_counter; |
209 | break; | 209 | break; |
210 | } | 210 | } |
211 | default: | 211 | default: |
212 | break; | 212 | break; |
213 | } | 213 | } |
214 | obj->callbacks->walking_list++; | 214 | obj->callbacks->walking_list++; |
215 | for (l = *l_mod; l; l = l->next) | 215 | for (l = *l_mod; l; l = l->next) |
216 | { | 216 | { |
217 | Evas_Func_Node *fn; | 217 | Evas_Func_Node *fn; |
218 | 218 | ||
219 | fn = (Evas_Func_Node *)l; | 219 | fn = (Evas_Func_Node *)l; |
220 | if ((fn->type == type) && (!fn->delete_me)) | 220 | if ((fn->type == type) && (!fn->delete_me)) |
221 | { | 221 | { |
222 | Evas_Object_Event_Cb func = fn->func; | 222 | Evas_Object_Event_Cb func = fn->func; |
223 | if (func) | 223 | if (func) |
224 | func(fn->data, obj->layer->evas, obj, event_info); | 224 | func(fn->data, obj->layer->evas, obj, event_info); |
225 | } | 225 | } |
226 | if (obj->delete_me) break; | 226 | if (obj->delete_me) break; |
227 | } | 227 | } |
228 | obj->callbacks->walking_list--; | 228 | obj->callbacks->walking_list--; |
229 | if (!obj->callbacks->walking_list) | 229 | if (!obj->callbacks->walking_list) |
230 | { | 230 | { |
231 | evas_object_event_callback_clear(obj); | 231 | evas_object_event_callback_clear(obj); |
232 | l_mod = NULL; | 232 | l_mod = NULL; |
233 | } | 233 | } |
234 | 234 | ||
235 | if (type == EVAS_CALLBACK_MOUSE_DOWN) | 235 | if (type == EVAS_CALLBACK_MOUSE_DOWN) |
236 | { | 236 | { |
@@ -246,12 +246,12 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void | |||
246 | 246 | ||
247 | if (!((obj->no_propagate) && (l_mod) && (*l_mod))) | 247 | if (!((obj->no_propagate) && (l_mod) && (*l_mod))) |
248 | { | 248 | { |
249 | if (!obj->no_propagate) | 249 | if (!obj->no_propagate) |
250 | { | 250 | { |
251 | if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && | 251 | if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && |
252 | (type <= EVAS_CALLBACK_KEY_UP)) | 252 | (type <= EVAS_CALLBACK_KEY_UP)) |
253 | evas_object_event_callback_call(obj->smart.parent, type, event_info); | 253 | evas_object_event_callback_call(obj->smart.parent, type, event_info, event_id); |
254 | } | 254 | } |
255 | } | 255 | } |
256 | _evas_unwalk(e); | 256 | _evas_unwalk(e); |
257 | } | 257 | } |
@@ -263,16 +263,16 @@ _callback_priority_cmp(const void *_a, const void *_b) | |||
263 | a = EINA_INLIST_CONTAINER_GET(_a, Evas_Func_Node); | 263 | a = EINA_INLIST_CONTAINER_GET(_a, Evas_Func_Node); |
264 | b = EINA_INLIST_CONTAINER_GET(_b, Evas_Func_Node); | 264 | b = EINA_INLIST_CONTAINER_GET(_b, Evas_Func_Node); |
265 | if (a->priority < b->priority) | 265 | if (a->priority < b->priority) |
266 | return -1; | 266 | return -1; |
267 | else | 267 | else |
268 | return 1; | 268 | return 1; |
269 | } | 269 | } |
270 | 270 | ||
271 | EAPI void | 271 | EAPI void |
272 | evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) | 272 | evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) |
273 | { | 273 | { |
274 | evas_object_event_callback_priority_add(obj, type, | 274 | evas_object_event_callback_priority_add(obj, type, |
275 | EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); | 275 | EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); |
276 | } | 276 | } |
277 | 277 | ||
278 | EAPI void | 278 | EAPI void |
@@ -294,7 +294,7 @@ evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type typ | |||
294 | if (!obj->callbacks) return; | 294 | if (!obj->callbacks) return; |
295 | EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks); | 295 | EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks); |
296 | } | 296 | } |
297 | 297 | ||
298 | EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); | 298 | EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); |
299 | fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); | 299 | fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); |
300 | if (!fn) return; | 300 | if (!fn) return; |
@@ -305,8 +305,8 @@ evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type typ | |||
305 | fn->priority = priority; | 305 | fn->priority = priority; |
306 | 306 | ||
307 | obj->callbacks->callbacks = | 307 | obj->callbacks->callbacks = |
308 | eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), | 308 | eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), |
309 | _callback_priority_cmp); | 309 | _callback_priority_cmp); |
310 | } | 310 | } |
311 | 311 | ||
312 | EAPI void * | 312 | EAPI void * |
@@ -325,17 +325,17 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_O | |||
325 | 325 | ||
326 | EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) | 326 | EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) |
327 | { | 327 | { |
328 | if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) | 328 | if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) |
329 | { | 329 | { |
330 | void *tmp; | 330 | void *tmp; |
331 | 331 | ||
332 | tmp = fn->data; | 332 | tmp = fn->data; |
333 | fn->delete_me = 1; | 333 | fn->delete_me = 1; |
334 | obj->callbacks->deletions_waiting = 1; | 334 | obj->callbacks->deletions_waiting = 1; |
335 | if (!obj->callbacks->walking_list) | 335 | if (!obj->callbacks->walking_list) |
336 | evas_object_event_callback_clear(obj); | 336 | evas_object_event_callback_clear(obj); |
337 | return tmp; | 337 | return tmp; |
338 | } | 338 | } |
339 | } | 339 | } |
340 | return NULL; | 340 | return NULL; |
341 | } | 341 | } |
@@ -356,17 +356,17 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E | |||
356 | 356 | ||
357 | EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) | 357 | EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) |
358 | { | 358 | { |
359 | if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) | 359 | if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) |
360 | { | 360 | { |
361 | void *tmp; | 361 | void *tmp; |
362 | 362 | ||
363 | tmp = fn->data; | 363 | tmp = fn->data; |
364 | fn->delete_me = 1; | 364 | fn->delete_me = 1; |
365 | obj->callbacks->deletions_waiting = 1; | 365 | obj->callbacks->deletions_waiting = 1; |
366 | if (!obj->callbacks->walking_list) | 366 | if (!obj->callbacks->walking_list) |
367 | evas_object_event_callback_clear(obj); | 367 | evas_object_event_callback_clear(obj); |
368 | return tmp; | 368 | return tmp; |
369 | } | 369 | } |
370 | } | 370 | } |
371 | return NULL; | 371 | return NULL; |
372 | } | 372 | } |
@@ -375,7 +375,7 @@ EAPI void | |||
375 | evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) | 375 | evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) |
376 | { | 376 | { |
377 | evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT, | 377 | evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT, |
378 | func, data); | 378 | func, data); |
379 | } | 379 | } |
380 | 380 | ||
381 | EAPI void | 381 | EAPI void |
@@ -397,7 +397,7 @@ evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback | |||
397 | if (!e->callbacks) return; | 397 | if (!e->callbacks) return; |
398 | EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks); | 398 | EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks); |
399 | } | 399 | } |
400 | 400 | ||
401 | EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); | 401 | EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, ); |
402 | fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); | 402 | fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); |
403 | if (!fn) return; | 403 | if (!fn) return; |
@@ -408,7 +408,7 @@ evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback | |||
408 | fn->priority = priority; | 408 | fn->priority = priority; |
409 | 409 | ||
410 | e->callbacks->callbacks = eina_inlist_sorted_insert(e->callbacks->callbacks, | 410 | e->callbacks->callbacks = eina_inlist_sorted_insert(e->callbacks->callbacks, |
411 | EINA_INLIST_GET(fn), _callback_priority_cmp); | 411 | EINA_INLIST_GET(fn), _callback_priority_cmp); |
412 | } | 412 | } |
413 | 413 | ||
414 | EAPI void * | 414 | EAPI void * |
@@ -427,17 +427,17 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) | |||
427 | 427 | ||
428 | EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) | 428 | EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) |
429 | { | 429 | { |
430 | if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) | 430 | if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) |
431 | { | 431 | { |
432 | void *data; | 432 | void *data; |
433 | 433 | ||
434 | data = fn->data; | 434 | data = fn->data; |
435 | fn->delete_me = 1; | 435 | fn->delete_me = 1; |
436 | e->callbacks->deletions_waiting = 1; | 436 | e->callbacks->deletions_waiting = 1; |
437 | if (!e->callbacks->walking_list) | 437 | if (!e->callbacks->walking_list) |
438 | evas_event_callback_clear(e); | 438 | evas_event_callback_clear(e); |
439 | return data; | 439 | return data; |
440 | } | 440 | } |
441 | } | 441 | } |
442 | return NULL; | 442 | return NULL; |
443 | } | 443 | } |
@@ -458,17 +458,17 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun | |||
458 | 458 | ||
459 | EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) | 459 | EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) |
460 | { | 460 | { |
461 | if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) | 461 | if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) |
462 | { | 462 | { |
463 | void *tmp; | 463 | void *tmp; |
464 | 464 | ||
465 | tmp = fn->data; | 465 | tmp = fn->data; |
466 | fn->delete_me = 1; | 466 | fn->delete_me = 1; |
467 | e->callbacks->deletions_waiting = 1; | 467 | e->callbacks->deletions_waiting = 1; |
468 | if (!e->callbacks->walking_list) | 468 | if (!e->callbacks->walking_list) |
469 | evas_event_callback_clear(e); | 469 | evas_event_callback_clear(e); |
470 | return tmp; | 470 | return tmp; |
471 | } | 471 | } |
472 | } | 472 | } |
473 | return NULL; | 473 | return NULL; |
474 | } | 474 | } |
@@ -477,17 +477,17 @@ EAPI void | |||
477 | evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) | 477 | evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) |
478 | { | 478 | { |
479 | Evas_Post_Callback *pc; | 479 | Evas_Post_Callback *pc; |
480 | 480 | ||
481 | MAGIC_CHECK(e, Evas, MAGIC_EVAS); | 481 | MAGIC_CHECK(e, Evas, MAGIC_EVAS); |
482 | return; | 482 | return; |
483 | MAGIC_CHECK_END(); | 483 | MAGIC_CHECK_END(); |
484 | 484 | ||
485 | EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); | 485 | EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); |
486 | pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); | 486 | pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); |
487 | if (!pc) return; | 487 | if (!pc) return; |
488 | EVAS_MEMPOOL_PREP(_mp_pc, pc, Evas_Post_Callback); | 488 | EVAS_MEMPOOL_PREP(_mp_pc, pc, Evas_Post_Callback); |
489 | if (e->delete_me) return; | 489 | if (e->delete_me) return; |
490 | 490 | ||
491 | pc->func = func; | 491 | pc->func = func; |
492 | pc->data = data; | 492 | pc->data = data; |
493 | e->post_events = eina_list_prepend(e->post_events, pc); | 493 | e->post_events = eina_list_prepend(e->post_events, pc); |
@@ -498,11 +498,11 @@ evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func) | |||
498 | { | 498 | { |
499 | Evas_Post_Callback *pc; | 499 | Evas_Post_Callback *pc; |
500 | Eina_List *l; | 500 | Eina_List *l; |
501 | 501 | ||
502 | MAGIC_CHECK(e, Evas, MAGIC_EVAS); | 502 | MAGIC_CHECK(e, Evas, MAGIC_EVAS); |
503 | return; | 503 | return; |
504 | MAGIC_CHECK_END(); | 504 | MAGIC_CHECK_END(); |
505 | 505 | ||
506 | EINA_LIST_FOREACH(e->post_events, l, pc) | 506 | EINA_LIST_FOREACH(e->post_events, l, pc) |
507 | { | 507 | { |
508 | if (pc->func == func) | 508 | if (pc->func == func) |
@@ -518,11 +518,11 @@ evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, co | |||
518 | { | 518 | { |
519 | Evas_Post_Callback *pc; | 519 | Evas_Post_Callback *pc; |
520 | Eina_List *l; | 520 | Eina_List *l; |
521 | 521 | ||
522 | MAGIC_CHECK(e, Evas, MAGIC_EVAS); | 522 | MAGIC_CHECK(e, Evas, MAGIC_EVAS); |
523 | return; | 523 | return; |
524 | MAGIC_CHECK_END(); | 524 | MAGIC_CHECK_END(); |
525 | 525 | ||
526 | EINA_LIST_FOREACH(e->post_events, l, pc) | 526 | EINA_LIST_FOREACH(e->post_events, l, pc) |
527 | { | 527 | { |
528 | if ((pc->func == func) && (pc->data == data)) | 528 | if ((pc->func == func) && (pc->data == data)) |