rolmodl
C++ API for the Simple Directmedia Library 2 (SDL2)
|
Unsafe display information functions. More...
Functions | |
Display | byIndex (unsigned int i) |
Get display information for the i th display. Unsafe because there is no bounds checking on the index. | |
unsigned int | count () |
Get the number of displays. Unsafe because the return value is unreliable and may lead to out-of-bounds errors if its cached and used for loop iteration. More... | |
const char * | name (const unsigned int i) |
Get the name of the i th display. Sample output: XF250Q for my Acer XF250Q. Unsafe because there is no bounds checking on the index. More... | |
geom::RectWH | bounds (const unsigned int i) |
Get the resolution of the i th display. Unsafe because there is no bounds checking on the index. More... | |
geom::RectWH | usableBounds (const unsigned int i) |
Get the bounds of the usable space of the i th display. Excludes system decorations such as the menu bar and the dock. Unsafe because there is no bounds checking on the index. More... | |
Unsafe display information functions.
unsigned int rolmodl::sys::display::unsafe::count | ( | ) |
Get the number of displays. Unsafe because the return value is unreliable and may lead to out-of-bounds errors if its cached and used for loop iteration.
Definition at line 214 of file Base.cpp.
Referenced by bounds(), rolmodl::sys::display::mode::unsafe::closestForDisplayN(), rolmodl::sys::display::mode::unsafe::countForDisplayN(), rolmodl::sys::display::mode::unsafe::currentForDisplayN(), rolmodl::sys::display::mode::unsafe::desktopForDisplayN(), rolmodl::sys::display::mode::unsafe::forDisplayNByIndexI(), name(), and usableBounds().
const char * rolmodl::sys::display::unsafe::name | ( | const unsigned int | i | ) |
Get the name of the i
th display. Sample output: XF250Q
for my Acer XF250Q. Unsafe because there is no bounds checking on the index.
In addition to being marked unsafe, the use of this function is further discouraged. Display information should only be acquired all together as a snapshot as done by rolmodl::sys::Display.
Definition at line 221 of file Base.cpp.
References count().
geom::RectWH rolmodl::sys::display::unsafe::bounds | ( | const unsigned int | i | ) |
Get the resolution of the i
th display. Unsafe because there is no bounds checking on the index.
In addition to being marked unsafe, the use of this function is further discouraged. Display information should only be acquired all together as a snapshot as done by rolmodl::sys::Display.
Definition at line 227 of file Base.cpp.
References count(), and rolmodl::detail::throwOnErr().
geom::RectWH rolmodl::sys::display::unsafe::usableBounds | ( | const unsigned int | i | ) |
Get the bounds of the usable space of the i
th display. Excludes system decorations such as the menu bar and the dock. Unsafe because there is no bounds checking on the index.
In addition to being marked unsafe, the use of this function is further discouraged. Display information should only be acquired all together as a snapshot as done by rolmodl::sys::Display.
Definition at line 236 of file Base.cpp.
References count(), and rolmodl::detail::throwOnErr().