diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-27 12:12:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 12:12:34 +0100 |
commit | 4b36b6e92abea51baf8420e6c7dccd89a440bc59 (patch) | |
tree | 20b344c9ac640b4239ad44041c89c3f614e2b4a1 /servers/display_server.cpp | |
parent | 203e261526ebe123523d7e6ea6cfc6c628216e9d (diff) | |
parent | 89f37d410557c9062b45f090f08d006453bc4fc9 (diff) |
Merge pull request #56785 from bruvzg/nat_handles_4
Diffstat (limited to 'servers/display_server.cpp')
-rw-r--r-- | servers/display_server.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index d4ff42bc34..5ded5cf214 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -316,6 +316,11 @@ void DisplayServer::set_icon(const Ref<Image> &p_icon) { WARN_PRINT("Icon not supported by this display server."); } +int64_t DisplayServer::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const { + WARN_PRINT("Native handle not supported by this display server."); + return 0; +} + void DisplayServer::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) { WARN_PRINT("Changing the VSync mode is not supported by this display server."); } @@ -388,6 +393,8 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("create_sub_window", "mode", "vsync_mode", "flags", "rect"), &DisplayServer::create_sub_window, DEFVAL(Rect2i())); ClassDB::bind_method(D_METHOD("delete_sub_window", "window_id"), &DisplayServer::delete_sub_window); + ClassDB::bind_method(D_METHOD("window_get_native_handle", "handle_type", "window_id"), &DisplayServer::window_get_native_handle, DEFVAL(MAIN_WINDOW_ID)); + ClassDB::bind_method(D_METHOD("window_set_title", "title", "window_id"), &DisplayServer::window_set_title, DEFVAL(MAIN_WINDOW_ID)); ClassDB::bind_method(D_METHOD("window_set_mouse_passthrough", "region", "window_id"), &DisplayServer::window_set_mouse_passthrough, DEFVAL(MAIN_WINDOW_ID)); @@ -552,6 +559,10 @@ void DisplayServer::_bind_methods() { BIND_ENUM_CONSTANT(VSYNC_ENABLED); BIND_ENUM_CONSTANT(VSYNC_ADAPTIVE); BIND_ENUM_CONSTANT(VSYNC_MAILBOX); + + BIND_ENUM_CONSTANT(DISPLAY_HANDLE); + BIND_ENUM_CONSTANT(WINDOW_HANDLE); + BIND_ENUM_CONSTANT(WINDOW_VIEW); } void DisplayServer::register_create_function(const char *p_name, CreateFunction p_function, GetRenderingDriversFunction p_get_drivers) { |