JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.newt.Window Interface Reference

Specifying NEWT's Window functionality: More...

Inheritance diagram for com.jogamp.newt.Window:
Collaboration diagram for com.jogamp.newt.Window:

Classes

interface  FocusRunnable
 
enum  ReparentOperation
 Reparenting operation types. More...
 

Public Member Functions

int getStatePublicBitCount ()
 Number of all public state bits. More...
 
int getStatePublicBitmask ()
 Bitmask covering all public state bits. More...
 
int getStateMask ()
 Returns the current status mask of this instance. More...
 
String getStateMaskString ()
 Returns a string representation of the current state mask. More...
 
int getSupportedStateMask ()
 Returns the supported state mask of the implementation. More...
 
String getSupportedStateMaskString ()
 Returns a string representation of the supported state mask. More...
 
boolean isNativeValid ()
 
Screen getScreen ()
 
MonitorDevice getMainMonitor ()
 Returns the MonitorDevice with the highest viewport coverage of this window. More...
 
CapabilitiesChooser setCapabilitiesChooser (CapabilitiesChooser chooser)
 Set the CapabilitiesChooser to help determine the native visual type. More...
 
CapabilitiesImmutable getRequestedCapabilities ()
 Gets an immutable set of requested capabilities. More...
 
CapabilitiesImmutable getChosenCapabilities ()
 Gets an immutable set of chosen capabilities. More...
 
void destroy ()
 Destroys this window incl.releasing all related resources. More...
 
void setWindowDestroyNotifyAction (Runnable r)
 Set a custom action handling destruction issued by a toolkit triggered window destroy replacing the default destroy() action. More...
 
void setVisible (boolean visible)
 Calls setVisible(true, visible), i.e. More...
 
void setVisible (boolean wait, boolean visible)
 setVisible(..) makes the window and children visible if visible is true, otherwise the window and children becomes invisible. More...
 
boolean isVisible ()
 
Window getDelegatedWindow ()
 If the implementation uses delegation, return the delegated Window instance, otherwise return this instance. More...
 
boolean addChild (NativeWindow win)
 
boolean removeChild (NativeWindow win)
 
float[] getPixelsPerMM (final float[] ppmmStore)
 Returns the pixels per millimeter of this window's NativeSurface according to the main monitor's current mode's surface resolution. More...
 
void setSize (int width, int height)
 Sets the size of the window's client area in window units, excluding decorations. More...
 
void setSurfaceSize (int pixelWidth, int pixelHeight)
 Sets the size of the window's surface in pixel units which claims the window's client area excluding decorations. More...
 
void setTopLevelSize (int width, int height)
 Sets the size of the top-level window including insets (window decorations) in window units. More...
 
void setPosition (int x, int y)
 Sets the location of the window's client area excluding insets (window decorations) in window units. More...
 
void setTopLevelPosition (int x, int y)
 Sets the location of the top-level window inclusive insets (window decorations) in window units. More...
 
void setUndecorated (boolean value)
 
boolean isUndecorated ()
 
void setAlwaysOnTop (boolean value)
 
boolean isAlwaysOnTop ()
 
void setAlwaysOnBottom (boolean value)
 
boolean isAlwaysOnBottom ()
 
void setResizable (final boolean value)
 
boolean isResizable ()
 
void setSticky (final boolean value)
 
boolean isSticky ()
 
void setMaximized (final boolean horz, final boolean vert)
 
boolean isMaximizedVert ()
 
boolean isMaximizedHorz ()
 
void setTitle (String title)
 
String getTitle ()
 
boolean isPointerVisible ()
 
void setPointerVisible (boolean pointerVisible)
 Makes the pointer visible or invisible. More...
 
PointerIcon getPointerIcon ()
 Returns the current PointerIcon, which maybe null for the default. More...
 
void setPointerIcon (final PointerIcon pi)
 
boolean isPointerConfined ()
 
void confinePointer (boolean confine)
 Confine the pointer to this window, ie. More...
 
void warpPointer (int x, int y)
 Moves the pointer to x/y relative to this window's origin in pixel units. More...
 
ReparentOperation reparentWindow (NativeWindow newParent, int x, int y, int hints)
 Change this window's parent window. More...
 
boolean isChildWindow ()
 Returns true if this window is a child window, i.e. More...
 
boolean setFullscreen (boolean fullscreen)
 Enable or disable fullscreen mode for this window. More...
 
boolean setFullscreen (List< MonitorDevice > monitors)
 Enable fullscreen mode for this window spanning across the given MonitorDevices or across all MonitorDevices. More...
 
boolean isFullscreen ()
 
void setFocusAction (FocusRunnable focusAction)
 Sets a FocusRunnable, which FocusRunnable#run() method is executed before the native focus is requested. More...
 
void setKeyboardFocusHandler (KeyListener l)
 Sets a KeyListener allowing focus traversal with a covered window toolkit like AWT. More...
 
void requestFocus ()
 Request focus for this native window. More...
 
void requestFocus (boolean wait)
 Request focus for this native window. More...
 
boolean windowRepaint (int x, int y, int width, int height)
 Trigger window repaint while passing the dirty region in pixel units. More...
 
void enqueueEvent (boolean wait, com.jogamp.newt.event.NEWTEvent event)
 Enqueues a NEWT event. More...
 
void runOnEDTIfAvail (boolean wait, final Runnable task)
 
StringBuilder toSimpleString (StringBuilder sb)
 Appends this class simple string one-line representation to the given StringBuilder instance. More...
 
String toSimpleString ()
 Returns a simple string one-line representation of this instance using toSimpleString(StringBuilder). More...
 
StringBuilder toString (StringBuilder sb)
 Appends this class full string multi-line representation to the given StringBuilder instance. More...
 
String toString ()
 Returns a full string multi-line representation of this instance using toString(StringBuilder). More...
 
void sendWindowEvent (int eventType)
 Send a WindowEvent to all WindowListener. More...
 
void addWindowListener (WindowListener l)
 Appends the given com.jogamp.newt.event.WindowListener to the end of the list. More...
 
void addWindowListener (int index, WindowListener l) throws IndexOutOfBoundsException
 Inserts the given com.jogamp.newt.event.WindowListener at the specified position in the list. More...
 
void removeWindowListener (WindowListener l)
 
WindowListener getWindowListener (int index)
 
WindowListener[] getWindowListeners ()
 
void setKeyboardVisible (boolean visible)
 In case the platform supports or even requires a virtual on-screen keyboard, this method shows or hide it depending on whether visible is true or false. More...
 
boolean isKeyboardVisible ()
 Return true if the virtual on-screen keyboard is visible, otherwise false. More...
 
void addKeyListener (KeyListener l)
 Appends the given com.jogamp.newt.event.KeyListener to the end of the list. More...
 
void addKeyListener (int index, KeyListener l)
 Inserts the given com.jogamp.newt.event.KeyListener at the specified position in the list. More...
 
void removeKeyListener (KeyListener l)
 
KeyListener getKeyListener (int index)
 
KeyListener[] getKeyListeners ()
 
void addMouseListener (MouseListener l)
 Appends the given MouseListener to the end of the list. More...
 
void addMouseListener (int index, MouseListener l)
 Inserts the given MouseListener at the specified position in the list. More...
 
void removeMouseListener (MouseListener l)
 Removes the given MouseListener from the list. More...
 
MouseListener getMouseListener (int index)
 Returns the MouseListener from the list at the given index. More...
 
MouseListener[] getMouseListeners ()
 Returns all MouseListener. More...
 
void setDefaultGesturesEnabled (boolean enable)
 Enable or disable default GestureHandler. More...
 
boolean areDefaultGesturesEnabled ()
 Return true if default GestureHandler are enabled. More...
 
void addGestureHandler (GestureHandler gh)
 Appends the given GestureHandler to the end of the list. More...
 
void addGestureHandler (int index, GestureHandler gh)
 Inserts the given GestureHandler at the specified position in the list. More...
 
void removeGestureHandler (GestureHandler gh)
 Removes the given GestureHandler from the list. More...
 
void addGestureListener (GestureHandler.GestureListener gl)
 Appends the given GestureHandler.GestureListener to the end of the list. More...
 
void addGestureListener (int index, GestureHandler.GestureListener gl)
 Inserts the given GestureHandler.GestureListener at the specified position in the list. More...
 
void removeGestureListener (GestureHandler.GestureListener gl)
 Removes the given GestureHandler.GestureListener from the list. More...
 
- Public Member Functions inherited from com.jogamp.nativewindow.NativeWindow
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...
 
- 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...
 
NativeSurface getNativeSurface ()
 Returns the associated NativeSurface of this NativeSurfaceHolder. More...
 
- Public Member Functions inherited from com.jogamp.nativewindow.WindowClosingProtocol
WindowClosingMode getDefaultCloseOperation ()
 
WindowClosingMode setDefaultCloseOperation (WindowClosingMode op)
 
- Public Member Functions inherited from com.jogamp.nativewindow.ScalableSurface
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...
 

Static Public Attributes

static final boolean DEBUG_MOUSE_EVENT = Debug.debugExplicit("Window.MouseEvent")
 
static final boolean DEBUG_KEY_EVENT = Debug.debugExplicit("Window.KeyEvent")
 
static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window")
 
static final long TIMEOUT_NATIVEWINDOW = 1000
 A 1s timeout while waiting for a native action response, ie setVisible(boolean). More...
 
static final int STATE_BIT_VISIBLE = 0
 Visibility of this instance. More...
 
static final int STATE_BIT_AUTOPOSITION = 1
 Hinting that no custom position has been set before first visibility of this instance. More...
 
static final int STATE_BIT_CHILDWIN = 2
 Set if window is a child window, i.e. More...
 
static final int STATE_BIT_FOCUSED = 3
 Set if window has the input focus, otherwise cleared. More...
 
static final int STATE_BIT_UNDECORATED = 4
 Set if window has window decorations, otherwise cleared. More...
 
static final int STATE_BIT_ALWAYSONTOP = 5
 Set if window is always on top, otherwise cleared. More...
 
static final int STATE_BIT_ALWAYSONBOTTOM = 6
 Set if window is always on bottom, otherwise cleared. More...
 
static final int STATE_BIT_STICKY = 7
 Set if window is sticky, i.e. More...
 
static final int STATE_BIT_RESIZABLE = 8
 Set if window is resizable after creation, otherwise cleared. More...
 
static final int STATE_BIT_MAXIMIZED_VERT = 9
 Set if window is maximized vertically, otherwise cleared. More...
 
static final int STATE_BIT_MAXIMIZED_HORZ = 10
 Set if window is maximized horizontally, otherwise cleared. More...
 
static final int STATE_BIT_FULLSCREEN = 11
 Set if window is in fullscreen mode, otherwise cleared. More...
 
static final int STATE_BIT_POINTERVISIBLE = 12
 Set if the pointer is visible when inside the window, otherwise cleared. More...
 
static final int STATE_BIT_POINTERCONFINED = 13
 Set if the pointer is confined to the window, otherwise cleared. More...
 
static final int STATE_BIT_REPOSITIONABLE = 14
 Set if window is repositionable after creation, otherwise cleared. More...
 
static final int STATE_MASK_VISIBLE = 1 << STATE_BIT_VISIBLE
 Bitmask for STATE_BIT_VISIBLE, {@value}. More...
 
static final int STATE_MASK_AUTOPOSITION = 1 << STATE_BIT_AUTOPOSITION
 Bitmask for STATE_BIT_AUTOPOSITION, {@value}. More...
 
static final int STATE_MASK_CHILDWIN = 1 << STATE_BIT_CHILDWIN
 Bitmask for STATE_BIT_CHILDWIN, {@value}. More...
 
static final int STATE_MASK_FOCUSED = 1 << STATE_BIT_FOCUSED
 Bitmask for STATE_BIT_FOCUSED, {@value}. More...
 
static final int STATE_MASK_UNDECORATED = 1 << STATE_BIT_UNDECORATED
 Bitmask for STATE_BIT_UNDECORATED, {@value}. More...
 
static final int STATE_MASK_ALWAYSONTOP = 1 << STATE_BIT_ALWAYSONTOP
 Bitmask for STATE_BIT_ALWAYSONTOP, {@value}. More...
 
static final int STATE_MASK_ALWAYSONBOTTOM = 1 << STATE_BIT_ALWAYSONBOTTOM
 Bitmask for STATE_BIT_ALWAYSONBOTTOM, {@value}. More...
 
static final int STATE_MASK_STICKY = 1 << STATE_BIT_STICKY
 Bitmask for STATE_BIT_STICKY, {@value}. More...
 
static final int STATE_MASK_RESIZABLE = 1 << STATE_BIT_RESIZABLE
 Bitmask for STATE_BIT_RESIZABLE, {@value}. More...
 
static final int STATE_MASK_MAXIMIZED_VERT = 1 << STATE_BIT_MAXIMIZED_VERT
 Bitmask for STATE_BIT_MAXIMIZED_VERT, {@value}. More...
 
static final int STATE_MASK_MAXIMIZED_HORZ = 1 << STATE_BIT_MAXIMIZED_HORZ
 Bitmask for STATE_BIT_MAXIMIZED_HORZ, {@value}. More...
 
static final int STATE_MASK_FULLSCREEN = 1 << STATE_BIT_FULLSCREEN
 Bitmask for STATE_BIT_FULLSCREEN, {@value}. More...
 
static final int STATE_MASK_POINTERVISIBLE = 1 << STATE_BIT_POINTERVISIBLE
 Bitmask for STATE_BIT_POINTERVISIBLE, {@value}. More...
 
static final int STATE_MASK_POINTERCONFINED = 1 << STATE_BIT_POINTERCONFINED
 Bitmask for STATE_BIT_POINTERCONFINED, {@value}. More...
 
static final int STATE_MASK_REPOSITIONABLE = 1 << STATE_BIT_REPOSITIONABLE
 Bitmask for STATE_BIT_REPOSITIONABLE, {@value}. More...
 
static final int REPARENT_HINT_FORCE_RECREATION = 1 << 0
 Reparenting hint (bitfield value): Force destroy and hence re-creating the window. More...
 
static final int REPARENT_HINT_BECOMES_VISIBLE = 1 << 1
 Reparenting hint (bitfield value): Claim window becomes visible after reparenting, which is important for e.g. 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...
 
- 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

Specifying NEWT's Window functionality:

  • On- and offscreen windows
  • Keyboard and multi-pointer input
  • Native reparenting
  • Toggable fullscreen and decoration mode
  • Transparency
  • ... and more

One use case is com.jogamp.newt.opengl.GLWindow, which delegates window operation to an instance of this interface while providing OpenGL functionality.

All values of this interface are represented in window units, if not stated otherwise.

Coordinate System
  • Screen space has it's origin in the top-left corner, and may not be at 0/0.
  • Window origin is in it's top-left corner, see getX() and getY().
  • Window client-area excludes insets, i.e. window decoration.
  • Window origin is relative to it's parent window if exist, or the screen position (top-level).

See NativeWindow and Screen.

Custom Window Icons

Custom window icons can be defined via system property newt.window.icons, which shall contain a list of PNG icon locations from low- to high-resolution, separated by one whitespace or one comma character. The location must be resolvable via classpath, i.e. shall reference a location within the jar file. Example (our default):

  -Dnewt.window.icons="jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png"
  -Djnlp.newt.window.icons="jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png"

The property can also be set programmatically, which must happen before any NEWT classes are touched:

  System.setProperty("newt.window.icons", "jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png");

To disable even Jogamp's own window icons in favor of system icons, simply set a non-existing location, e.g.:

  -Dnewt.window.icons="null,null"

Use of Lifecycle Heavy functions

Some of the methods specified here are lifecycle-heavy. That is, they are able to destroy and/or reattach resources to/from the window. Because of this, the methods are not safe to be called from EDT related threads. For example, it is not safe for a method in an attached KeyListener to call setFullscreen(boolean) on a Window directly. It is safe, however, for that method to spawn a background worker thread which calls the method directly. The documentation for individual methods indicates whether or not they are lifecycle-heavy.

Definition at line 115 of file Window.java.

Member Function Documentation

◆ addChild()

boolean com.jogamp.newt.Window.addChild ( NativeWindow  win)

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ addGestureHandler() [1/2]

void com.jogamp.newt.Window.addGestureHandler ( GestureHandler  gh)

Appends the given GestureHandler to the end of the list.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ addGestureHandler() [2/2]

void com.jogamp.newt.Window.addGestureHandler ( int  index,
GestureHandler  gh 
)

Inserts the given GestureHandler 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

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ addGestureListener() [1/2]

void com.jogamp.newt.Window.addGestureListener ( GestureHandler.GestureListener  gl)

Appends the given GestureHandler.GestureListener to the end of the list.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ addGestureListener() [2/2]

void com.jogamp.newt.Window.addGestureListener ( int  index,
GestureHandler.GestureListener  gl 
)

Inserts the given GestureHandler.GestureListener 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

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ addKeyListener() [1/2]

void com.jogamp.newt.Window.addKeyListener ( int  index,
KeyListener  l 
)

Inserts the given com.jogamp.newt.event.KeyListener 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

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ addKeyListener() [2/2]

void com.jogamp.newt.Window.addKeyListener ( KeyListener  l)

Appends the given com.jogamp.newt.event.KeyListener to the end of the list.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ addMouseListener() [1/2]

void com.jogamp.newt.Window.addMouseListener ( int  index,
MouseListener  l 
)

Inserts the given MouseListener 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

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ addMouseListener() [2/2]

void com.jogamp.newt.Window.addMouseListener ( MouseListener  l)

Appends the given MouseListener to the end of the list.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ addWindowListener() [1/2]

void com.jogamp.newt.Window.addWindowListener ( int  index,
WindowListener  l 
) throws IndexOutOfBoundsException

Inserts the given com.jogamp.newt.event.WindowListener 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

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ addWindowListener() [2/2]

void com.jogamp.newt.Window.addWindowListener ( WindowListener  l)

Appends the given com.jogamp.newt.event.WindowListener to the end of the list.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ areDefaultGesturesEnabled()

boolean com.jogamp.newt.Window.areDefaultGesturesEnabled ( )

Return true if default GestureHandler are enabled.

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ confinePointer()

void com.jogamp.newt.Window.confinePointer ( boolean  confine)

Confine the pointer to this window, ie.

pointer jail.

Before jailing the mouse pointer, the window request the focus and the pointer is centered in the window.

In combination w/ warpPointer(int, int) and maybe setPointerVisible(boolean) a simple mouse navigation can be realized.

Parameters
confinedefaults to false.

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ destroy()

void com.jogamp.newt.Window.destroy ( )

Destroys this window incl.releasing all related resources.

Also iterates through this window's children and destroys them.

Visibility is set to false.

Method sends out pre- and post- destruction events to all of it's WindowListener.

This method invokes Screen#removeReference() after it's own destruction,
which will issue Screen#destroy() if the reference count becomes 0.
This destruction sequence shall end up in Display#destroy(), if all reference counts become 0.

The Window can be recreate via setVisible(true).

This method is lifecycle heavy.

See also
destroy()
setVisible(boolean)

Implements com.jogamp.nativewindow.NativeWindow.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ enqueueEvent()

void com.jogamp.newt.Window.enqueueEvent ( boolean  wait,
com.jogamp.newt.event.NEWTEvent  event 
)

Enqueues a NEWT event.

Parameters
waitPassing true will block until the event has been processed, otherwise method returns immediately.
eventThe event to enqueue.

◆ getChosenCapabilities()

CapabilitiesImmutable com.jogamp.newt.Window.getChosenCapabilities ( )

Gets an immutable set of chosen capabilities.

Returns
the chosen capabilities

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ getDelegatedWindow()

Window com.jogamp.newt.Window.getDelegatedWindow ( )

If the implementation uses delegation, return the delegated Window instance, otherwise return this instance.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ getKeyListener()

KeyListener com.jogamp.newt.Window.getKeyListener ( int  index)

◆ getKeyListeners()

KeyListener[] com.jogamp.newt.Window.getKeyListeners ( )

◆ getMainMonitor()

MonitorDevice com.jogamp.newt.Window.getMainMonitor ( )

Returns the MonitorDevice with the highest viewport coverage of this window.

If no coverage is detected the first MonitorDevice is returned.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ getMouseListener()

MouseListener com.jogamp.newt.Window.getMouseListener ( int  index)

Returns the MouseListener from the list at the given index.

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ getMouseListeners()

MouseListener[] com.jogamp.newt.Window.getMouseListeners ( )

Returns all MouseListener.

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ getPixelsPerMM()

float[] com.jogamp.newt.Window.getPixelsPerMM ( final float[]  ppmmStore)

Returns the pixels per millimeter of this window's NativeSurface according to the main monitor's current mode's surface resolution.

Method takes the current surface-scale and native surface-scale into account, i.e.:

   surfacePpMM = monitorPpMM * currentSurfaceScale / nativeSurfaceScale,
   with PpMM == pixel per millimeter

To convert the result to dpi, i.e. dots-per-inch, multiply both components with 25.4f.

Parameters
ppmmStorefloat[2] storage for the ppmm result
Returns
the passed storage containing the ppmm for chaining

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ getPointerIcon()

PointerIcon com.jogamp.newt.Window.getPointerIcon ( )

Returns the current PointerIcon, which maybe null for the default.

See also
setPointerIcon(PointerIcon)

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ getRequestedCapabilities()

CapabilitiesImmutable com.jogamp.newt.Window.getRequestedCapabilities ( )

Gets an immutable set of requested capabilities.

Returns
the requested capabilities

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ getScreen()

Screen com.jogamp.newt.Window.getScreen ( )
Returns
The associated Screen

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ getStateMask()

◆ getStateMaskString()

String com.jogamp.newt.Window.getStateMaskString ( )

Returns a string representation of the current state mask.

Since
2.3.2

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ getStatePublicBitCount()

int com.jogamp.newt.Window.getStatePublicBitCount ( )

Number of all public state bits.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ getStatePublicBitmask()

int com.jogamp.newt.Window.getStatePublicBitmask ( )

Bitmask covering all public state bits.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ getSupportedStateMask()

int com.jogamp.newt.Window.getSupportedStateMask ( )

Returns the supported state mask of the implementation.

Implementation provides supported state mask values at runtime after native window creation, i.e. first visibility.

Please note that a window's size shall also be allowed to change, i.e. setSize(int, int).

Default minimum value is STATE_MASK_VISIBLE | STATE_MASK_FOCUSED, i.e. the minimum requirement for all implementations.

Usual desktop minimum value is STATE_MASK_VISIBLE | STATE_MASK_FOCUSED | STATE_MASK_FULLSCREEN | STATE_MASK_RESIZABLE | STATE_MASK_REPOSITIONABLE.

Before native window creation getStatePublicBitmask() is returned, i.e. it is assumed all features are supported.

Semantic of the supported state-mask bits (after native creation, i.e. 1st visibility):

See also
getStateMask()
Since
2.3.2

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ getSupportedStateMaskString()

String com.jogamp.newt.Window.getSupportedStateMaskString ( )

Returns a string representation of the supported state mask.

Since
2.3.2

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ getTitle()

String com.jogamp.newt.Window.getTitle ( )

◆ getWindowListener()

WindowListener com.jogamp.newt.Window.getWindowListener ( int  index)

◆ getWindowListeners()

WindowListener[] com.jogamp.newt.Window.getWindowListeners ( )

◆ isAlwaysOnBottom()

boolean com.jogamp.newt.Window.isAlwaysOnBottom ( )

◆ isAlwaysOnTop()

boolean com.jogamp.newt.Window.isAlwaysOnTop ( )

◆ isChildWindow()

boolean com.jogamp.newt.Window.isChildWindow ( )

Returns true if this window is a child window, i.e.

has been reparented.

Otherwise return false, i.e. this window is a top-level window.

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ isFullscreen()

boolean com.jogamp.newt.Window.isFullscreen ( )

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ isKeyboardVisible()

boolean com.jogamp.newt.Window.isKeyboardVisible ( )

Return true if the virtual on-screen keyboard is visible, otherwise false.

Currently on Android, the only supported platform right now, there is no way to reliably be notified of the current keyboard state.
It would be best, if your code does not rely on this information.

See also
setKeyboardVisible(boolean)

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ isMaximizedHorz()

boolean com.jogamp.newt.Window.isMaximizedHorz ( )

◆ isMaximizedVert()

boolean com.jogamp.newt.Window.isMaximizedVert ( )

◆ isNativeValid()

boolean com.jogamp.newt.Window.isNativeValid ( )
Returns
true if the native window handle is valid and ready to operate, ie if the native window has been created via setVisible(true), otherwise false.
See also
setVisible(boolean)
#destroy(boolean)

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ isPointerConfined()

boolean com.jogamp.newt.Window.isPointerConfined ( )

◆ isPointerVisible()

boolean com.jogamp.newt.Window.isPointerVisible ( )

◆ isResizable()

boolean com.jogamp.newt.Window.isResizable ( )

◆ isSticky()

boolean com.jogamp.newt.Window.isSticky ( )

◆ isUndecorated()

boolean com.jogamp.newt.Window.isUndecorated ( )

◆ isVisible()

boolean com.jogamp.newt.Window.isVisible ( )
See also
STATE_BIT_VISIBLE
setVisible(boolean, boolean)

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ removeChild()

boolean com.jogamp.newt.Window.removeChild ( NativeWindow  win)

◆ removeGestureHandler()

void com.jogamp.newt.Window.removeGestureHandler ( GestureHandler  gh)

Removes the given GestureHandler from the list.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ removeGestureListener()

void com.jogamp.newt.Window.removeGestureListener ( GestureHandler.GestureListener  gl)

Removes the given GestureHandler.GestureListener from the list.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ removeKeyListener()

void com.jogamp.newt.Window.removeKeyListener ( KeyListener  l)

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ removeMouseListener()

void com.jogamp.newt.Window.removeMouseListener ( MouseListener  l)

Removes the given MouseListener from the list.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ removeWindowListener()

void com.jogamp.newt.Window.removeWindowListener ( WindowListener  l)

◆ reparentWindow()

ReparentOperation com.jogamp.newt.Window.reparentWindow ( NativeWindow  newParent,
int  x,
int  y,
int  hints 
)

Change this window's parent window.


In case the old parent is not null and a Window, this window is removed from it's list of children.
In case the new parent is not null and a Window, this window is added to it's list of children.

This method is lifecycle heavy.

Parameters
newParentThe new parent NativeWindow. If null, this Window becomes a top level window.
xnew top-level position in window units, use -1 for default position.
ynew top-level position in window units, use -1 for default position.
hintsMay contain hints (bitfield values) like REPARENT_HINT_FORCE_RECREATION or REPARENT_HINT_BECOMES_VISIBLE.
Returns
The issued reparent action type (strategy) as defined in Window.ReparentAction

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ requestFocus() [1/2]

void com.jogamp.newt.Window.requestFocus ( )

Request focus for this native window.

The request is handled on this Window EDT and blocked until finished.

See also
requestFocus(boolean)

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ requestFocus() [2/2]

void com.jogamp.newt.Window.requestFocus ( boolean  wait)

Request focus for this native window.

The request is handled on this Window EDT.

Parameters
waittrue if waiting until the request is executed, otherwise false
See also
requestFocus()

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ runOnEDTIfAvail()

void com.jogamp.newt.Window.runOnEDTIfAvail ( boolean  wait,
final Runnable  task 
)

◆ sendWindowEvent()

void com.jogamp.newt.Window.sendWindowEvent ( int  eventType)

Send a WindowEvent to all WindowListener.

Parameters
eventTypea WindowEvent type, e.g. WindowEvent#EVENT_WINDOW_REPAINT.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ setAlwaysOnBottom()

void com.jogamp.newt.Window.setAlwaysOnBottom ( boolean  value)

Operation is ignored if this instance is a child window.

See also
STATE_BIT_ALWAYSONBOTTOM
STATE_MASK_ALWAYSONBOTTOM
Since
2.3.2

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setAlwaysOnTop()

void com.jogamp.newt.Window.setAlwaysOnTop ( boolean  value)

Operation is ignored if this instance is a child window.

See also
STATE_BIT_ALWAYSONTOP
STATE_MASK_ALWAYSONTOP

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setCapabilitiesChooser()

CapabilitiesChooser com.jogamp.newt.Window.setCapabilitiesChooser ( CapabilitiesChooser  chooser)

Set the CapabilitiesChooser to help determine the native visual type.

Parameters
chooserthe new CapabilitiesChooser
Returns
the previous CapabilitiesChooser

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ setDefaultGesturesEnabled()

void com.jogamp.newt.Window.setDefaultGesturesEnabled ( boolean  enable)

Enable or disable default GestureHandler.

Default is enabled.

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setFocusAction()

void com.jogamp.newt.Window.setFocusAction ( FocusRunnable  focusAction)

Sets a FocusRunnable, which FocusRunnable#run() method is executed before the native focus is requested.

This allows notifying a covered window toolkit like AWT that the focus is requested, hence focus traversal can be made transparent.

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setFullscreen() [1/2]

boolean com.jogamp.newt.Window.setFullscreen ( boolean  fullscreen)

Enable or disable fullscreen mode for this window.

Fullscreen mode is established on the main monitor.

This method is lifecycle heavy.

Parameters
fullscreenenable or disable fullscreen mode
Returns
success
See also
#setFullscreen(List)
isFullscreen()

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ setFullscreen() [2/2]

boolean com.jogamp.newt.Window.setFullscreen ( List< MonitorDevice monitors)

Enable fullscreen mode for this window spanning across the given MonitorDevices or across all MonitorDevices.

Disable fullscreen via setFullscreen(boolean).

This method is lifecycle heavy.

Parameters
monitorsif null fullscreen will be spanned across all MonitorDevices, otherwise across the given list of MonitorDevice.
Returns
success
See also
setFullscreen(boolean)
isFullscreen()

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setKeyboardFocusHandler()

void com.jogamp.newt.Window.setKeyboardFocusHandler ( KeyListener  l)

Sets a KeyListener allowing focus traversal with a covered window toolkit like AWT.

The KeyListener methods are invoked prior to all other KeyListener's allowing to suppress the KeyEvent via the InputEvent#consumedTag and to perform focus traversal with a 3rd party toolkit.

The KeyListener methods are not invoked for auto-repeat events.

Parameters
l

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setKeyboardVisible()

void com.jogamp.newt.Window.setKeyboardVisible ( boolean  visible)

In case the platform supports or even requires a virtual on-screen keyboard, this method shows or hide it depending on whether visible is true or false.

One known platform where NEWT supports this feature is Android.

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setMaximized()

void com.jogamp.newt.Window.setMaximized ( final boolean  horz,
final boolean  vert 
)

◆ setPointerIcon()

void com.jogamp.newt.Window.setPointerIcon ( final PointerIcon  pi)
Parameters
piValid PointerIcon reference or null to reset the pointer icon to default.
See also
PointerIcon
Display::createPointerIcon(com.jogamp.common.util.IOUtil.ClassResources, int, int)

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setPointerVisible()

void com.jogamp.newt.Window.setPointerVisible ( boolean  pointerVisible)

Makes the pointer visible or invisible.

Parameters
pointerVisibledefaults to true for platforms w/ visible pointer, otherwise defaults to true, eg. Android.
See also
confinePointer(boolean)

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setPosition()

void com.jogamp.newt.Window.setPosition ( int  x,
int  y 
)

Sets the location of the window's client area excluding insets (window decorations) in window units.


This call is ignored if in fullscreen mode.

Parameters
xcoord of the client-area's top left corner in window units
ycoord of the client-area's top left corner in window units
See also
getInsets()

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ setResizable()

void com.jogamp.newt.Window.setResizable ( final boolean  value)

Operation is ignored if this instance is a child window.

See also
STATE_BIT_RESIZABLE
STATE_MASK_RESIZABLE
Since
2.3.2

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setSize()

void com.jogamp.newt.Window.setSize ( int  width,
int  height 
)

Sets the size of the window's client area in window units, excluding decorations.

Zero size semantics are respected, see setVisible(boolean):

if ( visible && 0 != windowHandle && ( 0 ≥ width || 0 ≥ height ) ) {
  setVisible(false);
} else if ( visible && 0 == windowHandle && 0 < width && 0 < height ) {
  setVisible(true);
} else {
  // as expected ..
}

</p

This call is ignored if in fullscreen mode.

Parameters
widthof the window's client area in window units
heightof the window's client area in window units
See also
STATE_BIT_RESIZABLE
STATE_MASK_RESIZABLE
setSurfaceSize(int, int)
setTopLevelSize(int, int)
getInsets()

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ setSticky()

void com.jogamp.newt.Window.setSticky ( final boolean  value)

Operation is ignored if this instance is a child window.

See also
STATE_BIT_STICKY
STATE_MASK_STICKY
Since
2.3.2

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setSurfaceSize()

void com.jogamp.newt.Window.setSurfaceSize ( int  pixelWidth,
int  pixelHeight 
)

Sets the size of the window's surface in pixel units which claims the window's client area excluding decorations.

In multiple monitor mode, setting the window's surface size in pixel units might not be possible due to unknown scale values of the target display. Hence re-setting the pixel unit size after window creation is recommended.

Zero size semantics are respected, see setVisible(boolean):

if ( visible && 0 != windowHandle && ( 0 ≥ width || 0 ≥ height ) ) {
  setVisible(false);
} else if ( visible && 0 == windowHandle && 0 < width && 0 < height ) {
  setVisible(true);
} else {
  // as expected ..
}

</p

This call is ignored if in fullscreen mode.

Parameters
pixelWidthof the window's client area in pixel units
pixelHeightof the window's client area in pixel units
See also
setSize(int, int)
getInsets()

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ setTitle()

void com.jogamp.newt.Window.setTitle ( String  title)

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ setTopLevelPosition()

void com.jogamp.newt.Window.setTopLevelPosition ( int  x,
int  y 
)

Sets the location of the top-level window inclusive insets (window decorations) in window units.


Note: Insets (if supported) are available only after the window is set visible and hence has been created.

This call is ignored if in fullscreen mode.

Parameters
xcoord of the top-level left corner in window units
ycoord of the top-level left corner in window units
See also
setPosition(int, int)
getInsets()

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setTopLevelSize()

void com.jogamp.newt.Window.setTopLevelSize ( int  width,
int  height 
)

Sets the size of the top-level window including insets (window decorations) in window units.

Note: Insets (if supported) are available only after the window is set visible and hence has been created.

Parameters
widthof the top-level window area in window units
heightof the top-level window area in window units
See also
setSize(int, int)
getInsets()

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setUndecorated()

void com.jogamp.newt.Window.setUndecorated ( boolean  value)

◆ setVisible() [1/2]

void com.jogamp.newt.Window.setVisible ( boolean  visible)

Calls setVisible(true, visible), i.e.

blocks until the window becomes visible.

This method is lifecycle heavy.

See also
setVisible(boolean, boolean)
STATE_BIT_VISIBLE

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ setVisible() [2/2]

void com.jogamp.newt.Window.setVisible ( boolean  wait,
boolean  visible 
)

setVisible(..) makes the window and children visible if visible is true, otherwise the window and children becomes invisible.

Native instance gets created at first visibility, following NEWT's lazy creation pattern.

If wait is true, method blocks until window is visible and valid, otherwise method returns immediately.

Zero size semantics are respected, see setSize(int,int):

if ( 0 == windowHandle && visible ) {
  this.visible = visible;
  if( 0 < width && 0 < height ) {
    createNative();
  }
} else if ( this.visible != visible ) {
  this.visible = visible;
  setNativeSizeImpl();
}

</p

In case this window is a child window and has a com.jogamp.nativewindow.NativeWindow parent,
setVisible(wait, true) has no effect as long the parent's is not valid yet, i.e. com.jogamp.nativewindow.NativeWindow#getWindowHandle() returns null.
setVisible(wait, true) shall be repeated when the parent becomes valid.

This method is lifecycle heavy.

See also
STATE_BIT_VISIBLE

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ setWindowDestroyNotifyAction()

void com.jogamp.newt.Window.setWindowDestroyNotifyAction ( Runnable  r)

Set a custom action handling destruction issued by a toolkit triggered window destroy replacing the default destroy() action.

The custom action shall call destroy() but may perform further tasks before and after.

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

◆ toSimpleString() [1/2]

String com.jogamp.newt.Window.toSimpleString ( )

Returns a simple string one-line representation of this instance using toSimpleString(StringBuilder).

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ toSimpleString() [2/2]

StringBuilder com.jogamp.newt.Window.toSimpleString ( StringBuilder  sb)

Appends this class simple string one-line representation to the given StringBuilder instance.

Parameters
sbgiven instance where this class simple string representation is added to
Returns
the given StringBuilder for chaining

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ toString() [1/2]

String com.jogamp.newt.Window.toString ( )

Returns a full string multi-line representation of this instance using toString(StringBuilder).

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ toString() [2/2]

StringBuilder com.jogamp.newt.Window.toString ( StringBuilder  sb)

Appends this class full string multi-line representation to the given StringBuilder instance.

Parameters
sbgiven instance where this class full string representation is added to
Returns
the given StringBuilder for chaining

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ warpPointer()

void com.jogamp.newt.Window.warpPointer ( int  x,
int  y 
)

Moves the pointer to x/y relative to this window's origin in pixel units.

Parameters
xrelative pointer x position within this window in pixel units
yrelative pointer y position within this window in pixel units
See also
confinePointer(boolean)

Implemented in com.jogamp.newt.opengl.GLWindow.

◆ windowRepaint()

boolean com.jogamp.newt.Window.windowRepaint ( int  x,
int  y,
int  width,
int  height 
)

Trigger window repaint while passing the dirty region in pixel units.

Parameters
xdirty-region y-pos in pixel units
ydirty-region x-pos in pixel units
widthdirty-region width in pixel units
heightdirty-region height in pixel units
Returns
true if window isNativeValid()

Implemented in com.jogamp.newt.opengl.GLWindow.

Here is the caller graph for this function:

Member Data Documentation

◆ DEBUG_IMPLEMENTATION

final boolean com.jogamp.newt.Window.DEBUG_IMPLEMENTATION = Debug.debug("Window")
static

Definition at line 118 of file Window.java.

◆ DEBUG_KEY_EVENT

final boolean com.jogamp.newt.Window.DEBUG_KEY_EVENT = Debug.debugExplicit("Window.KeyEvent")
static

Definition at line 117 of file Window.java.

◆ DEBUG_MOUSE_EVENT

final boolean com.jogamp.newt.Window.DEBUG_MOUSE_EVENT = Debug.debugExplicit("Window.MouseEvent")
static

Definition at line 116 of file Window.java.

◆ REPARENT_HINT_BECOMES_VISIBLE

final int com.jogamp.newt.Window.REPARENT_HINT_BECOMES_VISIBLE = 1 << 1
static

Reparenting hint (bitfield value): Claim window becomes visible after reparenting, which is important for e.g.

preserving the GL-states in case window is invisible while reparenting.

Definition at line 914 of file Window.java.

◆ REPARENT_HINT_FORCE_RECREATION

final int com.jogamp.newt.Window.REPARENT_HINT_FORCE_RECREATION = 1 << 0
static

Reparenting hint (bitfield value): Force destroy and hence re-creating the window.

Definition at line 912 of file Window.java.

◆ STATE_BIT_ALWAYSONBOTTOM

final int com.jogamp.newt.Window.STATE_BIT_ALWAYSONBOTTOM = 6
static

Set if window is always on bottom, otherwise cleared.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 196 of file Window.java.

◆ STATE_BIT_ALWAYSONTOP

final int com.jogamp.newt.Window.STATE_BIT_ALWAYSONTOP = 5
static

Set if window is always on top, otherwise cleared.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 187 of file Window.java.

◆ STATE_BIT_AUTOPOSITION

final int com.jogamp.newt.Window.STATE_BIT_AUTOPOSITION = 1
static

Hinting that no custom position has been set before first visibility of this instance.

If kept false at creation, this allows the WM to choose the top-level window position, otherwise the custom position is being enforced.

Bit number {@value}.

Defaults to true.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 147 of file Window.java.

◆ STATE_BIT_CHILDWIN

final int com.jogamp.newt.Window.STATE_BIT_CHILDWIN = 2
static

Set if window is a child window, i.e.

has been reparented.

Otherwise bit is cleared, i.e. window is top-level.

Changing this state is lifecycle heavy.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 160 of file Window.java.

◆ STATE_BIT_FOCUSED

final int com.jogamp.newt.Window.STATE_BIT_FOCUSED = 3
static

Set if window has the input focus, otherwise cleared.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 169 of file Window.java.

◆ STATE_BIT_FULLSCREEN

final int com.jogamp.newt.Window.STATE_BIT_FULLSCREEN = 11
static

Set if window is in fullscreen mode, otherwise cleared.

Usually fullscreen mode implies STATE_BIT_UNDECORATED, however, an implementation is allowed to ignore this if unavailable.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 244 of file Window.java.

◆ STATE_BIT_MAXIMIZED_HORZ

final int com.jogamp.newt.Window.STATE_BIT_MAXIMIZED_HORZ = 10
static

Set if window is maximized horizontally, otherwise cleared.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 231 of file Window.java.

◆ STATE_BIT_MAXIMIZED_VERT

final int com.jogamp.newt.Window.STATE_BIT_MAXIMIZED_VERT = 9
static

Set if window is maximized vertically, otherwise cleared.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 222 of file Window.java.

◆ STATE_BIT_POINTERCONFINED

final int com.jogamp.newt.Window.STATE_BIT_POINTERCONFINED = 13
static

Set if the pointer is confined to the window, otherwise cleared.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 263 of file Window.java.

◆ STATE_BIT_POINTERVISIBLE

final int com.jogamp.newt.Window.STATE_BIT_POINTERVISIBLE = 12
static

Set if the pointer is visible when inside the window, otherwise cleared.

Bit number {@value}.

Defaults to true.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 254 of file Window.java.

◆ STATE_BIT_REPOSITIONABLE

final int com.jogamp.newt.Window.STATE_BIT_REPOSITIONABLE = 14
static

Set if window is repositionable after creation, otherwise cleared.

Bit number {@value}.

Defaults to true.

See also
getSupportedStateMask()
getStateMask()
Since
2.4.0

Definition at line 273 of file Window.java.

◆ STATE_BIT_RESIZABLE

final int com.jogamp.newt.Window.STATE_BIT_RESIZABLE = 8
static

Set if window is resizable after creation, otherwise cleared.

Bit number {@value}.

Defaults to true.

See also
getStateMask()
Since
2.3.2

Definition at line 213 of file Window.java.

◆ STATE_BIT_STICKY

final int com.jogamp.newt.Window.STATE_BIT_STICKY = 7
static

Set if window is sticky, i.e.

visible on all virtual desktop, otherwise cleared.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 205 of file Window.java.

◆ STATE_BIT_UNDECORATED

final int com.jogamp.newt.Window.STATE_BIT_UNDECORATED = 4
static

Set if window has window decorations, otherwise cleared.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 178 of file Window.java.

◆ STATE_BIT_VISIBLE

final int com.jogamp.newt.Window.STATE_BIT_VISIBLE = 0
static

Visibility of this instance.

Native instance gets created at first visibility, following NEWT's lazy creation pattern.

Changing this state is lifecycle heavy.

Bit number {@value}.

Defaults to false.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 136 of file Window.java.

◆ STATE_MASK_ALWAYSONBOTTOM

final int com.jogamp.newt.Window.STATE_MASK_ALWAYSONBOTTOM = 1 << STATE_BIT_ALWAYSONBOTTOM
static

Bitmask for STATE_BIT_ALWAYSONBOTTOM, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 323 of file Window.java.

◆ STATE_MASK_ALWAYSONTOP

final int com.jogamp.newt.Window.STATE_MASK_ALWAYSONTOP = 1 << STATE_BIT_ALWAYSONTOP
static

Bitmask for STATE_BIT_ALWAYSONTOP, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 316 of file Window.java.

◆ STATE_MASK_AUTOPOSITION

final int com.jogamp.newt.Window.STATE_MASK_AUTOPOSITION = 1 << STATE_BIT_AUTOPOSITION
static

Bitmask for STATE_BIT_AUTOPOSITION, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 288 of file Window.java.

◆ STATE_MASK_CHILDWIN

final int com.jogamp.newt.Window.STATE_MASK_CHILDWIN = 1 << STATE_BIT_CHILDWIN
static

Bitmask for STATE_BIT_CHILDWIN, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 295 of file Window.java.

◆ STATE_MASK_FOCUSED

final int com.jogamp.newt.Window.STATE_MASK_FOCUSED = 1 << STATE_BIT_FOCUSED
static

Bitmask for STATE_BIT_FOCUSED, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 302 of file Window.java.

◆ STATE_MASK_FULLSCREEN

final int com.jogamp.newt.Window.STATE_MASK_FULLSCREEN = 1 << STATE_BIT_FULLSCREEN
static

Bitmask for STATE_BIT_FULLSCREEN, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 358 of file Window.java.

◆ STATE_MASK_MAXIMIZED_HORZ

final int com.jogamp.newt.Window.STATE_MASK_MAXIMIZED_HORZ = 1 << STATE_BIT_MAXIMIZED_HORZ
static

Bitmask for STATE_BIT_MAXIMIZED_HORZ, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 351 of file Window.java.

◆ STATE_MASK_MAXIMIZED_VERT

final int com.jogamp.newt.Window.STATE_MASK_MAXIMIZED_VERT = 1 << STATE_BIT_MAXIMIZED_VERT
static

Bitmask for STATE_BIT_MAXIMIZED_VERT, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 344 of file Window.java.

◆ STATE_MASK_POINTERCONFINED

final int com.jogamp.newt.Window.STATE_MASK_POINTERCONFINED = 1 << STATE_BIT_POINTERCONFINED
static

Bitmask for STATE_BIT_POINTERCONFINED, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 372 of file Window.java.

◆ STATE_MASK_POINTERVISIBLE

final int com.jogamp.newt.Window.STATE_MASK_POINTERVISIBLE = 1 << STATE_BIT_POINTERVISIBLE
static

Bitmask for STATE_BIT_POINTERVISIBLE, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 365 of file Window.java.

◆ STATE_MASK_REPOSITIONABLE

final int com.jogamp.newt.Window.STATE_MASK_REPOSITIONABLE = 1 << STATE_BIT_REPOSITIONABLE
static

Bitmask for STATE_BIT_REPOSITIONABLE, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.4.0

Definition at line 379 of file Window.java.

◆ STATE_MASK_RESIZABLE

final int com.jogamp.newt.Window.STATE_MASK_RESIZABLE = 1 << STATE_BIT_RESIZABLE
static

Bitmask for STATE_BIT_RESIZABLE, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 337 of file Window.java.

◆ STATE_MASK_STICKY

final int com.jogamp.newt.Window.STATE_MASK_STICKY = 1 << STATE_BIT_STICKY
static

Bitmask for STATE_BIT_STICKY, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 330 of file Window.java.

◆ STATE_MASK_UNDECORATED

final int com.jogamp.newt.Window.STATE_MASK_UNDECORATED = 1 << STATE_BIT_UNDECORATED
static

Bitmask for STATE_BIT_UNDECORATED, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 309 of file Window.java.

◆ STATE_MASK_VISIBLE

final int com.jogamp.newt.Window.STATE_MASK_VISIBLE = 1 << STATE_BIT_VISIBLE
static

Bitmask for STATE_BIT_VISIBLE, {@value}.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Definition at line 281 of file Window.java.

◆ TIMEOUT_NATIVEWINDOW

final long com.jogamp.newt.Window.TIMEOUT_NATIVEWINDOW = 1000
static

A 1s timeout while waiting for a native action response, ie setVisible(boolean).

Definition at line 121 of file Window.java.


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