com.jogamp.nativewindow
Class WrappedSurface

java.lang.Object
  extended by javax.media.nativewindow.ProxySurface
      extended by com.jogamp.nativewindow.WrappedSurface
All Implemented Interfaces:
NativeSurface, SurfaceChangeable, SurfaceUpdatedListener

public class WrappedSurface
extends ProxySurface
implements SurfaceChangeable


Field Summary
 
Fields inherited from class javax.media.nativewindow.ProxySurface
DEBUG
 
Fields inherited from interface javax.media.nativewindow.NativeSurface
LOCK_SUCCESS, LOCK_SURFACE_CHANGED, LOCK_SURFACE_NOT_READY, LOCK_SURFACE_UNLOCKED
 
Constructor Summary
WrappedSurface(AbstractGraphicsConfiguration cfg)
           
WrappedSurface(AbstractGraphicsConfiguration cfg, long handle)
           
 
Method Summary
 long getSurfaceHandle()
          Returns the handle to the surface for this NativeSurface.
 void setSurfaceHandle(long surfaceHandle)
          Sets the surface handle which is created outside of this implementation
 String toString()
           
 
Methods inherited from class javax.media.nativewindow.ProxySurface
addSurfaceUpdatedListener, addSurfaceUpdatedListener, getDisplayHandle, getGraphicsConfiguration, getHeight, getScreenIndex, getSurfaceLockOwner, getWidth, isSurfaceLocked, isSurfaceLockedByOtherThread, lockSurface, removeSurfaceUpdatedListener, surfaceSizeChanged, surfaceSwap, surfaceUpdated, unlockSurface, validateSurfaceLocked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.media.nativewindow.SurfaceChangeable
surfaceSizeChanged
 

Constructor Detail

WrappedSurface

public WrappedSurface(AbstractGraphicsConfiguration cfg)

WrappedSurface

public WrappedSurface(AbstractGraphicsConfiguration cfg,
                      long handle)
Method Detail

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
Specified by:
getSurfaceHandle in class ProxySurface

setSurfaceHandle

public final void setSurfaceHandle(long surfaceHandle)
Description copied from interface: SurfaceChangeable
Sets the surface handle which is created outside of this implementation

Specified by:
setSurfaceHandle in interface SurfaceChangeable

toString

public String toString()
Specified by:
toString in class ProxySurface


Copyright 2010 JogAmp Community.