1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #ifndef PLATFORM_OSX_POWER_OSX_H_
- #define PLATFORM_OSX_POWER_OSX_H_
- #include "core/os/file_access.h"
- #include "core/os/os.h"
- #include "dir_access_osx.h"
- #include <CoreFoundation/CoreFoundation.h>
- class power_osx {
- private:
- int nsecs_left;
- int percent_left;
- OS::PowerState power_state;
- void checkps(CFDictionaryRef dict, bool *have_ac, bool *have_battery, bool *charging);
- bool GetPowerInfo_MacOSX();
- bool UpdatePowerInfo();
- public:
- power_osx();
- virtual ~power_osx();
- OS::PowerState get_power_state();
- int get_power_seconds_left();
- int get_power_percent_left();
- };
- #endif
|