diff dwt/internal/cocoa/NSEvent.d @ 60:62202ce0039f

Updated and fixed many modules to 3.514
author Jacob Carlborg <doob@me.com>
date Mon, 22 Dec 2008 15:10:19 +0100
parents cfa563df4fdd
children c74ba20de292
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSEvent.d	Tue Dec 09 21:52:21 2008 +0100
+++ b/dwt/internal/cocoa/NSEvent.d	Mon Dec 22 15:10:19 2008 +0100
@@ -26,33 +26,6 @@
 import dwt.internal.objc.cocoa.Cocoa;
 import objc = dwt.internal.objc.runtime;
 
-enum NSEventType
-{
-    NSLeftMouseDown      = 1,
-    NSLeftMouseUp        = 2,
-    NSRightMouseDown     = 3,
-    NSRightMouseUp       = 4,
-    NSMouseMoved         = 5,
-    NSLeftMouseDragged   = 6,
-    NSRightMouseDragged  = 7,
-    NSMouseEntered       = 8,
-    NSMouseExited        = 9,
-    NSKeyDown            = 10,
-    NSKeyUp              = 11,
-    NSFlagsChanged       = 12,
-    NSAppKitDefined      = 13,
-    NSSystemDefined      = 14,
-    NSApplicationDefined = 15,
-    NSPeriodic           = 16,
-    NSCursorUpdate       = 17,
-    NSScrollWheel        = 22,
-    NSTabletPoint        = 23,
-    NSTabletProximity    = 24,
-    NSOtherMouseDown     = 25,
-    NSOtherMouseUp       = 26,
-    NSOtherMouseDragged  = 27
-}
-
 public class NSEvent : NSObject {
 
 public this() {
@@ -68,7 +41,7 @@
 }
 
 public NSInteger buttonNumber() {
-    return OS.objc_msgSend(this.id, OS.sel_buttonNumber);
+    return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_buttonNumber);
 }
 
 public NSString characters() {
@@ -99,7 +72,7 @@
 
 public NSPoint locationInWindow() {
     NSPoint result = NSPoint();
-    OS.objc_msgSend_stret(result, this.id, OS.sel_locationInWindow);
+    OS.objc_msgSend_stret(&result, this.id, OS.sel_locationInWindow);
     return result;
 }
 
@@ -109,7 +82,7 @@
 
 public static NSPoint mouseLocation() {
     NSPoint result = NSPoint();
-    OS.objc_msgSend_stret(result, OS.class_NSEvent, OS.sel_mouseLocation);
+    OS.objc_msgSend_stret(&result, OS.class_NSEvent, OS.sel_mouseLocation);
     return result;
 }
 
@@ -119,7 +92,7 @@
 }
 
 public NSEventType type() {
-    return OS.objc_msgSend(this.id, OS.sel_type);
+    return cast(NSEventType) OS.objc_msgSend(this.id, OS.sel_type);
 }
 
 public NSWindow window() {