diff options
Diffstat (limited to 'servers/display_server.cpp')
-rw-r--r-- | servers/display_server.cpp | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp index cc818cbe04..83e0a797a9 100644 --- a/servers/display_server.cpp +++ b/servers/display_server.cpp @@ -181,7 +181,7 @@ bool DisplayServer::screen_is_kept_on() const { return false; } -DisplayServer::WindowID DisplayServer::create_sub_window(WindowMode p_mode, uint32_t p_flags, const Rect2i &) { +DisplayServer::WindowID DisplayServer::create_sub_window(WindowMode p_mode, uint32_t p_flags, const Rect2i &p_rect) { ERR_FAIL_V_MSG(INVALID_WINDOW_ID, "Sub-windows not supported by this display server."); } @@ -276,8 +276,23 @@ Error DisplayServer::dialog_input_text(String p_title, String p_description, Str return OK; } -DisplayServer::LatinKeyboardVariant DisplayServer::get_latin_keyboard_variant() const { - return LATIN_KEYBOARD_QWERTY; +int DisplayServer::keyboard_get_layout_count() const { + return 0; +} + +int DisplayServer::keyboard_get_current_layout() const { + return -1; +} + +void DisplayServer::keyboard_set_current_layout(int p_index) { +} + +String DisplayServer::keyboard_get_layout_language(int p_index) const { + return ""; +} + +String DisplayServer::keyboard_get_layout_name(int p_index) const { + return "Not supported"; } void DisplayServer::force_process_and_drop_events() { @@ -387,7 +402,7 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_window_list"), &DisplayServer::get_window_list); ClassDB::bind_method(D_METHOD("get_window_at_screen_position", "position"), &DisplayServer::get_window_at_screen_position); - ClassDB::bind_method(D_METHOD("create_sub_window", "mode", "rect"), &DisplayServer::create_sub_window, DEFVAL(Rect2i())); + ClassDB::bind_method(D_METHOD("create_sub_window", "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_set_title", "title", "window_id"), &DisplayServer::window_set_title, DEFVAL(MAIN_WINDOW_ID)); @@ -461,7 +476,11 @@ void DisplayServer::_bind_methods() { ClassDB::bind_method(D_METHOD("dialog_show", "title", "description", "buttons", "callback"), &DisplayServer::dialog_show); ClassDB::bind_method(D_METHOD("dialog_input_text", "title", "description", "existing_text", "callback"), &DisplayServer::dialog_input_text); - ClassDB::bind_method(D_METHOD("get_latin_keyboard_variant"), &DisplayServer::get_latin_keyboard_variant); + ClassDB::bind_method(D_METHOD("keyboard_get_layout_count"), &DisplayServer::keyboard_get_layout_count); + ClassDB::bind_method(D_METHOD("keyboard_get_current_layout"), &DisplayServer::keyboard_get_current_layout); + ClassDB::bind_method(D_METHOD("keyboard_set_current_layout", "index"), &DisplayServer::keyboard_set_current_layout); + ClassDB::bind_method(D_METHOD("keyboard_get_layout_language", "index"), &DisplayServer::keyboard_get_layout_language); + ClassDB::bind_method(D_METHOD("keyboard_get_layout_name", "index"), &DisplayServer::keyboard_get_layout_name); ClassDB::bind_method(D_METHOD("process_events"), &DisplayServer::process_events); ClassDB::bind_method(D_METHOD("force_process_and_drop_events"), &DisplayServer::force_process_and_drop_events); @@ -543,14 +562,6 @@ void DisplayServer::_bind_methods() { BIND_ENUM_CONSTANT(WINDOW_FLAG_NO_FOCUS); BIND_ENUM_CONSTANT(WINDOW_FLAG_MAX); - BIND_ENUM_CONSTANT(LATIN_KEYBOARD_QWERTY); - BIND_ENUM_CONSTANT(LATIN_KEYBOARD_QWERTZ); - BIND_ENUM_CONSTANT(LATIN_KEYBOARD_AZERTY); - BIND_ENUM_CONSTANT(LATIN_KEYBOARD_QZERTY); - BIND_ENUM_CONSTANT(LATIN_KEYBOARD_DVORAK); - BIND_ENUM_CONSTANT(LATIN_KEYBOARD_NEO); - BIND_ENUM_CONSTANT(LATIN_KEYBOARD_COLEMAK); - BIND_ENUM_CONSTANT(WINDOW_EVENT_MOUSE_ENTER); BIND_ENUM_CONSTANT(WINDOW_EVENT_MOUSE_EXIT); BIND_ENUM_CONSTANT(WINDOW_EVENT_FOCUS_IN); |