Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4eae6f8

Browse files
committedNov 10, 2023
Merge pull request godotengine#84669 from akien-mga/doc-displayserver-dont-mess-with-windows
doc: Clarify that `DisplayServer.window_set_*_callback` aren't supported on Window nodes
2 parents 8c53a72 + 354c622 commit 4eae6f8

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed
 

‎doc/classes/DisplayServer.xml

+13-8
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,7 @@
14031403
<param index="1" name="window_id" type="int" default="0" />
14041404
<description>
14051405
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].
1406+
[b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.
14061407
[b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11) and Web.
14071408
</description>
14081409
</method>
@@ -1447,6 +1448,7 @@
14471448
<param index="1" name="window_id" type="int" default="0" />
14481449
<description>
14491450
Sets the [param callback] that should be called when any [InputEvent] is sent to the window specified by [param window_id].
1451+
[b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.
14501452
</description>
14511453
</method>
14521454
<method name="window_set_input_text_callback">
@@ -1455,6 +1457,7 @@
14551457
<param index="1" name="window_id" type="int" default="0" />
14561458
<description>
14571459
Sets the [param callback] that should be called when text is entered using the virtual keyboard to the window specified by [param window_id].
1460+
[b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.
14581461
</description>
14591462
</method>
14601463
<method name="window_set_max_size">
@@ -1552,6 +1555,7 @@
15521555
<param index="1" name="window_id" type="int" default="0" />
15531556
<description>
15541557
Sets the [param callback] that will be called when the window specified by [param window_id] is moved or resized.
1558+
[b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.
15551559
</description>
15561560
</method>
15571561
<method name="window_set_size">
@@ -1609,6 +1613,7 @@
16091613
<param index="1" name="window_id" type="int" default="0" />
16101614
<description>
16111615
Sets the [param callback] that will be called when an event occurs in the window specified by [param window_id].
1616+
[b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs.
16121617
</description>
16131618
</method>
16141619
</methods>
@@ -1882,30 +1887,30 @@
18821887
Max value of the [enum WindowFlags].
18831888
</constant>
18841889
<constant name="WINDOW_EVENT_MOUSE_ENTER" value="0" enum="WindowEvent">
1885-
Sent when the mouse pointer enters the window, see [method window_set_window_event_callback].
1890+
Sent when the mouse pointer enters the window.
18861891
</constant>
18871892
<constant name="WINDOW_EVENT_MOUSE_EXIT" value="1" enum="WindowEvent">
1888-
Sent when the mouse pointer exits the window, see [method window_set_window_event_callback].
1893+
Sent when the mouse pointer exits the window.
18891894
</constant>
18901895
<constant name="WINDOW_EVENT_FOCUS_IN" value="2" enum="WindowEvent">
1891-
Sent when the window grabs focus, see [method window_set_window_event_callback].
1896+
Sent when the window grabs focus.
18921897
</constant>
18931898
<constant name="WINDOW_EVENT_FOCUS_OUT" value="3" enum="WindowEvent">
1894-
Sent when the window loses focus, see [method window_set_window_event_callback].
1899+
Sent when the window loses focus.
18951900
</constant>
18961901
<constant name="WINDOW_EVENT_CLOSE_REQUEST" value="4" enum="WindowEvent">
1897-
Sent when the user has attempted to close the window (e.g. close button is pressed), see [method window_set_window_event_callback].
1902+
Sent when the user has attempted to close the window (e.g. close button is pressed).
18981903
</constant>
18991904
<constant name="WINDOW_EVENT_GO_BACK_REQUEST" value="5" enum="WindowEvent">
1900-
Sent when the device "Back" button is pressed, see [method window_set_window_event_callback].
1905+
Sent when the device "Back" button is pressed.
19011906
[b]Note:[/b] This event is implemented only on Android.
19021907
</constant>
19031908
<constant name="WINDOW_EVENT_DPI_CHANGE" value="6" enum="WindowEvent">
1904-
Sent when the window is moved to the display with different DPI, or display DPI is changed, see [method window_set_window_event_callback].
1909+
Sent when the window is moved to the display with different DPI, or display DPI is changed.
19051910
[b]Note:[/b] This flag is implemented only on macOS.
19061911
</constant>
19071912
<constant name="WINDOW_EVENT_TITLEBAR_CHANGE" value="7" enum="WindowEvent">
1908-
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].
1913+
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).
19091914
[b]Note:[/b] This flag is implemented only on macOS.
19101915
</constant>
19111916
<constant name="VSYNC_DISABLED" value="0" enum="VSyncMode">

0 commit comments

Comments
 (0)
Please sign in to comment.