reckfellENGINE

DisplayServer

A server interface for low-level window management.

On this page
class DisplayServerReckfellSharp

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
# Singleton
C#
public static DisplayServerInstance Singleton { get; }

Methods301

AccessibilityCreateElementRid · Deprecated
# AccessibilityCreateElement
C#
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.

Parameters
NameTypeDefault
windowIdint—
roleDisplayServer.AccessibilityRole—
Returns Rid
AccessibilityCreateSubElementRid · Deprecated
# AccessibilityCreateSubElement
C#
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.

Parameters
NameTypeDefault
parentRidRid—
roleDisplayServer.AccessibilityRole—
insertPosint-1
Returns Rid
AccessibilityCreateSubTextEditElements2 overloads · Includes deprecated
# AccessibilityCreateSubTextEditElements · 1/2
C#
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.

Parameters
NameTypeDefault
parentRidRid—
shapedTextRid—
minHeightfloat—
insertPosint—
Returns Rid
# AccessibilityCreateSubTextEditElements · 2/2
C#
public 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.

Parameters
NameTypeDefault
parentRidRid—
shapedTextRid—
minHeightfloat—
insertPosint-1
isLastLineboolfalse
Returns Rid
AccessibilityElementGetMetaVariant · Deprecated
# AccessibilityElementGetMeta
C#
public static Variant AccessibilityElementGetMeta(Rid id);

Returns the metadata of the accessibility element id.

Parameters
NameTypeDefault
idRid—
Returns Variant
AccessibilityElementSetMetavoid · Deprecated
# AccessibilityElementSetMeta
C#
public static void AccessibilityElementSetMeta(Rid id, Variant meta);

Sets the metadata of the accessibility element id to meta.

Parameters
NameTypeDefault
idRid—
metaVariant—
AccessibilityFreeElementvoid · Deprecated
# AccessibilityFreeElement
C#
public static void AccessibilityFreeElement(Rid id);

Frees the accessibility element id created by DisplayServer.AccessibilityCreateElement, DisplayServer.AccessibilityCreateSubElement, or DisplayServer.AccessibilityCreateSubTextEditElements.

Parameters
NameTypeDefault
idRid—
AccessibilityGetWindowRootRid · Deprecated
# AccessibilityGetWindowRoot
C#
public static Rid AccessibilityGetWindowRoot(int windowId);

Returns the main accessibility element of the OS native window.

Parameters
NameTypeDefault
windowIdint—
Returns Rid
AccessibilityHasElementbool · Deprecated
# AccessibilityHasElement
C#
public static bool AccessibilityHasElement(Rid id);

Returns true if id is a valid accessibility element.

Parameters
NameTypeDefault
idRid—
Returns bool
AccessibilityScreenReaderActiveint
# AccessibilityScreenReaderActive
C#
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.

Returns int
AccessibilitySetWindowFocusedvoid · Deprecated
# AccessibilitySetWindowFocused
C#
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.

Parameters
NameTypeDefault
windowIdint—
focusedbool—
AccessibilitySetWindowRectvoid · Deprecated
# AccessibilitySetWindowRect
C#
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.

Parameters
NameTypeDefault
windowIdint—
rectOutRect2—
rectInRect2—
AccessibilityShouldIncreaseContrastint
# AccessibilityShouldIncreaseContrast
C#
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.

Returns int
AccessibilityShouldReduceAnimationint
# AccessibilityShouldReduceAnimation
C#
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.

Returns int
AccessibilityShouldReduceTransparencyint
# AccessibilityShouldReduceTransparency
C#
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.

Returns int
AccessibilityUpdateAddActionvoid · Deprecated
# AccessibilityUpdateAddAction
C#
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.

Parameters
NameTypeDefault
idRid—
actionDisplayServer.AccessibilityAction—
callableCallable—
AccessibilityUpdateAddChildvoid · Deprecated
# AccessibilityUpdateAddChild
C#
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.

Parameters
NameTypeDefault
idRid—
childIdRid—
AccessibilityUpdateAddCustomActionvoid · Deprecated
# AccessibilityUpdateAddCustomAction
C#
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.

Parameters
NameTypeDefault
idRid—
actionIdint—
actionDescriptionstring—
AccessibilityUpdateAddRelatedControlsvoid · Deprecated
# AccessibilityUpdateAddRelatedControls
C#
public static void AccessibilityUpdateAddRelatedControls(Rid id, Rid relatedId);

Adds an element that is controlled by this element.

Parameters
NameTypeDefault
idRid—
relatedIdRid—
AccessibilityUpdateAddRelatedDescribedByvoid · Deprecated
# AccessibilityUpdateAddRelatedDescribedBy
C#
public static void AccessibilityUpdateAddRelatedDescribedBy(Rid id, Rid relatedId);

Adds an element that describes this element.

Parameters
NameTypeDefault
idRid—
relatedIdRid—
AccessibilityUpdateAddRelatedDetailsvoid · Deprecated
# AccessibilityUpdateAddRelatedDetails
C#
public static void AccessibilityUpdateAddRelatedDetails(Rid id, Rid relatedId);

Adds an element that details this element.

Parameters
NameTypeDefault
idRid—
relatedIdRid—
AccessibilityUpdateAddRelatedFlowTovoid · Deprecated
# AccessibilityUpdateAddRelatedFlowTo
C#
public static void AccessibilityUpdateAddRelatedFlowTo(Rid id, Rid relatedId);

Adds an element that this element flow into.

Parameters
NameTypeDefault
idRid—
relatedIdRid—
AccessibilityUpdateAddRelatedLabeledByvoid · Deprecated
# AccessibilityUpdateAddRelatedLabeledBy
C#
public static void AccessibilityUpdateAddRelatedLabeledBy(Rid id, Rid relatedId);

Adds an element that labels this element.

Parameters
NameTypeDefault
idRid—
relatedIdRid—
AccessibilityUpdateAddRelatedRadioGroupvoid · Deprecated
# AccessibilityUpdateAddRelatedRadioGroup
C#
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.

Parameters
NameTypeDefault
idRid—
relatedIdRid—
AccessibilityUpdateSetActiveDescendantvoid · Deprecated
# AccessibilityUpdateSetActiveDescendant
C#
public static void AccessibilityUpdateSetActiveDescendant(Rid id, Rid otherId);

Adds an element that is an active descendant of this element.

Parameters
NameTypeDefault
idRid—
otherIdRid—
AccessibilityUpdateSetBackgroundColorvoid · Deprecated
# AccessibilityUpdateSetBackgroundColor
C#
public static void AccessibilityUpdateSetBackgroundColor(Rid id, Color color);

Sets element background color.

Parameters
NameTypeDefault
idRid—
colorColor—
AccessibilityUpdateSetBoundsvoid · Deprecated
# AccessibilityUpdateSetBounds
C#
public static void AccessibilityUpdateSetBounds(Rid id, Rect2 rect);

Sets element bounding box, relative to the node position.

Parameters
NameTypeDefault
idRid—
rectRect2—
AccessibilityUpdateSetCheckedvoid · Deprecated
# AccessibilityUpdateSetChecked
C#
public static void AccessibilityUpdateSetChecked(Rid id, bool checekd);

Sets element checked state.

Parameters
NameTypeDefault
idRid—
checekdbool—
AccessibilityUpdateSetClassnamevoid · Deprecated
# AccessibilityUpdateSetClassname
C#
public static void AccessibilityUpdateSetClassname(Rid id, string classname);

Sets element class name.

Parameters
NameTypeDefault
idRid—
classnamestring—
AccessibilityUpdateSetColorValuevoid · Deprecated
# AccessibilityUpdateSetColorValue
C#
public static void AccessibilityUpdateSetColorValue(Rid id, Color color);

Sets element color value.

Parameters
NameTypeDefault
idRid—
colorColor—
AccessibilityUpdateSetDescriptionvoid · Deprecated
# AccessibilityUpdateSetDescription
C#
public static void AccessibilityUpdateSetDescription(Rid id, string description);

Sets element accessibility description.

Parameters
NameTypeDefault
idRid—
descriptionstring—
AccessibilityUpdateSetErrorMessagevoid · Deprecated
# AccessibilityUpdateSetErrorMessage
C#
public static void AccessibilityUpdateSetErrorMessage(Rid id, Rid otherId);

Sets an element which contains an error message for this element.

Parameters
NameTypeDefault
idRid—
otherIdRid—
AccessibilityUpdateSetExtraInfovoid · Deprecated
# AccessibilityUpdateSetExtraInfo
C#
public static void AccessibilityUpdateSetExtraInfo(Rid id, string name);

Sets element accessibility extra information added to the element name.

Parameters
NameTypeDefault
idRid—
namestring—
AccessibilityUpdateSetFlagvoid · Deprecated
# AccessibilityUpdateSetFlag
C#
public static void AccessibilityUpdateSetFlag(Rid id, DisplayServer.AccessibilityFlags flag, bool value);

Sets element flag.

Parameters
NameTypeDefault
idRid—
flagDisplayServer.AccessibilityFlags—
valuebool—
AccessibilityUpdateSetFocusvoid · Deprecated
# AccessibilityUpdateSetFocus
C#
public static void AccessibilityUpdateSetFocus(Rid id);

Sets currently focused element.

Parameters
NameTypeDefault
idRid—
AccessibilityUpdateSetForegroundColorvoid · Deprecated
# AccessibilityUpdateSetForegroundColor
C#
public static void AccessibilityUpdateSetForegroundColor(Rid id, Color color);

Sets element foreground color.

Parameters
NameTypeDefault
idRid—
colorColor—
AccessibilityUpdateSetInPageLinkTargetvoid · Deprecated
# AccessibilityUpdateSetInPageLinkTarget
C#
public static void AccessibilityUpdateSetInPageLinkTarget(Rid id, Rid otherId);

Sets target element for the link.

Parameters
NameTypeDefault
idRid—
otherIdRid—
AccessibilityUpdateSetLanguagevoid · Deprecated
# AccessibilityUpdateSetLanguage
C#
public static void AccessibilityUpdateSetLanguage(Rid id, string language);

Sets element text language.

Parameters
NameTypeDefault
idRid—
languagestring—
AccessibilityUpdateSetListItemCountvoid · Deprecated
# AccessibilityUpdateSetListItemCount
C#
public static void AccessibilityUpdateSetListItemCount(Rid id, int size);

Sets number of items in the list.

Parameters
NameTypeDefault
idRid—
sizeint—
AccessibilityUpdateSetListItemExpandedvoid · Deprecated
# AccessibilityUpdateSetListItemExpanded
C#
public static void AccessibilityUpdateSetListItemExpanded(Rid id, bool expanded);

Sets list/tree item expanded status.

Parameters
NameTypeDefault
idRid—
expandedbool—
AccessibilityUpdateSetListItemIndexvoid · Deprecated
# AccessibilityUpdateSetListItemIndex
C#
public static void AccessibilityUpdateSetListItemIndex(Rid id, int index);

Sets the position of the element in the list.

Parameters
NameTypeDefault
idRid—
indexint—
AccessibilityUpdateSetListItemLevelvoid · Deprecated
# AccessibilityUpdateSetListItemLevel
C#
public static void AccessibilityUpdateSetListItemLevel(Rid id, int level);

Sets the hierarchical level of the element in the list.

Parameters
NameTypeDefault
idRid—
levelint—
AccessibilityUpdateSetListItemSelectedvoid · Deprecated
# AccessibilityUpdateSetListItemSelected
C#
public static void AccessibilityUpdateSetListItemSelected(Rid id, bool selected);

Sets list/tree item selected status.

Parameters
NameTypeDefault
idRid—
selectedbool—
AccessibilityUpdateSetListOrientationvoid · Deprecated
# AccessibilityUpdateSetListOrientation
C#
public static void AccessibilityUpdateSetListOrientation(Rid id, bool vertical);

Sets the orientation of the list elements.

Parameters
NameTypeDefault
idRid—
verticalbool—
AccessibilityUpdateSetLivevoid · Deprecated
# AccessibilityUpdateSetLive
C#
public static void AccessibilityUpdateSetLive(Rid id, DisplayServer.AccessibilityLiveMode live);

Sets the priority of the live region updates.

Parameters
NameTypeDefault
idRid—
liveDisplayServer.AccessibilityLiveMode—
AccessibilityUpdateSetMemberOfvoid · Deprecated
# AccessibilityUpdateSetMemberOf
C#
public static void AccessibilityUpdateSetMemberOf(Rid id, Rid groupId);

Sets the element to be a member of the group.

Parameters
NameTypeDefault
idRid—
groupIdRid—
AccessibilityUpdateSetNamevoid · Deprecated
# AccessibilityUpdateSetName
C#
public static void AccessibilityUpdateSetName(Rid id, string name);

Sets element accessibility name.

Parameters
NameTypeDefault
idRid—
namestring—
AccessibilityUpdateSetNextOnLinevoid · Deprecated
# AccessibilityUpdateSetNextOnLine
C#
public static void AccessibilityUpdateSetNextOnLine(Rid id, Rid otherId);

Sets next element on the line.

Parameters
NameTypeDefault
idRid—
otherIdRid—
AccessibilityUpdateSetNumJumpvoid · Deprecated
# AccessibilityUpdateSetNumJump
C#
public static void AccessibilityUpdateSetNumJump(Rid id, double jump);

Sets numeric value jump.

Parameters
NameTypeDefault
idRid—
jumpdouble—
AccessibilityUpdateSetNumRangevoid · Deprecated
# AccessibilityUpdateSetNumRange
C#
public static void AccessibilityUpdateSetNumRange(Rid id, double min, double max);

Sets numeric value range.

Parameters
NameTypeDefault
idRid—
mindouble—
maxdouble—
AccessibilityUpdateSetNumStepvoid · Deprecated
# AccessibilityUpdateSetNumStep
C#
public static void AccessibilityUpdateSetNumStep(Rid id, double step);

Sets numeric value step.

Parameters
NameTypeDefault
idRid—
stepdouble—
AccessibilityUpdateSetNumValuevoid · Deprecated
# AccessibilityUpdateSetNumValue
C#
public static void AccessibilityUpdateSetNumValue(Rid id, double position);

Sets numeric value.

Parameters
NameTypeDefault
idRid—
positiondouble—
AccessibilityUpdateSetPlaceholdervoid · Deprecated
# AccessibilityUpdateSetPlaceholder
C#
public static void AccessibilityUpdateSetPlaceholder(Rid id, string placeholder);

Sets placeholder text.

Parameters
NameTypeDefault
idRid—
placeholderstring—
AccessibilityUpdateSetPopupTypevoid · Deprecated
# AccessibilityUpdateSetPopupType
C#
public static void AccessibilityUpdateSetPopupType(Rid id, DisplayServer.AccessibilityPopupType popup);

Sets popup type for popup buttons.

Parameters
NameTypeDefault
idRid—
popupDisplayServer.AccessibilityPopupType—
AccessibilityUpdateSetPreviousOnLinevoid · Deprecated
# AccessibilityUpdateSetPreviousOnLine
C#
public static void AccessibilityUpdateSetPreviousOnLine(Rid id, Rid otherId);

Sets previous element on the line.

Parameters
NameTypeDefault
idRid—
otherIdRid—
AccessibilityUpdateSetRolevoid · Deprecated
# AccessibilityUpdateSetRole
C#
public static void AccessibilityUpdateSetRole(Rid id, DisplayServer.AccessibilityRole role);

Sets element accessibility role.

Parameters
NameTypeDefault
idRid—
roleDisplayServer.AccessibilityRole—
AccessibilityUpdateSetRoleDescriptionvoid · Deprecated
# AccessibilityUpdateSetRoleDescription
C#
public static void AccessibilityUpdateSetRoleDescription(Rid id, string description);

Sets element accessibility role description text.

Parameters
NameTypeDefault
idRid—
descriptionstring—
AccessibilityUpdateSetScrollXvoid · Deprecated
# AccessibilityUpdateSetScrollX
C#
public static void AccessibilityUpdateSetScrollX(Rid id, double position);

Sets scroll bar x position.

Parameters
NameTypeDefault
idRid—
positiondouble—
AccessibilityUpdateSetScrollXRangevoid · Deprecated
# AccessibilityUpdateSetScrollXRange
C#
public static void AccessibilityUpdateSetScrollXRange(Rid id, double min, double max);

Sets scroll bar x range.

Parameters
NameTypeDefault
idRid—
mindouble—
maxdouble—
AccessibilityUpdateSetScrollYvoid · Deprecated
# AccessibilityUpdateSetScrollY
C#
public static void AccessibilityUpdateSetScrollY(Rid id, double position);

Sets scroll bar y position.

Parameters
NameTypeDefault
idRid—
positiondouble—
AccessibilityUpdateSetScrollYRangevoid · Deprecated
# AccessibilityUpdateSetScrollYRange
C#
public static void AccessibilityUpdateSetScrollYRange(Rid id, double min, double max);

Sets scroll bar y range.

Parameters
NameTypeDefault
idRid—
mindouble—
maxdouble—
AccessibilityUpdateSetShortcutvoid · Deprecated
# AccessibilityUpdateSetShortcut
C#
public static void AccessibilityUpdateSetShortcut(Rid id, string shortcut);

Sets the list of keyboard shortcuts used by element.

Parameters
NameTypeDefault
idRid—
shortcutstring—
AccessibilityUpdateSetStateDescriptionvoid · Deprecated
# AccessibilityUpdateSetStateDescription
C#
public static void AccessibilityUpdateSetStateDescription(Rid id, string description);

Sets human-readable description of the current checked state.

Parameters
NameTypeDefault
idRid—
descriptionstring—
AccessibilityUpdateSetTableCellPositionvoid · Deprecated
# AccessibilityUpdateSetTableCellPosition
C#
public static void AccessibilityUpdateSetTableCellPosition(Rid id, int rowIndex, int columnIndex);

Sets cell position in the table.

Parameters
NameTypeDefault
idRid—
rowIndexint—
columnIndexint—
AccessibilityUpdateSetTableCellSpanvoid · Deprecated
# AccessibilityUpdateSetTableCellSpan
C#
public static void AccessibilityUpdateSetTableCellSpan(Rid id, int rowSpan, int columnSpan);

Sets cell row/column span.

Parameters
NameTypeDefault
idRid—
rowSpanint—
columnSpanint—
AccessibilityUpdateSetTableColumnCountvoid · Deprecated
# AccessibilityUpdateSetTableColumnCount
C#
public static void AccessibilityUpdateSetTableColumnCount(Rid id, int count);

Sets number of columns in the table.

Parameters
NameTypeDefault
idRid—
countint—
AccessibilityUpdateSetTableColumnIndexvoid · Deprecated
# AccessibilityUpdateSetTableColumnIndex
C#
public static void AccessibilityUpdateSetTableColumnIndex(Rid id, int index);

Sets position of the column.

Parameters
NameTypeDefault
idRid—
indexint—
AccessibilityUpdateSetTableRowCountvoid · Deprecated
# AccessibilityUpdateSetTableRowCount
C#
public static void AccessibilityUpdateSetTableRowCount(Rid id, int count);

Sets number of rows in the table.

Parameters
NameTypeDefault
idRid—
countint—
AccessibilityUpdateSetTableRowIndexvoid · Deprecated
# AccessibilityUpdateSetTableRowIndex
C#
public static void AccessibilityUpdateSetTableRowIndex(Rid id, int index);

Sets position of the row in the table.

Parameters
NameTypeDefault
idRid—
indexint—
AccessibilityUpdateSetTextAlignvoid · Deprecated
# AccessibilityUpdateSetTextAlign
C#
public static void AccessibilityUpdateSetTextAlign(Rid id, HorizontalAlignment align);

Sets element text alignment.

Parameters
NameTypeDefault
idRid—
alignHorizontalAlignment—
AccessibilityUpdateSetTextDecorationsvoid · Deprecated
# AccessibilityUpdateSetTextDecorations
C#
public static void AccessibilityUpdateSetTextDecorations(Rid id, bool underline, bool strikethrough, bool overline);

Sets text underline/overline/strikethrough.

Parameters
NameTypeDefault
idRid—
underlinebool—
strikethroughbool—
overlinebool—
AccessibilityUpdateSetTextOrientationvoid · Deprecated
# AccessibilityUpdateSetTextOrientation
C#
public static void AccessibilityUpdateSetTextOrientation(Rid id, bool vertical);

Sets text orientation.

Parameters
NameTypeDefault
idRid—
verticalbool—
AccessibilityUpdateSetTextSelectionvoid · Deprecated
# AccessibilityUpdateSetTextSelection
C#
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.

Parameters
NameTypeDefault
idRid—
textStartIdRid—
startCharint—
textEndIdRid—
endCharint—
AccessibilityUpdateSetTooltipvoid · Deprecated
# AccessibilityUpdateSetTooltip
C#
public static void AccessibilityUpdateSetTooltip(Rid id, string tooltip);

Sets tooltip text.

Parameters
NameTypeDefault
idRid—
tooltipstring—
AccessibilityUpdateSetTransformvoid · Deprecated
# AccessibilityUpdateSetTransform
C#
public static void AccessibilityUpdateSetTransform(Rid id, Transform2D transform);

Sets element 2D transform.

Parameters
NameTypeDefault
idRid—
transformTransform2D—
AccessibilityUpdateSetUrlvoid · Deprecated
# AccessibilityUpdateSetUrl
C#
public static void AccessibilityUpdateSetUrl(Rid id, string url);

Sets link URL.

Parameters
NameTypeDefault
idRid—
urlstring—
AccessibilityUpdateSetValuevoid · Deprecated
# AccessibilityUpdateSetValue
C#
public static void AccessibilityUpdateSetValue(Rid id, string value);

Sets element text value.

Parameters
NameTypeDefault
idRid—
valuestring—
Beepvoid
# Beep
C#
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
# ClipboardGet
C#
public static string ClipboardGet();

Returns the user's clipboard as a string if possible.

Returns string
ClipboardGetImageImage
# ClipboardGetImage
C#
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.

Returns Image
ClipboardGetPrimarystring
# ClipboardGetPrimary
C#
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).

Returns string
ClipboardHasbool
# ClipboardHas
C#
public static bool ClipboardHas();

Returns true if there is a text content on the user's clipboard.

Returns bool
ClipboardHasImagebool
# ClipboardHasImage
C#
public static bool ClipboardHasImage();

Returns true if there is an image content on the user's clipboard.

Returns bool
ClipboardSetvoid
# ClipboardSet
C#
public static void ClipboardSet(string clipboard);

Sets the user's clipboard content to the given string.

Parameters
NameTypeDefault
clipboardstring—
ClipboardSetPrimaryvoid
# ClipboardSetPrimary
C#
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).

Parameters
NameTypeDefault
clipboardPrimarystring—
ColorPickerbool
# ColorPicker
C#
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).

Parameters
NameTypeDefault
callbackCallable—
Returns bool
CreateStatusIndicatorint
# CreateStatusIndicator
C#
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).

Parameters
NameTypeDefault
iconTexture2D—
tooltipstring—
callbackCallable—
Returns int
CursorGetShapeDisplayServer.CursorShape
# CursorGetShape
C#
public static DisplayServer.CursorShape CursorGetShape();

Returns the default mouse cursor shape set by DisplayServer.CursorSetShape.

Returns DisplayServer.CursorShape
CursorSetCustomImagevoid
# CursorSetCustomImage
C#
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.

Parameters
NameTypeDefault
cursorResource—
shapeDisplayServer.CursorShapeDisplayServer.CursorShape.Arrow
hotspotVector2?default
hotspot

If the parameter is null, then the default value is new Vector2(0.0f, 0.0f).

CursorSetShapevoid
# CursorSetShape
C#
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.

Parameters
NameTypeDefault
shapeDisplayServer.CursorShape—
DeleteStatusIndicatorvoid
# DeleteStatusIndicator
C#
public static void DeleteStatusIndicator(int id);

Removes the application status indicator.

Parameters
NameTypeDefault
idint—
DialogInputTextError
# DialogInputText
C#
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.

Parameters
NameTypeDefault
titlestring—
descriptionstring—
existingTextstring—
callbackCallable—
Returns Error
DialogShow2 overloads
# DialogShow · 1/2
C#
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.

Parameters
NameTypeDefault
titlestring—
descriptionstring—
buttonsReadOnlySpan<string>—
callbackCallable—
Returns Error
# DialogShow · 2/2
C#
public 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.

Parameters
NameTypeDefault
titlestring—
descriptionstring—
buttonsstring[]—
callbackCallable—
Returns Error
EnableForStealingFocusvoid
# EnableForStealingFocus
C#
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.

Parameters
NameTypeDefault
processIdlong—
FileDialogShow4 overloads
# FileDialogShow · 1/4
C#
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.

Parameters
NameTypeDefault
titlestring—
currentDirectorystring—
fileNamestring—
showHiddenbool—
modeDisplayServer.FileDialogMode—
filtersReadOnlySpan<string>—
callbackCallable—
Returns Error
# FileDialogShow · 2/4
C#
public 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.

Parameters
NameTypeDefault
titlestring—
currentDirectorystring—
fileNamestring—
showHiddenbool—
modeDisplayServer.FileDialogMode—
filtersReadOnlySpan<string>—
callbackCallable—
parentWindowIdint—
Returns Error
# FileDialogShow · 3/4
C#
public 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.

Parameters
NameTypeDefault
titlestring—
currentDirectorystring—
fileNamestring—
showHiddenbool—
modeDisplayServer.FileDialogMode—
filtersstring[]—
callbackCallable—
Returns Error
# FileDialogShow · 4/4
C#
public 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.

Parameters
NameTypeDefault
titlestring—
currentDirectorystring—
fileNamestring—
showHiddenbool—
modeDisplayServer.FileDialogMode—
filtersstring[]—
callbackCallable—
parentWindowIdint0
Returns Error
FileDialogWithOptionsShow4 overloads
# FileDialogWithOptionsShow · 1/4
C#
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 name string.
  • "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 the DisplayServer.Feature.NativeDialogFileExtra feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. 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 Linux (X11), show_hidden is 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. Use OS.GetGrantedPermissions to get a list of saved bookmarks.
Parameters
NameTypeDefault
titlestring—
currentDirectorystring—
rootstring—
fileNamestring—
showHiddenbool—
modeDisplayServer.FileDialogMode—
filtersReadOnlySpan<string>—
optionsReckfell.Collections.Array<Reckfell.Collections.Dictionary>—
callbackCallable—
Returns Error
# FileDialogWithOptionsShow · 2/4
C#
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, 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 name string.
  • "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 the DisplayServer.Feature.NativeDialogFileExtra feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. 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 Linux (X11), show_hidden is 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. Use OS.GetGrantedPermissions to get a list of saved bookmarks.
Parameters
NameTypeDefault
titlestring—
currentDirectorystring—
rootstring—
fileNamestring—
showHiddenbool—
modeDisplayServer.FileDialogMode—
filtersReadOnlySpan<string>—
optionsReckfell.Collections.Array<Reckfell.Collections.Dictionary>—
callbackCallable—
parentWindowIdint—
Returns Error
# FileDialogWithOptionsShow · 3/4
C#
public 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 name string.
  • "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 the DisplayServer.Feature.NativeDialogFileExtra feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. 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 Linux (X11), show_hidden is 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. Use OS.GetGrantedPermissions to get a list of saved bookmarks.
Parameters
NameTypeDefault
titlestring—
currentDirectorystring—
rootstring—
fileNamestring—
showHiddenbool—
modeDisplayServer.FileDialogMode—
filtersstring[]—
optionsReckfell.Collections.Array<Reckfell.Collections.Dictionary>—
callbackCallable—
Returns Error
# FileDialogWithOptionsShow · 4/4
C#
public 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 name string.
  • "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 the DisplayServer.Feature.NativeDialogFileExtra feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. 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 Linux (X11), show_hidden is 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. Use OS.GetGrantedPermissions to get a list of saved bookmarks.
Parameters
NameTypeDefault
titlestring—
currentDirectorystring—
rootstring—
fileNamestring—
showHiddenbool—
modeDisplayServer.FileDialogMode—
filtersstring[]—
optionsReckfell.Collections.Array<Reckfell.Collections.Dictionary>—
callbackCallable—
parentWindowIdint0
Returns Error
ForceProcessAndDropEventsvoid
# ForceProcessAndDropEvents
C#
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
# GetAccentColor
C#
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).

Returns Color
GetBaseColorColor
# GetBaseColor
C#
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.

Returns Color
GetDisplayCutouts2 overloads
# GetDisplayCutouts · 1/2
C#
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.

Returns Reckfell.Collections.Array<Rect2>
# GetDisplayCutouts · 2/2
C#
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.

Parameters
NameTypeDefault
screenint-1
Returns Reckfell.Collections.Array<Rect2>
GetDisplaySafeArea2 overloads
# GetDisplaySafeArea · 1/2
C#
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.

Returns Rect2I
# GetDisplaySafeArea · 2/2
C#
public 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.

Parameters
NameTypeDefault
screenint-1
Returns Rect2I
GetKeyboardFocusScreenint
# GetKeyboardFocusScreen
C#
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.

Returns int
GetNamestring
# GetName
C#
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).

Returns string
GetPrimaryScreenint
# GetPrimaryScreen
C#
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.

Returns int
GetScreenCountint
# GetScreenCount
C#
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.

Returns int
GetScreenFromRectint
# GetScreenFromRect
C#
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.

Parameters
NameTypeDefault
rectRect2—
Returns int
GetSwapCancelOkbool
# GetSwapCancelOk
C#
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.

Returns bool
GetWindowAtScreenPositionint
# GetWindowAtScreenPosition
C#
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:

Text
* (0, 0)        ┌───────┐
                │       │
┌─────────────┐ │       │
│             │ │       │
│             │ │       │
└─────────────┘ └───────┘
Parameters
NameTypeDefault
positionVector2I—
Returns int
GetWindowListint[]
# GetWindowList
C#
public static int[] GetWindowList();

Returns the list of Reckfell window IDs belonging to this process. Note: Native dialogs are not included in this list.

Returns int[]
GlobalMenuAddCheckItemint · Deprecated
# GlobalMenuAddCheckItem
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
labelstring—
callbackCallabledefault
keyCallbackCallabledefault
tagVariantdefault
acceleratorKeyKey.None
indexint-1
Returns int
GlobalMenuAddIconCheckItemint · Deprecated
# GlobalMenuAddIconCheckItem
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
iconTexture2D—
labelstring—
callbackCallabledefault
keyCallbackCallabledefault
tagVariantdefault
acceleratorKeyKey.None
indexint-1
Returns int
GlobalMenuAddIconItemint · Deprecated
# GlobalMenuAddIconItem
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
iconTexture2D—
labelstring—
callbackCallabledefault
keyCallbackCallabledefault
tagVariantdefault
acceleratorKeyKey.None
indexint-1
Returns int
GlobalMenuAddIconRadioCheckItemint · Deprecated
# GlobalMenuAddIconRadioCheckItem
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
iconTexture2D—
labelstring—
callbackCallabledefault
keyCallbackCallabledefault
tagVariantdefault
acceleratorKeyKey.None
indexint-1
Returns int
GlobalMenuAddItemint · Deprecated
# GlobalMenuAddItem
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
labelstring—
callbackCallabledefault
keyCallbackCallabledefault
tagVariantdefault
acceleratorKeyKey.None
indexint-1
Returns int
GlobalMenuAddMultistateItemint · Deprecated
# GlobalMenuAddMultistateItem
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
labelstring—
maxStatesint—
defaultStateint—
callbackCallabledefault
keyCallbackCallabledefault
tagVariantdefault
acceleratorKeyKey.None
indexint-1
Returns int
GlobalMenuAddRadioCheckItemint · Deprecated
# GlobalMenuAddRadioCheckItem
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
labelstring—
callbackCallabledefault
keyCallbackCallabledefault
tagVariantdefault
acceleratorKeyKey.None
indexint-1
Returns int
GlobalMenuAddSeparatorint · Deprecated
# GlobalMenuAddSeparator
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
indexint-1
Returns int
GlobalMenuAddSubmenuItemint · Deprecated
# GlobalMenuAddSubmenuItem
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
labelstring—
submenustring—
indexint-1
Returns int
GlobalMenuClearvoid · Deprecated
# GlobalMenuClear
C#
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:

Text
"_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).
Parameters
NameTypeDefault
menuRootstring—
GlobalMenuGetItemAcceleratorKey · Deprecated
# GlobalMenuGetItemAccelerator
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns Key
GlobalMenuGetItemCallbackCallable · Deprecated
# GlobalMenuGetItemCallback
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns Callable
GlobalMenuGetItemCountint · Deprecated
# GlobalMenuGetItemCount
C#
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.

Parameters
NameTypeDefault
menuRootstring—
Returns int
GlobalMenuGetItemIconTexture2D · Deprecated
# GlobalMenuGetItemIcon
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns Texture2D
GlobalMenuGetItemIndentationLevelint · Deprecated
# GlobalMenuGetItemIndentationLevel
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns int
GlobalMenuGetItemIndexFromTagint · Deprecated
# GlobalMenuGetItemIndexFromTag
C#
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.

Parameters
NameTypeDefault
menuRootstring—
tagVariant—
Returns int
GlobalMenuGetItemIndexFromTextint · Deprecated
# GlobalMenuGetItemIndexFromText
C#
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.

Parameters
NameTypeDefault
menuRootstring—
textstring—
Returns int
GlobalMenuGetItemKeyCallbackCallable · Deprecated
# GlobalMenuGetItemKeyCallback
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns Callable
GlobalMenuGetItemMaxStatesint · Deprecated
# GlobalMenuGetItemMaxStates
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns int
GlobalMenuGetItemStateint · Deprecated
# GlobalMenuGetItemState
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns int
GlobalMenuGetItemSubmenustring · Deprecated
# GlobalMenuGetItemSubmenu
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns string
GlobalMenuGetItemTagVariant · Deprecated
# GlobalMenuGetItemTag
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns Variant
GlobalMenuGetItemTextstring · Deprecated
# GlobalMenuGetItemText
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns string
GlobalMenuGetItemTooltipstring · Deprecated
# GlobalMenuGetItemTooltip
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns string
GlobalMenuGetSystemMenuRootsReckfell.Collections.Dictionary · Deprecated
# GlobalMenuGetSystemMenuRoots
C#
public static Reckfell.Collections.Dictionary GlobalMenuGetSystemMenuRoots();

Returns Dictionary of supported system menu IDs and names. Note: This method is implemented only on macOS.

Returns Reckfell.Collections.Dictionary
GlobalMenuIsItemCheckablebool · Deprecated
# GlobalMenuIsItemCheckable
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns bool
GlobalMenuIsItemCheckedbool · Deprecated
# GlobalMenuIsItemChecked
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns bool
GlobalMenuIsItemDisabledbool · Deprecated
# GlobalMenuIsItemDisabled
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns bool
GlobalMenuIsItemHiddenbool · Deprecated
# GlobalMenuIsItemHidden
C#
public 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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns bool
GlobalMenuIsItemRadioCheckablebool · Deprecated
# GlobalMenuIsItemRadioCheckable
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
Returns bool
GlobalMenuRemoveItemvoid · Deprecated
# GlobalMenuRemoveItem
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
GlobalMenuSetItemAcceleratorvoid · Deprecated
# GlobalMenuSetItemAccelerator
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
keycodeKey—
GlobalMenuSetItemCallbackvoid · Deprecated
# GlobalMenuSetItemCallback
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
callbackCallable—
GlobalMenuSetItemCheckablevoid · Deprecated
# GlobalMenuSetItemCheckable
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
checkablebool—
GlobalMenuSetItemCheckedvoid · Deprecated
# GlobalMenuSetItemChecked
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
checkedbool—
GlobalMenuSetItemDisabledvoid · Deprecated
# GlobalMenuSetItemDisabled
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
disabledbool—
GlobalMenuSetItemHiddenvoid · Deprecated
# GlobalMenuSetItemHidden
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
hiddenbool—
GlobalMenuSetItemHoverCallbacksvoid · Deprecated
# GlobalMenuSetItemHoverCallbacks
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
callbackCallable—
GlobalMenuSetItemIconvoid · Deprecated
# GlobalMenuSetItemIcon
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
iconTexture2D—
GlobalMenuSetItemIndentationLevelvoid · Deprecated
# GlobalMenuSetItemIndentationLevel
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
levelint—
GlobalMenuSetItemKeyCallbackvoid · Deprecated
# GlobalMenuSetItemKeyCallback
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
keyCallbackCallable—
GlobalMenuSetItemMaxStatesvoid · Deprecated
# GlobalMenuSetItemMaxStates
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
maxStatesint—
GlobalMenuSetItemRadioCheckablevoid · Deprecated
# GlobalMenuSetItemRadioCheckable
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
checkablebool—
GlobalMenuSetItemStatevoid · Deprecated
# GlobalMenuSetItemState
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
stateint—
GlobalMenuSetItemSubmenuvoid · Deprecated
# GlobalMenuSetItemSubmenu
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
submenustring—
GlobalMenuSetItemTagvoid · Deprecated
# GlobalMenuSetItemTag
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
tagVariant—
GlobalMenuSetItemTextvoid · Deprecated
# GlobalMenuSetItemText
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
textstring—
GlobalMenuSetItemTooltipvoid · Deprecated
# GlobalMenuSetItemTooltip
C#
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.

Parameters
NameTypeDefault
menuRootstring—
idxint—
tooltipstring—
GlobalMenuSetPopupCallbacksvoid · Deprecated
# GlobalMenuSetPopupCallbacks
C#
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.

Parameters
NameTypeDefault
menuRootstring—
openCallbackCallable—
closeCallbackCallable—
HasAdditionalOutputsbool
# HasAdditionalOutputs
C#
public static bool HasAdditionalOutputs();

Returns true if any additional outputs have been registered via DisplayServer.RegisterAdditionalOutput.

Returns bool
HasFeaturebool
# HasFeature
C#
public static bool HasFeature(DisplayServer.Feature feature);

Returns true if the specified feature is supported by the current DisplayServer, false otherwise.

Parameters
NameTypeDefault
featureDisplayServer.Feature—
Returns bool
HasHardwareKeyboardbool
# HasHardwareKeyboard
C#
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.

Returns bool
HelpSetSearchCallbacksvoid
# HelpSetSearchCallbacks
C#
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.

Parameters
NameTypeDefault
searchCallbackCallable—
actionCallbackCallable—
HideToastNotificationvoid
# HideToastNotification
C#
public static void HideToastNotification(int id);

Hides the toast notification with id returned by DisplayServer.SendToastNotification. Note: This method is only implemented on Windows.

Parameters
NameTypeDefault
idint—
ImeGetSelectionVector2I
# ImeGetSelection
C#
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.

Returns Vector2I
ImeGetTextstring
# ImeGetText
C#
public static string ImeGetText();

Returns the composition string contained within the Input Method Editor window. Note: This method is implemented only on macOS.

Returns string
IsDarkModebool
# IsDarkMode
C#
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).

Returns bool
IsDarkModeSupportedbool
# IsDarkModeSupported
C#
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).

Returns bool
IsInPipModebool
# IsInPipMode
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns bool
IsTouchscreenAvailablebool
# IsTouchscreenAvailable
C#
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.

Returns bool
IsWindowTransparencyAvailablebool
# IsWindowTransparencyAvailable
C#
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.

Returns bool
KeyboardGetCurrentLayoutint
# KeyboardGetCurrentLayout
C#
public static int KeyboardGetCurrentLayout();

Returns active keyboard layout index. Note: This method is implemented on Linux (X11/Wayland), macOS, and Windows.

Returns int
KeyboardGetKeycodeFromPhysicalKey
# KeyboardGetKeycodeFromPhysical
C#
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.

Parameters
NameTypeDefault
keycodeKey—
Returns Key
KeyboardGetLabelFromPhysicalKey
# KeyboardGetLabelFromPhysical
C#
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.

Parameters
NameTypeDefault
keycodeKey—
Returns Key
KeyboardGetLayoutCountint
# KeyboardGetLayoutCount
C#
public static int KeyboardGetLayoutCount();

Returns the number of keyboard layouts. Note: This method is implemented on Linux (X11/Wayland), macOS and Windows.

Returns int
KeyboardGetLayoutLanguagestring
# KeyboardGetLayoutLanguage
C#
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.

Parameters
NameTypeDefault
indexint—
Returns string
KeyboardGetLayoutNamestring
# KeyboardGetLayoutName
C#
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.

Parameters
NameTypeDefault
indexint—
Returns string
KeyboardSetCurrentLayoutvoid
# KeyboardSetCurrentLayout
C#
public static void KeyboardSetCurrentLayout(int index);

Sets the active keyboard layout. Note: This method is implemented on Linux (X11/Wayland), macOS and Windows.

Parameters
NameTypeDefault
indexint—
MouseGetButtonStateMouseButtonMask
# MouseGetButtonState
C#
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.

Returns MouseButtonMask
MouseGetModeDisplayServer.MouseMode
# MouseGetMode
C#
public static DisplayServer.MouseMode MouseGetMode();

Returns the current mouse mode. See also DisplayServer.MouseSetMode.

Returns DisplayServer.MouseMode
MouseGetPositionVector2I
# MouseGetPosition
C#
public static Vector2I MouseGetPosition();

Returns the mouse cursor's current position in screen coordinates.

Returns Vector2I
MouseSetModevoid
# MouseSetMode
C#
public static void MouseSetMode(DisplayServer.MouseMode mouseMode);

Sets the current mouse mode. See also DisplayServer.MouseGetMode.

Parameters
NameTypeDefault
mouseModeDisplayServer.MouseMode—
PipModeEntervoid
# PipModeEnter
C#
public static void PipModeEnter(int windowId = 0);

Enters picture-in-picture mode. Note: This method is implemented on Android.

Parameters
NameTypeDefault
windowIdint0
PipModeSetAspectRatiovoid
# PipModeSetAspectRatio
C#
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.

Parameters
NameTypeDefault
numeratorint—
denominatorint—
windowIdint0
PipModeSetAutoEnterOnBackgroundvoid
# PipModeSetAutoEnterOnBackground
C#
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.

Parameters
NameTypeDefault
autoEnterOnBackgroundbool—
windowIdint0
ProcessEventsvoid
# ProcessEvents
C#
public static void ProcessEvents();

Perform window manager processing, including input flushing. See also DisplayServer.ForceProcessAndDropEvents, Input.FlushBufferedEvents and Input.UseAccumulatedInput.

RegisterAdditionalOutputvoid
# RegisterAdditionalOutput
C#
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.

Parameters
NameTypeDefault
objectReckfellObject—
ScreenGetDpiint
# ScreenGetDpi
C#
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:

Text
   ldpi - 120 dpi
   mdpi - 160 dpi
   hdpi - 240 dpi
  xhdpi - 320 dpi
 xxhdpi - 480 dpi
xxxhdpi - 640 dpi

Note: This method is implemented on Android, iOS, Linux (X11/Wayland), macOS, Web, and Windows. On other platforms, this method always returns 72.

Parameters
NameTypeDefault
screenint-1
Returns int
ScreenGetImageImage
# ScreenGetImage
C#
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.

Parameters
NameTypeDefault
screenint-1
Returns Image
ScreenGetImageRectImage
# ScreenGetImageRect
C#
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.

Parameters
NameTypeDefault
rectRect2I—
Returns Image
ScreenGetMaxScalefloat
# ScreenGetMaxScale
C#
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.

Returns float
ScreenGetOrientationDisplayServer.ScreenOrientation
# ScreenGetOrientation
C#
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.

Parameters
NameTypeDefault
screenint-1
Returns DisplayServer.ScreenOrientation
ScreenGetPixelColor
# ScreenGetPixel
C#
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.

Parameters
NameTypeDefault
positionVector2I—
Returns Color
ScreenGetPositionVector2I
# ScreenGetPosition
C#
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:

Text
* (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.

Parameters
NameTypeDefault
screenint-1
Returns Vector2I
ScreenGetRefreshRatefloat
# ScreenGetRefreshRate
C#
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.

Parameters
NameTypeDefault
screenint-1
Returns float
ScreenGetScalefloat
# ScreenGetScale
C#
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.

Parameters
NameTypeDefault
screenint-1
Returns float
ScreenGetSizeVector2I
# ScreenGetSize
C#
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.

Parameters
NameTypeDefault
screenint-1
Returns Vector2I
ScreenGetUsableRectRect2I
# ScreenGetUsableRect
C#
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)).

Parameters
NameTypeDefault
screenint-1
Returns Rect2I
ScreenIsKeptOnbool
# ScreenIsKeptOn
C#
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.

Returns bool
ScreenSetKeepOnvoid
# ScreenSetKeepOn
C#
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.

Parameters
NameTypeDefault
enablebool—
ScreenSetOrientationvoid
# ScreenSetOrientation
C#
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.

Parameters
NameTypeDefault
orientationDisplayServer.ScreenOrientation—
screenint-1
SendToastNotificationint
# SendToastNotification
C#
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.

Parameters
NameTypeDefault
titlestring—
textstring—
imageTexture2D—
callbackCallable—
Returns int
SetHardwareKeyboardConnectionChangeCallbackvoid
# SetHardwareKeyboardConnectionChangeCallback
C#
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.

Parameters
NameTypeDefault
callableCallable—
SetIconvoid
# SetIcon
C#
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.

Parameters
NameTypeDefault
imageImage—
SetNativeIconvoid
# SetNativeIcon
C#
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.

Parameters
NameTypeDefault
fileNamestring—
SetSystemThemeChangeCallbackvoid
# SetSystemThemeChangeCallback
C#
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).

Parameters
NameTypeDefault
callableCallable—
ShowEmojiAndSymbolPickervoid
# ShowEmojiAndSymbolPicker
C#
public static void ShowEmojiAndSymbolPicker();

Opens system emoji and symbol picker. Note: This method is implemented on macOS and Windows.

StatusIndicatorGetRectRect2
# StatusIndicatorGetRect
C#
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.

Parameters
NameTypeDefault
idint—
Returns Rect2
StatusIndicatorSetCallbackvoid
# StatusIndicatorSetCallback
C#
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.

Parameters
NameTypeDefault
idint—
callbackCallable—
StatusIndicatorSetIconvoid
# StatusIndicatorSetIcon
C#
public static void StatusIndicatorSetIcon(int id, Texture2D icon);

Sets the application status indicator icon. Note: This method is implemented on macOS and Windows.

Parameters
NameTypeDefault
idint—
iconTexture2D—
StatusIndicatorSetMenuvoid
# StatusIndicatorSetMenu
C#
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.

Parameters
NameTypeDefault
idint—
menuRidRid—
StatusIndicatorSetTooltipvoid
# StatusIndicatorSetTooltip
C#
public static void StatusIndicatorSetTooltip(int id, string tooltip);

Sets the application status indicator tooltip. Note: This method is implemented on macOS and Windows.

Parameters
NameTypeDefault
idint—
tooltipstring—
TabletGetCurrentDriverstring
# TabletGetCurrentDriver
C#
public static string TabletGetCurrentDriver();

Returns current active tablet driver name. Note: This method is implemented only on Windows.

Returns string
TabletGetDriverCountint
# TabletGetDriverCount
C#
public static int TabletGetDriverCount();

Returns the total number of available tablet drivers. Note: This method is implemented only on Windows.

Returns int
TabletGetDriverNamestring
# TabletGetDriverName
C#
public static string TabletGetDriverName(int idx);

Returns the tablet driver name for the given index. Note: This method is implemented only on Windows.

Parameters
NameTypeDefault
idxint—
Returns string
TabletSetCurrentDrivervoid
# TabletSetCurrentDriver
C#
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.
Parameters
NameTypeDefault
namestring—
TtsGetVoicesReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# TtsGetVoices
C#
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:

  • name is voice name.
  • id is voice identifier.
  • language is language code in lang_Variant format. The lang part 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.
Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>
TtsGetVoicesForLanguagestring[]
# TtsGetVoicesForLanguage
C#
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.

Parameters
NameTypeDefault
languagestring—
language

Available-voice language prefix, such as en. Do not assume text locale automatically matches the system voice designation.

Returns string[]

string[] of IDs. An empty result is valid; a previously saved ID may disappear after system changes.

TtsIsPausedbool
# TtsIsPaused
C#
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.

Returns bool
TtsIsSpeakingbool
# TtsIsSpeaking
C#
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.

Returns bool
TtsPausevoid
# TtsPause
C#
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
# TtsResume
C#
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
# TtsSetUtteranceCallback
C#
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.

Parameters
NameTypeDefault
eventDisplayServer.TtsUtteranceEvent—
callableCallable—
TtsSpeak2 overloads
# TtsSpeak · 1/2
C#
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.

  • voice identifier is one of the "id" values returned by DisplayServer.TtsGetVoices or one of the values returned by DisplayServer.TtsGetVoicesForLanguage.
  • volume ranges from 0 (lowest) to 100 (highest).
  • pitch ranges from 0.0 (lowest) to 2.0 (highest), 1.0 is default pitch for the current voice.
  • rate ranges from 0.1 (lowest) to 10.0 (highest), 1.0 is a normal speaking rate. Other values act as a percentage relative.
  • utterance_id is passed as a parameter to the callback functions. Note: On Windows and Linux (X11/Wayland), utterance text can 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 calling DisplayServer.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.
Parameters
NameTypeDefault
textstring—
voicestring—
volumeint—
pitchfloat—
ratefloat—
utteranceIdint—
interruptbool—
# TtsSpeak · 2/2
C#
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.

Parameters
NameTypeDefault
textstring—
voicestring—
volumeint50
pitchfloat1f
ratefloat1f
utteranceIdlong0
interruptboolfalse
text

Meaningful text to speak without UI markup.

voice

ID from the current voice list, not a display name or language code alone.

volume

Volume 0–100, default 50. Respect the user narration setting.

pitch

Pitch, default 1. Actual sound depends on voice and backend.

rate

Rate, default 1. This is not an exact phrase duration in seconds.

utteranceId

int64 ID for correlating callbacks. Use long in C#, such as 0L, to select this overload.

interrupt

true to interrupt current speech for this request; false queues without that interruption.

TtsStopvoid
# TtsStop
C#
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
# UnregisterAdditionalOutput
C#
public static void UnregisterAdditionalOutput(ReckfellObject @object);

Unregisters an ReckfellObject representing an additional output, that was registered via DisplayServer.RegisterAdditionalOutput.

Parameters
NameTypeDefault
objectReckfellObject—
VirtualKeyboardGetHeightint
# VirtualKeyboardGetHeight
C#
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.

Returns int
VirtualKeyboardHidevoid
# VirtualKeyboardHide
C#
public static void VirtualKeyboardHide();

Hides the virtual keyboard if it is shown, does nothing otherwise.

VirtualKeyboardShowvoid
# VirtualKeyboardShow
C#
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.

Parameters
NameTypeDefault
existingTextstring—
positionRect2?default
typeDisplayServer.VirtualKeyboardTypeDisplayServer.VirtualKeyboardType.Default
maxLengthint-1
cursorStartint-1
cursorEndint-1
position

If the parameter is null, then the default value is new Rect2(new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f)).

WarpMousevoid
# WarpMouse
C#
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.

Parameters
NameTypeDefault
positionVector2I—
WindowCanDrawbool
# WindowCanDraw
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns bool
WindowGetActivePopupint
# WindowGetActivePopup
C#
public static int WindowGetActivePopup();

Returns ID of the active popup window, or DisplayServer.InvalidWindowId if there is none.

Returns int
WindowGetAttachedInstanceIdulong
# WindowGetAttachedInstanceId
C#
public static ulong WindowGetAttachedInstanceId(int windowId = 0);

Returns the ReckfellObject.GetInstanceId of the Window the window_id is attached to.

Parameters
NameTypeDefault
windowIdint0
Returns ulong
WindowGetCurrentScreenint
# WindowGetCurrentScreen
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns int
WindowGetFlagbool
# WindowGetFlag
C#
public static bool WindowGetFlag(DisplayServer.WindowFlags flag, int windowId = 0);

Returns the current value of the given window's flag.

Parameters
NameTypeDefault
flagDisplayServer.WindowFlags—
windowIdint0
Returns bool
WindowGetHdrOutputCurrentMaxLuminancefloat
# WindowGetHdrOutputCurrentMaxLuminance
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns float
WindowGetHdrOutputCurrentReferenceLuminancefloat
# WindowGetHdrOutputCurrentReferenceLuminance
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns float
WindowGetHdrOutputMaxLuminancefloat
# WindowGetHdrOutputMaxLuminance
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns float
WindowGetHdrOutputReferenceLuminancefloat
# WindowGetHdrOutputReferenceLuminance
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns float
WindowGetMaxSizeVector2I
# WindowGetMaxSize
C#
public static Vector2I WindowGetMaxSize(int windowId = 0);

Returns the window's maximum size (in pixels). See also DisplayServer.WindowSetMaxSize.

Parameters
NameTypeDefault
windowIdint0
Returns Vector2I
WindowGetMinSizeVector2I
# WindowGetMinSize
C#
public static Vector2I WindowGetMinSize(int windowId = 0);

Returns the window's minimum size (in pixels). See also DisplayServer.WindowSetMinSize.

Parameters
NameTypeDefault
windowIdint0
Returns Vector2I
WindowGetModeDisplayServer.WindowMode
# WindowGetMode
C#
public static DisplayServer.WindowMode WindowGetMode(int windowId = 0);

Returns the mode of the given window.

Parameters
NameTypeDefault
windowIdint0
Returns DisplayServer.WindowMode
WindowGetNativeHandlelong
# WindowGetNativeHandle
C#
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.

Parameters
NameTypeDefault
handleTypeDisplayServer.HandleType—
windowIdint0
Returns long
WindowGetOutputMaxLinearValuefloat
# WindowGetOutputMaxLinearValue
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns float
WindowGetPopupSafeRectRect2I
# WindowGetPopupSafeRect
C#
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.

Parameters
NameTypeDefault
windowint—
Returns Rect2I
WindowGetPositionVector2I
# WindowGetPosition
C#
public static Vector2I WindowGetPosition(int windowId = 0);

Returns the position of the client area of the given window on the screen.

Parameters
NameTypeDefault
windowIdint0
Returns Vector2I
WindowGetPositionWithDecorationsVector2I
# WindowGetPositionWithDecorations
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns Vector2I
WindowGetSafeTitleMarginsVector3I
# WindowGetSafeTitleMargins
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns Vector3I
WindowGetSizeVector2I
# WindowGetSize
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns Vector2I
WindowGetSizeWithDecorationsVector2I
# WindowGetSizeWithDecorations
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns Vector2I
WindowGetTitleSizeVector2I
# WindowGetTitleSize
C#
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.

Parameters
NameTypeDefault
titlestring—
windowIdint0
Returns Vector2I
WindowGetVsyncModeDisplayServer.VSyncMode
# WindowGetVsyncMode
C#
public static DisplayServer.VSyncMode WindowGetVsyncMode(int windowId = 0);

Returns the V-Sync mode of the given window.

Parameters
NameTypeDefault
windowIdint0
Returns DisplayServer.VSyncMode
WindowIsFocusedbool
# WindowIsFocused
C#
public static bool WindowIsFocused(int windowId = 0);

Returns true if the window specified by window_id is focused.

Parameters
NameTypeDefault
windowIdint0
Returns bool
WindowIsHdrOutputEnabledbool
# WindowIsHdrOutputEnabled
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns bool
WindowIsHdrOutputRequestedbool
# WindowIsHdrOutputRequested
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns bool
WindowIsHdrOutputSupportedbool
# WindowIsHdrOutputSupported
C#
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.

Parameters
NameTypeDefault
windowIdint0
Returns bool
WindowIsMaximizeAllowedbool
# WindowIsMaximizeAllowed
C#
public static bool WindowIsMaximizeAllowed(int windowId = 0);

Returns true if the given window can be maximized (the maximize button is enabled).

Parameters
NameTypeDefault
windowIdint0
Returns bool
WindowMaximizeOnTitleDblClickbool
# WindowMaximizeOnTitleDblClick
C#
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.

Returns bool
WindowMinimizeOnTitleDblClickbool
# WindowMinimizeOnTitleDblClick
C#
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.

Returns bool
WindowMoveToForegroundvoid
# WindowMoveToForeground
C#
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.

Parameters
NameTypeDefault
windowIdint0
WindowRequestAttentionvoid
# WindowRequestAttention
C#
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.

Parameters
NameTypeDefault
windowIdint0
WindowRequestHdrOutputvoid
# WindowRequestHdrOutput
C#
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.

Parameters
NameTypeDefault
enablebool—
windowIdint0
WindowSetColorvoid
# WindowSetColor
C#
public static void WindowSetColor(Color color);

Sets the background color of the root window. Note: This method is implemented only on Android.

Parameters
NameTypeDefault
colorColor—
WindowSetCurrentScreenvoid
# WindowSetCurrentScreen
C#
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.

Parameters
NameTypeDefault
screenint—
windowIdint0
WindowSetDropFilesCallbackvoid
# WindowSetDropFilesCallback
C#
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.

Parameters
NameTypeDefault
callbackCallable—
windowIdint0
WindowSetExclusivevoid
# WindowSetExclusive
C#
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.

Parameters
NameTypeDefault
windowIdint—
exclusivebool—
WindowSetFlagvoid
# WindowSetFlag
C#
public static void WindowSetFlag(DisplayServer.WindowFlags flag, bool enabled, int windowId = 0);

Enables or disables the given window's given flag.

Parameters
NameTypeDefault
flagDisplayServer.WindowFlags—
enabledbool—
windowIdint0
WindowSetHdrOutputMaxLuminancevoid
# WindowSetHdrOutputMaxLuminance
C#
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.

Parameters
NameTypeDefault
maxLuminancefloat—
windowIdint0
WindowSetHdrOutputReferenceLuminancevoid
# WindowSetHdrOutputReferenceLuminance
C#
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.

Parameters
NameTypeDefault
referenceLuminancefloat—
windowIdint0
WindowSetIconvoid
# WindowSetIcon
C#
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.

Parameters
NameTypeDefault
iconImage—
windowIdint0
WindowSetImeActivevoid
# WindowSetImeActive
C#
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.

Parameters
NameTypeDefault
activebool—
windowIdint0
WindowSetImePositionvoid
# WindowSetImePosition
C#
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.

Parameters
NameTypeDefault
positionVector2I—
windowIdint0
WindowSetInputEventCallbackvoid
# WindowSetInputEventCallback
C#
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.

Parameters
NameTypeDefault
callbackCallable—
windowIdint0
WindowSetInputTextCallbackvoid
# WindowSetInputTextCallback
C#
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.

Parameters
NameTypeDefault
callbackCallable—
windowIdint0
WindowSetMaxSizevoid
# WindowSetMaxSize
C#
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.

Parameters
NameTypeDefault
maxSizeVector2I—
windowIdint0
WindowSetMinSizevoid
# WindowSetMinSize
C#
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.

Parameters
NameTypeDefault
minSizeVector2I—
windowIdint0
WindowSetModevoid
# WindowSetMode
C#
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.

Parameters
NameTypeDefault
modeDisplayServer.WindowMode—
windowIdint0
WindowSetMousePassthrough2 overloads
# WindowSetMousePassthrough · 1/2
C#
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).

C#
// 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.

Parameters
NameTypeDefault
regionVector2[]—
windowIdint0
# WindowSetMousePassthrough · 2/2
C#
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).

C#
// 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.

Parameters
NameTypeDefault
regionReadOnlySpan<Vector2>—
windowIdint—
WindowSetPopupSafeRectvoid
# WindowSetPopupSafeRect
C#
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.

Parameters
NameTypeDefault
windowint—
rectRect2I—
WindowSetPositionvoid
# WindowSetPosition
C#
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:

Text
* (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.

Parameters
NameTypeDefault
positionVector2I—
windowIdint0
WindowSetRectChangedCallbackvoid
# WindowSetRectChangedCallback
C#
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.

Parameters
NameTypeDefault
callbackCallable—
windowIdint0
WindowSetSizevoid
# WindowSetSize
C#
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.

Parameters
NameTypeDefault
sizeVector2I—
windowIdint0
WindowSetTaskbarProgressStatevoid
# WindowSetTaskbarProgressState
C#
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.

Parameters
NameTypeDefault
stateDisplayServer.ProgressState—
windowIdint0
WindowSetTaskbarProgressValuevoid
# WindowSetTaskbarProgressValue
C#
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.

Parameters
NameTypeDefault
valuefloat—
windowIdint0
WindowSetTitlevoid
# WindowSetTitle
C#
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.

Parameters
NameTypeDefault
titlestring—
windowIdint0
WindowSetTransientvoid
# WindowSetTransient
C#
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.

Parameters
NameTypeDefault
windowIdint—
parentWindowIdint—
WindowSetVsyncModevoid
# WindowSetVsyncMode
C#
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.

Parameters
NameTypeDefault
vsyncModeDisplayServer.VSyncMode—
windowIdint0
WindowSetWindowButtonsOffsetvoid
# WindowSetWindowButtonsOffset
C#
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.

Parameters
NameTypeDefault
offsetVector2I—
windowIdint0
WindowSetWindowEventCallbackvoid
# WindowSetWindowEventCallback
C#
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.

Parameters
NameTypeDefault
callbackCallable—
windowIdint0
WindowStartDragvoid
# WindowStartDrag
C#
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.

Parameters
NameTypeDefault
windowIdint0
WindowStartResizevoid
# WindowStartResize
C#
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.

Parameters
NameTypeDefault
edgeDisplayServer.WindowResizeEdge—
windowIdint0

Signals and events1

OrientationChangedEvent
# OrientationChanged
C#
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.

Handler parameters
NameTypeDefault
orientationDisplayServer.SensorOrientation—

Fields and constants9

InvalidIndicatorIdField
# InvalidIndicatorId
C#
public const long InvalidIndicatorId = -1;

The ID that refers to a nonexistent application status indicator.

InvalidNotificationIdField
# InvalidNotificationId
C#
public const long InvalidNotificationId = -1;

The ID that refers to a nonexistent toast notification.

InvalidScreenField
# InvalidScreen
C#
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
# InvalidWindowId
C#
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
# MainWindowId
C#
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
# ScreenOfMainWindow
C#
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
# ScreenPrimary
C#
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
# ScreenWithKeyboardFocus
C#
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
# ScreenWithMouseFocus
C#
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

ValueDescription
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 string with the replacement text.

ScrollBackward = 11

Scroll backward action, callback argument is not set.

ScrollDown = 12

Scroll down action, callback argument is set to DisplayServer.AccessibilityScrollUnit.

ScrollForward = 13

Scroll forward action, callback argument is not set.

ScrollIntoView = 17

Scroll into view action, callback argument is set to DisplayServer.AccessibilityScrollHint.

ScrollLeft = 14

Scroll left action, callback argument is set to DisplayServer.AccessibilityScrollUnit.

ScrollRight = 15

Scroll right action, callback argument is set to DisplayServer.AccessibilityScrollUnit.

ScrollToPoint = 18

Scroll to point action, callback argument is set to Vector2 with the relative point coordinates.

ScrollUp = 16

Scroll up action, callback argument is set to DisplayServer.AccessibilityScrollUnit.

SetScrollOffset = 19

Set scroll offset action, callback argument is set to Vector2 with the scroll offset.

SetTextSelection = 9

Set text selection action, callback argument is set to Reckfell.Collections.Dictionary with the following keys:

  • "start_element" accessibility element of the selection start.
  • "start_char" character offset relative to the accessibility element of the selection start.
  • "end_element" accessibility element of the selection end.
  • "end_char" character offset relative to the accessibility element of the selection end.
SetValue = 20

Set value action, callback argument is set to string or number with the new value.

ShowContextMenu = 21

Show context menu action, callback argument is not set.

ShowTooltip = 8

Show tooltip action, callback argument is not set.

DisplayServer.AccessibilityFlags

ValueDescription
Busy = 4

Element content is not ready (e.g. loading).

ClipsChildren = 9

Element clips children.

Disabled = 8

Element is disabled.

Hidden = 0

Element is hidden for accessibility tools.

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

ValueDescription
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

ValueDescription
Dialog = 3

Popup dialog.

List = 1

Popup list.

Menu = 0

Popup menu.

Tree = 2

Popup tree view.

DisplayServer.AccessibilityRole

ValueDescription
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.

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

ValueDescription
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

ValueDescription
Item = 0

The amount by which to scroll. A single item of a list, line of text.

Page = 1

The amount by which to scroll. A single page.

DisplayServer.CursorShape

ValueDescription
Arrow = 0

Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a LineEdit or TextEdit.

Bdiagsize = 11

Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered Control can be resized on both axes at once using the mouse.

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 DisplayServer.CursorShape.Wait.

CanDrop = 7

"Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a Control that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also DisplayServer.CursorShape.Drag.

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 DisplayServer.CursorShape.CanDrop.

Fdiagsize = 12

Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered Control can be resized on both axes at once using the mouse.

Forbidden = 8

Forbidden cursor. This is displayed during drag-and-drop operations if the hovered Control can't accept the drag-and-drop event.

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 Control can be horizontally resized using the mouse. See also DisplayServer.CursorShape.Hsplit.

Hsplit = 15

Horizontal split cursor. This is displayed when hovering a Control with splits that can be horizontally resized using the mouse, such as HSplitContainer. On some cursor themes, this cursor may have the same appearance as DisplayServer.CursorShape.Hsize.

Ibeam = 1

I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as LineEdit or TextEdit.

Max = 17

Represents the size of the DisplayServer.CursorShape enum.

Move = 13

Move cursor. Intended to be displayed when the hovered Control can be moved using the mouse.

PointingHand = 2

Pointing hand cursor shape. This is used by default when hovering a LinkButton or a URL tag in a RichTextLabel.

Vsize = 9

Vertical resize cursor. Intended to be displayed when the hovered Control can be vertically resized using the mouse. See also DisplayServer.CursorShape.Vsplit.

Vsplit = 14

Vertical split cursor. This is displayed when hovering a Control with splits that can be vertically resized using the mouse, such as VSplitContainer. On some cursor themes, this cursor may have the same appearance as DisplayServer.CursorShape.Vsize.

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.CursorShape.Busy.

DisplayServer.Feature

ValueDescription
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 DisplayServer.Feature.ClipboardPrimary. Windows, macOS, Linux (X11/Wayland), Android, iOS, Web

ClipboardPrimary = 18

Display server supports Primary clipboard can be used. This is a different clipboard from DisplayServer.Feature.Clipboard. Linux (X11/Wayland)

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 DisplayServer.WindowFlags.ExtendToTitle. macOS

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 DisplayServer.DialogShow. Windows, macOS

NativeDialogFile = 25

Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See DisplayServer.FileDialogShow. Windows, macOS, Linux (X11/Wayland), Android

NativeDialogFileExtra = 26

The display server supports all features of DisplayServer.Feature.NativeDialogFile, with the added functionality of Options and native dialog file access to asset:// and user:// paths. See DisplayServer.FileDialogShow and DisplayServer.FileDialogWithOptionsShow. Windows, macOS, Linux (X11/Wayland)

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 DisplayServer.DialogInputText. Windows, macOS

NativeHelp = 23

Display server supports native help system search callbacks. See DisplayServer.HelpSetSearchCallbacks.

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 DisplayServer.ScreenGetPixel.

ScreenExcludeFromCapture = 28

Display server supports DisplayServer.WindowFlags.ExcludeFromCapture window flag. Windows, macOS

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 tts_* methods. Windows, macOS, Linux (X11/Wayland), Android, iOS, Web

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 DisplayServer.WindowStartDrag and DisplayServer.WindowStartResize.

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

ValueDescription
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

ValueDescription
DisplayHandle = 0

Display handle:

  • Linux (X11): X11::Display* for the display.
  • Linux (Wayland): wl_display for the display.
  • Android: EGLDisplay for the display.
EglConfig = 5
  • Windows: EGLConfig for the window (ANGLE).
  • macOS: EGLConfig for the window (ANGLE).
  • Linux (Wayland): EGLConfig for the window.
EglDisplay = 4
  • Windows: EGLDisplay for the window (ANGLE).
  • macOS: EGLDisplay for the window (ANGLE).
  • Linux (Wayland): EGLDisplay for the window.
GlxFbconfig = 7

The GLXFBConfig for the window. Note: Only available on Linux when using X11.

GlxVisualid = 6

The GLX VisualID for the window. Note: Only available on Linux when using X11.

OpenglContext = 3

OpenGL context (only with the Compatibility renderer):

  • Windows: HGLRC for the window (native GL), or EGLContext for the window (ANGLE).
  • Linux (X11): GLXContext* for the window.
  • Linux (Wayland): EGLContext for the window.
  • macOS: NSOpenGLContext* for the window (native GL), or EGLContext for the window (ANGLE).
  • Android: EGLContext for the window.
WindowHandle = 1

Window handle:

  • Windows: HWND for the window.
  • Linux (X11): X11::Window* for the window.
  • Linux (Wayland): wl_surface for the window.
  • macOS: NSWindow* for the window.
  • iOS: UIViewController* for the view controller.
  • Android: jObject for the activity.
WindowView = 2

Window view:

  • Windows: HDC for the window (only with the Compatibility renderer).
  • macOS: NSView* for the window main view.
  • iOS: UIView* for the window main view.

DisplayServer.MouseMode

ValueDescription
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 InputEventMouseMotion.Relative or InputEventMouseMotion.ScreenRelative. Note: Even when captured, the mouse cursor is still able to press buttons if they overlap with the center of the window.

Confined = 3

Confines the mouse cursor to the game window, and make it visible.

ConfinedHidden = 4

Confines the mouse cursor to the game window, and make it hidden.

Hidden = 1

Makes the mouse cursor hidden if it is visible.

Max = 5

Max value of the DisplayServer.MouseMode.

Visible = 0

Makes the mouse cursor visible if it is hidden.

DisplayServer.NotificationStatus

ValueDescription
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

ValueDescription
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

ValueDescription
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

ValueDescription
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

ValueDescription
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

ValueDescription
Adaptive = 2

Behaves like DisplayServer.VSyncMode.Disabled when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (regardless of Engine.MaxFps). Behaves like DisplayServer.VSyncMode.Enabled when using the Compatibility rendering method.

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 Engine.MaxFps).

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 Engine.MaxFps).

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 Engine.MaxFps). Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). DisplayServer.VSyncMode.Mailbox works best when at least twice as many frames as the display refresh rate are rendered. Behaves like DisplayServer.VSyncMode.Enabled when using the Compatibility rendering method.

DisplayServer.VirtualKeyboardType

ValueDescription
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 DisplayServer.VirtualKeyboardType.Default.

Phone = 4

Virtual phone number keypad.

Url = 7

Virtual keyboard with additional keys to assist with typing URLs.

DisplayServer.WindowEvent

ValueDescription
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 Window.GetOutputMaxLinearValue has changed. This occurs when HDR output is enabled or disabled and when any HDR output luminance values of the window have changed, such as when the player adjusts their screen brightness setting or moves the window to a different screen.

TitlebarChange = 7

Sent when the window title bar decoration is changed (e.g. DisplayServer.WindowFlags.ExtendToTitle is set or window entered/exited full screen mode). Note: This flag is implemented only on macOS.

DisplayServer.WindowFlags

ValueDescription
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 DisplayServer.ScreenGetImage, DisplayServer.ScreenGetImageRect, and DisplayServer.ScreenGetPixel. Note: This flag is implemented on macOS and Windows (10, 20H1). Note: Setting this flag will prevent standard screenshot methods from capturing a window image, but does NOT guarantee that other apps won't be able to capture an image. It should not be used as a DRM or security measure.

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 DisplayServer.WindowSetWindowButtonsOffset to adjust minimize/maximize/close buttons offset. Use DisplayServer.WindowGetSafeTitleMargins to determine area under the title bar that is not covered by decorations. Note: This flag is implemented only on macOS.

Max = 13

Represents the size of the DisplayServer.WindowFlags enum.

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 OptionButton dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see DisplayServer.WindowSetTransient). Note: This flag is implemented on Linux (X11/Wayland), macOS, and Windows.

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 DisplayServer.WindowSetSize. This flag is ignored for full screen windows. Note: This flag is implemented on Linux (X11), macOS, and Windows.

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.IsWindowTransparencyAvailable returns false. Note: Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. Note: Transparency support is implemented on Android, but can only be enabled via ProjectSettings.display/window/per_pixel_transparency/allowed. This flag has no effect on Android.

DisplayServer.WindowMode

ValueDescription
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 DisplayServer.WindowMode.Fullscreen. 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.

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. Window will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed.

Minimized = 1

Minimized window mode, i.e. Window is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.

Windowed = 0

Windowed mode, i.e. Window doesn't occupy the whole screen (unless set to the size of the screen).

DisplayServer.WindowResizeEdge

ValueDescription
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 DisplayServer.WindowResizeEdge enum.

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.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.