aboutsummaryrefslogtreecommitdiff
path: root/core/bind/core_bind.h
diff options
context:
space:
mode:
authorIgnacio Etcheverry2017-09-16 12:28:23 +0200
committerIgnacio Etcheverry2017-09-16 12:28:23 +0200
commitf1f8fd1b68aa47e8a199c11599ffa7c4af39c486 (patch)
tree6c12fb58e7ab79e1561508130e0350a46b8b525d /core/bind/core_bind.h
parent6b729726e0c848e2a60eb72782315a883526c913 (diff)
downloadgodot-f1f8fd1b68aa47e8a199c11599ffa7c4af39c486.tar.gz
godot-f1f8fd1b68aa47e8a199c11599ffa7c4af39c486.tar.zst
godot-f1f8fd1b68aa47e8a199c11599ffa7c4af39c486.zip
Adds _OS::PowerState enum
Diffstat (limited to '')
-rw-r--r--core/bind/core_bind.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 0578c2b80..fc28ada0f 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -97,6 +97,14 @@ protected:
static _OS *singleton;
public:
+ 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 Weekday {
DAY_SUNDAY,
DAY_MONDAY,
@@ -303,7 +311,7 @@ public:
void set_use_vsync(bool p_enable);
bool is_vsync_enabled() const;
- OS::PowerState get_power_state();
+ PowerState get_power_state();
int get_power_seconds_left();
int get_power_percent_left();
@@ -312,6 +320,7 @@ public:
_OS();
};
+VARIANT_ENUM_CAST(_OS::PowerState);
VARIANT_ENUM_CAST(_OS::Weekday);
VARIANT_ENUM_CAST(_OS::Month);
VARIANT_ENUM_CAST(_OS::SystemDir);