Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

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

String

clipboard_get ( ) const

Image

clipboard_get_image ( ) const

String

clipboard_get_primary ( ) const

bool

clipboard_has ( ) const

bool

clipboard_has_image ( ) const

void

clipboard_set ( String clipboard )

void

clipboard_set_primary ( String clipboard_primary )

CursorShape

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 )

Error

dialog_input_text ( String title, String description, String existing_text, Callable callback )

Error

dialog_show ( String title, String description, PackedStringArray buttons, Callable callback )

void

enable_for_stealing_focus ( int process_id )

Error

file_dialog_show ( String title, String current_directory, String filename, bool show_hidden, FileDialogMode mode, PackedStringArray filters, Callable callback )

void

force_process_and_drop_events ( )

Color

get_accent_color ( ) const

Rect2[]

get_display_cutouts ( ) const

Rect2i

get_display_safe_area ( ) const

int

get_keyboard_focus_screen ( ) const

String

get_name ( ) const