summaryrefslogtreecommitdiff
path: root/platform/macos/display_server_macos.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/display_server_macos.h')
-rw-r--r--platform/macos/display_server_macos.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/macos/display_server_macos.h b/platform/macos/display_server_macos.h
index 41031ec81b..54c479fc81 100644
--- a/platform/macos/display_server_macos.h
+++ b/platform/macos/display_server_macos.h
@@ -50,6 +50,7 @@
#import <ApplicationServices/ApplicationServices.h>
#import <CoreVideo/CoreVideo.h>
#import <Foundation/Foundation.h>
+#import <IOKit/pwr_mgt/IOPMLib.h>
#undef BitMap
#undef CursorShape
@@ -171,6 +172,8 @@ private:
HashMap<WindowID, WindowData> windows;
+ IOPMAssertionID screen_keep_on_assertion = kIOPMNullAssertionID;
+
const NSMenu *_get_menu_root(const String &p_menu_root) const;
NSMenu *_get_menu_root(const String &p_menu_root);
@@ -299,6 +302,8 @@ public:
virtual float screen_get_max_scale() const override;
virtual Rect2i screen_get_usable_rect(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const override;
+ virtual void screen_set_keep_on(bool p_enable) override;
+ virtual bool screen_is_kept_on() const override;
virtual Vector<int> get_window_list() const override;