Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
SDL.Power
Contents
- getPowerInfo :: (Functor m, MonadIO m) => m PowerState
- data PowerState
- data BatteryState
- data Charge = Charge {}
Power Status
getPowerInfo :: (Functor m, MonadIO m) => m PowerState #
Current power supply details.
Throws SDLException
if the current power state can not be determined.
See SDL_GetPowerInfo
for C documentation.
data PowerState #
Information about the power supply for the user's environment
Constructors
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. |
Instances
data BatteryState #
Information on battery consumption for battery powered devices
Constructors
Draining | The battery is currently being drained. |
Charged | The battery is fully charged. |
Charging | The device is plugged in and the battery is charging. |
Instances
Information about how much charge a battery has.
Constructors
Charge | |
Fields
|