diff options
author | Sven Gothel <[email protected]> | 2014-05-27 00:05:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-05-27 00:05:17 +0200 |
commit | d149c554b453c86a880a4f0595bb8e340c80d041 (patch) | |
tree | 4b8cea3fdc7953a61aaf1f6987dfc429dac2a3cd /src/newt/classes/com/jogamp | |
parent | 8093767535b00f785fe89513ce43b02c97e267a5 (diff) |
Bug 741 HiDPI: [Core API Change] Bring back get[Width|Height]() in NativeWindow, i.e. getWindow[Width|Height]() -> get[Width|Height]()
We have distinguished pixel- and window units in commit f9a00b91dcd146c72a50237b62270f33bd0da98e
and introduced NativeWindow.getWindow[Width|Height]() and NativeSurface.getSurface[Width|Height]().
To have a unique naming scheme, we could rename all method using 'Window',
but for simplicity and since there will be no 'semantic override'
just use the simple version.
Diffstat (limited to 'src/newt/classes/com/jogamp')
5 files changed, 9 insertions, 9 deletions
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java index 4443c70c9..9685200eb 100644 --- a/src/newt/classes/com/jogamp/newt/NewtFactory.java +++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java @@ -296,7 +296,7 @@ public class NewtFactory { } final Window win = WindowImpl.create(parentWindow, 0, screen, caps); - win.setSize(parentWindow.getWindowWidth(), parentWindow.getWindowHeight()); + win.setSize(parentWindow.getWidth(), parentWindow.getHeight()); if ( null != newtParentWindow ) { newtParentWindow.addChild(win); win.setVisible(newtParentWindow.isVisible()); diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java index 0d70b5f8c..f6b2bab1f 100644 --- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java +++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java @@ -400,7 +400,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto final Window w = newtChild; if( null != w ) { // use NEWT child's size for min/pref size! - java.awt.Dimension minSize = new java.awt.Dimension(w.getWindowWidth(), w.getWindowHeight()); + java.awt.Dimension minSize = new java.awt.Dimension(w.getWidth(), w.getHeight()); setMinimumSize(minSize); setPreferredSize(minSize); } diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index ecd50aa5f..a61085fb0 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -354,13 +354,13 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind } @Override - public final int getWindowWidth() { - return window.getWindowWidth(); + public final int getWidth() { + return window.getWidth(); } @Override - public final int getWindowHeight() { - return window.getWindowHeight(); + public final int getHeight() { + return window.getHeight(); } @Override diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java index 51a7984b4..93ecc8bb2 100644 --- a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java +++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java @@ -518,12 +518,12 @@ public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol { } @Override - public int getWindowWidth() { + public int getWidth() { return getSurfaceWidth(); // FIXME: Use 'scale' or an actual window-width } @Override - public int getWindowHeight() { + public int getHeight() { return getSurfaceHeight(); // FIXME: Use 'scale' or an actual window-width } diff --git a/src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtApplet3Run.java b/src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtApplet3Run.java index 7b6a1c8cd..459db11b2 100644 --- a/src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtApplet3Run.java +++ b/src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtApplet3Run.java @@ -172,7 +172,7 @@ public class JOGLNewtApplet3Run implements Applet3 { glWindow = GLWindow.create(w); glWindow.setUndecorated(glUndecorated); glWindow.setAlwaysOnTop(glAlwaysOnTop); - glWindow.setSize(browserWin.getWindowWidth(), browserWin.getWindowHeight()); + glWindow.setSize(browserWin.getWidth(), browserWin.getHeight()); return new NativeWindowDownstream() { @Override |