Package com.jogamp.nativewindow
Interface ProxySurface
-
- All Superinterfaces:
MutableSurface,NativeSurface,SurfaceUpdatedListener
public interface ProxySurface extends MutableSurface
Provides a mutableNativeSurface, i.e.MutableSurface, while allowing anUpstreamSurfaceHookto influence the lifecycle and information.- See Also:
UpstreamSurfaceHook,MutableSurface,NativeSurface
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUGstatic intOPT_PROXY_OWNS_UPSTREAM_DEVICEImplementation specific bit-value stating thisProxySurfaceowns the upstream'sAbstractGraphicsDevice.static intOPT_PROXY_OWNS_UPSTREAM_SURFACEImplementation specific bit-value stating thisProxySurfaceowns the upstream's surface handlestatic intOPT_UPSTREAM_SURFACELESSImplementation specific bitvalue stating the upstream'sNativeSurface's zero handle is valid.static intOPT_UPSTREAM_WINDOW_INVISIBLEImplementation specific bitvalue stating the upstream'sNativeSurfaceis an invisible window, i.e.-
Fields inherited from interface com.jogamp.nativewindow.NativeSurface
LOCK_SUCCESS, LOCK_SURFACE_CHANGED, LOCK_SURFACE_NOT_READY, LOCK_SURFACE_UNLOCKED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddUpstreamOptionBits(int v)Add the given bit-mask to this instance upstream-option-bits using bit-or w/v.voidclearUpstreamOptionBits(int v)Clear the given bit-mask from this instance upstream-option-bits using bit-and w/~vbooleancontainsUpstreamOptionBits(int v)Returnstrueif the give bit-maskvis set in this instance upstream-option-bits, otherwisefalse.voidcreateNotify()UpstreamSurfaceHook.create(ProxySurface)is being issued and the proxy surface/window handles shall be set.voiddestroyNotify()UpstreamSurfaceHook.destroy(ProxySurface)is being issued and all proxy surface/window handles shall be cleared.voidenableUpstreamSurfaceHookLifecycle(boolean enable)Enables or disables theUpstreamSurfaceHooklifecycle functionsUpstreamSurfaceHook.create(ProxySurface)andUpstreamSurfaceHook.destroy(ProxySurface).intgetUpstreamOptionBits()StringBuildergetUpstreamOptionBits(StringBuilder sink)NativeSurfacegetUpstreamSurface()Returns the optional upstreamNativeSurfaceif used by implementation, otherwisenull.UpstreamSurfaceHookgetUpstreamSurfaceHook()voidsetGraphicsConfiguration(AbstractGraphicsConfiguration cfg)Allow redefining the AbstractGraphicsConfigurationvoidsetUpstreamSurfaceHook(UpstreamSurfaceHook hook)Overrides theUpstreamSurfaceHook.StringtoString()StringBuildertoString(StringBuilder sink)-
Methods inherited from interface com.jogamp.nativewindow.MutableSurface
setSurfaceHandle
-
Methods inherited from interface com.jogamp.nativewindow.NativeSurface
addSurfaceUpdatedListener, addSurfaceUpdatedListener, convertToPixelUnits, convertToWindowUnits, getDisplayHandle, getGraphicsConfiguration, getLock, getScreenIndex, getSurfaceHandle, getSurfaceHeight, getSurfaceLockOwner, getSurfaceWidth, isSurfaceLockedByOtherThread, lockSurface, removeSurfaceUpdatedListener, surfaceSwap, unlockSurface
-
Methods inherited from interface com.jogamp.nativewindow.SurfaceUpdatedListener
surfaceUpdated
-
-
-
-
Field Detail
-
DEBUG
static final boolean DEBUG
-
OPT_PROXY_OWNS_UPSTREAM_SURFACE
static final int OPT_PROXY_OWNS_UPSTREAM_SURFACE
Implementation specific bit-value stating thisProxySurfaceowns the upstream's surface handle
-
OPT_PROXY_OWNS_UPSTREAM_DEVICE
static final int OPT_PROXY_OWNS_UPSTREAM_DEVICE
Implementation specific bit-value stating thisProxySurfaceowns the upstream'sAbstractGraphicsDevice.
-
OPT_UPSTREAM_WINDOW_INVISIBLE
static final int OPT_UPSTREAM_WINDOW_INVISIBLE
Implementation specific bitvalue stating the upstream'sNativeSurfaceis an invisible window, i.e. maybe incomplete.
-
OPT_UPSTREAM_SURFACELESS
static final int OPT_UPSTREAM_SURFACELESS
Implementation specific bitvalue stating the upstream'sNativeSurface's zero handle is valid.
-
-
Method Detail
-
setGraphicsConfiguration
void setGraphicsConfiguration(AbstractGraphicsConfiguration cfg)
Allow redefining the AbstractGraphicsConfiguration
-
getUpstreamSurface
NativeSurface getUpstreamSurface()
Returns the optional upstreamNativeSurfaceif used by implementation, otherwisenull.The upstream
NativeSurfaceis retrieved viathe UpstreamSurfaceHook, i.e.UpstreamSurfaceHook.getUpstreamSurface().One example is the JOGL EGLWrappedSurface, which might be backed up by a native platform NativeSurface (X11, WGL, CGL, ..).
-
getUpstreamSurfaceHook
UpstreamSurfaceHook getUpstreamSurfaceHook()
-
setUpstreamSurfaceHook
void setUpstreamSurfaceHook(UpstreamSurfaceHook hook)
Overrides theUpstreamSurfaceHook.
-
enableUpstreamSurfaceHookLifecycle
void enableUpstreamSurfaceHookLifecycle(boolean enable)
Enables or disables theUpstreamSurfaceHooklifecycle functionsUpstreamSurfaceHook.create(ProxySurface)andUpstreamSurfaceHook.destroy(ProxySurface).Use this for small code blocks where the native resources shall not change, i.e. resizing a derived (OpenGL) drawable.
-
createNotify
void createNotify()
UpstreamSurfaceHook.create(ProxySurface)is being issued and the proxy surface/window handles shall be set.
-
destroyNotify
void destroyNotify()
UpstreamSurfaceHook.destroy(ProxySurface)is being issued and all proxy surface/window handles shall be cleared.
-
getUpstreamOptionBits
StringBuilder getUpstreamOptionBits(StringBuilder sink)
-
getUpstreamOptionBits
int getUpstreamOptionBits()
-
containsUpstreamOptionBits
boolean containsUpstreamOptionBits(int v)
Returnstrueif the give bit-maskvis set in this instance upstream-option-bits, otherwisefalse.
-
addUpstreamOptionBits
void addUpstreamOptionBits(int v)
Add the given bit-mask to this instance upstream-option-bits using bit-or w/v.
-
clearUpstreamOptionBits
void clearUpstreamOptionBits(int v)
Clear the given bit-mask from this instance upstream-option-bits using bit-and w/~v
-
toString
StringBuilder toString(StringBuilder sink)
-
-