diff options
author | Sven Gothel <[email protected]> | 2015-08-19 15:06:18 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-08-19 15:06:18 +0200 |
commit | 026ea7ed280bf4eb3a0e3c8434e5d993121f3eb4 (patch) | |
tree | df0b40a4918f813716f0265abf9f5a5de4a27d0c /src/newt/classes | |
parent | 87c5e1615346f72ad5686053bae338bdb66b1b01 (diff) |
Bug 1188: Cleanup public/private[reconfig, non-reconfig] state bits
- STATE_BIT_FULLSCREEN_SPAN is private and used for reconfigure,
hence STATE_BIT_COUNT_RECONFIG is needed.
- STATE_BIT_FULLSCREEN_SPAN is added at the end of public state bits
- PSTATE_BIT_MINMAXSIZE_SET is unused.
Diffstat (limited to 'src/newt/classes')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/Window.java | 7 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 25 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java index d46afd1cd..7ba94d5b2 100644 --- a/src/newt/classes/com/jogamp/newt/Window.java +++ b/src/newt/classes/com/jogamp/newt/Window.java @@ -223,9 +223,6 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur */ public static final int STATE_BIT_FULLSCREEN = 11; // reconfig-flag - // Hidden in WindowImpl: - // static final int STATE_BIT_FULLSCREEN_SPAN = 12; - /** * Set if the <i>pointer is visible</i> when inside the window, otherwise cleared. * <p>Bit number {@value}.</p> @@ -233,7 +230,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * @see #getStateMask() * @since 2.3.2 */ - public static final int STATE_BIT_POINTERVISIBLE = 13; + public static final int STATE_BIT_POINTERVISIBLE = 12; /** * Set if the <i>pointer is confined</i> to the window, otherwise cleared. * <p>Bit number {@value}.</p> @@ -241,7 +238,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * @see #getStateMask() * @since 2.3.2 */ - public static final int STATE_BIT_POINTERCONFINED = 14; + public static final int STATE_BIT_POINTERCONFINED = 13; /** * Bitmask for {@link #STATE_BIT_VISIBLE}, {@value}. diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index dd1680b0f..ddcbd0d90 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -190,21 +190,23 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer * @see #getStateMask() * @since 2.3.2 */ - protected static final int STATE_BIT_COUNT_ALL_PUBLIC = 15; + protected static final int STATE_BIT_COUNT_ALL_PUBLIC = STATE_BIT_POINTERCONFINED + 1; /** Bitmask for {@link #STATE_BIT_COUNT_ALL_PUBLIC} */ protected static final int STATE_MASK_ALL_PUBLIC = ( 1 << STATE_BIT_COUNT_ALL_PUBLIC ) - 1; // - // Additional private state-mask bits and mask values + // Additional private reconfigure state-mask bits and mask values // - /** - * <p>Bit number {@value}.</p> - * <p>Defaults to {@code false}.</p> - * @see #getStateMask() - * @since 2.3.2 - */ - /* pp */ static final int STATE_BIT_FULLSCREEN_SPAN = 12; - /* pp */ static final int PSTATE_BIT_MINMAXSIZE_SET = 27; + /* pp */ static final int STATE_BIT_FULLSCREEN_SPAN = STATE_BIT_COUNT_ALL_PUBLIC; + + protected static final int STATE_BIT_COUNT_RECONFIG = STATE_BIT_FULLSCREEN_SPAN + 1; + /** Bitmask for {@link #STATE_BIT_COUNT_RECONFIG} */ + protected static final int STATE_MASK_ALL_RECONFIG = ( 1 << STATE_BIT_COUNT_RECONFIG ) - 1; + + // + // Additional private non-reconfigure state-mask bits and mask values + // + /* pp */ static final int PSTATE_BIT_FOCUS_CHANGE_BROKEN = 28; /* pp */ static final int PSTATE_BIT_FULLSCREEN_MAINMONITOR = 29; // true /* pp */ static final int PSTATE_BIT_FULLSCREEN_NFS_ALWAYSONTOP = 30; // non fullscreen alwaysOnTop setting @@ -212,6 +214,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer /** Bitmask for {@link #STATE_BIT_FULLSCREEN_SPAN}, {@value}. */ /* pp */ static final int STATE_MASK_FULLSCREEN_SPAN = 1 << STATE_BIT_FULLSCREEN_SPAN; + /* pp */ static final int PSTATE_MASK_FOCUS_CHANGE_BROKEN = 1 << PSTATE_BIT_FOCUS_CHANGE_BROKEN; /* pp */ static final int PSTATE_MASK_FULLSCREEN_MAINMONITOR = 1 << PSTATE_BIT_FULLSCREEN_MAINMONITOR; /* pp */ static final int PSTATE_MASK_FULLSCREEN_NFS_ALWAYSONTOP = 1 << PSTATE_BIT_FULLSCREEN_NFS_ALWAYSONTOP; @@ -874,7 +877,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } protected int getReconfigureMask(final int changeFlags, final boolean visible) { - final int smask = stateMask.get32(0, STATE_BIT_COUNT_ALL_PUBLIC); + final int smask = stateMask.get32(0, STATE_BIT_COUNT_RECONFIG); return changeFlags | ( smask & ~STATE_MASK_VISIBLE ) | ( visible ? STATE_MASK_VISIBLE : 0 ) |