summaryrefslogtreecommitdiff
path: root/core/bind
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-14 13:43:28 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-14 13:43:32 +0100
commit3dea5fd631c9513ed09b876f25e8bf6deff49683 (patch)
tree91d13164ad4ef219e47d84b3103ea34d84e23a68 /core/bind
parenta9c85e79add171ddb57e46df24376102893299b7 (diff)
Remove incomplete battery status/power API
It was initially implemented in #5871 for Godot 3.0, but never really completed or thoroughly tested for most platforms. It then stayed in limbo and nobody seems really keen to finish it, so it's better to remove it in 4.0, and re-add eventually (possibly with a different API) if there's demand and an implementation confirmed working on all platforms. Closes #8770.
Diffstat (limited to 'core/bind')
-rw-r--r--core/bind/core_bind.cpp22
-rw-r--r--core/bind/core_bind.h13
2 files changed, 0 insertions, 35 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 9413772f84..d7614c5a82 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -587,18 +587,6 @@ bool _OS::is_vsync_via_compositor_enabled() const {
return OS::get_singleton()->is_vsync_via_compositor_enabled();
}
-_OS::PowerState _OS::get_power_state() {
- return _OS::PowerState(OS::get_singleton()->get_power_state());
-}
-
-int _OS::get_power_seconds_left() {
- return OS::get_singleton()->get_power_seconds_left();
-}
-
-int _OS::get_power_percent_left() {
- return OS::get_singleton()->get_power_percent_left();
-}
-
bool _OS::has_feature(const String &p_feature) const {
return OS::get_singleton()->has_feature(p_feature);
@@ -1348,10 +1336,6 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_feature", "tag_name"), &_OS::has_feature);
- ClassDB::bind_method(D_METHOD("get_power_state"), &_OS::get_power_state);
- ClassDB::bind_method(D_METHOD("get_power_seconds_left"), &_OS::get_power_seconds_left);
- ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left);
-
ClassDB::bind_method(D_METHOD("request_permission", "name"), &_OS::request_permission);
ClassDB::bind_method(D_METHOD("request_permissions"), &_OS::request_permissions);
ClassDB::bind_method(D_METHOD("get_granted_permissions"), &_OS::get_granted_permissions);
@@ -1439,12 +1423,6 @@ void _OS::_bind_methods() {
BIND_ENUM_CONSTANT(SYSTEM_DIR_MUSIC);
BIND_ENUM_CONSTANT(SYSTEM_DIR_PICTURES);
BIND_ENUM_CONSTANT(SYSTEM_DIR_RINGTONES);
-
- BIND_ENUM_CONSTANT(POWERSTATE_UNKNOWN);
- BIND_ENUM_CONSTANT(POWERSTATE_ON_BATTERY);
- BIND_ENUM_CONSTANT(POWERSTATE_NO_BATTERY);
- BIND_ENUM_CONSTANT(POWERSTATE_CHARGING);
- BIND_ENUM_CONSTANT(POWERSTATE_CHARGED);
}
_OS::_OS() {
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 18bb1408e3..39bed791d0 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -105,14 +105,6 @@ public:
VIDEO_DRIVER_VULKAN,
};
- 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,
@@ -346,10 +338,6 @@ public:
void set_vsync_via_compositor(bool p_enable);
bool is_vsync_via_compositor_enabled() const;
- PowerState get_power_state();
- int get_power_seconds_left();
- int get_power_percent_left();
-
bool has_feature(const String &p_feature) const;
bool request_permission(const String &p_name);
@@ -362,7 +350,6 @@ public:
};
VARIANT_ENUM_CAST(_OS::VideoDriver);
-VARIANT_ENUM_CAST(_OS::PowerState);
VARIANT_ENUM_CAST(_OS::Weekday);
VARIANT_ENUM_CAST(_OS::Month);
VARIANT_ENUM_CAST(_OS::SystemDir);