summaryrefslogtreecommitdiff
path: root/doc/classes/OS.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/OS.xml')
-rw-r--r--doc/classes/OS.xml55
1 files changed, 42 insertions, 13 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index ac865de3cd..c9c83bc0e0 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">
@@ -159,6 +157,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>
@@ -371,7 +376,14 @@
<argument index="0" name="dir" type="int" enum="OS.SystemDir">
</argument>
<description>
- Returns the actual path to commonly used folders across different platforms. Available locations are specified in [OS.SystemDir].
+ Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum OS.SystemDir].
+ </description>
+ </method>
+ <method name="get_system_time_msecs" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ Returns the epoch time of the operating system in milliseconds.
</description>
</method>
<method name="get_system_time_secs" qualifiers="const">
@@ -452,14 +464,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">
@@ -668,6 +682,15 @@
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>
@@ -739,7 +762,7 @@
<description>
Requests the OS to open a resource with the most appropriate program. For example.
[code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the downloads folders of the user.
- [code]OS.shell_open("http://godotengine.org")[/code] opens the default web browser on the official Godot website.
+ [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website.
</description>
</method>
<method name="show_virtual_keyboard">
@@ -763,28 +786,28 @@
The exit code passed to the OS when the main loop exits.
</member>
<member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on">
- If [code]true[/code] the engine tries to keep the screen on while the game is running. Useful on mobile.
+ If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile.
</member>
<member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode">
- If [code]true[/code] the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile.
+ If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile.
</member>
<member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation">
The current screen orientation.
</member>
<member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled">
- If [code]true[/code] vertical synchronization (Vsync) is enabled.
+ If [code]true[/code], vertical synchronization (Vsync) is enabled.
</member>
<member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window">
- If [code]true[/code] removes the window frame.
+ If [code]true[/code], removes the window frame.
</member>
<member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen">
- If [code]true[/code] the window is fullscreen.
+ If [code]true[/code], the window is fullscreen.
</member>
<member name="window_maximized" type="bool" setter="set_window_maximized" getter="is_window_maximized">
- If [code]true[/code] the window is maximized.
+ If [code]true[/code], the window is maximized.
</member>
<member name="window_minimized" type="bool" setter="set_window_minimized" getter="is_window_minimized">
- If [code]true[/code] the window is minimized.
+ If [code]true[/code], the window is minimized.
</member>
<member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled">
</member>
@@ -799,6 +822,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>