21 #include "../SDL_internal.h" 33 #ifndef SDL_POWER_DISABLED 34 #ifdef SDL_POWER_HARDWIRED 49 #ifndef SDL_POWER_DISABLED 50 #ifdef SDL_POWER_LINUX 56 #ifdef SDL_POWER_WINDOWS 59 #ifdef SDL_POWER_UIKIT 62 #ifdef SDL_POWER_MACOSX 65 #ifdef SDL_POWER_HAIKU 68 #ifdef SDL_POWER_ANDROID 74 #ifdef SDL_POWER_WINRT 77 #ifdef SDL_POWER_EMSCRIPTEN 81 #ifdef SDL_POWER_HARDWIRED 91 int _seconds, _percent;
96 if (seconds ==
NULL) {
100 if (percent ==
NULL) {
104 for (i = 0; i < total; i++) {
105 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_Hardwired(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 *)