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

System power status snapshot. More...

#include <Base.hpp>

Public Member Functions

 Status () noexcept
 Initialize from the current system power status.
 
State state () const noexcept
 Get the recorded battery status/power state.
 
std::optional< int > time () const noexcept
 Get the recorded estimated remaining battery charge life time.
 
std::optional< int > percentage () const noexcept
 Get the recorded remaining battery charge percentage.
 

Detailed Description

System power status snapshot.

Todo:
: explain why a snapshot is used instead of separate functions
See also
https://wiki.libsdl.org/SDL_GetPowerInfo

Definition at line 151 of file Base.hpp.


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