C++ wrapper for a GLFW monitor.
More...
#include <Glfwx/Monitor.h>
C++ wrapper for a GLFW monitor.
- See also
- GLFWmonitor
- Warning
- This implementation is provisional. Everything will probably be different once I figure out how it should really be implemented
◆ VideoMode
Video mode information.
- See also
- GLFWvidmode
◆ Monitor()
Glfwx::Monitor::Monitor |
( |
GLFWmonitor * |
m | ) |
|
|
explicit |
◆ context()
void* Glfwx::Monitor::context |
( |
| ) |
const |
Returns the user-defined context.
- See also
- glfwGetMonitorUserPointer
◆ enumerate()
static std::vector<Monitor> Glfwx::Monitor::enumerate |
( |
| ) |
|
|
static |
Returns a list of copies of the available monitors.
- Returns
- List of copies of the available monitors
- See also
- glfwGetMonitors
◆ enumerateVideoModes()
std::vector<VideoMode> Glfwx::Monitor::enumerateVideoModes |
( |
| ) |
const |
Returns the available video modes for the monitor.
- Returns
- List of available video modes
- See also
- glfwGetVideoModes
◆ gammaRamp()
GammaRamp Glfwx::Monitor::gammaRamp |
( |
| ) |
const |
Returns the current gamma ramp for the monitor.
- Returns
- The current gamma ramp
- See also
- glfwGetGammaRamp
◆ name()
std::string Glfwx::Monitor::name |
( |
| ) |
const |
Returns the name of the monitor.
- Returns
- The name of the monitor
- See also
- glfwGetMonitorName
◆ position()
void Glfwx::Monitor::position |
( |
int * |
x, |
|
|
int * |
y |
|
) |
| const |
Returns the position of the monitor's viewport on the virtual screen.
- Parameters
-
x | Where to store the monitor x-coordinate, or nullptr |
y | Where to store the monitor y-coordinate, or nullptr |
- See also
- glfwGetMonitorPos
◆ primary()
static Monitor Glfwx::Monitor::primary |
( |
| ) |
|
|
static |
Returns a copy of the primary monitor.
- Returns
- A copy of the primary monitor
- See also
- glfwGetPrimaryMonitor
◆ scale()
void Glfwx::Monitor::scale |
( |
float * |
x, |
|
|
float * |
y |
|
) |
| const |
Returns the content scale for the monitor.
- Parameters
-
x | Where to store the x-axis content scale, or nullptr |
y | Where to store the y-axis content scale, or nullptr |
- See also
- glfwGetMonitorContentScale
◆ setConnectionChangedCallback()
static void Glfwx::Monitor::setConnectionChangedCallback |
( |
std::function< void(Monitor const &, bool)> const & |
cb | ) |
|
|
static |
Sets the function to be called when the connection status of a monitor has changed.
- Parameters
-
- See also
- glfwSetMonitorCallback
◆ setContext()
void Glfwx::Monitor::setContext |
( |
void * |
context | ) |
|
Sets the user-defined context.
- Parameters
-
context | User-defined context |
- See also
- glfwSetMonitorUserPointer
◆ setGamma()
void Glfwx::Monitor::setGamma |
( |
float |
gamma | ) |
|
Generates a gamma ramp and sets it for the monitor.
- Parameters
-
gamma | The desired exponent. |
- See also
- glfwSetGamma
◆ setGammaRamp()
void Glfwx::Monitor::setGammaRamp |
( |
GammaRamp const & |
ramp | ) |
|
Sets the current gamma ramp for the monitor.
- Parameters
-
ramp | The gamma ramp to use. |
- See also
- glfwSetGammaRamp
◆ size()
void Glfwx::Monitor::size |
( |
int * |
width, |
|
|
int * |
height |
|
) |
| const |
Returns the physical size of the monitor.
- Parameters
-
width | Where to store the width, in millimetres, of the monitor's display area, or nullptr |
height | Where to store the height, in millimetres, of the monitor's display area, or nullptr |
- See also
- glfwGetMonitorPhysicalSize
◆ videoMode()
VideoMode Glfwx::Monitor::videoMode |
( |
| ) |
const |
Returns the current mode of the monitor.
- Returns
- The current mode of the monitor
- See also
- glfwGetVideoMode
◆ workArea()
void Glfwx::Monitor::workArea |
( |
int * |
x, |
|
|
int * |
y, |
|
|
int * |
width, |
|
|
int * |
height |
|
) |
| const |
Returns the work area of the monitor.
- Parameters
-
x | Where to store the monitor x-coordinate, or nullptr |
y | Where to store the monitor y-coordinate, or nullptr |
width | Where to store the monitor width, or nullptr |
height | Where to store the monitor height, or nullptr |
- See also
- glfwGetMonitorWorkarea