From 14ff638b63fc7adaa59f351891f6a38806d7fa5d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 8 Jun 2014 22:50:22 +0200 Subject: 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. --- src/newt/classes/com/jogamp/newt/Window.java | 60 ---------------------- .../classes/com/jogamp/newt/opengl/GLWindow.java | 25 --------- 2 files changed, 85 deletions(-) (limited to 'src/newt/classes/com/jogamp') 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 @@ -253,16 +253,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. * @@ -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 in place. - * @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 in place. - * @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(); @@ -463,40 +437,6 @@ public interface Window extends NativeWindow, WindowClosingProtocol, ScalableSur /** Reparenting hint (bitfield value): Claim window becomes visible after reparenting, which is important for e.g. preserving the GL-states in case window is invisible while reparenting. */ public static final int REPARENT_HINT_BECOMES_VISIBLE = 1 << 1; - /** - * Change this window's parent window.
- *

- * In case the old parent is not null and a Window, - * this window is removed from it's list of children.
- * In case the new parent is not null and a Window, - * this window is added to it's list of children.

- * - * @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.
- *

- * In case the old parent is not null and a Window, - * this window is removed from it's list of children.
- * In case the new parent is not null and a Window, - * this window is added to it's list of children.

- * - * @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 false. - * - * @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.
*

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 @@ -378,11 +378,6 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind return window.getSurfaceHeight(); } - @Override - public final Rectangle getSurfaceBounds() { - return window.getSurfaceBounds(); - } - @Override public final int[] convertToWindowUnits(final int[] pixelUnitsAndResult) { return window.convertToWindowUnits(pixelUnitsAndResult); @@ -393,16 +388,6 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind return window.convertToPixelUnits(windowUnitsAndResult); } - @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); @@ -453,16 +438,6 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind ", \n\tContext: " + context + ", \n\tWindow: "+window+ /** ", \n\tFactory: "+factory+ */ "]"; } - @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); -- cgit v1.2.3