DisplayServer
A server interface for low-level window management.
A server interface for low-level window management.
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.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties1
SingletonProperty
public static DisplayServerInstance Singleton { get; }Methods301
AccessibilityCreateElementRid · Deprecated
public static Rid AccessibilityCreateElement(int windowId, DisplayServer.AccessibilityRole role);Creates a new, empty accessibility element resource.
Note: An accessibility element is created and freed automatically for each Entity. In general, this function should not be called manually.
| Name | Type | Default |
|---|---|---|
windowId | int | — |
role | DisplayServer.AccessibilityRole | — |
RidAccessibilityCreateSubElementRid · Deprecated
public static Rid AccessibilityCreateSubElement(Rid parentRid, DisplayServer.AccessibilityRole role, int insertPos = -1);Creates a new, empty accessibility sub-element resource. Sub-elements can be used to provide accessibility information for objects which are not Entitys, such as list items, table cells, or menu items. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the DisplayServer.AccessibilityFreeElement method.
| Name | Type | Default |
|---|---|---|
parentRid | Rid | — |
role | DisplayServer.AccessibilityRole | — |
insertPos | int | -1 |
RidAccessibilityCreateSubTextEditElements2 overloads · Includes deprecated
public static Rid AccessibilityCreateSubTextEditElements(Rid parentRid, Rid shapedText, float minHeight, int insertPos);Creates a new, empty accessibility sub-element from the shaped text buffer. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the DisplayServer.AccessibilityFreeElement method.
If is_last_line is true, no trailing newline is appended to the text content. Set to true for the last line in multi-line text fields and for single-line text fields.
| Name | Type | Default |
|---|---|---|
parentRid | Rid | — |
shapedText | Rid | — |
minHeight | float | — |
insertPos | int | — |
Ridpublic static Rid AccessibilityCreateSubTextEditElements(Rid parentRid, Rid shapedText, float minHeight, int insertPos = -1, bool isLastLine = false);Creates a new, empty accessibility sub-element from the shaped text buffer. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the DisplayServer.AccessibilityFreeElement method.
If is_last_line is true, no trailing newline is appended to the text content. Set to true for the last line in multi-line text fields and for single-line text fields.
| Name | Type | Default |
|---|---|---|
parentRid | Rid | — |
shapedText | Rid | — |
minHeight | float | — |
insertPos | int | -1 |
isLastLine | bool | false |
RidAccessibilityElementGetMetaVariant · Deprecated
public static Variant AccessibilityElementGetMeta(Rid id);Returns the metadata of the accessibility element id.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
VariantAccessibilityElementSetMetavoid · Deprecated
public static void AccessibilityElementSetMeta(Rid id, Variant meta);Sets the metadata of the accessibility element id to meta.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
meta | Variant | — |
AccessibilityFreeElementvoid · Deprecated
public static void AccessibilityFreeElement(Rid id);Frees the accessibility element id created by DisplayServer.AccessibilityCreateElement, DisplayServer.AccessibilityCreateSubElement, or DisplayServer.AccessibilityCreateSubTextEditElements.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
AccessibilityGetWindowRootRid · Deprecated
public static Rid AccessibilityGetWindowRoot(int windowId);Returns the main accessibility element of the OS native window.
| Name | Type | Default |
|---|---|---|
windowId | int | — |
RidAccessibilityHasElementbool · Deprecated
public static bool AccessibilityHasElement(Rid id);Returns true if id is a valid accessibility element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
boolAccessibilityScreenReaderActiveint
public static int AccessibilityScreenReaderActive();Returns 1 if a screen reader, Braille display or other assistive app is active, 0 otherwise. Returns -1 if status is unknown.
Note: This method is implemented on Android, Linux, macOS, and Windows.
Note: Accessibility debugging tools, such as Accessibility Insights for Windows, Accessibility Inspector (macOS), or AT-SPI Browser (Linux/BSD), do not count as assistive apps and will not affect this value. To test your project with these tools, set ProjectSettings.accessibility/general/accessibility_support to 1.
intAccessibilitySetWindowFocusedvoid · Deprecated
public static void AccessibilitySetWindowFocused(int windowId, bool focused);Sets the window focused state for assistive apps.
Note: This method is implemented on Linux, macOS, and Windows.
Note: Advanced users only! Window objects call this method automatically.
| Name | Type | Default |
|---|---|---|
windowId | int | — |
focused | bool | — |
AccessibilitySetWindowRectvoid · Deprecated
public static void AccessibilitySetWindowRect(int windowId, Rect2 rectOut, Rect2 rectIn);Sets window outer (with decorations) and inner (without decorations) bounds for assistive apps.
Note: This method is implemented on Linux, macOS, and Windows.
Note: Advanced users only! Window objects call this method automatically.
| Name | Type | Default |
|---|---|---|
windowId | int | — |
rectOut | Rect2 | — |
rectIn | Rect2 | — |
AccessibilityShouldIncreaseContrastint
public static int AccessibilityShouldIncreaseContrast();Returns 1 if a high-contrast user interface theme should be used, 0 otherwise. Returns -1 if status is unknown.
Note: This method is implemented on Android, Linux (X11/Wayland, GNOME), macOS, and Windows.
intAccessibilityShouldReduceAnimationint
public static int AccessibilityShouldReduceAnimation();Returns 1 if flashing, blinking, and other moving content that can cause seizures in users with photosensitive epilepsy should be disabled, 0 otherwise. Returns -1 if status is unknown.
Note: This method is implemented on Android, macOS, and Windows.
intAccessibilityShouldReduceTransparencyint
public static int AccessibilityShouldReduceTransparency();Returns 1 if background images, transparency, and other features that can reduce the contrast between the foreground and background should be disabled, 0 otherwise. Returns -1 if status is unknown.
Note: This method is implemented on macOS and Windows.
intAccessibilityUpdateAddActionvoid · Deprecated
public static void AccessibilityUpdateAddAction(Rid id, DisplayServer.AccessibilityAction action, Callable callable);Adds a callback for the accessibility action (action which can be performed by using a special screen reader command or buttons on the Braille display), and marks this action as supported. The action callback receives one Variant argument, which value depends on action type.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
action | DisplayServer.AccessibilityAction | — |
callable | Callable | — |
AccessibilityUpdateAddChildvoid · Deprecated
public static void AccessibilityUpdateAddChild(Rid id, Rid childId);Adds a child accessibility element.
Note: Entity children and sub-elements are added to the child list automatically.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
childId | Rid | — |
AccessibilityUpdateAddCustomActionvoid · Deprecated
public static void AccessibilityUpdateAddCustomAction(Rid id, int actionId, string actionDescription);Adds support for a custom accessibility action. action_id is passed as an argument to the callback of DisplayServer.AccessibilityAction.Custom action.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
actionId | int | — |
actionDescription | string | — |
AccessibilityUpdateAddRelatedControlsvoid · Deprecated
public static void AccessibilityUpdateAddRelatedControls(Rid id, Rid relatedId);Adds an element that is controlled by this element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
relatedId | Rid | — |
AccessibilityUpdateAddRelatedDescribedByvoid · Deprecated
public static void AccessibilityUpdateAddRelatedDescribedBy(Rid id, Rid relatedId);Adds an element that describes this element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
relatedId | Rid | — |
AccessibilityUpdateAddRelatedDetailsvoid · Deprecated
public static void AccessibilityUpdateAddRelatedDetails(Rid id, Rid relatedId);Adds an element that details this element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
relatedId | Rid | — |
AccessibilityUpdateAddRelatedFlowTovoid · Deprecated
public static void AccessibilityUpdateAddRelatedFlowTo(Rid id, Rid relatedId);Adds an element that this element flow into.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
relatedId | Rid | — |
AccessibilityUpdateAddRelatedLabeledByvoid · Deprecated
public static void AccessibilityUpdateAddRelatedLabeledBy(Rid id, Rid relatedId);Adds an element that labels this element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
relatedId | Rid | — |
AccessibilityUpdateAddRelatedRadioGroupvoid · Deprecated
public static void AccessibilityUpdateAddRelatedRadioGroup(Rid id, Rid relatedId);Adds an element that is part of the same radio group.
Note: This method should be called on each element of the group, using all other elements as related_id.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
relatedId | Rid | — |
AccessibilityUpdateSetActiveDescendantvoid · Deprecated
public static void AccessibilityUpdateSetActiveDescendant(Rid id, Rid otherId);Adds an element that is an active descendant of this element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
otherId | Rid | — |
AccessibilityUpdateSetBackgroundColorvoid · Deprecated
public static void AccessibilityUpdateSetBackgroundColor(Rid id, Color color);Sets element background color.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
color | Color | — |
AccessibilityUpdateSetBoundsvoid · Deprecated
public static void AccessibilityUpdateSetBounds(Rid id, Rect2 rect);Sets element bounding box, relative to the node position.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
rect | Rect2 | — |
AccessibilityUpdateSetCheckedvoid · Deprecated
public static void AccessibilityUpdateSetChecked(Rid id, bool checekd);Sets element checked state.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
checekd | bool | — |
AccessibilityUpdateSetClassnamevoid · Deprecated
public static void AccessibilityUpdateSetClassname(Rid id, string classname);Sets element class name.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
classname | string | — |
AccessibilityUpdateSetColorValuevoid · Deprecated
public static void AccessibilityUpdateSetColorValue(Rid id, Color color);Sets element color value.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
color | Color | — |
AccessibilityUpdateSetDescriptionvoid · Deprecated
public static void AccessibilityUpdateSetDescription(Rid id, string description);Sets element accessibility description.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
description | string | — |
AccessibilityUpdateSetErrorMessagevoid · Deprecated
public static void AccessibilityUpdateSetErrorMessage(Rid id, Rid otherId);Sets an element which contains an error message for this element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
otherId | Rid | — |
AccessibilityUpdateSetExtraInfovoid · Deprecated
public static void AccessibilityUpdateSetExtraInfo(Rid id, string name);Sets element accessibility extra information added to the element name.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
name | string | — |
AccessibilityUpdateSetFlagvoid · Deprecated
public static void AccessibilityUpdateSetFlag(Rid id, DisplayServer.AccessibilityFlags flag, bool value);Sets element flag.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
flag | DisplayServer.AccessibilityFlags | — |
value | bool | — |
AccessibilityUpdateSetFocusvoid · Deprecated
public static void AccessibilityUpdateSetFocus(Rid id);Sets currently focused element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
AccessibilityUpdateSetForegroundColorvoid · Deprecated
public static void AccessibilityUpdateSetForegroundColor(Rid id, Color color);Sets element foreground color.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
color | Color | — |
AccessibilityUpdateSetInPageLinkTargetvoid · Deprecated
public static void AccessibilityUpdateSetInPageLinkTarget(Rid id, Rid otherId);Sets target element for the link.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
otherId | Rid | — |
AccessibilityUpdateSetLanguagevoid · Deprecated
public static void AccessibilityUpdateSetLanguage(Rid id, string language);Sets element text language.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
language | string | — |
AccessibilityUpdateSetListItemCountvoid · Deprecated
public static void AccessibilityUpdateSetListItemCount(Rid id, int size);Sets number of items in the list.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
size | int | — |
AccessibilityUpdateSetListItemExpandedvoid · Deprecated
public static void AccessibilityUpdateSetListItemExpanded(Rid id, bool expanded);Sets list/tree item expanded status.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
expanded | bool | — |
AccessibilityUpdateSetListItemIndexvoid · Deprecated
public static void AccessibilityUpdateSetListItemIndex(Rid id, int index);Sets the position of the element in the list.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
index | int | — |
AccessibilityUpdateSetListItemLevelvoid · Deprecated
public static void AccessibilityUpdateSetListItemLevel(Rid id, int level);Sets the hierarchical level of the element in the list.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
level | int | — |
AccessibilityUpdateSetListItemSelectedvoid · Deprecated
public static void AccessibilityUpdateSetListItemSelected(Rid id, bool selected);Sets list/tree item selected status.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
selected | bool | — |
AccessibilityUpdateSetListOrientationvoid · Deprecated
public static void AccessibilityUpdateSetListOrientation(Rid id, bool vertical);Sets the orientation of the list elements.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
vertical | bool | — |
AccessibilityUpdateSetLivevoid · Deprecated
public static void AccessibilityUpdateSetLive(Rid id, DisplayServer.AccessibilityLiveMode live);Sets the priority of the live region updates.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
live | DisplayServer.AccessibilityLiveMode | — |
AccessibilityUpdateSetMemberOfvoid · Deprecated
public static void AccessibilityUpdateSetMemberOf(Rid id, Rid groupId);Sets the element to be a member of the group.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
groupId | Rid | — |
AccessibilityUpdateSetNamevoid · Deprecated
public static void AccessibilityUpdateSetName(Rid id, string name);Sets element accessibility name.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
name | string | — |
AccessibilityUpdateSetNextOnLinevoid · Deprecated
public static void AccessibilityUpdateSetNextOnLine(Rid id, Rid otherId);Sets next element on the line.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
otherId | Rid | — |
AccessibilityUpdateSetNumJumpvoid · Deprecated
public static void AccessibilityUpdateSetNumJump(Rid id, double jump);Sets numeric value jump.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
jump | double | — |
AccessibilityUpdateSetNumRangevoid · Deprecated
public static void AccessibilityUpdateSetNumRange(Rid id, double min, double max);Sets numeric value range.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
min | double | — |
max | double | — |
AccessibilityUpdateSetNumStepvoid · Deprecated
public static void AccessibilityUpdateSetNumStep(Rid id, double step);Sets numeric value step.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
step | double | — |
AccessibilityUpdateSetNumValuevoid · Deprecated
public static void AccessibilityUpdateSetNumValue(Rid id, double position);Sets numeric value.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
position | double | — |
AccessibilityUpdateSetPlaceholdervoid · Deprecated
public static void AccessibilityUpdateSetPlaceholder(Rid id, string placeholder);Sets placeholder text.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
placeholder | string | — |
AccessibilityUpdateSetPopupTypevoid · Deprecated
public static void AccessibilityUpdateSetPopupType(Rid id, DisplayServer.AccessibilityPopupType popup);Sets popup type for popup buttons.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
popup | DisplayServer.AccessibilityPopupType | — |
AccessibilityUpdateSetPreviousOnLinevoid · Deprecated
public static void AccessibilityUpdateSetPreviousOnLine(Rid id, Rid otherId);Sets previous element on the line.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
otherId | Rid | — |
AccessibilityUpdateSetRolevoid · Deprecated
public static void AccessibilityUpdateSetRole(Rid id, DisplayServer.AccessibilityRole role);Sets element accessibility role.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
role | DisplayServer.AccessibilityRole | — |
AccessibilityUpdateSetRoleDescriptionvoid · Deprecated
public static void AccessibilityUpdateSetRoleDescription(Rid id, string description);Sets element accessibility role description text.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
description | string | — |
AccessibilityUpdateSetScrollXvoid · Deprecated
public static void AccessibilityUpdateSetScrollX(Rid id, double position);Sets scroll bar x position.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
position | double | — |
AccessibilityUpdateSetScrollXRangevoid · Deprecated
public static void AccessibilityUpdateSetScrollXRange(Rid id, double min, double max);Sets scroll bar x range.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
min | double | — |
max | double | — |
AccessibilityUpdateSetScrollYvoid · Deprecated
public static void AccessibilityUpdateSetScrollY(Rid id, double position);Sets scroll bar y position.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
position | double | — |
AccessibilityUpdateSetScrollYRangevoid · Deprecated
public static void AccessibilityUpdateSetScrollYRange(Rid id, double min, double max);Sets scroll bar y range.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
min | double | — |
max | double | — |
AccessibilityUpdateSetShortcutvoid · Deprecated
public static void AccessibilityUpdateSetShortcut(Rid id, string shortcut);Sets the list of keyboard shortcuts used by element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
shortcut | string | — |
AccessibilityUpdateSetStateDescriptionvoid · Deprecated
public static void AccessibilityUpdateSetStateDescription(Rid id, string description);Sets human-readable description of the current checked state.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
description | string | — |
AccessibilityUpdateSetTableCellPositionvoid · Deprecated
public static void AccessibilityUpdateSetTableCellPosition(Rid id, int rowIndex, int columnIndex);Sets cell position in the table.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
rowIndex | int | — |
columnIndex | int | — |
AccessibilityUpdateSetTableCellSpanvoid · Deprecated
public static void AccessibilityUpdateSetTableCellSpan(Rid id, int rowSpan, int columnSpan);Sets cell row/column span.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
rowSpan | int | — |
columnSpan | int | — |
AccessibilityUpdateSetTableColumnCountvoid · Deprecated
public static void AccessibilityUpdateSetTableColumnCount(Rid id, int count);Sets number of columns in the table.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
count | int | — |
AccessibilityUpdateSetTableColumnIndexvoid · Deprecated
public static void AccessibilityUpdateSetTableColumnIndex(Rid id, int index);Sets position of the column.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
index | int | — |
AccessibilityUpdateSetTableRowCountvoid · Deprecated
public static void AccessibilityUpdateSetTableRowCount(Rid id, int count);Sets number of rows in the table.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
count | int | — |
AccessibilityUpdateSetTableRowIndexvoid · Deprecated
public static void AccessibilityUpdateSetTableRowIndex(Rid id, int index);Sets position of the row in the table.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
index | int | — |
AccessibilityUpdateSetTextAlignvoid · Deprecated
public static void AccessibilityUpdateSetTextAlign(Rid id, HorizontalAlignment align);Sets element text alignment.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
align | HorizontalAlignment | — |
AccessibilityUpdateSetTextDecorationsvoid · Deprecated
public static void AccessibilityUpdateSetTextDecorations(Rid id, bool underline, bool strikethrough, bool overline);Sets text underline/overline/strikethrough.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
underline | bool | — |
strikethrough | bool | — |
overline | bool | — |
AccessibilityUpdateSetTextOrientationvoid · Deprecated
public static void AccessibilityUpdateSetTextOrientation(Rid id, bool vertical);Sets text orientation.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
vertical | bool | — |
AccessibilityUpdateSetTextSelectionvoid · Deprecated
public static void AccessibilityUpdateSetTextSelection(Rid id, Rid textStartId, int startChar, Rid textEndId, int endChar);Sets text selection to the text field. text_start_id and text_end_id should be elements created by DisplayServer.AccessibilityCreateSubTextEditElements. Character offsets are relative to the corresponding element.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
textStartId | Rid | — |
startChar | int | — |
textEndId | Rid | — |
endChar | int | — |
AccessibilityUpdateSetTooltipvoid · Deprecated
public static void AccessibilityUpdateSetTooltip(Rid id, string tooltip);Sets tooltip text.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
tooltip | string | — |
AccessibilityUpdateSetTransformvoid · Deprecated
public static void AccessibilityUpdateSetTransform(Rid id, Transform2D transform);Sets element 2D transform.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
transform | Transform2D | — |
AccessibilityUpdateSetUrlvoid · Deprecated
public static void AccessibilityUpdateSetUrl(Rid id, string url);Sets link URL.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
url | string | — |
AccessibilityUpdateSetValuevoid · Deprecated
public static void AccessibilityUpdateSetValue(Rid id, string value);Sets element text value.
| Name | Type | Default |
|---|---|---|
id | Rid | — |
value | string | — |
Beepvoid
public static void Beep();Plays the beep sound from the operative system, if possible. Because it comes from the OS, the beep sound will be audible even if the application is muted. It may also be disabled for the entire OS by the user. Note: This method is implemented on macOS, Linux (X11/Wayland), and Windows.
ClipboardGetstring
public static string ClipboardGet();Returns the user's clipboard as a string if possible.
stringClipboardGetImageImage
public static Image ClipboardGetImage();Returns the user's clipboard as an image if possible. Note: This method uses the copied pixel data, e.g. from an image editing software or a web browser, not an image file copied from file explorer.
ImageClipboardGetPrimarystring
public static string ClipboardGetPrimary();Returns the user's primary clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. Note: This method is only implemented on Linux (X11/Wayland).
stringClipboardHasbool
public static bool ClipboardHas();Returns true if there is a text content on the user's clipboard.
boolClipboardHasImagebool
public static bool ClipboardHasImage();Returns true if there is an image content on the user's clipboard.
boolClipboardSetvoid
public static void ClipboardSet(string clipboard);Sets the user's clipboard content to the given string.
| Name | Type | Default |
|---|---|---|
clipboard | string | — |
ClipboardSetPrimaryvoid
public static void ClipboardSetPrimary(string clipboardPrimary);Sets the user's primary clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. Note: This method is only implemented on Linux (X11/Wayland).
| Name | Type | Default |
|---|---|---|
clipboardPrimary | string | — |
ColorPickerbool
public static bool ColorPicker(Callable callback);Displays OS native color picker.
Callbacks have the following arguments: status: bool, color: Color.
Note: This method is implemented if the display server has the DisplayServer.Feature.NativeColorPicker feature.
Note: This method is only implemented on Linux (X11/Wayland).
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
boolCreateStatusIndicatorint
public static int CreateStatusIndicator(Texture2D icon, string tooltip, Callable callback);Creates a new application status indicator with the specified icon, tooltip, and activation callback.
callback should take two arguments: the pressed mouse button (one of the MouseButton constants) and the click position in screen coordinates (a Vector2I).
| Name | Type | Default |
|---|---|---|
icon | Texture2D | — |
tooltip | string | — |
callback | Callable | — |
intCursorGetShapeDisplayServer.CursorShape
public static DisplayServer.CursorShape CursorGetShape();Returns the default mouse cursor shape set by DisplayServer.CursorSetShape.
DisplayServer.CursorShapeCursorSetCustomImagevoid
public static void CursorSetCustomImage(Resource cursor, DisplayServer.CursorShape shape = DisplayServer.CursorShape.Arrow, Vector2? hotspot = default);Sets a custom mouse cursor image for the given shape. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance.
cursor can be either a Texture2D or an Image, and it should not be larger than 256×256 to display correctly. Optionally, hotspot can be set to offset the image's position relative to the click point. By default, hotspot is set to the top-left corner of the image. See also DisplayServer.CursorSetShape.
Note: On Web, calling this method every frame can cause the cursor to flicker.
| Name | Type | Default |
|---|---|---|
cursor | Resource | — |
shape | DisplayServer.CursorShape | DisplayServer.CursorShape.Arrow |
hotspot | Vector2? | default |
hotspotIf the parameter is null, then the default value is new Vector2(0.0f, 0.0f).
CursorSetShapevoid
public static void CursorSetShape(DisplayServer.CursorShape shape);Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also DisplayServer.CursorGetShape and DisplayServer.CursorSetCustomImage.
| Name | Type | Default |
|---|---|---|
shape | DisplayServer.CursorShape | — |
DeleteStatusIndicatorvoid
public static void DeleteStatusIndicator(int id);Removes the application status indicator.
| Name | Type | Default |
|---|---|---|
id | int | — |
DialogInputTextError
public static Error DialogInputText(string title, string description, string existingText, Callable callback);Shows a text input dialog which uses the operating system's native look-and-feel. callback should accept a single string parameter which contains the text field's contents.
Note: This method is implemented if the display server has the DisplayServer.Feature.NativeDialogInput feature. Supported platforms include macOS, Windows, and Android.
| Name | Type | Default |
|---|---|---|
title | string | — |
description | string | — |
existingText | string | — |
callback | Callable | — |
ErrorDialogShow2 overloads
public static Error DialogShow(string title, string description, ReadOnlySpan<string> buttons, Callable callback);Shows a text dialog which uses the operating system's native look-and-feel. callback should accept a single [int] parameter which corresponds to the index of the pressed button.
Note: This method is implemented if the display server has the DisplayServer.Feature.NativeDialog feature. Supported platforms include macOS, Windows, and Android.
| Name | Type | Default |
|---|---|---|
title | string | — |
description | string | — |
buttons | ReadOnlySpan<string> | — |
callback | Callable | — |
Errorpublic static Error DialogShow(string title, string description, string[] buttons, Callable callback);Shows a text dialog which uses the operating system's native look-and-feel. callback should accept a single [int] parameter which corresponds to the index of the pressed button.
Note: This method is implemented if the display server has the DisplayServer.Feature.NativeDialog feature. Supported platforms include macOS, Windows, and Android.
| Name | Type | Default |
|---|---|---|
title | string | — |
description | string | — |
buttons | string[] | — |
callback | Callable | — |
ErrorEnableForStealingFocusvoid
public static void EnableForStealingFocus(long processId);Allows the process_id PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID.
Note: This method is implemented only on Windows.
| Name | Type | Default |
|---|---|---|
processId | long | — |
FileDialogShow4 overloads
public static Error FileDialogShow(string title, string currentDirectory, string fileName, bool showHidden, DisplayServer.FileDialogMode mode, ReadOnlySpan<string> filters, Callable callback);Displays OS native dialog for selecting files or directories in the file system.
Each filter string in the filters array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also FileDialog.Filters.
Callbacks have the following arguments: status: bool, selected_paths: PackedStringArray, selected_filter_index: int. On Android, the third callback argument (selected_filter_index) is always 0.
Note: This method is implemented if the display server has the DisplayServer.Feature.NativeDialogFile feature. Supported platforms include Linux (X11/Wayland), Windows, macOS, and Android.
Note: current_directory might be ignored.
Note: Embedded file dialogs and Windows file dialogs support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
Note: On Android and Linux, show_hidden is ignored.
Note: On Android and macOS, native file dialogs have no title.
Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use OS.GetGrantedPermissions to get a list of saved bookmarks.
Note: On Android, this method uses the Android Storage Access Framework (SAF).
The file picker returns a URI instead of a filesystem path. This URI can be passed directly to FileAccess to perform read/write operations.
When using DisplayServer.FileDialogMode.OpenDir, it returns a tree URI that grants full access to the selected directory. File operations inside this directory can be performed by passing a path on the form treeUri#relative/path/to/file to FileAccess.
To avoid opening the file picker again after each app restart, you can take persistable URI permission as follows:
The persistable URI permission remains valid across app restarts as long as the directory is not moved, renamed, or deleted.
| Name | Type | Default |
|---|---|---|
title | string | — |
currentDirectory | string | — |
fileName | string | — |
showHidden | bool | — |
mode | DisplayServer.FileDialogMode | — |
filters | ReadOnlySpan<string> | — |
callback | Callable | — |
Errorpublic static Error FileDialogShow(string title, string currentDirectory, string fileName, bool showHidden, DisplayServer.FileDialogMode mode, ReadOnlySpan<string> filters, Callable callback, int parentWindowId);Displays OS native dialog for selecting files or directories in the file system.
Each filter string in the filters array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also FileDialog.Filters.
Callbacks have the following arguments: status: bool, selected_paths: PackedStringArray, selected_filter_index: int. On Android, the third callback argument (selected_filter_index) is always 0.
Note: This method is implemented if the display server has the DisplayServer.Feature.NativeDialogFile feature. Supported platforms include Linux (X11/Wayland), Windows, macOS, and Android.
Note: current_directory might be ignored.
Note: Embedded file dialogs and Windows file dialogs support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
Note: On Android and Linux, show_hidden is ignored.
Note: On Android and macOS, native file dialogs have no title.
Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use OS.GetGrantedPermissions to get a list of saved bookmarks.
Note: On Android, this method uses the Android Storage Access Framework (SAF).
The file picker returns a URI instead of a filesystem path. This URI can be passed directly to FileAccess to perform read/write operations.
When using DisplayServer.FileDialogMode.OpenDir, it returns a tree URI that grants full access to the selected directory. File operations inside this directory can be performed by passing a path on the form treeUri#relative/path/to/file to FileAccess.
To avoid opening the file picker again after each app restart, you can take persistable URI permission as follows:
The persistable URI permission remains valid across app restarts as long as the directory is not moved, renamed, or deleted.
| Name | Type | Default |
|---|---|---|
title | string | — |
currentDirectory | string | — |
fileName | string | — |
showHidden | bool | — |
mode | DisplayServer.FileDialogMode | — |
filters | ReadOnlySpan<string> | — |
callback | Callable | — |
parentWindowId | int | — |
Errorpublic static Error FileDialogShow(string title, string currentDirectory, string fileName, bool showHidden, DisplayServer.FileDialogMode mode, string[] filters, Callable callback);Displays OS native dialog for selecting files or directories in the file system.
Each filter string in the filters array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also FileDialog.Filters.
Callbacks have the following arguments: status: bool, selected_paths: PackedStringArray, selected_filter_index: int. On Android, the third callback argument (selected_filter_index) is always 0.
Note: This method is implemented if the display server has the DisplayServer.Feature.NativeDialogFile feature. Supported platforms include Linux (X11/Wayland), Windows, macOS, and Android.
Note: current_directory might be ignored.
Note: Embedded file dialogs and Windows file dialogs support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
Note: On Android and Linux, show_hidden is ignored.
Note: On Android and macOS, native file dialogs have no title.
Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use OS.GetGrantedPermissions to get a list of saved bookmarks.
Note: On Android, this method uses the Android Storage Access Framework (SAF).
The file picker returns a URI instead of a filesystem path. This URI can be passed directly to FileAccess to perform read/write operations.
When using DisplayServer.FileDialogMode.OpenDir, it returns a tree URI that grants full access to the selected directory. File operations inside this directory can be performed by passing a path on the form treeUri#relative/path/to/file to FileAccess.
To avoid opening the file picker again after each app restart, you can take persistable URI permission as follows:
The persistable URI permission remains valid across app restarts as long as the directory is not moved, renamed, or deleted.
| Name | Type | Default |
|---|---|---|
title | string | — |
currentDirectory | string | — |
fileName | string | — |
showHidden | bool | — |
mode | DisplayServer.FileDialogMode | — |
filters | string[] | — |
callback | Callable | — |
Errorpublic static Error FileDialogShow(string title, string currentDirectory, string fileName, bool showHidden, DisplayServer.FileDialogMode mode, string[] filters, Callable callback, int parentWindowId = 0);Displays OS native dialog for selecting files or directories in the file system.
Each filter string in the filters array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also FileDialog.Filters.
Callbacks have the following arguments: status: bool, selected_paths: PackedStringArray, selected_filter_index: int. On Android, the third callback argument (selected_filter_index) is always 0.
Note: This method is implemented if the display server has the DisplayServer.Feature.NativeDialogFile feature. Supported platforms include Linux (X11/Wayland), Windows, macOS, and Android.
Note: current_directory might be ignored.
Note: Embedded file dialogs and Windows file dialogs support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types.
Note: On Android and Linux, show_hidden is ignored.
Note: On Android and macOS, native file dialogs have no title.
Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use OS.GetGrantedPermissions to get a list of saved bookmarks.
Note: On Android, this method uses the Android Storage Access Framework (SAF).
The file picker returns a URI instead of a filesystem path. This URI can be passed directly to FileAccess to perform read/write operations.
When using DisplayServer.FileDialogMode.OpenDir, it returns a tree URI that grants full access to the selected directory. File operations inside this directory can be performed by passing a path on the form treeUri#relative/path/to/file to FileAccess.
To avoid opening the file picker again after each app restart, you can take persistable URI permission as follows:
The persistable URI permission remains valid across app restarts as long as the directory is not moved, renamed, or deleted.
| Name | Type | Default |
|---|---|---|
title | string | — |
currentDirectory | string | — |
fileName | string | — |
showHidden | bool | — |
mode | DisplayServer.FileDialogMode | — |
filters | string[] | — |
callback | Callable | — |
parentWindowId | int | 0 |
ErrorFileDialogWithOptionsShow4 overloads
public static Error FileDialogWithOptionsShow(string title, string currentDirectory, string root, string fileName, bool showHidden, DisplayServer.FileDialogMode mode, ReadOnlySpan<string> filters, Reckfell.Collections.Array<Reckfell.Collections.Dictionary> options, Callable callback);Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
Each filter string in the filters array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also FileDialog.Filters.
options is array of Reckfell.Collections.Dictionarys with the following keys:
"name"- option's namestring."values"-string[]of values. If empty, boolean option (check box) is used."default"- default selected option index ([int]) or default boolean value ([bool]). Callbacks have the following arguments:status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary. Note: This method is implemented if the display server has theDisplayServer.Feature.NativeDialogFileExtrafeature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. Note:current_directorymight be ignored. Note: Embedded file dialogs and Windows file dialogs support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types. Note: On Linux (X11),show_hiddenis ignored. Note: On macOS, native file dialogs have no title. Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. UseOS.GetGrantedPermissionsto get a list of saved bookmarks.
| Name | Type | Default |
|---|---|---|
title | string | — |
currentDirectory | string | — |
root | string | — |
fileName | string | — |
showHidden | bool | — |
mode | DisplayServer.FileDialogMode | — |
filters | ReadOnlySpan<string> | — |
options | Reckfell.Collections.Array<Reckfell.Collections.Dictionary> | — |
callback | Callable | — |
Errorpublic static Error FileDialogWithOptionsShow(string title, string currentDirectory, string root, string fileName, bool showHidden, DisplayServer.FileDialogMode mode, ReadOnlySpan<string> filters, Reckfell.Collections.Array<Reckfell.Collections.Dictionary> options, Callable callback, int parentWindowId);Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
Each filter string in the filters array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also FileDialog.Filters.
options is array of Reckfell.Collections.Dictionarys with the following keys:
"name"- option's namestring."values"-string[]of values. If empty, boolean option (check box) is used."default"- default selected option index ([int]) or default boolean value ([bool]). Callbacks have the following arguments:status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary. Note: This method is implemented if the display server has theDisplayServer.Feature.NativeDialogFileExtrafeature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. Note:current_directorymight be ignored. Note: Embedded file dialogs and Windows file dialogs support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types. Note: On Linux (X11),show_hiddenis ignored. Note: On macOS, native file dialogs have no title. Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. UseOS.GetGrantedPermissionsto get a list of saved bookmarks.
| Name | Type | Default |
|---|---|---|
title | string | — |
currentDirectory | string | — |
root | string | — |
fileName | string | — |
showHidden | bool | — |
mode | DisplayServer.FileDialogMode | — |
filters | ReadOnlySpan<string> | — |
options | Reckfell.Collections.Array<Reckfell.Collections.Dictionary> | — |
callback | Callable | — |
parentWindowId | int | — |
Errorpublic static Error FileDialogWithOptionsShow(string title, string currentDirectory, string root, string fileName, bool showHidden, DisplayServer.FileDialogMode mode, string[] filters, Reckfell.Collections.Array<Reckfell.Collections.Dictionary> options, Callable callback);Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
Each filter string in the filters array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also FileDialog.Filters.
options is array of Reckfell.Collections.Dictionarys with the following keys:
"name"- option's namestring."values"-string[]of values. If empty, boolean option (check box) is used."default"- default selected option index ([int]) or default boolean value ([bool]). Callbacks have the following arguments:status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary. Note: This method is implemented if the display server has theDisplayServer.Feature.NativeDialogFileExtrafeature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. Note:current_directorymight be ignored. Note: Embedded file dialogs and Windows file dialogs support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types. Note: On Linux (X11),show_hiddenis ignored. Note: On macOS, native file dialogs have no title. Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. UseOS.GetGrantedPermissionsto get a list of saved bookmarks.
| Name | Type | Default |
|---|---|---|
title | string | — |
currentDirectory | string | — |
root | string | — |
fileName | string | — |
showHidden | bool | — |
mode | DisplayServer.FileDialogMode | — |
filters | string[] | — |
options | Reckfell.Collections.Array<Reckfell.Collections.Dictionary> | — |
callback | Callable | — |
Errorpublic static Error FileDialogWithOptionsShow(string title, string currentDirectory, string root, string fileName, bool showHidden, DisplayServer.FileDialogMode mode, string[] filters, Reckfell.Collections.Array<Reckfell.Collections.Dictionary> options, Callable callback, int parentWindowId = 0);Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
Each filter string in the filters array should be formatted like this: *.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also FileDialog.Filters.
options is array of Reckfell.Collections.Dictionarys with the following keys:
"name"- option's namestring."values"-string[]of values. If empty, boolean option (check box) is used."default"- default selected option index ([int]) or default boolean value ([bool]). Callbacks have the following arguments:status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary. Note: This method is implemented if the display server has theDisplayServer.Feature.NativeDialogFileExtrafeature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. Note:current_directorymight be ignored. Note: Embedded file dialogs and Windows file dialogs support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types. Note: On Linux (X11),show_hiddenis ignored. Note: On macOS, native file dialogs have no title. Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. UseOS.GetGrantedPermissionsto get a list of saved bookmarks.
| Name | Type | Default |
|---|---|---|
title | string | — |
currentDirectory | string | — |
root | string | — |
fileName | string | — |
showHidden | bool | — |
mode | DisplayServer.FileDialogMode | — |
filters | string[] | — |
options | Reckfell.Collections.Array<Reckfell.Collections.Dictionary> | — |
callback | Callable | — |
parentWindowId | int | 0 |
ErrorForceProcessAndDropEventsvoid
public static void ForceProcessAndDropEvents();Forces window manager processing while ignoring all InputEvents. See also DisplayServer.ProcessEvents.
Note: This method is implemented on Windows and macOS.
GetAccentColorColor
public static Color GetAccentColor();Returns OS theme accent color. Returns Color(0, 0, 0, 0), if accent color is unknown.
Note: This method is implemented on macOS, Windows, Android, and Linux (X11/Wayland).
ColorGetBaseColorColor
public static Color GetBaseColor();Returns the OS theme base color (default control background). Returns Color(0, 0, 0, 0) if the base color is unknown.
Note: This method is implemented on macOS, Windows, and Android.
ColorGetDisplayCutouts2 overloads
public static Reckfell.Collections.Array<Rect2> GetDisplayCutouts();Returns an Reckfell.Collections.Array of Rect2, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also DisplayServer.GetDisplaySafeArea.
Note: The returned rectangles are relative to the physical screen and not the virtual desktop.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: Currently only implemented on Android and macOS. Other platforms will return an empty array even if they do have display cutouts or notches.
Reckfell.Collections.Array<Rect2>public static Reckfell.Collections.Array<Rect2> GetDisplayCutouts(int screen = -1);Returns an Reckfell.Collections.Array of Rect2, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also DisplayServer.GetDisplaySafeArea.
Note: The returned rectangles are relative to the physical screen and not the virtual desktop.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: Currently only implemented on Android and macOS. Other platforms will return an empty array even if they do have display cutouts or notches.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
Reckfell.Collections.Array<Rect2>GetDisplaySafeArea2 overloads
public static Rect2I GetDisplaySafeArea();Returns the unobscured area of the display where interactive controls should be rendered. See also DisplayServer.GetDisplayCutouts.
Note: The returned rectangle is relative to the physical screen and not the virtual desktop.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: Currently only implemented on Android, iOS, and macOS. On other platforms, screen_get_usable_rect(SCREEN_OF_MAIN_WINDOW) will be returned as a fallback. See also DisplayServer.ScreenGetUsableRect.
Rect2Ipublic static Rect2I GetDisplaySafeArea(int screen = -1);Returns the unobscured area of the display where interactive controls should be rendered. See also DisplayServer.GetDisplayCutouts.
Note: The returned rectangle is relative to the physical screen and not the virtual desktop.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: Currently only implemented on Android, iOS, and macOS. On other platforms, screen_get_usable_rect(SCREEN_OF_MAIN_WINDOW) will be returned as a fallback. See also DisplayServer.ScreenGetUsableRect.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
Rect2IGetKeyboardFocusScreenint
public static int GetKeyboardFocusScreen();Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. Note: This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns the primary screen.
intGetNamestring
public static string GetName();Returns the name of the DisplayServer currently in use. Most operating systems only have a single DisplayServer, but Linux has access to more than one DisplayServer (currently X11 and Wayland).
The names of built-in display servers are Windows, macOS, X11 (Linux), Wayland (Linux), Android, iOS, web (HTML5), and headless (when started with the --headless command line argument).
stringGetPrimaryScreenint
public static int GetPrimaryScreen();Returns the index of the primary screen.
Note: This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns 0.
intGetScreenCountint
public static int GetScreenCount();Returns the number of displays available.
Note: This method is implemented on Linux (X11 and Wayland), macOS, and Windows. On other platforms, this method always returns 1.
intGetScreenFromRectint
public static int GetScreenFromRect(Rect2 rect);Returns the index of the screen that overlaps the most with the given rectangle. Returns DisplayServer.InvalidScreen if the rectangle doesn't overlap with any screen or has no area.
| Name | Type | Default |
|---|---|---|
rect | Rect2 | — |
intGetSwapCancelOkbool
public static bool GetSwapCancelOk();Returns true if positions of OK and Cancel buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing ProjectSettings.gui/common/swap_cancel_ok.
Note: This doesn't affect native dialogs such as the ones spawned by DisplayServer.DialogShow.
boolGetWindowAtScreenPositionint
public static int GetWindowAtScreenPosition(Vector2I position);Returns the ID of the window at the specified screen position (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
* (0, 0) ┌───────┐
│ │
┌─────────────┐ │ │
│ │ │ │
│ │ │ │
└─────────────┘ └───────┘| Name | Type | Default |
|---|---|---|
position | Vector2I | — |
intGetWindowListint[]
public static int[] GetWindowList();Returns the list of Reckfell window IDs belonging to this process. Note: Native dialogs are not included in this list.
int[]GlobalMenuAddCheckItemint · Deprecated
public static int GlobalMenuAddCheckItem(string menuRoot, string label, Callable callback = default, Callable keyCallback = default, Variant tag = default, Key accelerator = Key.None, int index = -1);Adds a new checkable item with text label to the global menu with ID menu_root.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
An accelerator can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The accelerator is generally a combination of KeyModifierMasks and Keys using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).
Note: The callback and key_callback Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to tag.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
label | string | — |
callback | Callable | default |
keyCallback | Callable | default |
tag | Variant | default |
accelerator | Key | Key.None |
index | int | -1 |
intGlobalMenuAddIconCheckItemint · Deprecated
public static int GlobalMenuAddIconCheckItem(string menuRoot, Texture2D icon, string label, Callable callback = default, Callable keyCallback = default, Variant tag = default, Key accelerator = Key.None, int index = -1);Adds a new checkable item with text label and icon icon to the global menu with ID menu_root.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
An accelerator can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The accelerator is generally a combination of KeyModifierMasks and Keys using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).
Note: The callback and key_callback Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to tag.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
icon | Texture2D | — |
label | string | — |
callback | Callable | default |
keyCallback | Callable | default |
tag | Variant | default |
accelerator | Key | Key.None |
index | int | -1 |
intGlobalMenuAddIconItemint · Deprecated
public static int GlobalMenuAddIconItem(string menuRoot, Texture2D icon, string label, Callable callback = default, Callable keyCallback = default, Variant tag = default, Key accelerator = Key.None, int index = -1);Adds a new item with text label and icon icon to the global menu with ID menu_root.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
An accelerator can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The accelerator is generally a combination of KeyModifierMasks and Keys using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).
Note: The callback and key_callback Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to tag.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
icon | Texture2D | — |
label | string | — |
callback | Callable | default |
keyCallback | Callable | default |
tag | Variant | default |
accelerator | Key | Key.None |
index | int | -1 |
intGlobalMenuAddIconRadioCheckItemint · Deprecated
public static int GlobalMenuAddIconRadioCheckItem(string menuRoot, Texture2D icon, string label, Callable callback = default, Callable keyCallback = default, Variant tag = default, Key accelerator = Key.None, int index = -1);Adds a new radio-checkable item with text label and icon icon to the global menu with ID menu_root.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
An accelerator can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The accelerator is generally a combination of KeyModifierMasks and Keys using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).
Note: Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See DisplayServer.GlobalMenuSetItemChecked for more info on how to control it.
Note: The callback and key_callback Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to tag.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
icon | Texture2D | — |
label | string | — |
callback | Callable | default |
keyCallback | Callable | default |
tag | Variant | default |
accelerator | Key | Key.None |
index | int | -1 |
intGlobalMenuAddItemint · Deprecated
public static int GlobalMenuAddItem(string menuRoot, string label, Callable callback = default, Callable keyCallback = default, Variant tag = default, Key accelerator = Key.None, int index = -1);Adds a new item with text label to the global menu with ID menu_root.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
An accelerator can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The accelerator is generally a combination of KeyModifierMasks and Keys using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).
Note: The callback and key_callback Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to tag.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
label | string | — |
callback | Callable | default |
keyCallback | Callable | default |
tag | Variant | default |
accelerator | Key | Key.None |
index | int | -1 |
intGlobalMenuAddMultistateItemint · Deprecated
public static int GlobalMenuAddMultistateItem(string menuRoot, string label, int maxStates, int defaultState, Callable callback = default, Callable keyCallback = default, Variant tag = default, Key accelerator = Key.None, int index = -1);Adds a new item with text label to the global menu with ID menu_root.
Contrarily to normal binary items, multistate items can have more than two states, as defined by max_states. Each press or activate of the item will increase the state by one. The default value is defined by default_state.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
An accelerator can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The accelerator is generally a combination of KeyModifierMasks and Keys using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).
Note: By default, there's no indication of the current item state, it should be changed manually.
Note: The callback and key_callback Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to tag.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
label | string | — |
maxStates | int | — |
defaultState | int | — |
callback | Callable | default |
keyCallback | Callable | default |
tag | Variant | default |
accelerator | Key | Key.None |
index | int | -1 |
intGlobalMenuAddRadioCheckItemint · Deprecated
public static int GlobalMenuAddRadioCheckItem(string menuRoot, string label, Callable callback = default, Callable keyCallback = default, Variant tag = default, Key accelerator = Key.None, int index = -1);Adds a new radio-checkable item with text label to the global menu with ID menu_root.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
An accelerator can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The accelerator is generally a combination of KeyModifierMasks and Keys using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).
Note: Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See DisplayServer.GlobalMenuSetItemChecked for more info on how to control it.
Note: The callback and key_callback Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to tag.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
label | string | — |
callback | Callable | default |
keyCallback | Callable | default |
tag | Variant | default |
accelerator | Key | Key.None |
index | int | -1 |
intGlobalMenuAddSeparatorint · Deprecated
public static int GlobalMenuAddSeparator(string menuRoot, int index = -1);Adds a separator between items to the global menu with ID menu_root. Separators also occupy an index.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
index | int | -1 |
intGlobalMenuAddSubmenuItemint · Deprecated
public static int GlobalMenuAddSubmenuItem(string menuRoot, string label, string submenu, int index = -1);Adds an item that will act as a submenu of the global menu menu_root. The submenu argument is the ID of the global menu root that will be shown when the item is clicked.
Returns index of the inserted item, it's not guaranteed to be the same as index value.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
label | string | — |
submenu | string | — |
index | int | -1 |
intGlobalMenuClearvoid · Deprecated
public static void GlobalMenuClear(string menuRoot);Removes all items from the global menu with ID menu_root.
Note: This method is implemented only on macOS.
Supported system menu IDs:
"_main" - Main menu (macOS).
"_dock" - Dock popup menu (macOS).
"_apple" - Apple menu (macOS, custom items added before "Services").
"_window" - Window menu (macOS, custom items added after "Bring All to Front").
"_help" - Help menu (macOS).| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
GlobalMenuGetItemAcceleratorKey · Deprecated
public static Key GlobalMenuGetItemAccelerator(string menuRoot, int idx);Returns the accelerator of the item at index idx. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
KeyGlobalMenuGetItemCallbackCallable · Deprecated
public static Callable GlobalMenuGetItemCallback(string menuRoot, int idx);Returns the callback of the item at index idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
CallableGlobalMenuGetItemCountint · Deprecated
public static int GlobalMenuGetItemCount(string menuRoot);Returns number of items in the global menu with ID menu_root.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
intGlobalMenuGetItemIconTexture2D · Deprecated
public static Texture2D GlobalMenuGetItemIcon(string menuRoot, int idx);Returns the icon of the item at index idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
Texture2DGlobalMenuGetItemIndentationLevelint · Deprecated
public static int GlobalMenuGetItemIndentationLevel(string menuRoot, int idx);Returns the horizontal offset of the item at the given idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
intGlobalMenuGetItemIndexFromTagint · Deprecated
public static int GlobalMenuGetItemIndexFromTag(string menuRoot, Variant tag);Returns the index of the item with the specified tag. Indices are automatically assigned to each item by the engine, and cannot be set manually.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
tag | Variant | — |
intGlobalMenuGetItemIndexFromTextint · Deprecated
public static int GlobalMenuGetItemIndexFromText(string menuRoot, string text);Returns the index of the item with the specified text. Indices are automatically assigned to each item by the engine, and cannot be set manually.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
text | string | — |
intGlobalMenuGetItemKeyCallbackCallable · Deprecated
public static Callable GlobalMenuGetItemKeyCallback(string menuRoot, int idx);Returns the callback of the item accelerator at index idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
CallableGlobalMenuGetItemMaxStatesint · Deprecated
public static int GlobalMenuGetItemMaxStates(string menuRoot, int idx);Returns number of states of a multistate item. See DisplayServer.GlobalMenuAddMultistateItem for details.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
intGlobalMenuGetItemStateint · Deprecated
public static int GlobalMenuGetItemState(string menuRoot, int idx);Returns the state of a multistate item. See DisplayServer.GlobalMenuAddMultistateItem for details.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
intGlobalMenuGetItemSubmenustring · Deprecated
public static string GlobalMenuGetItemSubmenu(string menuRoot, int idx);Returns the submenu ID of the item at index idx. See DisplayServer.GlobalMenuAddSubmenuItem for more info on how to add a submenu.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
stringGlobalMenuGetItemTagVariant · Deprecated
public static Variant GlobalMenuGetItemTag(string menuRoot, int idx);Returns the metadata of the specified item, which might be of any type. You can set it with DisplayServer.GlobalMenuSetItemTag, which provides a simple way of assigning context data to items.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
VariantGlobalMenuGetItemTextstring · Deprecated
public static string GlobalMenuGetItemText(string menuRoot, int idx);Returns the text of the item at index idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
stringGlobalMenuGetItemTooltipstring · Deprecated
public static string GlobalMenuGetItemTooltip(string menuRoot, int idx);Returns the tooltip associated with the specified index idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
stringGlobalMenuGetSystemMenuRootsReckfell.Collections.Dictionary · Deprecated
public static Reckfell.Collections.Dictionary GlobalMenuGetSystemMenuRoots();Returns Dictionary of supported system menu IDs and names. Note: This method is implemented only on macOS.
Reckfell.Collections.DictionaryGlobalMenuIsItemCheckablebool · Deprecated
public static bool GlobalMenuIsItemCheckable(string menuRoot, int idx);Returns true if the item at index idx is checkable in some way, i.e. if it has a checkbox or radio button.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
boolGlobalMenuIsItemCheckedbool · Deprecated
public static bool GlobalMenuIsItemChecked(string menuRoot, int idx);Returns true if the item at index idx is checked.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
boolGlobalMenuIsItemDisabledbool · Deprecated
public static bool GlobalMenuIsItemDisabled(string menuRoot, int idx);Returns true if the item at index idx is disabled. When it is disabled it can't be selected, or its action invoked.
See DisplayServer.GlobalMenuSetItemDisabled for more info on how to disable an item.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
boolpublic static bool GlobalMenuIsItemHidden(string menuRoot, int idx);Returns true if the item at index idx is hidden.
See DisplayServer.GlobalMenuSetItemHidden for more info on how to hide an item.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
boolGlobalMenuIsItemRadioCheckablebool · Deprecated
public static bool GlobalMenuIsItemRadioCheckable(string menuRoot, int idx);Returns true if the item at index idx has radio button-style checkability.
Note: This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
boolGlobalMenuRemoveItemvoid · Deprecated
public static void GlobalMenuRemoveItem(string menuRoot, int idx);Removes the item at index idx from the global menu menu_root.
Note: The indices of items after the removed item will be shifted by one.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
GlobalMenuSetItemAcceleratorvoid · Deprecated
public static void GlobalMenuSetItemAccelerator(string menuRoot, int idx, Key keycode);Sets the accelerator of the item at index idx. keycode can be a single Key, or a combination of KeyModifierMasks and Keys using bitwise OR such as KEY_MASK_CTRL | KEY_A ([kbd]Ctrl + A[/kbd]).
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
keycode | Key | — |
GlobalMenuSetItemCallbackvoid · Deprecated
public static void GlobalMenuSetItemCallback(string menuRoot, int idx, Callable callback);Sets the callback of the item at index idx. Callback is emitted when an item is pressed.
Note: The callback Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
callback | Callable | — |
GlobalMenuSetItemCheckablevoid · Deprecated
public static void GlobalMenuSetItemCheckable(string menuRoot, int idx, bool checkable);Sets whether the item at index idx has a checkbox. If false, sets the type of the item to plain text.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
checkable | bool | — |
GlobalMenuSetItemCheckedvoid · Deprecated
public static void GlobalMenuSetItemChecked(string menuRoot, int idx, bool @checked);Sets the checkstate status of the item at index idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
checked | bool | — |
GlobalMenuSetItemDisabledvoid · Deprecated
public static void GlobalMenuSetItemDisabled(string menuRoot, int idx, bool disabled);Enables/disables the item at index idx. When it is disabled, it can't be selected and its action can't be invoked.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
disabled | bool | — |
public static void GlobalMenuSetItemHidden(string menuRoot, int idx, bool hidden);Hides/shows the item at index idx. When it is hidden, an item does not appear in a menu and its action cannot be invoked.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
hidden | bool | — |
GlobalMenuSetItemHoverCallbacksvoid · Deprecated
public static void GlobalMenuSetItemHoverCallbacks(string menuRoot, int idx, Callable callback);Sets the callback of the item at index idx. The callback is emitted when an item is hovered.
Note: The callback Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
callback | Callable | — |
GlobalMenuSetItemIconvoid · Deprecated
public static void GlobalMenuSetItemIcon(string menuRoot, int idx, Texture2D icon);Replaces the Texture2D icon of the specified idx.
Note: This method is implemented only on macOS.
Note: This method is not supported by macOS "_dock" menu items.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
icon | Texture2D | — |
GlobalMenuSetItemIndentationLevelvoid · Deprecated
public static void GlobalMenuSetItemIndentationLevel(string menuRoot, int idx, int level);Sets the horizontal offset of the item at the given idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
level | int | — |
GlobalMenuSetItemKeyCallbackvoid · Deprecated
public static void GlobalMenuSetItemKeyCallback(string menuRoot, int idx, Callable keyCallback);Sets the callback of the item at index idx. Callback is emitted when its accelerator is activated.
Note: The key_callback Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
keyCallback | Callable | — |
GlobalMenuSetItemMaxStatesvoid · Deprecated
public static void GlobalMenuSetItemMaxStates(string menuRoot, int idx, int maxStates);Sets number of state of a multistate item. See DisplayServer.GlobalMenuAddMultistateItem for details.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
maxStates | int | — |
GlobalMenuSetItemRadioCheckablevoid · Deprecated
public static void GlobalMenuSetItemRadioCheckable(string menuRoot, int idx, bool checkable);Sets the type of the item at the specified index idx to radio button. If false, sets the type of the item to plain text.
Note: This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
checkable | bool | — |
GlobalMenuSetItemStatevoid · Deprecated
public static void GlobalMenuSetItemState(string menuRoot, int idx, int state);Sets the state of a multistate item. See DisplayServer.GlobalMenuAddMultistateItem for details.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
state | int | — |
GlobalMenuSetItemSubmenuvoid · Deprecated
public static void GlobalMenuSetItemSubmenu(string menuRoot, int idx, string submenu);Sets the submenu of the item at index idx. The submenu is the ID of a global menu root that would be shown when the item is clicked.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
submenu | string | — |
GlobalMenuSetItemTagvoid · Deprecated
public static void GlobalMenuSetItemTag(string menuRoot, int idx, Variant tag);Sets the metadata of an item, which may be of any type. You can later get it with DisplayServer.GlobalMenuGetItemTag, which provides a simple way of assigning context data to items.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
tag | Variant | — |
GlobalMenuSetItemTextvoid · Deprecated
public static void GlobalMenuSetItemText(string menuRoot, int idx, string text);Sets the text of the item at index idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
text | string | — |
GlobalMenuSetItemTooltipvoid · Deprecated
public static void GlobalMenuSetItemTooltip(string menuRoot, int idx, string tooltip);Sets the string tooltip of the item at the specified index idx.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
idx | int | — |
tooltip | string | — |
GlobalMenuSetPopupCallbacksvoid · Deprecated
public static void GlobalMenuSetPopupCallbacks(string menuRoot, Callable openCallback, Callable closeCallback);Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments.
| Name | Type | Default |
|---|---|---|
menuRoot | string | — |
openCallback | Callable | — |
closeCallback | Callable | — |
HasAdditionalOutputsbool
public static bool HasAdditionalOutputs();Returns true if any additional outputs have been registered via DisplayServer.RegisterAdditionalOutput.
boolHasFeaturebool
public static bool HasFeature(DisplayServer.Feature feature);Returns true if the specified feature is supported by the current DisplayServer, false otherwise.
| Name | Type | Default |
|---|---|---|
feature | DisplayServer.Feature | — |
boolHasHardwareKeyboardbool
public static bool HasHardwareKeyboard();Returns true if a hardware keyboard is connected.
Note: This method is implemented on Android and iOS. On other platforms, this method always returns true.
boolHelpSetSearchCallbacksvoid
public static void HelpSetSearchCallbacks(Callable searchCallback, Callable actionCallback);Sets native help system search callbacks.
search_callback has the following arguments: String search_string, int result_limit and return a Reckfell.Collections.Dictionary with "key, display name" pairs for the search results. Called when the user enters search terms in the Help menu.
action_callback has the following arguments: String key. Called when the user selects a search result in the Help menu.
Note: This method is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
searchCallback | Callable | — |
actionCallback | Callable | — |
HideToastNotificationvoid
public static void HideToastNotification(int id);Hides the toast notification with id returned by DisplayServer.SendToastNotification.
Note: This method is only implemented on Windows.
| Name | Type | Default |
|---|---|---|
id | int | — |
ImeGetSelectionVector2I
public static Vector2I ImeGetSelection();Returns the text selection in the Input Method Editor composition string, with the Vector2I's x component being the caret position and y being the length of the selection.
Note: This method is implemented only on macOS.
Vector2IImeGetTextstring
public static string ImeGetText();Returns the composition string contained within the Input Method Editor window. Note: This method is implemented only on macOS.
stringIsDarkModebool
public static bool IsDarkMode();Returns true if OS is using dark mode.
Note: This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
boolIsDarkModeSupportedbool
public static bool IsDarkModeSupported();Returns true if OS supports dark mode.
Note: This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
boolIsInPipModebool
public static bool IsInPipMode(int windowId = 0);Returns true if the application is in picture-in-picture mode.
Note: This method is implemented on Android.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
boolIsTouchscreenAvailablebool
public static bool IsTouchscreenAvailable();Returns true if touch events are available (Android or iOS), the capability is detected on the Web platform or if ProjectSettings.input_devices/pointing/emulate_touch_from_mouse is true.
boolIsWindowTransparencyAvailablebool
public static bool IsWindowTransparencyAvailable();Returns true if the window background can be made transparent. This method returns false if ProjectSettings.display/window/per_pixel_transparency/allowed is set to false, or if transparency is not supported by the renderer or OS compositor.
boolKeyboardGetCurrentLayoutint
public static int KeyboardGetCurrentLayout();Returns active keyboard layout index. Note: This method is implemented on Linux (X11/Wayland), macOS, and Windows.
intKeyboardGetKeycodeFromPhysicalKey
public static Key KeyboardGetKeycodeFromPhysical(Key keycode);Converts a physical (US QWERTY) keycode to one in the active keyboard layout.
Note: This method is implemented on Linux (X11/Wayland), macOS and Windows.
| Name | Type | Default |
|---|---|---|
keycode | Key | — |
KeyKeyboardGetLabelFromPhysicalKey
public static Key KeyboardGetLabelFromPhysical(Key keycode);Converts a physical (US QWERTY) keycode to localized label printed on the key in the active keyboard layout.
Note: This method is implemented on Linux (X11/Wayland), macOS and Windows.
| Name | Type | Default |
|---|---|---|
keycode | Key | — |
KeyKeyboardGetLayoutCountint
public static int KeyboardGetLayoutCount();Returns the number of keyboard layouts. Note: This method is implemented on Linux (X11/Wayland), macOS and Windows.
intKeyboardGetLayoutLanguagestring
public static string KeyboardGetLayoutLanguage(int index);Returns the ISO-639/BCP-47 language code of the keyboard layout at position index.
Note: This method is implemented on Linux (X11/Wayland), macOS and Windows.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringKeyboardGetLayoutNamestring
public static string KeyboardGetLayoutName(int index);Returns the localized name of the keyboard layout at position index.
Note: This method is implemented on Linux (X11/Wayland), macOS and Windows.
| Name | Type | Default |
|---|---|---|
index | int | — |
stringKeyboardSetCurrentLayoutvoid
public static void KeyboardSetCurrentLayout(int index);Sets the active keyboard layout. Note: This method is implemented on Linux (X11/Wayland), macOS and Windows.
| Name | Type | Default |
|---|---|---|
index | int | — |
MouseGetButtonStateMouseButtonMask
public static MouseButtonMask MouseGetButtonState();Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to Input.GetMouseButtonMask.
MouseButtonMaskMouseGetModeDisplayServer.MouseMode
public static DisplayServer.MouseMode MouseGetMode();Returns the current mouse mode. See also DisplayServer.MouseSetMode.
DisplayServer.MouseModeMouseGetPositionVector2I
public static Vector2I MouseGetPosition();Returns the mouse cursor's current position in screen coordinates.
Vector2IMouseSetModevoid
public static void MouseSetMode(DisplayServer.MouseMode mouseMode);Sets the current mouse mode. See also DisplayServer.MouseGetMode.
| Name | Type | Default |
|---|---|---|
mouseMode | DisplayServer.MouseMode | — |
PipModeEntervoid
public static void PipModeEnter(int windowId = 0);Enters picture-in-picture mode. Note: This method is implemented on Android.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
PipModeSetAspectRatiovoid
public static void PipModeSetAspectRatio(int numerator, int denominator, int windowId = 0);Specifies the aspect ratio for picture-in-picture mode. Note: This method is implemented on Android.
| Name | Type | Default |
|---|---|---|
numerator | int | — |
denominator | int | — |
windowId | int | 0 |
PipModeSetAutoEnterOnBackgroundvoid
public static void PipModeSetAutoEnterOnBackground(bool autoEnterOnBackground, int windowId = 0);Specifies whether picture-in-picture mode should be entered automatically when the application goes in the background. Note: This method is implemented on Android.
| Name | Type | Default |
|---|---|---|
autoEnterOnBackground | bool | — |
windowId | int | 0 |
ProcessEventsvoid
public static void ProcessEvents();Perform window manager processing, including input flushing. See also DisplayServer.ForceProcessAndDropEvents, Input.FlushBufferedEvents and Input.UseAccumulatedInput.
RegisterAdditionalOutputvoid
public static void RegisterAdditionalOutput(ReckfellObject @object);Registers an ReckfellObject which represents an additional output that will be rendered too, beyond normal windows. The ReckfellObject is only used as an identifier, which can be later passed to DisplayServer.UnregisterAdditionalOutput.
This can be used to prevent Reckfell from skipping rendering when no normal windows are visible.
| Name | Type | Default |
|---|---|---|
object | ReckfellObject | — |
ScreenGetDpiint
public static int ScreenGetDpi(int screen = -1);Returns the dots per inch density of the specified screen. Returns platform specific default value if screen is invalid.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: On macOS, returned value is inaccurate if fractional display scaling mode is used.
Note: On Android devices, the actual screen densities are grouped into six generalized densities:
ldpi - 120 dpi
mdpi - 160 dpi
hdpi - 240 dpi
xhdpi - 320 dpi
xxhdpi - 480 dpi
xxxhdpi - 640 dpiNote: This method is implemented on Android, iOS, Linux (X11/Wayland), macOS, Web, and Windows. On other platforms, this method always returns 72.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
intScreenGetImageImage
public static Image ScreenGetImage(int screen = -1);Returns a screenshot of the screen. Returns null if screen is invalid or the DisplayServer fails to capture screenshot.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: This method is implemented on Linux (X11, excluding XWayland), macOS, and Windows. On other platforms, this method always returns null.
Note: On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will not include other application windows or OS elements not related to the application.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
ImageScreenGetImageRectImage
public static Image ScreenGetImageRect(Rect2I rect);Returns a screenshot of the screen region defined by rect. Returns null if rect is outside screen bounds or the DisplayServer fails to capture screenshot.
Note: This method is implemented on macOS and Windows. On other platforms, this method always returns null.
Note: On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will not include other application windows or OS elements not related to the application.
| Name | Type | Default |
|---|---|---|
rect | Rect2I | — |
ImageScreenGetMaxScalefloat
public static float ScreenGetMaxScale();Returns the greatest scale factor of all screens. See also DisplayServer.ScreenGetScale.
Note: On macOS, the returned value is 2.0 if there is at least one hiDPI (Retina) screen in the system, and 1.0 in all other cases.
floatScreenGetOrientationDisplayServer.ScreenOrientation
public static DisplayServer.ScreenOrientation ScreenGetOrientation(int screen = -1);Returns the screen's current orientation. See also DisplayServer.ScreenSetOrientation. Returns DisplayServer.ScreenOrientation.Landscape if screen is invalid.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: This method is implemented on Android and iOS. On other platforms, this method always returns DisplayServer.ScreenOrientation.Landscape.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
DisplayServer.ScreenOrientationScreenGetPixelColor
public static Color ScreenGetPixel(Vector2I position);Returns the color of the pixel at the given screen position. On multi-monitor setups, the screen position is relative to the virtual desktop area.
Note: This method is implemented on Linux (X11, excluding XWayland), macOS, and Windows. On other platforms, this method always returns Color(0, 0, 0, 1).
Note: On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a color from a screenshot that will not include other application windows or OS elements not related to the application.
| Name | Type | Default |
|---|---|---|
position | Vector2I | — |
ColorScreenGetPositionVector2I
public static Vector2I ScreenGetPosition(int screen = -1);Returns the screen's top-left corner position in pixels. Returns Vector2I.Zero if screen is invalid. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin might be located outside any display like this:
* (0, 0) ┌───────┐
│ │
┌─────────────┐ │ │
│ │ │ │
│ │ │ │
└─────────────┘ └───────┘See also DisplayServer.ScreenGetSize.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
Vector2IScreenGetRefreshRatefloat
public static float ScreenGetRefreshRate(int screen = -1);Returns the current refresh rate of the specified screen. When V-Sync is enabled, this returns the maximum framerate the project can effectively reach. Returns -1.0 if screen is invalid or the DisplayServer fails to find the refresh rate for the specified screen.
To fallback to a default refresh rate if the method fails, try:
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: This method is implemented on Android, iOS, macOS, Linux (X11 and Wayland), and Windows. On other platforms, this method always returns -1.0.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
floatScreenGetScalefloat
public static float ScreenGetScale(int screen = -1);Returns the scale factor of the specified screen by index. Returns 1.0 if screen is invalid. See also DisplayServer.ScreenGetMaxScale.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: On macOS, the returned value is 2.0 for hiDPI (Retina) screens, and 1.0 for all other cases.
Note: On Linux (Wayland), the returned value is accurate only when screen is DisplayServer.ScreenOfMainWindow. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. 1.25 would get rounded up to 2.0).
Note: This method is implemented on Android, iOS, Web, macOS, Linux, and Windows. On other platforms, this method always returns 1.0.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
floatScreenGetSizeVector2I
public static Vector2I ScreenGetSize(int screen = -1);Returns the screen's size in pixels. See also DisplayServer.ScreenGetPosition and DisplayServer.ScreenGetUsableRect. Returns Vector2I.Zero if screen is invalid.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
Vector2IScreenGetUsableRectRect2I
public static Rect2I ScreenGetUsableRect(int screen = -1);Returns the portion of the screen that is not obstructed by a status bar in pixels. See also DisplayServer.ScreenGetSize.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns Rect2i(screen_get_position(screen), screen_get_size(screen)).
| Name | Type | Default |
|---|---|---|
screen | int | -1 |
Rect2IScreenIsKeptOnbool
public static bool ScreenIsKeptOn();Returns true if the screen should never be turned off by the operating system's power-saving measures. See also DisplayServer.ScreenSetKeepOn.
boolScreenSetKeepOnvoid
public static void ScreenSetKeepOn(bool enable);Sets whether the screen should never be turned off by the operating system's power-saving measures. See also DisplayServer.ScreenIsKeptOn.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
ScreenSetOrientationvoid
public static void ScreenSetOrientation(DisplayServer.ScreenOrientation orientation, int screen = -1);Sets the screen's orientation. See also DisplayServer.ScreenGetOrientation.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: This method is implemented on Android and iOS.
Note: On iOS, this method has no effect if ProjectSettings.display/window/handheld/orientation is not set to DisplayServer.ScreenOrientation.Sensor.
| Name | Type | Default |
|---|---|---|
orientation | DisplayServer.ScreenOrientation | — |
screen | int | -1 |
SendToastNotificationint
public static int SendToastNotification(string title, string text, Texture2D image, Callable callback);Displays a toast notification with title, text, and optionally image. image should be square, have a maximum edge length of 512 pixels, and should not exceed 4 MB when encoded as PNG. callback should accept two arguments: DisplayServer.NotificationStatus. Returns the notification ID or DisplayServer.InvalidNotificationId if it failed.
Note: This method is only implemented on Windows.
| Name | Type | Default |
|---|---|---|
title | string | — |
text | string | — |
image | Texture2D | — |
callback | Callable | — |
intSetHardwareKeyboardConnectionChangeCallbackvoid
public static void SetHardwareKeyboardConnectionChangeCallback(Callable callable);Sets the callback that should be called when a hardware keyboard is connected or disconnected. callable should accept a single [bool] argument indicating whether the keyboard has been connected (true) or disconnected (false).
Note: This method is only implemented on Android.
| Name | Type | Default |
|---|---|---|
callable | Callable | — |
SetIconvoid
public static void SetIcon(Image image);Sets the application icon and icons of all windows with an Image. To use icons in the operating system's native format, use DisplayServer.SetNativeIcon instead.
Note: Requires support for DisplayServer.Feature.Icon.
| Name | Type | Default |
|---|---|---|
image | Image | — |
SetNativeIconvoid
public static void SetNativeIcon(string fileName);Sets the window icon (usually displayed in the top-left corner) in the operating system's native format. The file at filename must be in .ico format on Windows or .icns on macOS. By using specially crafted .ico or .icns icons, DisplayServer.SetNativeIcon allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use DisplayServer.SetIcon instead.
Note: Requires support for DisplayServer.Feature.NativeIcon.
| Name | Type | Default |
|---|---|---|
fileName | string | — |
SetSystemThemeChangeCallbackvoid
public static void SetSystemThemeChangeCallback(Callable callable);Sets the callback that should be called when the system's theme settings are changed. callable should accept zero arguments.
Note: This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
| Name | Type | Default |
|---|---|---|
callable | Callable | — |
ShowEmojiAndSymbolPickervoid
public static void ShowEmojiAndSymbolPicker();Opens system emoji and symbol picker. Note: This method is implemented on macOS and Windows.
StatusIndicatorGetRectRect2
public static Rect2 StatusIndicatorGetRect(int id);Returns the rectangle for the given status indicator id in screen coordinates. If the status indicator is not visible, returns an empty Rect2.
Note: This method is implemented on macOS and Windows.
| Name | Type | Default |
|---|---|---|
id | int | — |
Rect2StatusIndicatorSetCallbackvoid
public static void StatusIndicatorSetCallback(int id, Callable callback);Sets the application status indicator activation callback. callback should take two arguments: Vector2I click position in screen coordinates.
Note: This method is implemented on macOS and Windows.
| Name | Type | Default |
|---|---|---|
id | int | — |
callback | Callable | — |
StatusIndicatorSetIconvoid
public static void StatusIndicatorSetIcon(int id, Texture2D icon);Sets the application status indicator icon. Note: This method is implemented on macOS and Windows.
| Name | Type | Default |
|---|---|---|
id | int | — |
icon | Texture2D | — |
StatusIndicatorSetMenuvoid
public static void StatusIndicatorSetMenu(int id, Rid menuRid);Sets the application status indicator native popup menu.
Note: On macOS, the menu is activated by any mouse button. Its activation callback is not triggered.
Note: On Windows, the menu is activated by the right mouse button, selecting the status icon and pressing [kbd]Shift + F10[/kbd], or the applications key. The menu's activation callback for the other mouse buttons is still triggered.
Note: Native popup is only supported if NativeMenu supports the NativeMenu.Feature.PopupMenu feature.
| Name | Type | Default |
|---|---|---|
id | int | — |
menuRid | Rid | — |
StatusIndicatorSetTooltipvoid
public static void StatusIndicatorSetTooltip(int id, string tooltip);Sets the application status indicator tooltip. Note: This method is implemented on macOS and Windows.
| Name | Type | Default |
|---|---|---|
id | int | — |
tooltip | string | — |
TabletGetCurrentDriverstring
public static string TabletGetCurrentDriver();Returns current active tablet driver name. Note: This method is implemented only on Windows.
stringTabletGetDriverCountint
public static int TabletGetDriverCount();Returns the total number of available tablet drivers. Note: This method is implemented only on Windows.
intTabletGetDriverNamestring
public static string TabletGetDriverName(int idx);Returns the tablet driver name for the given index. Note: This method is implemented only on Windows.
| Name | Type | Default |
|---|---|---|
idx | int | — |
stringTabletSetCurrentDrivervoid
public static void TabletSetCurrentDriver(string name);Set active tablet driver name. Supported drivers:
winink: Windows Ink API, default.wintab: Wacom Wintab API (compatible device driver required).dummy: Dummy driver, tablet input is disabled. Note: This method is implemented only on Windows.
| Name | Type | Default |
|---|---|---|
name | string | — |
TtsGetVoicesReckfell.Collections.Array<Reckfell.Collections.Dictionary>
public static Reckfell.Collections.Array<Reckfell.Collections.Dictionary> TtsGetVoices();Returns an Reckfell.Collections.Array of voice information dictionaries.
Each Reckfell.Collections.Dictionary contains two string entries:
nameis voice name.idis voice identifier.languageis language code inlang_Variantformat. Thelangpart is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. The [code skip-lint]Variant` part is an engine-dependent string describing country, region or/and dialect. Note that Reckfell depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Reckfell users on Linux, as well as end-users on Linux running Reckfell games that use text-to-speech. Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
Reckfell.Collections.Array<Reckfell.Collections.Dictionary>TtsGetVoicesForLanguagestring[]
public static string[] TtsGetVoicesForLanguage(string language);Filters system voices by language-string prefix and returns IDs. Check TextToSpeech support before calling and do not index an empty array.
| Name | Type | Default |
|---|---|---|
language | string | — |
languageAvailable-voice language prefix, such as en. Do not assume text locale automatically matches the system voice designation.
string[]string[] of IDs. An empty result is valid; a previously saved ID may disappear after system changes.
TtsIsPausedbool
public static bool TtsIsPaused();Returns true if the synthesizer is in a paused state.
Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
boolTtsIsSpeakingbool
public static bool TtsIsSpeaking();Returns true if the synthesizer is generating speech, or have utterance waiting in the queue.
Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
boolTtsPausevoid
public static void TtsPause();Puts the synthesizer into a paused state. Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
TtsResumevoid
public static void TtsResume();Resumes the synthesizer if it was paused. Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
TtsSetUtteranceCallbackvoid
public static void TtsSetUtteranceCallback(DisplayServer.TtsUtteranceEvent @event, Callable callable);Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
DisplayServer.TtsUtteranceEvent.Started,DisplayServer.TtsUtteranceEvent.Ended, andDisplayServer.TtsUtteranceEvent.Canceledcallable's method should take one [int] parameter, the utterance ID.DisplayServer.TtsUtteranceEvent.Boundarycallable's method should take two [int] parameters, the index of the character and the utterance ID. Note: The granularity of the boundary callbacks is engine dependent. Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
| Name | Type | Default |
|---|---|---|
event | DisplayServer.TtsUtteranceEvent | — |
callable | Callable | — |
TtsSpeak2 overloads
public static void TtsSpeak(string text, string voice, int volume, float pitch, float rate, int utteranceId, bool interrupt);Adds an utterance to the queue. If interrupt is true, the queue is cleared first.
voiceidentifier is one of the"id"values returned byDisplayServer.TtsGetVoicesor one of the values returned byDisplayServer.TtsGetVoicesForLanguage.volumeranges from0(lowest) to100(highest).pitchranges from0.0(lowest) to2.0(highest),1.0is default pitch for the current voice.rateranges from0.1(lowest) to10.0(highest),1.0is a normal speaking rate. Other values act as a percentage relative.utterance_idis passed as a parameter to the callback functions. Note: On Windows and Linux (X11/Wayland), utterancetextcan use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before callingDisplayServer.TtsSpeak. Note: The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
| Name | Type | Default |
|---|---|---|
text | string | — |
voice | string | — |
volume | int | — |
pitch | float | — |
rate | float | — |
utteranceId | int | — |
interrupt | bool | — |
public static void TtsSpeak(string text, string voice, int volume = 50, float pitch = 1f, float rate = 1f, long utteranceId = 0, bool interrupt = false);Submits an asynchronous speech request. Returning does not mean speech ended. Check user narration preference, backend support, and selected voice; coordinate the shared queue.
| Name | Type | Default |
|---|---|---|
text | string | — |
voice | string | — |
volume | int | 50 |
pitch | float | 1f |
rate | float | 1f |
utteranceId | long | 0 |
interrupt | bool | false |
textMeaningful text to speak without UI markup.
voiceID from the current voice list, not a display name or language code alone.
volumeVolume 0–100, default 50. Respect the user narration setting.
pitchPitch, default 1. Actual sound depends on voice and backend.
rateRate, default 1. This is not an exact phrase duration in seconds.
utteranceIdint64 ID for correlating callbacks. Use long in C#, such as 0L, to select this overload.
interrupttrue to interrupt current speech for this request; false queues without that interruption.
TtsStopvoid
public static void TtsStop();Stops synthesis in progress and removes all utterances from the queue. Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
UnregisterAdditionalOutputvoid
public static void UnregisterAdditionalOutput(ReckfellObject @object);Unregisters an ReckfellObject representing an additional output, that was registered via DisplayServer.RegisterAdditionalOutput.
| Name | Type | Default |
|---|---|---|
object | ReckfellObject | — |
VirtualKeyboardGetHeightint
public static int VirtualKeyboardGetHeight();Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden.
Note: On Android 7 and 8, the keyboard height may return 0 the first time the keyboard is opened in non-immersive mode. This behavior does not occur in immersive mode.
intVirtualKeyboardHidevoid
public static void VirtualKeyboardHide();Hides the virtual keyboard if it is shown, does nothing otherwise.
VirtualKeyboardShowvoid
public static void VirtualKeyboardShow(string existingText, Rect2? position = default, DisplayServer.VirtualKeyboardType type = DisplayServer.VirtualKeyboardType.Default, int maxLength = -1, int cursorStart = -1, int cursorEnd = -1);Shows the virtual keyboard if the platform has one.
existing_text parameter is useful for implementing your own LineEdit or TextEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
position parameter is the screen space Rect2 of the edited text.
type parameter allows configuring which type of virtual keyboard to show.
max_length limits the number of characters that can be entered if different from -1.
cursor_start can optionally define the current text cursor position if cursor_end is not set.
cursor_start and cursor_end can optionally define the current text selection.
Note: This method is implemented on Android, iOS and Web.
| Name | Type | Default |
|---|---|---|
existingText | string | — |
position | Rect2? | default |
type | DisplayServer.VirtualKeyboardType | DisplayServer.VirtualKeyboardType.Default |
maxLength | int | -1 |
cursorStart | int | -1 |
cursorEnd | int | -1 |
positionIf the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).
WarpMousevoid
public static void WarpMouse(Vector2I position);Sets the mouse cursor position to the given position relative to an origin at the upper left corner of the currently focused game Window Manager window.
Note: DisplayServer.WarpMouse is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web.
| Name | Type | Default |
|---|---|---|
position | Vector2I | — |
WindowCanDrawbool
public static bool WindowCanDraw(int windowId = 0);Returns true if anything can be drawn in the window specified by window_id, false otherwise. Using the --disable-render-loop command line argument or a headless build will return false.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
boolWindowGetActivePopupint
public static int WindowGetActivePopup();Returns ID of the active popup window, or DisplayServer.InvalidWindowId if there is none.
intWindowGetAttachedInstanceIdulong
public static ulong WindowGetAttachedInstanceId(int windowId = 0);Returns the ReckfellObject.GetInstanceId of the Window the window_id is attached to.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
ulongWindowGetCurrentScreenint
public static int WindowGetCurrentScreen(int windowId = 0);Returns the screen the window specified by window_id is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also DisplayServer.WindowSetCurrentScreen. Returns DisplayServer.InvalidScreen if window_id is invalid.
Note: This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns 0.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
intWindowGetFlagbool
public static bool WindowGetFlag(DisplayServer.WindowFlags flag, int windowId = 0);Returns the current value of the given window's flag.
| Name | Type | Default |
|---|---|---|
flag | DisplayServer.WindowFlags | — |
windowId | int | 0 |
boolWindowGetHdrOutputCurrentMaxLuminancefloat
public static float WindowGetHdrOutputCurrentMaxLuminance(int windowId = 0);When DisplayServer.WindowIsHdrOutputEnabled returns true, this returns the current maximum luminance in nits (cd/m²) for HDR output by the window specified by window_id. If the maximum luminance is being automatically adjusted based on the screen's capabilities, this method will return that value. Otherwise, it will return the value set by DisplayServer.WindowSetHdrOutputMaxLuminance. This maximum luminance value is used when calculating DisplayServer.WindowGetOutputMaxLinearValue.
Note: This maximum luminance may not match the physical behavior of the screen, but will always be proportionally correct relative to DisplayServer.WindowGetHdrOutputCurrentReferenceLuminance.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
floatWindowGetHdrOutputCurrentReferenceLuminancefloat
public static float WindowGetHdrOutputCurrentReferenceLuminance(int windowId = 0);When DisplayServer.WindowIsHdrOutputEnabled returns true, this returns the current reference white luminance in nits (cd/m²) for HDR output by the window specified by window_id. If the reference luminance is being automatically adjusted to match the operating system brightness, this will return that value. Otherwise, it will return the value set by DisplayServer.WindowSetHdrOutputReferenceLuminance. This reference luminance value is used when calculating DisplayServer.WindowGetOutputMaxLinearValue.
Note: This reference white luminance may not match the physical behavior of the screen, but will always be proportionally correct relative to DisplayServer.WindowGetHdrOutputCurrentMaxLuminance.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
floatWindowGetHdrOutputMaxLuminancefloat
public static float WindowGetHdrOutputMaxLuminance(int windowId = 0);Returns the maximum luminance in nits (cd/m²) set for HDR output by the window specified by window_id. Negative values indicate that the value is being automatically adjusted based on the screen's capabilities. See also DisplayServer.WindowGetHdrOutputCurrentMaxLuminance.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
floatWindowGetHdrOutputReferenceLuminancefloat
public static float WindowGetHdrOutputReferenceLuminance(int windowId = 0);Returns the reference white luminance in nits (cd/m²) set for HDR output by the window specified by window_id. Negative values indicate that the value is being automatically adjusted to match the operating system brightness. See also DisplayServer.WindowGetHdrOutputCurrentReferenceLuminance.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
floatWindowGetMaxSizeVector2I
public static Vector2I WindowGetMaxSize(int windowId = 0);Returns the window's maximum size (in pixels). See also DisplayServer.WindowSetMaxSize.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
Vector2IWindowGetMinSizeVector2I
public static Vector2I WindowGetMinSize(int windowId = 0);Returns the window's minimum size (in pixels). See also DisplayServer.WindowSetMinSize.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
Vector2IWindowGetModeDisplayServer.WindowMode
public static DisplayServer.WindowMode WindowGetMode(int windowId = 0);Returns the mode of the given window.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
DisplayServer.WindowModeWindowGetNativeHandlelong
public static long WindowGetNativeHandle(DisplayServer.HandleType handleType, int windowId = 0);Returns internal structure pointers for use in plugins. Note: This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows.
| Name | Type | Default |
|---|---|---|
handleType | DisplayServer.HandleType | — |
windowId | int | 0 |
longWindowGetOutputMaxLinearValuefloat
public static float WindowGetOutputMaxLinearValue(int windowId = 0);Returns the maximum value for linear color components that can be displayed for the window specified by window_id, regardless of SDR or HDR output. Returns 1.0 if HDR is not enabled or not supported. When HDR output is enabled, this is calculated based on DisplayServer.WindowGetHdrOutputCurrentReferenceLuminance and DisplayServer.WindowGetHdrOutputCurrentMaxLuminance. The Window.OutputMaxLinearValueChanged signal will be emitted whenever this value changes. This value is used by tonemapping and other Environment effects to ensure that bright colors are presented in the range that can be displayed by this window. Corresponds to Window.GetOutputMaxLinearValue.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
floatWindowGetPopupSafeRectRect2I
public static Rect2I WindowGetPopupSafeRect(int window);Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system.
| Name | Type | Default |
|---|---|---|
window | int | — |
Rect2IWindowGetPositionVector2I
public static Vector2I WindowGetPosition(int windowId = 0);Returns the position of the client area of the given window on the screen.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
Vector2IWindowGetPositionWithDecorationsVector2I
public static Vector2I WindowGetPositionWithDecorations(int windowId = 0);Returns the position of the given window on the screen including the borders drawn by the operating system. See also DisplayServer.WindowGetPosition.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
Vector2IWindowGetSafeTitleMarginsVector3I
public static Vector3I WindowGetSafeTitleMargins(int windowId = 0);Returns left margins (x), right margins (y) and height (z) of the title that are safe to use (contains no buttons or other elements) when DisplayServer.WindowFlags.ExtendToTitle flag is set.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
Vector3IWindowGetSizeVector2I
public static Vector2I WindowGetSize(int windowId = 0);Returns the size of the window specified by window_id (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also DisplayServer.WindowGetSizeWithDecorations, DisplayServer.WindowSetSize and DisplayServer.WindowGetPosition.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
Vector2IWindowGetSizeWithDecorationsVector2I
public static Vector2I WindowGetSizeWithDecorations(int windowId = 0);Returns the size of the window specified by window_id (in pixels), including the borders drawn by the operating system. See also DisplayServer.WindowGetSize.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
Vector2IWindowGetTitleSizeVector2I
public static Vector2I WindowGetTitleSize(string title, int windowId = 0);Returns the estimated window title bar size (including text and window buttons) for the window specified by window_id (in pixels). This method does not change the window title.
Note: This method is implemented on macOS and Windows.
| Name | Type | Default |
|---|---|---|
title | string | — |
windowId | int | 0 |
Vector2IWindowGetVsyncModeDisplayServer.VSyncMode
public static DisplayServer.VSyncMode WindowGetVsyncMode(int windowId = 0);Returns the V-Sync mode of the given window.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
DisplayServer.VSyncModeWindowIsFocusedbool
public static bool WindowIsFocused(int windowId = 0);Returns true if the window specified by window_id is focused.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
boolWindowIsHdrOutputEnabledbool
public static bool WindowIsHdrOutputEnabled(int windowId = 0);Returns true if HDR output is currently enabled for the window specified by window_id. The returned value may change dynamically based on system settings, screen capabilities, and which screen the window is currently on.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
boolWindowIsHdrOutputRequestedbool
public static bool WindowIsHdrOutputRequested(int windowId = 0);Returns true if HDR output is requested for the window specified by window_id. Corresponds to Window.HdrOutputRequested.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
boolWindowIsHdrOutputSupportedbool
public static bool WindowIsHdrOutputSupported(int windowId = 0);Returns true if the window specified by window_id supports HDR output. This depends on the platform, screen capabilities, system settings, and the screen the window is currently on.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
boolWindowIsMaximizeAllowedbool
public static bool WindowIsMaximizeAllowed(int windowId = 0);Returns true if the given window can be maximized (the maximize button is enabled).
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
boolWindowMaximizeOnTitleDblClickbool
public static bool WindowMaximizeOnTitleDblClick();Returns true if double-clicking on a window's title should maximize it.
Note: This method is implemented only on macOS.
boolWindowMinimizeOnTitleDblClickbool
public static bool WindowMinimizeOnTitleDblClick();Returns true if double-clicking on a window's title should minimize it.
Note: This method is implemented only on macOS.
boolWindowMoveToForegroundvoid
public static void WindowMoveToForeground(int windowId = 0);Moves the window specified by window_id to the foreground, so that it is visible over other windows.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
WindowRequestAttentionvoid
public static void WindowRequestAttention(int windowId = 0);Makes the window specified by window_id request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
WindowRequestHdrOutputvoid
public static void WindowRequestHdrOutput(bool enable, int windowId = 0);If enable is true, HDR output is requested for the window specified by window_id. The window will automatically switch between HDR and SDR if it is moved between screens, screen capabilities change, or system settings are modified. This will internally force Viewport.UseHdr2D to be enabled on the main Viewport. All other SubViewport of the Window must have their Viewport.UseHdr2D property enabled to produce HDR output. Corresponds to Window.HdrOutputRequested.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
windowId | int | 0 |
WindowSetColorvoid
public static void WindowSetColor(Color color);Sets the background color of the root window. Note: This method is implemented only on Android.
| Name | Type | Default |
|---|---|---|
color | Color | — |
WindowSetCurrentScreenvoid
public static void WindowSetCurrentScreen(int screen, int windowId = 0);Moves the window specified by window_id to the specified screen. See also DisplayServer.WindowGetCurrentScreen.
Note: One of the following constants can be used as screen: DisplayServer.ScreenOfMainWindow, DisplayServer.ScreenPrimary, DisplayServer.ScreenWithMouseFocus, or DisplayServer.ScreenWithKeyboardFocus.
Note: This method is implemented on Linux/X11, macOS, and Windows.
| Name | Type | Default |
|---|---|---|
screen | int | — |
windowId | int | 0 |
WindowSetDropFilesCallbackvoid
public static void WindowSetDropFilesCallback(Callable callback, int windowId = 0);Sets the callback that should be called when files are dropped from the operating system's file manager to the window specified by window_id. callback should take one string[] argument, which is the list of dropped files.
Warning: Advanced users only! Adding such a callback to a Window node will override its default implementation, which can introduce bugs.
Note: This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web.
Note: On the web platform, the files are dropped to a temporary folder and will be removed automatically after the callback.
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
windowId | int | 0 |
WindowSetExclusivevoid
public static void WindowSetExclusive(int windowId, bool exclusive);If set to true, this window will always stay on top of its parent window, parent window will ignore input while this window is opened.
Note: On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window.
Note: This method is implemented on macOS and Windows.
| Name | Type | Default |
|---|---|---|
windowId | int | — |
exclusive | bool | — |
WindowSetFlagvoid
public static void WindowSetFlag(DisplayServer.WindowFlags flag, bool enabled, int windowId = 0);Enables or disables the given window's given flag.
| Name | Type | Default |
|---|---|---|
flag | DisplayServer.WindowFlags | — |
enabled | bool | — |
windowId | int | 0 |
WindowSetHdrOutputMaxLuminancevoid
public static void WindowSetHdrOutputMaxLuminance(float maxLuminance, int windowId = 0);Sets the maximum luminance in nits (cd/m²) for HDR output by the window specified by window_id. If max_luminance is negative, the window uses the screen's maximum luminance that is reported by the operating system. By default, this luminance is set to -1.0 for every window. Typically this property should be left at this default value, but may optionally be exposed through in-game settings to allow the player to correct an inaccurate maximum luminance reported by the operating system. See also DisplayServer.WindowGetHdrOutputCurrentMaxLuminance and DisplayServer.WindowGetHdrOutputMaxLuminance.
Note: This method is only implemented on macOS and Windows. Other platforms will always use the screen's maximum luminance that is reported by the operating system.
| Name | Type | Default |
|---|---|---|
maxLuminance | float | — |
windowId | int | 0 |
WindowSetHdrOutputReferenceLuminancevoid
public static void WindowSetHdrOutputReferenceLuminance(float referenceLuminance, int windowId = 0);Sets the reference white luminance in nits (cd/m²) for HDR output by the window specified by window_id. If reference_luminance is negative, the window automatically adjusts to the brightness set by the operating system. By default, this luminance is set to -1.0 for every window. Typically this property should be left at this default value, but may optionally be exposed as an "HDR Brightness" in-game setting to allow the player to adjust the brightness of their game, independently of their device settings. See also DisplayServer.WindowGetHdrOutputCurrentReferenceLuminance and DisplayServer.WindowGetHdrOutputReferenceLuminance.
Note: This method is only implemented on Windows. Other platforms will always use the reference luminance that is reported by the operating system.
| Name | Type | Default |
|---|---|---|
referenceLuminance | float | — |
windowId | int | 0 |
WindowSetIconvoid
public static void WindowSetIcon(Image icon, int windowId = 0);Sets the window icon (usually displayed in the top-left corner) for the window specified by window_id.
Note: This method is implemented on Linux and Windows.
| Name | Type | Default |
|---|---|---|
icon | Image | — |
windowId | int | 0 |
WindowSetImeActivevoid
public static void WindowSetImeActive(bool active, int windowId = 0);Sets whether Input Method Editor should be enabled for the window specified by window_id. See also DisplayServer.WindowSetImePosition.
| Name | Type | Default |
|---|---|---|
active | bool | — |
windowId | int | 0 |
WindowSetImePositionvoid
public static void WindowSetImePosition(Vector2I position, int windowId = 0);Sets the position of the Input Method Editor popup for the specified window_id. Only effective if DisplayServer.WindowSetImeActive was set to true for the specified window_id.
| Name | Type | Default |
|---|---|---|
position | Vector2I | — |
windowId | int | 0 |
WindowSetInputEventCallbackvoid
public static void WindowSetInputEventCallback(Callable callback, int windowId = 0);Sets the callback that should be called when any InputEvent is sent to the window specified by window_id.
Warning: Advanced users only! Adding such a callback to a Window node will override its default implementation, which can introduce bugs.
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
windowId | int | 0 |
WindowSetInputTextCallbackvoid
public static void WindowSetInputTextCallback(Callable callback, int windowId = 0);Sets the callback that should be called when text is entered using the virtual keyboard to the window specified by window_id.
Warning: Advanced users only! Adding such a callback to a Window node will override its default implementation, which can introduce bugs.
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
windowId | int | 0 |
WindowSetMaxSizevoid
public static void WindowSetMaxSize(Vector2I maxSize, int windowId = 0);Sets the maximum size of the window specified by window_id in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also DisplayServer.WindowGetMaxSize.
Note: It's recommended to change this value using Window.MaxSize instead.
Note: Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
| Name | Type | Default |
|---|---|---|
maxSize | Vector2I | — |
windowId | int | 0 |
WindowSetMinSizevoid
public static void WindowSetMinSize(Vector2I minSize, int windowId = 0);Sets the minimum size for the given window to min_size in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also DisplayServer.WindowGetMinSize.
Note: It's recommended to change this value using Window.MinSize instead.
Note: By default, the main window has a minimum size of Vector2i(64, 64). This prevents issues that can arise when the window is resized to a near-zero size.
Note: Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
| Name | Type | Default |
|---|---|---|
minSize | Vector2I | — |
windowId | int | 0 |
WindowSetModevoid
public static void WindowSetMode(DisplayServer.WindowMode mode, int windowId = 0);Sets window mode for the given window to mode.
Note: On Android, setting it to DisplayServer.WindowMode.Fullscreen or DisplayServer.WindowMode.ExclusiveFullscreen will enable immersive mode.
Note: Setting the window to full screen forcibly sets the borderless flag to true, so make sure to set it back to false when not wanted.
| Name | Type | Default |
|---|---|---|
mode | DisplayServer.WindowMode | — |
windowId | int | 0 |
WindowSetMousePassthrough2 overloads
public static void WindowSetMousePassthrough(Vector2[] region, int windowId = 0);Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
// Set region, using Path2D node.
DisplayServer.WindowSetMousePassthrough(GetEntity<Path2D>("Path2D").Curve.GetBakedPoints());
// Set region, using Polygon2D node.
DisplayServer.WindowSetMousePassthrough(GetEntity<Polygon2D>("Polygon2D").Polygon);
// Reset region to default.
DisplayServer.WindowSetMousePassthrough([]);Note: On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is. Note: This method is implemented on Linux (X11), macOS and Windows.
| Name | Type | Default |
|---|---|---|
region | Vector2[] | — |
windowId | int | 0 |
public static void WindowSetMousePassthrough(ReadOnlySpan<Vector2> region, int windowId);Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).
// Set region, using Path2D node.
DisplayServer.WindowSetMousePassthrough(GetEntity<Path2D>("Path2D").Curve.GetBakedPoints());
// Set region, using Polygon2D node.
DisplayServer.WindowSetMousePassthrough(GetEntity<Polygon2D>("Polygon2D").Polygon);
// Reset region to default.
DisplayServer.WindowSetMousePassthrough([]);Note: On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is. Note: This method is implemented on Linux (X11), macOS and Windows.
| Name | Type | Default |
|---|---|---|
region | ReadOnlySpan<Vector2> | — |
windowId | int | — |
WindowSetPopupSafeRectvoid
public static void WindowSetPopupSafeRect(int window, Rect2I rect);Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup.
| Name | Type | Default |
|---|---|---|
window | int | — |
rect | Rect2I | — |
WindowSetPositionvoid
public static void WindowSetPosition(Vector2I position, int windowId = 0);Sets the position of the given window to position. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
* (0, 0) ┌───────┐
│ │
┌─────────────┐ │ │
│ │ │ │
│ │ │ │
└─────────────┘ └───────┘See also DisplayServer.WindowGetPosition and DisplayServer.WindowSetSize.
Note: It's recommended to change this value using Window.Position instead.
Note: On Linux (Wayland): this method is a no-op.
| Name | Type | Default |
|---|---|---|
position | Vector2I | — |
windowId | int | 0 |
WindowSetRectChangedCallbackvoid
public static void WindowSetRectChangedCallback(Callable callback, int windowId = 0);Sets the callback that will be called when the window specified by window_id is moved or resized.
Warning: Advanced users only! Adding such a callback to a Window node will override its default implementation, which can introduce bugs.
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
windowId | int | 0 |
WindowSetSizevoid
public static void WindowSetSize(Vector2I size, int windowId = 0);Sets the size of the given window to size (in pixels). See also DisplayServer.WindowGetSize and DisplayServer.WindowGetPosition.
Note: It's recommended to change this value using Window.Size instead.
| Name | Type | Default |
|---|---|---|
size | Vector2I | — |
windowId | int | 0 |
WindowSetTaskbarProgressStatevoid
public static void WindowSetTaskbarProgressState(DisplayServer.ProgressState state, int windowId = 0);Sets the type and state of the progress bar on the taskbar/dock icon of the window specified by window_id. See DisplayServer.ProgressState for possible values and how each mode behaves.
Note: This method is implemented only on Windows and macOS.
Note: On macOS, the progress bar is displayed only for the main window.
| Name | Type | Default |
|---|---|---|
state | DisplayServer.ProgressState | — |
windowId | int | 0 |
WindowSetTaskbarProgressValuevoid
public static void WindowSetTaskbarProgressValue(float value, int windowId = 0);Creates a progress bar on the taskbar/dock icon of the window specified by window_id if it does not exist, sets the progress of the icon.
value acts as a relative percentage value, ranges from 0.0 (lowest) to 1.0 (highest).
Note: This method is implemented only on Windows and macOS.
Note: On macOS, the progress bar is displayed only for the main window.
| Name | Type | Default |
|---|---|---|
value | float | — |
windowId | int | 0 |
WindowSetTitlevoid
public static void WindowSetTitle(string title, int windowId = 0);Sets the title of the given window to title.
Note: It's recommended to change this value using Window.Title instead.
Note: Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most.
| Name | Type | Default |
|---|---|---|
title | string | — |
windowId | int | 0 |
WindowSetTransientvoid
public static void WindowSetTransient(int windowId, int parentWindowId);Sets window transient parent. Transient window will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode.
Note: It's recommended to change this value using Window.Transient instead.
Note: The behavior might be different depending on the platform.
| Name | Type | Default |
|---|---|---|
windowId | int | — |
parentWindowId | int | — |
WindowSetVsyncModevoid
public static void WindowSetVsyncMode(DisplayServer.VSyncMode vsyncMode, int windowId = 0);Sets the V-Sync mode of the given window. See also ProjectSettings.display/window/vsync/vsync_mode.
Depending on the platform and used renderer, the engine will fall back to DisplayServer.VSyncMode.Enabled if the desired mode is not supported.
Note: V-Sync modes other than DisplayServer.VSyncMode.Enabled are only supported in the Forward+ and Mobile rendering methods, not Compatibility.
| Name | Type | Default |
|---|---|---|
vsyncMode | DisplayServer.VSyncMode | — |
windowId | int | 0 |
WindowSetWindowButtonsOffsetvoid
public static void WindowSetWindowButtonsOffset(Vector2I offset, int windowId = 0);When DisplayServer.WindowFlags.ExtendToTitle flag is set, set offset to the center of the first titlebar button.
Note: This flag is implemented only on macOS.
| Name | Type | Default |
|---|---|---|
offset | Vector2I | — |
windowId | int | 0 |
WindowSetWindowEventCallbackvoid
public static void WindowSetWindowEventCallback(Callable callback, int windowId = 0);Sets the callback that will be called when an event occurs in the window specified by window_id.
Warning: Advanced users only! Adding such a callback to a Window node will override its default implementation, which can introduce bugs.
| Name | Type | Default |
|---|---|---|
callback | Callable | — |
windowId | int | 0 |
WindowStartDragvoid
public static void WindowStartDrag(int windowId = 0);Starts an interactive drag operation on the window with the given window_id, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features.
Note: This method is implemented on Linux (X11/Wayland), macOS, and Windows.
| Name | Type | Default |
|---|---|---|
windowId | int | 0 |
WindowStartResizevoid
public static void WindowStartResize(DisplayServer.WindowResizeEdge edge, int windowId = 0);Starts an interactive resize operation on the window with the given window_id, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's edge.
Note: This method is implemented on Linux (X11/Wayland), macOS, and Windows.
| Name | Type | Default |
|---|---|---|
edge | DisplayServer.WindowResizeEdge | — |
windowId | int | 0 |
Signals and events1
OrientationChangedEvent
public static event DisplayServer.OrientationChangedEventHandler OrientationChanged;Emitted when the screen orientation changes. orientation is the new orientation.
Note: This method is implemented on Android and iOS.
| Name | Type | Default |
|---|---|---|
orientation | DisplayServer.SensorOrientation | — |
Fields and constants9
InvalidIndicatorIdField
public const long InvalidIndicatorId = -1;The ID that refers to a nonexistent application status indicator.
InvalidNotificationIdField
public const long InvalidNotificationId = -1;The ID that refers to a nonexistent toast notification.
InvalidScreenField
public const long InvalidScreen = -1;The ID that refers to a screen that does not exist. This is returned by some DisplayServer methods if no screen matches the requested result.
InvalidWindowIdField
public const long InvalidWindowId = -1;The ID that refers to a nonexistent window. This is returned by some DisplayServer methods if no window matches the requested result.
MainWindowIdField
public const long MainWindowId = 0;The ID of the main window spawned by the engine, which can be passed to methods expecting a window_id.
ScreenOfMainWindowField
public const long ScreenOfMainWindow = -1;Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
Note: On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.
ScreenPrimaryField
public const long ScreenPrimary = -2;Represents the primary screen.
Note: On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.
ScreenWithKeyboardFocusField
public const long ScreenWithKeyboardFocus = -3;Represents the screen containing the window with the keyboard focus.
Note: On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.
ScreenWithMouseFocusField
public const long ScreenWithMouseFocus = -4;Represents the screen containing the mouse pointer.
Note: On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index 0.
DisplayServer.AccessibilityAction
| Value | Description |
|---|---|
Blur = 2 | Blur action, callback argument is not set. |
Click = 0 | Single click action, callback argument is not set. |
Collapse = 3 | Collapse action, callback argument is not set. |
Custom = 22 | Custom action, callback argument is set to the integer action ID. |
Decrement = 5 | Decrement action, callback argument is not set. |
Expand = 4 | Expand action, callback argument is not set. |
Focus = 1 | Focus action, callback argument is not set. |
HideTooltip = 7 | Hide tooltip action, callback argument is not set. |
Increment = 6 | Increment action, callback argument is not set. |
ReplaceSelectedText = 10 | Replace text action, callback argument is set to |
ScrollBackward = 11 | Scroll backward action, callback argument is not set. |
ScrollDown = 12 | Scroll down action, callback argument is set to |
ScrollForward = 13 | Scroll forward action, callback argument is not set. |
ScrollIntoView = 17 | Scroll into view action, callback argument is set to |
ScrollLeft = 14 | Scroll left action, callback argument is set to |
ScrollRight = 15 | Scroll right action, callback argument is set to |
ScrollToPoint = 18 | Scroll to point action, callback argument is set to |
ScrollUp = 16 | Scroll up action, callback argument is set to |
SetScrollOffset = 19 | Set scroll offset action, callback argument is set to |
SetTextSelection = 9 | Set text selection action, callback argument is set to
|
SetValue = 20 | Set value action, callback argument is set to |
ShowContextMenu = 21 | Show context menu action, callback argument is not set. |
ShowTooltip = 8 | Show tooltip action, callback argument is not set. |
DisplayServer.AccessibilityFlags
| Value | Description |
|---|---|
Busy = 4 | Element content is not ready (e.g. loading). |
ClipsChildren = 9 | Element clips children. |
Disabled = 8 | Element is disabled. |
Modal = 5 | Element is modal window. |
Multiselectable = 1 | Element supports multiple item selection. |
Readonly = 7 | Element is text field with selectable but read-only text. |
Required = 2 | Element require user input. |
TouchPassthrough = 6 | Element allows touches to be passed through when a screen reader is in touch exploration mode. |
Visited = 3 | Element is a visited link. |
DisplayServer.AccessibilityLiveMode
| Value | Description |
|---|---|
Assertive = 2 | Indicates that updates to the live region have the highest priority and should be presented immediately. |
Off = 0 | Indicates that updates to the live region should not be presented. |
Polite = 1 | Indicates that updates to the live region should be presented at the next opportunity (for example at the end of speaking the current sentence). |
DisplayServer.AccessibilityPopupType
| Value | Description |
|---|---|
Dialog = 3 | Popup dialog. |
List = 1 | Popup list. |
Menu = 0 | Popup menu. |
Tree = 2 | Popup tree view. |
DisplayServer.AccessibilityRole
| Value | Description |
|---|---|
Audio = 2 | Audio player element. |
Button = 7 | Button element. |
Cell = 22 | Table/tree cell element. |
CheckBox = 9 | Check box element. |
CheckButton = 11 | Check button element. |
ColorPicker = 20 | Color picker element. |
ColumnHeader = 26 | Table/tree column header element. |
Container = 5 | Container element. Elements with this role are used for internal structure and ignored by screen readers. |
DefaultButton = 1 | Default dialog button element. |
Dialog = 44 | Dialog window element. |
Image = 41 | Image element. |
Link = 8 | Link element. |
List = 29 | List element. |
ListBox = 31 | List view element. |
ListBoxOption = 32 | List view item element. |
ListItem = 30 | List item element. |
Menu = 37 | Popup menu element. |
MenuBar = 36 | Menu bar element. |
MenuItem = 38 | Popup menu item element. |
MenuItemCheckBox = 39 | Popup menu check button item element. |
MenuItemRadio = 40 | Popup menu radio button item element. |
MultilineTextField = 19 | Multiline editable text field element. |
Panel = 6 | Panel container element. |
ProgressIndicator = 17 | Progress indicator element. |
RadioButton = 10 | Radio button element. |
Region = 46 | Region/landmark element. Screen readers can navigate between regions using landmark navigation. |
Row = 23 | Table/tree row element. |
RowGroup = 24 | Table/tree row group element. |
RowHeader = 25 | Table/tree row header element. |
ScrollBar = 12 | Scroll bar element. |
ScrollView = 13 | Scroll container element. |
Slider = 15 | Slider element. |
SpinButton = 16 | Spin box element. |
Splitter = 14 | Container splitter handle element. |
StaticText = 4 | Non-editable text label. |
Tab = 34 | Tab bar item element. |
TabBar = 33 | Tab bar element. |
TabPanel = 35 | Tab panel element. |
Table = 21 | Table element. |
TextField = 18 | Editable text field element. |
TextRun = 47 | Unifor text run. Note: This role is used for internal text elements, and should not be assigned to nodes. |
TitleBar = 43 | Embedded window title bar element. |
Tooltip = 45 | Tooltip element. |
Tree = 27 | Tree view element. |
TreeItem = 28 | Tree view item element. |
Unknown = 0 | Unknown or custom role. |
Video = 3 | Video player element. |
Window = 42 | Window element. |
DisplayServer.AccessibilityScrollHint
| Value | Description |
|---|---|
BottomEdge = 3 | A preferred position for the node scrolled into view. Bottom edge of the scroll container. |
BottomRight = 1 | A preferred position for the node scrolled into view. Bottom-right edge of the scroll container. |
LeftEdge = 4 | A preferred position for the node scrolled into view. Left edge of the scroll container. |
RightEdge = 5 | A preferred position for the node scrolled into view. Right edge of the scroll container. |
TopEdge = 2 | A preferred position for the node scrolled into view. Top edge of the scroll container. |
TopLeft = 0 | A preferred position for the node scrolled into view. Top-left edge of the scroll container. |
DisplayServer.AccessibilityScrollUnit
DisplayServer.CursorShape
| Value | Description |
|---|---|
Arrow = 0 | Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a |
Bdiagsize = 11 | Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered |
Busy = 5 | Wait cursor. On most cursor themes, this replaces the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also |
CanDrop = 7 | "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a |
Cross = 3 | Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. |
Drag = 6 | Dragging hand cursor. This is displayed during drag-and-drop operations. See also |
Fdiagsize = 12 | Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered |
Forbidden = 8 | Forbidden cursor. This is displayed during drag-and-drop operations if the hovered |
Help = 16 | Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. |
Hsize = 10 | Horizontal resize cursor. Intended to be displayed when the hovered |
Hsplit = 15 | Horizontal split cursor. This is displayed when hovering a |
Ibeam = 1 | I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as |
Max = 17 | Represents the size of the |
Move = 13 | Move cursor. Intended to be displayed when the hovered |
PointingHand = 2 | Pointing hand cursor shape. This is used by default when hovering a |
Vsize = 9 | Vertical resize cursor. Intended to be displayed when the hovered |
Vsplit = 14 | Vertical split cursor. This is displayed when hovering a |
Wait = 4 | Wait cursor. On most cursor themes, this displays a spinning icon besides the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also |
DisplayServer.Feature
| Value | Description |
|---|---|
AccessibilityScreenReader = 34 | Display server supports interaction with screen reader or Braille display. Linux (X11/Wayland), macOS, Windows |
Clipboard = 5 | Display server supports setting and getting clipboard data. See also |
ClipboardPrimary = 18 | Display server supports Primary clipboard can be used. This is a different clipboard from |
CursorShape = 7 | Display server supports setting the mouse cursor shape to be different from the default. Windows, macOS, Linux (X11/Wayland), Android, Web |
CustomCursorShape = 8 | Display server supports setting the mouse cursor shape to a custom image. Windows, macOS, Linux (X11/Wayland), Web |
EmojiAndSymbolPicker = 31 | Display server supports system emoji and symbol picker. Windows, macOS |
ExtendToTitle = 20 | Display server supports expanding window content to the title. See |
GlobalMenu = 0 | Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. macOS |
HdrOutput = 35 | Display server supports HDR output. Linux (Wayland), macOS, iOS, visionOS, Windows |
Hidpi = 12 | Display server supports querying the operating system's display scale factor. This allows automatically detecting the hiDPI display reliably, instead of guessing based on the screen resolution and the display's reported DPI (which might be unreliable due to broken monitor EDID). Windows, Linux (Wayland), macOS |
Icon = 13 | Display server supports changing the window icon (usually displayed in the top-left corner). Windows, macOS, Linux (X11/Wayland) Note: Use on Wayland requires the compositor to implement the xdg_toplevel_icon_v1 protocol, which not all compositors do. See xdg_toplevel_icon_v1#compositor-support for more information on individual compositor support. |
Ime = 10 | Display server supports Input Method Editor, which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Reckfell. Windows, macOS, Linux (X11) |
Mouse = 3 | Display server supports mouse input. Windows, macOS, Linux (X11/Wayland), Android, Web |
MouseWarp = 4 | Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. Windows, macOS, Linux (X11/Wayland) |
NativeColorPicker = 32 | Display server supports native color picker. Linux (X11/Wayland) |
NativeDialog = 9 | Display server supports spawning text dialogs using the operating system's native look-and-feel. See |
NativeDialogFile = 25 | Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See |
NativeDialogFileExtra = 26 | The display server supports all features of |
NativeDialogFileMime = 30 | Native file selection dialog supports MIME types as filters. |
NativeDialogInput = 24 | Display server supports spawning text input dialogs using the operating system's native look-and-feel. See |
NativeHelp = 23 | Display server supports native help system search callbacks. See |
NativeIcon = 14 | Display server supports changing the window icon (usually displayed in the top-left corner). Windows, macOS |
Orientation = 15 | Display server supports changing the screen orientation. Android, iOS |
PipMode = 36 | Display server supports putting the application in picture-in-picture mode. Android |
ScreenCapture = 21 | Display server supports reading screen pixels. See |
ScreenExcludeFromCapture = 28 | Display server supports |
SelfFittingWindows = 33 | Display server automatically fits popups according to the screen boundaries. Window nodes should not attempt to do that themselves. |
StatusIndicator = 22 | Display server supports application status indicators. |
Subwindows = 1 | Display server supports multiple windows that can be moved outside of the main window. Windows, macOS, Linux (X11) |
SwapBuffers = 16 | Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). Windows, macOS, Linux (X11/Wayland) |
TextToSpeech = 19 | Display server supports text-to-speech. See |
Touchscreen = 2 | Display server supports touchscreen input. Windows, Linux (X11/Wayland), Android, iOS, Web |
VirtualKeyboard = 6 | Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. Android, iOS, Web |
WindowDrag = 27 | The display server supports initiating window drag and resize operations on demand. See |
WindowEmbedding = 29 | Display server supports embedding a window from another process. Windows, Linux (X11), macOS |
WindowTransparency = 11 | Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. Windows, macOS, Linux (X11/Wayland), Android |
DisplayServer.FileDialogMode
| Value | Description |
|---|---|
OpenAny = 3 | The native file dialog allows selecting one file or directory. |
OpenDir = 2 | The native file dialog only allows selecting a directory, disallowing the selection of any file. |
OpenFile = 0 | The native file dialog allows selecting one, and only one file. |
OpenFiles = 1 | The native file dialog allows selecting multiple files. |
SaveFile = 4 | The native file dialog will warn when a file exists. |
DisplayServer.HandleType
| Value | Description |
|---|---|
DisplayHandle = 0 | Display handle:
|
EglConfig = 5 |
|
EglDisplay = 4 |
|
GlxFbconfig = 7 | The |
GlxVisualid = 6 | The GLX |
OpenglContext = 3 | OpenGL context (only with the Compatibility renderer):
|
WindowHandle = 1 | Window handle:
|
WindowView = 2 | Window view:
|
DisplayServer.MouseMode
| Value | Description |
|---|---|
Captured = 2 | Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window.
Note: If you want to process the mouse's movement in this mode, you need to use |
Confined = 3 | Confines the mouse cursor to the game window, and make it visible. |
Max = 5 | Max value of the |
Visible = 0 | Makes the mouse cursor visible if it is hidden. |
DisplayServer.NotificationStatus
| Value | Description |
|---|---|
Activated = 0 | User activates a toast notification through a click or touch. |
Dismissed = 1 | A toast notification expires or is explicitly dismissed by the user. |
Failed = 2 | Attempts to raise a toast notification failed. |
DisplayServer.ProgressState
| Value | Description |
|---|---|
Error = 3 | The progress indicator shows that an error has occurred. On Windows, the progress indicator turns red by default to show that an error has occurred in one of the windows that is broadcasting progress. |
Indeterminate = 1 | The progress indicator shows an indeterminate progress. On Windows, the progress indicator does not grow in size, but cycles repeatedly along the length of the taskbar button by default. |
Noprogress = 0 | Stops displaying progress and returns the button to its normal state. |
Normal = 2 | The progress indicator shows progress normally. |
Paused = 4 | The progress indicator shows it was paused. On Windows, the progress indicator turns yellow by default to show that progress is currently stopped in one of the windows but can be resumed by the user. |
DisplayServer.ScreenOrientation
| Value | Description |
|---|---|
Landscape = 0 | Default landscape orientation. |
Portrait = 1 | Default portrait orientation. |
ReverseLandscape = 2 | Reverse landscape orientation (upside down). |
ReversePortrait = 3 | Reverse portrait orientation (upside down). |
Sensor = 6 | Automatic landscape or portrait orientation (default or reverse depending on sensor). |
SensorLandscape = 4 | Automatic landscape orientation (default or reverse depending on sensor). |
SensorPortrait = 5 | Automatic portrait orientation (default or reverse depending on sensor). |
DisplayServer.SensorOrientation
| Value | Description |
|---|---|
Landscape = 2 | Landscape orientation (either standard landscape or reverse landscape). |
Portrait = 1 | Portrait orientation (either standard portrait or reverse portrait). |
Undefined = 0 | Unspecified screen sensor orientation. |
DisplayServer.TtsUtteranceEvent
| Value | Description |
|---|---|
Boundary = 3 | Utterance reached a word or sentence boundary. |
Canceled = 2 | Utterance was canceled, or TTS service was unable to process it. |
Ended = 1 | Utterance was successfully finished. |
Started = 0 | Utterance has begun to be spoken. |
DisplayServer.VSyncMode
| Value | Description |
|---|---|
Adaptive = 2 | Behaves like |
Disabled = 0 | No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of |
Enabled = 1 | Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of |
Mailbox = 3 | Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of |
DisplayServer.VirtualKeyboardType
| Value | Description |
|---|---|
Default = 0 | Default text virtual keyboard. |
EmailAddress = 5 | Virtual keyboard with additional keys to assist with typing email addresses. |
Multiline = 1 | Multiline virtual keyboard. |
Number = 2 | Virtual number keypad, useful for PIN entry. |
NumberDecimal = 3 | Virtual number keypad, useful for entering fractional numbers. |
Password = 6 | Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization.
Note: This is not supported on Web. Instead, this behaves identically to |
Phone = 4 | Virtual phone number keypad. |
Url = 7 | Virtual keyboard with additional keys to assist with typing URLs. |
DisplayServer.WindowEvent
| Value | Description |
|---|---|
CloseRequest = 4 | Sent when the user has attempted to close the window (e.g. close button is pressed). |
DpiChange = 6 | Sent when the window is moved to the display with different DPI, or display DPI is changed. Note: This flag is implemented only on macOS and Linux (Wayland). |
FocusIn = 2 | Sent when the window grabs focus. |
FocusOut = 3 | Sent when the window loses focus. |
ForceClose = 8 | Sent when the window has been forcibly closed by the display server. The window will immediately hide and clean any internal rendering references. Note: This flag is implemented only on Linux (Wayland). |
GoBackRequest = 5 | Sent when the device "Back" button is pressed. Note: This event is implemented only on Android. |
MouseEnter = 0 | Sent when the mouse pointer enters the window. |
MouseExit = 1 | Sent when the mouse pointer exits the window. |
OutputMaxLinearValueChanged = 9 | Sent when the output max linear value returned by |
TitlebarChange = 7 | Sent when the window title bar decoration is changed (e.g. |
DisplayServer.WindowFlags
| Value | Description |
|---|---|
AlwaysOnTop = 2 | The window is floating on top of all other windows. This flag is ignored for full-screen windows. Note: This flag is implemented on Linux (X11), macOS, and Windows. |
Borderless = 1 | The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Note: This flag is implemented on Linux (X11/Wayland), macOS, and Windows. |
ExcludeFromCapture = 9 | Window is excluded from screenshots taken by |
ExtendToTitle = 6 | Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons.
Use |
Max = 13 | Represents the size of the |
MaximizeDisabled = 12 | Window maximize button is disabled. Note: This flag is implemented on Linux (X11), macOS, and Windows. |
MinimizeDisabled = 11 | Window minimize button is disabled. Note: This flag is implemented on Linux (X11), macOS, and Windows. |
MousePassthrough = 7 | All mouse events are passed to the underlying window of the same application. Note: This flag is implemented on Linux (X11), macOS, and Windows. |
NoFocus = 4 | The window can't be focused. No-focus window will ignore all input, except mouse clicks. Note: This flag is implemented on Linux (X11), macOS, and Windows. |
Popup = 5 | Window is part of menu or |
PopupWMHint = 10 | Signals the window manager that this window is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window). Note: This flag is implemented on Linux (Wayland). |
ResizeDisabled = 0 | The window can't be resized by dragging its resize grip. It's still possible to resize the window using |
SharpCorners = 8 | Window style is overridden, forcing sharp corners. Note: This flag is implemented only on Windows (11). |
Transparent = 3 | The window background can be transparent.
Note: This flag has no effect if |
DisplayServer.WindowMode
| Value | Description |
|---|---|
ExclusiveFullscreen = 4 | A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition).
Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed.
Note: This mode might not work with screen recording software.
On Android: This enables immersive mode.
On Windows: Depending on video driver, full screen transition might cause screens to go black for a moment.
On macOS: A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen.
On Linux (X11): Exclusive full screen mode bypasses compositor.
On Linux (Wayland): Equivalent to |
Fullscreen = 3 | Full screen mode with full multi-window support. Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. On Android: This enables immersive mode. On macOS: A new desktop is used to display the running project. Note: Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports multiple resolutions when enabling full screen mode. |
Maximized = 2 | Maximized window mode, i.e. |
Minimized = 1 | Minimized window mode, i.e. |
Windowed = 0 | Windowed mode, i.e. |
DisplayServer.WindowResizeEdge
| Value | Description |
|---|---|
Bottom = 6 | Bottom edge of a window. |
BottomLeft = 5 | Bottom-left edge of a window. |
BottomRight = 7 | Bottom-right edge of a window. |
Left = 3 | Left edge of a window. |
Max = 8 | Represents the size of the |
Right = 4 | Right edge of a window. |
Top = 1 | Top edge of a window. |
TopLeft = 0 | Top-left edge of a window. |
TopRight = 2 | Top-right edge of a window. |