summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-14 13:43:28 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-14 13:43:32 +0100
commit3dea5fd631c9513ed09b876f25e8bf6deff49683 (patch)
tree91d13164ad4ef219e47d84b3103ea34d84e23a68 /doc/classes
parenta9c85e79add171ddb57e46df24376102893299b7 (diff)
Remove incomplete battery status/power API
It was initially implemented in #5871 for Godot 3.0, but never really completed or thoroughly tested for most platforms. It then stayed in limbo and nobody seems really keen to finish it, so it's better to remove it in 4.0, and re-add eventually (possibly with a different API) if there's demand and an implementation confirmed working on all platforms. Closes #8770.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/OS.xml39
1 files changed, 0 insertions, 39 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index b3b77b0b26..d361ea83e6 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -280,30 +280,6 @@
Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"Haiku"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code].
</description>
</method>
- <method name="get_power_percent_left">
- <return type="int">
- </return>
- <description>
- 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.
- </description>
- </method>
- <method name="get_power_seconds_left">
- <return type="int">
- </return>
- <description>
- 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.
- </description>
- </method>
- <method name="get_power_state">
- <return type="int" enum="OS.PowerState">
- </return>
- <description>
- 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.
- </description>
- </method>
<method name="get_process_id" qualifiers="const">
<return type="int">
</return>
@@ -1081,20 +1057,5 @@
<constant name="SYSTEM_DIR_RINGTONES" value="7" enum="SystemDir">
Ringtones directory path.
</constant>
- <constant name="POWERSTATE_UNKNOWN" value="0" enum="PowerState">
- Unknown powerstate.
- </constant>
- <constant name="POWERSTATE_ON_BATTERY" value="1" enum="PowerState">
- Unplugged, running on battery.
- </constant>
- <constant name="POWERSTATE_NO_BATTERY" value="2" enum="PowerState">
- Plugged in, no battery available.
- </constant>
- <constant name="POWERSTATE_CHARGING" value="3" enum="PowerState">
- Plugged in, battery charging.
- </constant>
- <constant name="POWERSTATE_CHARGED" value="4" enum="PowerState">
- Plugged in, battery fully charged.
- </constant>
</constants>
</class>