summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.classpath1
-rw-r--r--.externalToolBuilders/jogl builder.launch7
-rw-r--r--make/build-jogl.xml4
-rw-r--r--make/build-nativewindow.xml6
-rw-r--r--make/build-newt.xml6
-rwxr-xr-xmake/scripts/make.jogl.all.linux-armv7-cross.sh5
-rwxr-xr-xmake/scripts/make.jogl.all.linux-armv7.sh15
-rw-r--r--src/newt/classes/com/jogamp/newt/event/InputEvent.java57
8 files changed, 73 insertions, 28 deletions
diff --git a/.classpath b/.classpath
index a37a33820..bfec43aac 100644
--- a/.classpath
+++ b/.classpath
@@ -31,5 +31,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/gluegen"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Ant"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/SWT"/>
+ <classpathentry kind="lib" path="/usr/local/android-sdk-linux_x86/platforms/android-8/android.jar"/>
<classpathentry kind="output" path="build/eclipse-classes"/>
</classpath>
diff --git a/.externalToolBuilders/jogl builder.launch b/.externalToolBuilders/jogl builder.launch
index 7c9fe7a24..3c1946ee5 100644
--- a/.externalToolBuilders/jogl builder.launch
+++ b/.externalToolBuilders/jogl builder.launch
@@ -14,8 +14,13 @@
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#10;&lt;memento antHome=&quot;/opt/share/apache-ant-1.8.1&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.extraClasspathEntries&quot;&gt;&#10;&lt;memento/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
+</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jogl"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/jogl/make/build.xml}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index 6586022e1..9747c67cf 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -1093,8 +1093,8 @@
</linker>
<linker id="linker.cfg.linux.armv7.jogl.x11" extends="linker.cfg.linux.armv7">
- <syslibset dir="${gluegen.root}/make/lib/arm-linux-gnueabi/ubuntu-11.04/lib" libs="X11"/>
- <syslibset dir="${gluegen.root}/make/lib/arm-linux-gnueabi/ubuntu-11.04/lib" libs="Xxf86vm" />
+ <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11"/>
+ <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
</linker>
<linker id="linker.cfg.solaris.jogl.x11" extends="linker.cfg.solaris">
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 8428dd88d..2353fd3d8 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -379,9 +379,9 @@
</linker>
<linker id="linker.cfg.linux.armv7.nativewindow.x11" extends="linker.cfg.linux.armv7">
- <syslibset dir="${gluegen.root}/make/lib/arm-linux-gnueabi/ubuntu-11.04/lib" libs="X11"/>
- <syslibset dir="${gluegen.root}/make/lib/arm-linux-gnueabi/ubuntu-11.04/lib" libs="Xxf86vm" />
- <syslibset dir="${gluegen.root}/make/lib/arm-linux-gnueabi/ubuntu-11.04/lib" libs="Xinerama"/>
+ <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11" />
+ <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
+ <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xinerama" />
</linker>
<linker id="linker.cfg.solaris.nativewindow.x11" extends="linker.cfg.solaris">
diff --git a/make/build-newt.xml b/make/build-newt.xml
index 5c12965d6..b0600db10 100644
--- a/make/build-newt.xml
+++ b/make/build-newt.xml
@@ -263,9 +263,9 @@
</linker>
<linker id="linker.cfg.linux.armv7.newt.x11" extends="linker.cfg.linux.armv7">
- <syslibset dir="${gluegen.root}/make/lib/arm-linux-gnueabi/ubuntu-11.04/lib" libs="X11"/>
- <syslibset dir="${gluegen.root}/make/lib/arm-linux-gnueabi/ubuntu-11.04/lib" libs="Xrandr"/>
- <syslibset dir="${gluegen.root}/make/lib/arm-linux-gnueabi/ubuntu-11.04/lib" libs="Xxf86vm" />
+ <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11" />
+ <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xrandr" />
+ <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
</linker>
<linker id="linker.cfg.solaris.newt.x11" extends="linker.cfg.solaris">
diff --git a/make/scripts/make.jogl.all.linux-armv7-cross.sh b/make/scripts/make.jogl.all.linux-armv7-cross.sh
index 2828d357b..bbde79949 100755
--- a/make/scripts/make.jogl.all.linux-armv7-cross.sh
+++ b/make/scripts/make.jogl.all.linux-armv7-cross.sh
@@ -1,6 +1,6 @@
#! /bin/sh
-PATH=`pwd`/../../gluegen/make/lib/linux-x86_64/arm-linux-gnueabi/bin:$PATH
+PATH=`pwd`/../../gluegen/make/lib/linux/arm-linux-gnueabi/bin:$PATH
export PATH
# -Dc.compiler.debug=true
@@ -19,6 +19,9 @@ export TARGET_IP=beagle01
export TARGET_ROOT=/home/jogamp/projects-cross
export TARGET_ANT_HOME=/usr/share/ant
+export TARGET_PLATFORM_LIBS=/opt-linux-armv7-eabi/lib
+export TARGET_JAVA_LIBS=/opt-linux-armv7-eabi/jre/lib/arm
+
ant \
-Drootrel.build=build-linux-armv7 \
-Dgluegen.cpptasks.detected.os=true \
diff --git a/make/scripts/make.jogl.all.linux-armv7.sh b/make/scripts/make.jogl.all.linux-armv7.sh
deleted file mode 100755
index fd4e95b30..000000000
--- a/make/scripts/make.jogl.all.linux-armv7.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-
-# -Dc.compiler.debug=true
-# -Dgluegen.cpptasks.detected.os=true \
-# -DisUnix=true \
-# -DisLinux=true \
-# -DisLinuxX86=true \
-# -DisX11=true \
-
-ant \
- -Drootrel.build=build-linux-armv7 \
- -DuseKD=true \
- -DuseOpenMAX=true \
- -DuseBroadcomEGL=true \
- $* 2>&1 | tee make.jogl.all.linux-armv7.log
diff --git a/src/newt/classes/com/jogamp/newt/event/InputEvent.java b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
index b0df7b4d1..1d13ee505 100644
--- a/src/newt/classes/com/jogamp/newt/event/InputEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
@@ -44,6 +44,9 @@ public abstract class InputEvent extends NEWTEvent
public static final int BUTTON1_MASK = 1 << 6;
public static final int BUTTON2_MASK = 1 << 7;
public static final int BUTTON3_MASK = 1 << 8;
+ public static final int POINTER1_MASK = 1 << 16;
+ public static final int POINTER2_MASK = 1 << 17;
+ public static final int POINTER3_MASK = 1 << 18;
protected InputEvent(int eventType, Object source, long when, int modifiers) {
super(eventType, source, when);
@@ -69,18 +72,66 @@ public abstract class InputEvent extends NEWTEvent
return (modifiers&SHIFT_MASK)!=0;
}
- public boolean isButton1Down() {
+ /**
+ * @return Array of pressed mouse buttons [{@link MouseEvent#BUTTON1} ..].
+ * If none is down, the resulting array is of length 0.
+ */
+ public final int[] getButtonsDown() {
+ int len = 0;
+ if(isButton1Down()) { len++; }
+ if(isButton2Down()) { len++; }
+ if(isButton3Down()) { len++; }
+
+ int[] res = new int[len];
+ int i=0;
+ if(isButton1Down()) { res[i++] = MouseEvent.BUTTON1; }
+ if(isButton2Down()) { res[i++] = MouseEvent.BUTTON2; }
+ if(isButton3Down()) { res[i++] = MouseEvent.BUTTON3; }
+ return res;
+ }
+
+ public final boolean isButton1Down() {
return (modifiers&BUTTON1_MASK)!=0;
}
- public boolean isButton2Down() {
+ public final boolean isButton2Down() {
return (modifiers&BUTTON2_MASK)!=0;
}
- public boolean isButton3Down() {
+ public final boolean isButton3Down() {
return (modifiers&BUTTON3_MASK)!=0;
}
+ /**
+ * @return Array of involved pointer [{@link MouseEvent#POINTER1} ..].
+ * If none is down, the resulting array is of length 0.
+ */
+ public final int[] getPointers() {
+ int len = 0;
+ if(isPointer1()) { len++; }
+ if(isPointer2()) { len++; }
+ if(isPointer3()) { len++; }
+
+ int[] res = new int[len];
+ int i=0;
+ if(isPointer1()) { res[i++] = MouseEvent.POINTER1; }
+ if(isPointer2()) { res[i++] = MouseEvent.POINTER2; }
+ if(isPointer3()) { res[i++] = MouseEvent.POINTER3; }
+ return res;
+ }
+
+ public final boolean isPointer1() {
+ return (modifiers&POINTER1_MASK)!=0;
+ }
+
+ public final boolean isPointer2() {
+ return (modifiers&POINTER2_MASK)!=0;
+ }
+
+ public final boolean isPointer3() {
+ return (modifiers&POINTER3_MASK)!=0;
+ }
+
public String toString() {
return "InputEvent[modifiers:"+modifiers+", "+super.toString()+"]";
}