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 Constructor Description UpstreamSurfaceHookMutableSize(int width, int height)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(ProxySurface s)called withinProxySurface.createNotify()within lock, before using surface.voiddestroy(ProxySurface s)called withinProxySurface.destroyNotify()within lock, before clearing fields.intgetSurfaceHeight(ProxySurface s)Returns the height of the upstream surface in pixels, used ifProxySurface#UPSTREAM_PROVIDES_SIZEis set.intgetSurfaceWidth(ProxySurface s)Returns the width of the upstream surface in pixels, used ifProxySurface#UPSTREAM_PROVIDES_SIZEis set.NativeSurfacegetUpstreamSurface()Returns the optional upstreamNativeSurfaceif used by implementation, otherwisenull.voidsetSurfaceSize(int width, int height)Resizes the upstream surface.StringtoString()
-
-
-
Method Detail
-
setSurfaceSize
public final void setSurfaceSize(int width, int height)Description copied from interface:UpstreamSurfaceHook.MutableSizeResizes the upstream surface.- Specified by:
setSurfaceSizein interfaceUpstreamSurfaceHook.MutableSize- Parameters:
width- new width in pixel unitsheight- new height in pixel units
-
getSurfaceWidth
public final int getSurfaceWidth(ProxySurface s)
Description copied from interface:UpstreamSurfaceHookReturns the width of the upstream surface in pixels, used ifProxySurface#UPSTREAM_PROVIDES_SIZEis set.- Specified by:
getSurfaceWidthin interfaceUpstreamSurfaceHook
-
getSurfaceHeight
public final int getSurfaceHeight(ProxySurface s)
Description copied from interface:UpstreamSurfaceHookReturns the height of the upstream surface in pixels, used ifProxySurface#UPSTREAM_PROVIDES_SIZEis set.- Specified by:
getSurfaceHeightin interfaceUpstreamSurfaceHook
-
create
public void create(ProxySurface s)
Description copied from interface:UpstreamSurfaceHookcalled withinProxySurface.createNotify()within lock, before using surface.- Specified by:
createin interfaceUpstreamSurfaceHook
-
destroy
public void destroy(ProxySurface s)
Description copied from interface:UpstreamSurfaceHookcalled withinProxySurface.destroyNotify()within lock, before clearing fields.- Specified by:
destroyin interfaceUpstreamSurfaceHook
-
getUpstreamSurface
public final NativeSurface getUpstreamSurface()
Returns the optional upstreamNativeSurfaceif 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:
getUpstreamSurfacein interfaceUpstreamSurfaceHook
-
-