summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-01-14 12:41:04 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-01-14 13:36:32 +0200
commit89f37d410557c9062b45f090f08d006453bc4fc9 (patch)
tree79310768abf1c16b950e0a05a74a1119256b728f /doc/classes
parent4e8bf74d564fc404c2ebf8b56611bcae54bcdd90 (diff)
Add support for getting native display, window, and view handles.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/DisplayServer.xml26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index a41875385c..ddcef437a5 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -579,6 +579,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" />
@@ -942,5 +951,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>