Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
DisplayServer¶
Inherits: Object
A server interface for low-level window management.
Description¶
DisplayServer handles everything related to window management. It is separated from OS as a single operating system may support multiple display servers.
Headless mode: Starting the engine with the --headless
command line argument disables all rendering and window management functions. Most functions from DisplayServer will return dummy values in this case.
Methods¶
clipboard_get ( ) const |
|
clipboard_get_image ( ) const |
|
clipboard_get_primary ( ) const |
|
clipboard_has ( ) const |
|
clipboard_has_image ( ) const |
|
void |
clipboard_set ( String clipboard ) |
void |
clipboard_set_primary ( String clipboard_primary ) |
cursor_get_shape ( ) const |
|
void |
cursor_set_custom_image ( Resource cursor, CursorShape shape=0, Vector2 hotspot=Vector2(0, 0) ) |
void |
cursor_set_shape ( CursorShape shape ) |
dialog_input_text ( String title, String description, String existing_text, Callable callback ) |
|
dialog_show ( String title, String description, PackedStringArray buttons, Callable callback ) |
|
void |
enable_for_stealing_focus ( int process_id ) |
file_dialog_show ( String title, String current_directory, String filename, bool show_hidden, FileDialogMode mode, PackedStringArray filters, Callable callback ) |
|
void |
|
get_accent_color ( ) const |
|
get_display_cutouts ( ) const |
|
get_display_safe_area ( ) const |
|
get_keyboard_focus_screen ( ) const |
|
get_name ( ) const |
|
get_primary_screen ( ) const |
|
get_screen_count ( ) const |
|
get_screen_from_rect ( Rect2 rect ) const |
|
get_window_at_screen_position ( Vector2i position ) const |
|
get_window_list ( ) const |
|
global_menu_add_check_item ( String menu_root, String label, Callable callback=Callable(), Callable key_callback=Callable(), Variant tag=null, Key accelerator=0, int index=-1 ) |
|
global_menu_add_icon_check_item ( String menu_root, Texture2D icon, String label, Callable callback=Callable(), Callable key_callback=Callable(), Variant tag=null, Key accelerator=0, int index=-1 ) |
|
global_menu_add_icon_item ( String menu_root, Texture2D icon, String label, Callable callback=Callable(), Callable key_callback=Callable(), Variant tag=null, Key accelerator=0, int index=-1 ) |
|
global_menu_add_icon_radio_check_item ( String menu_root, Texture2D icon, String label, Callable callback=Callable(), Callable key_callback=Callable(), Variant tag=null, Key accelerator=0, int index=-1 ) |
|
global_menu_add_item ( String menu_root, String label, Callable callback=Callable(), Callable key_callback=Callable(), Variant tag=null, Key accelerator=0, int index=-1 ) |
|
global_menu_add_multistate_item ( String menu_root, String label, int max_states, int default_state, Callable callback=Callable(), Callable key_callback=Callable(), Variant tag=null, Key accelerator=0, int index=-1 ) |
|
global_menu_add_radio_check_item ( String menu_root, String label, Callable callback=Callable(), Callable key_callback=Callable(), Variant tag=null, Key accelerator=0, int index=-1 ) |
|
global_menu_add_separator ( String menu_root, int index=-1 ) |
|
global_menu_add_submenu_item ( String menu_root, String label, String submenu, int index=-1 ) |
|
void |
global_menu_clear ( String menu_root ) |
global_menu_get_item_accelerator ( String menu_root, int idx ) const |
|
global_menu_get_item_callback ( String menu_root, int idx ) const |
|
global_menu_get_item_count ( String menu_root ) const |
|
global_menu_get_item_icon ( String menu_root, int idx ) const |
|
global_menu_get_item_indentation_level ( String menu_root, int idx ) const |
|
global_menu_get_item_index_from_tag ( String menu_root, Variant tag ) const |
|
global_menu_get_item_index_from_text ( String menu_root, String text ) const |
|
global_menu_get_item_key_callback ( String menu_root, int idx ) const |
|
global_menu_get_item_max_states ( String menu_root, int idx ) const |
|
global_menu_get_item_state ( String menu_root, int idx ) const |
|
global_menu_get_item_submenu ( String menu_root, int idx ) const |
|
global_menu_get_item_tag ( String menu_root, int idx ) const |
|
global_menu_get_item_text ( String menu_root, int idx ) const |
|