diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java index 481e1d00fc..b2f03b12f0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2020 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -19,7 +19,7 @@ public NSEvent() { super(); } -public NSEvent(long /*int*/ id) { +public NSEvent(long id) { super(id); } @@ -27,38 +27,42 @@ public NSEvent(id id) { super(id); } -public long /*int*/ CGEvent() { +public long CGEvent() { return OS.objc_msgSend(this.id, OS.sel_CGEvent); } -public long /*int*/ buttonNumber() { +public long buttonNumber() { return OS.objc_msgSend(this.id, OS.sel_buttonNumber); } public NSString characters() { - long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_characters); + long result = OS.objc_msgSend(this.id, OS.sel_characters); return result != 0 ? new NSString(result) : null; } public NSString charactersIgnoringModifiers() { - long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_charactersIgnoringModifiers); + long result = OS.objc_msgSend(this.id, OS.sel_charactersIgnoringModifiers); return result != 0 ? new NSString(result) : null; } -public long /*int*/ clickCount() { +public long clickCount() { return OS.objc_msgSend(this.id, OS.sel_clickCount); } -public double /*float*/ deltaX() { - return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_deltaX); +public double deltaX() { + return OS.objc_msgSend_fpret(this.id, OS.sel_deltaX); } -public double /*float*/ deltaY() { - return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_deltaY); +public double deltaY() { + return OS.objc_msgSend_fpret(this.id, OS.sel_deltaY); } -public static NSEvent enterExitEventWithType(long /*int*/ type, NSPoint location, long /*int*/ flags, double time, long /*int*/ wNum, NSGraphicsContext context, long /*int*/ eNum, long /*int*/ tNum, long /*int*/ data) { - long /*int*/ result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_, type, location, flags, time, wNum, context != null ? context.id : 0, eNum, tNum, data); +public static double doubleClickInterval() { + return OS.objc_msgSend_fpret(OS.class_NSEvent, OS.sel_doubleClickInterval); +} + +public static NSEvent enterExitEventWithType(long type, NSPoint location, long flags, double time, long wNum, NSGraphicsContext context, long eNum, long tNum, long data) { + long result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_, type, location, flags, time, wNum, context != null ? context.id : 0, eNum, tNum, data); return result != 0 ? new NSEvent(result) : null; } @@ -72,11 +76,11 @@ public NSPoint locationInWindow() { return result; } -public double /*float*/ magnification() { - return (double /*float*/)OS.objc_msgSend_fpret(this.id, OS.sel_magnification); +public double magnification() { + return OS.objc_msgSend_fpret(this.id, OS.sel_magnification); } -public long /*int*/ modifierFlags() { +public long modifierFlags() { return OS.objc_msgSend(this.id, OS.sel_modifierFlags); } @@ -86,11 +90,19 @@ public static NSPoint mouseLocation() { return result; } -public static NSEvent otherEventWithType(long /*int*/ type, NSPoint location, long /*int*/ flags, double time, long /*int*/ wNum, NSGraphicsContext context, short subtype, long /*int*/ d1, long /*int*/ d2) { - long /*int*/ result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_, type, location, flags, time, wNum, context != null ? context.id : 0, subtype, d1, d2); +public static NSEvent otherEventWithType(long type, NSPoint location, long flags, double time, long wNum, NSGraphicsContext context, short subtype, long d1, long d2) { + long result = OS.objc_msgSend(OS.class_NSEvent, OS.sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_, type, location, flags, time, wNum, context != null ? context.id : 0, subtype, d1, d2); return result != 0 ? new NSEvent(result) : null; } +public long phase() { + return OS.objc_msgSend(this.id, OS.sel_phase); +} + +public static long pressedMouseButtons() { + return OS.objc_msgSend(OS.class_NSEvent, OS.sel_pressedMouseButtons); +} + public float rotation() { return OS.objc_msgSend_floatret(this.id, OS.sel_rotation); } @@ -99,17 +111,17 @@ public double timestamp() { return OS.objc_msgSend_fpret(this.id, OS.sel_timestamp); } -public NSSet touchesMatchingPhase(long /*int*/ phase, NSView view) { - long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_touchesMatchingPhase_inView_, phase, view != null ? view.id : 0); +public NSSet touchesMatchingPhase(long phase, NSView view) { + long result = OS.objc_msgSend(this.id, OS.sel_touchesMatchingPhase_inView_, phase, view != null ? view.id : 0); return result != 0 ? new NSSet(result) : null; } -public long /*int*/ type() { +public long type() { return OS.objc_msgSend(this.id, OS.sel_type); } public NSWindow window() { - long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_window); + long result = OS.objc_msgSend(this.id, OS.sel_window); return result != 0 ? new NSWindow(result) : null; } |