[DOCS] OS

This commit is contained in:
Max Hilbrunner 2018-04-10 17:05:28 +02:00 committed by mhilbrunner
parent 48890b15c5
commit 66714a3d29

View file

@ -40,6 +40,7 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Centers the window on the screen if in windowed mode.
</description> </description>
</method> </method>
<method name="delay_msec" qualifiers="const"> <method name="delay_msec" qualifiers="const">
@ -48,7 +49,7 @@
<argument index="0" name="msec" type="int"> <argument index="0" name="msec" type="int">
</argument> </argument>
<description> <description>
Delay executing of the current thread by given milliseconds. Delay execution of the current thread by given milliseconds.
</description> </description>
</method> </method>
<method name="delay_usec" qualifiers="const"> <method name="delay_usec" qualifiers="const">
@ -57,7 +58,7 @@
<argument index="0" name="usec" type="int"> <argument index="0" name="usec" type="int">
</argument> </argument>
<description> <description>
Delay executing of the current thread by given microseconds. Delay execution of the current thread by given microseconds.
</description> </description>
</method> </method>
<method name="dump_memory_to_file"> <method name="dump_memory_to_file">
@ -67,7 +68,7 @@
</argument> </argument>
<description> <description>
Dumps the memory allocation ringlist to a file (only works in debug). Dumps the memory allocation ringlist to a file (only works in debug).
Entry format per line: "Address - Size - Description" Entry format per line: "Address - Size - Description".
</description> </description>
</method> </method>
<method name="dump_resources_to_file"> <method name="dump_resources_to_file">
@ -77,7 +78,7 @@
</argument> </argument>
<description> <description>
Dumps all used resources to file (only works in debug). Dumps all used resources to file (only works in debug).
Entry format per line: "Resource Type : Resource Location" Entry format per line: "Resource Type : Resource Location".
At the end of the file is a statistic of all used Resource Types. At the end of the file is a statistic of all used Resource Types.
</description> </description>
</method> </method>
@ -120,6 +121,7 @@
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the total number of available audio drivers.
</description> </description>
</method> </method>
<method name="get_audio_driver_name" qualifiers="const"> <method name="get_audio_driver_name" qualifiers="const">
@ -128,6 +130,7 @@
<argument index="0" name="arg0" type="int"> <argument index="0" name="arg0" type="int">
</argument> </argument>
<description> <description>
Returns the audio driver name for the given index.
</description> </description>
</method> </method>
<method name="get_cmdline_args"> <method name="get_cmdline_args">
@ -256,6 +259,7 @@
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Returns the window size including decorations like window borders.
</description> </description>
</method> </method>
<method name="get_scancode_string" qualifiers="const"> <method name="get_scancode_string" qualifiers="const">
@ -380,7 +384,7 @@
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the current unix timestamp. Returns the current unix epoch timestamp.
</description> </description>
</method> </method>
<method name="get_unix_time_from_datetime" qualifiers="const"> <method name="get_unix_time_from_datetime" qualifiers="const">
@ -423,6 +427,7 @@
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or it is currently hidden.
</description> </description>
</method> </method>
<method name="has_environment" qualifiers="const"> <method name="has_environment" qualifiers="const">
@ -440,6 +445,7 @@
<argument index="0" name="tag_name" type="String"> <argument index="0" name="tag_name" type="String">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. See feature tags documentation.
</description> </description>
</method> </method>
<method name="has_touchscreen_ui_hint" qualifiers="const"> <method name="has_touchscreen_ui_hint" qualifiers="const">
@ -506,6 +512,7 @@
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns [code]true[/code] if the window should always be on top of other windows.
</description> </description>
</method> </method>
<method name="kill"> <method name="kill">
@ -642,6 +649,7 @@
<argument index="0" name="enabled" type="bool"> <argument index="0" name="enabled" type="bool">
</argument> </argument>
<description> <description>
Sets whether the window should always be on top.
</description> </description>
</method> </method>
<method name="set_window_title"> <method name="set_window_title">
@ -682,27 +690,31 @@
The current screen index (starting from 0). The current screen index (starting from 0).
</member> </member>
<member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code"> <member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code">
The exit code passed to the OS when the main loop exits.
</member> </member>
<member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on"> <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.
</member> </member>
<member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode"> <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.
</member> </member>
<member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation"> <member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="OS.ScreenOrientation">
The current screen orientation. The current screen orientation.
</member> </member>
<member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled"> <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled">
If [code]true[/code] vertical synchronization (Vsync) is enabled.
</member> </member>
<member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window"> <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>
<member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen"> <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>
<member name="window_maximized" type="bool" setter="set_window_maximized" getter="is_window_maximized"> <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>
<member name="window_minimized" type="bool" setter="set_window_minimized" getter="is_window_minimized"> <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>
<member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position"> <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position">
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. 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.
@ -716,82 +728,121 @@
</members> </members>
<constants> <constants>
<constant name="DAY_SUNDAY" value="0" enum="Weekday"> <constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.
</constant> </constant>
<constant name="DAY_MONDAY" value="1" enum="Weekday"> <constant name="DAY_MONDAY" value="1" enum="Weekday">
Monday.
</constant> </constant>
<constant name="DAY_TUESDAY" value="2" enum="Weekday"> <constant name="DAY_TUESDAY" value="2" enum="Weekday">
Tuesday.
</constant> </constant>
<constant name="DAY_WEDNESDAY" value="3" enum="Weekday"> <constant name="DAY_WEDNESDAY" value="3" enum="Weekday">
Wednesday.
</constant> </constant>
<constant name="DAY_THURSDAY" value="4" enum="Weekday"> <constant name="DAY_THURSDAY" value="4" enum="Weekday">
Thursday.
</constant> </constant>
<constant name="DAY_FRIDAY" value="5" enum="Weekday"> <constant name="DAY_FRIDAY" value="5" enum="Weekday">
Friday.
</constant> </constant>
<constant name="DAY_SATURDAY" value="6" enum="Weekday"> <constant name="DAY_SATURDAY" value="6" enum="Weekday">
Saturday.
</constant> </constant>
<constant name="MONTH_JANUARY" value="1" enum="Month"> <constant name="MONTH_JANUARY" value="1" enum="Month">
January.
</constant> </constant>
<constant name="MONTH_FEBRUARY" value="2" enum="Month"> <constant name="MONTH_FEBRUARY" value="2" enum="Month">
February.
</constant> </constant>
<constant name="MONTH_MARCH" value="3" enum="Month"> <constant name="MONTH_MARCH" value="3" enum="Month">
March.
</constant> </constant>
<constant name="MONTH_APRIL" value="4" enum="Month"> <constant name="MONTH_APRIL" value="4" enum="Month">
April.
</constant> </constant>
<constant name="MONTH_MAY" value="5" enum="Month"> <constant name="MONTH_MAY" value="5" enum="Month">
May.
</constant> </constant>
<constant name="MONTH_JUNE" value="6" enum="Month"> <constant name="MONTH_JUNE" value="6" enum="Month">
June.
</constant> </constant>
<constant name="MONTH_JULY" value="7" enum="Month"> <constant name="MONTH_JULY" value="7" enum="Month">
July.
</constant> </constant>
<constant name="MONTH_AUGUST" value="8" enum="Month"> <constant name="MONTH_AUGUST" value="8" enum="Month">
August.
</constant> </constant>
<constant name="MONTH_SEPTEMBER" value="9" enum="Month"> <constant name="MONTH_SEPTEMBER" value="9" enum="Month">
September.
</constant> </constant>
<constant name="MONTH_OCTOBER" value="10" enum="Month"> <constant name="MONTH_OCTOBER" value="10" enum="Month">
October.
</constant> </constant>
<constant name="MONTH_NOVEMBER" value="11" enum="Month"> <constant name="MONTH_NOVEMBER" value="11" enum="Month">
November.
</constant> </constant>
<constant name="MONTH_DECEMBER" value="12" enum="Month"> <constant name="MONTH_DECEMBER" value="12" enum="Month">
December.
</constant> </constant>
<constant name="SCREEN_ORIENTATION_LANDSCAPE" value="0" enum="ScreenOrientation"> <constant name="SCREEN_ORIENTATION_LANDSCAPE" value="0" enum="ScreenOrientation">
Landscape screen orientation.
</constant> </constant>
<constant name="SCREEN_ORIENTATION_PORTRAIT" value="1" enum="ScreenOrientation"> <constant name="SCREEN_ORIENTATION_PORTRAIT" value="1" enum="ScreenOrientation">
Portrait screen orientation.
</constant> </constant>
<constant name="SCREEN_ORIENTATION_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation"> <constant name="SCREEN_ORIENTATION_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation">
Reverse landscape screen orientation.
</constant> </constant>
<constant name="SCREEN_ORIENTATION_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation"> <constant name="SCREEN_ORIENTATION_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation">
Reverse portrait screen orientation.
</constant> </constant>
<constant name="SCREEN_ORIENTATION_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation"> <constant name="SCREEN_ORIENTATION_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation">
Uses landscape or reverse landscape based on the hardware sensor.
</constant> </constant>
<constant name="SCREEN_ORIENTATION_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation"> <constant name="SCREEN_ORIENTATION_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation">
Uses portrait or reverse portrait based on the hardware sensor.
</constant> </constant>
<constant name="SCREEN_ORIENTATION_SENSOR" value="6" enum="ScreenOrientation"> <constant name="SCREEN_ORIENTATION_SENSOR" value="6" enum="ScreenOrientation">
Uses most suitable orientation based on the hardware sensor.
</constant> </constant>
<constant name="SYSTEM_DIR_DESKTOP" value="0" enum="SystemDir"> <constant name="SYSTEM_DIR_DESKTOP" value="0" enum="SystemDir">
Desktop directory path.
</constant> </constant>
<constant name="SYSTEM_DIR_DCIM" value="1" enum="SystemDir"> <constant name="SYSTEM_DIR_DCIM" value="1" enum="SystemDir">
DCIM (Digital Camera Images) directory path.
</constant> </constant>
<constant name="SYSTEM_DIR_DOCUMENTS" value="2" enum="SystemDir"> <constant name="SYSTEM_DIR_DOCUMENTS" value="2" enum="SystemDir">
Documents directory path.
</constant> </constant>
<constant name="SYSTEM_DIR_DOWNLOADS" value="3" enum="SystemDir"> <constant name="SYSTEM_DIR_DOWNLOADS" value="3" enum="SystemDir">
Downloads directory path.
</constant> </constant>
<constant name="SYSTEM_DIR_MOVIES" value="4" enum="SystemDir"> <constant name="SYSTEM_DIR_MOVIES" value="4" enum="SystemDir">
Movies directory path.
</constant> </constant>
<constant name="SYSTEM_DIR_MUSIC" value="5" enum="SystemDir"> <constant name="SYSTEM_DIR_MUSIC" value="5" enum="SystemDir">
Music directory path.
</constant> </constant>
<constant name="SYSTEM_DIR_PICTURES" value="6" enum="SystemDir"> <constant name="SYSTEM_DIR_PICTURES" value="6" enum="SystemDir">
Pictures directory path.
</constant> </constant>
<constant name="SYSTEM_DIR_RINGTONES" value="7" enum="SystemDir"> <constant name="SYSTEM_DIR_RINGTONES" value="7" enum="SystemDir">
Ringtones directory path.
</constant> </constant>
<constant name="POWERSTATE_UNKNOWN" value="0" enum="PowerState"> <constant name="POWERSTATE_UNKNOWN" value="0" enum="PowerState">
Unknown powerstate.
</constant> </constant>
<constant name="POWERSTATE_ON_BATTERY" value="1" enum="PowerState"> <constant name="POWERSTATE_ON_BATTERY" value="1" enum="PowerState">
Unplugged, running on battery.
</constant> </constant>
<constant name="POWERSTATE_NO_BATTERY" value="2" enum="PowerState"> <constant name="POWERSTATE_NO_BATTERY" value="2" enum="PowerState">
Plugged in, no battery available.
</constant> </constant>
<constant name="POWERSTATE_CHARGING" value="3" enum="PowerState"> <constant name="POWERSTATE_CHARGING" value="3" enum="PowerState">
Plugged in, battery charging.
</constant> </constant>
<constant name="POWERSTATE_CHARGED" value="4" enum="PowerState"> <constant name="POWERSTATE_CHARGED" value="4" enum="PowerState">
Plugged in, battery fully charged.
</constant> </constant>
</constants> </constants>
</class> </class>