summaryrefslogtreecommitdiff
path: root/core/os/os.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/os.h')
-rw-r--r--core/os/os.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/core/os/os.h b/core/os/os.h
index 258708eea2..2fc87e44a0 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,
@@ -279,6 +286,9 @@ public:
bool is_stdout_verbose() const;
+ virtual void disable_crash_handler() {}
+ virtual bool is_disable_crash_handler() const { return false; }
+
enum CursorShape {
CURSOR_ARROW,
CURSOR_IBEAM,
@@ -410,7 +420,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 +438,6 @@ public:
virtual ~OS();
};
-VARIANT_ENUM_CAST(PowerState);
+VARIANT_ENUM_CAST(OS::PowerState);
#endif