Top Description Inners Methods
com.jogamp.nativewindow

public Interface UpstreamSurfaceHook

Known Direct Subinterfaces
com.jogamp.nativewindow.UpstreamSurfaceHook.MutableSize
Known Direct Implementers
com.jogamp.nativewindow.DelegatedUpstreamSurfaceHookWithSurfaceSize

Interface allowing upstream caller to pass lifecycle actions and size info to a ProxySurface instance.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
UpstreamSurfaceHook.MutableSize

UpstreamSurfaceHook w/ mutable size, allowing it's ProxySurface user to resize.

Method Summary

Modifier and TypeMethod and Description
public void
create(ProxySurface s)

called within ProxySurface#createNotify() within lock, before using surface.

public void
destroy(ProxySurface s)

called within ProxySurface#destroyNotify() within lock, before clearing fields.

public int
getSurfaceHeight(ProxySurface s)

Returns the height of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

public int
getSurfaceWidth(ProxySurface s)

Returns the width of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

public NativeSurface
getUpstreamSurface()

Returns the optional upstream NativeSurface if used by implementation, otherwise null.

Method Detail

createback to summary
public void create(ProxySurface s)

called within ProxySurface#createNotify() within lock, before using surface.

destroyback to summary
public void destroy(ProxySurface s)

called within ProxySurface#destroyNotify() within lock, before clearing fields.

getSurfaceHeightback to summary
public int getSurfaceHeight(ProxySurface s)

Returns the height of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

getSurfaceWidthback to summary
public int getSurfaceWidth(ProxySurface s)

Returns the width of the upstream surface in pixels, used if ProxySurface#UPSTREAM_PROVIDES_SIZE is set.

getUpstreamSurfaceback to summary
public NativeSurface getUpstreamSurface()

Returns the optional upstream NativeSurface if used by implementation, otherwise null.

One example is the JOGL EGLWrappedSurface, which might be backed up by a native platform NativeSurface (X11, WGL, CGL, ..).

com.jogamp.nativewindow back to summary

public Interface UpstreamSurfaceHook.MutableSize

extends UpstreamSurfaceHook
Known Direct Implementers
com.jogamp.nativewindow.UpstreamSurfaceHookMutableSize, jogamp.opengl.egl.EGLUpstreamSurfaceHook

UpstreamSurfaceHook w/ mutable size, allowing it's ProxySurface user to resize.

Method Summary

Modifier and TypeMethod and Description
public void
setSurfaceSize(int
new width in pixel units
width
,
int
new height in pixel units
height
)

Resizes the upstream surface.

Inherited from com.jogamp.nativewindow.UpstreamSurfaceHook:
createdestroygetSurfaceHeightgetSurfaceWidthgetUpstreamSurface

Method Detail

setSurfaceSizeback to summary
public void setSurfaceSize(int width, int height)

Resizes the upstream surface.

Parameters
width:int

new width in pixel units

height:int

new height in pixel units