GLFW
3.0.1
A multi-platform library for OpenGL, window and input
|
Data Structures | |
struct | GLFWvidmode |
Video mode type. More... | |
Typedefs | |
typedef struct GLFWmonitor | GLFWmonitor |
typedef void(* | GLFWmonitorfun )(GLFWmonitor *, int) |
The function signature for monitor configuration callbacks. More... | |
Functions | |
GLFWmonitor ** | glfwGetMonitors (int *count) |
Returns the currently connected monitors. More... | |
GLFWmonitor * | glfwGetPrimaryMonitor (void) |
Returns the primary monitor. More... | |
void | glfwGetMonitorPos (GLFWmonitor *monitor, int *xpos, int *ypos) |
Returns the position of the monitor's viewport on the virtual screen. More... | |
void | glfwGetMonitorPhysicalSize (GLFWmonitor *monitor, int *width, int *height) |
Returns the physical size of the monitor. More... | |
const char * | glfwGetMonitorName (GLFWmonitor *monitor) |
Returns the name of the specified monitor. More... | |
GLFWmonitorfun | glfwSetMonitorCallback (GLFWmonitorfun cbfun) |
Sets the monitor configuration callback. More... | |
const GLFWvidmode * | glfwGetVideoModes (GLFWmonitor *monitor, int *count) |
Returns the available video modes for the specified monitor. More... | |
const GLFWvidmode * | glfwGetVideoMode (GLFWmonitor *monitor) |
Returns the current mode of the specified monitor. More... | |
typedef struct GLFWmonitor GLFWmonitor |
Opaque monitor object.
typedef void(* GLFWmonitorfun)(GLFWmonitor *, int) |
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 . |
const char* glfwGetMonitorName | ( | GLFWmonitor * | monitor | ) |
This function returns a human-readable name, encoded as UTF-8, of the specified monitor.
[in] | monitor | The monitor to query. |
NULL
if an error occurred.void glfwGetMonitorPhysicalSize | ( | GLFWmonitor * | monitor, |
int * | width, | ||
int * | height | ||
) |
This function returns the size, in millimetres, of the display area of the specified monitor.
[in] | monitor | The monitor to query. |
[out] | width | Where to store the width, in mm, of the monitor's display area, or NULL . |
[out] | height | Where to store the height, in mm, of the monitor's display area, or NULL . |
void glfwGetMonitorPos | ( | GLFWmonitor * | monitor, |
int * | xpos, | ||
int * | ypos | ||
) |
This function returns the position, in screen coordinates, of the upper-left corner of the specified monitor.
[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 . |
GLFWmonitor** glfwGetMonitors | ( | int * | count | ) |
This function returns an array of handles for all currently connected monitors.
[out] | count | Where to store the size of the returned array. This is set to zero if an error occurred. |
NULL
if an error occurred.GLFWmonitor* glfwGetPrimaryMonitor | ( | void | ) |
This function returns the primary monitor. This is usually the monitor where elements like the Windows task bar or the OS X menu bar is located.
NULL
if an error occurred.const GLFWvidmode* glfwGetVideoMode | ( | GLFWmonitor * | monitor | ) |
This function returns the current video mode of the specified monitor. If you are using a full screen window, the return value will therefore depend on whether it is focused.
[in] | monitor | The monitor to query. |
NULL
if an error occurred.const GLFWvidmode* glfwGetVideoModes | ( | GLFWmonitor * | monitor, |
int * | count | ||
) |
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.GLFWmonitorfun glfwSetMonitorCallback | ( | GLFWmonitorfun | cbfun | ) |
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 an error occurred.