Documentation work.

This commit is contained in:
Camilla Berglund 2013-06-17 12:56:36 +02:00
parent 10017b27bb
commit f5f55e3ff8
3 changed files with 19 additions and 12 deletions

View File

@ -49,14 +49,20 @@ const GLFWvidmode* mode = glfwGetVideoMode(monitor);
@section monitor_size Monitor physical size @section monitor_size Monitor physical size
The physical size in millimetres of a monitor, or an approximation of it, can be The physical size in millimetres of a monitor, or an approximation of it, can be
retrieved with @ref glfwGetMonitorPhysicalSize. This can, for example, be used retrieved with @ref glfwGetMonitorPhysicalSize.
together with the current video mode to calculate DPI.
@code @code
int widthMM, heightMM; int widthMM, heightMM;
glfwGetMonitorPhysicalSize(monitor, &widthMM, &heightMM); glfwGetMonitorPhysicalSize(monitor, &widthMM, &heightMM);
@endcode @endcode
This can, for example, be used together with the current video mode to calculate
the DPI of a monitor.
@code
const double dpi = mode->width / (widthMM / 25.4);
@endcode
@section monitor_name Monitor name @section monitor_name Monitor name

View File

@ -45,21 +45,22 @@ extern "C" {
*/ */
/*! @defgroup error Error handling /*! @defgroup error Error handling
*/ */
/*! @defgroup gamma Gamma ramp support
*/
/*! @defgroup init Initialization and version information /*! @defgroup init Initialization and version information
*/ */
/*! @defgroup input Input handling /*! @defgroup input Input handling
*/ */
/*! @defgroup monitor Monitor handling /*! @defgroup monitor Monitor handling
*
* This is the reference documentation for monitor related functions and types.
* For more information, see the @ref monitor.
*/ */
/*! @defgroup time Time input /*! @defgroup time Time input
*/ */
/*! @defgroup window Window handling /*! @defgroup window Window handling
* *
* This is the reference documentation for the window handling API, including * This is the reference documentation for window related functions and types,
* creation, deletion and event polling. For more information, see the * including creation, deletion and event polling. For more information, see
* [article on window handling](@ref window). * the @ref window.
*/ */
@ -818,7 +819,7 @@ typedef struct
* *
* @sa glfwGetGammaRamp glfwSetGammaRamp * @sa glfwGetGammaRamp glfwSetGammaRamp
* *
* @ingroup gamma * @ingroup monitor
*/ */
typedef struct typedef struct
{ {
@ -1124,7 +1125,7 @@ GLFWAPI const GLFWvidmode* glfwGetVideoMode(GLFWmonitor* monitor);
* @param[in] monitor The monitor whose gamma ramp to set. * @param[in] monitor The monitor whose gamma ramp to set.
* @param[in] gamma The desired exponent. * @param[in] gamma The desired exponent.
* *
* @ingroup gamma * @ingroup monitor
*/ */
GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma); GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);
@ -1138,7 +1139,7 @@ GLFWAPI void glfwSetGamma(GLFWmonitor* monitor, float gamma);
* @note The value arrays of the returned ramp are allocated and freed by GLFW. * @note The value arrays of the returned ramp are allocated and freed by GLFW.
* You should not free them yourself. * You should not free them yourself.
* *
* @ingroup gamma * @ingroup monitor
*/ */
GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor); GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
@ -1151,7 +1152,7 @@ GLFWAPI const GLFWgammaramp* glfwGetGammaRamp(GLFWmonitor* monitor);
* *
* @note Gamma ramp sizes other than 256 are not supported by all hardware. * @note Gamma ramp sizes other than 256 are not supported by all hardware.
* *
* @ingroup gamma * @ingroup monitor
*/ */
GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp); GLFWAPI void glfwSetGammaRamp(GLFWmonitor* monitor, const GLFWgammaramp* ramp);

View File

@ -41,7 +41,7 @@ extern "C" {
/*! @defgroup native Native access /*! @defgroup native Native access
* *
* **By using the native API, you assert that you know what you are doing and * **By using the native API, you assert that you know what you're doing and
* how to fix problems caused by using it. If you don't, you shouldn't be * how to fix problems caused by using it. If you don't, you shouldn't be
* using it.** * using it.**
* *