actual version
[sdl-headers.git] / sdlpower.inc
1 //from "sdl_power.h"
2
3   {**
4    *  The basic state for the system's power supply.
5    *}
6 type
7   TSDL_PowerState = (SDL_POWERSTATE_UNKNOWN,      {**< cannot determine power status *}
8                      SDL_POWERSTATE_ON_BATTERY,   {**< Not plugged in, running on the battery *}
9                      SDL_POWERSTATE_NO_BATTERY,   {**< Plugged in, no battery available *}
10                      SDL_POWERSTATE_CHARGING,     {**< Plugged in, charging battery *}
11                      SDL_POWERSTATE_CHARGED);     {**< Plugged in, battery charged *}
12
13   {**
14    *  Get the current power supply details.
15    *
16    *   secs Seconds of battery life left. You can pass a NULL here if
17    *        you don't care. Will return -1 if we can't determine a
18    *        value, or we're not running on a battery.
19    *
20    *   pct Percentage of battery life left, between 0 and 100. You can
21    *       pass a NULL here if you don't care. Will return -1 if we
22    *       can't determine a value, or we're not running on a battery.
23    *
24    *  The state of the battery (if any).
25    *}
26 function SDL_GetPowerInfo(secs: PInt; pct: PInt): TSDL_PowerState cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetPowerInfo' {$ENDIF} {$ENDIF};