Class GLFWMonitor
java.lang.Object
com.blackrook.gloop.glfw.GLFWHandle
com.blackrook.gloop.glfw.GLFWMonitor
A GLFW monitor information instance.
- Author:
- Matthew Tropiano
-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys this handle.static GLFWMonitor[]getAll()Gets all available monitor devices.floatfloatlongintgetName()intintstatic GLFWMonitorGets the primary monitor.intintintintintboolean
-
Method Details
-
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
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:
getHandlein classGLFWHandle- Returns:
- this handle's GLFW address handle.
-
isCreated
public boolean isCreated()- Specified by:
isCreatedin classGLFWHandle- Returns:
- true if this handle was allocated, false if not.
-
destroy
public void destroy()Description copied from class:GLFWHandleDestroys this handle. Does nothing if already destroyed.- Specified by:
destroyin classGLFWHandle
-
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
- Returns:
- this monitor's video mode.
-