diff options
Diffstat (limited to 'servers/display_server.h')
-rw-r--r-- | servers/display_server.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/servers/display_server.h b/servers/display_server.h index 0c2bc5dd3a..bd38f28f17 100644 --- a/servers/display_server.h +++ b/servers/display_server.h @@ -53,7 +53,8 @@ public: WINDOW_MODE_WINDOWED, WINDOW_MODE_MINIMIZED, WINDOW_MODE_MAXIMIZED, - WINDOW_MODE_FULLSCREEN + WINDOW_MODE_FULLSCREEN, + WINDOW_MODE_EXCLUSIVE_FULLSCREEN, }; // Keep the VSyncMode enum values in sync with the `display/window/vsync/vsync_mode` @@ -65,6 +66,12 @@ public: VSYNC_MAILBOX }; + enum HandleType { + DISPLAY_HANDLE, + WINDOW_HANDLE, + WINDOW_VIEW, + }; + typedef DisplayServer *(*CreateFunction)(const String &, WindowMode, VSyncMode, uint32_t, const Size2i &, Error &r_error); typedef Vector<String> (*GetRenderingDriversFunction)(); @@ -168,6 +175,8 @@ public: SCREEN_OF_MAIN_WINDOW = -1 }; + const float SCREEN_REFRESH_RATE_FALLBACK = -1.0; // Returned by screen_get_refresh_rate if the method fails. + virtual int get_screen_count() const = 0; virtual Point2i screen_get_position(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0; virtual Size2i screen_get_size(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0; @@ -182,6 +191,7 @@ public: } return scale; } + virtual float screen_get_refresh_rate(int p_screen = SCREEN_OF_MAIN_WINDOW) const = 0; virtual bool screen_is_touchscreen(int p_screen = SCREEN_OF_MAIN_WINDOW) const; // Keep the ScreenOrientation enum values in sync with the `display/window/handheld/orientation` @@ -232,6 +242,8 @@ public: virtual void show_window(WindowID p_id); virtual void delete_sub_window(WindowID p_id); + virtual int64_t window_get_native_handle(HandleType p_handle_type, WindowID p_window = MAIN_WINDOW_ID) const; + virtual WindowID get_window_at_screen_position(const Point2i &p_position) const = 0; virtual void window_attach_instance_id(ObjectID p_instance, WindowID p_window = MAIN_WINDOW_ID) = 0; @@ -387,6 +399,7 @@ VARIANT_ENUM_CAST(DisplayServer::MouseMode) VARIANT_ENUM_CAST(DisplayServer::ScreenOrientation) VARIANT_ENUM_CAST(DisplayServer::WindowMode) VARIANT_ENUM_CAST(DisplayServer::WindowFlags) +VARIANT_ENUM_CAST(DisplayServer::HandleType) VARIANT_ENUM_CAST(DisplayServer::CursorShape) VARIANT_ENUM_CAST(DisplayServer::VSyncMode) |