diff options
author | Sven Gothel <[email protected]> | 2010-12-09 23:27:18 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-09 23:27:18 +0100 |
commit | da97bc022020546455b293aea25dba3ee59152f5 (patch) | |
tree | 381fcf2a19231d24b4c8610d023ee925a1b16d5e /src/newt/classes/com/jogamp | |
parent | a247475fa8834a289de0d86b6928b2c191ebf50d (diff) |
NEWT/Windows: Use GDI GetDC/ReleaseDC
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java b/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java index d4f4f77ea..d26f4dc82 100644 --- a/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java +++ b/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java @@ -56,7 +56,7 @@ public class WindowsWindow extends WindowImpl { protected int lockSurfaceImpl() { if( 0 != getWindowHandle() && 0 == hdc ) { - hdc = GetDC0(getWindowHandle()); + hdc = GDI.GetDC(getWindowHandle()); hmon = MonitorFromWindow0(getWindowHandle()); } return ( 0 != hdc ) ? LOCK_SUCCESS : LOCK_SURFACE_NOT_READY; @@ -64,7 +64,7 @@ public class WindowsWindow extends WindowImpl { protected void unlockSurfaceImpl() { if ( 0 != hdc && 0 != getWindowHandle() && getWindowLockRecursionCount() == 0) { - ReleaseDC0(getWindowHandle(), hdc); + GDI.ReleaseDC(getWindowHandle(), hdc); hdc=0; } } @@ -116,7 +116,7 @@ public class WindowsWindow extends WindowImpl { if (hdc != 0) { if(windowHandleClose != 0) { try { - ReleaseDC0(windowHandleClose, hdc); + GDI.ReleaseDC(windowHandleClose, hdc); } catch (Throwable t) { if(DEBUG_IMPLEMENTATION) { Exception e = new Exception("Warning: closeNativeImpl failed - "+Thread.currentThread().getName(), t); @@ -183,8 +183,6 @@ public class WindowsWindow extends WindowImpl { boolean isUndecorated, int x, int y, int width, int height); private native void DestroyWindow0(long windowHandle); - private native long GetDC0(long windowHandle); - private native void ReleaseDC0(long windowHandle, long hdc); private native long MonitorFromWindow0(long windowHandle); private native void setVisible0(long windowHandle, boolean visible, boolean top, int x, int y, int width, int height); private native void reconfigureWindow0(long parentWindowHandle, long windowHandle, |