com.jogamp.newt
Class OffscreenWindow

java.lang.Object
  extended by com.jogamp.newt.Window
      extended by com.jogamp.newt.OffscreenWindow
All Implemented Interfaces:
NativeWindow, SurfaceChangeable, SurfaceUpdatedListener

public class OffscreenWindow
extends Window
implements SurfaceChangeable


Field Summary
 
Fields inherited from class com.jogamp.newt.Window
ClickTimeout, config, DEBUG_IMPLEMENTATION, DEBUG_KEY_EVENT, DEBUG_MOUSE_EVENT, DEBUG_WINDOW_EVENT, eventMask, fullscreen, height, screen, title, undecorated, visible, width, windowHandle, x, y
 
Fields inherited from interface javax.media.nativewindow.NativeWindow
LOCK_SUCCESS, LOCK_SURFACE_CHANGED, LOCK_SURFACE_NOT_READY
 
Constructor Summary
OffscreenWindow()
           
 
Method Summary
protected  void closeNative()
           
protected  void createNative(long parentWindowHandle, Capabilities caps)
          Create native windowHandle, ie creates a new native invisible window.
 void destroy()
          destroys the window and releases windowing related resources.
 long getSurfaceHandle()
          Returns the handle to the surface for this NativeWindow.
 void invalidate()
          render all native window information invalid, as if the native window was destroyed
 boolean setFullscreen(boolean fullscreen)
           
 void setPosition(int x, int y)
          Sets the location of the top left corner of the window, including decorations (so the client area will be placed at x+insets.left,y+insets.top.
This call is ignored if in fullscreen mode.
 void setSize(int width, int height)
          Sets the size of the client area of the window, excluding decorations Total size of the window will be width+insets.left+insets.right, height+insets.top+insets.bottom
This call is ignored if in fullscreen mode.
 void setSurfaceHandle(long handle)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class com.jogamp.newt.Window
addKeyListener, addMouseListener, addPaintListener, addSurfaceUpdatedListener, addWindowListener, clearEventMask, create, create, destroy, getDisplayHandle, getGraphicsConfiguration, getHeight, getInsets, getKeyListeners, getLockedStack, getMouseListeners, getScreen, getScreenIndex, getSurfaceLockOwner, getSurfaceUpdatedListener, getTitle, getWidth, getWindowHandle, getWindowListeners, getWrappedWindow, getX, getY, hasDeviceChanged, isFullscreen, isSurfaceLocked, isUndecorated, isVisible, lockSurface, removeAllSurfaceUpdatedListener, removeKeyListener, removeMouseListener, removePaintListener, removeSurfaceUpdatedListener, removeWindowListener, requestFocus, sendEvent, sendKeyEvent, sendKeyEvent, sendMouseEvent, sendMouseEvent, sendPaintEvent, sendPaintEvent, sendWindowEvent, sendWindowEvent, setAutoDrawableClient, setTitle, setUndecorated, surfaceSwap, surfaceUpdated, toHexString, toHexString, toString, unlockSurface, windowDestroyed, windowDestroyNotify, wrapHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OffscreenWindow

public OffscreenWindow()
Method Detail

createNative

protected void createNative(long parentWindowHandle,
                            Capabilities caps)
Description copied from class: Window
Create native windowHandle, ie creates a new native invisible window. The parentWindowHandle may be null, in which case no window parenting is requested. Shall use the capabilities to determine the graphics configuration and shall set the chosen capabilities.

Specified by:
createNative in class Window

closeNative

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

invalidate

public void invalidate()
Description copied from interface: NativeWindow
render all native window information invalid, as if the native window was destroyed

Specified by:
invalidate in interface NativeWindow
Overrides:
invalidate in class Window
See Also:
NativeWindow.destroy()

destroy

public void destroy()
Description copied from interface: NativeWindow
destroys the window and releases windowing related resources.

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

setSurfaceHandle

public void setSurfaceHandle(long handle)
Specified by:
setSurfaceHandle in interface SurfaceChangeable

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

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible in class Window

setSize

public void setSize(int width,
                    int height)
Description copied from class: Window
Sets the size of the client area of the window, excluding decorations Total size of the window will be width+insets.left+insets.right, height+insets.top+insets.bottom
This call is ignored if in fullscreen mode.

Specified by:
setSize in interface SurfaceChangeable
Specified by:
setSize in class Window
Parameters:
width - of the client area of the window
height - of the client area of the window

setPosition

public void setPosition(int x,
                        int y)
Description copied from class: Window
Sets the location of the top left corner of the window, including decorations (so the client area will be placed at x+insets.left,y+insets.top.
This call is ignored if in fullscreen mode.

Specified by:
setPosition in class Window
Parameters:
x - coord of the top left corner
y - coord of the top left corner

setFullscreen

public boolean setFullscreen(boolean fullscreen)
Specified by:
setFullscreen in class Window


Copyright 2010 JogAmp Community.