summaryrefslogtreecommitdiff
path: root/doc/classes/DisplayServer.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/DisplayServer.xml')
-rw-r--r--doc/classes/DisplayServer.xml45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 6e06bf454c..d28fd5d817 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -399,6 +399,20 @@
<description>
</description>
</method>
+ <method name="screen_get_refresh_rate" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="screen" type="int" default="-1" />
+ <description>
+ Returns the current refresh rate of the specified screen. If [code]screen[/code] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used.
+ [b]Note:[/b] Returns [code]-1.0[/code] if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, [method screen_get_refresh_rate] will always return [code]-1.0[/code] as there is no way to retrieve the refresh rate on that platform.
+ To fallback to a default refresh rate if the method fails, try:
+ [codeblock]
+ var refresh_rate = DisplayServer.screen_get_refresh_rate()
+ if refresh_rate &lt; 0:
+ refresh_rate = 60.0
+ [/codeblock]
+ </description>
+ </method>
<method name="screen_get_scale" qualifiers="const">
<return type="float" />
<argument index="0" name="screen" type="int" default="-1" />
@@ -569,6 +583,15 @@
Returns the mode of the given window.
</description>
</method>
+ <method name="window_get_native_handle" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="handle_type" type="int" enum="DisplayServer.HandleType" />
+ <argument 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, macOS and Windows.
+ </description>
+ </method>
<method name="window_get_position" qualifiers="const">
<return type="Vector2i" />
<argument index="0" name="window_id" type="int" default="0" />
@@ -891,6 +914,11 @@
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.
</constant>
+ <constant name="WINDOW_MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="WindowMode">
+ 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.
+ </constant>
<constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags">
</constant>
<constant name="WINDOW_FLAG_BORDERLESS" value="1" enum="WindowFlags">
@@ -930,5 +958,22 @@
Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible).
Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag.
</constant>
+ <constant name="DISPLAY_HANDLE" value="0" enum="HandleType">
+ Display handle:
+ - Linux: [code]X11::Display*[/code] for the display.
+ </constant>
+ <constant name="WINDOW_HANDLE" value="1" enum="HandleType">
+ Window handle:
+ - Windows: [code]HWND[/code] for the window.
+ - Linux: [code]X11::Window*[/code] for the window.
+ - MacOS: [code]NSWindow*[/code] for the window.
+ - iOS: [code]UIViewController*[/code] for the view controller.
+ - Android: [code]jObject[/code] for the activity.
+ </constant>
+ <constant name="WINDOW_VIEW" value="2" enum="HandleType">
+ Window view:
+ - MacOS: [code]NSView*[/code] for the window main view.
+ - iOS: [code]UIView*[/code] for the window main view.
+ </constant>
</constants>
</class>