Add glfwGetMonitorWorkarea

This function retrieves the work area rectangle of the specified
monitor.

Related to #920.
Closes #989.
This commit is contained in:
Felipe Ferreira da Silva
2017-04-06 16:48:08 -03:00
committed by Camilla Löwy
parent c20754c4a6
commit be295ccbea
11 changed files with 121 additions and 0 deletions
+19
View File
@@ -330,6 +330,25 @@ GLFWAPI void glfwGetMonitorPos(GLFWmonitor* handle, int* xpos, int* ypos)
_glfwPlatformGetMonitorPos(monitor, xpos, ypos);
}
GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* handle, int* xpos, int* ypos, int* width, int* height)
{
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
assert(monitor != NULL);
if (xpos)
*xpos = 0;
if (ypos)
*ypos = 0;
if (width)
*width = 0;
if (width)
*width = 0;
_GLFW_REQUIRE_INIT();
_glfwPlatformGetMonitorWorkarea(monitor, xpos, ypos, width, height);
}
GLFWAPI void glfwGetMonitorPhysicalSize(GLFWmonitor* handle, int* widthMM, int* heightMM)
{
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;