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/nativewindow/classes/com | |
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/nativewindow/classes/com')
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java | 4 | ||||
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java index 2e9a33801..5f9720a0e 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java @@ -40,10 +40,10 @@ public class UpstreamWindowHookMutableSizePos extends UpstreamSurfaceHookMutable public final int getY() { return winY; } - public final int getWindowWidth() { + public final int getWidth() { return winWidth; } - public final int getWindowHeight() { + public final int getHeight() { return winHeight; } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java index d4f058201..ea6ec893e 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java @@ -625,12 +625,12 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, @Override public final int getSurfaceWidth() { - return getWindowWidth() * getPixelScale(); + return getWidth() * getPixelScale(); } @Override public final int getSurfaceHeight() { - return getWindowHeight() * getPixelScale(); + return getHeight() * getPixelScale(); } // @@ -638,12 +638,12 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, // @Override - public final int getWindowWidth() { + public final int getWidth() { return component.getWidth(); } @Override - public final int getWindowHeight() { + public final int getHeight() { return component.getHeight(); } @@ -826,7 +826,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface, ", surfaceHandle "+toHexString(getSurfaceHandle())+ ", bounds "+bounds+", insets "+insets ); - sb.append(", window ["+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+ + sb.append(", window ["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+ "], pixels[x"+getPixelScale()+" -> "+getSurfaceWidth()+"x"+getSurfaceHeight()+"]"+ ", visible "+component.isVisible()); sb.append(", lockedExt "+isSurfaceLockedByOtherThread()+ |