From a43d1a4937d77fe9ee4560084840fd8f3e960aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 25 Feb 2019 14:46:48 +0100 Subject: [PATCH] Documentation work Fixes #920. Related to #1322. --- README.md | 3 ++- docs/monitor.dox | 12 ++++++++++++ docs/news.dox | 8 ++++++++ include/GLFW/glfw3.h | 4 ++-- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index af7a3b1a..dd369c17 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,8 @@ information on what to include when reporting a bug. (#235,#439,#677,#845,#898) - Added `glfwRequestWindowAttention` function for requesting attention from the user (#732,#988) -- Added `glfwGetMonitorWorkarea` function for querying the monitor work area +- Added `glfwGetMonitorWorkarea` function for retrieving the monitor work area + (#920,#989,#1322) - Added `glfwGetKeyScancode` function that allows retrieving platform dependent scancodes for keys (#830) - Added `glfwSetWindowMaximizeCallback` and `GLFWwindowmaximizefun` for diff --git a/docs/monitor.dox b/docs/monitor.dox index b23482b6..2cd2d587 100644 --- a/docs/monitor.dox +++ b/docs/monitor.dox @@ -174,6 +174,18 @@ glfwGetMonitorPos(monitor, &xpos, &ypos); @endcode +@subsection monitor_workarea Work area + +The area of a monitor not occupied by global task bars or menu bars is the work +area. This is specified in [screen coordinates](@ref coordinate_systems) and +can be retrieved with @ref glfwGetMonitorWorkarea. + +@code +int xpos, ypos, width, height; +glfwGetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height); +@endcode + + @subsection monitor_name Human-readable name The human-readable, UTF-8 encoded name of a monitor is returned by @ref diff --git a/docs/news.dox b/docs/news.dox index 65812e71..e6113fe8 100644 --- a/docs/news.dox +++ b/docs/news.dox @@ -80,6 +80,14 @@ Windows and X11 where this is necessary. @see @ref window_scale +@subsection news_33_workarea Support for monitor work area + +GLFW now supports querying the work area of a monitor, i.e. the area not +occupied by task bars or global menu bars, with @ref glfwGetMonitorWorkarea. + +@see @ref monitor_workarea + + @subsection news_33_inithint Support for initialization hints GLFW now supports setting library initialization hints with @ref glfwInitHint. diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 3fc3db62..fb0980ab 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -1931,7 +1931,7 @@ GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor(void); */ GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos); -/*! @brief Returns the work area of the monitor. +/*! @brief Retrives the work area of the monitor. * * This function returns the position, in screen coordinates, of the upper-left * corner of the work area of the specified monitor along with the work area @@ -1954,7 +1954,7 @@ GLFWAPI void glfwGetMonitorPos(GLFWmonitor* monitor, int* xpos, int* ypos); * * @thread_safety This function must only be called from the main thread. * - * @sa @ref monitor_properties + * @sa @ref monitor_workarea * * @since Added in version 3.3. *