21 #include "../SDL_internal.h" 33 #ifndef SDL_POWER_DISABLED 34 #ifdef SDL_POWER_HARDWIRED 37 SDL_GetPowerInfo_Hardwired(
SDL_PowerState * state,
int *seconds,
int *percent)
47 #ifdef SDL_POWER_LINUX 53 #ifdef SDL_POWER_WINDOWS 56 #ifdef SDL_POWER_UIKIT 59 #ifdef SDL_POWER_MACOSX 62 #ifdef SDL_POWER_HAIKU 65 #ifdef SDL_POWER_ANDROID 71 #ifdef SDL_POWER_WINRT 74 #ifdef SDL_POWER_EMSCRIPTEN 78 #ifdef SDL_POWER_HARDWIRED 79 SDL_GetPowerInfo_Hardwired,
87 #ifndef SDL_POWER_DISABLED 93 int _seconds, _percent;
95 if (seconds ==
NULL) {
98 if (percent ==
NULL) {
102 #ifndef SDL_POWER_DISABLED 103 for (i = 0; i < total; i++) {
104 if (implementations[i](&retval, seconds, percent)) {
SDL_bool SDL_GetPowerInfo_WinRT(SDL_PowerState *, int *, int *)
SDL_bool SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *, int *, int *)
SDL_bool SDL_GetPowerInfo_PSP(SDL_PowerState *, int *, int *)
SDL_bool SDL_GetPowerInfo_Linux_org_freedesktop_upower(SDL_PowerState *, int *, int *)
SDL_bool SDL_GetPowerInfo_Emscripten(SDL_PowerState *, int *, int *)
SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState *, int *, int *)
static SDL_GetPowerInfo_Impl implementations[]
SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState *, int *, int *)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
SDL_bool SDL_GetPowerInfo_Haiku(SDL_PowerState *, int *, int *)
SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *, int *, int *)
SDL_PowerState
The basic state for the system's power supply.
SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *, int *, int *)
SDL_bool(* SDL_GetPowerInfo_Impl)(SDL_PowerState *state, int *seconds, int *percent)
SDL_PowerState SDL_GetPowerInfo(int *seconds, int *percent)
Get the current power supply details.
SDL_bool SDL_GetPowerInfo_Android(SDL_PowerState *, int *, int *)
SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *, int *, int *)