diff options
Diffstat (limited to 'core/os/os.h')
-rw-r--r-- | core/os/os.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/os/os.h b/core/os/os.h index 0bd331df4a..b36f94060c 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -210,6 +210,18 @@ public: virtual void request_attention() {} virtual void center_window(); + // Returns window area free of hardware controls and other obstacles. + // The application should use this to determine where to place UI elements. + // + // Keep in mind the area returned is in window coordinates rather than + // viewport coordinates - you should perform the conversion on your own. + // + // The maximum size of the area is Rect2(0, 0, window_size.width, window_size.height). + virtual Rect2 get_window_safe_area() const { + Size2 window_size = get_window_size(); + return Rect2(0, 0, window_size.width, window_size.height); + } + virtual void set_borderless_window(bool p_borderless) {} virtual bool get_borderless_window() { return 0; } @@ -320,6 +332,7 @@ public: virtual void disable_crash_handler() {} virtual bool is_disable_crash_handler() const { return false; } + virtual void initialize_debugging() {} enum CursorShape { CURSOR_ARROW, |