summaryrefslogtreecommitdiffstats
path: root/core/os/os.h
diff options
context:
space:
mode:
authorMaxim Sheronov <maxim.sheronov@gmail.com>2017-09-12 22:09:06 +0300
committerMaxim Sheronov <maxim.sheronov@gmail.com>2017-09-13 20:57:07 +0300
commit0fffa45158bebeb4aaba1df1d271c000fffbe7f7 (patch)
tree369918b0d7c9f367a7396c3584ac84ab550bd103 /core/os/os.h
parent69017974beb16dcfa971f9b6f33a4f005be57bef (diff)
downloadredot-engine-0fffa45158bebeb4aaba1df1d271c000fffbe7f7.tar.gz
Fix enums bindings
Add missed bindings for enums Move some enums to class to have correct output of api.json
Diffstat (limited to 'core/os/os.h')
-rw-r--r--core/os/os.h13
1 files changed, 10 insertions, 3 deletions
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 <stdarg.h>
@@ -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