summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_callbacks.c
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-04-11 13:21:54 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-04-11 18:07:09 +0900
commite0f2ddaddec17c86a795312226641a591b193247 (patch)
treeb40658bb37cd35054349aae50c22c6f78dfcf55e /src/lib/evas/canvas/evas_callbacks.c
parentbf07af3e7b8f29ea2781a35b9bf10aae0f30ee7f (diff)
evas: use eo_data_get less. Use clipees_has if you want to know the number of child now.
Diffstat (limited to 'src/lib/evas/canvas/evas_callbacks.c')
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index fac0a0c8ea..4bda3357bf 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -1,8 +1,8 @@
1#include "evas_common.h" 1#include "evas_common.h"
2#include "evas_private.h" 2#include "evas_private.h"
3 3
4static void evas_object_event_callback_clear(Evas_Object *eo_obj); 4static void evas_object_event_callback_clear(Evas_Object_Protected_Data *obj);
5static void evas_event_callback_clear(Evas *eo_e); 5static void evas_event_callback_clear(Evas_Public_Data *e);
6int _evas_event_counter = 0; 6int _evas_event_counter = 0;
7 7
8EVAS_MEMPOOL(_mp_fn); 8EVAS_MEMPOOL(_mp_fn);
@@ -170,9 +170,8 @@ evas_event_callback_list_post_free(Eina_Inlist **list)
170} 170}
171 171
172static void 172static void
173evas_object_event_callback_clear(Evas_Object *eo_obj) 173evas_object_event_callback_clear(Evas_Object_Protected_Data *obj)
174{ 174{
175 Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
176 if (!obj) return; 175 if (!obj) return;
177 if (!obj->callbacks) return; 176 if (!obj->callbacks) return;
178 if (!obj->callbacks->deletions_waiting) return; 177 if (!obj->callbacks->deletions_waiting) return;
@@ -186,9 +185,8 @@ evas_object_event_callback_clear(Evas_Object *eo_obj)
186} 185}
187 186
188static void 187static void
189evas_event_callback_clear(Evas *eo_e) 188evas_event_callback_clear(Evas_Public_Data *e)
190{ 189{
191 Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
192 if (!e) return; 190 if (!e) return;
193 if (!e->callbacks) return; 191 if (!e->callbacks) return;
194 if (!e->callbacks->deletions_waiting) return; 192 if (!e->callbacks->deletions_waiting) return;
@@ -277,7 +275,7 @@ evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info)
277 e->callbacks->walking_list--; 275 e->callbacks->walking_list--;
278 if (!e->callbacks->walking_list) 276 if (!e->callbacks->walking_list)
279 { 277 {
280 evas_event_callback_clear(eo_e); 278 evas_event_callback_clear(e);
281 l_mod = NULL; 279 l_mod = NULL;
282 } 280 }
283 } 281 }
@@ -361,7 +359,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
361 obj->callbacks->walking_list--; 359 obj->callbacks->walking_list--;
362 if (!obj->callbacks->walking_list) 360 if (!obj->callbacks->walking_list)
363 { 361 {
364 evas_object_event_callback_clear(eo_obj); 362 evas_object_event_callback_clear(obj);
365 l_mod = NULL; 363 l_mod = NULL;
366 } 364 }
367 365
@@ -477,7 +475,7 @@ evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Eva
477 fn->delete_me = 1; 475 fn->delete_me = 1;
478 obj->callbacks->deletions_waiting = 1; 476 obj->callbacks->deletions_waiting = 1;
479 if (!obj->callbacks->walking_list) 477 if (!obj->callbacks->walking_list)
480 evas_object_event_callback_clear(eo_obj); 478 evas_object_event_callback_clear(obj);
481 return tmp; 479 return tmp;
482 } 480 }
483 } 481 }
@@ -510,7 +508,7 @@ evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type
510 fn->delete_me = 1; 508 fn->delete_me = 1;
511 obj->callbacks->deletions_waiting = 1; 509 obj->callbacks->deletions_waiting = 1;
512 if (!obj->callbacks->walking_list) 510 if (!obj->callbacks->walking_list)
513 evas_object_event_callback_clear(eo_obj); 511 evas_object_event_callback_clear(obj);
514 return tmp; 512 return tmp;
515 } 513 }
516 } 514 }
@@ -585,7 +583,7 @@ evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
585 fn->delete_me = 1; 583 fn->delete_me = 1;
586 e->callbacks->deletions_waiting = 1; 584 e->callbacks->deletions_waiting = 1;
587 if (!e->callbacks->walking_list) 585 if (!e->callbacks->walking_list)
588 evas_event_callback_clear(eo_e); 586 evas_event_callback_clear(e);
589 return data; 587 return data;
590 } 588 }
591 } 589 }
@@ -618,7 +616,7 @@ evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb
618 fn->delete_me = 1; 616 fn->delete_me = 1;
619 e->callbacks->deletions_waiting = 1; 617 e->callbacks->deletions_waiting = 1;
620 if (!e->callbacks->walking_list) 618 if (!e->callbacks->walking_list)
621 evas_event_callback_clear(eo_e); 619 evas_event_callback_clear(e);
622 return tmp; 620 return tmp;
623 } 621 }
624 } 622 }