summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/event/InputEvent.java27
-rw-r--r--src/newt/classes/com/jogamp/newt/event/MouseEvent.java1
2 files changed, 19 insertions, 9 deletions
diff --git a/src/newt/classes/com/jogamp/newt/event/InputEvent.java b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
index 40a5c84a8..dcbd1eb94 100644
--- a/src/newt/classes/com/jogamp/newt/event/InputEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
@@ -34,16 +34,19 @@
package com.jogamp.newt.event;
+@SuppressWarnings("serial")
public abstract class InputEvent extends NEWTEvent
{
- public static final int SHIFT_MASK = 1 << 0;
- public static final int CTRL_MASK = 1 << 1;
- public static final int META_MASK = 1 << 2;
- public static final int ALT_MASK = 1 << 3;
- public static final int ALT_GRAPH_MASK = 1 << 5;
- 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 SHIFT_MASK = 1 << 0;
+ public static final int CTRL_MASK = 1 << 1;
+ public static final int META_MASK = 1 << 2;
+ public static final int ALT_MASK = 1 << 3;
+ public static final int ALT_GRAPH_MASK = 1 << 5;
+ 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 CONFINED_MASK = 1 << 16;
+ public static final int INVISIBLE_MASK = 1 << 16;
protected InputEvent(int eventType, Object source, long when, int modifiers) {
super(eventType, source, when);
@@ -68,6 +71,12 @@ public abstract class InputEvent extends NEWTEvent
public boolean isShiftDown() {
return (modifiers&SHIFT_MASK)!=0;
}
+ public boolean isConfined() {
+ return (modifiers&CONFINED_MASK)!=0;
+ }
+ public boolean isInvisible() {
+ return (modifiers&INVISIBLE_MASK)!=0;
+ }
/**
* @return Array of pressed mouse buttons [{@link MouseEvent#BUTTON1} ..].
@@ -100,7 +109,7 @@ public abstract class InputEvent extends NEWTEvent
}
public String toString() {
- return "InputEvent[modifiers:"+modifiers+", "+super.toString()+"]";
+ return "InputEvent[modifiers: 0x"+Integer.toHexString(modifiers)+", "+super.toString()+"]";
}
private final int modifiers;
diff --git a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
index 2c12049c4..ccc674f1d 100644
--- a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
@@ -34,6 +34,7 @@
package com.jogamp.newt.event;
+@SuppressWarnings("serial")
public class MouseEvent extends InputEvent
{
public static final int BUTTON1 = 1;