aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/evas/src/lib/canvas/evas_callbacks.c
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2012-10-09 01:58:41 +0000
committerDaniel Zaoui <daniel.zaoui@yahoo.com>2012-10-09 01:58:41 +0000
commita01418aff884f9d6f3d68e4fcee1414e736a7313 (patch)
tree89d28034bc658515e91e8b49c76f2351193e0bb2 /legacy/evas/src/lib/canvas/evas_callbacks.c
parentephysics: fix sandbox shutdown (diff)
downloadefl-a01418aff884f9d6f3d68e4fcee1414e736a7313.tar.gz
eo: changes made for the support of the Eo concept
Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com> SVN revision: 77604
Diffstat (limited to 'legacy/evas/src/lib/canvas/evas_callbacks.c')
-rw-r--r--legacy/evas/src/lib/canvas/evas_callbacks.c223
1 files changed, 178 insertions, 45 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_callbacks.c b/legacy/evas/src/lib/canvas/evas_callbacks.c
index dfd8099f94..faf84455e6 100644
--- a/legacy/evas/src/lib/canvas/evas_callbacks.c
+++ b/legacy/evas/src/lib/canvas/evas_callbacks.c
@@ -1,16 +1,125 @@
#include "evas_common.h"
#include "evas_private.h"
-static void evas_object_event_callback_clear(Evas_Object *obj);
-static void evas_event_callback_clear(Evas *e);
+static void evas_object_event_callback_clear(Evas_Object *eo_obj);
+static void evas_event_callback_clear(Evas *eo_e);
int _evas_event_counter = 0;
EVAS_MEMPOOL(_mp_fn);
EVAS_MEMPOOL(_mp_cb);
EVAS_MEMPOOL(_mp_pc);
+extern Eina_Hash* signals_hash_table;
+
+EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_IN =
+ EO_EVENT_DESCRIPTION("Mouse In", "Mouse In Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_OUT =
+ EO_EVENT_DESCRIPTION("Mouse Out", "Mouse Out Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_DOWN =
+ EO_EVENT_DESCRIPTION("Mouse Down", "Mouse Button Down Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_UP =
+ EO_EVENT_DESCRIPTION("Mouse Up", "Mouse Button Up Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_MOVE =
+ EO_EVENT_DESCRIPTION("Mouse Move", "Mouse Move Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MOUSE_WHEEL =
+ EO_EVENT_DESCRIPTION("Mouse Wheel", "Mouse Wheel Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MULTI_DOWN =
+ EO_EVENT_DESCRIPTION("Multi Down", "Mouse-touch Down Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MULTI_UP =
+ EO_EVENT_DESCRIPTION("Multi Up", "Mouse-touch Up Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MULTI_MOVE =
+ EO_EVENT_DESCRIPTION("Multi Move", "Multi-touch Move Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_FREE =
+ EO_EVENT_DESCRIPTION("Free", "Object Being Freed (Called after Del)");
+EAPI const Eo_Event_Description _EVAS_EVENT_KEY_DOWN =
+ EO_EVENT_DESCRIPTION("Key Down", "Key Press Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_KEY_UP =
+ EO_EVENT_DESCRIPTION("Key Up", "Key Release Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_FOCUS_IN =
+ EO_EVENT_DESCRIPTION("Focus In", "Focus In Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_FOCUS_OUT =
+ EO_EVENT_DESCRIPTION("Focus Out", "Focus Out Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_SHOW =
+ EO_EVENT_DESCRIPTION("Show", "Show Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_HIDE =
+ EO_EVENT_DESCRIPTION("Hide", "Hide Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_MOVE =
+ EO_EVENT_DESCRIPTION("Move", "Move Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_RESIZE =
+ EO_EVENT_DESCRIPTION("Resize", "Resize Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_RESTACK =
+ EO_EVENT_DESCRIPTION("Restack", "Restack Event");
+EAPI const Eo_Event_Description _EVAS_EVENT_DEL =
+ EO_EVENT_DESCRIPTION("Del", "Object Being Deleted (called before Free)");
+EAPI const Eo_Event_Description _EVAS_EVENT_HOLD =
+ EO_EVENT_DESCRIPTION("Hold", "Events go on/off hold");
+EAPI const Eo_Event_Description _EVAS_EVENT_CHANGED_SIZE_HINTS =
+ EO_EVENT_DESCRIPTION("Changed Size Hints", "Size hints changed event");
+EAPI const Eo_Event_Description _EVAS_EVENT_IMAGE_PRELOADED =
+ EO_EVENT_DESCRIPTION("Image Preloaded", "Image has been preloaded");
+EAPI const Eo_Event_Description _EVAS_EVENT_IMAGE_RESIZE=
+ EO_EVENT_DESCRIPTION("Image Resize", "Image resize");
+EAPI const Eo_Event_Description _EVAS_EVENT_CANVAS_FOCUS_IN =
+ EO_EVENT_DESCRIPTION("Canvas Focus In", "Canvas got focus as a whole");
+EAPI const Eo_Event_Description _EVAS_EVENT_CANVAS_FOCUS_OUT =
+ EO_EVENT_DESCRIPTION("Canvas Focus Out", "Canvas lost focus as a whole");
+EAPI const Eo_Event_Description _EVAS_EVENT_RENDER_FLUSH_PRE =
+ EO_EVENT_DESCRIPTION("Render Flush Pre", "Called just before rendering is updated on the canvas target");
+EAPI const Eo_Event_Description _EVAS_EVENT_RENDER_FLUSH_POST =
+ EO_EVENT_DESCRIPTION("Render Flush Post", "Called just after rendering is updated on the canvas target");
+EAPI const Eo_Event_Description _EVAS_EVENT_CANVAS_OBJECT_FOCUS_IN =
+ EO_EVENT_DESCRIPTION("Canvas Object Focus In", "Canvas object got focus");
+EAPI const Eo_Event_Description _EVAS_EVENT_CANVAS_OBJECT_FOCUS_OUT =
+ EO_EVENT_DESCRIPTION("Canvas Object Focus Out", "Canvas object lost focus");
+EAPI const Eo_Event_Description _EVAS_EVENT_IMAGE_UNLOADED =
+ EO_EVENT_DESCRIPTION("Image Unloaded", "Image data has been unloaded (by some mechanism in Evas that throw out original image data)");
+EAPI const Eo_Event_Description _EVAS_EVENT_RENDER_PRE =
+ EO_EVENT_DESCRIPTION("Render Pre", "Called just before rendering starts on the canvas target @since 1.2");
+EAPI const Eo_Event_Description _EVAS_EVENT_RENDER_POST =
+ EO_EVENT_DESCRIPTION("Render Post", "Called just after rendering stops on the canvas target @since 1.2");
+
+/**
+ * Evas events descriptions for Eo.
+ */
+static const Eo_Event_Description *_legacy_evas_callback_table[EVAS_CALLBACK_LAST] =
+{
+ EVAS_EVENT_MOUSE_IN,
+ EVAS_EVENT_MOUSE_OUT,
+ EVAS_EVENT_MOUSE_DOWN,
+ EVAS_EVENT_MOUSE_UP,
+ EVAS_EVENT_MOUSE_MOVE,
+ EVAS_EVENT_MOUSE_WHEEL,
+ EVAS_EVENT_MULTI_DOWN,
+ EVAS_EVENT_MULTI_UP,
+ EVAS_EVENT_MULTI_MOVE,
+ EVAS_EVENT_FREE,
+ EVAS_EVENT_KEY_DOWN,
+ EVAS_EVENT_KEY_UP,
+ EVAS_EVENT_FOCUS_IN,
+ EVAS_EVENT_FOCUS_OUT,
+ EVAS_EVENT_SHOW,
+ EVAS_EVENT_HIDE,
+ EVAS_EVENT_MOVE,
+ EVAS_EVENT_RESIZE,
+ EVAS_EVENT_RESTACK,
+ EVAS_EVENT_DEL,
+ EVAS_EVENT_HOLD,
+ EVAS_EVENT_CHANGED_SIZE_HINTS,
+ EVAS_EVENT_IMAGE_PRELOADED,
+ EVAS_EVENT_IMAGE_RESIZE,
+ EVAS_EVENT_CANVAS_FOCUS_IN,
+ EVAS_EVENT_CANVAS_FOCUS_OUT,
+ EVAS_EVENT_RENDER_FLUSH_PRE,
+ EVAS_EVENT_RENDER_FLUSH_POST,
+ EVAS_EVENT_CANVAS_OBJECT_FOCUS_IN,
+ EVAS_EVENT_CANVAS_OBJECT_FOCUS_OUT,
+ EVAS_EVENT_IMAGE_UNLOADED,
+ EVAS_EVENT_RENDER_PRE,
+ EVAS_EVENT_RENDER_POST
+};
+
void
-_evas_post_event_callback_call(Evas *e)
+_evas_post_event_callback_call(Evas *eo_e, Evas_Public_Data *e)
{
Evas_Post_Callback *pc;
int skip = 0;
@@ -21,7 +130,7 @@ _evas_post_event_callback_call(Evas *e)
{
if ((!skip) && (!e->delete_me) && (!pc->delete_me))
{
- if (!pc->func((void*)pc->data, e)) skip = 1;
+ if (!pc->func((void*)pc->data, eo_e)) skip = 1;
}
EVAS_MEMPOOL_FREE(_mp_pc, pc);
}
@@ -29,8 +138,9 @@ _evas_post_event_callback_call(Evas *e)
}
void
-_evas_post_event_callback_free(Evas *e)
+_evas_post_event_callback_free(Evas *eo_e)
{
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
Evas_Post_Callback *pc;
EINA_LIST_FREE(e->post_events, pc)
@@ -60,8 +170,9 @@ evas_event_callback_list_post_free(Eina_Inlist **list)
}
static void
-evas_object_event_callback_clear(Evas_Object *obj)
+evas_object_event_callback_clear(Evas_Object *eo_obj)
{
+ Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
if (!obj->callbacks) return;
if (!obj->callbacks->deletions_waiting) return;
obj->callbacks->deletions_waiting = 0;
@@ -74,8 +185,9 @@ evas_object_event_callback_clear(Evas_Object *obj)
}
static void
-evas_event_callback_clear(Evas *e)
+evas_event_callback_clear(Evas *eo_e)
{
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
if (!e->callbacks) return;
if (!e->callbacks->deletions_waiting) return;
e->callbacks->deletions_waiting = 0;
@@ -88,9 +200,10 @@ evas_event_callback_clear(Evas *e)
}
void
-evas_object_event_callback_all_del(Evas_Object *obj)
+evas_object_event_callback_all_del(Evas_Object *eo_obj)
{
Evas_Func_Node *fn;
+ Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
if (!obj->callbacks) return;
EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn)
@@ -98,9 +211,10 @@ evas_object_event_callback_all_del(Evas_Object *obj)
}
void
-evas_object_event_callback_cleanup(Evas_Object *obj)
+evas_object_event_callback_cleanup(Evas_Object *eo_obj)
{
/* MEM OK */
+ Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
if (!obj->callbacks) return;
evas_event_callback_list_post_free(&obj->callbacks->callbacks);
EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks);
@@ -108,8 +222,9 @@ evas_object_event_callback_cleanup(Evas_Object *obj)
}
void
-evas_event_callback_all_del(Evas *e)
+evas_event_callback_all_del(Evas *eo_e)
{
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
Evas_Func_Node *fn;
if (!e->callbacks) return;
@@ -118,8 +233,9 @@ evas_event_callback_all_del(Evas *e)
}
void
-evas_event_callback_cleanup(Evas *e)
+evas_event_callback_cleanup(Evas *eo_e)
{
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
/* MEM OK */
if (!e->callbacks) return;
evas_event_callback_list_post_free(&e->callbacks->callbacks);
@@ -128,8 +244,9 @@ evas_event_callback_cleanup(Evas *e)
}
void
-evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info)
+evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info)
{
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
Eina_Inlist **l_mod = NULL, *l;
_evas_walk(e);
@@ -146,14 +263,14 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info)
{
Evas_Event_Cb func = fn->func;
if (func)
- func(fn->data, e, event_info);
+ func(fn->data, eo_e, event_info);
}
if (e->delete_me) break;
}
e->callbacks->walking_list--;
if (!e->callbacks->walking_list)
{
- evas_event_callback_clear(e);
+ evas_event_callback_clear(eo_e);
l_mod = NULL;
}
}
@@ -161,12 +278,12 @@ evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info)
}
void
-evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id)
+evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Callback_Type type, void *event_info, int event_id)
{
/* MEM OK */
Eina_Inlist **l_mod = NULL, *l;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
- Evas *e;
+ Evas_Public_Data *e;
if ((obj->delete_me) || (!obj->layer)) return;
if ((obj->last_event == event_id) &&
@@ -229,17 +346,21 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
{
Evas_Object_Event_Cb func = fn->func;
if (func)
- func(fn->data, obj->layer->evas, obj, event_info);
+ func(fn->data, obj->layer->evas->evas, eo_obj, event_info);
}
if (obj->delete_me) break;
}
obj->callbacks->walking_list--;
if (!obj->callbacks->walking_list)
{
- evas_object_event_callback_clear(obj);
+ evas_object_event_callback_clear(eo_obj);
l_mod = NULL;
}
+ const Eo_Event_Description *event_desc = eina_hash_find(signals_hash_table, _legacy_evas_callback_table[type]->name);
+ if (event_desc)
+ eo_do(eo_obj, eo_event_callback_call(_legacy_evas_callback_table[type], event_info, NULL));
+
if (type == EVAS_CALLBACK_MOUSE_DOWN)
{
Evas_Event_Mouse_Down *ev = event_info;
@@ -258,7 +379,10 @@ evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void
{
if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) &&
(type <= EVAS_CALLBACK_KEY_UP))
- evas_object_event_callback_call(obj->smart.parent, type, event_info, event_id);
+ {
+ Evas_Object_Protected_Data *smart_parent = eo_data_get(obj->smart.parent, EVAS_OBJ_CLASS);
+ evas_object_event_callback_call(obj->smart.parent, smart_parent, type, event_info, event_id);
+ }
}
}
_evas_unwalk(e);
@@ -277,19 +401,20 @@ _callback_priority_cmp(const void *_a, const void *_b)
}
EAPI void
-evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
+evas_object_event_callback_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
{
- evas_object_event_callback_priority_add(obj, type,
+ evas_object_event_callback_priority_add(eo_obj, type,
EVAS_CALLBACK_PRIORITY_DEFAULT, func, data);
}
EAPI void
-evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data)
+evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data)
{
+ Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
/* MEM OK */
Evas_Func_Node *fn;
- MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+ MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
@@ -318,14 +443,15 @@ evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type typ
}
EAPI void *
-evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
+evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
{
/* MEM OK */
Evas_Func_Node *fn;
- MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+ MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
+ Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
if (!func) return NULL;
@@ -341,7 +467,7 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_O
fn->delete_me = 1;
obj->callbacks->deletions_waiting = 1;
if (!obj->callbacks->walking_list)
- evas_object_event_callback_clear(obj);
+ evas_object_event_callback_clear(eo_obj);
return tmp;
}
}
@@ -349,14 +475,15 @@ evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_O
}
EAPI void *
-evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
+evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
{
/* MEM OK */
Evas_Func_Node *fn;
- MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+ MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
+ Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
if (!func) return NULL;
@@ -372,7 +499,7 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E
fn->delete_me = 1;
obj->callbacks->deletions_waiting = 1;
if (!obj->callbacks->walking_list)
- evas_object_event_callback_clear(obj);
+ evas_object_event_callback_clear(eo_obj);
return tmp;
}
}
@@ -380,19 +507,20 @@ evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, E
}
EAPI void
-evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
+evas_event_callback_add(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
{
- evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT,
+ evas_event_callback_priority_add(eo_e, type, EVAS_CALLBACK_PRIORITY_DEFAULT,
func, data);
}
EAPI void
-evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data)
+evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data)
{
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
/* MEM OK */
Evas_Func_Node *fn;
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+ MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
@@ -420,12 +548,13 @@ evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback
}
EAPI void *
-evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
+evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
{
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
/* MEM OK */
Evas_Func_Node *fn;
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+ MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
@@ -443,7 +572,7 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
fn->delete_me = 1;
e->callbacks->deletions_waiting = 1;
if (!e->callbacks->walking_list)
- evas_event_callback_clear(e);
+ evas_event_callback_clear(eo_e);
return data;
}
}
@@ -451,14 +580,15 @@ evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
}
EAPI void *
-evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
+evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
{
/* MEM OK */
Evas_Func_Node *fn;
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+ MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
if (!func) return NULL;
@@ -474,7 +604,7 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun
fn->delete_me = 1;
e->callbacks->deletions_waiting = 1;
if (!e->callbacks->walking_list)
- evas_event_callback_clear(e);
+ evas_event_callback_clear(eo_e);
return tmp;
}
}
@@ -482,14 +612,15 @@ evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb fun
}
EAPI void
-evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data)
+evas_post_event_callback_push(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data)
{
Evas_Post_Callback *pc;
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+ MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, );
pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback);
if (!pc) return;
@@ -502,15 +633,16 @@ evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const voi
}
EAPI void
-evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func)
+evas_post_event_callback_remove(Evas *eo_e, Evas_Object_Event_Post_Cb func)
{
Evas_Post_Callback *pc;
Eina_List *l;
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+ MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
EINA_LIST_FOREACH(e->post_events, l, pc)
{
if (pc->func == func)
@@ -522,15 +654,16 @@ evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func)
}
EAPI void
-evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data)
+evas_post_event_callback_remove_full(Evas *eo_e, Evas_Object_Event_Post_Cb func, const void *data)
{
Evas_Post_Callback *pc;
Eina_List *l;
- MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+ MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return;
MAGIC_CHECK_END();
+ Evas_Public_Data *e = eo_data_get(eo_e, EVAS_CLASS);
EINA_LIST_FOREACH(e->post_events, l, pc)
{
if ((pc->func == func) && (pc->data == data))