public interface ProxySurface extends MutableSurface
NativeSurface
, i.e. MutableSurface
, while allowing an
UpstreamSurfaceHook
to influence the lifecycle and information.UpstreamSurfaceHook
,
MutableSurface
,
NativeSurface
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static int |
OPT_PROXY_OWNS_UPSTREAM_DEVICE
Implementation specific bit-value stating this
ProxySurface owns the upstream's AbstractGraphicsDevice . |
static int |
OPT_PROXY_OWNS_UPSTREAM_SURFACE
Implementation specific bit-value stating this
ProxySurface owns the upstream's surface handle |
static int |
OPT_UPSTREAM_WINDOW_INVISIBLE
Implementation specific bitvalue stating the upstream's
NativeSurface is an invisible window, i.e. |
LOCK_SUCCESS, LOCK_SURFACE_CHANGED, LOCK_SURFACE_NOT_READY, LOCK_SURFACE_UNLOCKED
Modifier and Type | Method and 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)
Returns
true if the give bit-mask v is set in this instance upstream-option-bits, otherwise false . |
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 the
UpstreamSurfaceHook lifecycle functions
UpstreamSurfaceHook.create(ProxySurface) and UpstreamSurfaceHook.destroy(ProxySurface) . |
int |
getUpstreamOptionBits() |
StringBuilder |
getUpstreamOptionBits(StringBuilder sink) |
NativeSurface |
getUpstreamSurface()
Returns the optional upstream
NativeSurface if used by implementation, otherwise null . |
UpstreamSurfaceHook |
getUpstreamSurfaceHook()
|
void |
setGraphicsConfiguration(AbstractGraphicsConfiguration cfg)
Allow redefining the AbstractGraphicsConfiguration
|
void |
setUpstreamSurfaceHook(UpstreamSurfaceHook hook)
Overrides the
UpstreamSurfaceHook . |
String |
toString() |
StringBuilder |
toString(StringBuilder sink) |
setSurfaceHandle
addSurfaceUpdatedListener, addSurfaceUpdatedListener, convertToPixelUnits, convertToWindowUnits, getDisplayHandle, getGraphicsConfiguration, getScreenIndex, getSurfaceHandle, getSurfaceHeight, getSurfaceLockOwner, getSurfaceWidth, isSurfaceLockedByOtherThread, lockSurface, removeSurfaceUpdatedListener, surfaceSwap, unlockSurface
surfaceUpdated
static final boolean DEBUG
static final int OPT_PROXY_OWNS_UPSTREAM_SURFACE
ProxySurface
owns the upstream's surface handlestatic final int OPT_PROXY_OWNS_UPSTREAM_DEVICE
ProxySurface
owns the upstream's AbstractGraphicsDevice
.static final int OPT_UPSTREAM_WINDOW_INVISIBLE
NativeSurface
is an invisible window, i.e. maybe incomplete.void setGraphicsConfiguration(AbstractGraphicsConfiguration cfg)
NativeSurface getUpstreamSurface()
NativeSurface
if used by implementation, otherwise null
.
The upstream NativeSurface
is retrieved via the UpstreamSurfaceHook
,
i.e. UpstreamSurfaceHook.getUpstreamSurface()
.
One example is the JOGL EGLWrappedSurface, which might be backed up by a native platform NativeSurface (X11, WGL, CGL, ..).
UpstreamSurfaceHook getUpstreamSurfaceHook()
void setUpstreamSurfaceHook(UpstreamSurfaceHook hook)
UpstreamSurfaceHook
.void enableUpstreamSurfaceHookLifecycle(boolean enable)
UpstreamSurfaceHook
lifecycle functions
UpstreamSurfaceHook.create(ProxySurface)
and UpstreamSurfaceHook.destroy(ProxySurface)
.
Use this for small code blocks where the native resources shall not change, i.e. resizing a derived (OpenGL) drawable.
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.StringBuilder getUpstreamOptionBits(StringBuilder sink)
int getUpstreamOptionBits()
boolean containsUpstreamOptionBits(int v)
true
if the give bit-mask v
is set in this instance upstream-option-bits, otherwise false
.void addUpstreamOptionBits(int v)
v
.void clearUpstreamOptionBits(int v)
~v
StringBuilder toString(StringBuilder sink)
Copyright 2010 JogAmp Community.