summaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-05-27 00:05:17 +0200
committerSven Gothel <[email protected]>2014-05-27 00:05:17 +0200
commitd149c554b453c86a880a4f0595bb8e340c80d041 (patch)
tree4b8cea3fdc7953a61aaf1f6987dfc429dac2a3cd /src/nativewindow
parent8093767535b00f785fe89513ce43b02c97e267a5 (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')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/UpstreamWindowHookMutableSizePos.java4
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java10
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java4
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java10
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/WrappedWindow.java8
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java4
6 files changed, 20 insertions, 20 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()+
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java b/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
index 8131ee283..733f12d49 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
@@ -180,7 +180,7 @@ public interface NativeSurface extends SurfaceUpdatedListener {
/**
* Returns the width of the client area excluding insets (window decorations) in pixel units.
* @return width of the client area in pixel units
- * @see NativeWindow#getWindowWidth()
+ * @see NativeWindow#getWidth()
* @see #convertToWindowUnits(int[])
*/
public int getSurfaceWidth();
@@ -188,7 +188,7 @@ public interface NativeSurface extends SurfaceUpdatedListener {
/**
* Returns the height of the client area excluding insets (window decorations) in pixel units.
* @return height of the client area in pixel units
- * @see NativeWindow#getWindowHeight()
+ * @see NativeWindow#getHeight()
* @see #convertToWindowUnits(int[])
*/
public int getSurfaceHeight();
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
index 63a643f3c..5e5f99aac 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
@@ -46,7 +46,7 @@ import javax.media.nativewindow.util.Point;
/**
* Extend the {@link NativeSurface} interface with windowing
* information such as {@link #getWindowHandle() window-handle},
- * {@link #getWindowWidth() window-size} and {@link #getX() window-position}.
+ * {@link #getWidth() window-size} and {@link #getX() window-position}.
* <p>
* All values of this interface are represented in window units, if not stated otherwise.
* See {@link NativeSurface}.
@@ -110,8 +110,8 @@ public interface NativeWindow extends NativeSurface {
*
* The top-level window size is
* <pre>
- * {@link #getWindowWidth()} + getInsets().{@link InsetsImmutable#getTotalWidth() getTotalWidth()}
- * {@link #getWindowHeight()} + getInsets().{@link InsetsImmutable#getTotalHeight() getTotalHeight()}
+ * {@link #getWidth()} + getInsets().{@link InsetsImmutable#getTotalWidth() getTotalWidth()}
+ * {@link #getHeight()} + getInsets().{@link InsetsImmutable#getTotalHeight() getTotalHeight()}
* </pre>
*
* @return insets
@@ -159,14 +159,14 @@ public interface NativeWindow extends NativeSurface {
* @return width of the client area in window units
* @see NativeSurface#getSurfaceWidth()
*/
- public int getWindowWidth();
+ public int getWidth();
/**
* Returns the height of the client area excluding insets (window decorations) in window units.
* @return height of the client area in window units
* @see NativeSurface#getSurfaceHeight()
*/
- public int getWindowHeight();
+ public int getHeight();
/**
* Returns the window's top-left client-area position in the screen.
diff --git a/src/nativewindow/classes/jogamp/nativewindow/WrappedWindow.java b/src/nativewindow/classes/jogamp/nativewindow/WrappedWindow.java
index 3cbfcd4d9..b93cbe7f5 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/WrappedWindow.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/WrappedWindow.java
@@ -91,13 +91,13 @@ public class WrappedWindow extends WrappedSurface implements NativeWindow {
}
@Override
- public int getWindowWidth() {
- return ((UpstreamWindowHookMutableSizePos)getUpstreamSurfaceHook()).getWindowWidth();
+ public int getWidth() {
+ return ((UpstreamWindowHookMutableSizePos)getUpstreamSurfaceHook()).getWidth();
}
@Override
- public int getWindowHeight() {
- return ((UpstreamWindowHookMutableSizePos)getUpstreamSurfaceHook()).getWindowHeight();
+ public int getHeight() {
+ return ((UpstreamWindowHookMutableSizePos)getUpstreamSurfaceHook()).getHeight();
}
@Override
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
index 58dc7e47e..3b91fc8ab 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
@@ -143,7 +143,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface {
} else if( DEBUG ) {
System.err.println("JAWTWindow.attachSurfaceLayerImpl: "+toHexString(layerHandle) + ", [ins "+outterInsets+"], p0 "+p0+" -> "+p1+", bounds "+bounds);
}
- OSXUtil.AddCASublayer(rootSurfaceLayer, layerHandle, p1.getX(), p1.getY(), getWindowWidth(), getWindowHeight(), getPixelScale(), JAWTUtil.getOSXCALayerQuirks());
+ OSXUtil.AddCASublayer(rootSurfaceLayer, layerHandle, p1.getX(), p1.getY(), getWidth(), getHeight(), getPixelScale(), JAWTUtil.getOSXCALayerQuirks());
} } );
}
@@ -177,7 +177,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface {
System.err.println("JAWTWindow.layoutSurfaceLayerImpl: "+toHexString(layerHandle) + ", quirks "+caLayerQuirks+", visible "+visible+
", [ins "+outterInsets+"], p0 "+p0+" -> "+p1+", bounds "+bounds);
}
- OSXUtil.FixCALayerLayout(rootSurfaceLayer, layerHandle, visible, p1.getX(), p1.getY(), getWindowWidth(), getWindowHeight(), caLayerQuirks);
+ OSXUtil.FixCALayerLayout(rootSurfaceLayer, layerHandle, visible, p1.getX(), p1.getY(), getWidth(), getHeight(), caLayerQuirks);
}
@Override