Package com.jogamp.nativewindow
Interface ProxySurface
- All Superinterfaces:
MutableSurface
,NativeSurface
,SurfaceUpdatedListener
Provides a mutable
NativeSurface
, i.e. MutableSurface
, while allowing an
UpstreamSurfaceHook
to influence the lifecycle and information.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
static final int
Implementation specific bit-value stating thisProxySurface
owns the upstream'sAbstractGraphicsDevice
.static final int
Implementation specific bit-value stating thisProxySurface
owns the upstream's surface handlestatic final int
Implementation specific bitvalue stating the upstream'sNativeSurface
's zero handle is valid.static final int
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
Modifier and TypeMethodDescriptionvoid
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
UpstreamSurfaceHook.create(ProxySurface)
is being issued and the proxy surface/window handles shall be set.void
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
Returns the optional upstreamNativeSurface
if used by implementation, otherwisenull
.void
Allow redefining the AbstractGraphicsConfigurationvoid
Overrides theUpstreamSurfaceHook
.toString()
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, getScreenIndex, getSurfaceHandle, getSurfaceHeight, getSurfaceLockOwner, getSurfaceWidth, isSurfaceLockedByOtherThread, lockSurface, removeSurfaceUpdatedListener, surfaceSwap, unlockSurface
Methods inherited from interface com.jogamp.nativewindow.SurfaceUpdatedListener
surfaceUpdated
-
Field Details
-
DEBUG
static final boolean DEBUG -
OPT_PROXY_OWNS_UPSTREAM_SURFACE
static final int OPT_PROXY_OWNS_UPSTREAM_SURFACEImplementation specific bit-value stating thisProxySurface
owns the upstream's surface handle -
OPT_PROXY_OWNS_UPSTREAM_DEVICE
static final int OPT_PROXY_OWNS_UPSTREAM_DEVICEImplementation specific bit-value stating thisProxySurface
owns the upstream'sAbstractGraphicsDevice
. -
OPT_UPSTREAM_WINDOW_INVISIBLE
static final int OPT_UPSTREAM_WINDOW_INVISIBLEImplementation specific bitvalue stating the upstream'sNativeSurface
is an invisible window, i.e. maybe incomplete. -
OPT_UPSTREAM_SURFACELESS
static final int OPT_UPSTREAM_SURFACELESSImplementation specific bitvalue stating the upstream'sNativeSurface
's zero handle is valid.
-
-
Method Details
-
setGraphicsConfiguration
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
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
-
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
-
toString
String toString()
-