Package com.jogamp.nativewindow
Interface ProxySurface
-
- All Superinterfaces:
MutableSurface
,NativeSurface
,SurfaceUpdatedListener
public interface ProxySurface extends MutableSurface
Provides a mutableNativeSurface
, i.e.MutableSurface
, while allowing anUpstreamSurfaceHook
to influence the lifecycle and information.- See Also:
UpstreamSurfaceHook
,MutableSurface
,NativeSurface
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEBUG
static int
OPT_PROXY_OWNS_UPSTREAM_DEVICE
Implementation specific bit-value stating thisProxySurface
owns the upstream'sAbstractGraphicsDevice
.static int
OPT_PROXY_OWNS_UPSTREAM_SURFACE
Implementation specific bit-value stating thisProxySurface
owns the upstream's surface handlestatic int
OPT_UPSTREAM_SURFACELESS
Implementation specific bitvalue stating the upstream'sNativeSurface
's zero handle is valid.static int
OPT_UPSTREAM_WINDOW_INVISIBLE
Implementation specific bitvalue stating the upstream'sNativeSurface
is 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 void
addUpstreamOptionBits(int v)
Add the given bit-mask to this instance upstream-option-bits using bit-or w/v
.void
clearUpstreamOptionBits(int v)
Clear the given bit-mask from this instance upstream-option-bits using bit-and w/~v
boolean
containsUpstreamOptionBits(int v)
Returnstrue
if the give bit-maskv
is set in this instance upstream-option-bits, otherwisefalse
.void
createNotify()
UpstreamSurfaceHook.create(ProxySurface)
is being issued and the proxy surface/window handles shall be set.void
destroyNotify()
UpstreamSurfaceHook.destroy(ProxySurface)
is being issued and all proxy surface/window handles shall be cleared.void
enableUpstreamSurfaceHookLifecycle(boolean enable)
Enables or disables theUpstreamSurfaceHook
lifecycle functionsUpstreamSurfaceHook.create(ProxySurface)
andUpstreamSurfaceHook.destroy(ProxySurface)
.int
getUpstreamOptionBits()
StringBuilder
getUpstreamOptionBits(StringBuilder sink)
NativeSurface
getUpstreamSurface()
Returns the optional upstreamNativeSurface
if used by implementation, otherwisenull
.UpstreamSurfaceHook
getUpstreamSurfaceHook()
void
setGraphicsConfiguration(AbstractGraphicsConfiguration cfg)
Allow redefining the AbstractGraphicsConfigurationvoid
setUpstreamSurfaceHook(UpstreamSurfaceHook hook)
Overrides theUpstreamSurfaceHook
.String
toString()
StringBuilder
toString(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 thisProxySurface
owns the upstream's surface handle
-
OPT_PROXY_OWNS_UPSTREAM_DEVICE
static final int OPT_PROXY_OWNS_UPSTREAM_DEVICE
Implementation specific bit-value stating thisProxySurface
owns the upstream'sAbstractGraphicsDevice
.
-
OPT_UPSTREAM_WINDOW_INVISIBLE
static final int OPT_UPSTREAM_WINDOW_INVISIBLE
Implementation specific bitvalue stating the upstream'sNativeSurface
is 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 upstreamNativeSurface
if used by implementation, otherwisenull
.The upstream
NativeSurface
is 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 theUpstreamSurfaceHook
lifecycle 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)
Returnstrue
if the give bit-maskv
is 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)
-
-