|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance, which may be an aggregation (lifecycle: created and destroyed).
More...
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 |
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.
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.
|
protected |
Constructor.
Do not call this directly – use create() instead.
Definition at line 127 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.addChild | ( | final NativeWindow | win | ) |
Implements com.jogamp.newt.Window.
Definition at line 596 of file GLWindow.java.
| 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.
| 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.
| index | Position 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(). |
| l | The listener object to be inserted |
| IndexOutOfBoundsException | If the index is not within (0 <= index && index <= size()), or -1 |
Implements com.jogamp.newt.Window.
Definition at line 964 of file GLWindow.java.
| 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.
| 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.
| index | Position 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(). |
| l | The listener object to be inserted |
| IndexOutOfBoundsException | If the index is not within (0 <= index && index <= size()), or -1 |
Implements com.jogamp.newt.Window.
Definition at line 976 of file GLWindow.java.
| 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.
| index | Position 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(). |
| l | The listener object to be inserted |
| IndexOutOfBoundsException | If the index is not within (0 <= index && index <= size()), or -1 |
Implements com.jogamp.newt.Window.
Definition at line 907 of file GLWindow.java.
| 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.
| 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.
| index | Position 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(). |
| l | The listener object to be inserted |
| IndexOutOfBoundsException | If the index is not within (0 <= index && index <= size()), or -1 |
Implements com.jogamp.newt.Window.
Definition at line 932 of file GLWindow.java.
| 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.
| 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.
| index | Position 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(). |
| l | The listener object to be inserted |
| IndexOutOfBoundsException | If the index is not within (0 <= index && index <= size()), or -1 |
Implements com.jogamp.nativewindow.NativeSurface.
Definition at line 1030 of file GLWindow.java.
| 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.
| 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.
| index | Position 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(). |
| l | The listener object to be inserted |
| IndexOutOfBoundsException | If the index is not within (0 <= index && index <= size()), or -1 |
Implements com.jogamp.newt.Window.
Definition at line 887 of file GLWindow.java.
| 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.
| 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.
| 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.
| 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.
| confine | defaults to false. |
Implements com.jogamp.newt.Window.
Definition at line 332 of file GLWindow.java.
| boolean com.jogamp.newt.opengl.GLWindow.consumeEvent | ( | final NEWTEvent | event | ) |
Consume the event.
Implements com.jogamp.newt.event.NEWTEventConsumer.
Definition at line 839 of file GLWindow.java.
| final int[] com.jogamp.newt.opengl.GLWindow.convertToPixelUnits | ( | final int[] | windowUnitsAndResult | ) |
Converts the given window units into pixel units in place.
| windowUnitsAndResult | int[2] storage holding the window units for the x- and y-coord to convert and the resulting values. |
Implements com.jogamp.nativewindow.NativeSurface.
Definition at line 481 of file GLWindow.java.
| final int[] com.jogamp.newt.opengl.GLWindow.convertToWindowUnits | ( | final int[] | pixelUnitsAndResult | ) |
Converts the given pixel units into window units in place.
| pixelUnitsAndResult | int[2] storage holding the pixel units for the x- and y-coord to convert and the resulting values. |
Implements com.jogamp.nativewindow.NativeSurface.
Definition at line 476 of file GLWindow.java.
|
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.
|
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.
|
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.
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.
| 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.
| void com.jogamp.newt.opengl.GLWindow.display | ( | ) |
Causes OpenGL rendering to be performed for this GLAutoDrawable in the following order:
display(..) for all registered GLEventListeners. GLRunnable, enqueued via invoke(boolean, GLRunnable). 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.
Implements com.jogamp.opengl.GLAutoDrawable.
Definition at line 782 of file GLWindow.java.
| 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.
| 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.
| final CapabilitiesImmutable com.jogamp.newt.opengl.GLWindow.getChosenCapabilities | ( | ) |
Gets an immutable set of chosen capabilities.
Implements com.jogamp.newt.Window.
Definition at line 266 of file GLWindow.java.
| final float[] com.jogamp.newt.opengl.GLWindow.getCurrentSurfaceScale | ( | final float[] | result | ) |
Returns the current pixel scale of the associated NativeSurface.
| result | float[2] storage for the result |
Implements com.jogamp.nativewindow.ScalableSurface.
Definition at line 505 of file GLWindow.java.
| WindowClosingMode com.jogamp.newt.opengl.GLWindow.getDefaultCloseOperation | ( | ) |
Implements com.jogamp.nativewindow.WindowClosingProtocol.
Definition at line 217 of file GLWindow.java.
| 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.
| 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.
| 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.
| 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().
Implements com.jogamp.nativewindow.NativeSurface.
Definition at line 1052 of file GLWindow.java.
| final int com.jogamp.newt.opengl.GLWindow.getHeight | ( | ) |
Returns the height of the client area excluding insets (window decorations) in window units.
Implements com.jogamp.nativewindow.NativeWindow.
Definition at line 451 of file GLWindow.java.
| 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()
Implements com.jogamp.nativewindow.NativeWindow.
Definition at line 431 of file GLWindow.java.
| final KeyListener com.jogamp.newt.opengl.GLWindow.getKeyListener | ( | final int | index | ) |
Implements com.jogamp.newt.Window.
Definition at line 917 of file GLWindow.java.
| final KeyListener[] com.jogamp.newt.opengl.GLWindow.getKeyListeners | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 922 of file GLWindow.java.
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.
| point | Optional Point storage. If not null, null, it is translated about the resulting screen position and returned. |
Implements com.jogamp.nativewindow.NativeWindow.
Definition at line 643 of file GLWindow.java.
| 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.
| 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.
| 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
| result | float[2] storage for the result |
Implements com.jogamp.nativewindow.ScalableSurface.
Definition at line 515 of file GLWindow.java.
| final float[] com.jogamp.newt.opengl.GLWindow.getMinimumSurfaceScale | ( | final float[] | result | ) |
Returns the minimum pixel scale of the associated NativeSurface.
| result | float[2] storage for the result |
Implements com.jogamp.nativewindow.ScalableSurface.
Definition at line 510 of file GLWindow.java.
| 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.
| final MouseListener[] com.jogamp.newt.opengl.GLWindow.getMouseListeners | ( | ) |
Returns all MouseListener.
Implements com.jogamp.newt.Window.
Definition at line 947 of file GLWindow.java.
| final NativeWindow com.jogamp.newt.opengl.GLWindow.getParent | ( | ) |
Implements com.jogamp.nativewindow.NativeWindow.
Definition at line 282 of file GLWindow.java.
| 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.
| ppmmStore | float[2] storage for the ppmm result |
Implements com.jogamp.newt.Window.
Definition at line 520 of file GLWindow.java.
| final PointerIcon com.jogamp.newt.opengl.GLWindow.getPointerIcon | ( | ) |
Returns the current PointerIcon, which maybe null for the default.
Implements com.jogamp.newt.Window.
Definition at line 317 of file GLWindow.java.
| final CapabilitiesImmutable com.jogamp.newt.opengl.GLWindow.getRequestedCapabilities | ( | ) |
Gets an immutable set of requested capabilities.
Implements com.jogamp.newt.Window.
Definition at line 272 of file GLWindow.java.
| 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.
| result | float[2] storage for the result |
Implements com.jogamp.nativewindow.ScalableSurface.
Definition at line 500 of file GLWindow.java.
| final Screen com.jogamp.newt.opengl.GLWindow.getScreen | ( | ) |
Screen Implements com.jogamp.newt.Window.
Definition at line 287 of file GLWindow.java.
| 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.
| final int com.jogamp.newt.opengl.GLWindow.getStateMask | ( | ) |
Returns the current status mask of this instance.
Implements com.jogamp.newt.Window.
Definition at line 241 of file GLWindow.java.
| final String com.jogamp.newt.opengl.GLWindow.getStateMaskString | ( | ) |
Returns a string representation of the current state mask.
Implements com.jogamp.newt.Window.
Definition at line 246 of file GLWindow.java.
| final int com.jogamp.newt.opengl.GLWindow.getStatePublicBitCount | ( | ) |
Number of all public state bits.
Implements com.jogamp.newt.Window.
Definition at line 231 of file GLWindow.java.
| final int com.jogamp.newt.opengl.GLWindow.getStatePublicBitmask | ( | ) |
Bitmask covering all public state bits.
Implements com.jogamp.newt.Window.
Definition at line 236 of file GLWindow.java.
| 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):
STATE_MASK_VISIBLE: Visibility can be toggled. Minimum requirement. STATE_MASK_CHILDWIN: Native window parenting is supported. STATE_MASK_FOCUSED: Window focus management is supported. Minimum requirement. STATE_MASK_UNDECORATED: Window decoration can be toggled. STATE_MASK_ALWAYSONTOP: Window can be set always-on-top. STATE_MASK_ALWAYSONBOTTOM: Window can be set always-on-bottom. STATE_MASK_STICKY: Window can be set sticky. STATE_MASK_RESIZABLE: Window resizability can be toggled and it's size can be changed. STATE_MASK_MAXIMIZED_VERT: Window can be maximized-vertically. STATE_MASK_MAXIMIZED_HORZ: Window can be maximized-horizontally. STATE_MASK_FULLSCREEN: Window fullscreen can be toggled. STATE_MASK_POINTERVISIBLE: Window pointer visibility can be toggled. STATE_MASK_POINTERCONFINED: Window pointer can be confined. STATE_MASK_REPOSITIONABLE: Window position can be changed. Implements com.jogamp.newt.Window.
Definition at line 251 of file GLWindow.java.
| final String com.jogamp.newt.opengl.GLWindow.getSupportedStateMaskString | ( | ) |
Returns a string representation of the supported state mask.
Implements com.jogamp.newt.Window.
Definition at line 256 of file GLWindow.java.
| 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.
| 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.
| final int com.jogamp.newt.opengl.GLWindow.getSurfaceHeight | ( | ) |
Returns the height of this GLDrawable's surface client area in pixel units.
Implements com.jogamp.opengl.GLDrawable.
Definition at line 466 of file GLWindow.java.
| 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.
| final int com.jogamp.newt.opengl.GLWindow.getSurfaceWidth | ( | ) |
Returns the width of this GLDrawable's surface client area in pixel units.
Implements com.jogamp.opengl.GLDrawable.
Definition at line 461 of file GLWindow.java.
| final String com.jogamp.newt.opengl.GLWindow.getTitle | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 302 of file GLWindow.java.
| 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().
Implements com.jogamp.opengl.GLAutoDrawable.
Definition at line 156 of file GLWindow.java.
| 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.
| final int com.jogamp.newt.opengl.GLWindow.getWidth | ( | ) |
Returns the width of the client area excluding insets (window decorations) in window units.
Implements com.jogamp.nativewindow.NativeWindow.
Definition at line 446 of file GLWindow.java.
| 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.
| final WindowListener com.jogamp.newt.opengl.GLWindow.getWindowListener | ( | final int | index | ) |
Implements com.jogamp.newt.Window.
Definition at line 867 of file GLWindow.java.
| final WindowListener[] com.jogamp.newt.opengl.GLWindow.getWindowListeners | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 872 of file GLWindow.java.
| 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.
Implements com.jogamp.nativewindow.NativeWindow.
Definition at line 436 of file GLWindow.java.
| 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.
Implements com.jogamp.nativewindow.NativeWindow.
Definition at line 441 of file GLWindow.java.
| 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.
| final boolean com.jogamp.newt.opengl.GLWindow.isAlwaysOnBottom | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 366 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isAlwaysOnTop | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 356 of file GLWindow.java.
| 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.
| final boolean com.jogamp.newt.opengl.GLWindow.isFullscreen | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 544 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isGLStatePreservationSupported | ( | ) |
GLWindow supports GL state preservation, hence returns true.
Definition at line 818 of file GLWindow.java.
| 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.
Implements com.jogamp.newt.Window.
Definition at line 897 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isMaximizedHorz | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 401 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isMaximizedVert | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 396 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isNativeValid | ( | ) |
setVisible(true), otherwise false.Implements com.jogamp.newt.Window.
Definition at line 638 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isPointerConfined | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 327 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isPointerVisible | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 307 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isResizable | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 376 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isSticky | ( | ) |
STATE_BIT_STICKY STATE_MASK_STICKY Implements com.jogamp.newt.Window.
Definition at line 386 of file GLWindow.java.
| 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.
| final boolean com.jogamp.newt.opengl.GLWindow.isUndecorated | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 346 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.isVisible | ( | ) |
Implements com.jogamp.newt.Window.
Definition at line 549 of file GLWindow.java.
| 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).
LOCK_SUCCESS, LOCK_SURFACE_CHANGED or LOCK_SURFACE_NOT_READY.| RuntimeException | after timeout when waiting for the surface lock |
| NativeWindowException | if native locking failed, maybe platform related |
Implements com.jogamp.nativewindow.NativeSurface.
Definition at line 994 of file GLWindow.java.
|
static |
A most simple JOGL AWT test entry.
Definition at line 1069 of file GLWindow.java.
| final boolean com.jogamp.newt.opengl.GLWindow.removeChild | ( | final NativeWindow | win | ) |
Implements com.jogamp.newt.Window.
Definition at line 591 of file GLWindow.java.
| 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.
| 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.
| final void com.jogamp.newt.opengl.GLWindow.removeKeyListener | ( | final KeyListener | l | ) |
Implements com.jogamp.newt.Window.
Definition at line 912 of file GLWindow.java.
| 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.
| 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.
| final void com.jogamp.newt.opengl.GLWindow.removeWindowListener | ( | final WindowListener | l | ) |
Implements com.jogamp.newt.Window.
Definition at line 877 of file GLWindow.java.
| 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.
| newParent | The new parent NativeWindow. If null, this Window becomes a top level window. |
| x | new top-level position in window units, use -1 for default position. |
| y | new top-level position in window units, use -1 for default position. |
| hints | May contain hints (bitfield values) like REPARENT_HINT_FORCE_RECREATION or REPARENT_HINT_BECOMES_VISIBLE. |
Implements com.jogamp.newt.Window.
Definition at line 582 of file GLWindow.java.
| 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.
Implements com.jogamp.newt.Window.
Definition at line 416 of file GLWindow.java.
| 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.
| wait | true if waiting until the request is executed, otherwise false |
Implements com.jogamp.newt.Window.
Definition at line 421 of file GLWindow.java.
| 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.
| void com.jogamp.newt.opengl.GLWindow.sendWindowEvent | ( | final int | eventType | ) |
Send a WindowEvent to all WindowListener.
| eventType | a WindowEvent type, e.g. WindowEvent#EVENT_WINDOW_REPAINT. |
Implements com.jogamp.newt.Window.
Definition at line 862 of file GLWindow.java.
| final void com.jogamp.newt.opengl.GLWindow.setAlwaysOnBottom | ( | final boolean | value | ) |
Operation is ignored if this instance is a child window.
Implements com.jogamp.newt.Window.
Definition at line 361 of file GLWindow.java.
| final void com.jogamp.newt.opengl.GLWindow.setAlwaysOnTop | ( | final boolean | value | ) |
Operation is ignored if this instance is a child window.
Implements com.jogamp.newt.Window.
Definition at line 351 of file GLWindow.java.
| CapabilitiesChooser com.jogamp.newt.opengl.GLWindow.setCapabilitiesChooser | ( | final CapabilitiesChooser | chooser | ) |
Set the CapabilitiesChooser to help determine the native visual type.
| chooser | the new CapabilitiesChooser |
Implements com.jogamp.newt.Window.
Definition at line 261 of file GLWindow.java.
| WindowClosingMode com.jogamp.newt.opengl.GLWindow.setDefaultCloseOperation | ( | final WindowClosingMode | op | ) |
| op | the new close operation value |
Implements com.jogamp.nativewindow.WindowClosingProtocol.
Definition at line 222 of file GLWindow.java.
| 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.
| 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.
| 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.
| fullscreen | enable or disable fullscreen mode |
Implements com.jogamp.newt.Window.
Definition at line 534 of file GLWindow.java.
| 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.
| monitors | if null fullscreen will be spanned across all MonitorDevices, otherwise across the given list of MonitorDevice. |
Implements com.jogamp.newt.Window.
Definition at line 539 of file GLWindow.java.
| 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.
| l |
Implements com.jogamp.newt.Window.
Definition at line 411 of file GLWindow.java.
| 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.
| final void com.jogamp.newt.opengl.GLWindow.setMaximized | ( | final boolean | horz, |
| final boolean | vert | ||
| ) |
Operation is ignored if this instance is a child window.
STATE_BIT_MAXIMIZED_HORZ STATE_BIT_MAXIMIZED_VERT STATE_MASK_MAXIMIZED_HORZ STATE_MASK_MAXIMIZED_VERT Implements com.jogamp.newt.Window.
Definition at line 391 of file GLWindow.java.
| final void com.jogamp.newt.opengl.GLWindow.setPointerIcon | ( | final PointerIcon | pi | ) |
| pi | Valid PointerIcon reference or null to reset the pointer icon to default. |
Implements com.jogamp.newt.Window.
Definition at line 322 of file GLWindow.java.
| final void com.jogamp.newt.opengl.GLWindow.setPointerVisible | ( | final boolean | pointerVisible | ) |
Makes the pointer visible or invisible.
| pointerVisible | defaults to true for platforms w/ visible pointer, otherwise defaults to true, eg. Android. |
Implements com.jogamp.newt.Window.
Definition at line 312 of file GLWindow.java.
| 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.
| x | coord of the client-area's top left corner in window units |
| y | coord of the client-area's top left corner in window units |
Implements com.jogamp.newt.Window.
Definition at line 525 of file GLWindow.java.
| final void com.jogamp.newt.opengl.GLWindow.setResizable | ( | final boolean | value | ) |
Operation is ignored if this instance is a child window.
Implements com.jogamp.newt.Window.
Definition at line 371 of file GLWindow.java.
| 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.
| width | of the window's client area in window units |
| height | of the window's client area in window units |
STATE_BIT_RESIZABLE STATE_MASK_RESIZABLE Implements com.jogamp.newt.Window.
Definition at line 625 of file GLWindow.java.
| final void com.jogamp.newt.opengl.GLWindow.setSticky | ( | final boolean | value | ) |
Operation is ignored if this instance is a child window.
STATE_BIT_STICKY STATE_MASK_STICKY Implements com.jogamp.newt.Window.
Definition at line 381 of file GLWindow.java.
| 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 })
| pixelScale | requested surface pixel scale float[2] values for x- and y-direction. |
true if the current pixel scale has changed, otherwise false. Implements com.jogamp.nativewindow.ScalableSurface.
Definition at line 495 of file GLWindow.java.
| 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.
| pixelWidth | of the window's client area in pixel units |
| pixelHeight | of the window's client area in pixel units |
Implements com.jogamp.newt.Window.
Definition at line 629 of file GLWindow.java.
| final void com.jogamp.newt.opengl.GLWindow.setTitle | ( | final String | title | ) |
Implements com.jogamp.newt.Window.
Definition at line 297 of file GLWindow.java.
| 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.
| x | coord of the top-level left corner in window units |
| y | coord of the top-level left corner in window units |
Implements com.jogamp.newt.Window.
Definition at line 529 of file GLWindow.java.
| 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.
| width | of the top-level window area in window units |
| height | of the top-level window area in window units |
Implements com.jogamp.newt.Window.
Definition at line 633 of file GLWindow.java.
| final void com.jogamp.newt.opengl.GLWindow.setUndecorated | ( | final boolean | value | ) |
Implements com.jogamp.newt.Window.
Definition at line 337 of file GLWindow.java.
| 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.
Implements com.jogamp.newt.Window.
Definition at line 615 of file GLWindow.java.
| 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.
Implements com.jogamp.newt.Window.
Definition at line 620 of file GLWindow.java.
| 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.
| 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.
Implements com.jogamp.nativewindow.NativeSurface.
Definition at line 1015 of file GLWindow.java.
| 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.
| updater | is the caller object who updated the surface, e.g. a JOGL GLDrawable. |
| ns | the updated NativeSurface |
| when | the time in ms, when the surface was updated |
Implements com.jogamp.nativewindow.SurfaceUpdatedListener.
Definition at line 1035 of file GLWindow.java.
| 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.
| 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.
| final StringBuilder com.jogamp.newt.opengl.GLWindow.toSimpleString | ( | final StringBuilder | sb | ) |
Appends this class simple string one-line representation to the given StringBuilder instance.
| sb | given instance where this class simple string representation is added to |
StringBuilder for chaining Implements com.jogamp.newt.Window.
Definition at line 554 of file GLWindow.java.
| 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.
| final StringBuilder com.jogamp.newt.opengl.GLWindow.toString | ( | final StringBuilder | sb | ) |
Appends this class full string multi-line representation to the given StringBuilder instance.
| sb | given instance where this class full string representation is added to |
StringBuilder for chaining Implements com.jogamp.newt.Window.
Definition at line 564 of file GLWindow.java.
| 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.
Implements com.jogamp.nativewindow.NativeSurface.
Definition at line 999 of file GLWindow.java.
| 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.
| x | relative pointer x position within this window in pixel units |
| y | relative pointer y position within this window in pixel units |
Implements com.jogamp.newt.Window.
Definition at line 342 of file GLWindow.java.
| 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.
| x | dirty-region y-pos in pixel units |
| y | dirty-region x-pos in pixel units |
| width | dirty-region width in pixel units |
| height | dirty-region height in pixel units |
isNativeValid() Implements com.jogamp.newt.Window.
Definition at line 847 of file GLWindow.java.