mirror of
https://github.com/glfw/glfw.git
synced 2026-02-17 21:12:34 +01:00
Add glfwGetMonitorWorkarea
This function retrieves the work area rectangle of the specified monitor. Related to #920. Closes #989.
This commit is contained in:
committed by
Camilla Löwy
parent
c20754c4a6
commit
be295ccbea
@@ -1931,6 +1931,31 @@ GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void);
|
||||
*/
|
||||
GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
|
||||
|
||||
/*! @brief Returns the work area of the monitor.
|
||||
*
|
||||
* This function returns the position, in screen coordinates, of the upper-left
|
||||
* corner of the specified monitor.
|
||||
*
|
||||
* Any or all of the position arguments may be `NULL`. If an error occurs, all
|
||||
* non-`NULL` position arguments will be set to zero.
|
||||
*
|
||||
* @param[in] monitor The monitor to query.
|
||||
* @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
|
||||
* @param[out] ypos Where to store the monitor y-coordinate, or `NULL`.
|
||||
*
|
||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||
* GLFW_PLATFORM_ERROR.
|
||||
*
|
||||
* @thread_safety This function must only be called from the main thread.
|
||||
*
|
||||
* @sa @ref monitor_properties
|
||||
*
|
||||
* @since Added in version 3.0.
|
||||
*
|
||||
* @ingroup monitor
|
||||
*/
|
||||
GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height);
|
||||
|
||||
/*! @brief Returns the physical size of the monitor.
|
||||
*
|
||||
* This function returns the size, in millimetres, of the display area of the
|
||||
|
||||
Reference in New Issue
Block a user