World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл SDL_power.h

См. исходные тексты.

Перечисления

enum  SDL_PowerState {
  SDL_POWERSTATE_UNKNOWN, SDL_POWERSTATE_ON_BATTERY, SDL_POWERSTATE_NO_BATTERY, SDL_POWERSTATE_CHARGING,
  SDL_POWERSTATE_CHARGED
}
 The basic state for the system's power supply. Подробнее...
 

Функции

DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo (int *secs, int *pct)
 Get the current power supply details. Подробнее...
 

Подробное описание

Header for the SDL power management routines.

См. определение в файле SDL_power.h

Перечисления

◆ SDL_PowerState

The basic state for the system's power supply.

Элементы перечислений
SDL_POWERSTATE_UNKNOWN 

cannot determine power status

SDL_POWERSTATE_ON_BATTERY 

Not plugged in, running on the battery

SDL_POWERSTATE_NO_BATTERY 

Plugged in, no battery available

SDL_POWERSTATE_CHARGING 

Plugged in, charging battery

SDL_POWERSTATE_CHARGED 

Plugged in, battery charged

См. определение в файле SDL_power.h строка 42

Функции

◆ SDL_GetPowerInfo()

DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo ( int *  secs,
int *  pct 
)

Get the current power supply details.

Аргументы
secsSeconds of battery life left. You can pass a NULL here if you don't care. Will return -1 if we can't determine a value, or we're not running on a battery.
pctPercentage of battery life left, between 0 and 100. You can pass a NULL here if you don't care. Will return -1 if we can't determine a value, or we're not running on a battery.
Возвращает
The state of the battery (if any).
SDL_POWERSTATE_CHARGING
@ SDL_POWERSTATE_CHARGING
Definition: SDL_power.h:47
SDL_POWERSTATE_ON_BATTERY
@ SDL_POWERSTATE_ON_BATTERY
Definition: SDL_power.h:45
SDL_POWERSTATE_NO_BATTERY
@ SDL_POWERSTATE_NO_BATTERY
Definition: SDL_power.h:46
SDL_PowerState
SDL_PowerState
The basic state for the system's power supply.
Definition: SDL_power.h:42
SDL_POWERSTATE_CHARGED
@ SDL_POWERSTATE_CHARGED
Definition: SDL_power.h:48
SDL_POWERSTATE_UNKNOWN
@ SDL_POWERSTATE_UNKNOWN
Definition: SDL_power.h:44