From 1d49687cd94ed6daa70c3b28a226570dc2d9e3ca Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 12 Jul 2012 12:27:09 +0000 Subject: [PATCH] add smart callbacks to efm objects for mouse in/out on an icon object SVN revision: 73615 --- src/bin/e_fm.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index a17a6d7..ab1f87b 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -299,6 +299,8 @@ static void _e_fm2_cb_dnd_drop(void *data, const char *type, void *even static void _e_fm2_cb_icon_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _e_fm2_cb_icon_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _e_fm2_cb_icon_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _e_fm2_cb_icon_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _e_fm2_cb_icon_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info); static void _e_fm2_cb_icon_thumb_dnd_gen(void *data, Evas_Object *obj, void *event_info); static void _e_fm2_cb_icon_thumb_gen(void *data, Evas_Object *obj, void *event_info); static void _e_fm2_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info); @@ -4632,6 +4634,8 @@ _e_fm2_icon_realize(E_Fm2_Icon *ic) evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_DOWN, _e_fm2_cb_icon_mouse_down, ic); evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_UP, _e_fm2_cb_icon_mouse_up, ic); evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_MOVE, _e_fm2_cb_icon_mouse_move, ic); + evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_IN, _e_fm2_cb_icon_mouse_in, ic); + evas_object_event_callback_add(ic->obj, EVAS_CALLBACK_MOUSE_OUT, _e_fm2_cb_icon_mouse_out, ic); _e_fm2_icon_icon_set(ic); @@ -6618,6 +6622,36 @@ _e_fm_drag_key_up_cb(E_Drag *drag, Ecore_Event_Key *e) } static void +_e_fm2_cb_icon_mouse_in(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Evas_Event_Mouse_In *ev; + E_Fm2_Icon *ic; + + ic = data; + ev = event_info; + + if (ic->entry_widget) return; + + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; + evas_object_smart_callback_call(ic->sd->obj, "icon,mouse,in", &ic->info); +} + +static void +_e_fm2_cb_icon_mouse_out(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) +{ + Evas_Event_Mouse_Out *ev; + E_Fm2_Icon *ic; + + ic = data; + ev = event_info; + + if (ic->entry_widget) return; + + if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return; + evas_object_smart_callback_call(ic->sd->obj, "icon,mouse,out", &ic->info); +} + +static void _e_fm2_cb_icon_mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) { Evas_Event_Mouse_Move *ev; -- 2.7.4