Information about a display on the host system.
More...
#include <GREM/graphics/Display.hpp>
|
| static DisplayRange | getAll () |
| | Get a list of all available displays.
|
| static Display | getPrimary () |
| | Get the current primary display.
|
| static Optional< Display > | findByID (uint32_t id) |
| | Get the display with a specific identifier.
|
Information about a display on the host system.
◆ Orientation
| Enumerator |
|---|
| UNKNOWN | Unknown display orientation.
|
| LANDSCAPE | Landscape mode, rotated counter-clockwise relative to portrait mode.
|
| LANDSCAPE_FLIPPED | Landscape mode, rotated clockwise relative to portrait mode.
|
| PORTRAIT | Portrait mode.
|
| PORTRAIT_FLIPPED | Portrait mode, upside down.
|
◆ getAll()
Get a list of all available displays.
- Returns
- a read-only range containing all currently available displays.
- Exceptions
-
◆ getPrimary()
| Display grem::graphics::Display::getPrimary |
( |
| ) |
|
|
staticnodiscard |
Get the current primary display.
- Returns
- information about the current primary display.
- Exceptions
-
◆ findByID()
| Optional< Display > grem::graphics::Display::findByID |
( |
uint32_t | id | ) |
|
|
staticnodiscard |
Get the display with a specific identifier.
- Parameters
-
| id | identifier to get the display of. |
- Returns
- the display with the given identifier, or an empty optional if no display with the given identifier exists.
◆ getName()
Get the manufacturer-specified name of the display.
- Returns
- a read-only view over a UTF-8-encoded string containing the name of the display.
- Exceptions
-
◆ getBounds()
| Region2D grem::graphics::Display::getBounds |
( |
| ) |
const |
|
nodiscard |
Get the bounds of the display region on the desktop.
- Returns
- a rectangle representing the display's position and size on the desktop.
- Exceptions
-
◆ getUsableBounds()
| Region2D grem::graphics::Display::getUsableBounds |
( |
| ) |
const |
|
nodiscard |
Get the bounds of the usable display region on the desktop, which may exclude areas reserved by the system.
- Returns
- a rectangle representing the display's usable position and size on the desktop.
- Exceptions
-
◆ getOrientation()
| Orientation grem::graphics::Display::getOrientation |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the current orientation of the display.
- Returns
- the orientation of the display, or Orientation::UNKNOWN if unavailable.
◆ getDisplayMode()
| DisplayMode grem::graphics::Display::getDisplayMode |
( |
| ) |
const |
|
nodiscard |
Get the current display mode of this display.
- Returns
- the current display mode of this display.
- Exceptions
-
◆ getContentScale()
| float grem::graphics::Display::getContentScale |
( |
| ) |
const |
|
nodiscard |
Get the expected scale for content based on the DPI settings of the display.
- Returns
- the content scale of this display.
- Exceptions
-
◆ getDesktopDisplayMode()
| DisplayMode grem::graphics::Display::getDesktopDisplayMode |
( |
| ) |
const |
|
nodiscard |
Get the display mode of the full desktop.
- Returns
- a display mode representing the full desktop for this display.
- Exceptions
-
◆ getAvailableFullscreenDisplayModes()
| DisplayModeRange grem::graphics::Display::getAvailableFullscreenDisplayModes |
( |
| ) |
const |
|
nodiscard |
Get a list of all available fulscreen display modes for this display.
- Returns
- a read-only range containing all available fullscreen display modes for this display.
- Exceptions
-
◆ getID()
| uint32_t grem::graphics::Display::getID |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the unique identifier of this display.
- Returns
- the identifier corresponding to this display.
The documentation for this class was generated from the following file: