From 8574dac00e8f26263e4a249eeb12c9349edc5436 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 3 Oct 2022 09:39:34 +0300 Subject: [PATCH] [Docs] Synchronize and update Window and Display Server documentation. --- doc/classes/DisplayServer.xml | 45 +++++++++++++++++++++++++---------- doc/classes/Window.xml | 41 ++++++++++++++++--------------- 2 files changed, 54 insertions(+), 32 deletions(-) diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 6d3f3a7362e..0dbaa9c86f1 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1244,7 +1244,7 @@ Sets window mode for the given window to [param mode]. See [enum WindowMode] for possible values and how each mode behaves. - [b]Note:[/b] Setting the window to fullscreen forcibly sets the borderless flag to [code]true[/code], so make sure to set it back to [code]false[/code] when not wanted. + [b]Note:[/b] Setting the window to full screen forcibly sets the borderless flag to [code]true[/code], so make sure to set it back to [code]false[/code] when not wanted. @@ -1324,7 +1324,8 @@ - Sets window transient parent. Transient window is will be destroyed with its transient parent and displayed on top of non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. + Sets window transient parent. Transient window is 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 that behavior might be different depending on the platform. @@ -1495,60 +1496,78 @@ + Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen). + 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. + Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed. - Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project. - Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode. + Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. + Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. - Exclusive fullscreen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN]. - Only one window in exclusive fullscreen mode can be visible on a given screen at a time. If multiple windows are in exclusive fullscreen mode for the same screen, the last one being set to this mode takes precedence. - Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode. + Exclusive full screen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN]. + Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence. + Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. - Window can't be resizing by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows. + The window can't be resizing by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows. - Window do not have native title bar and other decorations. This flag is ignored for full-screen windows. + The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. - Window is floating above other regular windows. This flag is ignored for full-screen windows. + The window is floating on top of all other windows. This flag is ignored for full-screen windows. - Window background can be transparent. + 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, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. - Window can't be focused. No-focus window will ignore all input, except mouse clicks. + The window can't be focused. No-focus window will ignore all input, except mouse clicks. - Window is part of menu or [OptionButton] dropdown. This flag can't be changed when 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 [constant WINDOW_FLAG_TRANSPARENT] set. + 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 [code]transient parent[/code] set (see [method window_set_transient]). 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 [method window_set_window_buttons_offset] to adjust minimize/maximize/close buttons offset. + Use [method window_get_safe_title_margins] to determine area under the title bar that is not covered by decorations. [b]Note:[/b] This flag is implemented on macOS. + Max value of the [enum WindowFlags]. + Sent when the mouse pointer enters the window, see [method window_set_window_event_callback]. + Sent when the mouse pointer exits the window, see [method window_set_window_event_callback]. + Sent when the window grabs focus, see [method window_set_window_event_callback]. + Sent when the window loses focus, see [method window_set_window_event_callback]. + Sent when the user has attempted to close the window (e.g. close button is pressed), see [method window_set_window_event_callback]. + Sent when the device "Back" button is pressed, see [method window_set_window_event_callback]. + [b]Note:[/b] This event is implemented on Android. + Sent when the window is moved to the display with different DPI, or display DPI is changed, see [method window_set_window_event_callback]. + [b]Note:[/b] This flag is implemented on macOS. + Sent when the window title bar decoration is changed (e.g. [constant WINDOW_FLAG_EXTEND_TO_TITLE] is set or window entered/exited full screen mode), see [method window_set_window_event_callback]. + [b]Note:[/b] This flag is implemented on macOS. No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index c585b54ee18..a688fb36b3e 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -355,7 +355,7 @@ Set's the window's current mode. - [b]Note:[/b] Fullscreen mode is not exclusive fullscreen on Windows and Linux. + [b]Note:[/b] Fullscreen mode is not exclusive full screen on Windows and Linux. If [code]true[/code], the [Window] will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless [member exclusive] is enabled). @@ -377,12 +377,13 @@ The window's title. If the [Window] is non-embedded, title styles set in [Theme] will have no effect. - If [code]true[/code], the [Window] is transient, i.e. it's considered a child of another [Window]. Transient windows can't be in fullscreen mode and will return focus to their parent when closed. + If [code]true[/code], the [Window] is transient, i.e. it's considered a child of another [Window]. Transient window is 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 that behavior might be different depending on the platform. If [code]true[/code], the [Window]'s background can be transparent. This is best used with embedded windows. - [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] For native windows, 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, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. If [code]true[/code], the [Window] can't be focused nor interacted with. It can still be visible. @@ -457,7 +458,7 @@ - Emitted when window title bar decorations are changed, e.g., macOS window enter/exit full screen mode, or extend-to-title flag is changed. + Emitted when window title bar decorations are changed, e.g. macOS window enter/exit full screen mode, or extend-to-title flag is changed. @@ -484,43 +485,45 @@ [b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. - Windowed mode, i.e. [Window] doesn't occupy whole screen (unless set to the size of the screen). + Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen). - Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is presesd. + 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. - Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is presesd. + Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed. - Fullscreen window mode. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project. - Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode. + Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. + Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. - Exclusive fullscreen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant MODE_FULLSCREEN]. - Only one window in exclusive fullscreen mode can be visible on a given screen at a time. If multiple windows are in exclusive fullscreen mode for the same screen, the last one being set to this mode takes precedence. - Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode. + Exclusive full screen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant MODE_FULLSCREEN]. + Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence. + Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. - The window's ability to be resized. Set with [member unresizable]. + The window can't be resizing by dragging its resize grip. It's still possible to resize the window using [member size]. This flag is ignored for full screen windows. Set with [member unresizable]. - Borderless window. Set with [member borderless]. + The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with [member borderless]. - Flag for making the window always on top of all other windows. Set with [member always_on_top]. + The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with [member always_on_top]. - Flag for per-pixel transparency. Set with [member transparent]. + 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]. Set with [member transparent]. - The window's ability to gain focus. Set with [member unfocusable]. + The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with [member unfocusable]. - Whether the window is popup or a regular window. Set with [member popup_window]. + 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 [code]transient parent[/code] set (see [member transient]). - Window contents is expanded to the full size of the window, window title bar is transparent. + 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. Set with [member extend_to_title]. + [b]Note:[/b] This flag is implemented on macOS. Max value of the [enum Flags].