com.jogamp.nativewindow
Class WrappedSurface

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

public class WrappedSurface
extends ProxySurface


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.media.nativewindow.ProxySurface
ProxySurface.UpstreamSurfaceHook
 
Field Summary
 
Fields inherited from class javax.media.nativewindow.ProxySurface
DEBUG, initialHeight, initialWidth, INVISIBLE_WINDOW, OWN_DEVICE
 
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, long handle, int initialWidth, int initialHeight, ProxySurface.UpstreamSurfaceHook upstream)
           
 
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, createNotify, destroyNotify, getDisplayHandle, getGraphicsConfiguration, getHeight, getImplBitfield, getScreenIndex, getSurfaceLockOwner, getUpstreamSurfaceHook, getWidth, isSurfaceLockedByOtherThread, lockSurface, removeSurfaceUpdatedListener, setImplBitfield, surfaceSwap, surfaceUpdated, unlockSurface, validateSurfaceLocked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WrappedSurface

public WrappedSurface(AbstractGraphicsConfiguration cfg,
                      long handle,
                      int initialWidth,
                      int initialHeight,
                      ProxySurface.UpstreamSurfaceHook upstream)
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: MutableSurface
Sets the surface handle which is created outside of this implementation.

Specified by:
setSurfaceHandle in interface MutableSurface
Specified by:
setSurfaceHandle in class ProxySurface

toString

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


Copyright 2010 JogAmp Community.