Class Lwjgl3Window

  • All Implemented Interfaces:
    com.badlogic.gdx.utils.Disposable

    public class Lwjgl3Window
    extends java.lang.Object
    implements com.badlogic.gdx.utils.Disposable
    • Method Detail

      • getListener

        public com.badlogic.gdx.ApplicationListener getListener()
        Returns:
        the ApplicationListener associated with this window
      • postRunnable

        public void postRunnable​(java.lang.Runnable runnable)
        Post a Runnable to this window's event queue. Use this if you access statics like Gdx.graphics in your runnable instead of Application.postRunnable(Runnable).
      • setPosition

        public void setPosition​(int x,
                                int y)
        Sets the position of the window in logical coordinates. All monitors span a virtual surface together. The coordinates are relative to the first monitor in the virtual surface.
      • getPositionX

        public int getPositionX()
        Returns:
        the window position in logical coordinates. All monitors span a virtual surface together. The coordinates are relative to the first monitor in the virtual surface.
      • getPositionY

        public int getPositionY()
        Returns:
        the window position in logical coordinates. All monitors span a virtual surface together. The coordinates are relative to the first monitor in the virtual surface.
      • setVisible

        public void setVisible​(boolean visible)
        Sets the visibility of the window. Invisible windows will still call their ApplicationListener
      • closeWindow

        public void closeWindow()
        Closes this window and pauses and disposes the associated ApplicationListener.
      • iconifyWindow

        public void iconifyWindow()
        Minimizes (iconifies) the window. Iconified windows do not call their ApplicationListener until the window is restored.
      • isIconified

        public boolean isIconified()
        Whether the window is iconfieid
      • restoreWindow

        public void restoreWindow()
        De-minimizes (de-iconifies) and de-maximizes the window.
      • maximizeWindow

        public void maximizeWindow()
        Maximizes the window.
      • focusWindow

        public void focusWindow()
        Brings the window to front and sets input focus. The window should already be visible and not iconified.
      • isFocused

        public boolean isFocused()
      • setIcon

        public void setIcon​(com.badlogic.gdx.graphics.Pixmap... image)
        Sets the icon that will be used in the window's title bar. Has no effect in macOS, which doesn't use window icons.
        Parameters:
        image - One or more images. The one closest to the system's desired size will be scaled. Good sizes include 16x16, 32x32 and 48x48. Pixmap format RGBA8888 is preferred so the images will not have to be copied and converted. The chosen image is copied, and the provided Pixmaps are not disposed.
      • setTitle

        public void setTitle​(java.lang.CharSequence title)
      • setSizeLimits

        public void setSizeLimits​(int minWidth,
                                  int minHeight,
                                  int maxWidth,
                                  int maxHeight)
        Sets minimum and maximum size limits for the window. If the window is full screen or not resizable, these limits are ignored. Use -1 to indicate an unrestricted dimension.
      • getWindowHandle

        public long getWindowHandle()
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.utils.Disposable
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • flash

        public void flash()