summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichelle Legrand <michelle.legrand@openwide.fr>2015-01-29 13:56:49 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-05 16:38:07 +0100
commit48fff1478c52cbd76b9d300e0019c829250a0bd4 (patch)
treef38b660ab3cb2e8a18d516845f4a48013b2b4c42
parentc9dd8fde7dc8b4eb93381c7dcfa888ddf6282c43 (diff)
ecore_cocoa: add ecore event on mouse scroll for cocoa.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m b/src/lib/ecore_cocoa/ecore_cocoa.m
index 23aab3f131..119e66f62f 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa.m
@@ -443,6 +443,22 @@ ecore_cocoa_feed_events(void *anEvent)
443 case NSScrollWheel: 443 case NSScrollWheel:
444 { 444 {
445 DBG("Scroll Wheel\n"); 445 DBG("Scroll Wheel\n");
446
447 EcoreCocoaWindow *window = (EcoreCocoaWindow *)[event window];
448 Ecore_Event_Mouse_Wheel *ev;
449
450 ev = malloc(sizeof(Ecore_Event_Mouse_Wheel));
451 if (!ev) return pass;
452
453 ev->window = (Ecore_Window)window.ecore_window_data;
454 ev->event_window = ev->window;
455 ev->modifiers = 0; /* FIXME: keep modifier around. */
456 ev->timestamp = time;
457 ev->z = [event deltaX] != 0 ? [event deltaX] : -([event deltaY]);
458 ev->direction = [event deltaX] != 0 ? 0 : 1;
459
460 ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL);
461
446 break; 462 break;
447 } 463 }
448 default: 464 default: