Classes | Typedefs | Functions
Monitor handling

Classes

struct  GLFWgammaramp
 Gamma ramp. More...
struct  GLFWvidmode
 Video mode type. More...

Typedefs

typedef struct GLFWgammaramp GLFWgammaramp
 Gamma ramp.
typedef struct GLFWmonitor GLFWmonitor
typedef void(* GLFWmonitorfun )(GLFWmonitor *, int)
 The function signature for monitor configuration callbacks.
typedef struct GLFWvidmode GLFWvidmode
 Video mode type.

Functions

GLFWAPI const GLFWgammarampglfwGetGammaRamp (GLFWmonitor *monitor)
 Returns the current gamma ramp for the specified monitor.
GLFWAPI const char * glfwGetMonitorName (GLFWmonitor *monitor)
 Returns the name of the specified monitor.
GLFWAPI void glfwGetMonitorPhysicalSize (GLFWmonitor *monitor, int *widthMM, int *heightMM)
 Returns the physical size of the monitor.
GLFWAPI void glfwGetMonitorPos (GLFWmonitor *monitor, int *xpos, int *ypos)
 Returns the position of the monitor's viewport on the virtual screen.
GLFWAPI GLFWmonitor ** glfwGetMonitors (int *count)
 Returns the currently connected monitors.
GLFWAPI GLFWmonitorglfwGetPrimaryMonitor (void)
 Returns the primary monitor.
GLFWAPI const GLFWvidmodeglfwGetVideoMode (GLFWmonitor *monitor)
 Returns the current mode of the specified monitor.
GLFWAPI const GLFWvidmodeglfwGetVideoModes (GLFWmonitor *monitor, int *count)
 Returns the available video modes for the specified monitor.
GLFWAPI void glfwSetGamma (GLFWmonitor *monitor, float gamma)
 Generates a gamma ramp and sets it for the specified monitor.
GLFWAPI void glfwSetGammaRamp (GLFWmonitor *monitor, const GLFWgammaramp *ramp)
 Sets the current gamma ramp for the specified monitor.
GLFWAPI GLFWmonitorfun glfwSetMonitorCallback (GLFWmonitorfun cbfun)
 Sets the monitor configuration callback.

Detailed Description

This is the reference documentation for monitor related functions and types. For more information, see the Monitor handling.


Typedef Documentation

typedef struct GLFWgammaramp GLFWgammaramp

Gamma ramp.

This describes the gamma ramp for a monitor.

See also:
glfwGetGammaRamp glfwSetGammaRamp
typedef struct GLFWmonitor GLFWmonitor

Opaque monitor object.

Definition at line 714 of file glfw3.h.

The function signature for monitor configuration callbacks.

This is the function signature for monitor configuration callback functions.

Parameters:
[in]monitorThe monitor that was connected or disconnected.
[in]eventOne of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.
See also:
glfwSetMonitorCallback

Definition at line 975 of file glfw3.h.

typedef struct GLFWvidmode GLFWvidmode

Video mode type.

This describes a single video mode.


Function Documentation

Returns the current gamma ramp for the specified monitor.

This function returns the current gamma ramp of the specified monitor.

Parameters:
[in]monitorThe monitor to query.
Returns:
The current gamma ramp, or `NULL` if an [error](error_handling) occurred.
Pointer Lifetime
The returned structure and its arrays are allocated and freed by GLFW. You should not free them yourself. They are valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_gamma
Since:
Added in GLFW 3.0.

Definition at line 423 of file monitor.c.

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.

Parameters:
[in]monitorThe monitor to query.
Returns:
The UTF-8 encoded name of the monitor, or `NULL` if an [error](error_handling) occurred.
Pointer Lifetime
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_properties
Since:
Added in GLFW 3.0.

Definition at line 346 of file monitor.c.

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](https://en.wikipedia.org/wiki/Extended_display_identification_data) 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.

Parameters:
[in]monitorThe monitor to query.
[out]widthMMWhere to store the width, in millimetres, of the monitor's display area, or `NULL`.
[out]heightMMWhere to store the height, in millimetres, of the monitor's display area, or `NULL`.
Remarks:
__Windows:__ The OS calculates the returned physical size from the current resolution and system DPI instead of querying the monitor EDID data.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_properties
Since:
Added in GLFW 3.0.

Definition at line 329 of file monitor.c.

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.

Parameters:
[in]monitorThe monitor to query.
[out]xposWhere to store the monitor x-coordinate, or `NULL`.
[out]yposWhere to store the monitor y-coordinate, or `NULL`.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_properties
Since:
Added in GLFW 3.0.

Definition at line 315 of file monitor.c.

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`.

Parameters:
[out]countWhere to store the number of monitors in the returned array. This is set to zero if an error occurred.
Returns:
An array of monitor handles, or `NULL` if no monitors were found or if an [error](error_handling) occurred.
Pointer Lifetime
The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration changes or the library is terminated.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_monitors
monitor_event
glfwGetPrimaryMonitor
Since:
Added in GLFW 3.0.

Definition at line 295 of file monitor.c.

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.

Returns:
The primary monitor, or `NULL` if no monitors were found or if an [error](error_handling) occurred.
Thread Safety
This function may only be called from the main thread.
Remarks:
The primary monitor is always first in the array returned by glfwGetMonitors.
See also:
monitor_monitors
glfwGetMonitors
Since:
Added in GLFW 3.0.

Definition at line 305 of file monitor.c.

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.

Parameters:
[in]monitorThe monitor to query.
Returns:
The current mode of the monitor, or `NULL` if an [error](error_handling) occurred.
Pointer Lifetime
The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_modes
glfwGetVideoModes
Since:
Added in GLFW 3.0. Replaces `glfwGetDesktopMode`.

Definition at line 375 of file monitor.c.

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).

Parameters:
[in]monitorThe monitor to query.
[out]countWhere to store the number of video modes in the returned array. This is set to zero if an error occurred.
Returns:
An array of video modes, or `NULL` if an [error](error_handling) occurred.
Pointer Lifetime
The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_modes
glfwGetVideoMode
Since:
Added in GLFW 1.0.
__GLFW 3:__ Changed to return an array of modes for a specific monitor.

Definition at line 360 of file monitor.c.

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.

Parameters:
[in]monitorThe monitor whose gamma ramp to set.
[in]gammaThe desired exponent.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_gamma
Since:
Added in GLFW 3.0.

Definition at line 385 of file monitor.c.

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.

Parameters:
[in]monitorThe monitor whose gamma ramp to set.
[in]rampThe gamma ramp to use.
Remarks:
Gamma ramp sizes other than 256 are not supported by all platforms or graphics hardware.
__Windows:__ The gamma ramp size must be 256.
Pointer Lifetime
The specified gamma ramp is copied before this function returns.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_gamma
Since:
Added in GLFW 3.0.

Definition at line 435 of file monitor.c.

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.

Parameters:
[in]cbfunThe new callback, or `NULL` to remove the currently set callback.
Returns:
The previously set callback, or `NULL` if no callback was set or the library had not been [initialized](intro_init).
Bug:
__X11:__ This callback is not yet called on monitor configuration changes.
Thread Safety
This function may only be called from the main thread.
See also:
monitor_event
Since:
Added in GLFW 3.0.

Definition at line 353 of file monitor.c.



librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Tue Jun 25 2019 19:54:40