+// ----------------------------------------------------------------------------
+// power management
+// ----------------------------------------------------------------------------
+
+wxPowerType wxGetPowerType()
+{
+ //SysBatteryKind kind;
+ //POS_SysBatteryInfo (false, NULL, NULL, NULL, NULL, NULL, &kind, NULL);
+ //return wxPOWER_SOCKET;
+ return wxPOWER_BATTERY;
+}
+
+wxBatteryState wxGetBatteryState()
+{
+ //#include "SystemMgr.h"
+ UInt8 percent;
+ POS_SysBatteryInfo (false, NULL, NULL, NULL, NULL, NULL, NULL, &percent);
+ if (percent < 3)
+ return wxBATTERY_SHUTDOWN_STATE;
+ else if (percent < 5)
+ return wxBATTERY_CRITICAL_STATE;
+ else if (percent < 15)
+ return wxBATTERY_LOW_STATE;
+ //return wxBATTERY_UNKNOWN_STATE;
+ return wxBATTERY_NORMAL_STATE;
+}
+