Dgame.System.Battery
« Go back
Bottom
- struct Battery;
- This structure provide support for battery lifetime if you are on a laptop etc.
- enum State: int;
- The Power States
- Unknown
- Cannot determine power status
- OnBattery
- Not plugged in, running on the battery
- NoBattery
- plugged in, no battery available
- Charging
- plugged in, charging battery
- Charged
- plugged in, battery charged
- int seconds;
- Remaining time in seconds, or -1 if cannot determine power status
- byte percent;
- Remaining battery percent, or -1 if cannot determine power status
- State state;
- Battery state
- interface System;
- The System struct contains the Power struct,
which give information about your current battery
and several other informations about your system, like the available RAM.
Author:
Randy Schuett (rswhite4@googlemail.com)k
- static nothrow @nogc Battery getBatteryInfo();
- Returns the PowerInfo structure with the currently power informations
See:
PowerInfo struct
- static nothrow @nogc int getRAM();
- Returns the available RAM
Page generated by Ddoc.
» Dgame.System.Battery on Github
Top
« Go back