mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add Wayland support
Not everything is yet implemented, either for Godot or personal limitations (I don't have all hardware in the world). A brief list of the most important issues follows: - Single-window only: the `DisplayServer` API doesn't expose enough information for properly creating XDG shell windows. - Very dumb rendering loop: this is very complicated, just know that the low consumption mode is forced to 2000 Hz and some clever hacks are in place to overcome a specific Wayland limitation. This will be improved to the extent possible both downstream and upstream. - Features to implement yet: IME, touch input, native file dialog, drawing tablet (commented out due to a refactor), screen recording. - Mouse passthrough can't be implement through a poly API, we need a rect-based one. - The cursor doesn't yet support fractional scaling. - Auto scale is rounded up when using fractional scaling as we don't have a per-window scale query API (basically we need `DisplayServer::window_get_scale`). - Building with `x11=no wayland=yes opengl=yes openxr=yes` fails. This also adds a new project property and editor setting for selecting the default DisplayServer to start, to allow this backend to start first in exported projects (X11 is still the default for now). The editor setting always overrides the project setting. Special thanks to Drew Devault, toger5, Sebastian Krzyszkowiak, Leandro Benedet Garcia, Subhransu, Yury Zhuravlev and Mara Huldra.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] 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.
|
||||
[b]Note:[/b] This method is only implemented on Linux (X11).
|
||||
[b]Note:[/b] This method is only implemented on Linux (X11/Wayland).
|
||||
</description>
|
||||
</method>
|
||||
<method name="clipboard_has" qualifiers="const">
|
||||
@@ -53,7 +53,7 @@
|
||||
<param index="0" name="clipboard_primary" type="String" />
|
||||
<description>
|
||||
Sets the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] 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.
|
||||
[b]Note:[/b] This method is only implemented on Linux (X11).
|
||||
[b]Note:[/b] This method is only implemented on Linux (X11/Wayland).
|
||||
</description>
|
||||
</method>
|
||||
<method name="cursor_get_shape" qualifiers="const">
|
||||
@@ -120,7 +120,7 @@
|
||||
<description>
|
||||
Displays OS native dialog for selecting files or directories in the file system.
|
||||
Callbacks have the following arguments: [code]status: bool, selected_paths: PackedStringArray, selected_filter_index: int[/code].
|
||||
[b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature, i.e. Linux, Windows, and macOS.
|
||||
[b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature, i.e. Linux (X11), Windows, and macOS.
|
||||
[b]Note:[/b] [param current_directory] might be ignored.
|
||||
[b]Note:[/b] On Linux, [param show_hidden] is ignored.
|
||||
[b]Note:[/b] On macOS, native file dialogs have no title.
|
||||
@@ -147,7 +147,7 @@
|
||||
Callbacks have the following arguments: [code]status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary[/code].
|
||||
[b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature, i.e. Linux, Windows, and macOS.
|
||||
[b]Note:[/b] [param current_directory] might be ignored.
|
||||
[b]Note:[/b] On Linux, [param show_hidden] is ignored.
|
||||
[b]Note:[/b] On Linux (X11), [param show_hidden] is ignored.
|
||||
[b]Note:[/b] On macOS, native file dialogs have no title.
|
||||
[b]Note:[/b] On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks.
|
||||
</description>
|
||||
@@ -188,8 +188,8 @@
|
||||
<method name="get_name" qualifiers="const">
|
||||
<return type="String" />
|
||||
<description>
|
||||
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] (although only X11 is currently implemented in Godot).
|
||||
The names of built-in display servers are [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5) and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]).
|
||||
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 [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Wayland[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5), and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_primary_screen" qualifiers="const">
|
||||
@@ -877,14 +877,14 @@
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OS is using dark mode.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11).
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_dark_mode_supported" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if OS supports dark mode.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11).
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland).
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_touchscreen_available" qualifiers="const">
|
||||
@@ -897,7 +897,7 @@
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns active keyboard layout index.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS, and Windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="keyboard_get_keycode_from_physical" qualifiers="const">
|
||||
@@ -905,7 +905,7 @@
|
||||
<param index="0" name="keycode" type="int" enum="Key" />
|
||||
<description>
|
||||
Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="keyboard_get_label_from_physical" qualifiers="const">
|
||||
@@ -913,14 +913,14 @@
|
||||
<param index="0" name="keycode" type="int" enum="Key" />
|
||||
<description>
|
||||
Converts a physical (US QWERTY) [param keycode] to localized label printed on the key in the active keyboard layout.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="keyboard_get_layout_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of keyboard layouts.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="keyboard_get_layout_language" qualifiers="const">
|
||||
@@ -928,7 +928,7 @@
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Returns the ISO-639/BCP-47 language code of the keyboard layout at position [param index].
|
||||
[b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="keyboard_get_layout_name" qualifiers="const">
|
||||
@@ -936,7 +936,7 @@
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Returns the localized name of the keyboard layout at position [param index].
|
||||
[b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="keyboard_set_current_layout">
|
||||
@@ -944,7 +944,7 @@
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Sets the active keyboard layout.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
|
||||
[b]Note:[/b] This method is implemented on Linux (X11/Wayland), macOS and Windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="mouse_get_button_state" qualifiers="const">
|
||||
@@ -993,7 +993,7 @@
|
||||
xxhdpi - 480 dpi
|
||||
xxxhdpi - 640 dpi
|
||||
[/codeblock]
|
||||
[b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows. Returns [code]72[/code] on unsupported platforms.
|
||||
[b]Note:[/b] This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns [code]72[/code] on unsupported platforms.
|
||||
</description>
|
||||
</method>
|
||||
<method name="screen_get_image" qualifiers="const">
|
||||
@@ -1044,6 +1044,7 @@
|
||||
+-------------+ +-------+
|
||||
[/codeblock]
|
||||
See also [method screen_get_size].
|
||||
[b]Note:[/b] On Linux (Wayland) this method always returns [code](0, 0)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="screen_get_refresh_rate" qualifiers="const">
|
||||
@@ -1162,7 +1163,7 @@
|
||||
- [code]id[/code] is voice identifier.
|
||||
- [code]language[/code] is language code in [code]lang_Variant[/code] format. The [code]lang[/code] part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. The [code skip-lint]Variant[/code] part is an engine-dependent string describing country, region or/and dialect.
|
||||
Note that Godot 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 Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1171,7 +1172,7 @@
|
||||
<param index="0" name="language" type="String" />
|
||||
<description>
|
||||
Returns an [PackedStringArray] of voice identifiers for the [param language].
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1179,7 +1180,7 @@
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the synthesizer is in a paused state.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1187,7 +1188,7 @@
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the synthesizer is generating speech, or have utterance waiting in the queue.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1195,7 +1196,7 @@
|
||||
<return type="void" />
|
||||
<description>
|
||||
Puts the synthesizer into a paused state.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1203,7 +1204,7 @@
|
||||
<return type="void" />
|
||||
<description>
|
||||
Resumes the synthesizer if it was paused.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1216,7 +1217,7 @@
|
||||
- [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance ID.
|
||||
- [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance ID.
|
||||
[b]Note:[/b] The granularity of the boundary callbacks is engine dependent.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1236,9 +1237,9 @@
|
||||
- [param pitch] ranges from [code]0.0[/code] (lowest) to [code]2.0[/code] (highest), [code]1.0[/code] is default pitch for the current voice.
|
||||
- [param rate] ranges from [code]0.1[/code] (lowest) to [code]10.0[/code] (highest), [code]1.0[/code] is a normal speaking rate. Other values act as a percentage relative.
|
||||
- [param utterance_id] is passed as a parameter to the callback functions.
|
||||
[b]Note:[/b] On Windows and Linux (X11), utterance [param 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 [method tts_speak].
|
||||
[b]Note:[/b] On Windows and Linux (X11/Wayland), utterance [param 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 [method tts_speak].
|
||||
[b]Note:[/b] The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1246,7 +1247,7 @@
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops synthesis in progress and removes all utterances from the queue.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows.
|
||||
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
|
||||
</description>
|
||||
</method>
|
||||
@@ -1286,7 +1287,7 @@
|
||||
<param index="0" name="position" type="Vector2i" />
|
||||
<description>
|
||||
Sets the mouse cursor position to the given [param position] relative to an origin at the upper left corner of the currently focused game Window Manager window.
|
||||
[b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web.
|
||||
[b]Note:[/b] [method warp_mouse] is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web.
|
||||
</description>
|
||||
</method>
|
||||
<method name="window_can_draw" qualifiers="const">
|
||||
@@ -1351,7 +1352,7 @@
|
||||
<param index="1" name="window_id" type="int" default="0" />
|
||||
<description>
|
||||
Returns internal structure pointers for use in plugins.
|
||||
[b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows.
|
||||
[b]Note:[/b] This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows.
|
||||
</description>
|
||||
</method>
|
||||
<method name="window_get_popup_safe_rect" qualifiers="const">
|
||||
@@ -1469,7 +1470,7 @@
|
||||
<description>
|
||||
Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id].
|
||||
[b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.
|
||||
[b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11) and Web.
|
||||
[b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web.
|
||||
</description>
|
||||
</method>
|
||||
<method name="window_set_exclusive">
|
||||
@@ -1612,6 +1613,7 @@
|
||||
[/codeblock]
|
||||
See also [method window_get_position] and [method window_set_size].
|
||||
[b]Note:[/b] It's recommended to change this value using [member Window.position] instead.
|
||||
[b]Note:[/b] On Linux (Wayland): this method is a no-op.
|
||||
</description>
|
||||
</method>
|
||||
<method name="window_set_rect_changed_callback">
|
||||
@@ -1693,22 +1695,22 @@
|
||||
Display server supports touchscreen input. [b]Windows, Linux (X11), Android, iOS, Web[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_MOUSE" value="3" enum="Feature">
|
||||
Display server supports mouse input. [b]Windows, macOS, Linux (X11), Android, Web[/b]
|
||||
Display server supports mouse input. [b]Windows, macOS, Linux (X11/Wayland), Android, Web[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_MOUSE_WARP" value="4" enum="Feature">
|
||||
Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. [b]Windows, macOS, Linux (X11)[/b]
|
||||
Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. [b]Windows, macOS, Linux (X11/Wayland)[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_CLIPBOARD" value="5" enum="Feature">
|
||||
Display server supports setting and getting clipboard data. See also [constant FEATURE_CLIPBOARD_PRIMARY]. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b]
|
||||
Display server supports setting and getting clipboard data. See also [constant FEATURE_CLIPBOARD_PRIMARY]. [b]Windows, macOS, Linux (X11/Wayland), Android, iOS, Web[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_VIRTUAL_KEYBOARD" value="6" enum="Feature">
|
||||
Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. [b]Android, iOS, Web[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_CURSOR_SHAPE" value="7" enum="Feature">
|
||||
Display server supports setting the mouse cursor shape to be different from the default. [b]Windows, macOS, Linux (X11), Android, Web[/b]
|
||||
Display server supports setting the mouse cursor shape to be different from the default. [b]Windows, macOS, Linux (X11/Wayland), Android, Web[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature">
|
||||
Display server supports setting the mouse cursor shape to a custom image. [b]Windows, macOS, Linux (X11), Web[/b]
|
||||
Display server supports setting the mouse cursor shape to a custom image. [b]Windows, macOS, Linux (X11/Wayland), Web[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature">
|
||||
Display server supports spawning dialogs using the operating system's native look-and-feel. [b]macOS[/b]
|
||||
@@ -1717,10 +1719,10 @@
|
||||
Display server supports [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url], which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. [b]Windows, macOS, Linux (X11)[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_WINDOW_TRANSPARENCY" value="11" enum="Feature">
|
||||
Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. [b]Windows, macOS, Linux (X11)[/b]
|
||||
Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. [b]Windows, macOS, Linux (X11/Wayland)[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_HIDPI" value="12" enum="Feature">
|
||||
Display server supports querying the operating system's display scale factor. This allows for [i]reliable[/i] automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). [b]Windows, macOS[/b]
|
||||
Display server supports querying the operating system's display scale factor. This allows for [i]reliable[/i] automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). [b]Windows, Linux (Wayland), macOS[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_ICON" value="13" enum="Feature">
|
||||
Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS, Linux (X11)[/b]
|
||||
@@ -1732,13 +1734,13 @@
|
||||
Display server supports changing the screen orientation. [b]Android, iOS[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_SWAP_BUFFERS" value="16" enum="Feature">
|
||||
Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). [b]Windows, macOS, Linux (X11)[/b]
|
||||
Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). [b]Windows, macOS, Linux (X11/Wayland)[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_CLIPBOARD_PRIMARY" value="18" enum="Feature">
|
||||
Display server supports Primary clipboard can be used. This is a different clipboard from [constant FEATURE_CLIPBOARD]. [b]Linux (X11)[/b]
|
||||
Display server supports Primary clipboard can be used. This is a different clipboard from [constant FEATURE_CLIPBOARD]. [b]Linux (X11/Wayland)[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_TEXT_TO_SPEECH" value="19" enum="Feature">
|
||||
Display server supports text-to-speech. See [code]tts_*[/code] methods. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b]
|
||||
Display server supports text-to-speech. See [code]tts_*[/code] methods. [b]Windows, macOS, Linux (X11/Wayland), Android, iOS, Web[/b]
|
||||
</constant>
|
||||
<constant name="FEATURE_EXTEND_TO_TITLE" value="20" enum="Feature">
|
||||
Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. [b]macOS[/b]
|
||||
@@ -1764,15 +1766,19 @@
|
||||
</constant>
|
||||
<constant name="SCREEN_WITH_MOUSE_FOCUS" value="-4">
|
||||
Represents the screen containing the mouse pointer.
|
||||
[b]Note:[/b] On Linux (Wayland), this constant always represents the screen at index [code]0[/code].
|
||||
</constant>
|
||||
<constant name="SCREEN_WITH_KEYBOARD_FOCUS" value="-3">
|
||||
Represents the screen containing the window with the keyboard focus.
|
||||
[b]Note:[/b] On Linux (Wayland), this constant always represents the screen at index [code]0[/code].
|
||||
</constant>
|
||||
<constant name="SCREEN_PRIMARY" value="-2">
|
||||
Represents the primary screen.
|
||||
[b]Note:[/b] On Linux (Wayland), this constant always represents the screen at index [code]0[/code].
|
||||
</constant>
|
||||
<constant name="SCREEN_OF_MAIN_WINDOW" value="-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.
|
||||
[b]Note:[/b] On Linux (Wayland), this constant always represents the screen at index [code]0[/code].
|
||||
</constant>
|
||||
<constant name="MAIN_WINDOW_ID" value="0">
|
||||
The ID of the main window spawned by the engine, which can be passed to methods expecting a [code]window_id[/code].
|
||||
@@ -1931,7 +1937,7 @@
|
||||
<constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags">
|
||||
The window background can be transparent.
|
||||
[b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
|
||||
[b]Note:[/b] Transparency support is implemented on Linux (X11), macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
|
||||
[b]Note:[/b] Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
|
||||
</constant>
|
||||
<constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags">
|
||||
The window can't be focused. No-focus window will ignore all input, except mouse clicks.
|
||||
@@ -2013,7 +2019,7 @@
|
||||
<constant name="OPENGL_CONTEXT" value="3" enum="HandleType">
|
||||
OpenGL context (only with the GL Compatibility renderer):
|
||||
- Windows: [code]HGLRC[/code] for the window (native GL), or [code]EGLContext[/code] for the window (ANGLE).
|
||||
- Linux: [code]GLXContext*[/code] for the window.
|
||||
- Linux (X11): [code]GLXContext*[/code] for the window.
|
||||
- macOS: [code]NSOpenGLContext*[/code] for the window (native GL), or [code]EGLContext[/code] for the window (ANGLE).
|
||||
- Android: [code]EGLContext[/code] for the window.
|
||||
</constant>
|
||||
|
||||
Reference in New Issue
Block a user