aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-03-27 00:13:06 +0100
committerGitHub <[email protected]>2019-03-27 00:13:06 +0100
commit92006e4baef57f1f3fb647dd307aed5989fd4c8d (patch)
tree401b140df18dd1870122be63724bc7b850509104 /src/newt/classes/jogamp
parent67620bac176666b7f4c2f7a572ba175b68415141 (diff)
parentec6d2ca98674804c9e9162dddefda2962b91bf12 (diff)
Merge pull request #102 from Yodoga/feature_multitouch_x11_1348
add touch event support for x11 server
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
index 9e1d2869b..468aca654 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
@@ -406,6 +406,20 @@ public class WindowDriver extends WindowImpl {
}
}
+ public final void sendTouchScreenEvent(final short eventType, final int modifiers,
+ final int pActionIdx, final int[] pNames,
+ final int[] pX, final int[] pY, final float[] pPressure, final float maxPressure) {
+ final int pCount = pNames.length;
+ final MouseEvent.PointerType[] pTypes = new MouseEvent.PointerType[pCount];
+ for(int i=0; i<pCount; i++)
+ {
+ pTypes[i] = MouseEvent.PointerType.TouchScreen;
+ }
+ doPointerEvent(false /*enqueue*/, false /*wait*/,
+ pTypes, eventType, modifiers, pActionIdx, true /*normalPNames*/, pNames,
+ pX, pY, pPressure, maxPressure, new float[] { 0f, 0f, 0f} /*rotationXYZ*/, 1f/*rotationScale*/);
+ }
+
@Override
public final void sendKeyEvent(final short eventType, final int modifiers, final short keyCode, final short keySym, final char keyChar) {
throw new InternalError("XXX: Adapt Java Code to Native Code Changes");