summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java74
1 files changed, 0 insertions, 74 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
index 1ad7fea292..5828334bab 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
@@ -1080,80 +1080,6 @@ void sendEvent (int eventType, Event event, boolean send) {
}
}
-boolean sendGestureEvent (GESTUREINFO gi) {
- Event event = new Event ();
- int type = 0;
- POINT point = new POINT ();
- point.x = gi.x;
- point.y = gi.y;
- OS.MapWindowPoints (0, gi.hwndTarget, point, 1);
- event.x = point.x;
- event.y = point.y;
- switch (gi.dwID) {
- case OS.GID_ZOOM:
- type = SWT.Gesture;
- event.detail = SWT.GESTURE_MAGNIFY;
- int fingerDistance = OS.LODWORD (gi.ullArguments);
- if ((gi.dwFlags & OS.GF_BEGIN) != 0) {
- event.detail = SWT.GESTURE_BEGIN;
- display.magStartDistance = display.lastDistance = fingerDistance;
- } else if ((gi.dwFlags & OS.GF_END) != 0) {
- event.detail = SWT.GESTURE_END;
- }
-
- /*
- * The gi.ullArguments is the distance between the fingers.
- * Scale factor is relative to that original value.
- */
- if (fingerDistance == display.lastDistance && event.detail == SWT.GESTURE_MAGNIFY) return false;
- if (fingerDistance != 0) event.magnification = fingerDistance / display.magStartDistance;
- display.lastDistance = fingerDistance;
- break;
- case OS.GID_PAN:
- type = SWT.Gesture;
- event.detail = SWT.GESTURE_PAN;
- if ((gi.dwFlags & OS.GF_BEGIN) != 0) {
- event.detail = SWT.GESTURE_BEGIN;
- display.lastX = point.x;
- display.lastY = point.y;
- } else if ((gi.dwFlags & OS.GF_END) != 0) {
- event.detail = SWT.GESTURE_END;
- }
- if (display.lastX == point.x && display.lastY == point.y && event.detail == SWT.GESTURE_PAN) return false;
- event.xDirection = point.x - display.lastX;
- event.yDirection = point.y - display.lastY;
- display.lastX = point.x;
- display.lastY = point.y;
- break;
- case OS.GID_ROTATE:
- type = SWT.Gesture;
- event.detail = SWT.GESTURE_ROTATE;
- double rotationInRadians = OS.GID_ROTATE_ANGLE_FROM_ARGUMENT (OS.LODWORD (gi.ullArguments));
- if ((gi.dwFlags & OS.GF_BEGIN) != 0) {
- event.detail = SWT.GESTURE_BEGIN;
- display.rotationAngle = rotationInRadians;
- } else if ((gi.dwFlags & OS.GF_END) != 0) {
- event.detail = SWT.GESTURE_END;
- }
-
- /*
- * Feature in Win32. Rotation events are sent even when the fingers are at rest.
- * If the current rotation is the same as the last one received don't send the event.
- */
- if (display.rotationAngle == rotationInRadians && event.detail == SWT.GESTURE_ROTATE) return false;
- event.rotation = rotationInRadians * 180.0 / Compatibility.PI;
- display.rotationAngle = rotationInRadians;
- break;
- default:
- // Unknown gesture -- ignore.
- break;
- }
-
- if (type == 0) return false;
- setInputState (event, type);
- sendEvent (type, event);
- return event.doit;
-}
void sendSelectionEvent (int type) {
sendSelectionEvent (type, null, false);