Classes | |
struct | GLFWgammaramp |
Gamma ramp. More... | |
struct | GLFWvidmode |
Video mode type. More... | |
Typedefs | |
typedef struct GLFWgammaramp | GLFWgammaramp |
Gamma ramp. More... | |
typedef struct GLFWmonitor | GLFWmonitor |
Opaque monitor object. More... | |
typedef void(* | GLFWmonitorfun) (GLFWmonitor *, int) |
The function signature for monitor configuration callbacks. More... | |
typedef struct GLFWvidmode | GLFWvidmode |
Video mode type. More... | |
Functions | |
GLFWAPI const GLFWgammaramp * | glfwGetGammaRamp (GLFWmonitor *monitor) |
Returns the current gamma ramp for the specified monitor. More... | |
GLFWAPI const char * | glfwGetMonitorName (GLFWmonitor *monitor) |
Returns the name of the specified monitor. More... | |
GLFWAPI void | glfwGetMonitorPhysicalSize (GLFWmonitor *monitor, int *widthMM, int *heightMM) |
Returns the physical size of the monitor. More... | |
GLFWAPI void | glfwGetMonitorPos (GLFWmonitor *monitor, int *xpos, int *ypos) |
Returns the position of the monitor's viewport on the virtual screen. More... | |
GLFWAPI GLFWmonitor ** | glfwGetMonitors (int *count) |
Returns the currently connected monitors. More... | |
GLFWAPI GLFWmonitor * | glfwGetPrimaryMonitor (void) |
Returns the primary monitor. More... | |
GLFWAPI const GLFWvidmode * | glfwGetVideoMode (GLFWmonitor *monitor) |
Returns the current mode of the specified monitor. More... | |
GLFWAPI const GLFWvidmode * | glfwGetVideoModes (GLFWmonitor *monitor, int *count) |
Returns the available video modes for the specified monitor. More... | |
GLFWAPI void | glfwSetGamma (GLFWmonitor *monitor, float gamma) |
Generates a gamma ramp and sets it for the specified monitor. More... | |
GLFWAPI void | glfwSetGammaRamp (GLFWmonitor *monitor, const GLFWgammaramp *ramp) |
Sets the current gamma ramp for the specified monitor. More... | |
GLFWAPI GLFWmonitorfun | glfwSetMonitorCallback (GLFWmonitorfun cbfun) |
Sets the monitor configuration callback. More... | |
This is the reference documentation for monitor related functions and types. For more information, see the Monitor handling.
typedef struct GLFWgammaramp GLFWgammaramp |
typedef struct GLFWmonitor GLFWmonitor |
typedef void(* GLFWmonitorfun) (GLFWmonitor *, int) |
The function signature for monitor configuration callbacks.
This is the function signature for monitor configuration callback functions.
[in] | monitor | The monitor that was connected or disconnected. |
[in] | event | One of GLFW_CONNECTED or GLFW_DISCONNECTED . |
typedef struct GLFWvidmode GLFWvidmode |
Video mode type.
This describes a single video mode.
GLFWAPI const GLFWgammaramp* glfwGetGammaRamp | ( | GLFWmonitor * | monitor | ) |
Returns the current gamma ramp for the specified monitor.
This function returns the current gamma ramp of the specified monitor.
[in] | monitor | The monitor to query. |
NULL
if an error occurred.GLFWAPI const char* glfwGetMonitorName | ( | GLFWmonitor * | monitor | ) |
Returns the name of the specified monitor.
This function returns a human-readable name, encoded as UTF-8, of the specified monitor. The name typically reflects the make and model of the monitor and is not guaranteed to be unique among the connected monitors.
[in] | monitor | The monitor to query. |
NULL
if an error occurred.GLFWAPI void glfwGetMonitorPhysicalSize | ( | GLFWmonitor * | monitor, |
int * | widthMM, | ||
int * | heightMM | ||
) |
Returns the physical size of the monitor.
This function returns the size, in millimetres, of the display area of the specified monitor.
Some systems do not provide accurate monitor size information, either because the monitor EDID data is incorrect or because the driver does not report it accurately.
Any or all of the size arguments may be NULL
. If an error occurs, all non-NULL
size arguments will be set to zero.
[in] | monitor | The monitor to query. |
[out] | widthMM | Where to store the width, in millimetres, of the monitor's display area, or NULL . |
[out] | heightMM | Where to store the height, in millimetres, of the monitor's display area, or NULL . |
GLFWAPI void glfwGetMonitorPos | ( | GLFWmonitor * | monitor, |
int * | xpos, | ||
int * | ypos | ||
) |
Returns the position of the monitor's viewport on the virtual screen.
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.
[in] | monitor | The monitor to query. |
[out] | xpos | Where to store the monitor x-coordinate, or NULL . |
[out] | ypos | Where to store the monitor y-coordinate, or NULL . |
GLFWAPI GLFWmonitor** glfwGetMonitors | ( | int * | count | ) |
Returns the currently connected monitors.
This function returns an array of handles for all currently connected monitors. The primary monitor is always first in the returned array. If no monitors were found, this function returns NULL
.
[out] | count | Where to store the number of monitors in the returned array. This is set to zero if an error occurred. |
NULL
if no monitors were found or if an error occurred.GLFWAPI GLFWmonitor* glfwGetPrimaryMonitor | ( | void | ) |
Returns the primary monitor.
This function returns the primary monitor. This is usually the monitor where elements like the task bar or global menu bar are located.
NULL
if no monitors were found or if an error occurred.GLFWAPI const GLFWvidmode* glfwGetVideoMode | ( | GLFWmonitor * | monitor | ) |
Returns the current mode of the specified monitor.
This function returns the current video mode of the specified monitor. If you have created a full screen window for that monitor, the return value will depend on whether that window is iconified.
[in] | monitor | The monitor to query. |
NULL
if an error occurred.glfwGetDesktopMode
. GLFWAPI const GLFWvidmode* glfwGetVideoModes | ( | GLFWmonitor * | monitor, |
int * | count | ||
) |
Returns the available video modes for the specified monitor.
This function returns an array of all video modes supported by the specified monitor. The returned array is sorted in ascending order, first by color bit depth (the sum of all channel depths) and then by resolution area (the product of width and height).
[in] | monitor | The monitor to query. |
[out] | count | Where to store the number of video modes in the returned array. This is set to zero if an error occurred. |
NULL
if an error occurred.GLFWAPI void glfwSetGamma | ( | GLFWmonitor * | monitor, |
float | gamma | ||
) |
Generates a gamma ramp and sets it for the specified monitor.
This function generates a 256-element gamma ramp from the specified exponent and then calls glfwSetGammaRamp with it. The value must be a finite number greater than zero.
[in] | monitor | The monitor whose gamma ramp to set. |
[in] | gamma | The desired exponent. |
GLFWAPI void glfwSetGammaRamp | ( | GLFWmonitor * | monitor, |
const GLFWgammaramp * | ramp | ||
) |
Sets the current gamma ramp for the specified monitor.
This function sets the current gamma ramp for the specified monitor. The original gamma ramp for that monitor is saved by GLFW the first time this function is called and is restored by glfwTerminate.
[in] | monitor | The monitor whose gamma ramp to set. |
[in] | ramp | The gamma ramp to use. |
GLFWAPI GLFWmonitorfun glfwSetMonitorCallback | ( | GLFWmonitorfun | cbfun | ) |
Sets the monitor configuration callback.
This function sets the monitor configuration callback, or removes the currently set callback. This is called when a monitor is connected to or disconnected from the system.
[in] | cbfun | The new callback, or NULL to remove the currently set callback. |
NULL
if no callback was set or the library had not been initialized.