Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- getPowerInfo :: (Functor m, MonadIO m) => m PowerState
- data PowerState
- data BatteryState
- data Charge = Charge {}
Power Status
getPowerInfo :: (Functor m, MonadIO m) => m PowerState Source #
Current power supply details.
Throws SDLException
if the current power state can not be determined.
See SDL_GetPowerInfo
for C documentation.
data PowerState Source #
Information about the power supply for the user's environment
Battery BatteryState Charge | The user is on a battery powered device. See |
Mains | The user is on a device connected to the mains. |
UnknownPowerState | SDL could not determine the power for the device. |
data BatteryState Source #
Information on battery consumption for battery powered devices
Information about how much charge a battery has.
Charge | |
|