JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.nativewindow.awt.JAWTWindow Class Referenceabstract
Inheritance diagram for com.jogamp.nativewindow.awt.JAWTWindow:
Collaboration diagram for com.jogamp.nativewindow.awt.JAWTWindow:

Public Member Functions

final void setAWTGraphicsConfiguration (final AWTGraphicsConfiguration config)
 Set a new AWTGraphicsConfiguration instance, as required if upstream component's GraphicsConfiguration has been changed due to reconfiguration, e.g. More...
 
final AWTGraphicsConfiguration getAWTGraphicsConfiguration ()
 Return the current AWTGraphicsConfiguration instance, which also holds its upstream component's GraphicsConfiguration. More...
 
final boolean canSetSurfaceScale ()
 Returns true if setSurfaceScale(float[]) is supported, otherwise false.For pure downstream scalable surfaces like AWT widgets, setting the picel scale is not supported since the pixel scale is set by the underlying toolkit. More...
 
boolean setSurfaceScale (final float[] pixelScale)
 Request a pixel scale in x- and y-direction for the associated NativeSurface, where size_in_pixel_units = pixel_scale * size_in_window_units.Default pixel scale request for both directions is AUTOMAX_PIXELSCALE. If canSetSurfaceScale() returns false, requested pixel scale is AUTOMAX_PIXELSCALE, immutable and method returns false. In case platform only supports uniform pixel scale, i.e. one scale for both directions, either AUTOMAX_PIXELSCALE or the maximum requested pixel scale component is used. The requested pixel scale will be validated against platform limits before native scale-setup, i.e. clipped to IDENTITY_PIXELSCALE if not supported or clipped to the platform maximum. It can be queried via getRequestedSurfaceScale(float[]). The actual realized pixel scale values of the NativeSurface can be queried via getCurrentSurfaceScale(float[]) or computed via surface.convertToPixelUnits(new int[] { 1, 1 })
Parameters
pixelScalerequested surface pixel scale float[2] values for x- and y-direction.
Returns
true if the current pixel scale has changed, otherwise false.
See also
getRequestedSurfaceScale(float[])
canSetSurfaceScale()
More...
 
final float[] getRequestedSurfaceScale (final float[] result)
 Returns the requested pixel scale of the associated NativeSurface.If canSetSurfaceScale() returns false, requested pixel scale is AUTOMAX_PIXELSCALE and immutable.
Parameters
resultfloat[2] storage for the result
Returns
the passed storage containing the current pixelScale for chaining
See also
setSurfaceScale(float[])
canSetSurfaceScale()
More...
 
final float[] getCurrentSurfaceScale (final float[] result)
 Returns the current pixel scale of the associated NativeSurface. More...
 
float[] getMinimumSurfaceScale (final float[] result)
 Returns the minimum pixel scale of the associated NativeSurface.
Parameters
resultfloat[2] storage for the result
Returns
the passed storage containing the minimum pixelScale for chaining
More...
 
final float[] getMaximumSurfaceScale (final float[] result)
 Returns the maximum pixel scale of the associated NativeSurface.The maximum pixel scale maybe used to determine the proper dpi value of the monitor displaying this NativeSurface.

   surfacePpMM = monitorPpMM * currentSurfaceScale / nativeSurfaceScale,
   with PpMM == pixel per millimeter
Parameters
resultfloat[2] storage for the result
Returns
the passed storage containing the maximum pixelScale for chaining
More...
 
final boolean updatePixelScale (final GraphicsConfiguration gc, final boolean clearFlag)
 Updates the minimum and maximum pixel-scale values and returns true if they were updated. More...
 
final boolean hasPixelScaleChanged ()
 Returns and clears the hasPixelScaleChanged flag, as set via lockSurface(). More...
 
final RectangleImmutable getJAWTSurfaceBounds ()
 
final InsetsImmutable getInsets ()
 Returns the insets defined as the width and height of the window decoration on the left, right, top and bottom in window units. More...
 
final Component getAWTComponent ()
 
final boolean isApplet ()
 Return false since there is no more java.applet.Applet support. More...
 
final JAWT getJAWT ()
 Returns the underlying JAWT instance created @ lockSurface(). More...
 
void setShallUseOffscreenLayer (final boolean v)
 Request an offscreen layer, if supported. More...
 
final boolean getShallUseOffscreenLayer ()
 Returns the property set by setShallUseOffscreenLayer(boolean). More...
 
final boolean isOffscreenLayerSurfaceEnabled ()
 Returns true if this instance uses an offscreen layer, otherwise false. More...
 
final void attachSurfaceLayer (final long layerHandle) throws NativeWindowException
 Attach the offscreen layer to this offscreen layer surface. More...
 
final void detachSurfaceLayer () throws NativeWindowException
 Detaches a previously attached offscreen layer from this offscreen layer surface. More...
 
final long getAttachedSurfaceLayer ()
 Returns the attached surface layer or null if none is attached. More...
 
final boolean isSurfaceLayerAttached ()
 Returns true if a surface layer is attached, otherwise false. More...
 
final void setChosenCapabilities (final CapabilitiesImmutable caps)
 Sets the capabilities of this instance, allowing upstream API's to refine it, i.e. More...
 
final RecursiveLock getLock ()
 Returns the recursive lock object of this surface, which synchronizes multithreaded access. More...
 
final boolean setCursor (final PixelRectangle pixelrect, final PointImmutable hotSpot)
 Optional method setting cursor in the corresponding on-screen surface/window, if exists. More...
 
final boolean hideCursor ()
 Optional method hiding the cursor in the corresponding on-screen surface/window, if exists. More...
 
final int lockSurface () throws NativeWindowException, RuntimeException
 Lock the surface of this native window. More...
 
final void unlockSurface ()
 Unlock the surface of this native window. More...
 
final boolean isSurfaceLockedByOtherThread ()
 Query if surface is locked by another thread, i.e. More...
 
final 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 (final SurfaceUpdatedListener l)
 Appends the given SurfaceUpdatedListener to the end of the list. More...
 
void addSurfaceUpdatedListener (final int index, final SurfaceUpdatedListener l) throws IndexOutOfBoundsException
 Inserts the given SurfaceUpdatedListener at the specified position in the list. More...
 
void removeSurfaceUpdatedListener (final SurfaceUpdatedListener l)
 Remove the specified SurfaceUpdatedListener from the list. More...
 
void surfaceUpdated (final Object updater, final NativeSurface ns, final long when)
 Notification of a surface update event, eg. More...
 
long getSurfaceHandle ()
 Returns the handle to the surface for this NativeSurface. More...
 
final AbstractGraphicsConfiguration getGraphicsConfiguration ()
 Returns the graphics configuration corresponding to this window. More...
 
final long getDisplayHandle ()
 Convenience: Get display handle from AbstractGraphicsConfiguration . More...
 
final int getScreenIndex ()
 Convenience: Get display handle from AbstractGraphicsConfiguration . More...
 
final int getSurfaceWidth ()
 Returns the width of the client area excluding insets (window decorations) in pixel units. More...
 
final int getSurfaceHeight ()
 Returns the height of the client area excluding insets (window decorations) in pixel units. More...
 
final int[] convertToWindowUnits (final int[] pixelUnitsAndResult)
 Converts the given pixel units into window units in place. More...
 
final int[] convertToPixelUnits (final int[] windowUnitsAndResult)
 Converts the given window units into pixel units in place. More...
 
final NativeSurface getNativeSurface ()
 Returns the associated NativeSurface of this NativeSurfaceHolder.Returns this instance, which is-a NativeSurface. More...
 
final int getX ()
 Returns the current x position of this window, relative to it's parent. More...
 
final int getY ()
 Returns the current y position of the top-left corner of the client area relative to it's parent in window units. More...
 
final int getWidth ()
 Returns the width of the client area excluding insets (window decorations) in window units. More...
 
final int getHeight ()
 Returns the height of the client area excluding insets (window decorations) in window units. More...
 
final Rectangle getBounds ()
 Returns a newly created Rectangle containing window origin, getX() & getY(), and size, getWidth() & getHeight(), in window units. More...
 
final Rectangle getSurfaceBounds ()
 Returns a newly created Rectangle containing window's surface origin and size in pixel units. More...
 
void destroy ()
 Destroys this window incl. More...
 
final NativeWindow getParent ()
 
long getWindowHandle ()
 Returns the window handle for this NativeWindow. More...
 
Point getLocationOnScreen (final Point storage)
 Returns the window's top-left client-area position in the screen.If Point is not null, it is translated about the resulting screen position and returned. See Coordinate System. Since the position reflects the client area, it does not include the insets.
Parameters
pointOptional Point storage. If not null, null, it is translated about the resulting screen position and returned.
See also
getX()
getY()
getInsets()
More...
 
boolean hasFocus ()
 Returns true if this native window owns the focus, otherwise false. More...
 
String toString ()
 
NativeSurface getNativeSurface ()
 Returns the associated NativeSurface of this NativeSurfaceHolder. More...
 
void destroy ()
 Destroys this window incl. More...
 
NativeWindow getParent ()
 
long getWindowHandle ()
 Returns the window handle for this NativeWindow. More...
 
InsetsImmutable getInsets ()
 Returns the insets defined as the width and height of the window decoration on the left, right, top and bottom in window units. More...
 
int getX ()
 Returns the current x position of this window, relative to it's parent. More...
 
int getY ()
 Returns the current y position of the top-left corner of the client area relative to it's parent in window units. More...
 
int getWidth ()
 Returns the width of the client area excluding insets (window decorations) in window units. More...
 
int getHeight ()
 Returns the height of the client area excluding insets (window decorations) in window units. More...
 
Rectangle getBounds ()
 Returns a newly created Rectangle containing window origin, getX() & getY(), and size, getWidth() & getHeight(), in window units. More...
 
Rectangle getSurfaceBounds ()
 Returns a newly created Rectangle containing window's surface origin and size in pixel units. More...
 
Point getLocationOnScreen (Point point)
 Returns the window's top-left client-area position in the screen. More...
 
boolean hasFocus ()
 Returns true if this native window owns the focus, otherwise false. More...
 
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...
 
void surfaceUpdated (Object updater, NativeSurface ns, long when)
 Notification of a surface update event, eg. More...
 
NativeSurface getNativeSurface ()
 Returns the associated NativeSurface of this NativeSurfaceHolder. More...
 
void attachSurfaceLayer (final long layerHandle) throws NativeWindowException
 Attach the offscreen layer to this offscreen layer surface. More...
 
void detachSurfaceLayer () throws NativeWindowException
 Detaches a previously attached offscreen layer from this offscreen layer surface. More...
 
long getAttachedSurfaceLayer ()
 Returns the attached surface layer or null if none is attached. More...
 
boolean isSurfaceLayerAttached ()
 Returns true if a surface layer is attached, otherwise false. More...
 
void setChosenCapabilities (CapabilitiesImmutable caps)
 Sets the capabilities of this instance, allowing upstream API's to refine it, i.e. More...
 
RecursiveLock getLock ()
 Returns the recursive lock object of this surface, which synchronizes multithreaded access. More...
 
boolean setCursor (PixelRectangle pixelrect, PointImmutable hotSpot)
 Optional method setting cursor in the corresponding on-screen surface/window, if exists. More...
 
boolean hideCursor ()
 Optional method hiding the cursor in the corresponding on-screen surface/window, if exists. More...
 
void setShallUseOffscreenLayer (boolean v)
 Request an offscreen layer, if supported. More...
 
boolean getShallUseOffscreenLayer ()
 Returns the property set by setShallUseOffscreenLayer(boolean). More...
 
boolean isOffscreenLayerSurfaceEnabled ()
 Returns true if this instance uses an offscreen layer, otherwise false. More...
 
boolean canSetSurfaceScale ()
 Returns true if setSurfaceScale(float[]) is supported, otherwise false. More...
 
boolean setSurfaceScale (final float[] pixelScale)
 Request a pixel scale in x- and y-direction for the associated NativeSurface, where size_in_pixel_units = pixel_scale * size_in_window_units. More...
 
float[] getRequestedSurfaceScale (final float[] result)
 Returns the requested pixel scale of the associated NativeSurface. More...
 
float[] getCurrentSurfaceScale (final float[] result)
 Returns the current pixel scale of the associated NativeSurface. More...
 
float[] getMinimumSurfaceScale (final float[] result)
 Returns the minimum pixel scale of the associated NativeSurface. More...
 
float[] getMaximumSurfaceScale (final float[] result)
 Returns the maximum pixel scale of the associated NativeSurface. More...
 

Protected Member Functions

 JAWTWindow (final Object comp, final AbstractGraphicsConfiguration config)
 Constructed by jogamp.nativewindow.NativeWindowFactoryImpl#getNativeWindow(Object, AbstractGraphicsConfiguration) via this platform's specialization (X11, OSX, Windows, ..). More...
 
synchronized void invalidate ()
 
abstract void invalidateNative (final long _offscreenSurfaceLayer)
 
final boolean updateLockedData (final JAWT_Rectangle jawtBounds, final GraphicsConfiguration gc)
 Updates bounds and pixelScale. More...
 
final float getPixelScaleX ()
 
final float getPixelScaleY ()
 
void attachSurfaceLayerImpl (final long _offscreenSurfaceLayer)
 
void layoutSurfaceLayerImpl (final boolean visible)
 Layout the offscreen layer according to the implementing class's constraints. More...
 
void detachSurfaceLayerImpl (final long _offscreenSurfaceLayer)
 
abstract JAWT fetchJAWTImpl () throws NativeWindowException
 private void determineIfApplet() { boolean isApplet = false; // dummy Component c = component; while(!isApplet && null != c) { isApplet = c instanceof java.applet.Applet; c = c.getParent(); } } More...
 
abstract int lockSurfaceImpl (GraphicsConfiguration gc) throws NativeWindowException
 
void dumpJAWTInfo ()
 
abstract void unlockSurfaceImpl () throws NativeWindowException
 
Point getLocationOnScreenNative (final Point storage)
 
abstract Point getLocationOnScreenNativeImpl (int x, int y)
 
StringBuilder jawt2String (StringBuilder sb)
 

Static Protected Member Functions

static final String toHexString (final long l)
 
static final String toHexString (final int i)
 

Protected Attributes

boolean shallUseOffscreenLayer = false
 
final Component component
 
long drawable
 
Rectangle jawt_surface_bounds
 
Insets insets
 

Static Protected Attributes

static final boolean DEBUG = JAWTUtil.DEBUG
 

Additional Inherited Members

- 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...
 
- Static Public Attributes inherited from com.jogamp.nativewindow.ScalableSurface
static final float IDENTITY_PIXELSCALE = 1f
 Setting surface-pixel-scale of {@value}, results in same pixel- and window-units. More...
 
static final float AUTOMAX_PIXELSCALE = 0f
 Setting surface-pixel-scale of {@value}, results in maximum platform dependent pixel-scale, i.e. More...
 

Detailed Description

Definition at line 83 of file JAWTWindow.java.

Constructor & Destructor Documentation

◆ JAWTWindow()

com.jogamp.nativewindow.awt.JAWTWindow.JAWTWindow ( final Object  comp,
final AbstractGraphicsConfiguration  config 
)
protected

Constructed by jogamp.nativewindow.NativeWindowFactoryImpl#getNativeWindow(Object, AbstractGraphicsConfiguration) via this platform's specialization (X11, OSX, Windows, ..).

Parameters
comp
config

Definition at line 116 of file JAWTWindow.java.

Here is the call graph for this function:

Member Function Documentation

◆ addSurfaceUpdatedListener() [1/2]

void com.jogamp.nativewindow.awt.JAWTWindow.addSurfaceUpdatedListener ( final int  index,
final SurfaceUpdatedListener  l 
) throws IndexOutOfBoundsException

Inserts the given SurfaceUpdatedListener at the specified position in the list.


Parameters
indexPosition where the listener will be inserted. Should be within (0 <= index && index <= size()). An index value of -1 is interpreted as the end of the list, size().
lThe listener object to be inserted
Exceptions
IndexOutOfBoundsExceptionIf the index is not within (0 <= index && index <= size()), or -1

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 772 of file JAWTWindow.java.

◆ addSurfaceUpdatedListener() [2/2]

void com.jogamp.nativewindow.awt.JAWTWindow.addSurfaceUpdatedListener ( final SurfaceUpdatedListener  l)

Appends the given SurfaceUpdatedListener to the end of the list.

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 767 of file JAWTWindow.java.

◆ attachSurfaceLayer()

final void com.jogamp.nativewindow.awt.JAWTWindow.attachSurfaceLayer ( final long  layerHandle) throws NativeWindowException

Attach the offscreen layer to this offscreen layer surface.

Implementation may realize all required resources at this point.

See also
isOffscreenLayerSurfaceEnabled()
Exceptions
NativeWindowExceptionif isOffscreenLayerSurfaceEnabled() == false

Implements com.jogamp.nativewindow.OffscreenLayerSurface.

Definition at line 512 of file JAWTWindow.java.

Here is the call graph for this function:

◆ attachSurfaceLayerImpl()

void com.jogamp.nativewindow.awt.JAWTWindow.attachSurfaceLayerImpl ( final long  _offscreenSurfaceLayer)
protected

Definition at line 535 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ canSetSurfaceScale()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.canSetSurfaceScale ( )

Returns true if setSurfaceScale(float[]) is supported, otherwise false.For pure downstream scalable surfaces like AWT widgets, setting the picel scale is not supported since the pixel scale is set by the underlying toolkit.

This implementation returns false, i.e. not supporting manual change of pixel-scale.

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 325 of file JAWTWindow.java.

◆ convertToPixelUnits()

final int[] com.jogamp.nativewindow.awt.JAWTWindow.convertToPixelUnits ( final int[]  windowUnitsAndResult)

Converts the given window units into pixel units in place.

Parameters
windowUnitsAndResultint[2] storage holding the window units for the x- and y-coord to convert and the resulting values.
Returns
result int[2] storage windowUnitsAndResult for chaining holding the converted values
See also
ScalableSurface

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 825 of file JAWTWindow.java.

◆ convertToWindowUnits()

final int[] com.jogamp.nativewindow.awt.JAWTWindow.convertToWindowUnits ( final int[]  pixelUnitsAndResult)

Converts the given pixel units into window units in place.

Parameters
pixelUnitsAndResultint[2] storage holding the pixel units for the x- and y-coord to convert and the resulting values.
Returns
result int[2] storage pixelUnitsAndResult for chaining holding the converted values
See also
ScalableSurface

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 820 of file JAWTWindow.java.

◆ destroy()

void com.jogamp.nativewindow.awt.JAWTWindow.destroy ( )

Destroys this window incl.

releasing all related resources.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 869 of file JAWTWindow.java.

Here is the call graph for this function:

◆ detachSurfaceLayer()

final void com.jogamp.nativewindow.awt.JAWTWindow.detachSurfaceLayer ( ) throws NativeWindowException

Detaches a previously attached offscreen layer from this offscreen layer surface.

See also
attachSurfaceLayer(long)
isOffscreenLayerSurfaceEnabled()
Exceptions
NativeWindowExceptionif isOffscreenLayerSurfaceEnabled() == false or no surface layer is attached.

Implements com.jogamp.nativewindow.OffscreenLayerSurface.

Definition at line 562 of file JAWTWindow.java.

Here is the call graph for this function:

◆ detachSurfaceLayerImpl()

void com.jogamp.nativewindow.awt.JAWTWindow.detachSurfaceLayerImpl ( final long  _offscreenSurfaceLayer)
protected
Parameters
detachNotifyRunnable to be called before native detachment

Definition at line 579 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ dumpJAWTInfo()

void com.jogamp.nativewindow.awt.JAWTWindow.dumpJAWTInfo ( )
protected

Definition at line 667 of file JAWTWindow.java.

Here is the call graph for this function:

◆ fetchJAWTImpl()

abstract JAWT com.jogamp.nativewindow.awt.JAWTWindow.fetchJAWTImpl ( ) throws NativeWindowException
abstractprotected

private void determineIfApplet() { boolean isApplet = false; // dummy Component c = component; while(!isApplet && null != c) { isApplet = c instanceof java.applet.Applet; c = c.getParent(); } }

If JAWT offscreen layer is supported, implementation shall respect getShallUseOffscreenLayer() and may respect isApplet().

Returns
The JAWT instance reflecting offscreen layer support, etc.
Exceptions
NativeWindowException
Here is the caller graph for this function:

◆ getAttachedSurfaceLayer()

final long com.jogamp.nativewindow.awt.JAWTWindow.getAttachedSurfaceLayer ( )

Returns the attached surface layer or null if none is attached.

Implements com.jogamp.nativewindow.OffscreenLayerSurface.

Definition at line 585 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getAWTComponent()

final Component com.jogamp.nativewindow.awt.JAWTWindow.getAWTComponent ( )

Definition at line 468 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getAWTGraphicsConfiguration()

final AWTGraphicsConfiguration com.jogamp.nativewindow.awt.JAWTWindow.getAWTGraphicsConfiguration ( )

Return the current AWTGraphicsConfiguration instance, which also holds its upstream component's GraphicsConfiguration.

See also
setAWTGraphicsConfiguration(AWTGraphicsConfiguration)

Definition at line 314 of file JAWTWindow.java.

◆ getBounds()

final Rectangle com.jogamp.nativewindow.awt.JAWTWindow.getBounds ( )

Returns a newly created Rectangle containing window origin, getX() & getY(), and size, getWidth() & getHeight(), in window units.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 857 of file JAWTWindow.java.

Here is the call graph for this function:

◆ getCurrentSurfaceScale()

final float[] com.jogamp.nativewindow.awt.JAWTWindow.getCurrentSurfaceScale ( final float[]  result)

Returns the current pixel scale of the associated NativeSurface.

Parameters
resultfloat[2] storage for the result
Returns
the passed storage containing the current pixelScale for chaining

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 352 of file JAWTWindow.java.

◆ getDisplayHandle()

final long com.jogamp.nativewindow.awt.JAWTWindow.getDisplayHandle ( )

Convenience: Get display handle from AbstractGraphicsConfiguration .

AbstractGraphicsScreen . AbstractGraphicsDevice

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 800 of file JAWTWindow.java.

Here is the call graph for this function:

◆ getGraphicsConfiguration()

final AbstractGraphicsConfiguration com.jogamp.nativewindow.awt.JAWTWindow.getGraphicsConfiguration ( )

Returns the graphics configuration corresponding to this window.

In case the implementation utilizes a delegation pattern to wrap abstract toolkits, this method shall return the native AbstractGraphicsConfiguration via AbstractGraphicsConfiguration#getNativeGraphicsConfiguration().

See also
AbstractGraphicsConfiguration::getNativeGraphicsConfiguration()
com.jogamp.nativewindow.GraphicsConfigurationFactory::chooseGraphicsConfiguration(Capabilities, CapabilitiesChooser, AbstractGraphicsScreen)

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 792 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHeight()

final int com.jogamp.nativewindow.awt.JAWTWindow.getHeight ( )

Returns the height of the client area excluding insets (window decorations) in window units.

Returns
height of the client area in window units
See also
NativeSurface::getSurfaceHeight()

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 852 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getInsets()

final InsetsImmutable com.jogamp.nativewindow.awt.JAWTWindow.getInsets ( )

Returns the insets defined as the width and height of the window decoration on the left, right, top and bottom in window units.

Insets are zero if the window is undecorated, including child windows.

Insets are available only after the native window has been created, ie. the native window has been made visible.

The top-level window area's top-left corner is located at

  getX() - getInsets(). getLeftWidth()
  getY() - getInsets(). getTopHeight()

The top-level window size is

  getWidth()  + getInsets(). getTotalWidth()
  getHeight() + getInsets(). getTotalHeight()
Returns
insets

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 466 of file JAWTWindow.java.

◆ getJAWT()

final JAWT com.jogamp.nativewindow.awt.JAWTWindow.getJAWT ( )

Returns the underlying JAWT instance created @ lockSurface().

Definition at line 484 of file JAWTWindow.java.

◆ getJAWTSurfaceBounds()

final RectangleImmutable com.jogamp.nativewindow.awt.JAWTWindow.getJAWTSurfaceBounds ( )
Returns
the JAWT_DrawingSurfaceInfo's (JAWT_Rectangle) bounds in pixel units, updated with lock

Definition at line 457 of file JAWTWindow.java.

◆ getLocationOnScreen()

Point com.jogamp.nativewindow.awt.JAWTWindow.getLocationOnScreen ( final Point  storage)

Returns the window's top-left client-area position in the screen.If Point is not null, it is translated about the resulting screen position and returned. See Coordinate System. Since the position reflects the client area, it does not include the insets.

Parameters
pointOptional Point storage. If not null, null, it is translated about the resulting screen position and returned.
See also
getX()
getY()
getInsets()

This JAWT default implementation is currently still using a blocking implementation. It first attempts to retrieve the location via a native implementation. If this fails, it tries the blocking AWT implementation. If the latter fails due to an external AWT tree-lock, the non block implementation getLocationOnScreenNonBlocking(Point, Component) is being used. The latter simply traverse up to the AWT component tree and sums the rel. position. We have to determine whether the latter is good enough for all cases, currently only OS X utilizes the non blocking method per default.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 907 of file JAWTWindow.java.

Here is the call graph for this function:

◆ getLocationOnScreenNative()

Point com.jogamp.nativewindow.awt.JAWTWindow.getLocationOnScreenNative ( final Point  storage)
protected

Definition at line 915 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLocationOnScreenNativeImpl()

abstract Point com.jogamp.nativewindow.awt.JAWTWindow.getLocationOnScreenNativeImpl ( int  x,
int  y 
)
abstractprotected
Here is the caller graph for this function:

◆ getLock()

final RecursiveLock com.jogamp.nativewindow.awt.JAWTWindow.getLock ( )

Returns the recursive lock object of this surface, which synchronizes multithreaded access.

Implements com.jogamp.nativewindow.OffscreenLayerSurface.

Definition at line 601 of file JAWTWindow.java.

◆ getMaximumSurfaceScale()

final float[] com.jogamp.nativewindow.awt.JAWTWindow.getMaximumSurfaceScale ( final float[]  result)

Returns the maximum pixel scale of the associated NativeSurface.The maximum pixel scale maybe used to determine the proper dpi value of the monitor displaying this NativeSurface.

   surfacePpMM = monitorPpMM * currentSurfaceScale / nativeSurfaceScale,
   with PpMM == pixel per millimeter
Parameters
resultfloat[2] storage for the result
Returns
the passed storage containing the maximum pixelScale for chaining

Returns getCurrentSurfaceScale(float[]).

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 377 of file JAWTWindow.java.

◆ getMinimumSurfaceScale()

float[] com.jogamp.nativewindow.awt.JAWTWindow.getMinimumSurfaceScale ( final float[]  result)

Returns the minimum pixel scale of the associated NativeSurface.

Parameters
resultfloat[2] storage for the result
Returns
the passed storage containing the minimum pixelScale for chaining

Returns 1.0, always.

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 364 of file JAWTWindow.java.

◆ getNativeSurface()

final NativeSurface com.jogamp.nativewindow.awt.JAWTWindow.getNativeSurface ( )

Returns the associated NativeSurface of this NativeSurfaceHolder.Returns this instance, which is-a NativeSurface.

Returns this instance, which is-a NativeSurface.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 830 of file JAWTWindow.java.

◆ getParent()

final NativeWindow com.jogamp.nativewindow.awt.JAWTWindow.getParent ( )
Returns
The parent NativeWindow, or null if this NativeWindow is top level.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 883 of file JAWTWindow.java.

◆ getPixelScaleX()

final float com.jogamp.nativewindow.awt.JAWTWindow.getPixelScaleX ( )
protected
Returns
the safe pixelScale value for x-direction, i.e. never negative or zero. Updated with lock.

Definition at line 460 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getPixelScaleY()

final float com.jogamp.nativewindow.awt.JAWTWindow.getPixelScaleY ( )
protected
Returns
the safe pixelScale value for y-direction, i.e. never negative or zero. Updated with lock.

Definition at line 463 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getRequestedSurfaceScale()

final float[] com.jogamp.nativewindow.awt.JAWTWindow.getRequestedSurfaceScale ( final float[]  result)

Returns the requested pixel scale of the associated NativeSurface.If canSetSurfaceScale() returns false, requested pixel scale is AUTOMAX_PIXELSCALE and immutable.

Parameters
resultfloat[2] storage for the result
Returns
the passed storage containing the current pixelScale for chaining
See also
setSurfaceScale(float[])
canSetSurfaceScale()

Returns ScalableSurface#AUTOMAX_PIXELSCALE, always.

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 345 of file JAWTWindow.java.

◆ getScreenIndex()

final int com.jogamp.nativewindow.awt.JAWTWindow.getScreenIndex ( )

Convenience: Get display handle from AbstractGraphicsConfiguration .

AbstractGraphicsScreen

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 805 of file JAWTWindow.java.

Here is the call graph for this function:

◆ getShallUseOffscreenLayer()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.getShallUseOffscreenLayer ( )

Returns the property set by setShallUseOffscreenLayer(boolean).

Implements com.jogamp.nativewindow.OffscreenLayerOption.

Definition at line 498 of file JAWTWindow.java.

◆ getSurfaceBounds()

final Rectangle com.jogamp.nativewindow.awt.JAWTWindow.getSurfaceBounds ( )

Returns a newly created Rectangle containing window's surface origin and size in pixel units.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 862 of file JAWTWindow.java.

Here is the call graph for this function:

◆ getSurfaceHandle()

long com.jogamp.nativewindow.awt.JAWTWindow.getSurfaceHandle ( )

Returns the handle to the surface for this NativeSurface.

The surface handle should be set/update by lockSurface(), where unlockSurface() is not allowed to modify it. After unlockSurface() it is no more guaranteed that the surface handle is still valid.

The surface handle shall reflect the platform one for all drawable surface operations, e.g. opengl, swap-buffer.

On X11 this returns an entity of type Window, since there is no differentiation of surface and window there.
On Microsoft Windows this returns an entity of type HDC.

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 787 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getSurfaceHeight()

final int com.jogamp.nativewindow.awt.JAWTWindow.getSurfaceHeight ( )

Returns the height of the client area excluding insets (window decorations) in pixel units.

Returns
height of the client area in pixel units
See also
NativeWindow::getHeight()
convertToWindowUnits(int[])

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 815 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSurfaceLockOwner()

final Thread com.jogamp.nativewindow.awt.JAWTWindow.getSurfaceLockOwner ( )

Return the locking owner's Thread, or null if not locked.

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 757 of file JAWTWindow.java.

◆ getSurfaceWidth()

final int com.jogamp.nativewindow.awt.JAWTWindow.getSurfaceWidth ( )

Returns the width of the client area excluding insets (window decorations) in pixel units.

Returns
width of the client area in pixel units
See also
NativeWindow::getWidth()
convertToWindowUnits(int[])

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 810 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWidth()

final int com.jogamp.nativewindow.awt.JAWTWindow.getWidth ( )

Returns the width of the client area excluding insets (window decorations) in window units.

Returns
width of the client area in window units
See also
NativeSurface::getSurfaceWidth()

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 847 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getWindowHandle()

long com.jogamp.nativewindow.awt.JAWTWindow.getWindowHandle ( )

Returns the window handle for this NativeWindow.

The window handle shall reflect the platform one for all window related operations, e.g. open, close, resize.

On X11 this returns an entity of type Window.
On Microsoft Windows this returns an entity of type HWND.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 888 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getX()

final int com.jogamp.nativewindow.awt.JAWTWindow.getX ( )

Returns the current x position of this window, relative to it's parent.

Returns the x position of the top-left corner of the client area relative to it's parent in window units.

If no parent exist (top-level window), this coordinate equals the screen coordinate.

Since the position reflects the client area, it does not include the insets.

See Coordinate System.

See also
getInsets()
getLocationOnScreen(Point)

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 837 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ getY()

final int com.jogamp.nativewindow.awt.JAWTWindow.getY ( )

Returns the current y position of the top-left corner of the client area relative to it's parent in window units.

If no parent exist (top-level window), this coordinate equals the screen coordinate.

Since the position reflects the client area, it does not include the insets.

See Coordinate System.

See also
getInsets()
getLocationOnScreen(Point)

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 842 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ hasFocus()

boolean com.jogamp.nativewindow.awt.JAWTWindow.hasFocus ( )

Returns true if this native window owns the focus, otherwise false.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 940 of file JAWTWindow.java.

◆ hasPixelScaleChanged()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.hasPixelScaleChanged ( )

Returns and clears the hasPixelScaleChanged flag, as set via lockSurface().

hasPixelScaleChanged is true, if the minimum or maximum pixel scale has changed. User needs to set the current pixel scale in this case using the requested pixel scale to update the surface pixel scale.

Definition at line 450 of file JAWTWindow.java.

◆ hideCursor()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.hideCursor ( )

Optional method hiding the cursor in the corresponding on-screen surface/window, if exists.

Returns
true if successful, i.e. on-screen surface/window w/ cursor capabilities exists. Otherwise false.

Implements com.jogamp.nativewindow.OffscreenLayerSurface.

Definition at line 629 of file JAWTWindow.java.

◆ invalidate()

synchronized void com.jogamp.nativewindow.awt.JAWTWindow.invalidate ( )
protected

Definition at line 260 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invalidateNative()

abstract void com.jogamp.nativewindow.awt.JAWTWindow.invalidateNative ( final long  _offscreenSurfaceLayer)
abstractprotected
Here is the caller graph for this function:

◆ isApplet()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.isApplet ( )

Return false since there is no more java.applet.Applet support.

Historical: Returns true if the AWT component is parented to an java.applet.Applet, otherwise false. This information is valid only after lockSurface().

Definition at line 479 of file JAWTWindow.java.

◆ isOffscreenLayerSurfaceEnabled()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.isOffscreenLayerSurfaceEnabled ( )

Returns true if this instance uses an offscreen layer, otherwise false.

This instance is an offscreen layer, if setShallUseOffscreenLayer(true) has been called before it's realization and first lock and the underlying implementation supports it.

The return value is undefined before issuing the first NativeWindow#lockSurface().

See also
setShallUseOffscreenLayer(boolean)

Implements com.jogamp.nativewindow.OffscreenLayerOption.

Definition at line 503 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ isSurfaceLayerAttached()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.isSurfaceLayerAttached ( )

Returns true if a surface layer is attached, otherwise false.

Implements com.jogamp.nativewindow.OffscreenLayerSurface.

Definition at line 590 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ isSurfaceLockedByOtherThread()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.isSurfaceLockedByOtherThread ( )

Query if surface is locked by another thread, i.e.

not the current one.
Convenient shortcut for:

  final Thread o = getSurfaceLockOwner();
  if( null != o && Thread.currentThread() != o ) { .. }

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 752 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ jawt2String()

StringBuilder com.jogamp.nativewindow.awt.JAWTWindow.jawt2String ( StringBuilder  sb)
protected

Definition at line 944 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layoutSurfaceLayerImpl()

void com.jogamp.nativewindow.awt.JAWTWindow.layoutSurfaceLayerImpl ( final boolean  visible)
protected

Layout the offscreen layer according to the implementing class's constraints.

This method allows triggering a re-layout of the offscreen surface in case the implementation requires it.

Call this method if any parent or ancestor's layout has been changed, which could affects the layout of this surface.

See also
isOffscreenLayerSurfaceEnabled()
Exceptions
NativeWindowExceptionif isOffscreenLayerSurfaceEnabled() == false

Definition at line 552 of file JAWTWindow.java.

◆ lockSurface()

final int com.jogamp.nativewindow.awt.JAWTWindow.lockSurface ( ) throws NativeWindowException, RuntimeException

Lock the surface of this native window.

The surface handle shall be valid after a successfull call, ie return a value other than LOCK_SURFACE_UNLOCKED and LOCK_SURFACE_NOT_READY, which is

   boolean ok = LOCK_SURFACE_NOT_READY < lockSurface();

The caller may need to take care of the result LOCK_SURFACE_CHANGED, where the surface handle is valid but has changed.

This call is blocking until the surface has been locked or a timeout is reached. The latter will throw a runtime exception.

This call allows recursion from the same thread.

The implementation may want to aquire the application level com.jogamp.common.util.locks.RecursiveLock first before proceeding with a native surface lock.

The implementation shall also invoke AbstractGraphicsDevice#lock() for the initial lock (recursive count zero).

Returns
LOCK_SUCCESS, LOCK_SURFACE_CHANGED or LOCK_SURFACE_NOT_READY.
Exceptions
RuntimeExceptionafter timeout when waiting for the surface lock
NativeWindowExceptionif native locking failed, maybe platform related
See also
com.jogamp.common.util.locks.RecursiveLock

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 673 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lockSurfaceImpl()

abstract int com.jogamp.nativewindow.awt.JAWTWindow.lockSurfaceImpl ( GraphicsConfiguration  gc) throws NativeWindowException
abstractprotected
Here is the caller graph for this function:

◆ removeSurfaceUpdatedListener()

void com.jogamp.nativewindow.awt.JAWTWindow.removeSurfaceUpdatedListener ( final SurfaceUpdatedListener  l)

Remove the specified SurfaceUpdatedListener from the list.

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 777 of file JAWTWindow.java.

◆ setAWTGraphicsConfiguration()

final void com.jogamp.nativewindow.awt.JAWTWindow.setAWTGraphicsConfiguration ( final AWTGraphicsConfiguration  config)

Set a new AWTGraphicsConfiguration instance, as required if upstream component's GraphicsConfiguration has been changed due to reconfiguration, e.g.

moving to a different monitor or changed capabilities.

Upstream component shall override Component#getGraphicsConfiguration(), which shall call this method if detecting a reconfiguration. See JOGL's GLCanvas and NewtCanvasAWT.

Parameters
configthe new AWTGraphicsConfiguration
See also
getAWTGraphicsConfiguration()

Definition at line 299 of file JAWTWindow.java.

◆ setChosenCapabilities()

final void com.jogamp.nativewindow.awt.JAWTWindow.setChosenCapabilities ( final CapabilitiesImmutable  caps)

Sets the capabilities of this instance, allowing upstream API's to refine it, i.e.

OpenGL related settings.

Implements com.jogamp.nativewindow.OffscreenLayerSurface.

Definition at line 595 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCursor()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.setCursor ( final PixelRectangle  pixelrect,
final PointImmutable  hotSpot 
)

Optional method setting cursor in the corresponding on-screen surface/window, if exists.

Parameters
pixelrectcursor pixels, maybe null for default cursor
hotSpotmaybe null for default cursor
Returns
true if successful, i.e. on-screen surface/window w/ cursor capabilities exists. Otherwise false.

Implements com.jogamp.nativewindow.OffscreenLayerSurface.

Definition at line 606 of file JAWTWindow.java.

Here is the call graph for this function:

◆ setShallUseOffscreenLayer()

void com.jogamp.nativewindow.awt.JAWTWindow.setShallUseOffscreenLayer ( final boolean  v)

Request an offscreen layer, if supported.

Shall be called before the first NativeWindow#lockSurface(), and hence before realization.

See also
getShallUseOffscreenLayer()
isOffscreenLayerSurfaceEnabled()

Implements com.jogamp.nativewindow.OffscreenLayerOption.

Definition at line 493 of file JAWTWindow.java.

◆ setSurfaceScale()

boolean com.jogamp.nativewindow.awt.JAWTWindow.setSurfaceScale ( final float[]  pixelScale)

Request a pixel scale in x- and y-direction for the associated NativeSurface, where size_in_pixel_units = pixel_scale * size_in_window_units.Default pixel scale request for both directions is AUTOMAX_PIXELSCALE. If canSetSurfaceScale() returns false, requested pixel scale is AUTOMAX_PIXELSCALE, immutable and method returns false. In case platform only supports uniform pixel scale, i.e. one scale for both directions, either AUTOMAX_PIXELSCALE or the maximum requested pixel scale component is used. The requested pixel scale will be validated against platform limits before native scale-setup, i.e. clipped to IDENTITY_PIXELSCALE if not supported or clipped to the platform maximum. It can be queried via getRequestedSurfaceScale(float[]). The actual realized pixel scale values of the NativeSurface can be queried via getCurrentSurfaceScale(float[]) or computed via surface.convertToPixelUnits(new int[] { 1, 1 })

Parameters
pixelScalerequested surface pixel scale float[2] values for x- and y-direction.
Returns
true if the current pixel scale has changed, otherwise false.
See also
getRequestedSurfaceScale(float[])
canSetSurfaceScale()

Ignored for an AWT widget since pixelScale is dictated by AWT mechanisms.

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 334 of file JAWTWindow.java.

◆ surfaceSwap()

boolean com.jogamp.nativewindow.awt.JAWTWindow.surfaceSwap ( )

Provide a mechanism to utilize custom (pre-) swap surface code.

This method is called before the render toolkit (e.g. JOGL) swaps the buffer/surface if double buffering is enabled.

The implementation may itself apply the swapping, in which case true shall be returned.

Returns
true if this method completed swapping the surface, otherwise false, in which case eg the GLDrawable implementation has to swap the code.

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 762 of file JAWTWindow.java.

◆ surfaceUpdated()

void com.jogamp.nativewindow.awt.JAWTWindow.surfaceUpdated ( final Object  updater,
final NativeSurface  ns,
final long  when 
)

Notification of a surface update event, eg.

after a swap buffer operation.

Parameters
updateris the caller object who updated the surface, e.g. a JOGL GLDrawable.
nsthe updated NativeSurface
whenthe time in ms, when the surface was updated

Implements com.jogamp.nativewindow.SurfaceUpdatedListener.

Definition at line 782 of file JAWTWindow.java.

◆ toHexString() [1/2]

static final String com.jogamp.nativewindow.awt.JAWTWindow.toHexString ( final int  i)
staticprotected

Definition at line 989 of file JAWTWindow.java.

◆ toHexString() [2/2]

static final String com.jogamp.nativewindow.awt.JAWTWindow.toHexString ( final long  l)
staticprotected

Definition at line 986 of file JAWTWindow.java.

Here is the caller graph for this function:

◆ toString()

String com.jogamp.nativewindow.awt.JAWTWindow.toString ( )

Definition at line 964 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unlockSurface()

final void com.jogamp.nativewindow.awt.JAWTWindow.unlockSurface ( )

Unlock the surface of this native window.

Shall not modify the surface handle, see lockSurface()

The implementation shall also invoke AbstractGraphicsDevice#unlock() for the final unlock (recursive count zero).

The implementation shall be fail safe, i.e. tolerant in case the native resources are already released / unlocked. In this case the implementation shall simply ignore the call.

See also
lockSurface
com.jogamp.common.util.locks.RecursiveLock

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 734 of file JAWTWindow.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unlockSurfaceImpl()

abstract void com.jogamp.nativewindow.awt.JAWTWindow.unlockSurfaceImpl ( ) throws NativeWindowException
abstractprotected
Here is the caller graph for this function:

◆ updateLockedData()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.updateLockedData ( final JAWT_Rectangle  jawtBounds,
final GraphicsConfiguration  gc 
)
protected

Updates bounds and pixelScale.

Parameters
gcGraphicsConfiguration for updatePixelScale(GraphicsConfiguration, boolean)
Returns
true if bounds or pixelScale has changed, otherwise false

Definition at line 387 of file JAWTWindow.java.

Here is the call graph for this function:

◆ updatePixelScale()

final boolean com.jogamp.nativewindow.awt.JAWTWindow.updatePixelScale ( final GraphicsConfiguration  gc,
final boolean  clearFlag 
)

Updates the minimum and maximum pixel-scale values and returns true if they were updated.

Parameters
gcpre-fetched GraphicsConfiguration instance of upstream component, caller may use cached getAWTGraphicsConfiguration()'s GC or a Component#getGraphicsConfiguration().
clearFlagif true, the hasPixelScaleChanged flag will be cleared
Returns
true if values were updated, otherwise false.
See also
#hasPixelScaleChanged()
getAWTGraphicsConfiguration()
Component::getGraphicsConfiguration()

Definition at line 419 of file JAWTWindow.java.

Here is the caller graph for this function:

Member Data Documentation

◆ component

final Component com.jogamp.nativewindow.awt.JAWTWindow.component
protected

Definition at line 90 of file JAWTWindow.java.

◆ DEBUG

final boolean com.jogamp.nativewindow.awt.JAWTWindow.DEBUG = JAWTUtil.DEBUG
staticprotected

Definition at line 84 of file JAWTWindow.java.

◆ drawable

long com.jogamp.nativewindow.awt.JAWTWindow.drawable
protected

Definition at line 100 of file JAWTWindow.java.

◆ insets

Insets com.jogamp.nativewindow.awt.JAWTWindow.insets
protected

Definition at line 102 of file JAWTWindow.java.

◆ jawt_surface_bounds

Rectangle com.jogamp.nativewindow.awt.JAWTWindow.jawt_surface_bounds
protected

Definition at line 101 of file JAWTWindow.java.

◆ shallUseOffscreenLayer

boolean com.jogamp.nativewindow.awt.JAWTWindow.shallUseOffscreenLayer = false
protected

Definition at line 87 of file JAWTWindow.java.


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