summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
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/newt/classes
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/newt/classes')
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/util/applet/JOGLNewtApplet3Run.java2
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java76
-rw-r--r--src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java4
-rw-r--r--src/newt/classes/jogamp/newt/driver/android/WindowDriver.java10
-rw-r--r--src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java4
-rw-r--r--src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java6
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java8
-rw-r--r--src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java4
16 files changed, 69 insertions, 69 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
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 5f901ce10..2411f6595 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -948,7 +948,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
}
if(!isNativeValid() && visible) {
- if( 0<getWindowWidth()*getWindowHeight() ) {
+ if( 0<getWidth()*getHeight() ) {
nativeWindowCreated = createNative();
madeVisible = nativeWindowCreated;
}
@@ -956,7 +956,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
WindowImpl.this.visible = true;
} else if(WindowImpl.this.visible != visible) {
if(isNativeValid()) {
- setVisibleImpl(visible, getX(), getY(), getWindowWidth(), getWindowHeight());
+ setVisibleImpl(visible, getX(), getY(), getWidth(), getHeight());
WindowImpl.this.waitForVisible(visible, false);
madeVisible = visible;
} else {
@@ -979,7 +979,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
}
if(DEBUG_IMPLEMENTATION) {
- System.err.println("Window setVisible: END ("+getThreadName()+") "+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+WindowImpl.this.visible+", nativeWindowCreated: "+nativeWindowCreated+", madeVisible: "+madeVisible);
+ System.err.println("Window setVisible: END ("+getThreadName()+") "+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+WindowImpl.this.visible+", nativeWindowCreated: "+nativeWindowCreated+", madeVisible: "+madeVisible);
}
} finally {
if(null!=lifecycleHook) {
@@ -1007,7 +1007,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
@Override
public final void setVisible(boolean wait, boolean visible) {
if(DEBUG_IMPLEMENTATION) {
- System.err.println("Window setVisible: START ("+getThreadName()+") "+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+this.visible+" -> "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+(null!=parentWindow));
+ System.err.println("Window setVisible: START ("+getThreadName()+") "+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+this.visible+" -> "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+(null!=parentWindow));
}
runOnEDTIfAvail(wait, new VisibleAction(visible));
}
@@ -1032,9 +1032,9 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
final RecursiveLock _lock = windowLock;
_lock.lock();
try {
- if ( force || ( !isFullscreen() && ( getWindowWidth() != width || getWindowHeight() != height ) ) ) {
+ if ( force || ( !isFullscreen() && ( getWidth() != width || getHeight() != height ) ) ) {
if(DEBUG_IMPLEMENTATION) {
- System.err.println("Window setSize: START force "+force+", "+getWindowWidth()+"x"+getWindowHeight()+" -> "+width+"x"+height+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible "+visible);
+ System.err.println("Window setSize: START force "+force+", "+getWidth()+"x"+getHeight()+" -> "+width+"x"+height+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible "+visible);
}
int visibleAction; // 0 nop, 1 invisible, 2 visible (create)
if ( visible && isNativeValid() && ( 0 >= width || 0 >= height ) ) {
@@ -1054,7 +1054,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
defineSize(width, height);
}
if(DEBUG_IMPLEMENTATION) {
- System.err.println("Window setSize: END "+getWindowWidth()+"x"+getWindowHeight()+", visibleAction "+visibleAction);
+ System.err.println("Window setSize: END "+getWidth()+"x"+getHeight()+", visibleAction "+visibleAction);
}
switch(visibleAction) {
case 1: setVisibleActionImpl(false); break;
@@ -1261,8 +1261,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
// mirror pos/size so native change notification can get overwritten
final int oldX = getX();
final int oldY = getY();
- final int oldWidth = getWindowWidth();
- final int oldHeight = getWindowHeight();
+ final int oldWidth = getWidth();
+ final int oldHeight = getHeight();
final int x, y;
int width = oldWidth;
int height = oldHeight;
@@ -1313,11 +1313,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
y = 0;
// refit if size is bigger than parent
- if( width > newParentWindow.getWindowWidth() ) {
- width = newParentWindow.getWindowWidth();
+ if( width > newParentWindow.getWidth() ) {
+ width = newParentWindow.getWidth();
}
- if( height > newParentWindow.getWindowHeight() ) {
- height = newParentWindow.getWindowHeight();
+ if( height > newParentWindow.getHeight() ) {
+ height = newParentWindow.getHeight();
}
// Case: Child Window
@@ -1527,7 +1527,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
System.err.println("Window.reparent: END-1 ("+getThreadName()+") windowHandle "+toHexString(windowHandle)+
", visible: "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+
", parentWindow "+ Display.hashCodeNullSafe(parentWindow)+" "+
- getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight());
+ getX()+"/"+getY()+" "+getWidth()+"x"+getHeight());
}
} finally {
if(null!=lifecycleHook) {
@@ -1554,7 +1554,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
System.err.println("Window.reparent: END-X ("+getThreadName()+") windowHandle "+toHexString(windowHandle)+
", visible: "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+
", parentWindow "+ Display.hashCodeNullSafe(parentWindow)+" "+
- getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight());
+ getX()+"/"+getY()+" "+getWidth()+"x"+getHeight());
}
}
}
@@ -1631,8 +1631,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
// Mirror pos/size so native change notification can get overwritten
final int x = getX();
final int y = getY();
- final int width = getWindowWidth();
- final int height = getWindowHeight();
+ final int width = getWidth();
+ final int height = getHeight();
DisplayImpl display = (DisplayImpl) screen.getDisplay();
display.dispatchMessagesNative(); // status up2date
@@ -1677,8 +1677,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
// Mirror pos/size so native change notification can get overwritten
final int x = getX();
final int y = getY();
- final int width = getWindowWidth();
- final int height = getWindowHeight();
+ final int width = getWidth();
+ final int height = getHeight();
DisplayImpl display = (DisplayImpl) screen.getDisplay();
display.dispatchMessagesNative(); // status up2date
@@ -1887,12 +1887,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
@Override
- public final int getWindowWidth() {
+ public final int getWidth() {
return winWidth;
}
@Override
- public final int getWindowHeight() {
+ public final int getHeight() {
return winHeight;
}
@@ -2050,7 +2050,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
",\n ParentWindowHandle "+toHexString(parentWindowHandle)+" ("+(0!=getParentWindowHandle())+")"+
",\n WindowHandle "+toHexString(getWindowHandle())+
",\n SurfaceHandle "+toHexString(getSurfaceHandle())+ " (lockedExt window "+windowLock.isLockedByOtherThread()+", surface "+isSurfaceLockedByOtherThread()+")"+
- ",\n window["+getX()+"/"+getY()+" (auto "+autoPosition()+") "+getWindowWidth()+"x"+getWindowHeight()+"], pixel["+getSurfaceWidth()+"x"+getSurfaceHeight()+
+ ",\n window["+getX()+"/"+getY()+" (auto "+autoPosition()+") "+getWidth()+"x"+getHeight()+"], pixel["+getSurfaceWidth()+"x"+getSurfaceHeight()+
"],\n Visible "+isVisible()+", focus "+hasFocus()+
",\n Undecorated "+undecorated+" ("+isUndecorated()+")"+
",\n AlwaysOnTop "+alwaysOnTop+", Fullscreen "+fullscreen+
@@ -2196,7 +2196,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
if ( !isFullscreen() && ( getX() != x || getY() != y || null != getParent()) ) {
if(isNativeValid()) {
// this.x/this.y will be set by sizeChanged, triggered by windowing event system
- reconfigureWindowImpl(x, y, getWindowWidth(), getWindowHeight(), getReconfigureFlags(0, isVisible()));
+ reconfigureWindowImpl(x, y, getWidth(), getHeight(), getReconfigureFlags(0, isVisible()));
if( null == parentWindow ) {
// Wait until custom position is reached within tolerances
waitForPosition(true, x, y, Window.TIMEOUT_NATIVEWINDOW);
@@ -2244,8 +2244,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
try {
final int oldX = getX();
final int oldY = getY();
- final int oldWidth = getWindowWidth();
- final int oldHeight = getWindowHeight();
+ final int oldWidth = getWidth();
+ final int oldHeight = getHeight();
int x,y,w,h;
@@ -2302,11 +2302,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
y = 0;
// refit if size is bigger than parent
- if( w > parentWindow.getWindowWidth() ) {
- w = parentWindow.getWindowWidth();
+ if( w > parentWindow.getWidth() ) {
+ w = parentWindow.getWidth();
}
- if( h > parentWindow.getWindowHeight() ) {
- h = parentWindow.getWindowHeight();
+ if( h > parentWindow.getHeight() ) {
+ h = parentWindow.getHeight();
}
}
}
@@ -2495,10 +2495,10 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
// Simply move/resize window to fit in virtual screen if required
final RectangleImmutable viewport = screen.getViewportInWindowUnits();
if( viewport.getWidth() > 0 && viewport.getHeight() > 0 ) { // failsafe
- final RectangleImmutable rect = new Rectangle(getX(), getY(), getWindowWidth(), getWindowHeight());
+ final RectangleImmutable rect = new Rectangle(getX(), getY(), getWidth(), getHeight());
final RectangleImmutable isect = viewport.intersection(rect);
- if ( getWindowHeight() > isect.getHeight() ||
- getWindowWidth() > isect.getWidth() ) {
+ if ( getHeight() > isect.getHeight() ||
+ getWidth() > isect.getWidth() ) {
if(DEBUG_IMPLEMENTATION) {
System.err.println("Window.monitorModeChanged.1: Non-FS - Fit window "+rect+" into screen viewport "+viewport+
", due to minimal intersection "+isect);
@@ -3052,7 +3052,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
int y = pe.getY();
if(DEBUG_MOUSE_EVENT) {
- System.err.println("consumePointerEvent.in: "+pe+", "+pState0+", pos "+x+"/"+y+", win["+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+
+ System.err.println("consumePointerEvent.in: "+pe+", "+pState0+", pos "+x+"/"+y+", win["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+
"], pixel["+getSurfaceWidth()+"x"+getSurfaceHeight()+"]");
}
@@ -3620,7 +3620,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
protected void consumeWindowEvent(WindowEvent e) {
if(DEBUG_IMPLEMENTATION) {
- System.err.println("consumeWindowEvent: "+e+", visible "+isVisible()+" "+getX()+"/"+getY()+", win["+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+
+ System.err.println("consumeWindowEvent: "+e+", visible "+isVisible()+" "+getX()+"/"+getY()+", win["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+
"], pixel["+getSurfaceWidth()+"x"+getSurfaceHeight()+"]");
}
for(int i = 0; !e.isConsumed() && i < windowListeners.size(); i++ ) {
@@ -3713,10 +3713,10 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
/** Triggered by implementation's WM events to update the client-area size in window units w/o insets/decorations. */
protected void sizeChanged(boolean defer, int newWidth, int newHeight, boolean force) {
- if(force || getWindowWidth() != newWidth || getWindowHeight() != newHeight) {
+ if(force || getWidth() != newWidth || getHeight() != newHeight) {
if(DEBUG_IMPLEMENTATION) {
System.err.println("Window.sizeChanged: ("+getThreadName()+"): (defer: "+defer+") force "+force+", "+
- getWindowWidth()+"x"+getWindowHeight()+" -> "+newWidth+"x"+newHeight+
+ getWidth()+"x"+getHeight()+" -> "+newWidth+"x"+newHeight+
" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
}
if(0>newWidth || 0>newHeight) {
@@ -3737,12 +3737,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
final DisplayImpl display = (DisplayImpl) screen.getDisplay();
display.dispatchMessagesNative(); // status up2date
long sleep;
- for(sleep = timeOut; 0<sleep && w!=getWindowWidth() && h!=getWindowHeight(); sleep-=10 ) {
+ for(sleep = timeOut; 0<sleep && w!=getWidth() && h!=getHeight(); sleep-=10 ) {
try { Thread.sleep(10); } catch (InterruptedException ie) {}
display.dispatchMessagesNative(); // status up2date
}
if(0 >= sleep) {
- final String msg = "Size/Pos not reached as requested within "+timeOut+"ms : requested "+w+"x"+h+", is "+getWindowWidth()+"x"+getWindowHeight();
+ final String msg = "Size/Pos not reached as requested within "+timeOut+"ms : requested "+w+"x"+h+", is "+getWidth()+"x"+getHeight();
if(failFast) {
throw new NativeWindowException(msg);
} else if (DEBUG_IMPLEMENTATION) {
diff --git a/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java b/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java
index 26faa4550..770502326 100644
--- a/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java
+++ b/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java
@@ -124,7 +124,7 @@ public class AWTParentWindowAdapter extends AWTWindowAdapter implements java.awt
final int cw = comp.getWidth();
final int ch = comp.getHeight();
if( 0 < cw && 0 < ch ) {
- if( newtChild.getWindowWidth() != cw || newtChild.getWindowHeight() != ch ) {
+ if( newtChild.getWidth() != cw || newtChild.getHeight() != ch ) {
newtChild.setSize(cw, ch);
final boolean v = comp.isShowing(); // compute showing-state throughout hierarchy
if(v != newtChild.isVisible()) {
diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java
index 22294a212..27c570722 100644
--- a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java
+++ b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java
@@ -228,8 +228,8 @@ public class NewtBaseActivity extends Activity {
androidWindow.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
- if(newtWindow.getWindowWidth()>0 && newtWindow.getWindowHeight()>0 && !newtWindow.isFullscreen()) {
- androidWindow.setLayout(newtWindow.getWindowWidth(), newtWindow.getWindowHeight());
+ if(newtWindow.getWidth()>0 && newtWindow.getHeight()>0 && !newtWindow.isFullscreen()) {
+ androidWindow.setLayout(newtWindow.getWidth(), newtWindow.getHeight());
}
}
diff --git a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java
index 5671a05e4..db530cb7e 100644
--- a/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/android/WindowDriver.java
@@ -304,7 +304,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 {
if(null == androidView) {
setupAndroidView( StaticContext.getContext() );
}
- viewGroup.addView(androidView, new android.widget.FrameLayout.LayoutParams(getWindowWidth(), getWindowHeight(), Gravity.BOTTOM|Gravity.RIGHT));
+ viewGroup.addView(androidView, new android.widget.FrameLayout.LayoutParams(getWidth(), getHeight(), Gravity.BOTTOM|Gravity.RIGHT));
Log.d(MD.TAG, "canCreateNativeImpl: added to static ViewGroup - on thread "+Thread.currentThread().getName());
} });
for(long sleep = TIMEOUT_NATIVEWINDOW; 0<sleep && 0 == surfaceHandle; sleep-=10 ) {
@@ -334,7 +334,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 {
final DefaultGraphicsScreen eglScreen = new DefaultGraphicsScreen(eglDevice, aScreen.getIndex());
Log.d(MD.TAG, "createNativeImpl 0 - eglDevice 0x"+Integer.toHexString(eglDevice.hashCode())+", "+eglDevice+", surfaceHandle 0x"+Long.toHexString(surfaceHandle)+
- ", format [a "+androidFormat+", n "+nativeFormat+"], win["+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+
+ ", format [a "+androidFormat+", n "+nativeFormat+"], win["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+
"], pixel["+getSurfaceWidth()+"x"+getSurfaceHeight()+
"] - on thread "+Thread.currentThread().getName());
@@ -381,7 +381,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 {
Log.d(MD.TAG, "closeNativeImpl 0 - eglDevice 0x"+Integer.toHexString(eglDevice.hashCode())+", "+eglDevice+", surfaceHandle 0x"+Long.toHexString(surfaceHandle)+
", eglSurfaceHandle 0x"+Long.toHexString(eglSurface)+
- ", format [a "+androidFormat+", n "+nativeFormat+"], win["+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+
+ ", format [a "+androidFormat+", n "+nativeFormat+"], win["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+
"], pixel["+getSurfaceWidth()+"x"+getSurfaceHeight()+"],"+
" - on thread "+Thread.currentThread().getName());
if(WindowImpl.DEBUG_IMPLEMENTATION) {
@@ -462,7 +462,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 {
Log.d(MD.TAG, "reconfigureWindowImpl.setFullscreen post creation (setContentView()) n/a");
return false;
}
- if(getWindowWidth() != width || getWindowHeight() != height) {
+ if(getWidth() != width || getHeight() != height) {
if(0!=getWindowHandle()) {
Log.d(MD.TAG, "reconfigureWindowImpl.setSize n/a");
res = false;
@@ -548,7 +548,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl implements Callback2 {
@Override
public final void surfaceCreated(SurfaceHolder holder) {
- Log.d(MD.TAG, "surfaceCreated: win["+getX()+"/"+getY()+" "+getWindowWidth()+"x"+getWindowHeight()+
+ Log.d(MD.TAG, "surfaceCreated: win["+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+
"], pixels["+" "+getSurfaceWidth()+"x"+getSurfaceHeight()+"] - on thread "+Thread.currentThread().getName());
}
diff --git a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
index 1f0ba6f09..cc92c4963 100644
--- a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
@@ -143,7 +143,7 @@ public class WindowDriver extends WindowImpl {
new AWTWindowAdapter(new LocalWindowListener(), this).addTo(awtCanvas); // fwd all AWT Window events to here
}
- reconfigureWindowImpl(getX(), getY(), getWindowWidth(), getWindowHeight(), getReconfigureFlags(FLAG_CHANGE_VISIBILITY | FLAG_CHANGE_DECORATION, true));
+ reconfigureWindowImpl(getX(), getY(), getWidth(), getHeight(), getReconfigureFlags(FLAG_CHANGE_VISIBILITY | FLAG_CHANGE_DECORATION, true));
// throws exception if failed ..
final NativeWindow nw = awtCanvas.getNativeWindow();
diff --git a/src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java
index 4cbff69c1..64b856707 100644
--- a/src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java
@@ -68,7 +68,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl {
final int[] winSize = convertToWindowUnits(new int[] {getScreen().getWidth(), getScreen().getHeight()});
setSizeImpl(winSize[0], winSize[1]);
- setWindowHandle(realizeWindow(true, getWindowWidth(), getWindowHeight()));
+ setWindowHandle(realizeWindow(true, getWidth(), getHeight()));
if (0 == getWindowHandle()) {
throw new NativeWindowException("Error native Window Handle is null");
}
@@ -109,7 +109,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl {
// n/a in BroadcomEGL
System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
} else {
- defineSize((width>0)?width:getWindowWidth(), (height>0)?height:getWindowHeight());
+ defineSize((width>0)?width:getWidth(), (height>0)?height:getHeight());
}
}
if(x>=0 || y>=0) {
diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
index 188e5b964..b5e874f65 100644
--- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java
@@ -110,7 +110,7 @@ public class WindowDriver extends WindowImpl {
chosenCaps.setBackgroundOpaque(capsRequested.isBackgroundOpaque());
}
setGraphicsConfiguration(cfg);
- nativeWindowHandle = CreateWindow0(display.getBCMHandle(), layer, getX(), getY(), getWindowWidth(), getWindowHeight(),
+ nativeWindowHandle = CreateWindow0(display.getBCMHandle(), layer, getX(), getY(), getWidth(), getHeight(),
chosenCaps.isBackgroundOpaque(), chosenCaps.getAlphaBits());
if (nativeWindowHandle == 0) {
throw new NativeWindowException("Error creating egl window: "+cfg);
diff --git a/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java
index 0b909bc08..158e6ab2f 100644
--- a/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java
@@ -112,8 +112,8 @@ public class WindowDriver extends WindowImpl {
}
// int _x=(x>=0)?x:this.x;
// int _y=(x>=0)?y:this.y;
- width=(width>0)?width:getWindowWidth();
- height=(height>0)?height:getWindowHeight();
+ width=(width>0)?width:getWidth();
+ height=(height>0)?height:getHeight();
if(width>0 || height>0) {
setSize0(eglWindowHandle, width, height);
}
@@ -158,7 +158,7 @@ public class WindowDriver extends WindowImpl {
@Override
protected void sizeChanged(boolean defer, int newWidth, int newHeight, boolean force) {
if(isFullscreen()) {
- ((ScreenDriver)getScreen()).sizeChanged(getWindowWidth(), getWindowHeight());
+ ((ScreenDriver)getScreen()).sizeChanged(getWidth(), getHeight());
}
super.sizeChanged(defer, newWidth, newHeight, force);
}
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
index bcdd5116f..fe9d4a08e 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
@@ -77,9 +77,9 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
if( changed ) {
pixelScale = newPixelScaleSafe;
if( sendEvent ) {
- super.sizeChanged(defer, getWindowWidth(), getWindowHeight(), true);
+ super.sizeChanged(defer, getWidth(), getHeight(), true);
} else {
- defineSize(getWindowWidth(), getWindowHeight());
+ defineSize(getWidth(), getHeight());
}
}
return changed;
@@ -151,7 +151,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
}
setGraphicsConfiguration(cfg);
- reconfigureWindowImpl(getX(), getY(), getWindowWidth(), getWindowHeight(), getReconfigureFlags(FLAG_CHANGE_VISIBILITY, true));
+ reconfigureWindowImpl(getX(), getY(), getWidth(), getHeight(), getReconfigureFlags(FLAG_CHANGE_VISIBILITY, true));
if (0 == getWindowHandle()) {
throw new NativeWindowException("Error creating window");
}
@@ -317,7 +317,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
if( 0 != handle && !isOffscreenInstance ) {
final NativeWindow parent = getParent();
final boolean useParent = useParent(parent);
- if( useParent && ( getWindowWidth() != newWidth || getWindowHeight() != newHeight ) ) {
+ if( useParent && ( getWidth() != newWidth || getHeight() != newHeight ) ) {
final int x=getX(), y=getY();
final Point p0S = getLocationOnScreenImpl(x, y, parent, useParent);
if(DEBUG_IMPLEMENTATION) {
diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java
index 00f935f86..bda844bb5 100644
--- a/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java
@@ -146,7 +146,7 @@ public class WindowDriver extends WindowImpl {
final long _windowHandle = CreateWindow0(DisplayDriver.getHInstance(), display.getWindowClassName(), display.getWindowClassName(),
winVer.getMajor(), winVer.getMinor(),
getParentWindowHandle(),
- getX(), getY(), getWindowWidth(), getWindowHeight(), autoPosition(), flags);
+ getX(), getY(), getWidth(), getHeight(), autoPosition(), flags);
if ( 0 == _windowHandle ) {
throw new NativeWindowException("Error creating window");
}
diff --git a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
index 9538f31a2..0eda37eac 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java
@@ -129,7 +129,7 @@ public class WindowDriver extends WindowImpl {
setWindowHandle(CreateWindow(getParentWindowHandle(),
edtDevice.getHandle(), screen.getIndex(), visualID,
display.getJavaObjectAtom(), display.getWindowDeleteAtom(),
- getX(), getY(), getWindowWidth(), getWindowHeight(), autoPosition(), flags,
+ getX(), getY(), getWidth(), getHeight(), autoPosition(), flags,
defaultIconDataSize, defaultIconData));
} finally {
edtDevice.unlock();
@@ -238,7 +238,7 @@ public class WindowDriver extends WindowImpl {
public Object run(long dpy) {
reconfigureWindow0( dpy, getScreenIndex(),
getParentWindowHandle(), getWindowHandle(), display.getWindowDeleteAtom(),
- getX(), getY(), getWindowWidth(), getWindowHeight(), flags);
+ getX(), getY(), getWidth(), getHeight(), flags);
return null;
}
});