mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
parent
a726942bfe
commit
0118743333
@ -1934,13 +1934,14 @@ GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos);
|
|||||||
/*! @brief Returns the work area of the monitor.
|
/*! @brief Returns the work area of the monitor.
|
||||||
*
|
*
|
||||||
* This function returns the position, in screen coordinates, of the upper-left
|
* This function returns the position, in screen coordinates, of the upper-left
|
||||||
* corner of the work area of the specified monitor along with the
|
* corner of the work area of the specified monitor along with the work area
|
||||||
* work area size in screen coordinates. The work area is defined as the area of the
|
* size in screen coordinates. The work area is defined as the area of the
|
||||||
* monitor not occluded by the operating system task bar where present. If no task
|
* monitor not occluded by the operating system task bar where present. If no
|
||||||
* bar exists then the work area is the monitor resolution in screen coordinates.
|
* task bar exists then the work area is the monitor resolution in screen
|
||||||
|
* coordinates.
|
||||||
*
|
*
|
||||||
* Any or all of the position and size arguments may be `NULL`. If an error occurs, all
|
* Any or all of the position and size arguments may be `NULL`. If an error
|
||||||
* non-`NULL` position and size arguments will be set to zero.
|
* occurs, all non-`NULL` position and size arguments will be set to zero.
|
||||||
*
|
*
|
||||||
* @param[in] monitor The monitor to query.
|
* @param[in] monitor The monitor to query.
|
||||||
* @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
|
* @param[out] xpos Where to store the monitor x-coordinate, or `NULL`.
|
||||||
|
@ -410,7 +410,9 @@ void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
|
|||||||
*yscale = (float) (pixels.size.height / points.size.height);
|
*yscale = (float) (pixels.size.height / points.size.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height)
|
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,
|
||||||
|
int* xpos, int* ypos,
|
||||||
|
int* width, int* height)
|
||||||
{
|
{
|
||||||
if (!refreshMonitorScreen(monitor))
|
if (!refreshMonitorScreen(monitor))
|
||||||
return;
|
return;
|
||||||
|
@ -330,7 +330,9 @@ GLFWAPI void glfwGetMonitorPos(GLFWmonitor* handle, int* xpos, int* ypos)
|
|||||||
_glfwPlatformGetMonitorPos(monitor, xpos, ypos);
|
_glfwPlatformGetMonitorPos(monitor, xpos, ypos);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* handle, int* xpos, int* ypos, int* width, int* height)
|
GLFWAPI void glfwGetMonitorWorkarea(GLFWmonitor* handle,
|
||||||
|
int* xpos, int* ypos,
|
||||||
|
int* width, int* height)
|
||||||
{
|
{
|
||||||
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
||||||
assert(monitor != NULL);
|
assert(monitor != NULL);
|
||||||
|
@ -49,7 +49,9 @@ void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
|
|||||||
*yscale = 1.f;
|
*yscale = 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height)
|
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,
|
||||||
|
int* xpos, int* ypos,
|
||||||
|
int* width, int* height)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +361,9 @@ void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
|
|||||||
_glfwGetMonitorContentScaleWin32(monitor->win32.handle, xscale, yscale);
|
_glfwGetMonitorContentScaleWin32(monitor->win32.handle, xscale, yscale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height)
|
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,
|
||||||
|
int* xpos, int* ypos,
|
||||||
|
int* width, int* height)
|
||||||
{
|
{
|
||||||
MONITORINFO monitorInfo;
|
MONITORINFO monitorInfo;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
@ -170,7 +170,9 @@ void _glfwPlatformGetMonitorContentScale(_GLFWmonitor* monitor,
|
|||||||
*yscale = (float) monitor->wl.scale;
|
*yscale = (float) monitor->wl.scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height)
|
void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor,
|
||||||
|
int* xpos, int* ypos,
|
||||||
|
int* width, int* height)
|
||||||
{
|
{
|
||||||
if (xpos)
|
if (xpos)
|
||||||
*xpos = monitor->wl.x;
|
*xpos = monitor->wl.x;
|
||||||
|
@ -348,7 +348,9 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
|
|||||||
{
|
{
|
||||||
Atom* extents = NULL;
|
Atom* extents = NULL;
|
||||||
|
|
||||||
_glfwGetWindowPropertyX11(_glfw.x11.root, _glfw.x11.NET_WORKAREA, XA_CARDINAL, (unsigned char**) &extents);
|
_glfwGetWindowPropertyX11(_glfw.x11.root,
|
||||||
|
_glfw.x11.NET_WORKAREA, XA_CARDINAL,
|
||||||
|
(unsigned char**) &extents);
|
||||||
|
|
||||||
if (xpos)
|
if (xpos)
|
||||||
*xpos = extents[0];
|
*xpos = extents[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user