summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorDanny Koernig <[email protected]>2016-11-17 14:38:52 +0100
committerDanny Koernig <[email protected]>2016-11-17 14:38:52 +0100
commitec6d2ca98674804c9e9162dddefda2962b91bf12 (patch)
treea82aa279df735b66f9d5d793c465ec9f2b678371 /src/newt/classes
parent45cc13c4d68fb3137b741cbc39ea653c15db2f66 (diff)
add touch event support for x11 server
Diffstat (limited to 'src/newt/classes')
-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");