diff options
Diffstat (limited to 'doc/classes/OS.xml')
-rw-r--r-- | doc/classes/OS.xml | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index f6ad71b6e2..dd0fcd63e7 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="OS" inherits="Object" category="Core" version="3.1"> +<class name="OS" inherits="Object" category="Core" version="3.2"> <brief_description> Operating System functions. </brief_description> @@ -8,8 +8,6 @@ </description> <tutorials> </tutorials> - <demos> - </demos> <methods> <method name="alert"> <return type="void"> @@ -99,6 +97,8 @@ </argument> <argument index="3" name="output" type="Array" default="[ ]"> </argument> + <argument index="4" name="read_stderr" type="bool" default="false"> + </argument> <description> Execute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable. The arguments are used in the given order and separated by a space, so [code]OS.execute('ping', ['-w', '3', 'godotengine.org'], false)[/code] will resolve to [code]ping -w 3 godotengine.org[/code] in the system's shell. @@ -159,6 +159,13 @@ <description> </description> </method> + <method name="get_current_video_driver" qualifiers="const"> + <return type="int" enum="OS.VideoDriver"> + </return> + <description> + Returns the currently used video driver, using one of the values from [enum OS.VideoDriver]. + </description> + </method> <method name="get_date" qualifiers="const"> <return type="Dictionary"> </return> @@ -459,14 +466,16 @@ <return type="int"> </return> <description> + Returns the number of video drivers supported on the current platform. </description> </method> <method name="get_video_driver_name" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="driver" type="int"> + <argument index="0" name="driver" type="int" enum="OS.VideoDriver"> </argument> <description> + Returns the name of the video driver matching the given [code]driver[/code] index. This index is a value from [enum OS.VideoDriver], and you can use [method get_current_video_driver] to get the current backend's index. </description> </method> <method name="get_virtual_keyboard_height"> @@ -675,13 +684,23 @@ Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. </description> </method> + <method name="request_permission"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + At the moment this function is only used by [code]AudioDriverOpenSL[/code] to request permission for [code]RECORD_AUDIO[/code] on Android. + </description> + </method> <method name="set_icon"> <return type="void"> </return> <argument index="0" name="icon" type="Image"> </argument> <description> - Sets the game's icon. + 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. </description> </method> <method name="set_ime_active"> @@ -702,6 +721,17 @@ Sets position of IME suggestion list popup (in window coordinates). </description> </method> + <method name="set_native_icon"> + <return type="void"> + </return> + <argument index="0" name="filename" type="String"> + </argument> + <description> + 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. + Note: This method is only implemented on macOS and Windows. + </description> + </method> <method name="set_thread_name"> <return type="int" enum="Error"> </return> @@ -806,6 +836,12 @@ </member> </members> <constants> + <constant name="VIDEO_DRIVER_GLES2" value="1" enum="VideoDriver"> + The GLES2 rendering backend. It uses OpenGL ES 2.0 on mobile devices, OpenGL 2.1 on desktop platforms and WebGL 1.0 on the web. + </constant> + <constant name="VIDEO_DRIVER_GLES3" value="0" enum="VideoDriver"> + The GLES3 rendering backend. It uses OpenGL ES 3.0 on mobile devices, OpenGL 3.3 on desktop platforms and WebGL 2.0 on the web. + </constant> <constant name="DAY_SUNDAY" value="0" enum="Weekday"> Sunday. </constant> |