diff options
author | reduz <reduzio@gmail.com> | 2021-08-23 14:53:27 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-08-23 19:58:40 -0300 |
commit | 44d62a9f4b6ac892b1fb9b8998be4162409952e3 (patch) | |
tree | cbc5ffa6979314def8adbc229cd94b4adf8afb1c /doc | |
parent | 679b9be9d30001e8ffc8087e412097f7394cacdd (diff) |
Implement NativeExtension pointer arguments
* Allows calling into native extensions directly with a pointer
* Makes it easier to implement some APIs more efficiently
* Appears with a "*" in the documentation for the argument.
* Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint.
* AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/@GlobalScope.xml | 4 | ||||
-rw-r--r-- | doc/classes/AudioStream.xml | 15 | ||||
-rw-r--r-- | doc/classes/AudioStreamPlayback.xml | 40 | ||||
-rwxr-xr-x | doc/tools/makerst.py | 2 |
4 files changed, 60 insertions, 1 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 46b9bdd52d..af39069b38 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2351,9 +2351,11 @@ </constant> <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="38" enum="PropertyHint"> </constant> + <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint"> + </constant> <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_MAX" value="40" enum="PropertyHint"> + <constant name="PROPERTY_HINT_MAX" value="41" enum="PropertyHint"> </constant> <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags"> </constant> diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index 8a58b178d8..a954a06117 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -13,6 +13,21 @@ <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link> </tutorials> <methods> + <method name="_get_length" qualifiers="virtual const"> + <return type="float" /> + <description> + </description> + </method> + <method name="_get_stream_name" qualifiers="virtual const"> + <return type="String" /> + <description> + </description> + </method> + <method name="_instance_playback" qualifiers="virtual const"> + <return type="AudioStreamPlayback" /> + <description> + </description> + </method> <method name="get_length" qualifiers="const"> <return type="float" /> <description> diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml index cb01aa75e8..09d063ed3b 100644 --- a/doc/classes/AudioStreamPlayback.xml +++ b/doc/classes/AudioStreamPlayback.xml @@ -10,6 +10,46 @@ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> </tutorials> <methods> + <method name="_get_loop_count" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_playback_position" qualifiers="virtual const"> + <return type="float" /> + <description> + </description> + </method> + <method name="_is_playing" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_mix" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="buffer" type="AudioFrame*" /> + <argument index="1" name="rate_scale" type="float" /> + <argument index="2" name="frames" type="int" /> + <description> + </description> + </method> + <method name="_seek" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="position" type="float" /> + <description> + </description> + </method> + <method name="_start" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="from_pos" type="float" /> + <description> + </description> + </method> + <method name="_stop" qualifiers="virtual"> + <return type="void" /> + <description> + </description> + </method> </methods> <constants> </constants> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 4691b61e1b..a23324fd24 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -1007,6 +1007,8 @@ def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterabl def make_type(klass, state): # type: (str, State) -> str + if klass.find("*") != -1: # Pointer, ignore + return klass link_type = klass if link_type.endswith("[]"): # Typed array, strip [] to link to contained type. link_type = link_type[:-2] |