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 booleanstatic final intImplementation specific bit-value stating thisProxySurfaceowns the upstream'sAbstractGraphicsDevice.static final intImplementation specific bit-value stating thisProxySurfaceowns the upstream's surface handlestatic final intImplementation specific bitvalue stating the upstream'sNativeSurface's zero handle is valid.static final intImplementation 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
Modifier and TypeMethodDescriptionvoidaddUpstreamOptionBits(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.voidUpstreamSurfaceHook.create(ProxySurface)is being issued and the proxy surface/window handles shall be set.voidUpstreamSurfaceHook.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).intReturns the optional upstreamNativeSurfaceif used by implementation, otherwisenull.voidAllow redefining the AbstractGraphicsConfigurationvoidOverrides theUpstreamSurfaceHook.toString()toString(StringBuilder sink) Methods inherited from interface com.jogamp.nativewindow.MutableSurface
setSurfaceHandleMethods inherited from interface com.jogamp.nativewindow.NativeSurface
addSurfaceUpdatedListener, addSurfaceUpdatedListener, convertToPixelUnits, convertToWindowUnits, getDisplayHandle, getGraphicsConfiguration, getScreenIndex, getSurfaceHandle, getSurfaceHeight, getSurfaceLockOwner, getSurfaceWidth, isSurfaceLockedByOtherThread, lockSurface, removeSurfaceUpdatedListener, surfaceSwap, unlockSurfaceMethods 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 thisProxySurfaceowns the upstream's surface handle -
OPT_PROXY_OWNS_UPSTREAM_DEVICE
static final int OPT_PROXY_OWNS_UPSTREAM_DEVICEImplementation specific bit-value stating thisProxySurfaceowns the upstream'sAbstractGraphicsDevice. -
OPT_UPSTREAM_WINDOW_INVISIBLE
static final int OPT_UPSTREAM_WINDOW_INVISIBLEImplementation specific bitvalue stating the upstream'sNativeSurfaceis 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 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
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
-
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
-
toString
String toString()
-