From 0aebba2388f741e04dafbd40003673ea4bc38381 Mon Sep 17 00:00:00 2001
From: bruvzg <7645683+bruvzg@users.noreply.github.com>
Date: Tue, 3 Dec 2019 17:19:55 +0200
Subject: [ci skip] OS class documentations, adds platform compatibility notes.
---
doc/classes/OS.xml | 44 ++++++++++++++++++++++++++++++++++++++++----
1 file changed, 40 insertions(+), 4 deletions(-)
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 6da0547352..331723df7c 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -45,6 +45,8 @@
+ Shuts down system MIDI driver.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -119,6 +121,7 @@
[codeblock]
OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output)
[/codeblock]
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
@@ -159,6 +162,7 @@
Returns an array of MIDI device names.
The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs].
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -224,6 +228,7 @@
With this function you can get the list of dangerous permissions that have been granted to the Android application.
+ [b]Note:[/b] This method is implemented on Android.
@@ -232,6 +237,7 @@
Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string.
[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position.
+ [b]Note:[/b] This method is implemented on macOS.
@@ -240,6 +246,7 @@
Returns the IME intermediate composition string.
[constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string.
+ [b]Note:[/b] This method is implemented on macOS.
@@ -248,6 +255,7 @@
Returns the current latin keyboard variant as a String.
Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code].
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Returns [code]"QWERTY"[/code] on unsupported platforms.
@@ -262,6 +270,7 @@
Returns the model name of the current device.
+ [b]Note:[/b] This method is implemented on Android and iOS. Returns [code]"GenericDevice"[/code] on unsupported platforms.
@@ -275,14 +284,16 @@
- Returns the amount of battery left in the device as a percentage.
+ Returns the amount of battery left in the device as a percentage. Returns [code]-1[/code] if power state is unknown.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
- Returns an estimate of the time left in seconds before the device runs out of battery.
+ Returns an estimate of the time left in seconds before the device runs out of battery. Returns [code]-1[/code] if power state is unknown.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -290,6 +301,7 @@
Returns the current state of the device regarding battery and power. See [enum PowerState] constants.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -297,6 +309,7 @@
Returns the project's process ID.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
@@ -345,6 +358,7 @@
xxhdpi - 480 dpi
xxxhdpi - 640 dpi
[/codeblock]
+ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms.
@@ -393,6 +407,7 @@
Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir].
+ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
@@ -519,6 +534,7 @@
Add a new item with text "label" to global menu. Use "_dock" menu to add item to the macOS dock icon menu.
+ [b]Note:[/b] This method is implemented on macOS.
@@ -528,6 +544,7 @@
Add a separator between items. Separators also occupy an index.
+ [b]Note:[/b] This method is implemented on macOS.
@@ -537,6 +554,7 @@
Clear the global menu, in effect removing all items.
+ [b]Note:[/b] This method is implemented on macOS.
@@ -548,6 +566,7 @@
Removes the item at index "idx" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one.
+ [b]Note:[/b] This method is implemented on macOS.
@@ -644,6 +663,7 @@
Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode.
[b]Note:[/b] This method can also be used to kill processes that were not spawned by the game.
+ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
@@ -651,6 +671,7 @@
Moves the window to the front.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -658,6 +679,7 @@
Returns [code]true[/code] if native video is playing.
+ [b]Note:[/b] This method is implemented on Android and iOS.
@@ -665,6 +687,7 @@
Pauses native video playback.
+ [b]Note:[/b] This method is implemented on Android and iOS.
@@ -680,7 +703,7 @@
Plays native video from the specified path, at the given volume and with audio and subtitle tracks.
- [b]Note:[/b] This method is only implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options.
+ [b]Note:[/b] This method is implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options.
@@ -688,6 +711,7 @@
Stops native video playback.
+ [b]Note:[/b] This method is implemented on Android and iOS.
@@ -695,6 +719,7 @@
Resumes native video playback.
+ [b]Note:[/b] This method is implemented on Android and iOS.
@@ -702,6 +727,7 @@
Initialises the singleton for the system MIDI driver.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -743,6 +769,7 @@
Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -759,6 +786,7 @@
With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application.
+ [b]Note:[/b] This method is implemented on Android.
@@ -769,6 +797,7 @@
Sets the game's icon using an [Image] resource.
The same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed.
+ [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows.
@@ -781,6 +810,7 @@
If active IME handles key events before the application and creates an composition string and suggestion list.
Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions.
Completed composition string is committed when input is finished.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -790,6 +820,7 @@
Sets position of IME suggestion list popup (in window coordinates).
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -800,7 +831,7 @@
Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS).
Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog.
- [b]Note:[/b] This method is only implemented on macOS and Windows.
+ [b]Note:[/b] This method is implemented on macOS and Windows.
@@ -828,6 +859,7 @@
Sets whether the window should always be on top.
+ [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
@@ -838,6 +870,7 @@
Sets the window title to the specified string.
[b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers.
+ [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows.
@@ -850,6 +883,7 @@
- [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder.
- [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website.
- [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added.
+ [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows.
@@ -859,6 +893,7 @@
Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).
+ [b]Note:[/b] This method is implemented on Android, iOS and UWP.
@@ -910,6 +945,7 @@
If [code]true[/code], the window background is transparent and window frame is removed.
Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering.
[b]Note:[/b] This property has no effect if [b]Project > Project Settings > Display > Window > Per-pixel transparency > Allowed[/b] setting is disabled.
+ [b]Note:[/b] This property is implemented on Linux, macOS and Windows.
The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right.
--
cgit v1.2.3