javax.media.nativewindow
Interface OffscreenLayerSurface


public interface OffscreenLayerSurface

Interface specifying the offscreen layer surface protocol.


Method Summary
 void attachSurfaceLayer(long layerHandle)
          Attach the offscreen layer to this offscreen layer surface.
 void detachSurfaceLayer()
          Detaches a previously attached offscreen layer from this offscreen layer surface.
 long getAttachedSurfaceLayer()
          Returns the attached surface layer or null if none is attached.
 boolean isSurfaceLayerAttached()
          Returns true if a surface layer is attached, otherwise false.
 void layoutSurfaceLayer()
          Layout the offscreen layer according to the implementing class's constraints.
 void setChosenCapabilities(CapabilitiesImmutable caps)
          Sets the capabilities of this instance, allowing upstream API's to refine it, i.e.
 

Method Detail

attachSurfaceLayer

void attachSurfaceLayer(long layerHandle)
                        throws NativeWindowException
Attach the offscreen layer to this offscreen layer surface.

Implementation may realize all required resources at this point.

It is mandatory that any related resources, e.g. a shared context, are not locked while calling this method.

Throws:
NativeWindowException - if #isOffscreenLayerSurfaceEnabled() == false
See Also:
#isOffscreenLayerSurfaceEnabled()

layoutSurfaceLayer

void layoutSurfaceLayer()
                        throws NativeWindowException
Layout the offscreen layer according to the implementing class's constraints.

This method allows triggering a re-layout of the offscreen surface in case the implementation requires it.

Call this method if any parent or ancestor's layout has been changed, which could affects the layout of this surface.

Throws:
NativeWindowException - if #isOffscreenLayerSurfaceEnabled() == false
See Also:
#isOffscreenLayerSurfaceEnabled()

detachSurfaceLayer

void detachSurfaceLayer()
                        throws NativeWindowException
Detaches a previously attached offscreen layer from this offscreen layer surface.

Throws:
NativeWindowException - if #isOffscreenLayerSurfaceEnabled() == false or no surface layer is attached.
See Also:
attachSurfaceLayer(long), #isOffscreenLayerSurfaceEnabled()

getAttachedSurfaceLayer

long getAttachedSurfaceLayer()
Returns the attached surface layer or null if none is attached.


isSurfaceLayerAttached

boolean isSurfaceLayerAttached()
Returns true if a surface layer is attached, otherwise false.


setChosenCapabilities

void setChosenCapabilities(CapabilitiesImmutable caps)
Sets the capabilities of this instance, allowing upstream API's to refine it, i.e. OpenGL related settings.



Copyright 2010 JogAmp Community.