View | Details | Raw Unified | Return to bug 279884 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras (+86 lines)
Lines 1258-1263 Link Here
1258
		<method selector="locationInWindow" swt_gen="true">
1258
		<method selector="locationInWindow" swt_gen="true">
1259
			<retval swt_gen="true"></retval>
1259
			<retval swt_gen="true"></retval>
1260
		</method>
1260
		</method>
1261
		<method selector="magnification" swt_gen="true">
1262
			<retval swt_gen="true"></retval>
1263
		</method>
1261
		<method selector="modifierFlags" swt_gen="true">
1264
		<method selector="modifierFlags" swt_gen="true">
1262
			<retval swt_gen="true"></retval>
1265
			<retval swt_gen="true"></retval>
1263
		</method>
1266
		</method>
Lines 1276-1284 Link Here
1276
			<arg swt_gen="true"></arg>
1279
			<arg swt_gen="true"></arg>
1277
			<retval swt_gen="true"></retval>
1280
			<retval swt_gen="true"></retval>
1278
		</method>
1281
		</method>
1282
		<method selector="rotation" swt_gen="true">
1283
			<retval swt_gen="true"></retval>
1284
		</method>
1279
		<method selector="timestamp" swt_gen="true">
1285
		<method selector="timestamp" swt_gen="true">
1280
			<retval swt_gen="true"></retval>
1286
			<retval swt_gen="true"></retval>
1281
		</method>
1287
		</method>
1288
		<method selector="touchesMatchingPhase:inView:" swt_gen="true">
1289
			<arg swt_gen="true"></arg>
1290
			<arg swt_gen="true"></arg>
1291
			<retval swt_gen="true"></retval>
1292
		</method>
1282
		<method selector="type" swt_gen="true">
1293
		<method selector="type" swt_gen="true">
1283
			<retval swt_gen="true"></retval>
1294
			<retval swt_gen="true"></retval>
1284
		</method>
1295
		</method>
Lines 2510-2515 Link Here
2510
		<method selector="becomeFirstResponder" swt_gen="true">
2521
		<method selector="becomeFirstResponder" swt_gen="true">
2511
			<retval swt_gen="true"></retval>
2522
			<retval swt_gen="true"></retval>
2512
		</method>
2523
		</method>
2524
		<method selector="beginGestureWithEvent:" swt_gen="true">
2525
			<arg swt_gen="true"></arg>
2526
			<retval swt_gen="true"></retval>
2527
		</method>
2513
		<method selector="cancelOperation:" swt_gen="true">
2528
		<method selector="cancelOperation:" swt_gen="true">
2514
			<arg swt_gen="true"></arg>
2529
			<arg swt_gen="true"></arg>
2515
			<retval swt_gen="true"></retval>
2530
			<retval swt_gen="true"></retval>
Lines 2522-2527 Link Here
2522
			<arg swt_gen="true"></arg>
2537
			<arg swt_gen="true"></arg>
2523
			<retval swt_gen="true"></retval>
2538
			<retval swt_gen="true"></retval>
2524
		</method>
2539
		</method>
2540
		<method selector="endGestureWithEvent:" swt_gen="true">
2541
			<arg swt_gen="true"></arg>
2542
			<retval swt_gen="true"></retval>
2543
		</method>
2525
		<method selector="flagsChanged:" swt_gen="true">
2544
		<method selector="flagsChanged:" swt_gen="true">
2526
			<arg swt_gen="true"></arg>
2545
			<arg swt_gen="true"></arg>
2527
			<retval swt_gen="true"></retval>
2546
			<retval swt_gen="true"></retval>
Lines 2546-2551 Link Here
2546
			<arg swt_gen="true"></arg>
2565
			<arg swt_gen="true"></arg>
2547
			<retval swt_gen="true"></retval>
2566
			<retval swt_gen="true"></retval>
2548
		</method>
2567
		</method>
2568
		<method selector="magnifyWithEvent:" swt_gen="true">
2569
			<arg swt_gen="true"></arg>
2570
			<retval swt_gen="true"></retval>
2571
		</method>
2549
		<method selector="mouseDown:" swt_gen="true" swt_gen_super_msgSend="true">
2572
		<method selector="mouseDown:" swt_gen="true" swt_gen_super_msgSend="true">
2550
			<arg swt_gen="true"></arg>
2573
			<arg swt_gen="true"></arg>
2551
			<retval swt_gen="true"></retval>
2574
			<retval swt_gen="true"></retval>
Lines 2625-2634 Link Here
2625
			<arg swt_gen="true"></arg>
2648
			<arg swt_gen="true"></arg>
2626
			<retval swt_gen="true"></retval>
2649
			<retval swt_gen="true"></retval>
2627
		</method>
2650
		</method>
2651
		<method selector="rotateWithEvent:" swt_gen="true">
2652
			<arg swt_gen="true"></arg>
2653
			<retval swt_gen="true"></retval>
2654
		</method>
2628
		<method selector="scrollWheel:" swt_gen="true">
2655
		<method selector="scrollWheel:" swt_gen="true">
2629
			<arg swt_gen="true"></arg>
2656
			<arg swt_gen="true"></arg>
2630
			<retval swt_gen="true"></retval>
2657
			<retval swt_gen="true"></retval>
2631
		</method>
2658
		</method>
2659
		<method selector="swipeWithEvent:" swt_gen="true">
2660
			<arg swt_gen="true"></arg>
2661
			<retval swt_gen="true"></retval>
2662
		</method>
2663
		<method selector="touchesBeganWithEvent:" swt_gen="true">
2664
			<arg swt_gen="true"></arg>
2665
			<retval swt_gen="true"></retval>
2666
		</method>
2667
		<method selector="touchesCancelledWithEvent:" swt_gen="true">
2668
			<arg swt_gen="true"></arg>
2669
			<retval swt_gen="true"></retval>
2670
		</method>
2671
		<method selector="touchesEndedWithEvent:" swt_gen="true">
2672
			<arg swt_gen="true"></arg>
2673
			<retval swt_gen="true"></retval>
2674
		</method>
2675
		<method selector="touchesMovedWithEvent:" swt_gen="true">
2676
			<arg swt_gen="true"></arg>
2677
			<retval swt_gen="true"></retval>
2678
		</method>
2632
		<method selector="validRequestorForSendType:returnType:" swt_gen="true">
2679
		<method selector="validRequestorForSendType:returnType:" swt_gen="true">
2633
			<arg swt_gen="true"></arg>
2680
			<arg swt_gen="true"></arg>
2634
			<arg swt_gen="true"></arg>
2681
			<arg swt_gen="true"></arg>
Lines 3707-3712 Link Here
3707
	</class>
3754
	</class>
3708
	<class name="NSToolbarItemGroup" swt_superclass="NSToolbarItem">
3755
	<class name="NSToolbarItemGroup" swt_superclass="NSToolbarItem">
3709
	</class>
3756
	</class>
3757
	<class name="NSTouch" swt_gen="true">
3758
		<method selector="device" swt_gen="true">
3759
			<retval swt_gen="true"></retval>
3760
		</method>
3761
		<method selector="deviceSize" swt_gen="true">
3762
			<retval swt_gen="true"></retval>
3763
		</method>
3764
		<method selector="isResting" swt_gen="true">
3765
			<retval swt_gen="true"></retval>
3766
		</method>
3767
		<method selector="normalizedPosition" swt_gen="true">
3768
			<retval swt_gen="true"></retval>
3769
		</method>
3770
		<method selector="phase" swt_gen="true">
3771
			<retval swt_gen="true"></retval>
3772
		</method>
3773
	</class>
3710
	<class name="NSTrackingArea" swt_gen="mixed">
3774
	<class name="NSTrackingArea" swt_gen="mixed">
3711
		<method selector="initWithRect:options:owner:userInfo:" swt_gen="true">
3775
		<method selector="initWithRect:options:owner:userInfo:" swt_gen="true">
3712
			<arg swt_gen="true"></arg>
3776
			<arg swt_gen="true"></arg>
Lines 3931-3936 Link Here
3931
			<arg swt_gen="true"></arg>
3995
			<arg swt_gen="true"></arg>
3932
			<retval swt_gen="true"></retval>
3996
			<retval swt_gen="true"></retval>
3933
		</method>
3997
		</method>
3998
		<method selector="setAcceptsTouchEvents:" swt_gen="true">
3999
			<arg swt_gen="true"></arg>
4000
			<retval swt_gen="true"></retval>
4001
		</method>
3934
		<method selector="setAutoresizesSubviews:" swt_gen="true">
4002
		<method selector="setAutoresizesSubviews:" swt_gen="true">
3935
			<arg swt_gen="true"></arg>
4003
			<arg swt_gen="true"></arg>
3936
			<retval swt_gen="true"></retval>
4004
			<retval swt_gen="true"></retval>
Lines 3975-3980 Link Here
3975
			<arg swt_gen="true"></arg>
4043
			<arg swt_gen="true"></arg>
3976
			<retval swt_gen="true"></retval>
4044
			<retval swt_gen="true"></retval>
3977
		</method>
4045
		</method>
4046
		<method selector="setWantsRestingTouches:" swt_gen="true">
4047
			<arg swt_gen="true"></arg>
4048
			<retval swt_gen="true"></retval>
4049
		</method>
3978
		<method selector="shouldDelayWindowOrderingForEvent:" swt_gen="true">
4050
		<method selector="shouldDelayWindowOrderingForEvent:" swt_gen="true">
3979
			<arg swt_gen="true"></arg>
4051
			<arg swt_gen="true"></arg>
3980
			<retval swt_gen="true"></retval>
4052
			<retval swt_gen="true"></retval>
Lines 4614-4619 Link Here
4614
	<enum name="NSDragOperationNone" swt_gen="true"></enum>
4686
	<enum name="NSDragOperationNone" swt_gen="true"></enum>
4615
	<enum name="NSEnterCharacter" swt_gen="true"></enum>
4687
	<enum name="NSEnterCharacter" swt_gen="true"></enum>
4616
	<enum name="NSEvenOddWindingRule" swt_gen="true"></enum>
4688
	<enum name="NSEvenOddWindingRule" swt_gen="true"></enum>
4689
	<enum name="NSEventTypeBeginGesture" swt_gen="true"></enum>
4690
	<enum name="NSEventTypeEndGesture" swt_gen="true"></enum>
4691
	<enum name="NSEventTypeGesture" swt_gen="true"></enum>
4692
	<enum name="NSEventTypeMagnify" swt_gen="true"></enum>
4693
	<enum name="NSEventTypeRotate" swt_gen="true"></enum>
4694
	<enum name="NSEventTypeSwipe" swt_gen="true"></enum>
4617
	<enum name="NSFileHandlingPanelOKButton" swt_gen="true"></enum>
4695
	<enum name="NSFileHandlingPanelOKButton" swt_gen="true"></enum>
4618
	<enum name="NSFlagsChanged" swt_gen="true"></enum>
4696
	<enum name="NSFlagsChanged" swt_gen="true"></enum>
4619
	<enum name="NSFocusRingTypeNone" swt_gen="true"></enum>
4697
	<enum name="NSFocusRingTypeNone" swt_gen="true"></enum>
Lines 4733-4738 Link Here
4733
	<enum name="NSTextFieldDatePickerStyle" swt_gen="true"></enum>
4811
	<enum name="NSTextFieldDatePickerStyle" swt_gen="true"></enum>
4734
	<enum name="NSTitledWindowMask" swt_gen="true"></enum>
4812
	<enum name="NSTitledWindowMask" swt_gen="true"></enum>
4735
	<enum name="NSToolbarDisplayModeIconOnly" swt_gen="true"></enum>
4813
	<enum name="NSToolbarDisplayModeIconOnly" swt_gen="true"></enum>
4814
	<enum name="NSTouchEventSubtype" swt_gen="true"></enum>
4815
	<enum name="NSTouchPhaseAny" swt_gen="true"></enum>
4816
	<enum name="NSTouchPhaseBegan" swt_gen="true"></enum>
4817
	<enum name="NSTouchPhaseCancelled" swt_gen="true"></enum>
4818
	<enum name="NSTouchPhaseEnded" swt_gen="true"></enum>
4819
	<enum name="NSTouchPhaseMoved" swt_gen="true"></enum>
4820
	<enum name="NSTouchPhaseStationary" swt_gen="true"></enum>
4821
	<enum name="NSTouchPhaseTouching" swt_gen="true"></enum>
4736
	<enum name="NSUnderlineStyleDouble" swt_gen="true"></enum>
4822
	<enum name="NSUnderlineStyleDouble" swt_gen="true"></enum>
4737
	<enum name="NSUnderlineStyleNone" swt_gen="true"></enum>
4823
	<enum name="NSUnderlineStyleNone" swt_gen="true"></enum>
4738
	<enum name="NSUnderlineStyleSingle" swt_gen="true"></enum>
4824
	<enum name="NSUnderlineStyleSingle" swt_gen="true"></enum>
(-)Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras (+3 lines)
Lines 767-772 Link Here
767
	<class name="NSScriptClassDescription" swt_superclass="NSClassDescription">
767
	<class name="NSScriptClassDescription" swt_superclass="NSClassDescription">
768
	</class>
768
	</class>
769
	<class name="NSSet" swt_gen="mixed">
769
	<class name="NSSet" swt_gen="mixed">
770
		<method selector="allObjects" swt_gen="true">
771
			<retval swt_gen="true"></retval>
772
		</method>
770
		<method selector="count" swt_gen="true">
773
		<method selector="count" swt_gen="true">
771
			<retval swt_gen="true"></retval>
774
			<retval swt_gen="true"></retval>
772
		</method>
775
		</method>
(-)Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSEvent.java (+13 lines)
Lines 69-74 Link Here
69
	return result;
69
	return result;
70
}
70
}
71
71
72
public float /*double*/ magnification() {
73
	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_magnification);
74
}
75
72
public int /*long*/ modifierFlags() {
76
public int /*long*/ modifierFlags() {
73
	return OS.objc_msgSend(this.id, OS.sel_modifierFlags);
77
	return OS.objc_msgSend(this.id, OS.sel_modifierFlags);
74
}
78
}
Lines 84-93 Link Here
84
	return result != 0 ? new NSEvent(result) : null;
88
	return result != 0 ? new NSEvent(result) : null;
85
}
89
}
86
90
91
public float rotation() {
92
	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_rotation);
93
}
94
87
public double timestamp() {
95
public double timestamp() {
88
	return OS.objc_msgSend_fpret(this.id, OS.sel_timestamp);
96
	return OS.objc_msgSend_fpret(this.id, OS.sel_timestamp);
89
}
97
}
90
98
99
public NSSet touchesMatchingPhase(int /*long*/ phase, NSView view) {
100
	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_touchesMatchingPhase_inView_, phase, view != null ? view.id : 0);
101
	return result != 0 ? new NSSet(result) : null;
102
}
103
91
public int /*long*/ type() {
104
public int /*long*/ type() {
92
	return OS.objc_msgSend(this.id, OS.sel_type);
105
	return OS.objc_msgSend(this.id, OS.sel_type);
93
}
106
}
(-)Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSResponder.java (+36 lines)
Lines 32-37 Link Here
32
	return OS.objc_msgSend_bool(this.id, OS.sel_becomeFirstResponder);
32
	return OS.objc_msgSend_bool(this.id, OS.sel_becomeFirstResponder);
33
}
33
}
34
34
35
public void beginGestureWithEvent(NSEvent event) {
36
	OS.objc_msgSend(this.id, OS.sel_beginGestureWithEvent_, event != null ? event.id : 0);
37
}
38
35
public void cancelOperation(id sender) {
39
public void cancelOperation(id sender) {
36
	OS.objc_msgSend(this.id, OS.sel_cancelOperation_, sender != null ? sender.id : 0);
40
	OS.objc_msgSend(this.id, OS.sel_cancelOperation_, sender != null ? sender.id : 0);
37
}
41
}
Lines 44-49 Link Here
44
	OS.objc_msgSend(this.id, OS.sel_doCommandBySelector_, aSelector);
48
	OS.objc_msgSend(this.id, OS.sel_doCommandBySelector_, aSelector);
45
}
49
}
46
50
51
public void endGestureWithEvent(NSEvent event) {
52
	OS.objc_msgSend(this.id, OS.sel_endGestureWithEvent_, event != null ? event.id : 0);
53
}
54
47
public void flagsChanged(NSEvent theEvent) {
55
public void flagsChanged(NSEvent theEvent) {
48
	OS.objc_msgSend(this.id, OS.sel_flagsChanged_, theEvent != null ? theEvent.id : 0);
56
	OS.objc_msgSend(this.id, OS.sel_flagsChanged_, theEvent != null ? theEvent.id : 0);
49
}
57
}
Lines 68-73 Link Here
68
	OS.objc_msgSend(this.id, OS.sel_keyUp_, theEvent != null ? theEvent.id : 0);
76
	OS.objc_msgSend(this.id, OS.sel_keyUp_, theEvent != null ? theEvent.id : 0);
69
}
77
}
70
78
79
public void magnifyWithEvent(NSEvent event) {
80
	OS.objc_msgSend(this.id, OS.sel_magnifyWithEvent_, event != null ? event.id : 0);
81
}
82
71
public void mouseDown(NSEvent theEvent) {
83
public void mouseDown(NSEvent theEvent) {
72
	OS.objc_msgSend(this.id, OS.sel_mouseDown_, theEvent != null ? theEvent.id : 0);
84
	OS.objc_msgSend(this.id, OS.sel_mouseDown_, theEvent != null ? theEvent.id : 0);
73
}
85
}
Lines 148-157 Link Here
148
	OS.objc_msgSend(this.id, OS.sel_rightMouseUp_, theEvent != null ? theEvent.id : 0);
160
	OS.objc_msgSend(this.id, OS.sel_rightMouseUp_, theEvent != null ? theEvent.id : 0);
149
}
161
}
150
162
163
public void rotateWithEvent(NSEvent event) {
164
	OS.objc_msgSend(this.id, OS.sel_rotateWithEvent_, event != null ? event.id : 0);
165
}
166
151
public void scrollWheel(NSEvent theEvent) {
167
public void scrollWheel(NSEvent theEvent) {
152
	OS.objc_msgSend(this.id, OS.sel_scrollWheel_, theEvent != null ? theEvent.id : 0);
168
	OS.objc_msgSend(this.id, OS.sel_scrollWheel_, theEvent != null ? theEvent.id : 0);
153
}
169
}
154
170
171
public void swipeWithEvent(NSEvent event) {
172
	OS.objc_msgSend(this.id, OS.sel_swipeWithEvent_, event != null ? event.id : 0);
173
}
174
175
public void touchesBeganWithEvent(NSEvent event) {
176
	OS.objc_msgSend(this.id, OS.sel_touchesBeganWithEvent_, event != null ? event.id : 0);
177
}
178
179
public void touchesCancelledWithEvent(NSEvent event) {
180
	OS.objc_msgSend(this.id, OS.sel_touchesCancelledWithEvent_, event != null ? event.id : 0);
181
}
182
183
public void touchesEndedWithEvent(NSEvent event) {
184
	OS.objc_msgSend(this.id, OS.sel_touchesEndedWithEvent_, event != null ? event.id : 0);
185
}
186
187
public void touchesMovedWithEvent(NSEvent event) {
188
	OS.objc_msgSend(this.id, OS.sel_touchesMovedWithEvent_, event != null ? event.id : 0);
189
}
190
155
public id validRequestorForSendType(NSString sendType, NSString returnType) {
191
public id validRequestorForSendType(NSString sendType, NSString returnType) {
156
	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_validRequestorForSendType_returnType_, sendType != null ? sendType.id : 0, returnType != null ? returnType.id : 0);
192
	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_validRequestorForSendType_returnType_, sendType != null ? sendType.id : 0, returnType != null ? returnType.id : 0);
157
	return result != 0 ? new id(result) : null;
193
	return result != 0 ? new id(result) : null;
(-)Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSet.java (-1 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 24-29 Link Here
24
	super(id);
24
	super(id);
25
}
25
}
26
26
27
public NSArray allObjects() {
28
	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_allObjects);
29
	return result != 0 ? new NSArray(result) : null;
30
}
31
27
public int /*long*/ count() {
32
public int /*long*/ count() {
28
	return OS.objc_msgSend(this.id, OS.sel_count);
33
	return OS.objc_msgSend(this.id, OS.sel_count);
29
}
34
}
(-)Eclipse (+52 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *    IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.swt.internal.cocoa;
12
13
public class NSTouch extends NSObject {
14
15
public NSTouch() {
16
	super();
17
}
18
19
public NSTouch(int /*long*/ id) {
20
	super(id);
21
}
22
23
public NSTouch(id id) {
24
	super(id);
25
}
26
27
public id device() {
28
	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_device);
29
	return result != 0 ? new id(result) : null;
30
}
31
32
public NSSize deviceSize() {
33
	NSSize result = new NSSize();
34
	OS.objc_msgSend_stret(result, this.id, OS.sel_deviceSize);
35
	return result;
36
}
37
38
public boolean isResting() {
39
	return OS.objc_msgSend_bool(this.id, OS.sel_isResting);
40
}
41
42
public NSPoint normalizedPosition() {
43
	NSPoint result = new NSPoint();
44
	OS.objc_msgSend_stret(result, this.id, OS.sel_normalizedPosition);
45
	return result;
46
}
47
48
public int /*long*/ phase() {
49
	return OS.objc_msgSend(this.id, OS.sel_phase);
50
}
51
52
}
(-)Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java (+8 lines)
Lines 239-244 Link Here
239
	return OS.objc_msgSend_bool(this.id, OS.sel_scrollRectToVisible_, aRect);
239
	return OS.objc_msgSend_bool(this.id, OS.sel_scrollRectToVisible_, aRect);
240
}
240
}
241
241
242
public void setAcceptsTouchEvents(boolean flag) {
243
	OS.objc_msgSend(this.id, OS.sel_setAcceptsTouchEvents_, flag);
244
}
245
242
public void setAutoresizesSubviews(boolean flag) {
246
public void setAutoresizesSubviews(boolean flag) {
243
	OS.objc_msgSend(this.id, OS.sel_setAutoresizesSubviews_, flag);
247
	OS.objc_msgSend(this.id, OS.sel_setAutoresizesSubviews_, flag);
244
}
248
}
Lines 283-288 Link Here
283
	OS.objc_msgSend(this.id, OS.sel_setToolTip_, string != null ? string.id : 0);
287
	OS.objc_msgSend(this.id, OS.sel_setToolTip_, string != null ? string.id : 0);
284
}
288
}
285
289
290
public void setWantsRestingTouches(boolean flag) {
291
	OS.objc_msgSend(this.id, OS.sel_setWantsRestingTouches_, flag);
292
}
293
286
public boolean shouldDelayWindowOrderingForEvent(NSEvent theEvent) {
294
public boolean shouldDelayWindowOrderingForEvent(NSEvent theEvent) {
287
	return OS.objc_msgSend_bool(this.id, OS.sel_shouldDelayWindowOrderingForEvent_, theEvent != null ? theEvent.id : 0);
295
	return OS.objc_msgSend_bool(this.id, OS.sel_shouldDelayWindowOrderingForEvent_, theEvent != null ? theEvent.id : 0);
288
}
296
}
(-)Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java (-1 / +36 lines)
Lines 67-73 Link Here
67
	public static final int kPMDuplexNoTumble = 0x0002;
67
	public static final int kPMDuplexNoTumble = 0x0002;
68
	public static final int kPMDuplexTumble = 0x0003;
68
	public static final int kPMDuplexTumble = 0x0003;
69
69
70
70
	public static final int /*long*/ sel_identity = sel_registerName("identity");
71
	public static final int /*long*/ sel_sendSearchSelection = sel_registerName("sendSearchSelection");
71
	public static final int /*long*/ sel_sendSearchSelection = sel_registerName("sendSearchSelection");
72
	public static final int /*long*/ sel_sendCancelSelection = sel_registerName("sendCancelSelection");
72
	public static final int /*long*/ sel_sendCancelSelection = sel_registerName("sendCancelSelection");
73
	public static final int /*long*/ sel_sendSelection = sel_registerName("sendSelection");
73
	public static final int /*long*/ sel_sendSelection = sel_registerName("sendSelection");
Lines 787-792 Link Here
787
public static final int /*long*/ class_NSTimer = objc_getClass("NSTimer");
787
public static final int /*long*/ class_NSTimer = objc_getClass("NSTimer");
788
public static final int /*long*/ class_NSToolbar = objc_getClass("NSToolbar");
788
public static final int /*long*/ class_NSToolbar = objc_getClass("NSToolbar");
789
public static final int /*long*/ class_NSToolbarItem = objc_getClass("NSToolbarItem");
789
public static final int /*long*/ class_NSToolbarItem = objc_getClass("NSToolbarItem");
790
public static final int /*long*/ class_NSTouch = objc_getClass("NSTouch");
790
public static final int /*long*/ class_NSTrackingArea = objc_getClass("NSTrackingArea");
791
public static final int /*long*/ class_NSTrackingArea = objc_getClass("NSTrackingArea");
791
public static final int /*long*/ class_NSTypesetter = objc_getClass("NSTypesetter");
792
public static final int /*long*/ class_NSTypesetter = objc_getClass("NSTypesetter");
792
public static final int /*long*/ class_NSURL = objc_getClass("NSURL");
793
public static final int /*long*/ class_NSURL = objc_getClass("NSURL");
Lines 904-909 Link Here
904
public static final int /*long*/ sel_addTypes_owner_ = sel_registerName("addTypes:owner:");
905
public static final int /*long*/ sel_addTypes_owner_ = sel_registerName("addTypes:owner:");
905
public static final int /*long*/ sel_alignment = sel_registerName("alignment");
906
public static final int /*long*/ sel_alignment = sel_registerName("alignment");
906
public static final int /*long*/ sel_allKeys = sel_registerName("allKeys");
907
public static final int /*long*/ sel_allKeys = sel_registerName("allKeys");
908
public static final int /*long*/ sel_allObjects = sel_registerName("allObjects");
907
public static final int /*long*/ sel_alloc = sel_registerName("alloc");
909
public static final int /*long*/ sel_alloc = sel_registerName("alloc");
908
public static final int /*long*/ sel_allowsColumnReordering = sel_registerName("allowsColumnReordering");
910
public static final int /*long*/ sel_allowsColumnReordering = sel_registerName("allowsColumnReordering");
909
public static final int /*long*/ sel_allowsFloats = sel_registerName("allowsFloats");
911
public static final int /*long*/ sel_allowsFloats = sel_registerName("allowsFloats");
Lines 958-963 Link Here
958
public static final int /*long*/ sel_becomeKeyWindow = sel_registerName("becomeKeyWindow");
960
public static final int /*long*/ sel_becomeKeyWindow = sel_registerName("becomeKeyWindow");
959
public static final int /*long*/ sel_beginDocument = sel_registerName("beginDocument");
961
public static final int /*long*/ sel_beginDocument = sel_registerName("beginDocument");
960
public static final int /*long*/ sel_beginEditing = sel_registerName("beginEditing");
962
public static final int /*long*/ sel_beginEditing = sel_registerName("beginEditing");
963
public static final int /*long*/ sel_beginGestureWithEvent_ = sel_registerName("beginGestureWithEvent:");
961
public static final int /*long*/ sel_beginPageInRect_atPlacement_ = sel_registerName("beginPageInRect:atPlacement:");
964
public static final int /*long*/ sel_beginPageInRect_atPlacement_ = sel_registerName("beginPageInRect:atPlacement:");
962
public static final int /*long*/ sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_ = sel_registerName("beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:");
965
public static final int /*long*/ sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_ = sel_registerName("beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:");
963
public static final int /*long*/ sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_ = sel_registerName("beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:message:");
966
public static final int /*long*/ sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_ = sel_registerName("beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:message:");
Lines 1137-1143 Link Here
1137
public static final int /*long*/ sel_deselectRow_ = sel_registerName("deselectRow:");
1140
public static final int /*long*/ sel_deselectRow_ = sel_registerName("deselectRow:");
1138
public static final int /*long*/ sel_destroyContext = sel_registerName("destroyContext");
1141
public static final int /*long*/ sel_destroyContext = sel_registerName("destroyContext");
1139
public static final int /*long*/ sel_detail = sel_registerName("detail");
1142
public static final int /*long*/ sel_detail = sel_registerName("detail");
1143
public static final int /*long*/ sel_device = sel_registerName("device");
1140
public static final int /*long*/ sel_deviceDescription = sel_registerName("deviceDescription");
1144
public static final int /*long*/ sel_deviceDescription = sel_registerName("deviceDescription");
1145
public static final int /*long*/ sel_deviceSize = sel_registerName("deviceSize");
1141
public static final int /*long*/ sel_dictionary = sel_registerName("dictionary");
1146
public static final int /*long*/ sel_dictionary = sel_registerName("dictionary");
1142
public static final int /*long*/ sel_dictionaryWithCapacity_ = sel_registerName("dictionaryWithCapacity:");
1147
public static final int /*long*/ sel_dictionaryWithCapacity_ = sel_registerName("dictionaryWithCapacity:");
1143
public static final int /*long*/ sel_dictionaryWithObject_forKey_ = sel_registerName("dictionaryWithObject:forKey:");
1148
public static final int /*long*/ sel_dictionaryWithObject_forKey_ = sel_registerName("dictionaryWithObject:forKey:");
Lines 1202-1207 Link Here
1202
public static final int /*long*/ sel_endDocument = sel_registerName("endDocument");
1207
public static final int /*long*/ sel_endDocument = sel_registerName("endDocument");
1203
public static final int /*long*/ sel_endEditing = sel_registerName("endEditing");
1208
public static final int /*long*/ sel_endEditing = sel_registerName("endEditing");
1204
public static final int /*long*/ sel_endEditingFor_ = sel_registerName("endEditingFor:");
1209
public static final int /*long*/ sel_endEditingFor_ = sel_registerName("endEditingFor:");
1210
public static final int /*long*/ sel_endGestureWithEvent_ = sel_registerName("endGestureWithEvent:");
1205
public static final int /*long*/ sel_endPage = sel_registerName("endPage");
1211
public static final int /*long*/ sel_endPage = sel_registerName("endPage");
1206
public static final int /*long*/ sel_endSheet_returnCode_ = sel_registerName("endSheet:returnCode:");
1212
public static final int /*long*/ sel_endSheet_returnCode_ = sel_registerName("endSheet:returnCode:");
1207
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:");
1213
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:");
Lines 1374-1379 Link Here
1374
public static final int /*long*/ sel_isMiniaturized = sel_registerName("isMiniaturized");
1380
public static final int /*long*/ sel_isMiniaturized = sel_registerName("isMiniaturized");
1375
public static final int /*long*/ sel_isOpaque = sel_registerName("isOpaque");
1381
public static final int /*long*/ sel_isOpaque = sel_registerName("isOpaque");
1376
public static final int /*long*/ sel_isPlanar = sel_registerName("isPlanar");
1382
public static final int /*long*/ sel_isPlanar = sel_registerName("isPlanar");
1383
public static final int /*long*/ sel_isResting = sel_registerName("isResting");
1377
public static final int /*long*/ sel_isRowSelected_ = sel_registerName("isRowSelected:");
1384
public static final int /*long*/ sel_isRowSelected_ = sel_registerName("isRowSelected:");
1378
public static final int /*long*/ sel_isRunning = sel_registerName("isRunning");
1385
public static final int /*long*/ sel_isRunning = sel_registerName("isRunning");
1379
public static final int /*long*/ sel_isSessionOnly = sel_registerName("isSessionOnly");
1386
public static final int /*long*/ sel_isSessionOnly = sel_registerName("isSessionOnly");
Lines 1413-1418 Link Here
1413
public static final int /*long*/ sel_locationInWindow = sel_registerName("locationInWindow");
1420
public static final int /*long*/ sel_locationInWindow = sel_registerName("locationInWindow");
1414
public static final int /*long*/ sel_lockFocus = sel_registerName("lockFocus");
1421
public static final int /*long*/ sel_lockFocus = sel_registerName("lockFocus");
1415
public static final int /*long*/ sel_lowercaseString = sel_registerName("lowercaseString");
1422
public static final int /*long*/ sel_lowercaseString = sel_registerName("lowercaseString");
1423
public static final int /*long*/ sel_magnification = sel_registerName("magnification");
1424
public static final int /*long*/ sel_magnifyWithEvent_ = sel_registerName("magnifyWithEvent:");
1416
public static final int /*long*/ sel_mainBundle = sel_registerName("mainBundle");
1425
public static final int /*long*/ sel_mainBundle = sel_registerName("mainBundle");
1417
public static final int /*long*/ sel_mainFrame = sel_registerName("mainFrame");
1426
public static final int /*long*/ sel_mainFrame = sel_registerName("mainFrame");
1418
public static final int /*long*/ sel_mainMenu = sel_registerName("mainMenu");
1427
public static final int /*long*/ sel_mainMenu = sel_registerName("mainMenu");
Lines 1469-1474 Link Here
1469
public static final int /*long*/ sel_nextState = sel_registerName("nextState");
1478
public static final int /*long*/ sel_nextState = sel_registerName("nextState");
1470
public static final int /*long*/ sel_nextWordFromIndex_forward_ = sel_registerName("nextWordFromIndex:forward:");
1479
public static final int /*long*/ sel_nextWordFromIndex_forward_ = sel_registerName("nextWordFromIndex:forward:");
1471
public static final int /*long*/ sel_noResponderFor_ = sel_registerName("noResponderFor:");
1480
public static final int /*long*/ sel_noResponderFor_ = sel_registerName("noResponderFor:");
1481
public static final int /*long*/ sel_normalizedPosition = sel_registerName("normalizedPosition");
1472
public static final int /*long*/ sel_noteNumberOfRowsChanged = sel_registerName("noteNumberOfRowsChanged");
1482
public static final int /*long*/ sel_noteNumberOfRowsChanged = sel_registerName("noteNumberOfRowsChanged");
1473
public static final int /*long*/ sel_numberOfColumns = sel_registerName("numberOfColumns");
1483
public static final int /*long*/ sel_numberOfColumns = sel_registerName("numberOfColumns");
1474
public static final int /*long*/ sel_numberOfComponents = sel_registerName("numberOfComponents");
1484
public static final int /*long*/ sel_numberOfComponents = sel_registerName("numberOfComponents");
Lines 1548-1553 Link Here
1548
public static final int /*long*/ sel_performKeyEquivalent_ = sel_registerName("performKeyEquivalent:");
1558
public static final int /*long*/ sel_performKeyEquivalent_ = sel_registerName("performKeyEquivalent:");
1549
public static final int /*long*/ sel_performSelector_withObject_afterDelay_inModes_ = sel_registerName("performSelector:withObject:afterDelay:inModes:");
1559
public static final int /*long*/ sel_performSelector_withObject_afterDelay_inModes_ = sel_registerName("performSelector:withObject:afterDelay:inModes:");
1550
public static final int /*long*/ sel_performSelectorOnMainThread_withObject_waitUntilDone_ = sel_registerName("performSelectorOnMainThread:withObject:waitUntilDone:");
1560
public static final int /*long*/ sel_performSelectorOnMainThread_withObject_waitUntilDone_ = sel_registerName("performSelectorOnMainThread:withObject:waitUntilDone:");
1561
public static final int /*long*/ sel_phase = sel_registerName("phase");
1551
public static final int /*long*/ sel_pixelsHigh = sel_registerName("pixelsHigh");
1562
public static final int /*long*/ sel_pixelsHigh = sel_registerName("pixelsHigh");
1552
public static final int /*long*/ sel_pixelsWide = sel_registerName("pixelsWide");
1563
public static final int /*long*/ sel_pixelsWide = sel_registerName("pixelsWide");
1553
public static final int /*long*/ sel_pointSize = sel_registerName("pointSize");
1564
public static final int /*long*/ sel_pointSize = sel_registerName("pointSize");
Lines 1636-1641 Link Here
1636
public static final int /*long*/ sel_rightMouseDragged_ = sel_registerName("rightMouseDragged:");
1647
public static final int /*long*/ sel_rightMouseDragged_ = sel_registerName("rightMouseDragged:");
1637
public static final int /*long*/ sel_rightMouseUp_ = sel_registerName("rightMouseUp:");
1648
public static final int /*long*/ sel_rightMouseUp_ = sel_registerName("rightMouseUp:");
1638
public static final int /*long*/ sel_rotateByDegrees_ = sel_registerName("rotateByDegrees:");
1649
public static final int /*long*/ sel_rotateByDegrees_ = sel_registerName("rotateByDegrees:");
1650
public static final int /*long*/ sel_rotateWithEvent_ = sel_registerName("rotateWithEvent:");
1651
public static final int /*long*/ sel_rotation = sel_registerName("rotation");
1639
public static final int /*long*/ sel_rowAtPoint_ = sel_registerName("rowAtPoint:");
1652
public static final int /*long*/ sel_rowAtPoint_ = sel_registerName("rowAtPoint:");
1640
public static final int /*long*/ sel_rowForItem_ = sel_registerName("rowForItem:");
1653
public static final int /*long*/ sel_rowForItem_ = sel_registerName("rowForItem:");
1641
public static final int /*long*/ sel_rowHeight = sel_registerName("rowHeight");
1654
public static final int /*long*/ sel_rowHeight = sel_registerName("rowHeight");
Lines 1692-1697 Link Here
1692
public static final int /*long*/ sel_separatorItem = sel_registerName("separatorItem");
1705
public static final int /*long*/ sel_separatorItem = sel_registerName("separatorItem");
1693
public static final int /*long*/ sel_set = sel_registerName("set");
1706
public static final int /*long*/ sel_set = sel_registerName("set");
1694
public static final int /*long*/ sel_setAcceptsMouseMovedEvents_ = sel_registerName("setAcceptsMouseMovedEvents:");
1707
public static final int /*long*/ sel_setAcceptsMouseMovedEvents_ = sel_registerName("setAcceptsMouseMovedEvents:");
1708
public static final int /*long*/ sel_setAcceptsTouchEvents_ = sel_registerName("setAcceptsTouchEvents:");
1695
public static final int /*long*/ sel_setAccessoryView_ = sel_registerName("setAccessoryView:");
1709
public static final int /*long*/ sel_setAccessoryView_ = sel_registerName("setAccessoryView:");
1696
public static final int /*long*/ sel_setAction_ = sel_registerName("setAction:");
1710
public static final int /*long*/ sel_setAction_ = sel_registerName("setAction:");
1697
public static final int /*long*/ sel_setAlertStyle_ = sel_registerName("setAlertStyle:");
1711
public static final int /*long*/ sel_setAlertStyle_ = sel_registerName("setAlertStyle:");
Lines 1946-1951 Link Here
1946
public static final int /*long*/ sel_setVerticalScroller_ = sel_registerName("setVerticalScroller:");
1960
public static final int /*long*/ sel_setVerticalScroller_ = sel_registerName("setVerticalScroller:");
1947
public static final int /*long*/ sel_setView_ = sel_registerName("setView:");
1961
public static final int /*long*/ sel_setView_ = sel_registerName("setView:");
1948
public static final int /*long*/ sel_setVisible_ = sel_registerName("setVisible:");
1962
public static final int /*long*/ sel_setVisible_ = sel_registerName("setVisible:");
1963
public static final int /*long*/ sel_setWantsRestingTouches_ = sel_registerName("setWantsRestingTouches:");
1949
public static final int /*long*/ sel_setWidth_ = sel_registerName("setWidth:");
1964
public static final int /*long*/ sel_setWidth_ = sel_registerName("setWidth:");
1950
public static final int /*long*/ sel_setWidth_forSegment_ = sel_registerName("setWidth:forSegment:");
1965
public static final int /*long*/ sel_setWidth_forSegment_ = sel_registerName("setWidth:forSegment:");
1951
public static final int /*long*/ sel_setWidthTracksTextView_ = sel_registerName("setWidthTracksTextView:");
1966
public static final int /*long*/ sel_setWidthTracksTextView_ = sel_registerName("setWidthTracksTextView:");
Lines 2001-2006 Link Here
2001
public static final int /*long*/ sel_subviews = sel_registerName("subviews");
2016
public static final int /*long*/ sel_subviews = sel_registerName("subviews");
2002
public static final int /*long*/ sel_superclass = sel_registerName("superclass");
2017
public static final int /*long*/ sel_superclass = sel_registerName("superclass");
2003
public static final int /*long*/ sel_superview = sel_registerName("superview");
2018
public static final int /*long*/ sel_superview = sel_registerName("superview");
2019
public static final int /*long*/ sel_swipeWithEvent_ = sel_registerName("swipeWithEvent:");
2004
public static final int /*long*/ sel_systemFontOfSize_ = sel_registerName("systemFontOfSize:");
2020
public static final int /*long*/ sel_systemFontOfSize_ = sel_registerName("systemFontOfSize:");
2005
public static final int /*long*/ sel_systemFontSize = sel_registerName("systemFontSize");
2021
public static final int /*long*/ sel_systemFontSize = sel_registerName("systemFontSize");
2006
public static final int /*long*/ sel_systemFontSizeForControlSize_ = sel_registerName("systemFontSizeForControlSize:");
2022
public static final int /*long*/ sel_systemFontSizeForControlSize_ = sel_registerName("systemFontSizeForControlSize:");
Lines 2058-2063 Link Here
2058
public static final int /*long*/ sel_toolbarDidRemoveItem_ = sel_registerName("toolbarDidRemoveItem:");
2074
public static final int /*long*/ sel_toolbarDidRemoveItem_ = sel_registerName("toolbarDidRemoveItem:");
2059
public static final int /*long*/ sel_toolbarSelectableItemIdentifiers_ = sel_registerName("toolbarSelectableItemIdentifiers:");
2075
public static final int /*long*/ sel_toolbarSelectableItemIdentifiers_ = sel_registerName("toolbarSelectableItemIdentifiers:");
2060
public static final int /*long*/ sel_toolbarWillAddItem_ = sel_registerName("toolbarWillAddItem:");
2076
public static final int /*long*/ sel_toolbarWillAddItem_ = sel_registerName("toolbarWillAddItem:");
2077
public static final int /*long*/ sel_touchesBeganWithEvent_ = sel_registerName("touchesBeganWithEvent:");
2078
public static final int /*long*/ sel_touchesCancelledWithEvent_ = sel_registerName("touchesCancelledWithEvent:");
2079
public static final int /*long*/ sel_touchesEndedWithEvent_ = sel_registerName("touchesEndedWithEvent:");
2080
public static final int /*long*/ sel_touchesMatchingPhase_inView_ = sel_registerName("touchesMatchingPhase:inView:");
2081
public static final int /*long*/ sel_touchesMovedWithEvent_ = sel_registerName("touchesMovedWithEvent:");
2061
public static final int /*long*/ sel_trackingAreas = sel_registerName("trackingAreas");
2082
public static final int /*long*/ sel_trackingAreas = sel_registerName("trackingAreas");
2062
public static final int /*long*/ sel_traitsOfFont_ = sel_registerName("traitsOfFont:");
2083
public static final int /*long*/ sel_traitsOfFont_ = sel_registerName("traitsOfFont:");
2063
public static final int /*long*/ sel_transform = sel_registerName("transform");
2084
public static final int /*long*/ sel_transform = sel_registerName("transform");
Lines 2216-2221 Link Here
2216
public static final int NSDragOperationNone = 0;
2237
public static final int NSDragOperationNone = 0;
2217
public static final int NSEnterCharacter = 3;
2238
public static final int NSEnterCharacter = 3;
2218
public static final int NSEvenOddWindingRule = 1;
2239
public static final int NSEvenOddWindingRule = 1;
2240
public static final int NSEventTypeBeginGesture = 19;
2241
public static final int NSEventTypeEndGesture = 20;
2242
public static final int NSEventTypeGesture = 29;
2243
public static final int NSEventTypeMagnify = 30;
2244
public static final int NSEventTypeRotate = 18;
2245
public static final int NSEventTypeSwipe = 31;
2219
public static final int NSFileHandlingPanelOKButton = 1;
2246
public static final int NSFileHandlingPanelOKButton = 1;
2220
public static final int NSFlagsChanged = 12;
2247
public static final int NSFlagsChanged = 12;
2221
public static final int NSFocusRingTypeNone = 1;
2248
public static final int NSFocusRingTypeNone = 1;
Lines 2335-2340 Link Here
2335
public static final int NSTextFieldDatePickerStyle = 2;
2362
public static final int NSTextFieldDatePickerStyle = 2;
2336
public static final int NSTitledWindowMask = 1;
2363
public static final int NSTitledWindowMask = 1;
2337
public static final int NSToolbarDisplayModeIconOnly = 2;
2364
public static final int NSToolbarDisplayModeIconOnly = 2;
2365
public static final int NSTouchEventSubtype = 3;
2366
public static final int NSTouchPhaseAny = -1;
2367
public static final int NSTouchPhaseBegan = 1;
2368
public static final int NSTouchPhaseCancelled = 16;
2369
public static final int NSTouchPhaseEnded = 8;
2370
public static final int NSTouchPhaseMoved = 2;
2371
public static final int NSTouchPhaseStationary = 4;
2372
public static final int NSTouchPhaseTouching = 7;
2338
public static final int NSUnderlineStyleDouble = 9;
2373
public static final int NSUnderlineStyleDouble = 9;
2339
public static final int NSUnderlineStyleNone = 0;
2374
public static final int NSUnderlineStyleNone = 0;
2340
public static final int NSUnderlineStyleSingle = 1;
2375
public static final int NSUnderlineStyleSingle = 1;
(-)Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java (+8 lines)
Lines 943-948 Link Here
943
			float /*double*/ delta = nsEvent.deltaY();
943
			float /*double*/ delta = nsEvent.deltaY();
944
			if (delta != 0) {
944
			if (delta != 0) {
945
				boolean doit = true;
945
				boolean doit = true;
946
				if (display.gestureStarted) {
947
					if (!sendGestureEvent(nsEvent, SWT.GESTURE_PAN, SWT.VERTICAL, true)) doit = false;						
948
				}
946
				if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) {
949
				if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) {
947
					doit = sendMouseEvent(nsEvent, SWT.MouseWheel, true);
950
					doit = sendMouseEvent(nsEvent, SWT.MouseWheel, true);
948
				}
951
				}
Lines 959-967 Link Here
959
				}
962
				}
960
				if (!doit) handled = true;
963
				if (!doit) handled = true;
961
			}
964
			}
965
962
			delta = nsEvent.deltaX ();
966
			delta = nsEvent.deltaX ();
963
			if (delta != 0) {
967
			if (delta != 0) {
964
				boolean doit = true;
968
				boolean doit = true;
969
				if (display.gestureStarted) {
970
					if (!sendGestureEvent(nsEvent, SWT.GESTURE_PAN, SWT.HORIZONTAL, false)) doit = false;
971
				} 
972
965
				if (hooks (SWT.MouseHorizontalWheel) || filters (SWT.MouseHorizontalWheel)) {
973
				if (hooks (SWT.MouseHorizontalWheel) || filters (SWT.MouseHorizontalWheel)) {
966
					doit = sendMouseEvent(nsEvent, SWT.MouseHorizontalWheel, true);
974
					doit = sendMouseEvent(nsEvent, SWT.MouseHorizontalWheel, true);
967
				}
975
				}
(-)Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java (-2 / +159 lines)
Lines 402-407 Link Here
402
 *
402
 *
403
 * @see HelpListener
403
 * @see HelpListener
404
 * @see #removeHelpListener
404
 * @see #removeHelpListener
405
 * @since 3.7
406
 */
407
public void addGestureListener (GestureListener listener) {
408
	checkWidget();
409
	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
410
	TypedListener typedListener = new TypedListener (listener);
411
	addListener (SWT.Gesture, typedListener);
412
}
413
414
/**
415
 * Adds the listener to the collection of listeners who will
416
 * be notified when help events are generated for the control,
417
 * by sending it one of the messages defined in the
418
 * <code>HelpListener</code> interface.
419
 *
420
 * @param listener the listener which should be notified
421
 *
422
 * @exception IllegalArgumentException <ul>
423
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
424
 * </ul>
425
 * @exception SWTException <ul>
426
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
427
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
428
 * </ul>
429
 *
430
 * @see HelpListener
431
 * @see #removeHelpListener
405
 */
432
 */
406
public void addHelpListener (HelpListener listener) {
433
public void addHelpListener (HelpListener listener) {
407
	checkWidget();
434
	checkWidget();
Lines 658-663 Link Here
658
	return super.becomeFirstResponder (id, sel);
685
	return super.becomeFirstResponder (id, sel);
659
}
686
}
660
687
688
void beginGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
689
	if (!gestureEvent(id, sel, event, SWT.GESTURE_BEGIN)) return;
690
	super.beginGestureWithEvent(id, sel, event);
691
}
692
693
void endGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
694
	if (!gestureEvent(id, sel, event, SWT.GESTURE_END)) return;
695
	super.endGestureWithEvent(id, sel, event);
696
}
697
661
void calculateVisibleRegion (NSView view, int /*long*/ visibleRgn, boolean clipChildren) {
698
void calculateVisibleRegion (NSView view, int /*long*/ visibleRgn, boolean clipChildren) {
662
	int /*long*/ tempRgn = OS.NewRgn ();
699
	int /*long*/ tempRgn = OS.NewRgn ();
663
	if (!view.isHiddenOrHasHiddenAncestor() && isDrawing()) {
700
	if (!view.isHiddenOrHasHiddenAncestor() && isDrawing()) {
Lines 1351-1356 Link Here
1351
	return view.window ().makeFirstResponder (focusView);
1388
	return view.window ().makeFirstResponder (focusView);
1352
}
1389
}
1353
1390
1391
boolean gestureEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event, int detail) {
1392
	// For cross-platform compatibility, touch events and gestures are mutually exclusive.
1393
	// Don't send a gesture if touch events are enabled for this control.
1394
//	if (touchEnabled) return true;
1395
	if (!display.sendEvent) return true;
1396
	display.sendEvent = false;
1397
	if (!isEventView (id)) return true;
1398
	NSEvent nsEvent = new NSEvent(event);
1399
	return sendGestureEvent (nsEvent, detail, true);	
1400
}
1401
1354
/**
1402
/**
1355
 * Returns the accessible object for the receiver.
1403
 * Returns the accessible object for the receiver.
1356
 * If this is the first time this object is requested,
1404
 * If this is the first time this object is requested,
Lines 2193-2198 Link Here
2193
	super.keyUp (id, sel, theEvent);
2241
	super.keyUp (id, sel, theEvent);
2194
}
2242
}
2195
2243
2244
void magnifyWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
2245
	if (!gestureEvent(id, sel, event, SWT.GESTURE_MAGNIFY)) return;
2246
	super.magnifyWithEvent(id, sel, event);	
2247
}
2248
2196
void markLayout (boolean changed, boolean all) {
2249
void markLayout (boolean changed, boolean all) {
2197
	/* Do nothing */
2250
	/* Do nothing */
2198
}
2251
}
Lines 2229-2244 Link Here
2229
void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
2282
void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
2230
	boolean handled = false;
2283
	boolean handled = false;
2231
	if (id == view.id) {
2284
	if (id == view.id) {
2285
		NSEvent nsEvent = new NSEvent(theEvent);
2286
		if (display.gestureStarted && hooks(SWT.Gesture)) {
2287
			if (!sendGestureEvent(nsEvent, SWT.GESTURE_PAN, SWT.VERTICAL, true)) {
2288
				handled = true;						
2289
			}
2290
		}
2232
		if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) {
2291
		if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) {
2233
			NSEvent nsEvent = new NSEvent(theEvent);
2234
			if (nsEvent.deltaY() != 0) {
2292
			if (nsEvent.deltaY() != 0) {
2235
				if (!sendMouseEvent(nsEvent, SWT.MouseWheel, true)) {
2293
				if (!sendMouseEvent(nsEvent, SWT.MouseWheel, true)) {
2236
					handled = true;
2294
					handled = true;
2237
				}
2295
				}
2238
			}
2296
			}
2239
		}
2297
		}
2298
		if (display.gestureStarted && hooks(SWT.Gesture)) {
2299
			if (!sendGestureEvent(nsEvent, SWT.GESTURE_PAN, SWT.HORIZONTAL, true)) {
2300
				handled = true;						
2301
			}
2302
		}
2240
		if (hooks (SWT.MouseHorizontalWheel) || filters (SWT.MouseHorizontalWheel)) {
2303
		if (hooks (SWT.MouseHorizontalWheel) || filters (SWT.MouseHorizontalWheel)) {
2241
			NSEvent nsEvent = new NSEvent(theEvent);
2242
			if (nsEvent.deltaX() != 0) {
2304
			if (nsEvent.deltaX() != 0) {
2243
				if (!sendMouseEvent(nsEvent, SWT.MouseHorizontalWheel, true)) {
2305
				if (!sendMouseEvent(nsEvent, SWT.MouseHorizontalWheel, true)) {
2244
					handled = true;
2306
					handled = true;
Lines 2728-2733 Link Here
2728
2790
2729
/**
2791
/**
2730
 * Removes the listener from the collection of listeners who will
2792
 * Removes the listener from the collection of listeners who will
2793
 * be notified when a gesture is performed on the control
2794
 *
2795
 * @param listener the listener which should no longer be notified
2796
 *
2797
 * @exception IllegalArgumentException <ul>
2798
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
2799
 * </ul>
2800
 * @exception SWTException <ul>
2801
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
2802
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
2803
 * </ul>
2804
 *
2805
 * @see GestureListener
2806
 * @see #addGestureListener
2807
 * @since 3.7
2808
 */
2809
public void removeGestureListener (GestureListener listener) {
2810
	checkWidget();
2811
	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
2812
	if (eventTable == null) return;
2813
	eventTable.unhook(SWT.Gesture, listener);
2814
}
2815
2816
2817
/**
2818
 * Removes the listener from the collection of listeners who will
2731
 * be notified when the help events are generated for the control.
2819
 * be notified when the help events are generated for the control.
2732
 *
2820
 *
2733
 * @param listener the listener which should no longer be notified
2821
 * @param listener the listener which should no longer be notified
Lines 2994-2999 Link Here
2994
	sendEvent (SWT.Resize);
3082
	sendEvent (SWT.Resize);
2995
}
3083
}
2996
3084
3085
void rotateWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
3086
	if (!gestureEvent(id, sel, event, SWT.GESTURE_ROTATE)) return;
3087
	super.rotateWithEvent(id, sel, event);	
3088
}
3089
2997
boolean sendDragEvent (int button, int stateMask, int x, int y) {
3090
boolean sendDragEvent (int button, int stateMask, int x, int y) {
2998
	Event event = new Event ();
3091
	Event event = new Event ();
2999
	event.button = button;
3092
	event.button = button;
Lines 3035-3040 Link Here
3035
	}
3128
	}
3036
}
3129
}
3037
3130
3131
boolean sendGestureEvent (NSEvent nsEvent, int detail, boolean send) {
3132
	return sendGestureEvent(nsEvent, detail, 0, send);
3133
}
3134
3135
boolean sendGestureEvent (NSEvent nsEvent, int detail, int orientation, boolean send) {
3136
	Event event = new Event ();
3137
	NSPoint windowPoint;
3138
	NSView view = eventView ();
3139
	windowPoint = nsEvent.locationInWindow();
3140
	NSPoint point = view.convertPoint_fromView_(windowPoint, null);
3141
	if (!view.isFlipped ()) {
3142
		point.y = view.bounds().height - point.y;
3143
	}
3144
	event.x = (int) point.x;
3145
	event.y = (int) point.y;
3146
	setInputState (event, nsEvent, SWT.Gesture);
3147
	event.detail = detail;
3148
3149
	if (detail == SWT.GESTURE_BEGIN) {
3150
		display.gestureStarted = true;
3151
		display.rotation = 0.0;
3152
		display.magnification = 1.0;
3153
	} else if (detail == SWT.GESTURE_END) {
3154
		display.gestureStarted = false;
3155
	}
3156
	
3157
	switch (detail) {	
3158
	case SWT.GESTURE_SWIPE:
3159
		event.xDirection = (int) -nsEvent.deltaX();
3160
		event.yDirection = (int) -nsEvent.deltaY();
3161
		break;
3162
	case SWT.GESTURE_ROTATE: {	
3163
		display.rotation += nsEvent.rotation();
3164
		event.rotation = display.rotation;
3165
		break;
3166
	}
3167
	case SWT.GESTURE_MAGNIFY:
3168
		display.magnification += nsEvent.magnification();
3169
		event.magnification = display.magnification;
3170
		break;
3171
	case SWT.GESTURE_PAN:
3172
		// Panning increment is expressed in terms of the direction of movement,
3173
		// not in terms of scrolling increment.
3174
		if (orientation == SWT.HORIZONTAL) {
3175
			event.xDirection = (int) -nsEvent.deltaX();
3176
		} else if (orientation == SWT.VERTICAL) {
3177
			event.yDirection = (int) -nsEvent.deltaY();
3178
		} else {
3179
			error(SWT.ERROR_INVALID_ARGUMENT);
3180
		}
3181
		break;
3182
	}
3183
3184
	event.doit = true;
3185
	sendEvent (SWT.Gesture, event);
3186
	if (isDisposed ()) return false;
3187
	return event.doit;
3188
}
3189
3038
boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
3190
boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
3039
	Shell shell = null;
3191
	Shell shell = null;
3040
	Event event = new Event ();
3192
	Event event = new Event ();
Lines 3944-3949 Link Here
3944
	}
4096
	}
3945
}
4097
}
3946
4098
4099
void swipeWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
4100
	if (!gestureEvent(id, sel, event, SWT.GESTURE_SWIPE)) return;
4101
	super.swipeWithEvent(id, sel, event);
4102
}
4103
3947
NSSize textExtent (String string) {
4104
NSSize textExtent (String string) {
3948
	NSAttributedString attribStr = createString(string, null, null, 0, false, true, false);
4105
	NSAttributedString attribStr = createString(string, null, null, 0, false, true, false);
3949
	NSSize size = attribStr.size();
4106
	NSSize size = attribStr.size();
(-)Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java (+34 lines)
Lines 104-109 Link Here
104
	boolean disposing;
104
	boolean disposing;
105
	int sendEventCount;
105
	int sendEventCount;
106
106
107
	/* gesture event state */
108
	double rotation;
109
	double magnification;
110
	boolean gestureStarted;
111
107
	/* Key event management */
112
	/* Key event management */
108
	int [] deadKeyState = new int[1];
113
	int [] deadKeyState = new int[1];
109
	int currentKeyboardUCHRdata;
114
	int currentKeyboardUCHRdata;
Lines 2130-2135 Link Here
2130
		OS.class_addMethod(cls, OS.sel_acceptsFirstMouse_, proc3, "@:@");
2135
		OS.class_addMethod(cls, OS.sel_acceptsFirstMouse_, proc3, "@:@");
2131
		OS.class_addMethod(cls, OS.sel_changeColor_, proc3, "@:@");
2136
		OS.class_addMethod(cls, OS.sel_changeColor_, proc3, "@:@");
2132
		OS.class_addMethod(cls, OS.sel_cancelOperation_, proc3, "@:@");
2137
		OS.class_addMethod(cls, OS.sel_cancelOperation_, proc3, "@:@");
2138
		OS.class_addMethod(cls, OS.sel_touchesBeganWithEvent_, proc3, "@:@");
2139
		OS.class_addMethod(cls, OS.sel_touchesMovedWithEvent_, proc3, "@:@");
2140
		OS.class_addMethod(cls, OS.sel_touchesEndedWithEvent_, proc3, "@:@");
2141
		OS.class_addMethod(cls, OS.sel_touchesCancelledWithEvent_, proc3, "@:@");
2142
		OS.class_addMethod(cls, OS.sel_beginGestureWithEvent_, proc3, "@:@");
2143
		OS.class_addMethod(cls, OS.sel_endGestureWithEvent_, proc3, "@:@");
2144
		OS.class_addMethod(cls, OS.sel_swipeWithEvent_, proc3, "@:@");
2145
		OS.class_addMethod(cls, OS.sel_rotateWithEvent_, proc3, "@:@");
2146
		OS.class_addMethod(cls, OS.sel_magnifyWithEvent_, proc3, "@:@");
2147
		
2133
	}
2148
	}
2134
	if (proc2 != 0) {
2149
	if (proc2 != 0) {
2135
		OS.class_addMethod(cls, OS.sel_resignFirstResponder, proc2, "@:");
2150
		OS.class_addMethod(cls, OS.sel_resignFirstResponder, proc2, "@:");
Lines 4774-4779 Link Here
4774
		case OS.NSKeyDown:
4789
		case OS.NSKeyDown:
4775
		case OS.NSKeyUp:
4790
		case OS.NSKeyUp:
4776
		case OS.NSScrollWheel:
4791
		case OS.NSScrollWheel:
4792
		// TODO:  Add touch detection here...
4777
			if (window != null) {
4793
			if (window != null) {
4778
				Shell shell = (Shell) getWidget (window.id);
4794
				Shell shell = (Shell) getWidget (window.id);
4779
				if (shell != null) {
4795
				if (shell != null) {
Lines 5436-5441 Link Here
5436
		widget.windowDidMiniturize(id, sel, arg0);
5452
		widget.windowDidMiniturize(id, sel, arg0);
5437
	} else if (sel == OS.sel_windowDidDeminiaturize_) {
5453
	} else if (sel == OS.sel_windowDidDeminiaturize_) {
5438
		widget.windowDidDeminiturize(id, sel, arg0);
5454
		widget.windowDidDeminiturize(id, sel, arg0);
5455
	} else if (sel == OS.sel_touchesBeganWithEvent_) {
5456
		widget.touchesBeganWithEvent(id, sel, arg0);
5457
	} else if (sel == OS.sel_touchesMovedWithEvent_) {
5458
		widget.touchesMovedWithEvent(id, sel, arg0);
5459
	} else if (sel == OS.sel_touchesEndedWithEvent_) {
5460
		widget.touchesEndedWithEvent(id, sel, arg0);
5461
	} else if (sel == OS.sel_touchesCancelledWithEvent_) {
5462
		widget.touchesCancelledWithEvent(id, sel, arg0);
5463
	} else if (sel == OS.sel_beginGestureWithEvent_) {
5464
		widget.beginGestureWithEvent(id, sel, arg0);
5465
	} else if (sel == OS.sel_endGestureWithEvent_) {
5466
		widget.endGestureWithEvent(id, sel, arg0);
5467
	} else if (sel == OS.sel_swipeWithEvent_) {
5468
		widget.swipeWithEvent(id, sel, arg0);
5469
	} else if (sel == OS.sel_magnifyWithEvent_) {
5470
		widget.magnifyWithEvent(id, sel, arg0);
5471
	} else if (sel == OS.sel_rotateWithEvent_) {
5472
		widget.rotateWithEvent(id, sel, arg0);
5439
	} else if (sel == OS.sel_toolbarAllowedItemIdentifiers_) {
5473
	} else if (sel == OS.sel_toolbarAllowedItemIdentifiers_) {
5440
		return widget.toolbarAllowedItemIdentifiers(id, sel, arg0);
5474
		return widget.toolbarAllowedItemIdentifiers(id, sel, arg0);
5441
	} else if (sel == OS.sel_toolbarDefaultItemIdentifiers_) {
5475
	} else if (sel == OS.sel_toolbarDefaultItemIdentifiers_) {
(-)Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java (+38 lines)
Lines 1666-1671 Link Here
1666
		case OS.NSScrollWheel:
1666
		case OS.NSScrollWheel:
1667
		case OS.NSKeyDown:
1667
		case OS.NSKeyDown:
1668
		case OS.NSKeyUp:
1668
		case OS.NSKeyUp:
1669
		case OS.NSEventTypeGesture:
1669
			int state = OS.GetCurrentButtonState ();
1670
			int state = OS.GetCurrentButtonState ();
1670
			if ((state & 0x1) != 0) event.stateMask |= SWT.BUTTON1;
1671
			if ((state & 0x1) != 0) event.stateMask |= SWT.BUTTON1;
1671
			if ((state & 0x2) != 0) event.stateMask |= SWT.BUTTON3;
1672
			if ((state & 0x2) != 0) event.stateMask |= SWT.BUTTON3;
Lines 1698-1703 Link Here
1698
			if (event.keyCode == SWT.COMMAND) event.stateMask &= ~SWT.COMMAND;
1699
			if (event.keyCode == SWT.COMMAND) event.stateMask &= ~SWT.COMMAND;
1699
			break;
1700
			break;
1700
		case SWT.KeyUp:
1701
		case SWT.KeyUp:
1702
		case SWT.Gesture:
1701
			if (event.keyCode == SWT.ALT) event.stateMask |= SWT.ALT;
1703
			if (event.keyCode == SWT.ALT) event.stateMask |= SWT.ALT;
1702
			if (event.keyCode == SWT.SHIFT) event.stateMask |= SWT.SHIFT;
1704
			if (event.keyCode == SWT.SHIFT) event.stateMask |= SWT.SHIFT;
1703
			if (event.keyCode == SWT.CONTROL) event.stateMask |= SWT.CONTROL;
1705
			if (event.keyCode == SWT.CONTROL) event.stateMask |= SWT.CONTROL;
Lines 1987-1992 Link Here
1987
	return getName () + " {" + string + "}";
1989
	return getName () + " {" + string + "}";
1988
}
1990
}
1989
1991
1992
void touchesBeganWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
1993
	callSuper(id, sel, event);	
1994
}
1995
1996
void touchesCancelledWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
1997
	callSuper(id, sel, event);	
1998
}
1999
2000
void touchesEndedWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
2001
	callSuper(id, sel, event);	
2002
}
2003
2004
void touchesMovedWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
2005
	callSuper(id, sel, event);	
2006
}
2007
2008
void beginGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
2009
	callSuper(id, sel, event);	
2010
}
2011
2012
void endGestureWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
2013
	callSuper(id, sel, event);	
2014
}
2015
2016
void magnifyWithEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
2017
	callSuper(id, sel, event);	
2018
}
2019
2020
void rotateWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
2021
	callSuper(id, sel, event);	
2022
}
2023
2024
void swipeWithEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
2025
	callSuper(id, sel, event);	
2026
}
2027
1990
void resetCursorRects (int /*long*/ id, int /*long*/ sel) {
2028
void resetCursorRects (int /*long*/ id, int /*long*/ sel) {
1991
	callSuper (id, sel);
2029
	callSuper (id, sel);
1992
}
2030
}

Return to bug 279884