JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.nativewindow.ProxySurface Interface Reference

Provides a mutable NativeSurface, i.e. More...

Inheritance diagram for com.jogamp.nativewindow.ProxySurface:
Collaboration diagram for com.jogamp.nativewindow.ProxySurface:

Public Member Functions

void setGraphicsConfiguration (AbstractGraphicsConfiguration cfg)
 Allow redefining the AbstractGraphicsConfiguration. More...
 
NativeSurface getUpstreamSurface ()
 Returns the optional upstream NativeSurface if used by implementation, otherwise null. More...
 
UpstreamSurfaceHook getUpstreamSurfaceHook ()
 Returns the UpstreamSurfaceHook if set, otherwise null. More...
 
void setUpstreamSurfaceHook (UpstreamSurfaceHook hook)
 Overrides the UpstreamSurfaceHook. More...
 
void enableUpstreamSurfaceHookLifecycle (boolean enable)
 Enables or disables the UpstreamSurfaceHook lifecycle functions UpstreamSurfaceHook#create(ProxySurface) and UpstreamSurfaceHook#destroy(ProxySurface). More...
 
void createNotify ()
 UpstreamSurfaceHook#create(ProxySurface) is being issued and the proxy surface/window handles shall be set. More...
 
void destroyNotify ()
 UpstreamSurfaceHook#destroy(ProxySurface) is being issued and all proxy surface/window handles shall be cleared. More...
 
StringBuilder getUpstreamOptionBits (StringBuilder sink)
 
int getUpstreamOptionBits ()
 
boolean containsUpstreamOptionBits (int v)
 Returns true if the give bit-mask v is set in this instance upstream-option-bits, otherwise false. More...
 
void addUpstreamOptionBits (int v)
 Add the given bit-mask to this instance upstream-option-bits using bit-or w/ v. More...
 
void clearUpstreamOptionBits (int v)
 Clear the given bit-mask from this instance upstream-option-bits using bit-and w/ ~v More...
 
StringBuilder toString (StringBuilder sink)
 
String toString ()
 
- Public Member Functions inherited from com.jogamp.nativewindow.MutableSurface
void setSurfaceHandle (long surfaceHandle)
 Sets the surface handle which is created outside of this implementation. More...
 
- Public Member Functions inherited from com.jogamp.nativewindow.NativeSurface
RecursiveLock getLock ()
 Returns the implementation's RecursiveLock synchronizing multithreaded access if used. More...
 
int lockSurface () throws NativeWindowException, RuntimeException
 Lock the surface of this native window. More...
 
void unlockSurface ()
 Unlock the surface of this native window. More...
 
boolean isSurfaceLockedByOtherThread ()
 Query if surface is locked by another thread, i.e. More...
 
Thread getSurfaceLockOwner ()
 Return the locking owner's Thread, or null if not locked. More...
 
boolean surfaceSwap ()
 Provide a mechanism to utilize custom (pre-) swap surface code. More...
 
void addSurfaceUpdatedListener (SurfaceUpdatedListener l)
 Appends the given SurfaceUpdatedListener to the end of the list. More...
 
void addSurfaceUpdatedListener (int index, SurfaceUpdatedListener l) throws IndexOutOfBoundsException
 Inserts the given SurfaceUpdatedListener at the specified position in the list. More...
 
void removeSurfaceUpdatedListener (SurfaceUpdatedListener l)
 Remove the specified SurfaceUpdatedListener from the list. More...
 
long getSurfaceHandle ()
 Returns the handle to the surface for this NativeSurface. More...
 
int getSurfaceWidth ()
 Returns the width of the client area excluding insets (window decorations) in pixel units. More...
 
int getSurfaceHeight ()
 Returns the height of the client area excluding insets (window decorations) in pixel units. More...
 
int[] convertToWindowUnits (final int[] pixelUnitsAndResult)
 Converts the given pixel units into window units in place. More...
 
int[] convertToPixelUnits (final int[] windowUnitsAndResult)
 Converts the given window units into pixel units in place. More...
 
AbstractGraphicsConfiguration getGraphicsConfiguration ()
 Returns the graphics configuration corresponding to this window. More...
 
long getDisplayHandle ()
 Convenience: Get display handle from AbstractGraphicsConfiguration . More...
 
int getScreenIndex ()
 Convenience: Get display handle from AbstractGraphicsConfiguration . More...
 
- Public Member Functions inherited from com.jogamp.nativewindow.SurfaceUpdatedListener
void surfaceUpdated (Object updater, NativeSurface ns, long when)
 Notification of a surface update event, eg. More...
 

Static Public Attributes

static final boolean DEBUG = Debug.debug("ProxySurface")
 
static final int OPT_PROXY_OWNS_UPSTREAM_SURFACE = 1 << 6
 Implementation specific bit-value stating this ProxySurface owns the upstream's surface handle. More...
 
static final int OPT_PROXY_OWNS_UPSTREAM_DEVICE = 1 << 7
 Implementation specific bit-value stating this ProxySurface owns the upstream's AbstractGraphicsDevice. More...
 
static final int OPT_UPSTREAM_WINDOW_INVISIBLE = 1 << 8
 Implementation specific bitvalue stating the upstream's NativeSurface is an invisible window, i.e. More...
 
static final int OPT_UPSTREAM_SURFACELESS = 1 << 9
 Implementation specific bitvalue stating the upstream's NativeSurface's zero handle is valid. More...
 
- Static Public Attributes inherited from com.jogamp.nativewindow.NativeSurface
static final int LOCK_SURFACE_UNLOCKED = 0
 Unlocked state, {@value}. More...
 
static final int LOCK_SURFACE_NOT_READY = 1
 Returned by lockSurface() if the surface is not ready to be locked, {@value}. More...
 
static final int LOCK_SURFACE_CHANGED = 2
 Returned by lockSurface() if the surface is locked, but has changed, {@value}. More...
 
static final int LOCK_SUCCESS = 3
 Returned by lockSurface() if the surface is locked, and is unchanged, {@value}. More...
 

Detailed Description

Provides a mutable NativeSurface, i.e.

MutableSurface, while allowing an UpstreamSurfaceHook to influence the lifecycle and information.

See also
UpstreamSurfaceHook
MutableSurface
NativeSurface

Definition at line 41 of file ProxySurface.java.

Member Function Documentation

◆ addUpstreamOptionBits()

void com.jogamp.nativewindow.ProxySurface.addUpstreamOptionBits ( int  v)

Add the given bit-mask to this instance upstream-option-bits using bit-or w/ v.

Here is the caller graph for this function:

◆ clearUpstreamOptionBits()

void com.jogamp.nativewindow.ProxySurface.clearUpstreamOptionBits ( int  v)

Clear the given bit-mask from this instance upstream-option-bits using bit-and w/ ~v

Here is the caller graph for this function:

◆ containsUpstreamOptionBits()

boolean com.jogamp.nativewindow.ProxySurface.containsUpstreamOptionBits ( int  v)

Returns true if the give bit-mask v is set in this instance upstream-option-bits, otherwise false.

Here is the caller graph for this function:

◆ createNotify()

void com.jogamp.nativewindow.ProxySurface.createNotify ( )

UpstreamSurfaceHook#create(ProxySurface) is being issued and the proxy surface/window handles shall be set.

◆ destroyNotify()

void com.jogamp.nativewindow.ProxySurface.destroyNotify ( )

UpstreamSurfaceHook#destroy(ProxySurface) is being issued and all proxy surface/window handles shall be cleared.

◆ enableUpstreamSurfaceHookLifecycle()

void com.jogamp.nativewindow.ProxySurface.enableUpstreamSurfaceHookLifecycle ( boolean  enable)

Enables or disables the 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.

◆ getUpstreamOptionBits() [1/2]

int com.jogamp.nativewindow.ProxySurface.getUpstreamOptionBits ( )

◆ getUpstreamOptionBits() [2/2]

StringBuilder com.jogamp.nativewindow.ProxySurface.getUpstreamOptionBits ( StringBuilder  sink)
Here is the caller graph for this function:

◆ getUpstreamSurface()

NativeSurface com.jogamp.nativewindow.ProxySurface.getUpstreamSurface ( )

Returns the optional upstream 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, ..).

Here is the caller graph for this function:

◆ getUpstreamSurfaceHook()

UpstreamSurfaceHook com.jogamp.nativewindow.ProxySurface.getUpstreamSurfaceHook ( )

Returns the UpstreamSurfaceHook if set, otherwise null.

◆ setGraphicsConfiguration()

void com.jogamp.nativewindow.ProxySurface.setGraphicsConfiguration ( AbstractGraphicsConfiguration  cfg)

Allow redefining the AbstractGraphicsConfiguration.

◆ setUpstreamSurfaceHook()

void com.jogamp.nativewindow.ProxySurface.setUpstreamSurfaceHook ( UpstreamSurfaceHook  hook)

Overrides the UpstreamSurfaceHook.

◆ toString() [1/2]

String com.jogamp.nativewindow.ProxySurface.toString ( )

◆ toString() [2/2]

StringBuilder com.jogamp.nativewindow.ProxySurface.toString ( StringBuilder  sink)

Member Data Documentation

◆ DEBUG

final boolean com.jogamp.nativewindow.ProxySurface.DEBUG = Debug.debug("ProxySurface")
static

Definition at line 42 of file ProxySurface.java.

◆ OPT_PROXY_OWNS_UPSTREAM_DEVICE

final int com.jogamp.nativewindow.ProxySurface.OPT_PROXY_OWNS_UPSTREAM_DEVICE = 1 << 7
static

Implementation specific bit-value stating this ProxySurface owns the upstream's AbstractGraphicsDevice.

See also
addUpstreamOptionBits(int)
clearUpstreamOptionBits(int)
getUpstreamOptionBits()

Definition at line 58 of file ProxySurface.java.

◆ OPT_PROXY_OWNS_UPSTREAM_SURFACE

final int com.jogamp.nativewindow.ProxySurface.OPT_PROXY_OWNS_UPSTREAM_SURFACE = 1 << 6
static

Implementation specific bit-value stating this ProxySurface owns the upstream's surface handle.

See also
addUpstreamOptionBits(int)
clearUpstreamOptionBits(int)
getUpstreamOptionBits()

Definition at line 50 of file ProxySurface.java.

◆ OPT_UPSTREAM_SURFACELESS

final int com.jogamp.nativewindow.ProxySurface.OPT_UPSTREAM_SURFACELESS = 1 << 9
static

Implementation specific bitvalue stating the upstream's NativeSurface's zero handle is valid.

See also
addUpstreamOptionBits(int)
clearUpstreamOptionBits(int)
getUpstreamOptionBits()

Definition at line 74 of file ProxySurface.java.

◆ OPT_UPSTREAM_WINDOW_INVISIBLE

final int com.jogamp.nativewindow.ProxySurface.OPT_UPSTREAM_WINDOW_INVISIBLE = 1 << 8
static

Implementation specific bitvalue stating the upstream's NativeSurface is an invisible window, i.e.

maybe incomplete.

See also
addUpstreamOptionBits(int)
clearUpstreamOptionBits(int)
getUpstreamOptionBits()

Definition at line 66 of file ProxySurface.java.


The documentation for this interface was generated from the following file: