summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2013-11-28 17:06:39 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-11-28 17:07:44 +0900
commit26b6320f46478f8d1a6abbf76fd20144e369664f (patch)
treeb998d65624c40990856c5ad8c325b6840bdc64d6 /src
parent2f6b6cde974807e2f53ef8832b9e3ec46da4b9b2 (diff)
elm_spinner.c: support mouse wheel in spinner.
Spinner didn't work with mouse wheel which is a bug. This fixes T587.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_spinner.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c
index 2021f3aa8..e7c881b4a 100644
--- a/src/lib/elm_spinner.c
+++ b/src/lib/elm_spinner.c
@@ -431,8 +431,10 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
431 431
432 Evas_Object *src = va_arg(*list, Evas_Object *); 432 Evas_Object *src = va_arg(*list, Evas_Object *);
433 Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type); 433 Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
434 Evas_Event_Key_Down *ev = va_arg(*list, void *); 434 void *event_info = va_arg(*list, void *);
435 Evas_Event_Key_Down *ev = event_info;
435 Eina_Bool *ret = va_arg(*list, Eina_Bool *); 436 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
437 Evas_Event_Mouse_Wheel *mev;
436 438
437 if (ret) *ret = EINA_FALSE; 439 if (ret) *ret = EINA_FALSE;
438 (void) src; 440 (void) src;
@@ -490,6 +492,20 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
490 492
491 goto success; 493 goto success;
492 } 494 }
495 else if (type == EVAS_CALLBACK_MOUSE_WHEEL)
496 {
497 mev = event_info;
498 if (mev->z < 0)
499 {
500 _val_inc_start(obj);
501 elm_layout_signal_emit(obj, "elm,right,anim,activate", "elm");
502 }
503 else
504 {
505 _val_dec_start(obj);
506 elm_layout_signal_emit(obj, "elm,left,anim,activate", "elm");
507 }
508 }
493 509
494 return; 510 return;
495 511