SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
SDL::Display Class Reference

This is a unique ID for a display for the time it is connected to the system, and is never reused for the lifetime of the application. More...

Public Member Functions

constexpr Display (DisplayID displayID={})
 Wraps Display. More...
 
constexpr operator DisplayID () const
 Unwraps to the underlying Display. More...
 
PropertiesRef GetProperties () const
 Get the properties associated with a display. More...
 
const char * GetName () const
 Get the name of a display in UTF-8 encoding. More...
 
Rect GetBounds () const
 Get the desktop area represented by a display. More...
 
Rect GetUsableBounds () const
 Get the usable desktop area represented by a display, in screen coordinates. More...
 
DisplayOrientation GetNaturalOrientation () const
 Get the orientation of a display when it is unrotated. More...
 
DisplayOrientation GetCurrentOrientation () const
 Get the orientation of a display. More...
 
float GetContentScale () const
 Get the content scale of a display. More...
 
OwnArray< DisplayMode * > GetFullscreenModes () const
 Get a list of fullscreen display modes available on a display. More...
 
DisplayMode GetClosestFullscreenMode (const PointRaw &size, float refresh_rate, bool include_high_density_modes) const
 Get the closest match to the requested display mode. More...
 
const DisplayModeGetDesktopMode () const
 Get information about the desktop's display mode. More...
 
const DisplayModeGetCurrentMode () const
 Get information about the current display mode. More...
 

Static Public Member Functions

static OwnArray< DisplayIDGetAll ()
 Get a list of currently connected displays. More...
 
static Display GetPrimary ()
 Return the primary display. More...
 
static Display GetForPoint (const PointRaw &point)
 Get the display containing a point. More...
 
static Display GetForRect (const RectRaw &rect)
 Get the display primarily containing a rect. More...
 

Detailed Description

If the display is disconnected and reconnected, it will get a new ID.

The value 0 is an invalid ID.

Since
This datatype is available since SDL 3.2.0.

Constructor & Destructor Documentation

◆ Display()

constexpr SDL::Display::Display ( DisplayID  displayID = {})
inlineconstexpr
Parameters
displayIDthe value to be wrapped

Member Function Documentation

◆ operator DisplayID()

constexpr SDL::Display::operator DisplayID ( ) const
inlineconstexpr
Returns
the underlying DisplayID.

The documentation for this class was generated from the following file: