Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 185601 Details for
Bug 279884
[Widgets] Add API for multi-touch events and gestures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Gestures only for Mac
Gestures-macosx-1220-patch.txt (text/plain), 43.33 KB, created by
Scott Kovatch
on 2010-12-20 17:26:48 EST
(
hide
)
Description:
Gestures only for Mac
Filename:
MIME Type:
Creator:
Scott Kovatch
Created:
2010-12-20 17:26:48 EST
Size:
43.33 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.swt >Index: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras,v >retrieving revision 1.247 >diff -u -r1.247 AppKitFull.bridgesupport.extras >--- Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras 18 Dec 2010 00:25:18 -0000 1.247 >+++ Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras 20 Dec 2010 22:25:46 -0000 >@@ -1258,6 +1258,9 @@ > <method selector="locationInWindow" swt_gen="true"> > <retval swt_gen="true"></retval> > </method> >+ <method selector="magnification" swt_gen="true"> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="modifierFlags" swt_gen="true"> > <retval swt_gen="true"></retval> > </method> >@@ -1276,9 +1279,17 @@ > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> > </method> >+ <method selector="rotation" swt_gen="true"> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="timestamp" swt_gen="true"> > <retval swt_gen="true"></retval> > </method> >+ <method selector="touchesMatchingPhase:inView:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="type" swt_gen="true"> > <retval swt_gen="true"></retval> > </method> >@@ -2510,6 +2521,10 @@ > <method selector="becomeFirstResponder" swt_gen="true"> > <retval swt_gen="true"></retval> > </method> >+ <method selector="beginGestureWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="cancelOperation:" swt_gen="true"> > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> >@@ -2522,6 +2537,10 @@ > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> > </method> >+ <method selector="endGestureWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="flagsChanged:" swt_gen="true"> > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> >@@ -2546,6 +2565,10 @@ > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> > </method> >+ <method selector="magnifyWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="mouseDown:" swt_gen="true" swt_gen_super_msgSend="true"> > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> >@@ -2625,10 +2648,34 @@ > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> > </method> >+ <method selector="rotateWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="scrollWheel:" swt_gen="true"> > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> > </method> >+ <method selector="swipeWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> >+ <method selector="touchesBeganWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> >+ <method selector="touchesCancelledWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> >+ <method selector="touchesEndedWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> >+ <method selector="touchesMovedWithEvent:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="validRequestorForSendType:returnType:" swt_gen="true"> > <arg swt_gen="true"></arg> > <arg swt_gen="true"></arg> >@@ -3707,6 +3754,23 @@ > </class> > <class name="NSToolbarItemGroup" swt_superclass="NSToolbarItem"> > </class> >+ <class name="NSTouch" swt_gen="true"> >+ <method selector="device" swt_gen="true"> >+ <retval swt_gen="true"></retval> >+ </method> >+ <method selector="deviceSize" swt_gen="true"> >+ <retval swt_gen="true"></retval> >+ </method> >+ <method selector="isResting" swt_gen="true"> >+ <retval swt_gen="true"></retval> >+ </method> >+ <method selector="normalizedPosition" swt_gen="true"> >+ <retval swt_gen="true"></retval> >+ </method> >+ <method selector="phase" swt_gen="true"> >+ <retval swt_gen="true"></retval> >+ </method> >+ </class> > <class name="NSTrackingArea" swt_gen="mixed"> > <method selector="initWithRect:options:owner:userInfo:" swt_gen="true"> > <arg swt_gen="true"></arg> >@@ -3931,6 +3995,10 @@ > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> > </method> >+ <method selector="setAcceptsTouchEvents:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="setAutoresizesSubviews:" swt_gen="true"> > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> >@@ -3975,6 +4043,10 @@ > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> > </method> >+ <method selector="setWantsRestingTouches:" swt_gen="true"> >+ <arg swt_gen="true"></arg> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="shouldDelayWindowOrderingForEvent:" swt_gen="true"> > <arg swt_gen="true"></arg> > <retval swt_gen="true"></retval> >@@ -4614,6 +4686,12 @@ > <enum name="NSDragOperationNone" swt_gen="true"></enum> > <enum name="NSEnterCharacter" swt_gen="true"></enum> > <enum name="NSEvenOddWindingRule" swt_gen="true"></enum> >+ <enum name="NSEventTypeBeginGesture" swt_gen="true"></enum> >+ <enum name="NSEventTypeEndGesture" swt_gen="true"></enum> >+ <enum name="NSEventTypeGesture" swt_gen="true"></enum> >+ <enum name="NSEventTypeMagnify" swt_gen="true"></enum> >+ <enum name="NSEventTypeRotate" swt_gen="true"></enum> >+ <enum name="NSEventTypeSwipe" swt_gen="true"></enum> > <enum name="NSFileHandlingPanelOKButton" swt_gen="true"></enum> > <enum name="NSFlagsChanged" swt_gen="true"></enum> > <enum name="NSFocusRingTypeNone" swt_gen="true"></enum> >@@ -4733,6 +4811,14 @@ > <enum name="NSTextFieldDatePickerStyle" swt_gen="true"></enum> > <enum name="NSTitledWindowMask" swt_gen="true"></enum> > <enum name="NSToolbarDisplayModeIconOnly" swt_gen="true"></enum> >+ <enum name="NSTouchEventSubtype" swt_gen="true"></enum> >+ <enum name="NSTouchPhaseAny" swt_gen="true"></enum> >+ <enum name="NSTouchPhaseBegan" swt_gen="true"></enum> >+ <enum name="NSTouchPhaseCancelled" swt_gen="true"></enum> >+ <enum name="NSTouchPhaseEnded" swt_gen="true"></enum> >+ <enum name="NSTouchPhaseMoved" swt_gen="true"></enum> >+ <enum name="NSTouchPhaseStationary" swt_gen="true"></enum> >+ <enum name="NSTouchPhaseTouching" swt_gen="true"></enum> > <enum name="NSUnderlineStyleDouble" swt_gen="true"></enum> > <enum name="NSUnderlineStyleNone" swt_gen="true"></enum> > <enum name="NSUnderlineStyleSingle" swt_gen="true"></enum> >Index: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras,v >retrieving revision 1.57 >diff -u -r1.57 FoundationFull.bridgesupport.extras >--- Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras 4 May 2010 01:36:42 -0000 1.57 >+++ Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras 20 Dec 2010 22:25:46 -0000 >@@ -767,6 +767,9 @@ > <class name="NSScriptClassDescription" swt_superclass="NSClassDescription"> > </class> > <class name="NSSet" swt_gen="mixed"> >+ <method selector="allObjects" swt_gen="true"> >+ <retval swt_gen="true"></retval> >+ </method> > <method selector="count" swt_gen="true"> > <retval swt_gen="true"></retval> > </method> >Index: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java,v >retrieving revision 1.15 >diff -u -r1.15 NSEvent.java >--- Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java 18 Dec 2010 00:25:18 -0000 1.15 >+++ Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java 20 Dec 2010 22:25:46 -0000 >@@ -69,6 +69,10 @@ > return result; > } > >+public float /*double*/ magnification() { >+ return (float)OS.objc_msgSend_fpret(this.id, OS.sel_magnification); >+} >+ > public int /*long*/ modifierFlags() { > return OS.objc_msgSend(this.id, OS.sel_modifierFlags); > } >@@ -84,10 +88,19 @@ > return result != 0 ? new NSEvent(result) : null; > } > >+public float rotation() { >+ return (float)OS.objc_msgSend_fpret(this.id, OS.sel_rotation); >+} >+ > public double timestamp() { > return OS.objc_msgSend_fpret(this.id, OS.sel_timestamp); > } > >+public NSSet touchesMatchingPhase(int /*long*/ phase, NSView view) { >+ int /*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 int /*long*/ type() { > return OS.objc_msgSend(this.id, OS.sel_type); > } >Index: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java,v >retrieving revision 1.16 >diff -u -r1.16 NSResponder.java >--- Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java 25 Oct 2010 17:24:47 -0000 1.16 >+++ Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java 20 Dec 2010 22:25:46 -0000 >@@ -32,6 +32,10 @@ > return OS.objc_msgSend_bool(this.id, OS.sel_becomeFirstResponder); > } > >+public void beginGestureWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_beginGestureWithEvent_, event != null ? event.id : 0); >+} >+ > public void cancelOperation(id sender) { > OS.objc_msgSend(this.id, OS.sel_cancelOperation_, sender != null ? sender.id : 0); > } >@@ -44,6 +48,10 @@ > OS.objc_msgSend(this.id, OS.sel_doCommandBySelector_, aSelector); > } > >+public void endGestureWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_endGestureWithEvent_, event != null ? event.id : 0); >+} >+ > public void flagsChanged(NSEvent theEvent) { > OS.objc_msgSend(this.id, OS.sel_flagsChanged_, theEvent != null ? theEvent.id : 0); > } >@@ -68,6 +76,10 @@ > OS.objc_msgSend(this.id, OS.sel_keyUp_, theEvent != null ? theEvent.id : 0); > } > >+public void magnifyWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_magnifyWithEvent_, event != null ? event.id : 0); >+} >+ > public void mouseDown(NSEvent theEvent) { > OS.objc_msgSend(this.id, OS.sel_mouseDown_, theEvent != null ? theEvent.id : 0); > } >@@ -148,10 +160,34 @@ > OS.objc_msgSend(this.id, OS.sel_rightMouseUp_, theEvent != null ? theEvent.id : 0); > } > >+public void rotateWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_rotateWithEvent_, event != null ? event.id : 0); >+} >+ > public void scrollWheel(NSEvent theEvent) { > OS.objc_msgSend(this.id, OS.sel_scrollWheel_, theEvent != null ? theEvent.id : 0); > } > >+public void swipeWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_swipeWithEvent_, event != null ? event.id : 0); >+} >+ >+public void touchesBeganWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_touchesBeganWithEvent_, event != null ? event.id : 0); >+} >+ >+public void touchesCancelledWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_touchesCancelledWithEvent_, event != null ? event.id : 0); >+} >+ >+public void touchesEndedWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_touchesEndedWithEvent_, event != null ? event.id : 0); >+} >+ >+public void touchesMovedWithEvent(NSEvent event) { >+ OS.objc_msgSend(this.id, OS.sel_touchesMovedWithEvent_, event != null ? event.id : 0); >+} >+ > public id validRequestorForSendType(NSString sendType, NSString returnType) { > int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_validRequestorForSendType_returnType_, sendType != null ? sendType.id : 0, returnType != null ? returnType.id : 0); > return result != 0 ? new id(result) : null; >Index: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java,v >retrieving revision 1.10 >diff -u -r1.10 NSSet.java >--- Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java 1 Jul 2009 14:49:06 -0000 1.10 >+++ Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java 20 Dec 2010 22:25:46 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -24,6 +24,11 @@ > super(id); > } > >+public NSArray allObjects() { >+ int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_allObjects); >+ return result != 0 ? new NSArray(result) : null; >+} >+ > public int /*long*/ count() { > return OS.objc_msgSend(this.id, OS.sel_count); > } >Index: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java >=================================================================== >RCS file: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java >diff -N Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTouch.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,52 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.swt.internal.cocoa; >+ >+public class NSTouch extends NSObject { >+ >+public NSTouch() { >+ super(); >+} >+ >+public NSTouch(int /*long*/ id) { >+ super(id); >+} >+ >+public NSTouch(id id) { >+ super(id); >+} >+ >+public id device() { >+ int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_device); >+ return result != 0 ? new id(result) : null; >+} >+ >+public NSSize deviceSize() { >+ NSSize result = new NSSize(); >+ OS.objc_msgSend_stret(result, this.id, OS.sel_deviceSize); >+ return result; >+} >+ >+public boolean isResting() { >+ return OS.objc_msgSend_bool(this.id, OS.sel_isResting); >+} >+ >+public NSPoint normalizedPosition() { >+ NSPoint result = new NSPoint(); >+ OS.objc_msgSend_stret(result, this.id, OS.sel_normalizedPosition); >+ return result; >+} >+ >+public int /*long*/ phase() { >+ return OS.objc_msgSend(this.id, OS.sel_phase); >+} >+ >+} >Index: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java,v >retrieving revision 1.31 >diff -u -r1.31 NSView.java >--- Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java 13 Oct 2010 18:07:22 -0000 1.31 >+++ Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java 20 Dec 2010 22:25:48 -0000 >@@ -239,6 +239,10 @@ > return OS.objc_msgSend_bool(this.id, OS.sel_scrollRectToVisible_, aRect); > } > >+public void setAcceptsTouchEvents(boolean flag) { >+ OS.objc_msgSend(this.id, OS.sel_setAcceptsTouchEvents_, flag); >+} >+ > public void setAutoresizesSubviews(boolean flag) { > OS.objc_msgSend(this.id, OS.sel_setAutoresizesSubviews_, flag); > } >@@ -283,6 +287,10 @@ > OS.objc_msgSend(this.id, OS.sel_setToolTip_, string != null ? string.id : 0); > } > >+public void setWantsRestingTouches(boolean flag) { >+ OS.objc_msgSend(this.id, OS.sel_setWantsRestingTouches_, flag); >+} >+ > public boolean shouldDelayWindowOrderingForEvent(NSEvent theEvent) { > return OS.objc_msgSend_bool(this.id, OS.sel_shouldDelayWindowOrderingForEvent_, theEvent != null ? theEvent.id : 0); > } >Index: Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java,v >retrieving revision 1.372 >diff -u -r1.372 OS.java >--- Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java 18 Dec 2010 00:25:18 -0000 1.372 >+++ Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java 20 Dec 2010 22:25:50 -0000 >@@ -67,7 +67,7 @@ > public static final int kPMDuplexNoTumble = 0x0002; > public static final int kPMDuplexTumble = 0x0003; > >- >+ public static final int /*long*/ sel_identity = sel_registerName("identity"); > public static final int /*long*/ sel_sendSearchSelection = sel_registerName("sendSearchSelection"); > public static final int /*long*/ sel_sendCancelSelection = sel_registerName("sendCancelSelection"); > public static final int /*long*/ sel_sendSelection = sel_registerName("sendSelection"); >@@ -787,6 +787,7 @@ > public static final int /*long*/ class_NSTimer = objc_getClass("NSTimer"); > public static final int /*long*/ class_NSToolbar = objc_getClass("NSToolbar"); > public static final int /*long*/ class_NSToolbarItem = objc_getClass("NSToolbarItem"); >+public static final int /*long*/ class_NSTouch = objc_getClass("NSTouch"); > public static final int /*long*/ class_NSTrackingArea = objc_getClass("NSTrackingArea"); > public static final int /*long*/ class_NSTypesetter = objc_getClass("NSTypesetter"); > public static final int /*long*/ class_NSURL = objc_getClass("NSURL"); >@@ -904,6 +905,7 @@ > public static final int /*long*/ sel_addTypes_owner_ = sel_registerName("addTypes:owner:"); > public static final int /*long*/ sel_alignment = sel_registerName("alignment"); > public static final int /*long*/ sel_allKeys = sel_registerName("allKeys"); >+public static final int /*long*/ sel_allObjects = sel_registerName("allObjects"); > public static final int /*long*/ sel_alloc = sel_registerName("alloc"); > public static final int /*long*/ sel_allowsColumnReordering = sel_registerName("allowsColumnReordering"); > public static final int /*long*/ sel_allowsFloats = sel_registerName("allowsFloats"); >@@ -958,6 +960,7 @@ > public static final int /*long*/ sel_becomeKeyWindow = sel_registerName("becomeKeyWindow"); > public static final int /*long*/ sel_beginDocument = sel_registerName("beginDocument"); > public static final int /*long*/ sel_beginEditing = sel_registerName("beginEditing"); >+public static final int /*long*/ sel_beginGestureWithEvent_ = sel_registerName("beginGestureWithEvent:"); > public static final int /*long*/ sel_beginPageInRect_atPlacement_ = sel_registerName("beginPageInRect:atPlacement:"); > public static final int /*long*/ sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_ = sel_registerName("beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:"); > public static final int /*long*/ sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_ = sel_registerName("beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:message:"); >@@ -1137,7 +1140,9 @@ > public static final int /*long*/ sel_deselectRow_ = sel_registerName("deselectRow:"); > public static final int /*long*/ sel_destroyContext = sel_registerName("destroyContext"); > public static final int /*long*/ sel_detail = sel_registerName("detail"); >+public static final int /*long*/ sel_device = sel_registerName("device"); > public static final int /*long*/ sel_deviceDescription = sel_registerName("deviceDescription"); >+public static final int /*long*/ sel_deviceSize = sel_registerName("deviceSize"); > public static final int /*long*/ sel_dictionary = sel_registerName("dictionary"); > public static final int /*long*/ sel_dictionaryWithCapacity_ = sel_registerName("dictionaryWithCapacity:"); > public static final int /*long*/ sel_dictionaryWithObject_forKey_ = sel_registerName("dictionaryWithObject:forKey:"); >@@ -1202,6 +1207,7 @@ > public static final int /*long*/ sel_endDocument = sel_registerName("endDocument"); > public static final int /*long*/ sel_endEditing = sel_registerName("endEditing"); > public static final int /*long*/ sel_endEditingFor_ = sel_registerName("endEditingFor:"); >+public static final int /*long*/ sel_endGestureWithEvent_ = sel_registerName("endGestureWithEvent:"); > public static final int /*long*/ sel_endPage = sel_registerName("endPage"); > public static final int /*long*/ sel_endSheet_returnCode_ = sel_registerName("endSheet:returnCode:"); > public static final int /*long*/ sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_ = sel_registerName("enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:"); >@@ -1374,6 +1380,7 @@ > public static final int /*long*/ sel_isMiniaturized = sel_registerName("isMiniaturized"); > public static final int /*long*/ sel_isOpaque = sel_registerName("isOpaque"); > public static final int /*long*/ sel_isPlanar = sel_registerName("isPlanar"); >+public static final int /*long*/ sel_isResting = sel_registerName("isResting"); > public static final int /*long*/ sel_isRowSelected_ = sel_registerName("isRowSelected:"); > public static final int /*long*/ sel_isRunning = sel_registerName("isRunning"); > public static final int /*long*/ sel_isSessionOnly = sel_registerName("isSessionOnly"); >@@ -1413,6 +1420,8 @@ > public static final int /*long*/ sel_locationInWindow = sel_registerName("locationInWindow"); > public static final int /*long*/ sel_lockFocus = sel_registerName("lockFocus"); > public static final int /*long*/ sel_lowercaseString = sel_registerName("lowercaseString"); >+public static final int /*long*/ sel_magnification = sel_registerName("magnification"); >+public static final int /*long*/ sel_magnifyWithEvent_ = sel_registerName("magnifyWithEvent:"); > public static final int /*long*/ sel_mainBundle = sel_registerName("mainBundle"); > public static final int /*long*/ sel_mainFrame = sel_registerName("mainFrame"); > public static final int /*long*/ sel_mainMenu = sel_registerName("mainMenu"); >@@ -1469,6 +1478,7 @@ > public static final int /*long*/ sel_nextState = sel_registerName("nextState"); > public static final int /*long*/ sel_nextWordFromIndex_forward_ = sel_registerName("nextWordFromIndex:forward:"); > public static final int /*long*/ sel_noResponderFor_ = sel_registerName("noResponderFor:"); >+public static final int /*long*/ sel_normalizedPosition = sel_registerName("normalizedPosition"); > public static final int /*long*/ sel_noteNumberOfRowsChanged = sel_registerName("noteNumberOfRowsChanged"); > public static final int /*long*/ sel_numberOfColumns = sel_registerName("numberOfColumns"); > public static final int /*long*/ sel_numberOfComponents = sel_registerName("numberOfComponents"); >@@ -1548,6 +1558,7 @@ > public static final int /*long*/ sel_performKeyEquivalent_ = sel_registerName("performKeyEquivalent:"); > public static final int /*long*/ sel_performSelector_withObject_afterDelay_inModes_ = sel_registerName("performSelector:withObject:afterDelay:inModes:"); > public static final int /*long*/ sel_performSelectorOnMainThread_withObject_waitUntilDone_ = sel_registerName("performSelectorOnMainThread:withObject:waitUntilDone:"); >+public static final int /*long*/ sel_phase = sel_registerName("phase"); > public static final int /*long*/ sel_pixelsHigh = sel_registerName("pixelsHigh"); > public static final int /*long*/ sel_pixelsWide = sel_registerName("pixelsWide"); > public static final int /*long*/ sel_pointSize = sel_registerName("pointSize"); >@@ -1636,6 +1647,8 @@ > public static final int /*long*/ sel_rightMouseDragged_ = sel_registerName("rightMouseDragged:"); > public static final int /*long*/ sel_rightMouseUp_ = sel_registerName("rightMouseUp:"); > public static final int /*long*/ sel_rotateByDegrees_ = sel_registerName("rotateByDegrees:"); >+public static final int /*long*/ sel_rotateWithEvent_ = sel_registerName("rotateWithEvent:"); >+public static final int /*long*/ sel_rotation = sel_registerName("rotation"); > public static final int /*long*/ sel_rowAtPoint_ = sel_registerName("rowAtPoint:"); > public static final int /*long*/ sel_rowForItem_ = sel_registerName("rowForItem:"); > public static final int /*long*/ sel_rowHeight = sel_registerName("rowHeight"); >@@ -1692,6 +1705,7 @@ > public static final int /*long*/ sel_separatorItem = sel_registerName("separatorItem"); > public static final int /*long*/ sel_set = sel_registerName("set"); > public static final int /*long*/ sel_setAcceptsMouseMovedEvents_ = sel_registerName("setAcceptsMouseMovedEvents:"); >+public static final int /*long*/ sel_setAcceptsTouchEvents_ = sel_registerName("setAcceptsTouchEvents:"); > public static final int /*long*/ sel_setAccessoryView_ = sel_registerName("setAccessoryView:"); > public static final int /*long*/ sel_setAction_ = sel_registerName("setAction:"); > public static final int /*long*/ sel_setAlertStyle_ = sel_registerName("setAlertStyle:"); >@@ -1946,6 +1960,7 @@ > public static final int /*long*/ sel_setVerticalScroller_ = sel_registerName("setVerticalScroller:"); > public static final int /*long*/ sel_setView_ = sel_registerName("setView:"); > public static final int /*long*/ sel_setVisible_ = sel_registerName("setVisible:"); >+public static final int /*long*/ sel_setWantsRestingTouches_ = sel_registerName("setWantsRestingTouches:"); > public static final int /*long*/ sel_setWidth_ = sel_registerName("setWidth:"); > public static final int /*long*/ sel_setWidth_forSegment_ = sel_registerName("setWidth:forSegment:"); > public static final int /*long*/ sel_setWidthTracksTextView_ = sel_registerName("setWidthTracksTextView:"); >@@ -2001,6 +2016,7 @@ > public static final int /*long*/ sel_subviews = sel_registerName("subviews"); > public static final int /*long*/ sel_superclass = sel_registerName("superclass"); > public static final int /*long*/ sel_superview = sel_registerName("superview"); >+public static final int /*long*/ sel_swipeWithEvent_ = sel_registerName("swipeWithEvent:"); > public static final int /*long*/ sel_systemFontOfSize_ = sel_registerName("systemFontOfSize:"); > public static final int /*long*/ sel_systemFontSize = sel_registerName("systemFontSize"); > public static final int /*long*/ sel_systemFontSizeForControlSize_ = sel_registerName("systemFontSizeForControlSize:"); >@@ -2058,6 +2074,11 @@ > public static final int /*long*/ sel_toolbarDidRemoveItem_ = sel_registerName("toolbarDidRemoveItem:"); > public static final int /*long*/ sel_toolbarSelectableItemIdentifiers_ = sel_registerName("toolbarSelectableItemIdentifiers:"); > public static final int /*long*/ sel_toolbarWillAddItem_ = sel_registerName("toolbarWillAddItem:"); >+public static final int /*long*/ sel_touchesBeganWithEvent_ = sel_registerName("touchesBeganWithEvent:"); >+public static final int /*long*/ sel_touchesCancelledWithEvent_ = sel_registerName("touchesCancelledWithEvent:"); >+public static final int /*long*/ sel_touchesEndedWithEvent_ = sel_registerName("touchesEndedWithEvent:"); >+public static final int /*long*/ sel_touchesMatchingPhase_inView_ = sel_registerName("touchesMatchingPhase:inView:"); >+public static final int /*long*/ sel_touchesMovedWithEvent_ = sel_registerName("touchesMovedWithEvent:"); > public static final int /*long*/ sel_trackingAreas = sel_registerName("trackingAreas"); > public static final int /*long*/ sel_traitsOfFont_ = sel_registerName("traitsOfFont:"); > public static final int /*long*/ sel_transform = sel_registerName("transform"); >@@ -2216,6 +2237,12 @@ > public static final int NSDragOperationNone = 0; > public static final int NSEnterCharacter = 3; > public static final int NSEvenOddWindingRule = 1; >+public static final int NSEventTypeBeginGesture = 19; >+public static final int NSEventTypeEndGesture = 20; >+public static final int NSEventTypeGesture = 29; >+public static final int NSEventTypeMagnify = 30; >+public static final int NSEventTypeRotate = 18; >+public static final int NSEventTypeSwipe = 31; > public static final int NSFileHandlingPanelOKButton = 1; > public static final int NSFlagsChanged = 12; > public static final int NSFocusRingTypeNone = 1; >@@ -2335,6 +2362,14 @@ > public static final int NSTextFieldDatePickerStyle = 2; > public static final int NSTitledWindowMask = 1; > public static final int NSToolbarDisplayModeIconOnly = 2; >+public static final int NSTouchEventSubtype = 3; >+public static final int NSTouchPhaseAny = -1; >+public static final int NSTouchPhaseBegan = 1; >+public static final int NSTouchPhaseCancelled = 16; >+public static final int NSTouchPhaseEnded = 8; >+public static final int NSTouchPhaseMoved = 2; >+public static final int NSTouchPhaseStationary = 4; >+public static final int NSTouchPhaseTouching = 7; > public static final int NSUnderlineStyleDouble = 9; > public static final int NSUnderlineStyleNone = 0; > public static final int NSUnderlineStyleSingle = 1; >Index: Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java,v >retrieving revision 1.91 >diff -u -r1.91 Composite.java >--- Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java 2 Dec 2010 19:18:08 -0000 1.91 >+++ Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java 20 Dec 2010 22:25:50 -0000 >@@ -943,6 +943,9 @@ > float /*double*/ delta = nsEvent.deltaY(); > if (delta != 0) { > boolean doit = true; >+ if (display.gestureStarted) { >+ if (!sendGestureEvent(nsEvent, SWT.GESTURE_PAN, SWT.VERTICAL, true)) doit = false; >+ } > if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) { > doit = sendMouseEvent(nsEvent, SWT.MouseWheel, true); > } >@@ -959,9 +962,14 @@ > } > if (!doit) handled = true; > } >+ > delta = nsEvent.deltaX (); > if (delta != 0) { > boolean doit = true; >+ if (display.gestureStarted) { >+ if (!sendGestureEvent(nsEvent, SWT.GESTURE_PAN, SWT.HORIZONTAL, false)) doit = false; >+ } >+ > if (hooks (SWT.MouseHorizontalWheel) || filters (SWT.MouseHorizontalWheel)) { > doit = sendMouseEvent(nsEvent, SWT.MouseHorizontalWheel, true); > } >Index: Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java,v >retrieving revision 1.211 >diff -u -r1.211 Control.java >--- Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java 16 Dec 2010 21:52:57 -0000 1.211 >+++ Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java 20 Dec 2010 22:25:52 -0000 >@@ -402,6 +402,33 @@ > * > * @see HelpListener > * @see #removeHelpListener >+ * @since 3.7 >+ */ >+public void addGestureListener (GestureListener listener) { >+ checkWidget(); >+ if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); >+ TypedListener typedListener = new TypedListener (listener); >+ addListener (SWT.Gesture, typedListener); >+} >+ >+/** >+ * Adds the listener to the collection of listeners who will >+ * be notified when help events are generated for the control, >+ * by sending it one of the messages defined in the >+ * <code>HelpListener</code> interface. >+ * >+ * @param listener the listener which should be notified >+ * >+ * @exception IllegalArgumentException <ul> >+ * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> >+ * </ul> >+ * @exception SWTException <ul> >+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> >+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> >+ * </ul> >+ * >+ * @see HelpListener >+ * @see #removeHelpListener > */ > public void addHelpListener (HelpListener listener) { > checkWidget(); >@@ -658,6 +685,16 @@ > return super.becomeFirstResponder (id, sel); > } > >+void beginGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ if (!gestureEvent(id, sel, event, SWT.GESTURE_BEGIN)) return; >+ super.beginGestureWithEvent(id, sel, event); >+} >+ >+void endGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ if (!gestureEvent(id, sel, event, SWT.GESTURE_END)) return; >+ super.endGestureWithEvent(id, sel, event); >+} >+ > void calculateVisibleRegion (NSView view, int /*long*/ visibleRgn, boolean clipChildren) { > int /*long*/ tempRgn = OS.NewRgn (); > if (!view.isHiddenOrHasHiddenAncestor() && isDrawing()) { >@@ -1351,6 +1388,17 @@ > return view.window ().makeFirstResponder (focusView); > } > >+boolean gestureEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event, int detail) { >+ // For cross-platform compatibility, touch events and gestures are mutually exclusive. >+ // Don't send a gesture if touch events are enabled for this control. >+// if (touchEnabled) return true; >+ if (!display.sendEvent) return true; >+ display.sendEvent = false; >+ if (!isEventView (id)) return true; >+ NSEvent nsEvent = new NSEvent(event); >+ return sendGestureEvent (nsEvent, detail, true); >+} >+ > /** > * Returns the accessible object for the receiver. > * If this is the first time this object is requested, >@@ -2193,6 +2241,11 @@ > super.keyUp (id, sel, theEvent); > } > >+void magnifyWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ if (!gestureEvent(id, sel, event, SWT.GESTURE_MAGNIFY)) return; >+ super.magnifyWithEvent(id, sel, event); >+} >+ > void markLayout (boolean changed, boolean all) { > /* Do nothing */ > } >@@ -2229,16 +2282,25 @@ > void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) { > boolean handled = false; > if (id == view.id) { >+ NSEvent nsEvent = new NSEvent(theEvent); >+ if (display.gestureStarted && hooks(SWT.Gesture)) { >+ if (!sendGestureEvent(nsEvent, SWT.GESTURE_PAN, SWT.VERTICAL, true)) { >+ handled = true; >+ } >+ } > if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) { >- NSEvent nsEvent = new NSEvent(theEvent); > if (nsEvent.deltaY() != 0) { > if (!sendMouseEvent(nsEvent, SWT.MouseWheel, true)) { > handled = true; > } > } > } >+ if (display.gestureStarted && hooks(SWT.Gesture)) { >+ if (!sendGestureEvent(nsEvent, SWT.GESTURE_PAN, SWT.HORIZONTAL, true)) { >+ handled = true; >+ } >+ } > if (hooks (SWT.MouseHorizontalWheel) || filters (SWT.MouseHorizontalWheel)) { >- NSEvent nsEvent = new NSEvent(theEvent); > if (nsEvent.deltaX() != 0) { > if (!sendMouseEvent(nsEvent, SWT.MouseHorizontalWheel, true)) { > handled = true; >@@ -2728,6 +2790,32 @@ > > /** > * Removes the listener from the collection of listeners who will >+ * be notified when a gesture is performed on the control >+ * >+ * @param listener the listener which should no longer be notified >+ * >+ * @exception IllegalArgumentException <ul> >+ * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> >+ * </ul> >+ * @exception SWTException <ul> >+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> >+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> >+ * </ul> >+ * >+ * @see GestureListener >+ * @see #addGestureListener >+ * @since 3.7 >+ */ >+public void removeGestureListener (GestureListener listener) { >+ checkWidget(); >+ if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); >+ if (eventTable == null) return; >+ eventTable.unhook(SWT.Gesture, listener); >+} >+ >+ >+/** >+ * Removes the listener from the collection of listeners who will > * be notified when the help events are generated for the control. > * > * @param listener the listener which should no longer be notified >@@ -2994,6 +3082,11 @@ > sendEvent (SWT.Resize); > } > >+void rotateWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ if (!gestureEvent(id, sel, event, SWT.GESTURE_ROTATE)) return; >+ super.rotateWithEvent(id, sel, event); >+} >+ > boolean sendDragEvent (int button, int stateMask, int x, int y) { > Event event = new Event (); > event.button = button; >@@ -3035,6 +3128,65 @@ > } > } > >+boolean sendGestureEvent (NSEvent nsEvent, int detail, boolean send) { >+ return sendGestureEvent(nsEvent, detail, 0, send); >+} >+ >+boolean sendGestureEvent (NSEvent nsEvent, int detail, int orientation, boolean send) { >+ Event event = new Event (); >+ NSPoint windowPoint; >+ NSView view = eventView (); >+ windowPoint = nsEvent.locationInWindow(); >+ NSPoint point = view.convertPoint_fromView_(windowPoint, null); >+ if (!view.isFlipped ()) { >+ point.y = view.bounds().height - point.y; >+ } >+ event.x = (int) point.x; >+ event.y = (int) point.y; >+ setInputState (event, nsEvent, SWT.Gesture); >+ event.detail = detail; >+ >+ if (detail == SWT.GESTURE_BEGIN) { >+ display.gestureStarted = true; >+ display.rotation = 0.0; >+ display.magnification = 1.0; >+ } else if (detail == SWT.GESTURE_END) { >+ display.gestureStarted = false; >+ } >+ >+ switch (detail) { >+ case SWT.GESTURE_SWIPE: >+ event.xDirection = (int) -nsEvent.deltaX(); >+ event.yDirection = (int) -nsEvent.deltaY(); >+ break; >+ case SWT.GESTURE_ROTATE: { >+ display.rotation += nsEvent.rotation(); >+ event.rotation = display.rotation; >+ break; >+ } >+ case SWT.GESTURE_MAGNIFY: >+ display.magnification += nsEvent.magnification(); >+ event.magnification = display.magnification; >+ break; >+ case SWT.GESTURE_PAN: >+ // Panning increment is expressed in terms of the direction of movement, >+ // not in terms of scrolling increment. >+ if (orientation == SWT.HORIZONTAL) { >+ event.xDirection = (int) -nsEvent.deltaX(); >+ } else if (orientation == SWT.VERTICAL) { >+ event.yDirection = (int) -nsEvent.deltaY(); >+ } else { >+ error(SWT.ERROR_INVALID_ARGUMENT); >+ } >+ break; >+ } >+ >+ event.doit = true; >+ sendEvent (SWT.Gesture, event); >+ if (isDisposed ()) return false; >+ return event.doit; >+} >+ > boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) { > Shell shell = null; > Event event = new Event (); >@@ -3944,6 +4096,11 @@ > } > } > >+void swipeWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ if (!gestureEvent(id, sel, event, SWT.GESTURE_SWIPE)) return; >+ super.swipeWithEvent(id, sel, event); >+} >+ > NSSize textExtent (String string) { > NSAttributedString attribStr = createString(string, null, null, 0, false, true, false); > NSSize size = attribStr.size(); >Index: Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java,v >retrieving revision 1.362 >diff -u -r1.362 Display.java >--- Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java 18 Dec 2010 00:25:18 -0000 1.362 >+++ Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java 20 Dec 2010 22:25:53 -0000 >@@ -104,6 +104,11 @@ > boolean disposing; > int sendEventCount; > >+ /* gesture event state */ >+ double rotation; >+ double magnification; >+ boolean gestureStarted; >+ > /* Key event management */ > int [] deadKeyState = new int[1]; > int currentKeyboardUCHRdata; >@@ -2130,6 +2135,16 @@ > OS.class_addMethod(cls, OS.sel_acceptsFirstMouse_, proc3, "@:@"); > OS.class_addMethod(cls, OS.sel_changeColor_, proc3, "@:@"); > OS.class_addMethod(cls, OS.sel_cancelOperation_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_touchesBeganWithEvent_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_touchesMovedWithEvent_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_touchesEndedWithEvent_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_touchesCancelledWithEvent_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_beginGestureWithEvent_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_endGestureWithEvent_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_swipeWithEvent_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_rotateWithEvent_, proc3, "@:@"); >+ OS.class_addMethod(cls, OS.sel_magnifyWithEvent_, proc3, "@:@"); >+ > } > if (proc2 != 0) { > OS.class_addMethod(cls, OS.sel_resignFirstResponder, proc2, "@:"); >@@ -4774,6 +4789,7 @@ > case OS.NSKeyDown: > case OS.NSKeyUp: > case OS.NSScrollWheel: >+ // TODO: Add touch detection here... > if (window != null) { > Shell shell = (Shell) getWidget (window.id); > if (shell != null) { >@@ -5436,6 +5452,24 @@ > widget.windowDidMiniturize(id, sel, arg0); > } else if (sel == OS.sel_windowDidDeminiaturize_) { > widget.windowDidDeminiturize(id, sel, arg0); >+ } else if (sel == OS.sel_touchesBeganWithEvent_) { >+ widget.touchesBeganWithEvent(id, sel, arg0); >+ } else if (sel == OS.sel_touchesMovedWithEvent_) { >+ widget.touchesMovedWithEvent(id, sel, arg0); >+ } else if (sel == OS.sel_touchesEndedWithEvent_) { >+ widget.touchesEndedWithEvent(id, sel, arg0); >+ } else if (sel == OS.sel_touchesCancelledWithEvent_) { >+ widget.touchesCancelledWithEvent(id, sel, arg0); >+ } else if (sel == OS.sel_beginGestureWithEvent_) { >+ widget.beginGestureWithEvent(id, sel, arg0); >+ } else if (sel == OS.sel_endGestureWithEvent_) { >+ widget.endGestureWithEvent(id, sel, arg0); >+ } else if (sel == OS.sel_swipeWithEvent_) { >+ widget.swipeWithEvent(id, sel, arg0); >+ } else if (sel == OS.sel_magnifyWithEvent_) { >+ widget.magnifyWithEvent(id, sel, arg0); >+ } else if (sel == OS.sel_rotateWithEvent_) { >+ widget.rotateWithEvent(id, sel, arg0); > } else if (sel == OS.sel_toolbarAllowedItemIdentifiers_) { > return widget.toolbarAllowedItemIdentifiers(id, sel, arg0); > } else if (sel == OS.sel_toolbarDefaultItemIdentifiers_) { >Index: Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java,v >retrieving revision 1.155 >diff -u -r1.155 Widget.java >--- Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java 16 Nov 2010 17:10:59 -0000 1.155 >+++ Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java 20 Dec 2010 22:25:54 -0000 >@@ -1666,6 +1666,7 @@ > case OS.NSScrollWheel: > case OS.NSKeyDown: > case OS.NSKeyUp: >+ case OS.NSEventTypeGesture: > int state = OS.GetCurrentButtonState (); > if ((state & 0x1) != 0) event.stateMask |= SWT.BUTTON1; > if ((state & 0x2) != 0) event.stateMask |= SWT.BUTTON3; >@@ -1698,6 +1699,7 @@ > if (event.keyCode == SWT.COMMAND) event.stateMask &= ~SWT.COMMAND; > break; > case SWT.KeyUp: >+ case SWT.Gesture: > if (event.keyCode == SWT.ALT) event.stateMask |= SWT.ALT; > if (event.keyCode == SWT.SHIFT) event.stateMask |= SWT.SHIFT; > if (event.keyCode == SWT.CONTROL) event.stateMask |= SWT.CONTROL; >@@ -1987,6 +1989,42 @@ > return getName () + " {" + string + "}"; > } > >+void touchesBeganWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ >+void touchesCancelledWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ >+void touchesEndedWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ >+void touchesMovedWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ >+void beginGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ >+void endGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ >+void magnifyWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ >+void rotateWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ >+void swipeWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) { >+ callSuper(id, sel, event); >+} >+ > void resetCursorRects (int /*long*/ id, int /*long*/ sel) { > callSuper (id, sel); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 279884
:
179350
|
184198
|
184199
|
184200
|
184827
|
184828
|
184829
|
184914
|
184915
|
185101
|
185155
|
185192
|
185582
|
185586
|
185587
|
185600
| 185601 |
186057
|
186058
|
186059
|
186448
|
186449
|
186450
|
186761
|
186762
|
186763
|
186764