com.jogamp.newt.impl.windows
Class WindowsWindow

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

public class WindowsWindow
extends WindowImpl


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jogamp.newt.impl.WindowImpl
WindowImpl.LifecycleHook
 
Nested classes/interfaces inherited from interface com.jogamp.newt.Window
Window.FocusRunnable, Window.ReparentAction
 
Field Summary
 
Fields inherited from class com.jogamp.newt.impl.WindowImpl
capabilitiesChooser, capsRequested, config, DEBUG_TEST_REPARENT_INCOMPATIBLE, fullscreen, hasFocus, height, nfs_height, nfs_width, nfs_x, nfs_y, title, undecorated, visible, width, x, y
 
Fields inherited from interface com.jogamp.newt.Window
DEBUG_IMPLEMENTATION, DEBUG_KEY_EVENT, DEBUG_MOUSE_EVENT, DEBUG_WINDOW_EVENT, TIMEOUT_NATIVEWINDOW
 
Fields inherited from interface javax.media.nativewindow.NativeSurface
LOCK_SUCCESS, LOCK_SURFACE_CHANGED, LOCK_SURFACE_NOT_READY, LOCK_SURFACE_UNLOCKED
 
Fields inherited from interface javax.media.nativewindow.WindowClosingProtocol
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE
 
Constructor Summary
WindowsWindow()
           
 
Method Summary
protected  void closeNativeImpl()
           
protected  void createNativeImpl()
          The native implementation must set the native windowHandle.
The implementation should invoke the referenced java state callbacks to notify this Java object of state changes.
 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).
protected  Point getLocationOnScreenImpl(int x, int y)
          Return screen coordinates of the given coordinates or null, in which case a NativeWindow traversal shall being used as demonstrated in WindowImpl.getLocationOnScreen(javax.media.nativewindow.util.Point).
protected static long getNewtWndProc0()
           
 long getSurfaceHandle()
          Returns the handle to the surface for this NativeSurface.
 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()
           
protected  int lockSurfaceImpl()
           
protected  boolean reconfigureWindowImpl(int x, int y, int width, int height, boolean parentChange, int fullScreenChange, int decorationChange)
          The native implementation should invoke the referenced java state callbacks to notify this Java object of state changes.
protected  void requestFocusImpl(boolean force)
          The native implementation must invoke WindowImpl.focusChanged(boolean) to change the focus state, if force == false.
protected  void setTitleImpl(String title)
           
protected  void setVisibleImpl(boolean visible, int x, int y, int width, int height)
          The native implementation must invoke WindowImpl.visibleChanged(boolean) to change the visibility state.
protected  void unlockSurfaceImpl()
           
 
Methods inherited from class com.jogamp.newt.impl.WindowImpl
addChild, addKeyListener, addKeyListener, addMouseListener, addMouseListener, addSurfaceUpdatedListener, addSurfaceUpdatedListener, addWindowListener, addWindowListener, consumeEvent, consumeKeyEvent, consumeMouseEvent, consumeWindowEvent, create, create, destroy, enqueueEvent, enqueueKeyEvent, enqueueMouseEvent, enqueueRequestFocus, enqueueWindowEvent, focusAction, focusChanged, getChosenCapabilities, getDefaultCloseOperation, getDisplayHandle, getGraphicsConfiguration, getHeight, getKeyListener, getKeyListeners, getLifecycleHook, getLocationOnScreen, getMouseListener, getMouseListeners, getParent, getParentWindowHandle, getRequestedCapabilities, getScreen, getScreenIndex, getSurfaceLockOwner, getSurfaceUpdatedListener, getSurfaceUpdatedListeners, getThreadName, getTitle, getWidth, getWindowHandle, getWindowListener, getWindowListeners, getWindowLockRecursionCount, getWrappedWindow, getX, getY, hasFocus, init, invalidate, invalidate, isFullscreen, isNativeValid, isSurfaceLocked, isSurfaceLockedByOtherThread, isUndecorated, isValid, isVisible, lockSurface, positionChanged, removeAllSurfaceUpdatedListener, removeChild, removeKeyListener, removeMouseListener, removeSurfaceUpdatedListener, removeWindowListener, reparentWindow, reparentWindow, requestFocus, runOnEDTIfAvail, sendKeyEvent, sendMouseEvent, sendWindowEvent, setCapabilitiesChooser, setDefaultCloseOperation, setFocusAction, setFullscreen, setHandleDestroyNotify, setLifecycleHook, setPosition, setSize, setTitle, setUndecorated, setVisible, setWindowHandle, shouldNotCallThis, sizeChanged, surfaceSwap, surfaceUpdated, toHexString, toHexString, toString, unlockSurface, visibleChanged, windowDestroyNotify, windowRepaint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindowsWindow

public WindowsWindow()
Method Detail

lockSurfaceImpl

protected int lockSurfaceImpl()
Overrides:
lockSurfaceImpl in class WindowImpl

unlockSurfaceImpl

protected void unlockSurfaceImpl()
Overrides:
unlockSurfaceImpl in class WindowImpl

getSurfaceHandle

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

The surface handle should be set/update by NativeSurface.lockSurface(), where NativeSurface.unlockSurface() is not allowed to modify it. After NativeSurface.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 NativeSurface
Overrides:
getSurfaceHandle in class WindowImpl

hasDeviceChanged

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

Overrides:
hasDeviceChanged in class WindowImpl

createNativeImpl

protected void createNativeImpl()
Description copied from class: WindowImpl
The native implementation must set the native windowHandle.
The implementation should invoke the referenced java state callbacks to notify this Java object of state changes.

Specified by:
createNativeImpl in class WindowImpl
See Also:
WindowImpl.windowDestroyNotify(), WindowImpl.focusChanged(boolean), WindowImpl.visibleChanged(boolean), #sizeChanged(int,int), WindowImpl.positionChanged(int,int), WindowImpl.windowDestroyNotify()

closeNativeImpl

protected void closeNativeImpl()
Specified by:
closeNativeImpl in class WindowImpl

setVisibleImpl

protected void setVisibleImpl(boolean visible,
                              int x,
                              int y,
                              int width,
                              int height)
Description copied from class: WindowImpl
The native implementation must invoke WindowImpl.visibleChanged(boolean) to change the visibility state. This may happen asynchronous within Window.TIMEOUT_NATIVEWINDOW.

Specified by:
setVisibleImpl in class WindowImpl

reconfigureWindowImpl

protected boolean reconfigureWindowImpl(int x,
                                        int y,
                                        int width,
                                        int height,
                                        boolean parentChange,
                                        int fullScreenChange,
                                        int decorationChange)
Description copied from class: WindowImpl
The native implementation should invoke the referenced java state callbacks to notify this Java object of state changes.

Specified by:
reconfigureWindowImpl in class WindowImpl
Parameters:
x - -1 if no position change requested, otherwise greater than zero
y - -1 if no position change requested, otherwise greater than zero
width - -1 if no size change requested, otherwise greater than zero
height - -1 if no size change requested, otherwise greater than zero
parentChange - true if reparenting requested, otherwise false
fullScreenChange - 0 if unchanged, -1 fullscreen off, 1 fullscreen on
decorationChange - 0 if unchanged, -1 undecorated, 1 decorated
See Also:
#sizeChanged(int,int), WindowImpl.positionChanged(int,int)

requestFocusImpl

protected void requestFocusImpl(boolean force)
Description copied from class: WindowImpl
The native implementation must invoke WindowImpl.focusChanged(boolean) to change the focus state, if force == false. This may happen asynchronous within Window.TIMEOUT_NATIVEWINDOW.

Specified by:
requestFocusImpl in class WindowImpl
Parameters:
force - if true, bypass WindowImpl.focusChanged(boolean) and force focus request

setTitleImpl

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

getInsets

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

Specified by:
getInsets in interface Window
Overrides:
getInsets in class WindowImpl
Returns:
insets for this platform window

getLocationOnScreenImpl

protected Point getLocationOnScreenImpl(int x,
                                        int y)
Description copied from class: WindowImpl
Return screen coordinates of the given coordinates or null, in which case a NativeWindow traversal shall being used as demonstrated in WindowImpl.getLocationOnScreen(javax.media.nativewindow.util.Point).

Specified by:
getLocationOnScreenImpl in class WindowImpl
Returns:
if not null, the screen location of the given coordinates

initIDs0

protected static boolean initIDs0()

getNewtWndProc0

protected static long getNewtWndProc0()


Copyright 2010 JogAmp Community.