Replace BIND_VMETHOD by new GDVIRTUAL syntax

* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.

Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.

Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
This commit is contained in:
reduz 2021-08-21 22:52:44 -03:00
parent 2a5c64f2a1
commit 3682978aee
104 changed files with 1389 additions and 1227 deletions

View file

@ -16,9 +16,9 @@
<link title="Inspector plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link>
</tutorials>
<methods>
<method name="_can_handle" qualifiers="virtual">
<method name="_can_handle" qualifiers="virtual const">
<return type="bool" />
<argument index="0" name="object" type="Object" />
<argument index="0" name="object" type="Variant" />
<description>
Returns [code]true[/code] if this object can be handled by this plugin.
</description>
@ -31,9 +31,9 @@
</method>
<method name="_parse_category" qualifiers="virtual">
<return type="void" />
<argument index="0" name="category" type="String" />
<argument index="0" name="object" type="Object" />
<argument index="1" name="category" type="String" />
<description>
Called to allow adding controls at the beginning of the category.
</description>
</method>
<method name="_parse_end" qualifiers="virtual">
@ -44,11 +44,13 @@
</method>
<method name="_parse_property" qualifiers="virtual">
<return type="bool" />
<argument index="0" name="type" type="int" />
<argument index="1" name="path" type="String" />
<argument index="2" name="hint" type="int" />
<argument index="3" name="hint_text" type="String" />
<argument index="4" name="usage" type="int" />
<argument index="0" name="object" type="Object" />
<argument index="1" name="type" type="int" />
<argument index="2" name="name" type="String" />
<argument index="3" name="hint_type" type="int" />
<argument index="4" name="hint_string" type="String" />
<argument index="5" name="usage_flags" type="int" />
<argument index="6" name="wide" type="bool" />
<description>
Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
</description>