diff options
author | Sven Gothel <[email protected]> | 2014-06-08 22:50:22 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-06-08 22:50:22 +0200 |
commit | 14ff638b63fc7adaa59f351891f6a38806d7fa5d (patch) | |
tree | 0c61ee420775df3730da1452033463460a1cd954 /src/newt/classes | |
parent | 58153310faa4089417037e67e06c0812908cecd2 (diff) |
NEWT Window: Remove deprecated methods: HiDPI + reparentWindow(..)
Remove HiDPI pixel- from/to window-unit conversion and getter methods:
Rectangle HiDPI pixel- from/to window-units are erroneous in case of multiple monitor setup where a mixed pixel-scale exist,
since the methods didn't take the monitor viewport and each of it's pixel-scale into account (expensive).
Remove deprecated reparentWindow(..) methods.
Diffstat (limited to 'src/newt/classes')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/Window.java | 60 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 25 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 26 |
3 files changed, 0 insertions, 111 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java index 88134f3ef..08236ae67 100644 --- a/src/newt/classes/com/jogamp/newt/Window.java +++ b/src/newt/classes/com/jogamp/newt/Window.java @@ -254,16 +254,6 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur Rectangle getBounds(); /** - * Returns a newly created {@link Rectangle} containing the scaled window origin, {@link #getX()} & {@link #getY()}, - * and size, {@link #getSurfaceWidth()} & {@link #getSurfaceHeight()}, in pixel units. - * - * @deprecated The returned position in pixel units might be erroneous in case of multiple monitor setup where a mixed pixel-scale exist, - * since this method currently does not take the monitor viewport and each of it's pixel-scale into account (expensive). - * Either we fix this issue or remove this method at a later time. - */ - Rectangle getSurfaceBounds(); - - /** * Sets the size of the window's client area in window units, excluding decorations. * * <p> @@ -358,22 +348,6 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur */ void setTopLevelPosition(int x, int y); - /** - * Converts the given pixel units into window units <i>in place</i>. - * @param pixelUnitsAndResult rectangle storage holding the pixel units to convert - * and the resulting conversion. - * @return resulting rectangle storage pixelUnitsAndResult for chaining holding the converted values - */ - Rectangle convertToWindowUnits(final Rectangle pixelUnitsAndResult); - - /** - * Converts the given window units into pixel units <i>in place</i>. - * @param windowUnitsAndResult rectangle storage holding the window units to convert - * and the resulting conversion. - * @return resulting rectangle storage windowUnitsAndResult for chaining holding the converted values - */ - Rectangle convertToPixelUnits(final Rectangle windowUnitsAndResult); - void setUndecorated(boolean value); boolean isUndecorated(); @@ -472,40 +446,6 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur * this window is added to it's list of children.<br></P> * * @param newParent The new parent NativeWindow. If null, this Window becomes a top level window. - * - * @return The issued reparent action type (strategy) as defined in Window.ReparentAction - * @see #reparentWindow(NativeWindow, int, int, boolean) - * @deprecated Use {@link #reparentWindow(NativeWindow, int, int, int)} - */ - ReparentOperation reparentWindow(NativeWindow newParent); - - /** - * Change this window's parent window.<br> - * <P> - * In case the old parent is not null and a Window, - * this window is removed from it's list of children.<br> - * In case the new parent is not null and a Window, - * this window is added to it's list of children.<br></P> - * - * @param newParent The new parent NativeWindow. If null, this Window becomes a top level window. - * @param x new top-level position, use -1 for default position. - * @param y new top-level position, use -1 for default position. - * @param forceDestroyCreate if true, uses re-creation strategy for reparenting, default is <code>false</code>. - * - * @return The issued reparent action type (strategy) as defined in Window.ReparentAction - * @deprecated Use {@link #reparentWindow(NativeWindow, int, int, int)} - */ - ReparentOperation reparentWindow(NativeWindow newParent, int x, int y, boolean forceDestroyCreate); - - /** - * Change this window's parent window.<br> - * <P> - * In case the old parent is not null and a Window, - * this window is removed from it's list of children.<br> - * In case the new parent is not null and a Window, - * this window is added to it's list of children.<br></P> - * - * @param newParent The new parent NativeWindow. If null, this Window becomes a top level window. * @param x new top-level position in window units, use -1 for default position. * @param y new top-level position in window units, use -1 for default position. * @param hints May contain hints (bitfield values) like {@link #REPARENT_HINT_FORCE_RECREATION} or {@link #REPARENT_HINT_BECOMES_VISIBLE}. diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index 25297917b..2991bb98a 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -379,11 +379,6 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind } @Override - public final Rectangle getSurfaceBounds() { - return window.getSurfaceBounds(); - } - - @Override public final int[] convertToWindowUnits(final int[] pixelUnitsAndResult) { return window.convertToWindowUnits(pixelUnitsAndResult); } @@ -394,16 +389,6 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind } @Override - public final Rectangle convertToWindowUnits(final Rectangle pixelUnitsAndResult) { - return window.convertToWindowUnits(pixelUnitsAndResult); - } - - @Override - public final Rectangle convertToPixelUnits(final Rectangle windowUnitsAndResult) { - return window.convertToPixelUnits(windowUnitsAndResult); - } - - @Override public final void setSurfaceScale(final int[] pixelScale) { window.setSurfaceScale(pixelScale); } @@ -454,16 +439,6 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind } @Override - public final ReparentOperation reparentWindow(NativeWindow newParent) { - return window.reparentWindow(newParent); - } - - @Override - public final ReparentOperation reparentWindow(NativeWindow newParent, int x, int y, boolean forceDestroyCreate) { - return window.reparentWindow(newParent, x, y, forceDestroyCreate); - } - - @Override public final ReparentOperation reparentWindow(NativeWindow newParent, int x, int y, int hints) { return window.reparentWindow(newParent, x, y, hints); } diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index 0df105ff0..0501f6ad6 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -1586,16 +1586,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer private final ReparentActionRecreate reparentActionRecreate = new ReparentActionRecreate(); @Override - public final ReparentOperation reparentWindow(NativeWindow newParent) { - return reparentWindow(newParent, -1, -1, 0); - } - - @Override - public final ReparentOperation reparentWindow(NativeWindow newParent, int x, int y, boolean forceDestroyCreate) { - return reparentWindow(newParent, x, y, forceDestroyCreate ? REPARENT_HINT_FORCE_RECREATION : 0); - } - - @Override public final ReparentOperation reparentWindow(NativeWindow newParent, int x, int y, int hints) { final ReparentAction reparentAction = new ReparentAction(newParent, x, y, hints); runOnEDTIfAvail(true, reparentAction); @@ -1920,12 +1910,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } @Override - public final Rectangle getSurfaceBounds() { - // FIXME HiDPI: Shortcut, may need to adjust if we change scaling methodology - return new Rectangle(x * getPixelScaleX(), y * getPixelScaleY(), pixWidth, pixHeight); - } - - @Override public final int[] convertToWindowUnits(final int[] pixelUnitsAndResult) { pixelUnitsAndResult[0] /= getPixelScaleX(); pixelUnitsAndResult[1] /= getPixelScaleY(); @@ -1947,16 +1931,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer return windowUnitsAndResult.scale(getPixelScaleX(), getPixelScaleY()); } - @Override - public final Rectangle convertToWindowUnits(final Rectangle pixelUnitsAndResult) { - return pixelUnitsAndResult.scaleInv(getPixelScaleX(), getPixelScaleY()); - } - - @Override - public final Rectangle convertToPixelUnits(final Rectangle windowUnitsAndResult) { - return windowUnitsAndResult.scale(getPixelScaleX(), getPixelScaleY()); - } - /** HiDPI: We currently base scaling of window units to pixel units on an integer scale factor per component. */ protected final int getPixelScaleX() { return hasPixelScale[0]; |