1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Further changes in GDNative API

- Added new_copy to all types, since trivial copy won't work for all
  types.
- Added functions to convert from String to char array types, which is
  not provided by the methods bound in Variant.
- Added operator index to String.
- Added missing cstring version of some Variant functions. They existed
  in the header but didn't have the implementation and were missing from
  the gdnative_api.json file.
- Added support for static calls on Variant types.
This commit is contained in:
George Marques
2021-02-25 19:50:56 -03:00
parent af0806722f
commit 8fddab9209
40 changed files with 880 additions and 11 deletions

View File

@@ -1142,6 +1142,36 @@
]
]
},
{
"name": "godot_variant_call_with_cstring",
"return_type": "void",
"arguments": [
[
"godot_variant *",
"p_self"
],
[
"const char *",
"p_method"
],
[
"const godot_variant **",
"p_args"
],
[
"const godot_int",
"p_argument_count"
],
[
"godot_variant *",
"r_return"
],
[
"godot_variant_call_error *",
"r_error"
]
]
},
{
"name": "godot_variant_evaluate",
"return_type": "void",
@@ -1200,7 +1230,29 @@
],
[
"const godot_string_name *",
"p_name"
"p_key"
],
[
"const godot_variant *",
"p_value"
],
[
"bool *",
"r_valid"
]
]
},
{
"name": "godot_variant_set_named_with_cstring",
"return_type": "void",
"arguments": [
[
"godot_variant *",
"p_self"
],
[
"const char *",
"p_key"
],
[
"const godot_variant *",
@@ -1296,6 +1348,24 @@
]
]
},
{
"name": "godot_variant_get_named_with_cstring",
"return_type": "godot_variant",
"arguments": [
[
"const godot_variant *",
"p_self"
],
[
"const char *",
"p_key"
],
[
"bool *",
"r_valid"
]
]
},
{
"name": "godot_variant_get_keyed",
"return_type": "godot_variant",
@@ -1814,6 +1884,34 @@
]
]
},
{
"name": "godot_variant_is_builtin_method_static",
"return_type": "bool",
"arguments": [
[
"godot_variant_type",
"p_type"
],
[
"const godot_string_name *",
"p_method"
]
]
},
{
"name": "godot_variant_is_builtin_method_static_with_cstring",
"return_type": "bool",
"arguments": [
[
"godot_variant_type",
"p_type"
],
[
"const char *",
"p_method"
]
]
},
{
"name": "godot_variant_is_builtin_method_vararg",
"return_type": "bool",
@@ -2751,6 +2849,20 @@
]
]
},
{
"name": "godot_aabb_new_copy",
"return_type": "void",
"arguments": [
[
"godot_aabb *",
"r_dest"
],
[
"const godot_aabb *",
"p_src"
]
]
},
{
"name": "godot_array_new",
"return_type": "void",
@@ -2761,6 +2873,20 @@
]
]
},
{
"name": "godot_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_array *",
"r_dest"
],
[
"const godot_array *",
"p_src"
]
]
},
{
"name": "godot_array_destroy",
"return_type": "void",
@@ -2809,6 +2935,20 @@
]
]
},
{
"name": "godot_basis_new_copy",
"return_type": "void",
"arguments": [
[
"godot_basis *",
"r_dest"
],
[
"const godot_basis *",
"p_src"
]
]
},
{
"name": "godot_basis_operator_index",
"return_type": "godot_vector3 *",
@@ -2847,6 +2987,20 @@
]
]
},
{
"name": "godot_callable_new_copy",
"return_type": "void",
"arguments": [
[
"godot_callable *",
"r_dest"
],
[
"const godot_callable *",
"p_src"
]
]
},
{
"name": "godot_callable_destroy",
"return_type": "void",
@@ -2867,6 +3021,20 @@
]
]
},
{
"name": "godot_color_new_copy",
"return_type": "void",
"arguments": [
[
"godot_color *",
"r_dest"
],
[
"const godot_color *",
"p_src"
]
]
},
{
"name": "godot_color_operator_index",
"return_type": "float *",
@@ -2905,6 +3073,20 @@
]
]
},
{
"name": "godot_dictionary_new_copy",
"return_type": "void",
"arguments": [
[
"godot_dictionary *",
"r_dest"
],
[
"const godot_dictionary *",
"p_src"
]
]
},
{
"name": "godot_dictionary_destroy",
"return_type": "void",
@@ -2953,6 +3135,20 @@
]
]
},
{
"name": "godot_node_path_new_copy",
"return_type": "void",
"arguments": [
[
"godot_node_path *",
"r_dest"
],
[
"const godot_node_path *",
"p_src"
]
]
},
{
"name": "godot_node_path_destroy",
"return_type": "void",
@@ -2973,6 +3169,20 @@
]
]
},
{
"name": "godot_packed_byte_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_byte_array *",
"r_dest"
],
[
"const godot_packed_byte_array *",
"p_src"
]
]
},
{
"name": "godot_packed_byte_array_destroy",
"return_type": "void",
@@ -3021,6 +3231,20 @@
]
]
},
{
"name": "godot_packed_int32_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_int32_array *",
"r_dest"
],
[
"const godot_packed_int32_array *",
"p_src"
]
]
},
{
"name": "godot_packed_int32_array_destroy",
"return_type": "void",
@@ -3069,6 +3293,20 @@
]
]
},
{
"name": "godot_packed_int64_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_int64_array *",
"r_dest"
],
[
"const godot_packed_int64_array *",
"p_src"
]
]
},
{
"name": "godot_packed_int64_array_destroy",
"return_type": "void",
@@ -3117,6 +3355,20 @@
]
]
},
{
"name": "godot_packed_float32_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_float32_array *",
"r_dest"
],
[
"const godot_packed_float32_array *",
"p_src"
]
]
},
{
"name": "godot_packed_float32_array_destroy",
"return_type": "void",
@@ -3165,6 +3417,20 @@
]
]
},
{
"name": "godot_packed_float64_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_float64_array *",
"r_dest"
],
[
"const godot_packed_float64_array *",
"p_src"
]
]
},
{
"name": "godot_packed_float64_array_destroy",
"return_type": "void",
@@ -3213,6 +3479,20 @@
]
]
},
{
"name": "godot_packed_string_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_string_array *",
"r_dest"
],
[
"const godot_packed_string_array *",
"p_src"
]
]
},
{
"name": "godot_packed_string_array_destroy",
"return_type": "void",
@@ -3261,6 +3541,20 @@
]
]
},
{
"name": "godot_packed_vector2_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_vector2_array *",
"r_dest"
],
[
"const godot_packed_vector2_array *",
"p_src"
]
]
},
{
"name": "godot_packed_vector2_array_destroy",
"return_type": "void",
@@ -3309,6 +3603,20 @@
]
]
},
{
"name": "godot_packed_vector2i_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_vector2i_array *",
"r_dest"
],
[
"const godot_packed_vector2i_array *",
"p_src"
]
]
},
{
"name": "godot_packed_vector2i_array_destroy",
"return_type": "void",
@@ -3357,6 +3665,20 @@
]
]
},
{
"name": "godot_packed_vector3_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_vector3_array *",
"r_dest"
],
[
"const godot_packed_vector3_array *",
"p_src"
]
]
},
{
"name": "godot_packed_vector3_array_destroy",
"return_type": "void",
@@ -3405,6 +3727,20 @@
]
]
},
{
"name": "godot_packed_vector3i_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_vector3i_array *",
"r_dest"
],
[
"const godot_packed_vector3i_array *",
"p_src"
]
]
},
{
"name": "godot_packed_vector3i_array_destroy",
"return_type": "void",
@@ -3453,6 +3789,20 @@
]
]
},
{
"name": "godot_packed_color_array_new_copy",
"return_type": "void",
"arguments": [
[
"godot_packed_color_array *",
"r_dest"
],
[
"const godot_packed_color_array *",
"p_src"
]
]
},
{
"name": "godot_packed_color_array_destroy",
"return_type": "void",
@@ -3501,6 +3851,20 @@
]
]
},
{
"name": "godot_plane_new_copy",
"return_type": "void",
"arguments": [
[
"godot_plane *",
"r_dest"
],
[
"const godot_plane *",
"p_src"
]
]
},
{
"name": "godot_quat_new",
"return_type": "void",
@@ -3511,6 +3875,20 @@
]
]
},
{
"name": "godot_quat_new_copy",
"return_type": "void",
"arguments": [
[
"godot_quat *",
"r_dest"
],
[
"const godot_quat *",
"p_src"
]
]
},
{
"name": "godot_quat_operator_index",
"return_type": "godot_real_t *",
@@ -3549,6 +3927,20 @@
]
]
},
{
"name": "godot_rect2_new_copy",
"return_type": "void",
"arguments": [
[
"godot_rect2 *",
"r_dest"
],
[
"const godot_rect2 *",
"p_src"
]
]
},
{
"name": "godot_rect2i_new",
"return_type": "void",
@@ -3559,6 +3951,20 @@
]
]
},
{
"name": "godot_rect2i_new_copy",
"return_type": "void",
"arguments": [
[
"godot_rect2i *",
"r_dest"
],
[
"const godot_rect2i *",
"p_src"
]
]
},
{
"name": "godot_rid_new",
"return_type": "void",
@@ -3569,6 +3975,20 @@
]
]
},
{
"name": "godot_rid_new_copy",
"return_type": "void",
"arguments": [
[
"godot_rid *",
"r_dest"
],
[
"const godot_rid *",
"p_src"
]
]
},
{
"name": "godot_signal_new",
"return_type": "void",
@@ -3579,6 +3999,20 @@
]
]
},
{
"name": "godot_signal_new_copy",
"return_type": "void",
"arguments": [
[
"godot_signal *",
"r_dest"
],
[
"const godot_signal *",
"p_src"
]
]
},
{
"name": "godot_signal_destroy",
"return_type": "void",
@@ -3783,6 +4217,84 @@
]
]
},
{
"name": "godot_string_to_latin1_chars",
"return_type": "const char *",
"arguments": [
[
"const godot_string *",
"p_self"
]
]
},
{
"name": "godot_string_to_utf8_chars",
"return_type": "const char *",
"arguments": [
[
"const godot_string *",
"p_self"
]
]
},
{
"name": "godot_string_to_utf16_chars",
"return_type": "const char16_t *",
"arguments": [
[
"const godot_string *",
"p_self"
]
]
},
{
"name": "godot_string_to_utf32_chars",
"return_type": "const char32_t *",
"arguments": [
[
"const godot_string *",
"p_self"
]
]
},
{
"name": "godot_string_to_wide_chars",
"return_type": "const wchar_t *",
"arguments": [
[
"const godot_string *",
"p_self"
]
]
},
{
"name": "godot_string_operator_index",
"return_type": "char32_t *",
"arguments": [
[
"godot_string *",
"p_self"
],
[
"godot_int",
"p_index"
]
]
},
{
"name": "godot_string_operator_index_const",
"return_type": "const char32_t *",
"arguments": [
[
"const godot_string *",
"p_self"
],
[
"godot_int",
"p_index"
]
]
},
{
"name": "godot_string_name_new",
"return_type": "void",
@@ -3841,6 +4353,20 @@
]
]
},
{
"name": "godot_transform_new_copy",
"return_type": "void",
"arguments": [
[
"godot_transform *",
"r_dest"
],
[
"const godot_transform *",
"p_src"
]
]
},
{
"name": "godot_transform2d_new",
"return_type": "void",
@@ -3851,6 +4377,20 @@
]
]
},
{
"name": "godot_transform2d_new_copy",
"return_type": "void",
"arguments": [
[
"godot_transform2d *",
"r_dest"
],
[
"const godot_transform2d *",
"p_src"
]
]
},
{
"name": "godot_transform2d_operator_index",
"return_type": "godot_vector2 *",
@@ -3889,6 +4429,20 @@
]
]
},
{
"name": "godot_vector2_new_copy",
"return_type": "void",
"arguments": [
[
"godot_vector2 *",
"r_dest"
],
[
"const godot_vector2 *",
"p_src"
]
]
},
{
"name": "godot_vector2_operator_index",
"return_type": "godot_real_t *",
@@ -3927,6 +4481,20 @@
]
]
},
{
"name": "godot_vector2i_new_copy",
"return_type": "void",
"arguments": [
[
"godot_vector2i *",
"r_dest"
],
[
"const godot_vector2i *",
"p_src"
]
]
},
{
"name": "godot_vector2i_operator_index",
"return_type": "int32_t *",
@@ -3965,6 +4533,20 @@
]
]
},
{
"name": "godot_vector3_new_copy",
"return_type": "void",
"arguments": [
[
"godot_vector3 *",
"r_dest"
],
[
"const godot_vector3 *",
"p_src"
]
]
},
{
"name": "godot_vector3_operator_index",
"return_type": "godot_real_t *",
@@ -4003,6 +4585,20 @@
]
]
},
{
"name": "godot_vector3i_new_copy",
"return_type": "void",
"arguments": [
[
"godot_vector3i *",
"r_dest"
],
[
"const godot_vector3i *",
"p_src"
]
]
},
{
"name": "godot_vector3i_operator_index",
"return_type": "int32_t *",