JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.newt.opengl.GLWindow Class Reference

An implementation of GLAutoDrawable and Window interface, using a delegated Window instance, which may be an aggregation (lifecycle: created and destroyed). More...

Inheritance diagram for com.jogamp.newt.opengl.GLWindow:
Collaboration diagram for com.jogamp.newt.opengl.GLWindow:

Classes

class  GLLifecycleHook
 

Public Member Functions

final Object getUpstreamWidget ()
 Method may return the upstream UI toolkit object holding this GLAutoDrawable instance, if exist. More...
 
final RecursiveLock getUpstreamLock ()
 Returns the recursive lock object of the upstream widget to synchronize multithreaded access on top of NativeSurface#lockSurface(). More...
 
WindowClosingMode getDefaultCloseOperation ()
 
WindowClosingMode setDefaultCloseOperation (final WindowClosingMode op)
 
final int getStatePublicBitCount ()
 Number of all public state bits. More...
 
final int getStatePublicBitmask ()
 Bitmask covering all public state bits. More...
 
final int getStateMask ()
 Returns the current status mask of this instance. More...
 
final String getStateMaskString ()
 Returns a string representation of the current state mask. More...
 
final int getSupportedStateMask ()
 Returns the supported state mask of the implementation. More...
 
final String getSupportedStateMaskString ()
 Returns a string representation of the supported state mask. More...
 
CapabilitiesChooser setCapabilitiesChooser (final CapabilitiesChooser chooser)
 Set the CapabilitiesChooser to help determine the native visual type. More...
 
final CapabilitiesImmutable getChosenCapabilities ()
 Gets an immutable set of chosen capabilities. More...
 
final CapabilitiesImmutable getRequestedCapabilities ()
 Gets an immutable set of requested capabilities. More...
 
final Window getDelegatedWindow ()
 If the implementation uses delegation, return the delegated Window instance, otherwise return this instance. More...
 
final NativeWindow getParent ()
 
final Screen getScreen ()
 
final MonitorDevice getMainMonitor ()
 Returns the MonitorDevice with the highest viewport coverage of this window. More...
 
final void setTitle (final String title)
 
final String getTitle ()
 
final boolean isPointerVisible ()
 
final void setPointerVisible (final boolean mouseVisible)
 Makes the pointer visible or invisible. More...
 
final PointerIcon getPointerIcon ()
 Returns the current PointerIcon, which maybe null for the default. More...
 
final void setPointerIcon (final PointerIcon pi)
 
final boolean isPointerConfined ()
 
final void confinePointer (final boolean grab)
 Confine the pointer to this window, ie. More...
 
final void setUndecorated (final boolean value)
 
final void warpPointer (final int x, final int y)
 Moves the pointer to x/y relative to this window's origin in pixel units. More...
 
final boolean isUndecorated ()
 
final void setAlwaysOnTop (final boolean value)
 
final boolean isAlwaysOnTop ()
 
final void setAlwaysOnBottom (final boolean value)
 
final boolean isAlwaysOnBottom ()
 
final void setResizable (final boolean value)
 
final boolean isResizable ()
 
final void setSticky (final boolean value)
 
final boolean isSticky ()
 
final void setMaximized (final boolean horz, final boolean vert)
 
final boolean isMaximizedVert ()
 
final boolean isMaximizedHorz ()
 
final void setFocusAction (final FocusRunnable focusAction)
 Sets a FocusRunnable, which FocusRunnable#run() method is executed before the native focus is requested. More...
 
void setKeyboardFocusHandler (final KeyListener l)
 Sets a KeyListener allowing focus traversal with a covered window toolkit like AWT. More...
 
final void requestFocus ()
 Request focus for this native window. More...
 
final void requestFocus (final boolean wait)
 Request focus for this native window. More...
 
boolean hasFocus ()
 Returns true if this native window owns the focus, otherwise false. More...
 
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 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 int getSurfaceWidth ()
 Returns the width of this GLDrawable's surface client area in pixel units. More...
 
final int getSurfaceHeight ()
 Returns the height of this GLDrawable's surface client area in pixel units. More...
 
final Rectangle getSurfaceBounds ()
 Returns a newly created Rectangle containing window's surface origin and size 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 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...
 
final 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...
 
final float[] getRequestedSurfaceScale (final float[] result)
 Returns the requested pixel scale of the associated NativeSurface. More...
 
final float[] getCurrentSurfaceScale (final float[] result)
 Returns the current pixel scale of the associated NativeSurface. More...
 
final float[] getMinimumSurfaceScale (final float[] result)
 Returns the minimum pixel scale of the associated NativeSurface. More...
 
final float[] getMaximumSurfaceScale (final float[] result)
 Returns the maximum pixel scale of the associated NativeSurface. More...
 
final 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...
 
final void setPosition (final int x, final int y)
 Sets the location of the window's client area excluding insets (window decorations) in window units. More...
 
void setTopLevelPosition (final int x, final int y)
 Sets the location of the top-level window inclusive insets (window decorations) in window units. More...
 
final boolean setFullscreen (final boolean fullscreen)
 Enable or disable fullscreen mode for this window. More...
 
boolean setFullscreen (final List< MonitorDevice > monitors)
 Enable fullscreen mode for this window spanning across the given MonitorDevices or across all MonitorDevices. More...
 
final boolean isFullscreen ()
 
final boolean isVisible ()
 
final StringBuilder toSimpleString (final StringBuilder sb)
 Appends this class simple string one-line representation to the given StringBuilder instance. More...
 
final String toSimpleString ()
 Returns a simple string one-line representation of this instance using toSimpleString(StringBuilder). More...
 
final StringBuilder toString (final StringBuilder sb)
 Appends this class full string multi-line representation to the given StringBuilder instance. More...
 
final String toString ()
 Returns a full string multi-line representation of this instance using toString(StringBuilder). More...
 
final ReparentOperation reparentWindow (final NativeWindow newParent, final int x, final int y, final int hints)
 Change this window's parent window. More...
 
final boolean isChildWindow ()
 Returns true if this window is a child window, i.e. More...
 
final boolean removeChild (final NativeWindow win)
 
final boolean addChild (final NativeWindow win)
 
final void destroy ()
 Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext. More...
 
void setWindowDestroyNotifyAction (final Runnable r)
 Set a custom action handling destruction issued by a toolkit triggered window destroy replacing the default destroy() action. More...
 
final void setVisible (final boolean visible)
 Calls setVisible(true, visible), i.e. More...
 
void setVisible (final boolean wait, final boolean visible)
 setVisible(..) makes the window and children visible if visible is true, otherwise the window and children becomes invisible. More...
 
final void setSize (final int width, final int height)
 Sets the size of the window's client area in window units, excluding decorations. More...
 
final void setSurfaceSize (final int pixelWidth, final 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 (final int width, final int height)
 Sets the size of the top-level window including insets (window decorations) in window units. More...
 
final boolean isNativeValid ()
 
Point getLocationOnScreen (final Point storage)
 Returns the window's top-left client-area position in the screen. More...
 
void display ()
 
final boolean isGLStatePreservationSupported ()
 
final GLDrawableFactory getFactory ()
 Return the GLDrawableFactory being used to create this instance. More...
 
final void swapBuffers () throws GLException
 Swaps the front and back buffers of this drawable. More...
 
boolean consumeEvent (final NEWTEvent event)
 Consume the event. More...
 
final boolean windowRepaint (final int x, final int y, final int width, final int height)
 Trigger window repaint while passing the dirty region in pixel units. More...
 
final void enqueueEvent (final boolean wait, final com.jogamp.newt.event.NEWTEvent event)
 
final void runOnEDTIfAvail (final boolean wait, final Runnable task)
 
void sendWindowEvent (final int eventType)
 Send a WindowEvent to all WindowListener. More...
 
final WindowListener getWindowListener (final int index)
 
final WindowListener[] getWindowListeners ()
 
final void removeWindowListener (final WindowListener l)
 
final void addWindowListener (final WindowListener l)
 Appends the given com.jogamp.newt.event.WindowListener to the end of the list. More...
 
final void addWindowListener (final int index, final WindowListener l) throws IndexOutOfBoundsException
 Inserts the given com.jogamp.newt.event.WindowListener at the specified position in the list. More...
 
final void setKeyboardVisible (final 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...
 
final boolean isKeyboardVisible ()
 Return true if the virtual on-screen keyboard is visible, otherwise false. More...
 
final void addKeyListener (final KeyListener l)
 Appends the given com.jogamp.newt.event.KeyListener to the end of the list. More...
 
final void addKeyListener (final int index, final KeyListener l)
 Inserts the given com.jogamp.newt.event.KeyListener at the specified position in the list. More...
 
final void removeKeyListener (final KeyListener l)
 
final KeyListener getKeyListener (final int index)
 
final KeyListener[] getKeyListeners ()
 
final void addMouseListener (final MouseListener l)
 Appends the given MouseListener to the end of the list. More...
 
final void addMouseListener (final int index, final MouseListener l)
 Inserts the given MouseListener at the specified position in the list. More...
 
final void removeMouseListener (final MouseListener l)
 Removes the given MouseListener from the list. More...
 
final MouseListener getMouseListener (final int index)
 Returns the MouseListener from the list at the given index. More...
 
final MouseListener[] getMouseListeners ()
 Returns all MouseListener. More...
 
void setDefaultGesturesEnabled (final boolean enable)
 Enable or disable default GestureHandler. More...
 
boolean areDefaultGesturesEnabled ()
 Return true if default GestureHandler are enabled. More...
 
final void addGestureHandler (final GestureHandler gh)
 Appends the given GestureHandler to the end of the list. More...
 
final void addGestureHandler (final int index, final GestureHandler gh)
 Inserts the given GestureHandler at the specified position in the list. More...
 
final void removeGestureHandler (final GestureHandler gh)
 Removes the given GestureHandler from the list. More...
 
final void addGestureListener (final GestureHandler.GestureListener gl)
 Appends the given GestureHandler.GestureListener to the end of the list. More...
 
final void addGestureListener (final int index, final GestureHandler.GestureListener gl)
 Inserts the given GestureHandler.GestureListener at the specified position in the list. More...
 
final void removeGestureListener (final GestureHandler.GestureListener gl)
 Removes the given GestureHandler.GestureListener from the list. More...
 
RecursiveLock getLock ()
 Returns the implementation's RecursiveLock synchronizing multithreaded access if used. 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...
 
final boolean surfaceSwap ()
 Provide a mechanism to utilize custom (pre-) swap surface code. More...
 
final void removeSurfaceUpdatedListener (final SurfaceUpdatedListener l)
 Remove the specified SurfaceUpdatedListener from the list. More...
 
final void addSurfaceUpdatedListener (final SurfaceUpdatedListener l)
 Appends the given SurfaceUpdatedListener to the end of the list. More...
 
final void addSurfaceUpdatedListener (final int index, final SurfaceUpdatedListener l) throws IndexOutOfBoundsException
 Inserts the given SurfaceUpdatedListener at the specified position in the list. More...
 
final void surfaceUpdated (final Object updater, final NativeSurface ns, final long when)
 Notification of a surface update event, eg. More...
 
final long getWindowHandle ()
 Returns the window handle for this NativeWindow. More...
 
final 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...
 
- Public Member Functions inherited from com.jogamp.opengl.GLAutoDrawable
GLDrawable getDelegatedDrawable ()
 If the implementation uses delegation, return the delegated GLDrawable instance, otherwise return this instance. More...
 
GLContext getContext ()
 Returns the context associated with this drawable. More...
 
GLContext setContext (GLContext newCtx, boolean destroyPrevCtx)
 Associate the new context, newtCtx, to this auto-drawable. More...
 
void addGLEventListener (GLEventListener listener)
 Adds the given listener to the end of this drawable queue. More...
 
void addGLEventListener (int index, GLEventListener listener) throws IndexOutOfBoundsException
 Adds the given listener at the given index of this drawable queue. More...
 
int getGLEventListenerCount ()
 Returns the number of GLEventListener of this drawable queue. More...
 
boolean areAllGLEventListenerInitialized ()
 Returns true if all added GLEventListener are initialized, otherwise false. More...
 
GLEventListener getGLEventListener (int index) throws IndexOutOfBoundsException
 Returns the GLEventListener at the given index of this drawable queue. More...
 
boolean getGLEventListenerInitState (GLEventListener listener)
 Retrieves whether the given listener is initialized or not. More...
 
void setGLEventListenerInitState (GLEventListener listener, boolean initialized)
 Sets the given listener's initialized state. More...
 
GLEventListener disposeGLEventListener (GLEventListener listener, boolean remove)
 Disposes the given listener via dispose(..) if it has been initialized and added to this queue. More...
 
GLEventListener removeGLEventListener (GLEventListener listener)
 Removes the given listener from this drawable queue. More...
 
abstract void setAnimator (GLAnimatorControl animatorControl) throws GLException
 Registers the usage of an animator, an com.jogamp.opengl.GLAnimatorControl implementation. More...
 
GLAnimatorControl getAnimator ()
 
Thread setExclusiveContextThread (Thread t) throws GLException
 Dedicates this instance's GLContext to the given thread. More...
 
Thread getExclusiveContextThread ()
 
boolean invoke (boolean wait, GLRunnable glRunnable) throws IllegalStateException
 Enqueues a one-shot GLRunnable, which will be executed within the next display() call after all registered GLEventListeners display(GLAutoDrawable) methods have been called. More...
 
boolean invoke (boolean wait, List< GLRunnable > glRunnables) throws IllegalStateException
 Extends invoke(boolean, GLRunnable) functionality allowing to inject a list of GLRunnables. More...
 
void flushGLRunnables ()
 Flushes all enqueued GLRunnable of this GLAutoDrawable including notifying waiting executor. More...
 
void destroy ()
 Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext. More...
 
void display ()
 
void setAutoSwapBufferMode (boolean enable)
 Enables or disables automatic buffer swapping for this drawable. More...
 
boolean getAutoSwapBufferMode ()
 Indicates whether automatic buffer swapping is enabled for this drawable. More...
 
void setContextCreationFlags (int flags)
 
int getContextCreationFlags ()
 
GLContext createContext (GLContext shareWith)
 Creates a new context for drawing to this drawable that will optionally share buffer objects, textures and other server-side OpenGL objects with the specified GLContext.The GLContext share need not be associated with this GLDrawable and may be null if sharing of display lists and other objects is not desired. See the note in the overview documentation context sharing as well as GLSharedContextSetter. More...
 
GL getGL ()
 Returns the GL pipeline object this GLAutoDrawable uses. More...
 
GL setGL (GL gl)
 Sets the GL pipeline object this GLAutoDrawable uses. More...
 
Object getUpstreamWidget ()
 Method may return the upstream UI toolkit object holding this GLAutoDrawable instance, if exist. More...
 
RecursiveLock getUpstreamLock ()
 Returns the recursive lock object of the upstream widget to synchronize multithreaded access on top of NativeSurface#lockSurface(). More...
 
boolean isThreadGLCapable ()
 Indicates whether the current thread is capable of performing OpenGL-related work. More...
 
- Public Member Functions inherited from com.jogamp.opengl.GLDrawable
GLContext createContext (GLContext shareWith)
 Creates a new context for drawing to this drawable that will optionally share buffer objects, textures and other server-side OpenGL objects with the specified GLContext. More...
 
void setRealized (boolean realized)
 Indicates to GLDrawable implementations whether the underlying surface has been created and can be drawn into. More...
 
boolean isRealized ()
 Returns true if this drawable is realized, otherwise false. More...
 
int getSurfaceWidth ()
 Returns the width of this GLDrawable's surface client area in pixel units. More...
 
int getSurfaceHeight ()
 Returns the height of this GLDrawable's surface client area in pixel units. More...
 
boolean isGLOriented ()
 Returns true if the drawable is rendered in OpenGL's coordinate system, origin at bottom left. More...
 
void swapBuffers () throws GLException
 Swaps the front and back buffers of this drawable. More...
 
GLCapabilitiesImmutable getChosenGLCapabilities ()
 Fetches the GLCapabilitiesImmutable corresponding to the chosen OpenGL capabilities (pixel format / visual / GLProfile) for this drawable. More...
 
GLCapabilitiesImmutable getRequestedGLCapabilities ()
 Fetches the GLCapabilitiesImmutable corresponding to the user requested OpenGL capabilities (pixel format / visual / GLProfile) for this drawable. More...
 
GLProfile getGLProfile ()
 Fetches the GLProfile for this drawable. More...
 
NativeSurface getNativeSurface ()
 Returns the associated NativeSurface of this NativeSurfaceHolder. More...
 
long getHandle ()
 Returns the GL drawable handle, guaranteed to be valid after realization and while it's surface is being locked. More...
 
GLDrawableFactory getFactory ()
 Return the GLDrawableFactory being used to create this instance. More...
 
String toString ()
 
NativeSurface getNativeSurface ()
 Returns the associated NativeSurface of this NativeSurfaceHolder. More...
 
- Public Member Functions inherited from com.jogamp.newt.Window
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...
 
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...
 
WindowClosingMode getDefaultCloseOperation ()
 
WindowClosingMode setDefaultCloseOperation (WindowClosingMode op)
 
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...
 
boolean consumeEvent (NEWTEvent event)
 Consume the event. More...
 
- Public Member Functions inherited from com.jogamp.opengl.FPSCounter
void setUpdateFPSFrames (int frames, PrintStream out)
 
void resetFPSCounter ()
 Reset all performance counter (startTime, currentTime, frame number) More...
 
int getUpdateFPSFrames ()
 
long getFPSStartTime ()
 Returns the time of the first display call in milliseconds after enabling this feature via setUpdateFPSFrames(int, PrintStream). More...
 
long getLastFPSUpdateTime ()
 Returns the time of the last update interval in milliseconds, if this feature is enabled via setUpdateFPSFrames(int, PrintStream). More...
 
long getLastFPSPeriod ()
 
float getLastFPS ()
 
int getTotalFPSFrames ()
 
long getTotalFPSDuration ()
 
float getTotalFPS ()
 

Static Public Member Functions

static GLWindow create (final GLCapabilitiesImmutable caps)
 Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display with the given GLCapabilities. More...
 
static GLWindow create (final Screen screen, final GLCapabilitiesImmutable caps)
 Creates a new GLWindow attaching a new Window referencing the given Screen with the given GLCapabilities. More...
 
static GLWindow create (final Window window)
 Creates a new GLWindow attaching the given window. More...
 
static GLWindow create (final NativeWindow parentNativeWindow, final GLCapabilitiesImmutable caps)
 Creates a new GLWindow attaching a new child Window of the given parentNativeWindow with the given GLCapabilities. More...
 
static void main (final String args[])
 A most simple JOGL AWT test entry. More...
 

Protected Member Functions

 GLWindow (final Window window)
 Constructor. More...
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.opengl.GLAutoDrawable
static final boolean SCREEN_CHANGE_ACTION_ENABLED = Debug.getBooleanProperty("jogl.screenchange.action", true)
 Flag reflecting whether the GLDrawable reconfiguration will be issued in case a screen device change occurred, e.g. More...
 
- Static Public Attributes inherited from com.jogamp.newt.Window
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...
 
- Static Public Attributes inherited from com.jogamp.opengl.FPSCounter
static final int DEFAULT_FRAMES_PER_INTERVAL = 5*60
 

Detailed Description

An implementation of GLAutoDrawable and Window interface, using a delegated Window instance, which may be an aggregation (lifecycle: created and destroyed).

This implementation supports GL state preservation, hence isGLStatePreservationSupported() returns true.

This implementation does not make the OpenGL context current
before calling the various input EventListener callbacks, ie MouseListener etc.
This design decision is made in favor of a more performant and simplified implementation. Also the event dispatcher shall be implemented OpenGL agnostic.
To be able to use OpenGL commands from within such input NEWTEventListener,
you can inject GLRunnable objects via invoke(boolean, GLRunnable) to the OpenGL command stream.

OpenGL Context Sharing

To share a GLContext see the following note in the documentation overview: context sharing as well as GLSharedContextSetter.

Definition at line 121 of file GLWindow.java.

Constructor & Destructor Documentation

◆ GLWindow()

com.jogamp.newt.opengl.GLWindow.GLWindow ( final Window  window)
protected

Constructor.

Do not call this directly – use create() instead.

Definition at line 127 of file GLWindow.java.

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

Member Function Documentation

◆ addChild()

final boolean com.jogamp.newt.opengl.GLWindow.addChild ( final NativeWindow  win)

Implements com.jogamp.newt.Window.

Definition at line 596 of file GLWindow.java.

◆ addGestureHandler() [1/2]

final void com.jogamp.newt.opengl.GLWindow.addGestureHandler ( final GestureHandler  gh)

Appends the given GestureHandler to the end of the list.

Implements com.jogamp.newt.Window.

Definition at line 960 of file GLWindow.java.

Here is the caller graph for this function:

◆ addGestureHandler() [2/2]

final void com.jogamp.newt.opengl.GLWindow.addGestureHandler ( final int  index,
final 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

Implements com.jogamp.newt.Window.

Definition at line 964 of file GLWindow.java.

◆ addGestureListener() [1/2]

final void com.jogamp.newt.opengl.GLWindow.addGestureListener ( final GestureHandler.GestureListener  gl)

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

Implements com.jogamp.newt.Window.

Definition at line 972 of file GLWindow.java.

Here is the caller graph for this function:

◆ addGestureListener() [2/2]

final void com.jogamp.newt.opengl.GLWindow.addGestureListener ( final int  index,
final 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

Implements com.jogamp.newt.Window.

Definition at line 976 of file GLWindow.java.

◆ addKeyListener() [1/2]

final void com.jogamp.newt.opengl.GLWindow.addKeyListener ( final int  index,
final 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

Implements com.jogamp.newt.Window.

Definition at line 907 of file GLWindow.java.

◆ addKeyListener() [2/2]

final void com.jogamp.newt.opengl.GLWindow.addKeyListener ( final KeyListener  l)

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

Implements com.jogamp.newt.Window.

Definition at line 902 of file GLWindow.java.

◆ addMouseListener() [1/2]

final void com.jogamp.newt.opengl.GLWindow.addMouseListener ( final int  index,
final 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

Implements com.jogamp.newt.Window.

Definition at line 932 of file GLWindow.java.

◆ addMouseListener() [2/2]

final void com.jogamp.newt.opengl.GLWindow.addMouseListener ( final MouseListener  l)

Appends the given MouseListener to the end of the list.

Implements com.jogamp.newt.Window.

Definition at line 927 of file GLWindow.java.

Here is the caller graph for this function:

◆ addSurfaceUpdatedListener() [1/2]

final void com.jogamp.newt.opengl.GLWindow.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 1030 of file GLWindow.java.

◆ addSurfaceUpdatedListener() [2/2]

final void com.jogamp.newt.opengl.GLWindow.addSurfaceUpdatedListener ( final SurfaceUpdatedListener  l)

Appends the given SurfaceUpdatedListener to the end of the list.

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 1025 of file GLWindow.java.

Here is the caller graph for this function:

◆ addWindowListener() [1/2]

final void com.jogamp.newt.opengl.GLWindow.addWindowListener ( final int  index,
final 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

Implements com.jogamp.newt.Window.

Definition at line 887 of file GLWindow.java.

◆ addWindowListener() [2/2]

final void com.jogamp.newt.opengl.GLWindow.addWindowListener ( final WindowListener  l)

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

Implements com.jogamp.newt.Window.

Definition at line 882 of file GLWindow.java.

◆ areDefaultGesturesEnabled()

boolean com.jogamp.newt.opengl.GLWindow.areDefaultGesturesEnabled ( )

Return true if default GestureHandler are enabled.

Implements com.jogamp.newt.Window.

Definition at line 956 of file GLWindow.java.

◆ canSetSurfaceScale()

final boolean com.jogamp.newt.opengl.GLWindow.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 true, i.e. supporting manual change of pixel-scale.

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 492 of file GLWindow.java.

◆ confinePointer()

final void com.jogamp.newt.opengl.GLWindow.confinePointer ( final 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.

Implements com.jogamp.newt.Window.

Definition at line 332 of file GLWindow.java.

Here is the caller graph for this function:

◆ consumeEvent()

boolean com.jogamp.newt.opengl.GLWindow.consumeEvent ( final NEWTEvent  event)

Consume the event.

Returns
true if the event has been consumed, otherwise it returns false for later propagation.

Implements com.jogamp.newt.event.NEWTEventConsumer.

Definition at line 839 of file GLWindow.java.

◆ convertToPixelUnits()

final int[] com.jogamp.newt.opengl.GLWindow.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 481 of file GLWindow.java.

◆ convertToWindowUnits()

final int[] com.jogamp.newt.opengl.GLWindow.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 476 of file GLWindow.java.

◆ create() [1/4]

static GLWindow com.jogamp.newt.opengl.GLWindow.create ( final GLCapabilitiesImmutable  caps)
static

Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display with the given GLCapabilities.

The lifecycle of this Window's Screen and Display is handled via Screen#addReference() and Screen#removeReference().

The default Display will be reused if already instantiated.

Definition at line 169 of file GLWindow.java.

Here is the call graph for this function:

◆ create() [2/4]

static GLWindow com.jogamp.newt.opengl.GLWindow.create ( final NativeWindow  parentNativeWindow,
final GLCapabilitiesImmutable  caps 
)
static

Creates a new GLWindow attaching a new child Window of the given parentNativeWindow with the given GLCapabilities.

The Display/Screen will be compatible with the parentNativeWindow, or even identical in case it's a Newt Window. An already instantiated compatible Display will be reused.

The lifecycle of this Window's Screen and Display is handled via Screen#addReference() and Screen#removeReference().

Definition at line 209 of file GLWindow.java.

Here is the call graph for this function:

◆ create() [3/4]

static GLWindow com.jogamp.newt.opengl.GLWindow.create ( final Screen  screen,
final GLCapabilitiesImmutable  caps 
)
static

Creates a new GLWindow attaching a new Window referencing the given Screen with the given GLCapabilities.

The lifecycle of this Window's Screen and Display is handled via Screen#addReference() and Screen#removeReference().

Definition at line 181 of file GLWindow.java.

Here is the call graph for this function:

◆ create() [4/4]

static GLWindow com.jogamp.newt.opengl.GLWindow.create ( final Window  window)
static

Creates a new GLWindow attaching the given window.

The lifecycle of this Window's Screen and Display is handled via Screen#addReference() and Screen#removeReference().

Definition at line 192 of file GLWindow.java.

Here is the call graph for this function:

◆ destroy()

final void com.jogamp.newt.opengl.GLWindow.destroy ( )

Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.

If a window is attached to it's implementation, it shall be closed. Causes disposing of all OpenGL resources by calling dispose(..) for all registered GLEventListeners. Called automatically by the window system toolkit upon receiving a destroy notification. This routine may be called manually.

Implements com.jogamp.opengl.GLAutoDrawable.

Definition at line 605 of file GLWindow.java.

◆ display()

void com.jogamp.newt.opengl.GLWindow.display ( )

Causes OpenGL rendering to be performed for this GLAutoDrawable in the following order:

May be called periodically by a running com.jogamp.opengl.GLAnimatorControl implementation,
which must register itself with setAnimator(com.jogamp.opengl.GLAnimatorControl).

Called automatically by the window system toolkit upon receiving a repaint() request,
except an com.jogamp.opengl.GLAnimatorControl implementation com.jogamp.opengl.GLAnimatorControl#isAnimating().

This routine may also be called manually for better control over the rendering process. It is legal to call another GLAutoDrawable's display method from within the display(..) callback.

In case of a new generated OpenGL context, the implementation shall call init(..) for all registered GLEventListeners before making the actual display(..) calls, in case this has not been done yet.

See also
setAnimator(com.jogamp.opengl.GLAnimatorControl)

Implements com.jogamp.opengl.GLAutoDrawable.

Definition at line 782 of file GLWindow.java.

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

◆ enqueueEvent()

final void com.jogamp.newt.opengl.GLWindow.enqueueEvent ( final boolean  wait,
final com.jogamp.newt.event.NEWTEvent  event 
)

Definition at line 852 of file GLWindow.java.

◆ getBounds()

final Rectangle com.jogamp.newt.opengl.GLWindow.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 456 of file GLWindow.java.

Here is the caller graph for this function:

◆ getChosenCapabilities()

final CapabilitiesImmutable com.jogamp.newt.opengl.GLWindow.getChosenCapabilities ( )

Gets an immutable set of chosen capabilities.

Returns
the chosen capabilities

Implements com.jogamp.newt.Window.

Definition at line 266 of file GLWindow.java.

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

◆ getCurrentSurfaceScale()

final float[] com.jogamp.newt.opengl.GLWindow.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 505 of file GLWindow.java.

Here is the caller graph for this function:

◆ getDefaultCloseOperation()

WindowClosingMode com.jogamp.newt.opengl.GLWindow.getDefaultCloseOperation ( )
Returns
the current close operation value
See also
WindowClosingMode::DISPOSE_ON_CLOSE
WindowClosingMode::DO_NOTHING_ON_CLOSE

Implements com.jogamp.nativewindow.WindowClosingProtocol.

Definition at line 217 of file GLWindow.java.

Here is the caller graph for this function:

◆ getDelegatedWindow()

final Window com.jogamp.newt.opengl.GLWindow.getDelegatedWindow ( )

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

Implements com.jogamp.newt.Window.

Definition at line 277 of file GLWindow.java.

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

◆ getDisplayHandle()

final long com.jogamp.newt.opengl.GLWindow.getDisplayHandle ( )

Convenience: Get display handle from AbstractGraphicsConfiguration .

AbstractGraphicsScreen . AbstractGraphicsDevice

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 1057 of file GLWindow.java.

◆ getFactory()

final GLDrawableFactory com.jogamp.newt.opengl.GLWindow.getFactory ( )

Return the GLDrawableFactory being used to create this instance.

Implements com.jogamp.opengl.GLDrawable.

Definition at line 826 of file GLWindow.java.

◆ getGraphicsConfiguration()

final AbstractGraphicsConfiguration com.jogamp.newt.opengl.GLWindow.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 1052 of file GLWindow.java.

Here is the caller graph for this function:

◆ getHeight()

final int com.jogamp.newt.opengl.GLWindow.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 451 of file GLWindow.java.

Here is the caller graph for this function:

◆ getInsets()

final InsetsImmutable com.jogamp.newt.opengl.GLWindow.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 431 of file GLWindow.java.

Here is the caller graph for this function:

◆ getKeyListener()

final KeyListener com.jogamp.newt.opengl.GLWindow.getKeyListener ( final int  index)

Implements com.jogamp.newt.Window.

Definition at line 917 of file GLWindow.java.

◆ getKeyListeners()

final KeyListener[] com.jogamp.newt.opengl.GLWindow.getKeyListeners ( )

Implements com.jogamp.newt.Window.

Definition at line 922 of file GLWindow.java.

◆ getLocationOnScreen()

Point com.jogamp.newt.opengl.GLWindow.getLocationOnScreen ( final Point  point)

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()

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 643 of file GLWindow.java.

Here is the caller graph for this function:

◆ getLock()

RecursiveLock com.jogamp.newt.opengl.GLWindow.getLock ( )

Returns the implementation's RecursiveLock synchronizing multithreaded access if used.

Otherwise null is being returned.

NativeSurface's RecursiveLock is only exposed to resolve special situations within the implementation and its usage is not advised if not absolutely necessary.

Note that certain NativeSurface implementations only use the RecursiveLock as an upfront re-entrance lock vehicle, but actually acquire and release the underlying windowing toolkit's lock facility on the first or last re-entrance lock, respectively.

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 989 of file GLWindow.java.

◆ getMainMonitor()

final MonitorDevice com.jogamp.newt.opengl.GLWindow.getMainMonitor ( )

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

If no coverage is detected the first MonitorDevice is returned.

Implements com.jogamp.newt.Window.

Definition at line 292 of file GLWindow.java.

Here is the caller graph for this function:

◆ getMaximumSurfaceScale()

final float[] com.jogamp.newt.opengl.GLWindow.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

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 515 of file GLWindow.java.

Here is the caller graph for this function:

◆ getMinimumSurfaceScale()

final float[] com.jogamp.newt.opengl.GLWindow.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

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 510 of file GLWindow.java.

Here is the caller graph for this function:

◆ getMouseListener()

final MouseListener com.jogamp.newt.opengl.GLWindow.getMouseListener ( final int  index)

Returns the MouseListener from the list at the given index.

Implements com.jogamp.newt.Window.

Definition at line 942 of file GLWindow.java.

◆ getMouseListeners()

final MouseListener[] com.jogamp.newt.opengl.GLWindow.getMouseListeners ( )

Returns all MouseListener.

Implements com.jogamp.newt.Window.

Definition at line 947 of file GLWindow.java.

◆ getParent()

final NativeWindow com.jogamp.newt.opengl.GLWindow.getParent ( )
Returns
The parent NativeWindow, or null if this NativeWindow is top level.

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 282 of file GLWindow.java.

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

◆ getPixelsPerMM()

final float[] com.jogamp.newt.opengl.GLWindow.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

Implements com.jogamp.newt.Window.

Definition at line 520 of file GLWindow.java.

Here is the caller graph for this function:

◆ getPointerIcon()

final PointerIcon com.jogamp.newt.opengl.GLWindow.getPointerIcon ( )

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

See also
setPointerIcon(PointerIcon)

Implements com.jogamp.newt.Window.

Definition at line 317 of file GLWindow.java.

Here is the caller graph for this function:

◆ getRequestedCapabilities()

final CapabilitiesImmutable com.jogamp.newt.opengl.GLWindow.getRequestedCapabilities ( )

Gets an immutable set of requested capabilities.

Returns
the requested capabilities

Implements com.jogamp.newt.Window.

Definition at line 272 of file GLWindow.java.

Here is the caller graph for this function:

◆ getRequestedSurfaceScale()

final float[] com.jogamp.newt.opengl.GLWindow.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()

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 500 of file GLWindow.java.

Here is the caller graph for this function:

◆ getScreen()

final Screen com.jogamp.newt.opengl.GLWindow.getScreen ( )
Returns
The associated Screen

Implements com.jogamp.newt.Window.

Definition at line 287 of file GLWindow.java.

Here is the caller graph for this function:

◆ getScreenIndex()

final int com.jogamp.newt.opengl.GLWindow.getScreenIndex ( )

Convenience: Get display handle from AbstractGraphicsConfiguration .

AbstractGraphicsScreen

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 1062 of file GLWindow.java.

◆ getStateMask()

◆ getStateMaskString()

final String com.jogamp.newt.opengl.GLWindow.getStateMaskString ( )

Returns a string representation of the current state mask.

Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 246 of file GLWindow.java.

Here is the caller graph for this function:

◆ getStatePublicBitCount()

final int com.jogamp.newt.opengl.GLWindow.getStatePublicBitCount ( )

Number of all public state bits.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 231 of file GLWindow.java.

◆ getStatePublicBitmask()

final int com.jogamp.newt.opengl.GLWindow.getStatePublicBitmask ( )

Bitmask covering all public state bits.

See also
getSupportedStateMask()
getStateMask()
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 236 of file GLWindow.java.

◆ getSupportedStateMask()

final int com.jogamp.newt.opengl.GLWindow.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

Implements com.jogamp.newt.Window.

Definition at line 251 of file GLWindow.java.

◆ getSupportedStateMaskString()

final String com.jogamp.newt.opengl.GLWindow.getSupportedStateMaskString ( )

Returns a string representation of the supported state mask.

Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 256 of file GLWindow.java.

Here is the caller graph for this function:

◆ getSurfaceBounds()

final Rectangle com.jogamp.newt.opengl.GLWindow.getSurfaceBounds ( )

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

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 471 of file GLWindow.java.

Here is the caller graph for this function:

◆ getSurfaceHandle()

final long com.jogamp.newt.opengl.GLWindow.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 1046 of file GLWindow.java.

◆ getSurfaceHeight()

final int com.jogamp.newt.opengl.GLWindow.getSurfaceHeight ( )

Returns the height of this GLDrawable's surface client area in pixel units.

See also
NativeSurface::getSurfaceHeight()

Implements com.jogamp.opengl.GLDrawable.

Definition at line 466 of file GLWindow.java.

Here is the caller graph for this function:

◆ getSurfaceLockOwner()

final Thread com.jogamp.newt.opengl.GLWindow.getSurfaceLockOwner ( )

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

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 1009 of file GLWindow.java.

◆ getSurfaceWidth()

final int com.jogamp.newt.opengl.GLWindow.getSurfaceWidth ( )

Returns the width of this GLDrawable's surface client area in pixel units.

See also
NativeSurface::getSurfaceWidth()

Implements com.jogamp.opengl.GLDrawable.

Definition at line 461 of file GLWindow.java.

Here is the caller graph for this function:

◆ getTitle()

final String com.jogamp.newt.opengl.GLWindow.getTitle ( )

Implements com.jogamp.newt.Window.

Definition at line 302 of file GLWindow.java.

Here is the caller graph for this function:

◆ getUpstreamLock()

final RecursiveLock com.jogamp.newt.opengl.GLWindow.getUpstreamLock ( )

Returns the recursive lock object of the upstream widget to synchronize multithreaded access on top of NativeSurface#lockSurface().

See GLAutoDrawable Locking.

Since
2.2

Implements com.jogamp.opengl.GLAutoDrawable.

Definition at line 156 of file GLWindow.java.

◆ getUpstreamWidget()

final Object com.jogamp.newt.opengl.GLWindow.getUpstreamWidget ( )

Method may return the upstream UI toolkit object holding this GLAutoDrawable instance, if exist.

Currently known Java UI toolkits and it's known return types are:

Toolkit GLAutoDrawable Implementation ~ Return Type of getUpstreamWidget()</td
NEWT com.jogamp.newt.opengl.GLWindow has a com.jogamp.newt.Window</td
SWT com.jogamp.opengl.swt.GLCanvas is a org.eclipse.swt.widgets.Canvas</td
AWT com.jogamp.opengl.awt.GLCanvas is a java.awt.Canvas</td
AWT com.jogamp.opengl.awt.GLJPanel is a javax.swing.JPanel</td

However, the result may be other object types than the listed above due to new supported toolkits.

This method may also return null if no UI toolkit is being used, as common for offscreen rendering.

Implements com.jogamp.opengl.GLAutoDrawable.

Definition at line 151 of file GLWindow.java.

◆ getWidth()

final int com.jogamp.newt.opengl.GLWindow.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 446 of file GLWindow.java.

Here is the caller graph for this function:

◆ getWindowHandle()

final long com.jogamp.newt.opengl.GLWindow.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 1040 of file GLWindow.java.

Here is the caller graph for this function:

◆ getWindowListener()

final WindowListener com.jogamp.newt.opengl.GLWindow.getWindowListener ( final int  index)

Implements com.jogamp.newt.Window.

Definition at line 867 of file GLWindow.java.

Here is the caller graph for this function:

◆ getWindowListeners()

final WindowListener[] com.jogamp.newt.opengl.GLWindow.getWindowListeners ( )

Implements com.jogamp.newt.Window.

Definition at line 872 of file GLWindow.java.

◆ getX()

final int com.jogamp.newt.opengl.GLWindow.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 436 of file GLWindow.java.

Here is the caller graph for this function:

◆ getY()

final int com.jogamp.newt.opengl.GLWindow.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 441 of file GLWindow.java.

Here is the caller graph for this function:

◆ hasFocus()

boolean com.jogamp.newt.opengl.GLWindow.hasFocus ( )

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

Implements com.jogamp.nativewindow.NativeWindow.

Definition at line 426 of file GLWindow.java.

Here is the caller graph for this function:

◆ isAlwaysOnBottom()

final boolean com.jogamp.newt.opengl.GLWindow.isAlwaysOnBottom ( )
See also
STATE_BIT_ALWAYSONBOTTOM
STATE_MASK_ALWAYSONBOTTOM
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 366 of file GLWindow.java.

Here is the caller graph for this function:

◆ isAlwaysOnTop()

final boolean com.jogamp.newt.opengl.GLWindow.isAlwaysOnTop ( )
See also
STATE_BIT_ALWAYSONTOP
STATE_MASK_ALWAYSONTOP

Implements com.jogamp.newt.Window.

Definition at line 356 of file GLWindow.java.

Here is the caller graph for this function:

◆ isChildWindow()

final boolean com.jogamp.newt.opengl.GLWindow.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.

Implements com.jogamp.newt.Window.

Definition at line 586 of file GLWindow.java.

◆ isFullscreen()

final boolean com.jogamp.newt.opengl.GLWindow.isFullscreen ( )

Implements com.jogamp.newt.Window.

Definition at line 544 of file GLWindow.java.

Here is the caller graph for this function:

◆ isGLStatePreservationSupported()

final boolean com.jogamp.newt.opengl.GLWindow.isGLStatePreservationSupported ( )

GLWindow supports GL state preservation, hence returns true.

Definition at line 818 of file GLWindow.java.

◆ isKeyboardVisible()

final boolean com.jogamp.newt.opengl.GLWindow.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)

Implements com.jogamp.newt.Window.

Definition at line 897 of file GLWindow.java.

◆ isMaximizedHorz()

final boolean com.jogamp.newt.opengl.GLWindow.isMaximizedHorz ( )
See also
STATE_BIT_MAXIMIZED_HORZ
STATE_MASK_MAXIMIZED_HORZ
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 401 of file GLWindow.java.

Here is the caller graph for this function:

◆ isMaximizedVert()

final boolean com.jogamp.newt.opengl.GLWindow.isMaximizedVert ( )
See also
STATE_BIT_MAXIMIZED_VERT
STATE_MASK_MAXIMIZED_VERT
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 396 of file GLWindow.java.

Here is the caller graph for this function:

◆ isNativeValid()

final boolean com.jogamp.newt.opengl.GLWindow.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)

Implements com.jogamp.newt.Window.

Definition at line 638 of file GLWindow.java.

Here is the caller graph for this function:

◆ isPointerConfined()

final boolean com.jogamp.newt.opengl.GLWindow.isPointerConfined ( )
See also
confinePointer(boolean)

Implements com.jogamp.newt.Window.

Definition at line 327 of file GLWindow.java.

Here is the caller graph for this function:

◆ isPointerVisible()

final boolean com.jogamp.newt.opengl.GLWindow.isPointerVisible ( )
See also
setPointerVisible(boolean)

Implements com.jogamp.newt.Window.

Definition at line 307 of file GLWindow.java.

Here is the caller graph for this function:

◆ isResizable()

final boolean com.jogamp.newt.opengl.GLWindow.isResizable ( )
See also
STATE_BIT_RESIZABLE
STATE_MASK_RESIZABLE
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 376 of file GLWindow.java.

Here is the caller graph for this function:

◆ isSticky()

final boolean com.jogamp.newt.opengl.GLWindow.isSticky ( )
See also
STATE_BIT_STICKY
STATE_MASK_STICKY
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 386 of file GLWindow.java.

Here is the caller graph for this function:

◆ isSurfaceLockedByOtherThread()

final boolean com.jogamp.newt.opengl.GLWindow.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 1004 of file GLWindow.java.

◆ isUndecorated()

final boolean com.jogamp.newt.opengl.GLWindow.isUndecorated ( )
See also
STATE_BIT_UNDECORATED
STATE_MASK_UNDECORATED

Implements com.jogamp.newt.Window.

Definition at line 346 of file GLWindow.java.

Here is the caller graph for this function:

◆ isVisible()

final boolean com.jogamp.newt.opengl.GLWindow.isVisible ( )
See also
STATE_BIT_VISIBLE
setVisible(boolean, boolean)

Implements com.jogamp.newt.Window.

Definition at line 549 of file GLWindow.java.

Here is the caller graph for this function:

◆ lockSurface()

final int com.jogamp.newt.opengl.GLWindow.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 994 of file GLWindow.java.

Here is the caller graph for this function:

◆ main()

static void com.jogamp.newt.opengl.GLWindow.main ( final String  args[])
static

A most simple JOGL AWT test entry.

Definition at line 1069 of file GLWindow.java.

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

◆ removeChild()

final boolean com.jogamp.newt.opengl.GLWindow.removeChild ( final NativeWindow  win)

Implements com.jogamp.newt.Window.

Definition at line 591 of file GLWindow.java.

◆ removeGestureHandler()

final void com.jogamp.newt.opengl.GLWindow.removeGestureHandler ( final GestureHandler  gh)

Removes the given GestureHandler from the list.

Implements com.jogamp.newt.Window.

Definition at line 968 of file GLWindow.java.

Here is the caller graph for this function:

◆ removeGestureListener()

final void com.jogamp.newt.opengl.GLWindow.removeGestureListener ( final GestureHandler.GestureListener  gl)

Removes the given GestureHandler.GestureListener from the list.

Implements com.jogamp.newt.Window.

Definition at line 980 of file GLWindow.java.

Here is the caller graph for this function:

◆ removeKeyListener()

final void com.jogamp.newt.opengl.GLWindow.removeKeyListener ( final KeyListener  l)

Implements com.jogamp.newt.Window.

Definition at line 912 of file GLWindow.java.

Here is the caller graph for this function:

◆ removeMouseListener()

final void com.jogamp.newt.opengl.GLWindow.removeMouseListener ( final MouseListener  l)

Removes the given MouseListener from the list.

Implements com.jogamp.newt.Window.

Definition at line 937 of file GLWindow.java.

Here is the caller graph for this function:

◆ removeSurfaceUpdatedListener()

final void com.jogamp.newt.opengl.GLWindow.removeSurfaceUpdatedListener ( final SurfaceUpdatedListener  l)

Remove the specified SurfaceUpdatedListener from the list.

Implements com.jogamp.nativewindow.NativeSurface.

Definition at line 1020 of file GLWindow.java.

Here is the caller graph for this function:

◆ removeWindowListener()

final void com.jogamp.newt.opengl.GLWindow.removeWindowListener ( final WindowListener  l)

Implements com.jogamp.newt.Window.

Definition at line 877 of file GLWindow.java.

◆ reparentWindow()

final ReparentOperation com.jogamp.newt.opengl.GLWindow.reparentWindow ( final NativeWindow  newParent,
final int  x,
final int  y,
final 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

Implements com.jogamp.newt.Window.

Definition at line 582 of file GLWindow.java.

Here is the caller graph for this function:

◆ requestFocus() [1/2]

final void com.jogamp.newt.opengl.GLWindow.requestFocus ( )

Request focus for this native window.

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

See also
requestFocus(boolean)

Implements com.jogamp.newt.Window.

Definition at line 416 of file GLWindow.java.

Here is the caller graph for this function:

◆ requestFocus() [2/2]

final void com.jogamp.newt.opengl.GLWindow.requestFocus ( final 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()

Implements com.jogamp.newt.Window.

Definition at line 421 of file GLWindow.java.

◆ runOnEDTIfAvail()

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

Implements com.jogamp.newt.Window.

Definition at line 857 of file GLWindow.java.

Here is the caller graph for this function:

◆ sendWindowEvent()

void com.jogamp.newt.opengl.GLWindow.sendWindowEvent ( final int  eventType)

Send a WindowEvent to all WindowListener.

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

Implements com.jogamp.newt.Window.

Definition at line 862 of file GLWindow.java.

Here is the caller graph for this function:

◆ setAlwaysOnBottom()

final void com.jogamp.newt.opengl.GLWindow.setAlwaysOnBottom ( final boolean  value)

Operation is ignored if this instance is a child window.

See also
STATE_BIT_ALWAYSONBOTTOM
STATE_MASK_ALWAYSONBOTTOM
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 361 of file GLWindow.java.

Here is the caller graph for this function:

◆ setAlwaysOnTop()

final void com.jogamp.newt.opengl.GLWindow.setAlwaysOnTop ( final boolean  value)

Operation is ignored if this instance is a child window.

See also
STATE_BIT_ALWAYSONTOP
STATE_MASK_ALWAYSONTOP

Implements com.jogamp.newt.Window.

Definition at line 351 of file GLWindow.java.

Here is the caller graph for this function:

◆ setCapabilitiesChooser()

CapabilitiesChooser com.jogamp.newt.opengl.GLWindow.setCapabilitiesChooser ( final CapabilitiesChooser  chooser)

Set the CapabilitiesChooser to help determine the native visual type.

Parameters
chooserthe new CapabilitiesChooser
Returns
the previous CapabilitiesChooser

Implements com.jogamp.newt.Window.

Definition at line 261 of file GLWindow.java.

Here is the caller graph for this function:

◆ setDefaultCloseOperation()

WindowClosingMode com.jogamp.newt.opengl.GLWindow.setDefaultCloseOperation ( final WindowClosingMode  op)
Parameters
opthe new close operation value
Returns
the previous close operation value
See also
WindowClosingMode::DISPOSE_ON_CLOSE
WindowClosingMode::DO_NOTHING_ON_CLOSE

Implements com.jogamp.nativewindow.WindowClosingProtocol.

Definition at line 222 of file GLWindow.java.

Here is the caller graph for this function:

◆ setDefaultGesturesEnabled()

void com.jogamp.newt.opengl.GLWindow.setDefaultGesturesEnabled ( final boolean  enable)

Enable or disable default GestureHandler.

Default is enabled.

Implements com.jogamp.newt.Window.

Definition at line 952 of file GLWindow.java.

◆ setFocusAction()

final void com.jogamp.newt.opengl.GLWindow.setFocusAction ( final 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.

Implements com.jogamp.newt.Window.

Definition at line 406 of file GLWindow.java.

◆ setFullscreen() [1/2]

final boolean com.jogamp.newt.opengl.GLWindow.setFullscreen ( final 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()

Implements com.jogamp.newt.Window.

Definition at line 534 of file GLWindow.java.

Here is the caller graph for this function:

◆ setFullscreen() [2/2]

boolean com.jogamp.newt.opengl.GLWindow.setFullscreen ( final 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()

Implements com.jogamp.newt.Window.

Definition at line 539 of file GLWindow.java.

◆ setKeyboardFocusHandler()

void com.jogamp.newt.opengl.GLWindow.setKeyboardFocusHandler ( final 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

Implements com.jogamp.newt.Window.

Definition at line 411 of file GLWindow.java.

◆ setKeyboardVisible()

final void com.jogamp.newt.opengl.GLWindow.setKeyboardVisible ( final 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.

Implements com.jogamp.newt.Window.

Definition at line 892 of file GLWindow.java.

◆ setMaximized()

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

Operation is ignored if this instance is a child window.

See also
STATE_BIT_MAXIMIZED_HORZ
STATE_BIT_MAXIMIZED_VERT
STATE_MASK_MAXIMIZED_HORZ
STATE_MASK_MAXIMIZED_VERT
Since
2.3.2

Implements com.jogamp.newt.Window.

Definition at line 391 of file GLWindow.java.

Here is the caller graph for this function:

◆ setPointerIcon()

final void com.jogamp.newt.opengl.GLWindow.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)

Implements com.jogamp.newt.Window.

Definition at line 322 of file GLWindow.java.

Here is the caller graph for this function:

◆ setPointerVisible()

final void com.jogamp.newt.opengl.GLWindow.setPointerVisible ( final 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)

Implements com.jogamp.newt.Window.

Definition at line 312 of file GLWindow.java.

Here is the caller graph for this function:

◆ setPosition()

final void com.jogamp.newt.opengl.GLWindow.setPosition ( final int  x,
final 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()

Implements com.jogamp.newt.Window.

Definition at line 525 of file GLWindow.java.

Here is the caller graph for this function:

◆ setResizable()

final void com.jogamp.newt.opengl.GLWindow.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

Implements com.jogamp.newt.Window.

Definition at line 371 of file GLWindow.java.

Here is the caller graph for this function:

◆ setSize()

final void com.jogamp.newt.opengl.GLWindow.setSize ( final int  width,
final 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()

Implements com.jogamp.newt.Window.

Definition at line 625 of file GLWindow.java.

◆ setSticky()

final void com.jogamp.newt.opengl.GLWindow.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

Implements com.jogamp.newt.Window.

Definition at line 381 of file GLWindow.java.

Here is the caller graph for this function:

◆ setSurfaceScale()

final boolean com.jogamp.newt.opengl.GLWindow.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()

Implements com.jogamp.nativewindow.ScalableSurface.

Definition at line 495 of file GLWindow.java.

Here is the caller graph for this function:

◆ setSurfaceSize()

final void com.jogamp.newt.opengl.GLWindow.setSurfaceSize ( final int  pixelWidth,
final 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()

Implements com.jogamp.newt.Window.

Definition at line 629 of file GLWindow.java.

Here is the caller graph for this function:

◆ setTitle()

final void com.jogamp.newt.opengl.GLWindow.setTitle ( final String  title)

Implements com.jogamp.newt.Window.

Definition at line 297 of file GLWindow.java.

◆ setTopLevelPosition()

void com.jogamp.newt.opengl.GLWindow.setTopLevelPosition ( final int  x,
final 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()

Implements com.jogamp.newt.Window.

Definition at line 529 of file GLWindow.java.

Here is the caller graph for this function:

◆ setTopLevelSize()

void com.jogamp.newt.opengl.GLWindow.setTopLevelSize ( final int  width,
final 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()

Implements com.jogamp.newt.Window.

Definition at line 633 of file GLWindow.java.

◆ setUndecorated()

final void com.jogamp.newt.opengl.GLWindow.setUndecorated ( final boolean  value)
See also
STATE_BIT_UNDECORATED
STATE_MASK_UNDECORATED

Implements com.jogamp.newt.Window.

Definition at line 337 of file GLWindow.java.

Here is the caller graph for this function:

◆ setVisible() [1/2]

final void com.jogamp.newt.opengl.GLWindow.setVisible ( final 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

Implements com.jogamp.newt.Window.

Definition at line 615 of file GLWindow.java.

◆ setVisible() [2/2]

void com.jogamp.newt.opengl.GLWindow.setVisible ( final boolean  wait,
final 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

Implements com.jogamp.newt.Window.

Definition at line 620 of file GLWindow.java.

◆ setWindowDestroyNotifyAction()

void com.jogamp.newt.opengl.GLWindow.setWindowDestroyNotifyAction ( final 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.

Implements com.jogamp.newt.Window.

Definition at line 610 of file GLWindow.java.

◆ surfaceSwap()

final boolean com.jogamp.newt.opengl.GLWindow.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 1015 of file GLWindow.java.

◆ surfaceUpdated()

final void com.jogamp.newt.opengl.GLWindow.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 1035 of file GLWindow.java.

◆ swapBuffers()

final void com.jogamp.newt.opengl.GLWindow.swapBuffers ( ) throws GLException

Swaps the front and back buffers of this drawable.

For GLAutoDrawable implementations, when automatic buffer swapping is enabled (as is the default), this method is called automatically and should not be called by the end user.

Implements com.jogamp.opengl.GLDrawable.

Definition at line 831 of file GLWindow.java.

◆ toSimpleString() [1/2]

final String com.jogamp.newt.opengl.GLWindow.toSimpleString ( )

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

Implements com.jogamp.newt.Window.

Definition at line 560 of file GLWindow.java.

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

◆ toSimpleString() [2/2]

final StringBuilder com.jogamp.newt.opengl.GLWindow.toSimpleString ( final 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

Implements com.jogamp.newt.Window.

Definition at line 554 of file GLWindow.java.

◆ toString() [1/2]

final String com.jogamp.newt.opengl.GLWindow.toString ( )

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

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

Implements com.jogamp.newt.Window.

Definition at line 577 of file GLWindow.java.

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

◆ toString() [2/2]

final StringBuilder com.jogamp.newt.opengl.GLWindow.toString ( final 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

Implements com.jogamp.newt.Window.

Definition at line 564 of file GLWindow.java.

◆ unlockSurface()

final void com.jogamp.newt.opengl.GLWindow.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 999 of file GLWindow.java.

Here is the caller graph for this function:

◆ warpPointer()

final void com.jogamp.newt.opengl.GLWindow.warpPointer ( final int  x,
final 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)

Implements com.jogamp.newt.Window.

Definition at line 342 of file GLWindow.java.

Here is the caller graph for this function:

◆ windowRepaint()

final boolean com.jogamp.newt.opengl.GLWindow.windowRepaint ( final int  x,
final int  y,
final int  width,
final 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()

Implements com.jogamp.newt.Window.

Definition at line 847 of file GLWindow.java.

Here is the caller graph for this function:

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