rolmodl
C++ API for the Simple Directmedia Library 2 (SDL2)
Public Member Functions | Friends | List of all members
rolmodl::sys::Display Struct Reference

Display information snapshot. More...

#include <Base.hpp>

Public Member Functions

const char * name () const noexcept
 Get recorded display name. More...
 
geom::RectWH bounds () const noexcept
 Get recorded display resolution. More...
 
geom::RectWH usableBounds () const noexcept
 Get recorded display usable bounds. Excludes system decorations such as the menu bar and the dock. More...
 
float ddpi () const noexcept
 Get recorded display diagonal DPI (dots per inch). More...
 
float hdpi () const noexcept
 Get recorded display horizontal DPI (dots per inch). More...
 
float vdpi () const noexcept
 Get recorded display vertical DPI (dots per inch). More...
 

Friends

Display display::unsafe::byIndex (unsigned int i)
 rolmodl::sys::display::unsafe::byIndex()
 

Detailed Description

Display information snapshot.

Todo:
: explain why a snapshot is used instead of separate functions
See also
rolmodl::sys:display::unsafe::name
rolmodl::sys:display::unsafe::bounds
rolmodl::sys:display::unsafe::usableBounds

Definition at line 258 of file Base.hpp.

Member Function Documentation

◆ name()

const char * rolmodl::sys::Display::name ( ) const
noexcept

Get recorded display name.

See also
rolmodl::sys:display::unsafe::name

Definition at line 261 of file Base.cpp.

◆ bounds()

geom::RectWH rolmodl::sys::Display::bounds ( ) const
noexcept

Get recorded display resolution.

See also
rolmodl::sys:display::unsafe::bounds

Definition at line 265 of file Base.cpp.

◆ usableBounds()

geom::RectWH rolmodl::sys::Display::usableBounds ( ) const
noexcept

Get recorded display usable bounds. Excludes system decorations such as the menu bar and the dock.

See also
rolmodl::sys:display::unsafe::usableBounds

Definition at line 268 of file Base.cpp.

◆ ddpi()

float rolmodl::sys::Display::ddpi ( ) const
noexcept

Get recorded display diagonal DPI (dots per inch).

See also
https://wiki.libsdl.org/SDL_GetDisplayDPI

Definition at line 272 of file Base.cpp.

◆ hdpi()

float rolmodl::sys::Display::hdpi ( ) const
noexcept

Get recorded display horizontal DPI (dots per inch).

See also
https://wiki.libsdl.org/SDL_GetDisplayDPI

Definition at line 275 of file Base.cpp.

◆ vdpi()

float rolmodl::sys::Display::vdpi ( ) const
noexcept

Get recorded display vertical DPI (dots per inch).

See also
https://wiki.libsdl.org/SDL_GetDisplayDPI

Definition at line 278 of file Base.cpp.


The documentation for this struct was generated from the following files: