aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-07-30 03:07:07 +0200
committerSven Gothel <[email protected]>2015-07-30 03:07:07 +0200
commit1a8b5c63c2f5328724a84ced2fa16a04ee6e8ac5 (patch)
tree05aaca0c36a1ce4ff241c3382629bcc94f621064 /src/newt
parent3f13a60ca428ed879ad2ac551f7bd808b9ba44a9 (diff)
Use GlueGen's Bitfield instead of IntBitfield
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/com/jogamp/newt/event/InputEvent.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/event/KeyEvent.java4
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java4
-rw-r--r--src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java14
4 files changed, 15 insertions, 15 deletions
diff --git a/src/newt/classes/com/jogamp/newt/event/InputEvent.java b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
index fbda79d46..ca9d4c2a3 100644
--- a/src/newt/classes/com/jogamp/newt/event/InputEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
@@ -34,7 +34,7 @@
package com.jogamp.newt.event;
-import com.jogamp.common.util.IntBitfield;
+import com.jogamp.common.util.Bitfield;
import com.jogamp.newt.Window;
@SuppressWarnings("serial")
@@ -188,11 +188,11 @@ public abstract class InputEvent extends NEWTEvent
* <p>
* See also {@link MouseEvent}'s section about <i>Multiple-Pointer Events</i>.
* </p>
- * @see IntBitfield#getBitCount(int)
+ * @see Bitfield.Util#getBitCount(int)
* @see #BUTTONALL_MASK
*/
public final int getButtonDownCount() {
- return IntBitfield.getBitCount(modifiers & BUTTONALL_MASK);
+ return Bitfield.Util.getBitCount(modifiers & BUTTONALL_MASK);
}
/**
@@ -203,7 +203,7 @@ public abstract class InputEvent extends NEWTEvent
* <p>
* See also {@link MouseEvent}'s section about <i>Multiple-Pointer Events</i>.
* </p>
- * @see IntBitfield#getBitCount(int)
+ * @see Bitfield.Util#getBitCount(int)
* @see #BUTTONALL_MASK
*/
public final boolean isAnyButtonDown() {
diff --git a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
index f29e9eb8c..9e69d76fa 100644
--- a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
@@ -34,7 +34,7 @@
package com.jogamp.newt.event;
-import com.jogamp.common.util.IntBitfield;
+import com.jogamp.common.util.Bitfield;
/**
* <a name="eventDelivery"><h5>KeyEvent Delivery</h5></a>
@@ -141,7 +141,7 @@ public class KeyEvent extends InputEvent
// Validate flags
//
final int pma_bits = flags & ( F_PRINTABLE_MASK | F_MODIFIER_MASK | F_ACTION_MASK ) ;
- final int pma_count = IntBitfield.getBitCount(pma_bits);
+ final int pma_count = Bitfield.Util.getBitCount(pma_bits);
if ( 1 != pma_count ) {
throw new InternalError("Key must be either of type printable, modifier or action - but it is of "+pma_count+" types: "+this);
}
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 091e6243a..ae3d2a997 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -65,7 +65,7 @@ import jogamp.nativewindow.SurfaceUpdatedHelper;
import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.util.ArrayHashSet;
-import com.jogamp.common.util.IntBitfield;
+import com.jogamp.common.util.Bitfield;
import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.ReflectionUtil;
import com.jogamp.common.util.locks.LockFactory;
@@ -3448,7 +3448,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
// KeyListener/Event Support
//
private static final int keyTrackingRange = 255;
- private final IntBitfield keyPressedState = new IntBitfield( keyTrackingRange + 1 );
+ private final Bitfield keyPressedState = Bitfield.Factory.create( keyTrackingRange + 1 );
protected final boolean isKeyCodeTracked(final short keyCode) {
return ( 0xFFFF & keyCode ) <= keyTrackingRange;
diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
index c971acfad..1f7da129d 100644
--- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
@@ -40,7 +40,7 @@ import com.jogamp.nativewindow.util.Insets;
import com.jogamp.nativewindow.util.Point;
import com.jogamp.nativewindow.util.Rectangle;
import com.jogamp.nativewindow.util.RectangleImmutable;
-import com.jogamp.common.util.IntBitfield;
+import com.jogamp.common.util.Bitfield;
import com.jogamp.nativewindow.egl.EGLGraphicsDevice;
import com.jogamp.newt.event.MouseEvent;
@@ -62,7 +62,7 @@ public class WindowDriver extends WindowImpl {
}
public WindowDriver() {
-
+
/* Try use X11 as input for bcm.vc.iv
* if X11 fail to initialize then
* track using the /dev/event files directly
@@ -73,7 +73,7 @@ public class WindowDriver extends WindowImpl {
mouseTracker = x11UnderlayTracker;
keyTracker = x11UnderlayTracker;
- } catch(ExceptionInInitializerError e) {
+ } catch(final ExceptionInInitializerError e) {
linuxMouseTracker = LinuxMouseTracker.getSingleton();
linuxEventDeviceTracker = LinuxEventDeviceTracker.getSingleton();
@@ -217,7 +217,7 @@ public class WindowDriver extends WindowImpl {
addWindowListener(keyTracker);
addWindowListener(mouseTracker);
-
+
focusChanged(false, true);
}
@@ -253,7 +253,7 @@ public class WindowDriver extends WindowImpl {
final RectangleImmutable rect = clampRect((ScreenDriver) getScreen(), new Rectangle(x, y, width, height), false);
// reconfigure0 will issue position/size changed events if required
reconfigure0(nativeWindowHandle, rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight(), flags);
-
+
return true;
}
@@ -296,7 +296,7 @@ public class WindowDriver extends WindowImpl {
private LinuxMouseTracker linuxMouseTracker;
private LinuxEventDeviceTracker linuxEventDeviceTracker;
private X11UnderlayTracker x11UnderlayTracker;
-
+
private MouseTracker mouseTracker;
private KeyTracker keyTracker;
@@ -312,6 +312,6 @@ public class WindowDriver extends WindowImpl {
private static int nextLayer = 0;
private static int layerCount = 0;
private static final int MAX_LAYERS = 32;
- private static final IntBitfield usedLayers = new IntBitfield(MAX_LAYERS);
+ private static final Bitfield usedLayers = Bitfield.Factory.create(MAX_LAYERS);
private static final Object layerSync = new Object();
}