Root/
| 1 | #ifndef __BATTERY_H__ |
| 2 | #define __BATTERY_H__ |
| 3 | |
| 4 | #include <string> |
| 5 | |
| 6 | class OffscreenSurface; |
| 7 | class SurfaceCollection; |
| 8 | |
| 9 | |
| 10 | /** |
| 11 | * Keeps track of the battery status. |
| 12 | */ |
| 13 | class Battery { |
| 14 | public: |
| 15 | Battery(SurfaceCollection& sc); |
| 16 | |
| 17 | /** |
| 18 | * Gets the icon that reflects the current battery status. |
| 19 | */ |
| 20 | const OffscreenSurface *getIcon(); |
| 21 | |
| 22 | private: |
| 23 | void update(); |
| 24 | |
| 25 | SurfaceCollection& sc; |
| 26 | std::string iconPath; |
| 27 | unsigned int lastUpdate; |
| 28 | }; |
| 29 | |
| 30 | #endif /* __BATTERY_H__ */ |
| 31 |
Branches:
install_locations
master
opkrun
packages
