summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-09-05 00:08:10 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-09-05 01:12:22 +0900
commitc1950dc0cff754d1fcb7974cc74c713eb1852570 (patch)
tree781a0c6ddde86ccc26f8173721a2fd24ab9ce89d /src/lib
parentb6f351fc749c89fdbcd4bdc05e2d12f53847e29a (diff)
tooltip: Removed unnecessary casting and followed callback function conventions.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/els_tooltip.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/els_tooltip.c b/src/lib/els_tooltip.c
index a9880f0da..46933a5c5 100644
--- a/src/lib/els_tooltip.c
+++ b/src/lib/els_tooltip.c
@@ -107,8 +107,12 @@ _elm_tooltip_obj_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EI
107} 107}
108 108
109static void 109static void
110_elm_tooltip_obj_mouse_move_cb(Elm_Tooltip *tt, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, Evas_Event_Mouse_Move *ev) 110_elm_tooltip_obj_mouse_move_cb(void *data, Evas *e EINA_UNUSED,
111 Evas_Object *obj EINA_UNUSED, void *event_info)
111{ 112{
113 Elm_Tooltip *tt = data;
114 Evas_Event_Mouse_Move *ev = event_info;
115
112 if (tt->mouse_x || tt->mouse_y) 116 if (tt->mouse_x || tt->mouse_y)
113 { 117 {
114 if ((abs(ev->cur.output.x - tt->mouse_x) < 3) && 118 if ((abs(ev->cur.output.x - tt->mouse_x) < 3) &&
@@ -164,8 +168,9 @@ _elm_tooltip_show(Elm_Tooltip *tt)
164 //No movement of tooltip upon mouse move if orientation set 168 //No movement of tooltip upon mouse move if orientation set
165 if ((tt->orient <= ELM_TOOLTIP_ORIENT_NONE) || (tt->orient >= ELM_TOOLTIP_ORIENT_LAST)) 169 if ((tt->orient <= ELM_TOOLTIP_ORIENT_NONE) || (tt->orient >= ELM_TOOLTIP_ORIENT_LAST))
166 { 170 {
167 evas_object_event_callback_add 171 evas_object_event_callback_add(tt->eventarea,
168 (tt->eventarea, EVAS_CALLBACK_MOUSE_MOVE, (Evas_Object_Event_Cb)_elm_tooltip_obj_mouse_move_cb, tt); 172 EVAS_CALLBACK_MOUSE_MOVE,
173 _elm_tooltip_obj_mouse_move_cb, tt);
169 } 174 }
170 } 175 }
171 tt->changed_style = EINA_TRUE; 176 tt->changed_style = EINA_TRUE;