Package com.jogamp.nativewindow
Class DelegatedUpstreamSurfaceHookWithSurfaceSize
java.lang.Object
com.jogamp.nativewindow.DelegatedUpstreamSurfaceHookWithSurfaceSize
- All Implemented Interfaces:
UpstreamSurfaceHook
public class DelegatedUpstreamSurfaceHookWithSurfaceSize
extends Object
implements UpstreamSurfaceHook
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jogamp.nativewindow.UpstreamSurfaceHook
UpstreamSurfaceHook.MutableSize
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatedUpstreamSurfaceHookWithSurfaceSize
(UpstreamSurfaceHook upstream, NativeSurface surface) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
called withinProxySurface.createNotify()
within lock, before using surface.final void
called withinProxySurface.destroyNotify()
within lock, before clearing fields.final int
Returns the height of the upstream surface in pixels, used ifProxySurface#UPSTREAM_PROVIDES_SIZE
is set.final int
Returns the width of the upstream surface in pixels, used ifProxySurface#UPSTREAM_PROVIDES_SIZE
is set.final NativeSurface
Returns the optional upstreamNativeSurface
if used by implementation, otherwisenull
.toString()
-
Constructor Details
-
DelegatedUpstreamSurfaceHookWithSurfaceSize
public DelegatedUpstreamSurfaceHookWithSurfaceSize(UpstreamSurfaceHook upstream, NativeSurface surface) - Parameters:
upstream
- optional upstream UpstreamSurfaceHook used forcreate(ProxySurface)
anddestroy(ProxySurface)
.surface
- mandatoryNativeSurface
used forgetSurfaceWidth(ProxySurface)
andgetSurfaceHeight(ProxySurface)
, not used forgetUpstreamSurface()
.
-
-
Method Details
-
getUpstreamSurface
Returns the optional upstreamNativeSurface
if used by implementation, otherwisenull
.One example is the JOGL EGLWrappedSurface, which might be backed up by a native platform NativeSurface (X11, WGL, CGL, ..).
Returns
null
.- Specified by:
getUpstreamSurface
in interfaceUpstreamSurfaceHook
-
create
Description copied from interface:UpstreamSurfaceHook
called withinProxySurface.createNotify()
within lock, before using surface.- Specified by:
create
in interfaceUpstreamSurfaceHook
-
destroy
Description copied from interface:UpstreamSurfaceHook
called withinProxySurface.destroyNotify()
within lock, before clearing fields.- Specified by:
destroy
in interfaceUpstreamSurfaceHook
-
getSurfaceWidth
Description copied from interface:UpstreamSurfaceHook
Returns the width of the upstream surface in pixels, used ifProxySurface#UPSTREAM_PROVIDES_SIZE
is set.- Specified by:
getSurfaceWidth
in interfaceUpstreamSurfaceHook
-
getSurfaceHeight
Description copied from interface:UpstreamSurfaceHook
Returns the height of the upstream surface in pixels, used ifProxySurface#UPSTREAM_PROVIDES_SIZE
is set.- Specified by:
getSurfaceHeight
in interfaceUpstreamSurfaceHook
-
toString
-