SDL3pp
A slim C++ wrapper for SDL3
Toggle main menu visibility
Loading...
Searching...
No Matches
SDL3pp
SDL3pp_power.h
1
#ifndef SDL3PP_POWER_H_
2
#define SDL3PP_POWER_H_
3
4
#include <SDL3/SDL_power.h>
5
#include "SDL3pp_stdinc.h"
6
7
namespace
SDL
{
8
25
30
38
using
PowerState
= SDL_PowerState;
39
40
constexpr
PowerState
POWERSTATE_ERROR
=
41
SDL_POWERSTATE_ERROR;
42
43
constexpr
PowerState
POWERSTATE_UNKNOWN
=
44
SDL_POWERSTATE_UNKNOWN;
45
46
constexpr
PowerState
POWERSTATE_ON_BATTERY
=
47
SDL_POWERSTATE_ON_BATTERY;
48
49
constexpr
PowerState
POWERSTATE_NO_BATTERY
=
50
SDL_POWERSTATE_NO_BATTERY;
51
52
constexpr
PowerState
POWERSTATE_CHARGING
=
53
SDL_POWERSTATE_CHARGING;
54
55
constexpr
PowerState
POWERSTATE_CHARGED
=
56
SDL_POWERSTATE_CHARGED;
57
59
94
inline
PowerState
GetPowerInfo
(
int
* seconds,
int
* percent)
95
{
96
return
SDL_GetPowerInfo(seconds, percent);
97
}
98
100
101
}
// namespace SDL
102
103
#endif
/* SDL3PP_POWER_H_ */
SDL::POWERSTATE_ON_BATTERY
constexpr PowerState POWERSTATE_ON_BATTERY
Not plugged in, running on the battery.
Definition
SDL3pp_power.h:46
SDL::POWERSTATE_UNKNOWN
constexpr PowerState POWERSTATE_UNKNOWN
cannot determine power status
Definition
SDL3pp_power.h:43
SDL::GetPowerInfo
PowerState GetPowerInfo(int *seconds, int *percent)
Get the current power supply details.
Definition
SDL3pp_power.h:94
SDL::POWERSTATE_CHARGING
constexpr PowerState POWERSTATE_CHARGING
Plugged in, charging battery.
Definition
SDL3pp_power.h:52
SDL::POWERSTATE_NO_BATTERY
constexpr PowerState POWERSTATE_NO_BATTERY
Plugged in, no battery available.
Definition
SDL3pp_power.h:49
SDL::POWERSTATE_ERROR
constexpr PowerState POWERSTATE_ERROR
error determining power status
Definition
SDL3pp_power.h:40
SDL::PowerState
SDL_PowerState PowerState
The basic state for the system's power supply.
Definition
SDL3pp_power.h:38
SDL::POWERSTATE_CHARGED
constexpr PowerState POWERSTATE_CHARGED
Plugged in, battery charged.
Definition
SDL3pp_power.h:55
SDL
Main include header for the SDL3pp library.
Generated by
1.17.0