aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-11-06 10:39:37 +0000
committerAndy Williams <andy@andywilliams.me>2017-11-06 10:39:37 +0000
commit756ea2231eb1d6de49ab4d10a4ebdf2aca9064f0 (patch)
tree3021b3808db7ef5eb45aa4d8083a9a6aa78acdda
parentAdd event handling to eo-intro (diff)
downloadexamples-origin/master.tar.gz
eo-intro: Clean up callbacksorigin/masterorigin/HEAD
-rw-r--r--c-eo-intro/src/eo_intro_main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/c-eo-intro/src/eo_intro_main.c b/c-eo-intro/src/eo_intro_main.c
index 3d1625c9..df377381 100644
--- a/c-eo-intro/src/eo_intro_main.c
+++ b/c-eo-intro/src/eo_intro_main.c
@@ -34,17 +34,17 @@ _obj_create()
}
static void
-_obj_callback_cb(void *data, const Efl_Event *event)
+_obj_callback_cb(void *data EINA_UNUSED, const Efl_Event *event)
{
- Eo *obj = data;
+ Eo *obj = event->object;
printf("Callback %s on object named \"%s\"\n", event->desc->name, efl_name_get(obj));
}
static void
-_obj_del_cb(void *data, const Efl_Event *event EINA_UNUSED)
+_obj_del_cb(void *data EINA_UNUSED, const Efl_Event *event)
{
- Eo *obj = data;
+ Eo *obj = event->object;
printf("Object named \"%s\" deleted\n", efl_name_get(obj));
}
@@ -52,11 +52,11 @@ _obj_del_cb(void *data, const Efl_Event *event EINA_UNUSED)
static void
_obj_callbacks(Eo *obj)
{
- efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _obj_callback_cb, obj);
- efl_event_callback_add(obj, EFL_EVENT_CALLBACK_DEL, _obj_callback_cb, obj);
- efl_event_callback_add(obj, EFL_EVENT_DEL, _obj_del_cb, obj);
+ efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _obj_callback_cb, NULL);
+ efl_event_callback_add(obj, EFL_EVENT_CALLBACK_DEL, _obj_callback_cb, NULL);
+ efl_event_callback_add(obj, EFL_EVENT_DEL, _obj_del_cb, NULL);
- efl_event_callback_del(obj, EFL_EVENT_CALLBACK_ADD, _obj_callback_cb, obj);
+ efl_event_callback_del(obj, EFL_EVENT_CALLBACK_ADD, _obj_callback_cb, NULL);
}
static void