From 0fffa45158bebeb4aaba1df1d271c000fffbe7f7 Mon Sep 17 00:00:00 2001 From: Maxim Sheronov Date: Tue, 12 Sep 2017 22:09:06 +0300 Subject: Fix enums bindings Add missed bindings for enums Move some enums to class to have correct output of api.json --- core/os/os.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index 258708eea2..259a416cee 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -34,7 +34,6 @@ #include "image.h" #include "list.h" #include "os/main_loop.h" -#include "power.h" #include "ustring.h" #include "vector.h" #include @@ -65,6 +64,14 @@ class OS { public: typedef void (*ImeCallback)(void *p_inp, String p_text, Point2 p_selection); + enum PowerState { + POWERSTATE_UNKNOWN, /**< cannot determine power status */ + POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ + POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ + POWERSTATE_CHARGING, /**< Plugged in, charging battery */ + POWERSTATE_CHARGED /**< Plugged in, battery charged */ + }; + enum RenderThreadMode { RENDER_THREAD_UNSAFE, @@ -410,7 +417,7 @@ public: virtual void set_use_vsync(bool p_enable); virtual bool is_vsync_enabled() const; - virtual PowerState get_power_state(); + virtual OS::PowerState get_power_state(); virtual int get_power_seconds_left(); virtual int get_power_percent_left(); @@ -428,6 +435,6 @@ public: virtual ~OS(); }; -VARIANT_ENUM_CAST(PowerState); +VARIANT_ENUM_CAST(OS::PowerState); #endif -- cgit v1.2.3