summaryrefslogtreecommitdiff
path: root/platform/javascript/os_javascript.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/os_javascript.h')
-rw-r--r--platform/javascript/os_javascript.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index 582f128ce8..5f6051bedb 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -32,6 +32,7 @@
#include "os/input.h"
#include "drivers/unix/os_unix.h"
#include "os/main_loop.h"
+#include "power_javascript.h"
#include "servers/physics/physics_server_sw.h"
#include "servers/audio_server.h"
#include "servers/physics_2d/physics_2d_server_sw.h"
@@ -81,6 +82,8 @@ private:
GetDataDirFunc get_data_dir_func;
+ PowerJavascript *power_manager;
+
#ifdef JAVASCRIPT_EVAL_ENABLED
JavaScript* javascript_eval;
#endif
@@ -174,6 +177,10 @@ public:
virtual bool is_joy_known(int p_device);
virtual String get_joy_guid(int p_device) const;
bool joy_connection_changed(int p_type, const EmscriptenGamepadEvent *p_event);
+
+ virtual PowerState get_power_state();
+ virtual int get_power_seconds_left();
+ virtual int get_power_percent_left();
OS_JavaScript(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, GetDataDirFunc p_get_data_dir_func);
~OS_JavaScript();