diff options
author | Maxim Sheronov <maxim.sheronov@gmail.com> | 2017-09-12 22:09:06 +0300 |
---|---|---|
committer | Maxim Sheronov <maxim.sheronov@gmail.com> | 2017-09-13 20:57:07 +0300 |
commit | 0fffa45158bebeb4aaba1df1d271c000fffbe7f7 (patch) | |
tree | 369918b0d7c9f367a7396c3584ac84ab550bd103 /platform/haiku | |
parent | 69017974beb16dcfa971f9b6f33a4f005be57bef (diff) |
Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
Diffstat (limited to 'platform/haiku')
-rw-r--r-- | platform/haiku/os_haiku.h | 2 | ||||
-rw-r--r-- | platform/haiku/power_haiku.cpp | 6 | ||||
-rw-r--r-- | platform/haiku/power_haiku.h | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h index cb68f9303f..d2fafb9129 100644 --- a/platform/haiku/os_haiku.h +++ b/platform/haiku/os_haiku.h @@ -117,7 +117,7 @@ public: virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen = 0) const; virtual String get_executable_path() const; - virtual PowerState get_power_state(); + virtual OS::PowerState get_power_state(); virtual int get_power_seconds_left(); virtual int get_power_percent_left(); diff --git a/platform/haiku/power_haiku.cpp b/platform/haiku/power_haiku.cpp index 449b43a621..8718b317a3 100644 --- a/platform/haiku/power_haiku.cpp +++ b/platform/haiku/power_haiku.cpp @@ -37,12 +37,12 @@ bool PowerHaiku::UpdatePowerInfo() { return false; } -PowerState PowerHaiku::get_power_state() { +OS::PowerState PowerHaiku::get_power_state() { if (UpdatePowerInfo()) { return power_state; } else { WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN"); - return POWERSTATE_UNKNOWN; + return OS::POWERSTATE_UNKNOWN; } } @@ -65,7 +65,7 @@ int PowerX11::get_power_percent_left() { } PowerHaiku::PowerHaiku() - : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) { + : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) { } PowerHaiku::~PowerHaiku() { diff --git a/platform/haiku/power_haiku.h b/platform/haiku/power_haiku.h index 12513bdaef..59a93cd976 100644 --- a/platform/haiku/power_haiku.h +++ b/platform/haiku/power_haiku.h @@ -31,11 +31,13 @@ #ifndef PLATFORM_HAIKU_POWER_HAIKU_H_ #define PLATFORM_HAIKU_POWER_HAIKU_H_ +#include <os/os.h> + class PowerHaiku { private: int nsecs_left; int percent_left; - PowerState power_state; + OS::PowerState power_state; bool UpdatePowerInfo(); @@ -43,7 +45,7 @@ public: PowerHaiku(); virtual ~PowerHaiku(); - PowerState get_power_state(); + OS::PowerState get_power_state(); int get_power_seconds_left(); int get_power_percent_left(); }; |