Display interface to query the attributes of all connected displays/monitors.
More...
#include <Display.h>
|
| virtual bool | IsPrimary () const =0 |
| | Returns true if this is the primary display, as configured by the host system.
|
| virtual UTF8String | GetDeviceName () const =0 |
| | Returns the device name of this display in UTF-8 encoding. This may also be empty, if the platform does not support display names.
|
| virtual Offset2D | GetOffset () const =0 |
| | Returns the 2D offset relative to the primary display.
|
| virtual float | GetScale () const =0 |
| | Returns the scale factor for this display.
|
| virtual bool | ResetDisplayMode ()=0 |
| | Resets the display mode to its default value depending on the host system configuration.
|
| virtual bool | SetDisplayMode (const DisplayMode &displayMode)=0 |
| | Sets the new display mode for this display.
|
| virtual DisplayMode | GetDisplayMode () const =0 |
| | Returns the current display mode of this display.
|
| virtual std::vector< DisplayMode > | GetSupportedDisplayModes () const =0 |
| | Returns a list of all modes that are supported by this display.
|
| virtual bool | IsInstanceOf (int id) const |
| | Returns true if this object is an instance of the specified interface.
|
| | NonCopyable (const NonCopyable &)=delete |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| virtual | ~NonCopyable ()=default |
|
| static std::size_t | Count () |
| | Returns the number of available displays.
|
| static Display *const * | GetList () |
| | Returns a null-terminated array of all displays.
|
| static Display * | Get (std::size_t index) |
| | Returns the specified display or null if the index is out of bounds.
|
| static Display * | GetPrimary () |
| | Returns the primary display or null if no display can be found.
|
| static bool | ShowCursor (bool show) |
| | Shows or hides the cursor for the running application from all displays.
|
| static bool | IsCursorShown () |
| | Returns true if the cursor is currently being shown on any display.
|
| static bool | SetCursorPosition (const Offset2D &position) |
| | Sets the cursor to the specified screen coordinate and returns true on success. Otherwise, cursor relocation is not supported.
|
| static Offset2D | GetCursorPosition () |
| | Returns the screen coordinate of the cursor.
|
|
| static void | FinalizeDisplayModes (std::vector< DisplayMode > &displayMode) |
| | Sorts the specified list of display modes as described in the GetSupportedDisplayModes function, and removes duplicate entries.
|
Display interface to query the attributes of all connected displays/monitors.
◆ Count()
| std::size_t LLGL::Display::Count |
( |
| ) |
|
|
static |
Returns the number of available displays.
- See also
- Get
◆ FinalizeDisplayModes()
| void LLGL::Display::FinalizeDisplayModes |
( |
std::vector< DisplayMode > & | displayMode | ) |
|
|
staticprotected |
Sorts the specified list of display modes as described in the GetSupportedDisplayModes function, and removes duplicate entries.
- See also
- GetSupportedDisplayModes
◆ Get()
| Display * LLGL::Display::Get |
( |
std::size_t | index | ) |
|
|
static |
Returns the specified display or null if the index is out of bounds.
- Parameters
-
| [in] | index | Specifies the zero-based index for the display to be returned. This should be in the half-open range [0, Count) or null will be returned. |
- See also
- Count
-
GetPrimary
◆ GetCursorPosition()
| Offset2D LLGL::Display::GetCursorPosition |
( |
| ) |
|
|
static |
Returns the screen coordinate of the cursor.
◆ GetDeviceName()
| virtual UTF8String LLGL::Display::GetDeviceName |
( |
| ) |
const |
|
pure virtual |
Returns the device name of this display in UTF-8 encoding. This may also be empty, if the platform does not support display names.
◆ GetDisplayMode()
| virtual DisplayMode LLGL::Display::GetDisplayMode |
( |
| ) |
const |
|
pure virtual |
Returns the current display mode of this display.
- See also
- SetDisplayMode
◆ GetList()
| Display *const * LLGL::Display::GetList |
( |
| ) |
|
|
static |
Returns a null-terminated array of all displays.
- Returns
- Pointer to an array of Display pointers with Count()+1 elements and the last element being null.
- See also
- Count
◆ GetOffset()
| virtual Offset2D LLGL::Display::GetOffset |
( |
| ) |
const |
|
pure virtual |
◆ GetPrimary()
| Display * LLGL::Display::GetPrimary |
( |
| ) |
|
|
static |
Returns the primary display or null if no display can be found.
- See also
- Get
◆ GetScale()
| virtual float LLGL::Display::GetScale |
( |
| ) |
const |
|
pure virtual |
◆ GetSupportedDisplayModes()
| virtual std::vector< DisplayMode > LLGL::Display::GetSupportedDisplayModes |
( |
| ) |
const |
|
pure virtual |
Returns a list of all modes that are supported by this display.
- See also
- GetDisplayMode
◆ IsCursorShown()
| bool LLGL::Display::IsCursorShown |
( |
| ) |
|
|
static |
Returns true if the cursor is currently being shown on any display.
- See also
- ShowCursor
◆ IsPrimary()
| virtual bool LLGL::Display::IsPrimary |
( |
| ) |
const |
|
pure virtual |
Returns true if this is the primary display, as configured by the host system.
◆ ResetDisplayMode()
| virtual bool LLGL::Display::ResetDisplayMode |
( |
| ) |
|
|
pure virtual |
Resets the display mode to its default value depending on the host system configuration.
- See also
- SetDisplayMode
◆ SetCursorPosition()
| bool LLGL::Display::SetCursorPosition |
( |
const Offset2D & | position | ) |
|
|
static |
Sets the cursor to the specified screen coordinate and returns true on success. Otherwise, cursor relocation is not supported.
◆ SetDisplayMode()
| virtual bool LLGL::Display::SetDisplayMode |
( |
const DisplayMode & | displayMode | ) |
|
|
pure virtual |
Sets the new display mode for this display.
- Parameters
-
| [in] | displayMode | Specifies the new display mode. |
- Returns
- True on success, otherwise the specified display mode is not supported by this display and the function has no effect.
- See also
- GetDisplayMode
◆ ShowCursor()
| bool LLGL::Display::ShowCursor |
( |
bool | show | ) |
|
|
static |
Shows or hides the cursor for the running application from all displays.
- Parameters
-
| [in] | show | Specifies whether to show or hide the cursor. |
- Returns
- True on success, otherwise cursor visibility changes are not supported.
- See also
- IsCursorShown
The documentation for this class was generated from the following file: