Merge pull request #46431 from vnen/gdnative-bindings

Further changes in GDNative API
This commit is contained in:
Rémi Verschelde 2021-03-17 13:00:03 +01:00 committed by GitHub
commit 3ef0e5a9bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 883 additions and 11 deletions

View file

@ -42,6 +42,10 @@ void GDAPI godot_aabb_new(godot_aabb *p_self) {
memnew_placement(p_self, AABB); memnew_placement(p_self, AABB);
} }
void GDAPI godot_aabb_new_copy(godot_aabb *r_dest, const godot_aabb *p_src) {
memnew_placement(r_dest, AABB(*(AABB *)p_src));
}
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -43,6 +43,10 @@ void GDAPI godot_array_new(godot_array *p_self) {
memnew_placement(p_self, Array); memnew_placement(p_self, Array);
} }
void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src) {
memnew_placement(r_dest, Array(*(Array *)p_src));
}
void GDAPI godot_array_destroy(godot_array *p_self) { void GDAPI godot_array_destroy(godot_array *p_self) {
((Array *)p_self)->~Array(); ((Array *)p_self)->~Array();
} }

View file

@ -42,6 +42,10 @@ void GDAPI godot_basis_new(godot_basis *p_self) {
memnew_placement(p_self, Basis); memnew_placement(p_self, Basis);
} }
void GDAPI godot_basis_new_copy(godot_basis *r_dest, const godot_basis *p_src) {
memnew_placement(r_dest, Basis(*(Basis *)p_src));
}
godot_vector3 GDAPI *godot_basis_operator_index(godot_basis *p_self, godot_int p_index) { godot_vector3 GDAPI *godot_basis_operator_index(godot_basis *p_self, godot_int p_index) {
Basis *self = (Basis *)p_self; Basis *self = (Basis *)p_self;
return (godot_vector3 *)&self->operator[](p_index); return (godot_vector3 *)&self->operator[](p_index);

View file

@ -43,6 +43,10 @@ void GDAPI godot_callable_new(godot_callable *p_self) {
memnew_placement(p_self, Callable); memnew_placement(p_self, Callable);
} }
void GDAPI godot_callable_new_copy(godot_callable *r_dest, const godot_callable *p_src) {
memnew_placement(r_dest, Callable(*(Callable *)p_src));
}
void GDAPI godot_callable_destroy(godot_callable *p_self) { void GDAPI godot_callable_destroy(godot_callable *p_self) {
Callable *self = (Callable *)p_self; Callable *self = (Callable *)p_self;
self->~Callable(); self->~Callable();

View file

@ -42,6 +42,10 @@ void GDAPI godot_color_new(godot_color *p_self) {
memnew_placement(p_self, Color); memnew_placement(p_self, Color);
} }
void GDAPI godot_color_new_copy(godot_color *r_dest, const godot_color *p_src) {
memnew_placement(r_dest, Color(*(Color *)p_src));
}
float GDAPI *godot_color_operator_index(godot_color *p_self, godot_int p_index) { float GDAPI *godot_color_operator_index(godot_color *p_self, godot_int p_index) {
Color *self = (Color *)p_self; Color *self = (Color *)p_self;
return (float *)&self->operator[](p_index); return (float *)&self->operator[](p_index);

View file

@ -43,6 +43,10 @@ void GDAPI godot_dictionary_new(godot_dictionary *p_self) {
memnew_placement(p_self, Dictionary); memnew_placement(p_self, Dictionary);
} }
void GDAPI godot_dictionary_new_copy(godot_dictionary *r_dest, const godot_dictionary *p_src) {
memnew_placement(r_dest, Dictionary(*(Dictionary *)p_src));
}
void GDAPI godot_dictionary_destroy(godot_dictionary *p_self) { void GDAPI godot_dictionary_destroy(godot_dictionary *p_self) {
Dictionary *self = (Dictionary *)p_self; Dictionary *self = (Dictionary *)p_self;
self->~Dictionary(); self->~Dictionary();

View file

@ -42,6 +42,10 @@ void GDAPI godot_node_path_new(godot_node_path *p_self) {
memnew_placement(p_self, NodePath); memnew_placement(p_self, NodePath);
} }
void GDAPI godot_node_path_new_copy(godot_node_path *r_dest, const godot_node_path *p_src) {
memnew_placement(r_dest, NodePath(*(NodePath *)p_src));
}
void GDAPI godot_node_path_destroy(godot_node_path *p_self) { void GDAPI godot_node_path_destroy(godot_node_path *p_self) {
NodePath *self = (NodePath *)p_self; NodePath *self = (NodePath *)p_self;
self->~NodePath(); self->~NodePath();

View file

@ -59,6 +59,10 @@ void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *p_self) {
memnew_placement(p_self, PackedByteArray); memnew_placement(p_self, PackedByteArray);
} }
void GDAPI godot_packed_byte_array_new_copy(godot_packed_byte_array *r_dest, const godot_packed_byte_array *p_src) {
memnew_placement(r_dest, PackedByteArray(*(PackedByteArray *)p_src));
}
void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self) { void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self) {
((PackedByteArray *)p_self)->~PackedByteArray(); ((PackedByteArray *)p_self)->~PackedByteArray();
} }
@ -79,6 +83,10 @@ void GDAPI godot_packed_int32_array_new(godot_packed_int32_array *p_self) {
memnew_placement(p_self, PackedInt32Array); memnew_placement(p_self, PackedInt32Array);
} }
void GDAPI godot_packed_int32_array_new_copy(godot_packed_int32_array *r_dest, const godot_packed_int32_array *p_src) {
memnew_placement(r_dest, PackedInt32Array(*(PackedInt32Array *)p_src));
}
void GDAPI godot_packed_int32_array_destroy(godot_packed_int32_array *p_self) { void GDAPI godot_packed_int32_array_destroy(godot_packed_int32_array *p_self) {
((PackedInt32Array *)p_self)->~PackedInt32Array(); ((PackedInt32Array *)p_self)->~PackedInt32Array();
} }
@ -99,6 +107,10 @@ void GDAPI godot_packed_int64_array_new(godot_packed_int64_array *p_self) {
memnew_placement(p_self, PackedInt64Array); memnew_placement(p_self, PackedInt64Array);
} }
void GDAPI godot_packed_int64_array_new_copy(godot_packed_int64_array *r_dest, const godot_packed_int64_array *p_src) {
memnew_placement(r_dest, PackedInt64Array(*(PackedInt64Array *)p_src));
}
void GDAPI godot_packed_int64_array_destroy(godot_packed_int64_array *p_self) { void GDAPI godot_packed_int64_array_destroy(godot_packed_int64_array *p_self) {
((PackedInt64Array *)p_self)->~PackedInt64Array(); ((PackedInt64Array *)p_self)->~PackedInt64Array();
} }
@ -119,6 +131,10 @@ void GDAPI godot_packed_float32_array_new(godot_packed_float32_array *p_self) {
memnew_placement(p_self, PackedFloat32Array); memnew_placement(p_self, PackedFloat32Array);
} }
void GDAPI godot_packed_float32_array_new_copy(godot_packed_float32_array *r_dest, const godot_packed_float32_array *p_src) {
memnew_placement(r_dest, PackedFloat32Array(*(PackedFloat32Array *)p_src));
}
void GDAPI godot_packed_float32_array_destroy(godot_packed_float32_array *p_self) { void GDAPI godot_packed_float32_array_destroy(godot_packed_float32_array *p_self) {
((PackedFloat32Array *)p_self)->~PackedFloat32Array(); ((PackedFloat32Array *)p_self)->~PackedFloat32Array();
} }
@ -139,6 +155,10 @@ void GDAPI godot_packed_float64_array_new(godot_packed_float64_array *p_self) {
memnew_placement(p_self, PackedFloat64Array); memnew_placement(p_self, PackedFloat64Array);
} }
void GDAPI godot_packed_float64_array_new_copy(godot_packed_float64_array *r_dest, const godot_packed_float64_array *p_src) {
memnew_placement(r_dest, PackedFloat64Array(*(PackedFloat64Array *)p_src));
}
void GDAPI godot_packed_float64_array_destroy(godot_packed_float64_array *p_self) { void GDAPI godot_packed_float64_array_destroy(godot_packed_float64_array *p_self) {
((PackedFloat64Array *)p_self)->~PackedFloat64Array(); ((PackedFloat64Array *)p_self)->~PackedFloat64Array();
} }
@ -159,6 +179,10 @@ void GDAPI godot_packed_string_array_new(godot_packed_string_array *p_self) {
memnew_placement(p_self, PackedStringArray); memnew_placement(p_self, PackedStringArray);
} }
void GDAPI godot_packed_string_array_new_copy(godot_packed_string_array *r_dest, const godot_packed_string_array *p_src) {
memnew_placement(r_dest, PackedStringArray(*(PackedStringArray *)p_src));
}
void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self) { void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self) {
((PackedStringArray *)p_self)->~PackedStringArray(); ((PackedStringArray *)p_self)->~PackedStringArray();
} }
@ -179,6 +203,10 @@ void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *p_self) {
memnew_placement(p_self, PackedVector2Array); memnew_placement(p_self, PackedVector2Array);
} }
void GDAPI godot_packed_vector2_array_new_copy(godot_packed_vector2_array *r_dest, const godot_packed_vector2_array *p_src) {
memnew_placement(r_dest, PackedVector2Array(*(PackedVector2Array *)p_src));
}
void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self) { void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self) {
((PackedVector2Array *)p_self)->~PackedVector2Array(); ((PackedVector2Array *)p_self)->~PackedVector2Array();
} }
@ -199,6 +227,10 @@ void GDAPI godot_packed_vector2i_array_new(godot_packed_vector2i_array *p_self)
memnew_placement(p_self, Vector<Vector2i>); memnew_placement(p_self, Vector<Vector2i>);
} }
void GDAPI godot_packed_vector2i_array_new_copy(godot_packed_vector2i_array *r_dest, const godot_packed_vector2i_array *p_src) {
memnew_placement(r_dest, Vector<Vector2i>(*(Vector<Vector2i> *)p_src));
}
void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self) { void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self) {
((Vector<Vector2i> *)p_self)->~Vector(); ((Vector<Vector2i> *)p_self)->~Vector();
} }
@ -219,6 +251,10 @@ void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *p_self) {
memnew_placement(p_self, PackedVector3Array); memnew_placement(p_self, PackedVector3Array);
} }
void GDAPI godot_packed_vector3_array_new_copy(godot_packed_vector3_array *r_dest, const godot_packed_vector3_array *p_src) {
memnew_placement(r_dest, PackedVector3Array(*(PackedVector3Array *)p_src));
}
void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self) { void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self) {
((PackedVector3Array *)p_self)->~PackedVector3Array(); ((PackedVector3Array *)p_self)->~PackedVector3Array();
} }
@ -239,6 +275,10 @@ void GDAPI godot_packed_vector3i_array_new(godot_packed_vector3i_array *p_self)
memnew_placement(p_self, Vector<Vector3i>); memnew_placement(p_self, Vector<Vector3i>);
} }
void GDAPI godot_packed_vector3i_array_new_copy(godot_packed_vector3i_array *r_dest, const godot_packed_vector3i_array *p_src) {
memnew_placement(r_dest, Vector<Vector3i>(*(Vector<Vector3i> *)p_src));
}
void GDAPI godot_packed_vector3i_array_destroy(godot_packed_vector3i_array *p_self) { void GDAPI godot_packed_vector3i_array_destroy(godot_packed_vector3i_array *p_self) {
((Vector<Vector3i> *)p_self)->~Vector(); ((Vector<Vector3i> *)p_self)->~Vector();
} }
@ -259,6 +299,10 @@ void GDAPI godot_packed_color_array_new(godot_packed_color_array *p_self) {
memnew_placement(p_self, PackedColorArray); memnew_placement(p_self, PackedColorArray);
} }
void GDAPI godot_packed_color_array_new_copy(godot_packed_color_array *r_dest, const godot_packed_color_array *p_src) {
memnew_placement(r_dest, PackedColorArray(*(PackedColorArray *)p_src));
}
void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self) { void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self) {
((PackedColorArray *)p_self)->~PackedColorArray(); ((PackedColorArray *)p_self)->~PackedColorArray();
} }

View file

@ -42,6 +42,10 @@ void GDAPI godot_plane_new(godot_plane *p_self) {
memnew_placement(p_self, Plane); memnew_placement(p_self, Plane);
} }
void GDAPI godot_plane_new_copy(godot_plane *r_dest, const godot_plane *p_src) {
memnew_placement(r_dest, Plane(*(Plane *)p_src));
}
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -42,6 +42,10 @@ void GDAPI godot_quat_new(godot_quat *p_self) {
memnew_placement(p_self, Quat); memnew_placement(p_self, Quat);
} }
void GDAPI godot_quat_new_copy(godot_quat *r_dest, const godot_quat *p_src) {
memnew_placement(r_dest, Quat(*(Quat *)p_src));
}
godot_real_t GDAPI *godot_quat_operator_index(godot_quat *p_self, godot_int p_index) { godot_real_t GDAPI *godot_quat_operator_index(godot_quat *p_self, godot_int p_index) {
Quat *self = (Quat *)p_self; Quat *self = (Quat *)p_self;
return (godot_real_t *)&self->operator[](p_index); return (godot_real_t *)&self->operator[](p_index);

View file

@ -43,10 +43,18 @@ void GDAPI godot_rect2_new(godot_rect2 *p_self) {
memnew_placement(p_self, Rect2); memnew_placement(p_self, Rect2);
} }
void GDAPI godot_rect2_new_copy(godot_rect2 *r_dest, const godot_rect2 *p_src) {
memnew_placement(r_dest, Rect2(*(Rect2 *)p_src));
}
void GDAPI godot_rect2i_new(godot_rect2i *p_self) { void GDAPI godot_rect2i_new(godot_rect2i *p_self) {
memnew_placement(p_self, Rect2i); memnew_placement(p_self, Rect2i);
} }
void GDAPI godot_rect2i_new_copy(godot_rect2i *r_dest, const godot_rect2i *p_src) {
memnew_placement(r_dest, Rect2i(*(Rect2i *)p_src));
}
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -43,6 +43,10 @@ void GDAPI godot_rid_new(godot_rid *p_self) {
memnew_placement(p_self, RID); memnew_placement(p_self, RID);
} }
void GDAPI godot_rid_new_copy(godot_rid *r_dest, const godot_rid *p_src) {
memnew_placement(r_dest, RID(*(RID *)p_src));
}
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -43,6 +43,10 @@ void GDAPI godot_signal_new(godot_signal *p_self) {
memnew_placement(p_self, Signal); memnew_placement(p_self, Signal);
} }
void GDAPI godot_signal_new_copy(godot_signal *r_dest, const godot_signal *p_src) {
memnew_placement(r_dest, Signal(*(Signal *)p_src));
}
void GDAPI godot_signal_destroy(godot_signal *p_self) { void GDAPI godot_signal_destroy(godot_signal *p_self) {
Signal *self = (Signal *)p_self; Signal *self = (Signal *)p_self;
self->~Signal(); self->~Signal();

View file

@ -45,10 +45,7 @@ void GDAPI godot_string_new(godot_string *r_dest) {
} }
void GDAPI godot_string_new_copy(godot_string *r_dest, const godot_string *p_src) { void GDAPI godot_string_new_copy(godot_string *r_dest, const godot_string *p_src) {
String *dest = (String *)r_dest; memnew_placement(r_dest, String(*(String *)p_src));
const String *src = (const String *)p_src;
memnew_placement(dest, String);
*dest = String(*src);
} }
void GDAPI godot_string_new_with_latin1_chars(godot_string *r_dest, const char *p_contents) { void GDAPI godot_string_new_with_latin1_chars(godot_string *r_dest, const char *p_contents) {
@ -125,6 +122,45 @@ void GDAPI godot_string_new_with_wide_chars_and_len(godot_string *r_dest, const
} }
} }
const char GDAPI *godot_string_to_latin1_chars(const godot_string *p_self) {
String *self = (String *)p_self;
return self->ascii(true).get_data();
}
const char GDAPI *godot_string_to_utf8_chars(const godot_string *p_self) {
String *self = (String *)p_self;
return self->utf8().get_data();
}
const char16_t GDAPI *godot_string_to_utf16_chars(const godot_string *p_self) {
String *self = (String *)p_self;
return self->utf16().get_data();
}
const char32_t GDAPI *godot_string_to_utf32_chars(const godot_string *p_self) {
String *self = (String *)p_self;
return self->get_data();
}
const wchar_t GDAPI *godot_string_to_wide_chars(const godot_string *p_self) {
String *self = (String *)p_self;
if (sizeof(wchar_t) == 2) {
return (const wchar_t *)self->utf16().get_data();
} else {
return (const wchar_t *)self->get_data();
}
}
char32_t GDAPI *godot_string_operator_index(godot_string *p_self, godot_int p_index) {
String *self = (String *)p_self;
return self->ptrw();
}
const char32_t GDAPI *godot_string_operator_index_const(const godot_string *p_self, godot_int p_index) {
const String *self = (const String *)p_self;
return self->ptr();
}
void GDAPI godot_string_destroy(godot_string *p_self) { void GDAPI godot_string_destroy(godot_string *p_self) {
String *self = (String *)p_self; String *self = (String *)p_self;
self->~String(); self->~String();

View file

@ -44,9 +44,7 @@ void GDAPI godot_string_name_new(godot_string_name *r_dest) {
} }
void GDAPI godot_string_name_new_copy(godot_string_name *r_dest, const godot_string_name *p_src) { void GDAPI godot_string_name_new_copy(godot_string_name *r_dest, const godot_string_name *p_src) {
StringName *dest = (StringName *)r_dest; memnew_placement(r_dest, StringName(*(StringName *)p_src));
const StringName *src = (const StringName *)p_src;
memnew_placement(dest, StringName(*src));
} }
void GDAPI godot_string_name_new_with_latin1_chars(godot_string_name *r_dest, const char *p_contents) { void GDAPI godot_string_name_new_with_latin1_chars(godot_string_name *r_dest, const char *p_contents) {

View file

@ -42,6 +42,10 @@ void GDAPI godot_transform_new(godot_transform *p_self) {
memnew_placement(p_self, Transform); memnew_placement(p_self, Transform);
} }
void GDAPI godot_transform_new_copy(godot_transform *r_dest, const godot_transform *p_src) {
memnew_placement(r_dest, Transform(*(Transform *)p_src));
}
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -42,6 +42,10 @@ void GDAPI godot_transform2d_new(godot_transform2d *p_self) {
memnew_placement(p_self, Transform2D); memnew_placement(p_self, Transform2D);
} }
void GDAPI godot_transform2d_new_copy(godot_transform2d *r_dest, const godot_transform2d *p_src) {
memnew_placement(r_dest, Transform2D(*(Transform2D *)p_src));
}
godot_vector2 GDAPI *godot_transform2d_operator_index(godot_transform2d *p_self, godot_int p_index) { godot_vector2 GDAPI *godot_transform2d_operator_index(godot_transform2d *p_self, godot_int p_index) {
Transform2D *self = (Transform2D *)p_self; Transform2D *self = (Transform2D *)p_self;
return (godot_vector2 *)&self->operator[](p_index); return (godot_vector2 *)&self->operator[](p_index);

View file

@ -577,6 +577,54 @@ void GDAPI godot_variant_call(godot_variant *p_self, const godot_string_name *p_
} }
} }
void GDAPI godot_variant_call_with_cstring(godot_variant *p_self, const char *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant *r_return, godot_variant_call_error *r_error) {
Variant *self = (Variant *)p_self;
const StringName method(p_method);
const Variant **args = (const Variant **)p_args;
Variant ret;
Callable::CallError error;
self->call(method, args, p_argcount, ret, error);
memnew_placement_custom(r_return, Variant, Variant(ret));
if (r_error) {
r_error->error = (godot_variant_call_error_error)error.error;
r_error->argument = error.argument;
r_error->expected = (godot_variant_type)error.expected;
}
}
void GDAPI godot_variant_call_static(godot_variant_type p_type, const godot_string_name *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant *r_return, godot_variant_call_error *r_error) {
Variant::Type type = (Variant::Type)p_type;
const StringName *method = (const StringName *)p_method;
const Variant **args = (const Variant **)p_args;
Variant ret;
Callable::CallError error;
Variant::call_static(type, *method, args, p_argcount, ret, error);
memnew_placement_custom(r_return, Variant, Variant(ret));
if (r_error) {
r_error->error = (godot_variant_call_error_error)error.error;
r_error->argument = error.argument;
r_error->expected = (godot_variant_type)error.expected;
}
}
void GDAPI godot_variant_call_static_with_cstring(godot_variant_type p_type, const char *p_method, const godot_variant **p_args, const godot_int p_argcount, godot_variant *r_return, godot_variant_call_error *r_error) {
Variant::Type type = (Variant::Type)p_type;
const StringName method(p_method);
const Variant **args = (const Variant **)p_args;
Variant ret;
Callable::CallError error;
Variant::call_static(type, method, args, p_argcount, ret, error);
memnew_placement_custom(r_return, Variant, Variant(ret));
if (r_error) {
r_error->error = (godot_variant_call_error_error)error.error;
r_error->argument = error.argument;
r_error->expected = (godot_variant_type)error.expected;
}
}
void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_return, bool *r_valid) { void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_return, bool *r_valid) {
Variant::Operator op = (Variant::Operator)p_op; Variant::Operator op = (Variant::Operator)p_op;
const Variant *a = (const Variant *)p_a; const Variant *a = (const Variant *)p_a;
@ -593,12 +641,20 @@ void GDAPI godot_variant_set(godot_variant *p_self, const godot_variant *p_key,
self->set(*key, *value, r_valid); self->set(*key, *value, r_valid);
} }
void GDAPI godot_variant_set_named(godot_variant *p_self, const godot_string_name *p_name, const godot_variant *p_value, bool *r_valid) { void GDAPI godot_variant_set_named(godot_variant *p_self, const godot_string_name *p_key, const godot_variant *p_value, bool *r_valid) {
Variant *self = (Variant *)p_self; Variant *self = (Variant *)p_self;
const StringName *name = (const StringName *)p_name; const StringName *key = (const StringName *)p_key;
const Variant *value = (const Variant *)p_value; const Variant *value = (const Variant *)p_value;
self->set_named(*name, *value, *r_valid); self->set_named(*key, *value, *r_valid);
}
void GDAPI godot_variant_set_named_with_cstring(godot_variant *p_self, const char *p_key, const godot_variant *p_value, bool *r_valid) {
Variant *self = (Variant *)p_self;
const StringName key(p_key);
const Variant *value = (const Variant *)p_value;
self->set_named(key, *value, *r_valid);
} }
void GDAPI godot_variant_set_keyed(godot_variant *p_self, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid) { void GDAPI godot_variant_set_keyed(godot_variant *p_self, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid) {
@ -638,6 +694,17 @@ godot_variant GDAPI godot_variant_get_named(const godot_variant *p_self, const g
return result; return result;
} }
godot_variant GDAPI godot_variant_get_named_with_cstring(const godot_variant *p_self, const char *p_key, bool *r_valid) {
const Variant *self = (const Variant *)p_self;
const StringName *key = (const StringName *)p_key;
Variant ret;
ret = self->get_named(*key, *r_valid);
godot_variant result;
memnew_placement_custom(&result, Variant, Variant(ret));
return result;
}
godot_variant GDAPI godot_variant_get_keyed(const godot_variant *p_self, const godot_variant *p_key, bool *r_valid) { godot_variant GDAPI godot_variant_get_keyed(const godot_variant *p_self, const godot_variant *p_key, bool *r_valid) {
const Variant *self = (const Variant *)p_self; const Variant *self = (const Variant *)p_self;
const Variant *key = (const Variant *)p_key; const Variant *key = (const Variant *)p_key;
@ -824,6 +891,14 @@ bool GDAPI godot_variant_is_builtin_method_const_with_cstring(godot_variant_type
return Variant::is_builtin_method_const((Variant::Type)p_type, StringName(p_method)); return Variant::is_builtin_method_const((Variant::Type)p_type, StringName(p_method));
} }
bool GDAPI godot_variant_is_builtin_method_static(godot_variant_type p_type, const godot_string_name *p_method) {
return Variant::is_builtin_method_static((Variant::Type)p_type, *((const StringName *)p_method));
}
bool GDAPI godot_variant_is_builtin_method_static_with_cstring(godot_variant_type p_type, const char *p_method) {
return Variant::is_builtin_method_static((Variant::Type)p_type, StringName(p_method));
}
bool GDAPI godot_variant_is_builtin_method_vararg(godot_variant_type p_type, const godot_string_name *p_method) { bool GDAPI godot_variant_is_builtin_method_vararg(godot_variant_type p_type, const godot_string_name *p_method) {
return Variant::is_builtin_method_vararg((Variant::Type)p_type, *((const StringName *)p_method)); return Variant::is_builtin_method_vararg((Variant::Type)p_type, *((const StringName *)p_method));
} }

View file

@ -43,10 +43,18 @@ void GDAPI godot_vector2_new(godot_vector2 *p_self) {
memnew_placement(p_self, Vector2); memnew_placement(p_self, Vector2);
} }
void GDAPI godot_vector2_new_copy(godot_vector2 *r_dest, const godot_vector2 *p_src) {
memnew_placement(r_dest, Vector2(*(Vector2 *)p_src));
}
void GDAPI godot_vector2i_new(godot_vector2i *p_self) { void GDAPI godot_vector2i_new(godot_vector2i *p_self) {
memnew_placement(p_self, Vector2i); memnew_placement(p_self, Vector2i);
} }
void GDAPI godot_vector2i_new_copy(godot_vector2i *r_dest, const godot_vector2i *p_src) {
memnew_placement(r_dest, Vector2i(*(Vector2i *)p_src));
}
godot_real_t GDAPI *godot_vector2_operator_index(godot_vector2 *p_self, godot_int p_index) { godot_real_t GDAPI *godot_vector2_operator_index(godot_vector2 *p_self, godot_int p_index) {
Vector2 *self = (Vector2 *)p_self; Vector2 *self = (Vector2 *)p_self;
return (godot_real_t *)&self->operator[](p_index); return (godot_real_t *)&self->operator[](p_index);

View file

@ -43,10 +43,18 @@ void GDAPI godot_vector3_new(godot_vector3 *p_self) {
memnew_placement(p_self, Vector3); memnew_placement(p_self, Vector3);
} }
void GDAPI godot_vector3_new_copy(godot_vector3 *r_dest, const godot_vector3 *p_src) {
memnew_placement(r_dest, Vector3(*(Vector3 *)p_src));
}
void GDAPI godot_vector3i_new(godot_vector3i *p_self) { void GDAPI godot_vector3i_new(godot_vector3i *p_self) {
memnew_placement(p_self, Vector3i); memnew_placement(p_self, Vector3i);
} }
void GDAPI godot_vector3i_new_copy(godot_vector3i *r_dest, const godot_vector3i *p_src) {
memnew_placement(r_dest, Vector3i(*(Vector3i *)p_src));
}
godot_real_t GDAPI *godot_vector3_operator_index(godot_vector3 *p_self, godot_int p_index) { godot_real_t GDAPI *godot_vector3_operator_index(godot_vector3 *p_self, godot_int p_index) {
Vector3 *self = (Vector3 *)p_self; Vector3 *self = (Vector3 *)p_self;
return (godot_real_t *)&self->operator[](p_index); return (godot_real_t *)&self->operator[](p_index);

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", "name": "godot_variant_evaluate",
"return_type": "void", "return_type": "void",
@ -1200,7 +1230,29 @@
], ],
[ [
"const godot_string_name *", "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 *", "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", "name": "godot_variant_get_keyed",
"return_type": "godot_variant", "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", "name": "godot_variant_is_builtin_method_vararg",
"return_type": "bool", "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", "name": "godot_array_new",
"return_type": "void", "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", "name": "godot_array_destroy",
"return_type": "void", "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", "name": "godot_basis_operator_index",
"return_type": "godot_vector3 *", "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", "name": "godot_callable_destroy",
"return_type": "void", "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", "name": "godot_color_operator_index",
"return_type": "float *", "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", "name": "godot_dictionary_destroy",
"return_type": "void", "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", "name": "godot_node_path_destroy",
"return_type": "void", "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", "name": "godot_packed_byte_array_destroy",
"return_type": "void", "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", "name": "godot_packed_int32_array_destroy",
"return_type": "void", "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", "name": "godot_packed_int64_array_destroy",
"return_type": "void", "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", "name": "godot_packed_float32_array_destroy",
"return_type": "void", "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", "name": "godot_packed_float64_array_destroy",
"return_type": "void", "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", "name": "godot_packed_string_array_destroy",
"return_type": "void", "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", "name": "godot_packed_vector2_array_destroy",
"return_type": "void", "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", "name": "godot_packed_vector2i_array_destroy",
"return_type": "void", "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", "name": "godot_packed_vector3_array_destroy",
"return_type": "void", "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", "name": "godot_packed_vector3i_array_destroy",
"return_type": "void", "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", "name": "godot_packed_color_array_destroy",
"return_type": "void", "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", "name": "godot_quat_new",
"return_type": "void", "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", "name": "godot_quat_operator_index",
"return_type": "godot_real_t *", "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", "name": "godot_rect2i_new",
"return_type": "void", "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", "name": "godot_rid_new",
"return_type": "void", "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", "name": "godot_signal_new",
"return_type": "void", "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", "name": "godot_signal_destroy",
"return_type": "void", "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", "name": "godot_string_name_new",
"return_type": "void", "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", "name": "godot_transform2d_new",
"return_type": "void", "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", "name": "godot_transform2d_operator_index",
"return_type": "godot_vector2 *", "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", "name": "godot_vector2_operator_index",
"return_type": "godot_real_t *", "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", "name": "godot_vector2i_operator_index",
"return_type": "int32_t *", "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", "name": "godot_vector3_operator_index",
"return_type": "godot_real_t *", "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", "name": "godot_vector3i_operator_index",
"return_type": "int32_t *", "return_type": "int32_t *",

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_aabb_new(godot_aabb *p_self); void GDAPI godot_aabb_new(godot_aabb *p_self);
void GDAPI godot_aabb_new_copy(godot_aabb *r_dest, const godot_aabb *p_src);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -50,6 +50,7 @@ typedef struct {
#include <gdnative/variant_struct.h> #include <gdnative/variant_struct.h>
void GDAPI godot_array_new(godot_array *p_self); void GDAPI godot_array_new(godot_array *p_self);
void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src);
void GDAPI godot_array_destroy(godot_array *p_self); void GDAPI godot_array_destroy(godot_array *p_self);
godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, godot_int p_index); godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, godot_int p_index);
const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, godot_int p_index); const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, godot_int p_index);

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_basis_new(godot_basis *p_self); void GDAPI godot_basis_new(godot_basis *p_self);
void GDAPI godot_basis_new_copy(godot_basis *r_dest, const godot_basis *p_src);
godot_vector3 GDAPI *godot_basis_operator_index(godot_basis *p_self, godot_int p_index); godot_vector3 GDAPI *godot_basis_operator_index(godot_basis *p_self, godot_int p_index);
const godot_vector3 GDAPI *godot_basis_operator_index_const(const godot_basis *p_self, godot_int p_index); const godot_vector3 GDAPI *godot_basis_operator_index_const(const godot_basis *p_self, godot_int p_index);

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_callable_new(godot_callable *p_self); void GDAPI godot_callable_new(godot_callable *p_self);
void GDAPI godot_callable_new_copy(godot_callable *r_dest, const godot_callable *p_src);
void GDAPI godot_callable_destroy(godot_callable *p_self); void GDAPI godot_callable_destroy(godot_callable *p_self);
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -50,6 +50,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_color_new(godot_color *p_self); void GDAPI godot_color_new(godot_color *p_self);
void GDAPI godot_color_new_copy(godot_color *r_dest, const godot_color *p_src);
float GDAPI *godot_color_operator_index(godot_color *p_self, godot_int p_index); float GDAPI *godot_color_operator_index(godot_color *p_self, godot_int p_index);
const float GDAPI *godot_color_operator_index_const(const godot_color *p_self, godot_int p_index); const float GDAPI *godot_color_operator_index_const(const godot_color *p_self, godot_int p_index);

View file

@ -50,6 +50,7 @@ typedef struct {
#include <gdnative/variant_struct.h> #include <gdnative/variant_struct.h>
void GDAPI godot_dictionary_new(godot_dictionary *p_self); void GDAPI godot_dictionary_new(godot_dictionary *p_self);
void GDAPI godot_dictionary_new_copy(godot_dictionary *r_dest, const godot_dictionary *p_src);
void GDAPI godot_dictionary_destroy(godot_dictionary *p_self); void GDAPI godot_dictionary_destroy(godot_dictionary *p_self);
godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, const godot_variant *p_key); godot_variant GDAPI *godot_dictionary_operator_index(godot_dictionary *p_self, const godot_variant *p_key);
const godot_variant GDAPI *godot_dictionary_operator_index_const(const godot_dictionary *p_self, const godot_variant *p_key); const godot_variant GDAPI *godot_dictionary_operator_index_const(const godot_dictionary *p_self, const godot_variant *p_key);

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_node_path_new(godot_node_path *p_self); void GDAPI godot_node_path_new(godot_node_path *p_self);
void GDAPI godot_node_path_new_copy(godot_node_path *r_dest, const godot_node_path *p_src);
void GDAPI godot_node_path_destroy(godot_node_path *p_self); void GDAPI godot_node_path_destroy(godot_node_path *p_self);
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -163,6 +163,7 @@ typedef struct {
// Byte. // Byte.
void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *p_self); void GDAPI godot_packed_byte_array_new(godot_packed_byte_array *p_self);
void GDAPI godot_packed_byte_array_new_copy(godot_packed_byte_array *r_dest, const godot_packed_byte_array *p_src);
void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self); void GDAPI godot_packed_byte_array_destroy(godot_packed_byte_array *p_self);
uint8_t GDAPI *godot_packed_byte_array_operator_index(godot_packed_byte_array *p_self, godot_int p_index); uint8_t GDAPI *godot_packed_byte_array_operator_index(godot_packed_byte_array *p_self, godot_int p_index);
const uint8_t GDAPI *godot_packed_byte_array_operator_index_const(const godot_packed_byte_array *p_self, godot_int p_index); const uint8_t GDAPI *godot_packed_byte_array_operator_index_const(const godot_packed_byte_array *p_self, godot_int p_index);
@ -170,6 +171,7 @@ const uint8_t GDAPI *godot_packed_byte_array_operator_index_const(const godot_pa
// Int32. // Int32.
void GDAPI godot_packed_int32_array_new(godot_packed_int32_array *p_self); void GDAPI godot_packed_int32_array_new(godot_packed_int32_array *p_self);
void GDAPI godot_packed_int32_array_new_copy(godot_packed_int32_array *r_dest, const godot_packed_int32_array *p_src);
void GDAPI godot_packed_int32_array_destroy(godot_packed_int32_array *p_self); void GDAPI godot_packed_int32_array_destroy(godot_packed_int32_array *p_self);
int32_t GDAPI *godot_packed_int32_array_operator_index(godot_packed_int32_array *p_self, godot_int p_index); int32_t GDAPI *godot_packed_int32_array_operator_index(godot_packed_int32_array *p_self, godot_int p_index);
const int32_t GDAPI *godot_packed_int32_array_operator_index_const(const godot_packed_int32_array *p_self, godot_int p_index); const int32_t GDAPI *godot_packed_int32_array_operator_index_const(const godot_packed_int32_array *p_self, godot_int p_index);
@ -177,6 +179,7 @@ const int32_t GDAPI *godot_packed_int32_array_operator_index_const(const godot_p
// Int64. // Int64.
void GDAPI godot_packed_int64_array_new(godot_packed_int64_array *p_self); void GDAPI godot_packed_int64_array_new(godot_packed_int64_array *p_self);
void GDAPI godot_packed_int64_array_new_copy(godot_packed_int64_array *r_dest, const godot_packed_int64_array *p_src);
void GDAPI godot_packed_int64_array_destroy(godot_packed_int64_array *p_self); void GDAPI godot_packed_int64_array_destroy(godot_packed_int64_array *p_self);
int64_t GDAPI *godot_packed_int64_array_operator_index(godot_packed_int64_array *p_self, godot_int p_index); int64_t GDAPI *godot_packed_int64_array_operator_index(godot_packed_int64_array *p_self, godot_int p_index);
const int64_t GDAPI *godot_packed_int64_array_operator_index_const(const godot_packed_int64_array *p_self, godot_int p_index); const int64_t GDAPI *godot_packed_int64_array_operator_index_const(const godot_packed_int64_array *p_self, godot_int p_index);
@ -184,6 +187,7 @@ const int64_t GDAPI *godot_packed_int64_array_operator_index_const(const godot_p
// Float32. // Float32.
void GDAPI godot_packed_float32_array_new(godot_packed_float32_array *p_self); void GDAPI godot_packed_float32_array_new(godot_packed_float32_array *p_self);
void GDAPI godot_packed_float32_array_new_copy(godot_packed_float32_array *r_dest, const godot_packed_float32_array *p_src);
void GDAPI godot_packed_float32_array_destroy(godot_packed_float32_array *p_self); void GDAPI godot_packed_float32_array_destroy(godot_packed_float32_array *p_self);
float GDAPI *godot_packed_float32_array_operator_index(godot_packed_float32_array *p_self, godot_int p_index); float GDAPI *godot_packed_float32_array_operator_index(godot_packed_float32_array *p_self, godot_int p_index);
const float GDAPI *godot_packed_float32_array_operator_index_const(const godot_packed_float32_array *p_self, godot_int p_index); const float GDAPI *godot_packed_float32_array_operator_index_const(const godot_packed_float32_array *p_self, godot_int p_index);
@ -191,6 +195,7 @@ const float GDAPI *godot_packed_float32_array_operator_index_const(const godot_p
// Float64. // Float64.
void GDAPI godot_packed_float64_array_new(godot_packed_float64_array *p_self); void GDAPI godot_packed_float64_array_new(godot_packed_float64_array *p_self);
void GDAPI godot_packed_float64_array_new_copy(godot_packed_float64_array *r_dest, const godot_packed_float64_array *p_src);
void GDAPI godot_packed_float64_array_destroy(godot_packed_float64_array *p_self); void GDAPI godot_packed_float64_array_destroy(godot_packed_float64_array *p_self);
double GDAPI *godot_packed_float64_array_operator_index(godot_packed_float64_array *p_self, godot_int p_index); double GDAPI *godot_packed_float64_array_operator_index(godot_packed_float64_array *p_self, godot_int p_index);
const double GDAPI *godot_packed_float64_array_operator_index_const(const godot_packed_float64_array *p_self, godot_int p_index); const double GDAPI *godot_packed_float64_array_operator_index_const(const godot_packed_float64_array *p_self, godot_int p_index);
@ -198,6 +203,7 @@ const double GDAPI *godot_packed_float64_array_operator_index_const(const godot_
// String. // String.
void GDAPI godot_packed_string_array_new(godot_packed_string_array *p_self); void GDAPI godot_packed_string_array_new(godot_packed_string_array *p_self);
void GDAPI godot_packed_string_array_new_copy(godot_packed_string_array *r_dest, const godot_packed_string_array *p_src);
void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self); void GDAPI godot_packed_string_array_destroy(godot_packed_string_array *p_self);
godot_string GDAPI *godot_packed_string_array_operator_index(godot_packed_string_array *p_self, godot_int p_index); godot_string GDAPI *godot_packed_string_array_operator_index(godot_packed_string_array *p_self, godot_int p_index);
const godot_string GDAPI *godot_packed_string_array_operator_index_const(const godot_packed_string_array *p_self, godot_int p_index); const godot_string GDAPI *godot_packed_string_array_operator_index_const(const godot_packed_string_array *p_self, godot_int p_index);
@ -205,6 +211,7 @@ const godot_string GDAPI *godot_packed_string_array_operator_index_const(const g
// Vector2. // Vector2.
void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *p_self); void GDAPI godot_packed_vector2_array_new(godot_packed_vector2_array *p_self);
void GDAPI godot_packed_vector2_array_new_copy(godot_packed_vector2_array *r_dest, const godot_packed_vector2_array *p_src);
void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self); void GDAPI godot_packed_vector2_array_destroy(godot_packed_vector2_array *p_self);
godot_vector2 GDAPI *godot_packed_vector2_array_operator_index(godot_packed_vector2_array *p_self, godot_int p_index); godot_vector2 GDAPI *godot_packed_vector2_array_operator_index(godot_packed_vector2_array *p_self, godot_int p_index);
const godot_vector2 GDAPI *godot_packed_vector2_array_operator_index_const(const godot_packed_vector2_array *p_self, godot_int p_index); const godot_vector2 GDAPI *godot_packed_vector2_array_operator_index_const(const godot_packed_vector2_array *p_self, godot_int p_index);
@ -212,6 +219,7 @@ const godot_vector2 GDAPI *godot_packed_vector2_array_operator_index_const(const
// Vector2i. // Vector2i.
void GDAPI godot_packed_vector2i_array_new(godot_packed_vector2i_array *p_self); void GDAPI godot_packed_vector2i_array_new(godot_packed_vector2i_array *p_self);
void GDAPI godot_packed_vector2i_array_new_copy(godot_packed_vector2i_array *r_dest, const godot_packed_vector2i_array *p_src);
void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self); void GDAPI godot_packed_vector2i_array_destroy(godot_packed_vector2i_array *p_self);
godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index(godot_packed_vector2i_array *p_self, godot_int p_index); godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index(godot_packed_vector2i_array *p_self, godot_int p_index);
const godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index_const(const godot_packed_vector2i_array *p_self, godot_int p_index); const godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index_const(const godot_packed_vector2i_array *p_self, godot_int p_index);
@ -219,6 +227,7 @@ const godot_vector2i GDAPI *godot_packed_vector2i_array_operator_index_const(con
// Vector3. // Vector3.
void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *p_self); void GDAPI godot_packed_vector3_array_new(godot_packed_vector3_array *p_self);
void GDAPI godot_packed_vector3_array_new_copy(godot_packed_vector3_array *r_dest, const godot_packed_vector3_array *p_src);
void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self); void GDAPI godot_packed_vector3_array_destroy(godot_packed_vector3_array *p_self);
godot_vector3 GDAPI *godot_packed_vector3_array_operator_index(godot_packed_vector3_array *p_self, godot_int p_index); godot_vector3 GDAPI *godot_packed_vector3_array_operator_index(godot_packed_vector3_array *p_self, godot_int p_index);
const godot_vector3 GDAPI *godot_packed_vector3_array_operator_index_const(const godot_packed_vector3_array *p_self, godot_int p_index); const godot_vector3 GDAPI *godot_packed_vector3_array_operator_index_const(const godot_packed_vector3_array *p_self, godot_int p_index);
@ -226,6 +235,7 @@ const godot_vector3 GDAPI *godot_packed_vector3_array_operator_index_const(const
// Vector3i. // Vector3i.
void GDAPI godot_packed_vector3i_array_new(godot_packed_vector3i_array *p_self); void GDAPI godot_packed_vector3i_array_new(godot_packed_vector3i_array *p_self);
void GDAPI godot_packed_vector3i_array_new_copy(godot_packed_vector3i_array *r_dest, const godot_packed_vector3i_array *p_src);
void GDAPI godot_packed_vector3i_array_destroy(godot_packed_vector3i_array *p_self); void GDAPI godot_packed_vector3i_array_destroy(godot_packed_vector3i_array *p_self);
godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index(godot_packed_vector3i_array *p_self, godot_int p_index); godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index(godot_packed_vector3i_array *p_self, godot_int p_index);
const godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index_const(const godot_packed_vector3i_array *p_self, godot_int p_index); const godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index_const(const godot_packed_vector3i_array *p_self, godot_int p_index);
@ -233,6 +243,7 @@ const godot_vector3i GDAPI *godot_packed_vector3i_array_operator_index_const(con
// Color. // Color.
void GDAPI godot_packed_color_array_new(godot_packed_color_array *p_self); void GDAPI godot_packed_color_array_new(godot_packed_color_array *p_self);
void GDAPI godot_packed_color_array_new_copy(godot_packed_color_array *r_dest, const godot_packed_color_array *p_src);
void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self); void GDAPI godot_packed_color_array_destroy(godot_packed_color_array *p_self);
godot_color GDAPI *godot_packed_color_array_operator_index(godot_packed_color_array *p_self, godot_int p_index); godot_color GDAPI *godot_packed_color_array_operator_index(godot_packed_color_array *p_self, godot_int p_index);
const godot_color GDAPI *godot_packed_color_array_operator_index_const(const godot_packed_color_array *p_self, godot_int p_index); const godot_color GDAPI *godot_packed_color_array_operator_index_const(const godot_packed_color_array *p_self, godot_int p_index);

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_plane_new(godot_plane *p_self); void GDAPI godot_plane_new(godot_plane *p_self);
void GDAPI godot_plane_new_copy(godot_plane *r_dest, const godot_plane *p_src);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_quat_new(godot_quat *p_self); void GDAPI godot_quat_new(godot_quat *p_self);
void GDAPI godot_quat_new_copy(godot_quat *r_dest, const godot_quat *p_src);
godot_real_t GDAPI *godot_quat_operator_index(godot_quat *p_self, godot_int p_index); godot_real_t GDAPI *godot_quat_operator_index(godot_quat *p_self, godot_int p_index);
const godot_real_t GDAPI *godot_quat_operator_index_const(const godot_quat *p_self, godot_int p_index); const godot_real_t GDAPI *godot_quat_operator_index_const(const godot_quat *p_self, godot_int p_index);

View file

@ -58,7 +58,9 @@ typedef struct godot_rect2i {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_rect2_new(godot_rect2 *p_self); void GDAPI godot_rect2_new(godot_rect2 *p_self);
void GDAPI godot_rect2_new_copy(godot_rect2 *r_dest, const godot_rect2 *p_src);
void GDAPI godot_rect2i_new(godot_rect2i *p_self); void GDAPI godot_rect2i_new(godot_rect2i *p_self);
void GDAPI godot_rect2i_new_copy(godot_rect2i *r_dest, const godot_rect2i *p_src);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_rid_new(godot_rid *p_self); void GDAPI godot_rid_new(godot_rid *p_self);
void GDAPI godot_rid_new_copy(godot_rid *r_dest, const godot_rid *p_src);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_signal_new(godot_signal *p_self); void GDAPI godot_signal_new(godot_signal *p_self);
void GDAPI godot_signal_new_copy(godot_signal *r_dest, const godot_signal *p_src);
void GDAPI godot_signal_destroy(godot_signal *p_self); void GDAPI godot_signal_destroy(godot_signal *p_self);
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -55,6 +55,7 @@ typedef struct {
#endif #endif
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
#include <gdnative/math_defs.h>
void GDAPI godot_string_new(godot_string *r_dest); void GDAPI godot_string_new(godot_string *r_dest);
void GDAPI godot_string_new_copy(godot_string *r_dest, const godot_string *p_src); void GDAPI godot_string_new_copy(godot_string *r_dest, const godot_string *p_src);
@ -72,6 +73,15 @@ void GDAPI godot_string_new_with_utf16_chars_and_len(godot_string *r_dest, const
void GDAPI godot_string_new_with_utf32_chars_and_len(godot_string *r_dest, const char32_t *p_contents, const int p_size); void GDAPI godot_string_new_with_utf32_chars_and_len(godot_string *r_dest, const char32_t *p_contents, const int p_size);
void GDAPI godot_string_new_with_wide_chars_and_len(godot_string *r_dest, const wchar_t *p_contents, const int p_size); void GDAPI godot_string_new_with_wide_chars_and_len(godot_string *r_dest, const wchar_t *p_contents, const int p_size);
const char GDAPI *godot_string_to_latin1_chars(const godot_string *p_self);
const char GDAPI *godot_string_to_utf8_chars(const godot_string *p_self);
const char16_t GDAPI *godot_string_to_utf16_chars(const godot_string *p_self);
const char32_t GDAPI *godot_string_to_utf32_chars(const godot_string *p_self);
const wchar_t GDAPI *godot_string_to_wide_chars(const godot_string *p_self);
char32_t GDAPI *godot_string_operator_index(godot_string *p_self, godot_int p_index);
const char32_t GDAPI *godot_string_operator_index_const(const godot_string *p_self, godot_int p_index);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_transform_new(godot_transform *p_self); void GDAPI godot_transform_new(godot_transform *p_self);
void GDAPI godot_transform_new_copy(godot_transform *r_dest, const godot_transform *p_src);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -49,6 +49,7 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_transform2d_new(godot_transform2d *p_self); void GDAPI godot_transform2d_new(godot_transform2d *p_self);
void GDAPI godot_transform2d_new_copy(godot_transform2d *r_dest, const godot_transform2d *p_src);
godot_vector2 GDAPI *godot_transform2d_operator_index(godot_transform2d *p_self, godot_int p_index); godot_vector2 GDAPI *godot_transform2d_operator_index(godot_transform2d *p_self, godot_int p_index);
const godot_vector2 GDAPI *godot_transform2d_operator_index_const(const godot_transform2d *p_self, godot_int p_index); const godot_vector2 GDAPI *godot_transform2d_operator_index_const(const godot_transform2d *p_self, godot_int p_index);

View file

@ -272,6 +272,8 @@ void GDAPI godot_variant_destroy(godot_variant *p_self);
void GDAPI godot_variant_call(godot_variant *p_self, const godot_string_name *p_method, const godot_variant **p_args, const godot_int p_argument_count, godot_variant *r_return, godot_variant_call_error *r_error); void GDAPI godot_variant_call(godot_variant *p_self, const godot_string_name *p_method, const godot_variant **p_args, const godot_int p_argument_count, godot_variant *r_return, godot_variant_call_error *r_error);
void GDAPI godot_variant_call_with_cstring(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); void GDAPI godot_variant_call_with_cstring(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);
void GDAPI godot_variant_call_static(godot_variant_type p_type, const godot_string_name *p_method, const godot_variant **p_args, const godot_int p_argument_count, godot_variant *r_return, godot_variant_call_error *r_error);
void GDAPI godot_variant_call_static_with_cstring(godot_variant_type p_type, 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);
void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_return, bool *r_valid); void GDAPI godot_variant_evaluate(godot_variant_operator p_op, const godot_variant *p_a, const godot_variant *p_b, godot_variant *r_return, bool *r_valid);
void GDAPI godot_variant_set(godot_variant *p_self, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid); void GDAPI godot_variant_set(godot_variant *p_self, const godot_variant *p_key, const godot_variant *p_value, bool *r_valid);
void GDAPI godot_variant_set_named(godot_variant *p_self, const godot_string_name *p_name, const godot_variant *p_value, bool *r_valid); void GDAPI godot_variant_set_named(godot_variant *p_self, const godot_string_name *p_name, const godot_variant *p_value, bool *r_valid);
@ -323,6 +325,8 @@ godot_variant_type GDAPI godot_variant_get_builtin_method_return_type(godot_vari
godot_variant_type GDAPI godot_variant_get_builtin_method_return_type_with_cstring(godot_variant_type p_type, const char *p_method); godot_variant_type GDAPI godot_variant_get_builtin_method_return_type_with_cstring(godot_variant_type p_type, const char *p_method);
bool GDAPI godot_variant_is_builtin_method_const(godot_variant_type p_type, const godot_string_name *p_method); bool GDAPI godot_variant_is_builtin_method_const(godot_variant_type p_type, const godot_string_name *p_method);
bool GDAPI godot_variant_is_builtin_method_const_with_cstring(godot_variant_type p_type, const char *p_method); bool GDAPI godot_variant_is_builtin_method_const_with_cstring(godot_variant_type p_type, const char *p_method);
bool GDAPI godot_variant_is_builtin_method_static(godot_variant_type p_type, const godot_string_name *p_method);
bool GDAPI godot_variant_is_builtin_method_static_with_cstring(godot_variant_type p_type, const char *p_method);
bool GDAPI godot_variant_is_builtin_method_vararg(godot_variant_type p_type, const godot_string_name *p_method); bool GDAPI godot_variant_is_builtin_method_vararg(godot_variant_type p_type, const godot_string_name *p_method);
bool GDAPI godot_variant_is_builtin_method_vararg_with_cstring(godot_variant_type p_type, const char *p_method); bool GDAPI godot_variant_is_builtin_method_vararg_with_cstring(godot_variant_type p_type, const char *p_method);
int GDAPI godot_variant_get_builtin_method_count(godot_variant_type p_type); int GDAPI godot_variant_get_builtin_method_count(godot_variant_type p_type);

View file

@ -58,7 +58,9 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_vector2_new(godot_vector2 *p_self); void GDAPI godot_vector2_new(godot_vector2 *p_self);
void GDAPI godot_vector2_new_copy(godot_vector2 *r_dest, const godot_vector2 *p_src);
void GDAPI godot_vector2i_new(godot_vector2i *p_self); void GDAPI godot_vector2i_new(godot_vector2i *p_self);
void GDAPI godot_vector2i_new_copy(godot_vector2i *r_dest, const godot_vector2i *p_src);
godot_real_t GDAPI *godot_vector2_operator_index(godot_vector2 *p_self, godot_int p_index); godot_real_t GDAPI *godot_vector2_operator_index(godot_vector2 *p_self, godot_int p_index);
const godot_real_t GDAPI *godot_vector2_operator_index_const(const godot_vector2 *p_self, godot_int p_index); const godot_real_t GDAPI *godot_vector2_operator_index_const(const godot_vector2 *p_self, godot_int p_index);
int32_t GDAPI *godot_vector2i_operator_index(godot_vector2i *p_self, godot_int p_index); int32_t GDAPI *godot_vector2i_operator_index(godot_vector2i *p_self, godot_int p_index);

View file

@ -58,7 +58,9 @@ typedef struct {
#include <gdnative/gdnative.h> #include <gdnative/gdnative.h>
void GDAPI godot_vector3_new(godot_vector3 *p_self); void GDAPI godot_vector3_new(godot_vector3 *p_self);
void GDAPI godot_vector3_new_copy(godot_vector3 *r_dest, const godot_vector3 *p_src);
void GDAPI godot_vector3i_new(godot_vector3i *p_self); void GDAPI godot_vector3i_new(godot_vector3i *p_self);
void GDAPI godot_vector3i_new_copy(godot_vector3i *r_dest, const godot_vector3i *p_src);
godot_real_t GDAPI *godot_vector3_operator_index(godot_vector3 *p_self, godot_int p_index); godot_real_t GDAPI *godot_vector3_operator_index(godot_vector3 *p_self, godot_int p_index);
const godot_real_t GDAPI *godot_vector3_operator_index_const(const godot_vector3 *p_self, godot_int p_index); const godot_real_t GDAPI *godot_vector3_operator_index_const(const godot_vector3 *p_self, godot_int p_index);
int32_t GDAPI *godot_vector3i_operator_index(godot_vector3i *p_self, godot_int p_index); int32_t GDAPI *godot_vector3i_operator_index(godot_vector3i *p_self, godot_int p_index);

View file

@ -71,6 +71,7 @@ struct MethodAPI {
bool is_editor = false; bool is_editor = false;
bool is_noscript = false; bool is_noscript = false;
bool is_const = false; bool is_const = false;
bool is_static = false; // For builtin types.
bool is_reverse = false; bool is_reverse = false;
bool is_virtual = false; bool is_virtual = false;
bool is_from_script = false; bool is_from_script = false;
@ -528,6 +529,7 @@ List<ClassAPI> generate_c_builtin_api_types() {
method_api.argument_count = Variant::get_builtin_method_argument_count(type, method_name); method_api.argument_count = Variant::get_builtin_method_argument_count(type, method_name);
method_api.has_varargs = Variant::is_builtin_method_vararg(type, method_name); method_api.has_varargs = Variant::is_builtin_method_vararg(type, method_name);
method_api.is_const = Variant::is_builtin_method_const(type, method_name); method_api.is_const = Variant::is_builtin_method_const(type, method_name);
method_api.is_static = Variant::is_builtin_method_static(type, method_name);
for (int i = 0; i < method_api.argument_count; i++) { for (int i = 0; i < method_api.argument_count; i++) {
method_api.argument_names.push_back(Variant::get_builtin_method_argument_name(type, method_name, i)); method_api.argument_names.push_back(Variant::get_builtin_method_argument_name(type, method_name, i));
@ -757,6 +759,7 @@ static void write_builtin_method(StringBuilder &p_source, const MethodAPI &p_met
append_indented(p_source, vformat(R"("name": "%s",)", p_method.method_name)); append_indented(p_source, vformat(R"("name": "%s",)", p_method.method_name));
append_indented(p_source, vformat(R"("return_type": "%s",)", p_method.return_type)); append_indented(p_source, vformat(R"("return_type": "%s",)", p_method.return_type));
append_indented(p_source, vformat(R"("is_const": %s,)", p_method.is_const ? "true" : "false")); append_indented(p_source, vformat(R"("is_const": %s,)", p_method.is_const ? "true" : "false"));
append_indented(p_source, vformat(R"("is_static": %s,)", p_method.is_static ? "true" : "false"));
append_indented(p_source, vformat(R"("has_varargs": %s,)", p_method.has_varargs ? "true" : "false")); append_indented(p_source, vformat(R"("has_varargs": %s,)", p_method.has_varargs ? "true" : "false"));
append_indented(p_source, R"("arguments": [)"); append_indented(p_source, R"("arguments": [)");