Top Description Methods
com.jogamp.nativewindow

public Interface OffscreenLayerSurface

Known Direct Implementers
com.jogamp.nativewindow.awt.JAWTWindow
Imports
com.jogamp.nativewindow.util.PixelRectangle, .PointImmutable, com.jogamp.common.util.locks.RecursiveLock

Interface specifying the offscreen layer surface protocol.

Method Summary

Modifier and TypeMethod and Description
public void
attachSurfaceLayer(final long layerHandle)

Attach the offscreen layer to this offscreen layer surface.

public void
detachSurfaceLayer()

Detaches a previously attached offscreen layer from this offscreen layer surface.

public long
getAttachedSurfaceLayer()

Returns the attached surface layer or null if none is attached.

public RecursiveLock
getLock()

Returns the recursive lock object of this surface, which synchronizes multithreaded access.

public boolean

Returns:

true if successful, i.e. on-screen surface/window w/ cursor capabilities exists. Otherwise false.
hideCursor
()

Optional method hiding the cursor in the corresponding on-screen surface/window, if exists.

public boolean
isSurfaceLayerAttached()

Returns true if a surface layer is attached, otherwise false.

public void
setChosenCapabilities(CapabilitiesImmutable caps)

Sets the capabilities of this instance, allowing upstream API's to refine it, i.e. OpenGL related settings.

public boolean

Returns:

true if successful, i.e. on-screen surface/window w/ cursor capabilities exists. Otherwise false.
setCursor
(PixelRectangle
cursor pixels, maybe null for default cursor
pixelrect
,
PointImmutable
maybe null for default cursor
hotSpot
)

Optional method setting cursor in the corresponding on-screen surface/window, if exists.

Method Detail

attachSurfaceLayerback to summary
public void attachSurfaceLayer(final long layerHandle) throws NativeWindowException

Attach the offscreen layer to this offscreen layer surface.

Implementation may realize all required resources at this point.

Exceptions
NativeWindowException:
if isOffscreenLayerSurfaceEnabled() == false
See Also
isOffscreenLayerSurfaceEnabled()
detachSurfaceLayerback to summary
public void detachSurfaceLayer() throws NativeWindowException

Detaches a previously attached offscreen layer from this offscreen layer surface.

Exceptions
NativeWindowException:
if isOffscreenLayerSurfaceEnabled() == false or no surface layer is attached.
See Also
attachSurfaceLayer(long), isOffscreenLayerSurfaceEnabled()
getAttachedSurfaceLayerback to summary
public long getAttachedSurfaceLayer()

Returns the attached surface layer or null if none is attached.

getLockback to summary
public RecursiveLock getLock()

Returns the recursive lock object of this surface, which synchronizes multithreaded access.

hideCursorback to summary
public boolean hideCursor()

Optional method hiding the cursor in the corresponding on-screen surface/window, if exists.

Returns:boolean

true if successful, i.e. on-screen surface/window w/ cursor capabilities exists. Otherwise false.

isSurfaceLayerAttachedback to summary
public boolean isSurfaceLayerAttached()

Returns true if a surface layer is attached, otherwise false.

setChosenCapabilitiesback to summary
public void setChosenCapabilities(CapabilitiesImmutable caps)

Sets the capabilities of this instance, allowing upstream API's to refine it, i.e. OpenGL related settings.

setCursorback to summary
public boolean setCursor(PixelRectangle pixelrect, PointImmutable hotSpot)

Optional method setting cursor in the corresponding on-screen surface/window, if exists.

Parameters
pixelrect:PixelRectangle

cursor pixels, maybe null for default cursor

hotSpot:PointImmutable

maybe null for default cursor

Returns:boolean

true if successful, i.e. on-screen surface/window w/ cursor capabilities exists. Otherwise false.