Package com.jogamp.nativewindow
Class UpstreamSurfaceHookMutableSize
java.lang.Object
com.jogamp.nativewindow.UpstreamSurfaceHookMutableSize
- All Implemented Interfaces:
UpstreamSurfaceHook
,UpstreamSurfaceHook.MutableSize
- Direct Known Subclasses:
DelegatedUpstreamSurfaceHookMutableSize
,GenericUpstreamSurfacelessHook
,UpstreamWindowHookMutableSizePos
public class UpstreamSurfaceHookMutableSize
extends Object
implements UpstreamSurfaceHook.MutableSize
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jogamp.nativewindow.UpstreamSurfaceHook
UpstreamSurfaceHook.MutableSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
called withinProxySurface.createNotify()
within lock, before using surface.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
.final void
setSurfaceSize
(int width, int height) Resizes the upstream surface.toString()
-
Constructor Details
-
UpstreamSurfaceHookMutableSize
public UpstreamSurfaceHookMutableSize(int width, int height) - Parameters:
width
- initial widthheight
- initial height
-
-
Method Details
-
setSurfaceSize
public final void setSurfaceSize(int width, int height) Description copied from interface:UpstreamSurfaceHook.MutableSize
Resizes the upstream surface.- Specified by:
setSurfaceSize
in interfaceUpstreamSurfaceHook.MutableSize
- Parameters:
width
- new width in pixel unitsheight
- new height in pixel units
-
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
-
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
-
toString
-
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
-