Class GLFWMonitor

java.lang.Object
com.blackrook.gloop.glfw.GLFWHandle
com.blackrook.gloop.glfw.GLFWMonitor

public class GLFWMonitor extends GLFWHandle
A GLFW monitor information instance.
Author:
Matthew Tropiano
  • Method Details

    • getAll

      public static GLFWMonitor[] getAll()
      Gets all available monitor devices. This must only be called from the main thread on the first call.
      Returns:
      an array of monitors.
    • getPrimaryMonitor

      public static GLFWMonitor getPrimaryMonitor()
      Gets the primary monitor. This must only be called from the main thread on the first call.
      Returns:
      the primary monitor.
    • getHandle

      public long getHandle()
      Specified by:
      getHandle in class GLFWHandle
      Returns:
      this handle's GLFW address handle.
    • isCreated

      public boolean isCreated()
      Specified by:
      isCreated in class GLFWHandle
      Returns:
      true if this handle was allocated, false if not.
    • destroy

      public void destroy()
      Description copied from class: GLFWHandle
      Destroys this handle. Does nothing if already destroyed.
      Specified by:
      destroy in class GLFWHandle
    • getName

      public String getName()
      Returns:
      the monitor name.
    • getWidthMM

      public int getWidthMM()
      Returns:
      width in millimeters.
    • getHeightMM

      public int getHeightMM()
      Returns:
      height in millimeters.
    • getContentScaleX

      public float getContentScaleX()
      Returns:
      content scalar, X.
    • getContentScaleY

      public float getContentScaleY()
      Returns:
      content scalar, Y.
    • getPositionX

      public int getPositionX()
      Returns:
      screen coordinates position X.
    • getPositionY

      public int getPositionY()
      Returns:
      screen coordinates position Y.
    • getWorkAreaX

      public int getWorkAreaX()
      Returns:
      desktop work area screen coordinates X.
    • getWorkAreaY

      public int getWorkAreaY()
      Returns:
      desktop work area screen coordinates Y.
    • getWorkAreaWidth

      public int getWorkAreaWidth()
      Returns:
      desktop work area screen width.
    • getWorkAreaHeight

      public int getWorkAreaHeight()
      Returns:
      desktop work area screen height.
    • getVideoMode

      public GLFWVidMode getVideoMode()
      Returns:
      this monitor's video mode.