com.jogamp.newt.impl.windows
Class WindowsWindow

java.lang.Object
  extended by com.jogamp.newt.Window
      extended by com.jogamp.newt.impl.windows.WindowsWindow
All Implemented Interfaces:
NativeWindow, SurfaceUpdatedListener

public class WindowsWindow
extends Window


Field Summary
 
Fields inherited from class com.jogamp.newt.Window
caps, ClickTimeout, config, DEBUG_IMPLEMENTATION, DEBUG_KEY_EVENT, DEBUG_MOUSE_EVENT, DEBUG_WINDOW_EVENT, fullscreen, height, parentNativeWindow, parentWindowHandle, screen, title, undecorated, visible, width, windowHandle, windowLock, x, y
 
Fields inherited from interface javax.media.nativewindow.NativeWindow
LOCK_SUCCESS, LOCK_SURFACE_CHANGED, LOCK_SURFACE_NOT_READY, LOCK_SURFACE_UNLOCKED
 
Constructor Summary
WindowsWindow()
           
 
Method Summary
protected  void closeNative()
           
protected  void createNativeImpl()
          Create native windowHandle, ie creates a new native invisible window.
 Insets getInsets()
          Returns the insets for this native window (the difference between the size of the toplevel window with the decorations and the client area).
 long getSurfaceHandle()
          Returns the handle to the surface for this NativeWindow.
 boolean hasDeviceChanged()
          If the implementation is capable of detecting a device change return true and clear the status/reason of the change.
protected static boolean initIDs0()
           
 int lockSurface()
          Recursive and blocking lockSurface() implementation
protected  boolean reparentWindowImpl()
           
protected  void requestFocusImpl()
           
protected  boolean setFullscreenImpl(boolean fullscreen, int x, int y, int w, int h)
           
protected  void setPositionImpl(int x, int y)
           
protected  void setSizeImpl(int width, int height)
           
protected  void setTitleImpl(String title)
           
protected  void setVisibleImpl(boolean visible)
           
 void unlockSurface()
          Recursive and unblocking unlockSurface() implementation
protected  void windowDestroyed()
           
 
Methods inherited from class com.jogamp.newt.Window
addChild, addKeyListener, addKeyListener, addMouseListener, addMouseListener, addPaintListener, addPaintListener, addSurfaceUpdatedListener, addSurfaceUpdatedListener, addWindowListener, addWindowListener, create, create, destroy, destroy, enqueueKeyEvent, enqueueMouseEvent, enqueueWindowEvent, getDisplayHandle, getGraphicsConfiguration, getHeight, getInnerWindow, getKeyListener, getKeyListeners, getLockedStack, getMouseListener, getMouseListeners, getPaintListener, getParentNativeWindow, getRequestedCapabilities, getScreen, getScreenIndex, getSurfaceLockOwner, getSurfaceUpdatedListener, getSurfaceUpdatedListeners, getThreadName, getTitle, getWidth, getWindowHandle, getWindowListener, getWindowListeners, getWindowLock, getWrappedWindow, getX, getY, invalidate, invalidate, isDestroyed, isFullscreen, isNativeWindowValid, isSurfaceLocked, isUndecorated, isUndecorated, isVisible, removeAllSurfaceUpdatedListener, removeChild, removeKeyListener, removeMouseListener, removePaintListener, removeSurfaceUpdatedListener, removeWindowListener, reparentWindow, requestFocus, runOnEDTIfAvail, sendEvent, sendKeyEvent, sendMouseEvent, sendPaintEvent, sendPaintEvent, sendWindowEvent, setFullscreen, setHandleDestroyNotify, setPosition, setSize, setTitle, setUndecorated, setVisible, shouldNotCallThis, surfaceSwap, surfaceUpdated, toHexString, toHexString, toString, windowDestroyNotify, windowIsLocked, windowLock, windowUnlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindowsWindow

public WindowsWindow()
Method Detail

lockSurface

public int lockSurface()
                throws NativeWindowException
Description copied from class: Window
Recursive and blocking lockSurface() implementation

Specified by:
lockSurface in interface NativeWindow
Overrides:
lockSurface in class Window
Returns:
NativeWindow.LOCK_SUCCESS, NativeWindow.LOCK_SURFACE_CHANGED or NativeWindow.LOCK_SURFACE_NOT_READY.
Throws:
NativeWindowException - if surface is already locked
See Also:
ToolkitLock

unlockSurface

public void unlockSurface()
Description copied from class: Window
Recursive and unblocking unlockSurface() implementation

Specified by:
unlockSurface in interface NativeWindow
Overrides:
unlockSurface in class Window
See Also:
NativeWindow.lockSurface(), ToolkitLock

getSurfaceHandle

public long getSurfaceHandle()
Description copied from interface: NativeWindow
Returns the handle to the surface for this NativeWindow.

The surface handle should be set/update by NativeWindow.lockSurface(), where NativeWindow.unlockSurface() is not allowed to modify it. After NativeWindow.unlockSurface() it is no more guaranteed that the surface handle is still valid. The surface handle shall reflect the platform one for all drawable surface operations, e.g. opengl, swap-buffer.

On X11 this returns an entity of type Window, since there is no differentiation of surface and window there.
On Microsoft Windows this returns an entity of type HDC.

Specified by:
getSurfaceHandle in interface NativeWindow
Overrides:
getSurfaceHandle in class Window

hasDeviceChanged

public boolean hasDeviceChanged()
Description copied from class: Window
If the implementation is capable of detecting a device change return true and clear the status/reason of the change.

Overrides:
hasDeviceChanged in class Window

createNativeImpl

protected void createNativeImpl()
Description copied from class: Window
Create native windowHandle, ie creates a new native invisible window.

Specified by:
createNativeImpl in class Window

closeNative

protected void closeNative()
Specified by:
closeNative in class Window

windowDestroyed

protected void windowDestroyed()
Overrides:
windowDestroyed in class Window

setVisibleImpl

protected void setVisibleImpl(boolean visible)
Specified by:
setVisibleImpl in class Window

setSizeImpl

protected void setSizeImpl(int width,
                           int height)
Specified by:
setSizeImpl in class Window

setPositionImpl

protected void setPositionImpl(int x,
                               int y)
Specified by:
setPositionImpl in class Window

setFullscreenImpl

protected boolean setFullscreenImpl(boolean fullscreen,
                                    int x,
                                    int y,
                                    int w,
                                    int h)
Specified by:
setFullscreenImpl in class Window

reparentWindowImpl

protected boolean reparentWindowImpl()
Overrides:
reparentWindowImpl in class Window

requestFocusImpl

protected void requestFocusImpl()
Overrides:
requestFocusImpl in class Window

setTitleImpl

protected void setTitleImpl(String title)
Overrides:
setTitleImpl in class Window

getInsets

public Insets getInsets()
Description copied from class: Window
Returns the insets for this native window (the difference between the size of the toplevel window with the decorations and the client area).

Overrides:
getInsets in class Window
Returns:
insets for this platform window

initIDs0

protected static boolean initIDs0()


Copyright 2010 JogAmp Community.