diff options
author | Julian Murgia <the.straton@gmail.com> | 2016-07-23 13:15:55 +0200 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-03-04 18:04:29 +0100 |
commit | 94103c0c025f04e75d5e163d9f0bdde27bb0c848 (patch) | |
tree | d5bb55acd30270cace54dae5537b009887de1e68 /platform/x11/os_x11.h | |
parent | ef174abf6d640e69c402b5e9628743173c313439 (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.h')
-rw-r--r-- | platform/x11/os_x11.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 3ec358f103..ce2e2df6e9 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -46,6 +46,7 @@ #include "servers/physics_2d/physics_2d_server_wrap_mt.h" #include "main/input_default.h" #include "joypad_linux.h" +#include "power_x11.h" #include <X11/keysym.h> #include <X11/Xlib.h> @@ -164,6 +165,8 @@ class OS_X11 : public OS_Unix { AudioDriverDummy driver_dummy; Atom net_wm_icon; + + PowerX11 *power_manager; int audio_driver_index; unsigned int capture_idle; @@ -260,6 +263,10 @@ public: virtual void set_use_vsync(bool p_enable); virtual bool is_vsync_enabled() const; + virtual PowerState get_power_state(); + virtual int get_power_seconds_left(); + virtual int get_power_percent_left(); + void run(); OS_X11(); |