summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.cpp
diff options
context:
space:
mode:
authorJulian Murgia <the.straton@gmail.com>2016-07-23 13:15:55 +0200
committerRĂ©mi Verschelde <rverschelde@gmail.com>2017-03-04 18:04:29 +0100
commit94103c0c025f04e75d5e163d9f0bdde27bb0c848 (patch)
treed5bb55acd30270cace54dae5537b009887de1e68 /platform/x11/os_x11.cpp
parentef174abf6d640e69c402b5e9628743173c313439 (diff)
Add API to access battery power state
Done: - X11, server (tested) - Windows (developed, would be nice to retest) - OSX (not tested) Prepared (not developed): - Android (code is here, but may not compile) - iphone - winrt - bb10 - haiku - javascript
Diffstat (limited to 'platform/x11/os_x11.cpp')
-rw-r--r--platform/x11/os_x11.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index a4ed08f330..689fe076f1 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -2007,6 +2007,18 @@ void OS_X11::set_context(int p_context) {
}
}
+PowerState OS_X11::get_power_state() {
+ return power_manager->get_power_state();
+}
+
+int OS_X11::get_power_seconds_left() {
+ return power_manager->get_power_seconds_left();
+}
+
+int OS_X11::get_power_percent_left() {
+ return power_manager->get_power_percent_left();
+}
+
OS_X11::OS_X11() {
#ifdef RTAUDIO_ENABLED