godot/core/extension/gdextension_interface.json

9359 lines
317 KiB
JSON

{
"_copyright": [
"/**************************************************************************/",
"/* This file is part of: */",
"/* GODOT ENGINE */",
"/* https://godotengine.org */",
"/**************************************************************************/",
"/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */",
"/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */",
"/* */",
"/* Permission is hereby granted, free of charge, to any person obtaining */",
"/* a copy of this software and associated documentation files (the */",
"/* \"Software\"), to deal in the Software without restriction, including */",
"/* without limitation the rights to use, copy, modify, merge, publish, */",
"/* distribute, sublicense, and/or sell copies of the Software, and to */",
"/* permit persons to whom the Software is furnished to do so, subject to */",
"/* the following conditions: */",
"/* */",
"/* The above copyright notice and this permission notice shall be */",
"/* included in all copies or substantial portions of the Software. */",
"/* */",
"/* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, */",
"/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */",
"/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */",
"/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */",
"/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */",
"/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */",
"/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */",
"/**************************************************************************/"
],
"$schema": "./gdextension_interface.schema.json",
"format_version": 1,
"types": [
{
"name": "GDExtensionVariantType",
"kind": "enum",
"values": [
{
"name": "GDEXTENSION_VARIANT_TYPE_NIL",
"value": 0
},
{
"name": "GDEXTENSION_VARIANT_TYPE_BOOL",
"value": 1
},
{
"name": "GDEXTENSION_VARIANT_TYPE_INT",
"value": 2
},
{
"name": "GDEXTENSION_VARIANT_TYPE_FLOAT",
"value": 3
},
{
"name": "GDEXTENSION_VARIANT_TYPE_STRING",
"value": 4
},
{
"name": "GDEXTENSION_VARIANT_TYPE_VECTOR2",
"value": 5
},
{
"name": "GDEXTENSION_VARIANT_TYPE_VECTOR2I",
"value": 6
},
{
"name": "GDEXTENSION_VARIANT_TYPE_RECT2",
"value": 7
},
{
"name": "GDEXTENSION_VARIANT_TYPE_RECT2I",
"value": 8
},
{
"name": "GDEXTENSION_VARIANT_TYPE_VECTOR3",
"value": 9
},
{
"name": "GDEXTENSION_VARIANT_TYPE_VECTOR3I",
"value": 10
},
{
"name": "GDEXTENSION_VARIANT_TYPE_TRANSFORM2D",
"value": 11
},
{
"name": "GDEXTENSION_VARIANT_TYPE_VECTOR4",
"value": 12
},
{
"name": "GDEXTENSION_VARIANT_TYPE_VECTOR4I",
"value": 13
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PLANE",
"value": 14
},
{
"name": "GDEXTENSION_VARIANT_TYPE_QUATERNION",
"value": 15
},
{
"name": "GDEXTENSION_VARIANT_TYPE_AABB",
"value": 16
},
{
"name": "GDEXTENSION_VARIANT_TYPE_BASIS",
"value": 17
},
{
"name": "GDEXTENSION_VARIANT_TYPE_TRANSFORM3D",
"value": 18
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PROJECTION",
"value": 19
},
{
"name": "GDEXTENSION_VARIANT_TYPE_COLOR",
"value": 20
},
{
"name": "GDEXTENSION_VARIANT_TYPE_STRING_NAME",
"value": 21
},
{
"name": "GDEXTENSION_VARIANT_TYPE_NODE_PATH",
"value": 22
},
{
"name": "GDEXTENSION_VARIANT_TYPE_RID",
"value": 23
},
{
"name": "GDEXTENSION_VARIANT_TYPE_OBJECT",
"value": 24
},
{
"name": "GDEXTENSION_VARIANT_TYPE_CALLABLE",
"value": 25
},
{
"name": "GDEXTENSION_VARIANT_TYPE_SIGNAL",
"value": 26
},
{
"name": "GDEXTENSION_VARIANT_TYPE_DICTIONARY",
"value": 27
},
{
"name": "GDEXTENSION_VARIANT_TYPE_ARRAY",
"value": 28
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_BYTE_ARRAY",
"value": 29
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_INT32_ARRAY",
"value": 30
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_INT64_ARRAY",
"value": 31
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_FLOAT32_ARRAY",
"value": 32
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_FLOAT64_ARRAY",
"value": 33
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_STRING_ARRAY",
"value": 34
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR2_ARRAY",
"value": 35
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR3_ARRAY",
"value": 36
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_COLOR_ARRAY",
"value": 37
},
{
"name": "GDEXTENSION_VARIANT_TYPE_PACKED_VECTOR4_ARRAY",
"value": 38
},
{
"name": "GDEXTENSION_VARIANT_TYPE_VARIANT_MAX",
"value": 39
}
]
},
{
"name": "GDExtensionVariantOperator",
"kind": "enum",
"values": [
{
"name": "GDEXTENSION_VARIANT_OP_EQUAL",
"value": 0
},
{
"name": "GDEXTENSION_VARIANT_OP_NOT_EQUAL",
"value": 1
},
{
"name": "GDEXTENSION_VARIANT_OP_LESS",
"value": 2
},
{
"name": "GDEXTENSION_VARIANT_OP_LESS_EQUAL",
"value": 3
},
{
"name": "GDEXTENSION_VARIANT_OP_GREATER",
"value": 4
},
{
"name": "GDEXTENSION_VARIANT_OP_GREATER_EQUAL",
"value": 5
},
{
"name": "GDEXTENSION_VARIANT_OP_ADD",
"value": 6
},
{
"name": "GDEXTENSION_VARIANT_OP_SUBTRACT",
"value": 7
},
{
"name": "GDEXTENSION_VARIANT_OP_MULTIPLY",
"value": 8
},
{
"name": "GDEXTENSION_VARIANT_OP_DIVIDE",
"value": 9
},
{
"name": "GDEXTENSION_VARIANT_OP_NEGATE",
"value": 10
},
{
"name": "GDEXTENSION_VARIANT_OP_POSITIVE",
"value": 11
},
{
"name": "GDEXTENSION_VARIANT_OP_MODULE",
"value": 12
},
{
"name": "GDEXTENSION_VARIANT_OP_POWER",
"value": 13
},
{
"name": "GDEXTENSION_VARIANT_OP_SHIFT_LEFT",
"value": 14
},
{
"name": "GDEXTENSION_VARIANT_OP_SHIFT_RIGHT",
"value": 15
},
{
"name": "GDEXTENSION_VARIANT_OP_BIT_AND",
"value": 16
},
{
"name": "GDEXTENSION_VARIANT_OP_BIT_OR",
"value": 17
},
{
"name": "GDEXTENSION_VARIANT_OP_BIT_XOR",
"value": 18
},
{
"name": "GDEXTENSION_VARIANT_OP_BIT_NEGATE",
"value": 19
},
{
"name": "GDEXTENSION_VARIANT_OP_AND",
"value": 20
},
{
"name": "GDEXTENSION_VARIANT_OP_OR",
"value": 21
},
{
"name": "GDEXTENSION_VARIANT_OP_XOR",
"value": 22
},
{
"name": "GDEXTENSION_VARIANT_OP_NOT",
"value": 23
},
{
"name": "GDEXTENSION_VARIANT_OP_IN",
"value": 24
},
{
"name": "GDEXTENSION_VARIANT_OP_MAX",
"value": 25
}
]
},
{
"name": "GDExtensionVariantPtr",
"kind": "handle",
"description": [
"In this API there are multiple functions which expect the caller to pass a pointer",
"on return value as parameter.",
"In order to make it clear if the caller should initialize the return value or not",
"we have two flavor of types:",
"- `GDExtensionXXXPtr` for pointer on an initialized value",
"- `GDExtensionUninitializedXXXPtr` for pointer on uninitialized value",
"",
"Notes:",
"- Not respecting those requirements can seems harmless, but will lead to unexpected",
"segfault or memory leak (for instance with a specific compiler/OS, or when two",
"native extensions start doing ptrcall on each other).",
"- Initialization must be done with the function pointer returned by `variant_get_ptr_constructor`,",
"zero-initializing the variable should not be considered a valid initialization method here !",
"- Some types have no destructor (see `extension_api.json`'s `has_destructor` field), for",
"them it is always safe to skip the constructor for the return value if you are in a hurry ;-)"
]
},
{
"name": "GDExtensionConstVariantPtr",
"kind": "handle",
"parent": "GDExtensionVariantPtr",
"const": true
},
{
"name": "GDExtensionUninitializedVariantPtr",
"kind": "handle"
},
{
"name": "GDExtensionStringNamePtr",
"kind": "handle"
},
{
"name": "GDExtensionConstStringNamePtr",
"kind": "handle",
"parent": "GDExtensionStringNamePtr",
"const": true
},
{
"name": "GDExtensionUninitializedStringNamePtr",
"kind": "handle"
},
{
"name": "GDExtensionStringPtr",
"kind": "handle"
},
{
"name": "GDExtensionConstStringPtr",
"kind": "handle",
"parent": "GDExtensionStringPtr",
"const": true
},
{
"name": "GDExtensionUninitializedStringPtr",
"kind": "handle"
},
{
"name": "GDExtensionObjectPtr",
"kind": "handle"
},
{
"name": "GDExtensionConstObjectPtr",
"kind": "handle",
"parent": "GDExtensionObjectPtr",
"const": true
},
{
"name": "GDExtensionUninitializedObjectPtr",
"parent": "GDExtensionObjectPtr",
"kind": "handle"
},
{
"name": "GDExtensionTypePtr",
"kind": "handle"
},
{
"name": "GDExtensionConstTypePtr",
"kind": "handle",
"parent": "GDExtensionTypePtr",
"const": true
},
{
"name": "GDExtensionUninitializedTypePtr",
"kind": "handle"
},
{
"name": "GDExtensionMethodBindPtr",
"kind": "handle",
"const": true
},
{
"name": "GDExtensionInt",
"kind": "alias",
"type": "int64_t"
},
{
"name": "GDExtensionBool",
"kind": "alias",
"type": "uint8_t"
},
{
"name": "GDObjectInstanceID",
"kind": "alias",
"type": "uint64_t"
},
{
"name": "GDExtensionRefPtr",
"kind": "handle"
},
{
"name": "GDExtensionConstRefPtr",
"kind": "handle",
"parent": "GDExtensionRefPtr",
"const": true
},
{
"name": "GDExtensionCallErrorType",
"kind": "enum",
"values": [
{
"name": "GDEXTENSION_CALL_OK",
"value": 0
},
{
"name": "GDEXTENSION_CALL_ERROR_INVALID_METHOD",
"value": 1
},
{
"name": "GDEXTENSION_CALL_ERROR_INVALID_ARGUMENT",
"value": 2,
"description": [
"Expected a different variant type."
]
},
{
"name": "GDEXTENSION_CALL_ERROR_TOO_MANY_ARGUMENTS",
"value": 3,
"description": [
"Expected lower number of arguments."
]
},
{
"name": "GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS",
"value": 4,
"description": [
"Expected higher number of arguments."
]
},
{
"name": "GDEXTENSION_CALL_ERROR_INSTANCE_IS_NULL",
"value": 5
},
{
"name": "GDEXTENSION_CALL_ERROR_METHOD_NOT_CONST",
"value": 6,
"description": [
"Used for const call."
]
}
]
},
{
"name": "GDExtensionCallError",
"kind": "struct",
"members": [
{
"name": "error",
"type": "GDExtensionCallErrorType"
},
{
"name": "argument",
"type": "int32_t"
},
{
"name": "expected",
"type": "int32_t"
}
]
},
{
"name": "GDExtensionVariantFromTypeConstructorFunc",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"type": "GDExtensionUninitializedVariantPtr"
},
{
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionTypeFromVariantConstructorFunc",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"type": "GDExtensionUninitializedTypePtr"
},
{
"type": "GDExtensionVariantPtr"
}
]
},
{
"name": "GDExtensionVariantGetInternalPtrFunc",
"kind": "function",
"return_value": {
"type": "void*"
},
"arguments": [
{
"type": "GDExtensionVariantPtr"
}
]
},
{
"name": "GDExtensionPtrOperatorEvaluator",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_left",
"type": "GDExtensionConstTypePtr"
},
{
"name": "p_right",
"type": "GDExtensionConstTypePtr"
},
{
"name": "r_result",
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionPtrBuiltInMethod",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionTypePtr"
},
{
"name": "p_args",
"type": "const GDExtensionConstTypePtr*"
},
{
"name": "r_return",
"type": "GDExtensionTypePtr"
},
{
"name": "p_argument_count",
"type": "int"
}
]
},
{
"name": "GDExtensionPtrConstructor",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionUninitializedTypePtr"
},
{
"name": "p_args",
"type": "const GDExtensionConstTypePtr*"
}
]
},
{
"name": "GDExtensionPtrDestructor",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionPtrSetter",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionTypePtr"
},
{
"name": "p_value",
"type": "GDExtensionConstTypePtr"
}
]
},
{
"name": "GDExtensionPtrGetter",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionConstTypePtr"
},
{
"name": "r_value",
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionPtrIndexedSetter",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionTypePtr"
},
{
"name": "p_index",
"type": "GDExtensionInt"
},
{
"name": "p_value",
"type": "GDExtensionConstTypePtr"
}
]
},
{
"name": "GDExtensionPtrIndexedGetter",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionConstTypePtr"
},
{
"name": "p_index",
"type": "GDExtensionInt"
},
{
"name": "r_value",
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionPtrKeyedSetter",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionTypePtr"
},
{
"name": "p_key",
"type": "GDExtensionConstTypePtr"
},
{
"name": "p_value",
"type": "GDExtensionConstTypePtr"
}
]
},
{
"name": "GDExtensionPtrKeyedGetter",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionConstTypePtr"
},
{
"name": "p_key",
"type": "GDExtensionConstTypePtr"
},
{
"name": "r_value",
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionPtrKeyedChecker",
"kind": "function",
"return_value": {
"type": "uint32_t"
},
"arguments": [
{
"name": "p_base",
"type": "GDExtensionConstVariantPtr"
},
{
"name": "p_key",
"type": "GDExtensionConstVariantPtr"
}
]
},
{
"name": "GDExtensionPtrUtilityFunction",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_return",
"type": "GDExtensionTypePtr"
},
{
"name": "p_args",
"type": "const GDExtensionConstTypePtr*"
},
{
"name": "p_argument_count",
"type": "int"
}
]
},
{
"name": "GDExtensionClassConstructor",
"kind": "function",
"return_value": {
"type": "GDExtensionObjectPtr"
},
"arguments": []
},
{
"name": "GDExtensionInstanceBindingCreateCallback",
"kind": "function",
"return_value": {
"type": "void*"
},
"arguments": [
{
"name": "p_token",
"type": "void*"
},
{
"name": "p_instance",
"type": "void*"
}
]
},
{
"name": "GDExtensionInstanceBindingFreeCallback",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_token",
"type": "void*"
},
{
"name": "p_instance",
"type": "void*"
},
{
"name": "p_binding",
"type": "void*"
}
]
},
{
"name": "GDExtensionInstanceBindingReferenceCallback",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_token",
"type": "void*"
},
{
"name": "p_binding",
"type": "void*"
},
{
"name": "p_reference",
"type": "GDExtensionBool"
}
]
},
{
"name": "GDExtensionInstanceBindingCallbacks",
"kind": "struct",
"members": [
{
"name": "create_callback",
"type": "GDExtensionInstanceBindingCreateCallback"
},
{
"name": "free_callback",
"type": "GDExtensionInstanceBindingFreeCallback"
},
{
"name": "reference_callback",
"type": "GDExtensionInstanceBindingReferenceCallback"
}
]
},
{
"name": "GDExtensionClassInstancePtr",
"kind": "handle"
},
{
"name": "GDExtensionClassSet",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "p_value",
"type": "GDExtensionConstVariantPtr"
}
]
},
{
"name": "GDExtensionClassGet",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "r_ret",
"type": "GDExtensionVariantPtr"
}
]
},
{
"name": "GDExtensionClassGetRID",
"kind": "function",
"return_value": {
"type": "uint64_t"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
}
]
},
{
"name": "GDExtensionPropertyInfo",
"kind": "struct",
"members": [
{
"name": "type",
"type": "GDExtensionVariantType"
},
{
"name": "name",
"type": "GDExtensionStringNamePtr"
},
{
"name": "class_name",
"type": "GDExtensionStringNamePtr"
},
{
"name": "hint",
"type": "uint32_t",
"description": [
"Bitfield of `PropertyHint` (defined in `extension_api.json`)."
]
},
{
"name": "hint_string",
"type": "GDExtensionStringPtr"
},
{
"name": "usage",
"type": "uint32_t",
"description": [
"Bitfield of `PropertyUsageFlags` (defined in `extension_api.json`)."
]
}
]
},
{
"name": "GDExtensionMethodInfo",
"kind": "struct",
"members": [
{
"name": "name",
"type": "GDExtensionStringNamePtr"
},
{
"name": "return_value",
"type": "GDExtensionPropertyInfo"
},
{
"name": "flags",
"type": "uint32_t",
"description": [
"Bitfield of `GDExtensionClassMethodFlags`."
]
},
{
"name": "id",
"type": "int32_t"
},
{
"name": "argument_count",
"type": "uint32_t",
"description": [
"Arguments: `default_arguments` is an array of size `argument_count`."
]
},
{
"name": "arguments",
"type": "GDExtensionPropertyInfo*"
},
{
"name": "default_argument_count",
"type": "uint32_t",
"description": [
"Default arguments: `default_arguments` is an array of size `default_argument_count`."
]
},
{
"name": "default_arguments",
"type": "GDExtensionVariantPtr*"
}
]
},
{
"name": "GDExtensionClassGetPropertyList",
"kind": "function",
"return_value": {
"type": "const GDExtensionPropertyInfo*"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "r_count",
"type": "uint32_t*"
}
]
},
{
"name": "GDExtensionClassFreePropertyList",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_list",
"type": "const GDExtensionPropertyInfo*"
}
]
},
{
"name": "GDExtensionClassFreePropertyList2",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_list",
"type": "const GDExtensionPropertyInfo*"
},
{
"name": "p_count",
"type": "uint32_t"
}
]
},
{
"name": "GDExtensionClassPropertyCanRevert",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
}
]
},
{
"name": "GDExtensionClassPropertyGetRevert",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "r_ret",
"type": "GDExtensionVariantPtr"
}
]
},
{
"name": "GDExtensionClassValidateProperty",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_property",
"type": "GDExtensionPropertyInfo*"
}
]
},
{
"name": "GDExtensionClassNotification",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_what",
"type": "int32_t"
}
],
"deprecated": "Deprecated. Use GDExtensionClassNotification2 instead."
},
{
"name": "GDExtensionClassNotification2",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_what",
"type": "int32_t"
},
{
"name": "p_reversed",
"type": "GDExtensionBool"
}
]
},
{
"name": "GDExtensionClassToString",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "r_is_valid",
"type": "GDExtensionBool*"
},
{
"name": "p_out",
"type": "GDExtensionStringPtr"
}
]
},
{
"name": "GDExtensionClassReference",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
}
]
},
{
"name": "GDExtensionClassUnreference",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
}
]
},
{
"name": "GDExtensionClassCallVirtual",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_args",
"type": "const GDExtensionConstTypePtr*"
},
{
"name": "r_ret",
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionClassCreateInstance",
"kind": "function",
"return_value": {
"type": "GDExtensionObjectPtr"
},
"arguments": [
{
"name": "p_class_userdata",
"type": "void*"
}
]
},
{
"name": "GDExtensionClassCreateInstance2",
"kind": "function",
"return_value": {
"type": "GDExtensionObjectPtr"
},
"arguments": [
{
"name": "p_class_userdata",
"type": "void*"
},
{
"name": "p_notify_postinitialize",
"type": "GDExtensionBool"
}
]
},
{
"name": "GDExtensionClassFreeInstance",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_class_userdata",
"type": "void*"
},
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
}
]
},
{
"name": "GDExtensionClassRecreateInstance",
"kind": "function",
"return_value": {
"type": "GDExtensionClassInstancePtr"
},
"arguments": [
{
"name": "p_class_userdata",
"type": "void*"
},
{
"name": "p_object",
"type": "GDExtensionObjectPtr"
}
]
},
{
"name": "GDExtensionClassGetVirtual",
"kind": "function",
"return_value": {
"type": "GDExtensionClassCallVirtual"
},
"arguments": [
{
"name": "p_class_userdata",
"type": "void*"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
}
]
},
{
"name": "GDExtensionClassGetVirtual2",
"kind": "function",
"return_value": {
"type": "GDExtensionClassCallVirtual"
},
"arguments": [
{
"name": "p_class_userdata",
"type": "void*"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "p_hash",
"type": "uint32_t"
}
]
},
{
"name": "GDExtensionClassGetVirtualCallData",
"kind": "function",
"return_value": {
"type": "void*"
},
"arguments": [
{
"name": "p_class_userdata",
"type": "void*"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
}
]
},
{
"name": "GDExtensionClassGetVirtualCallData2",
"kind": "function",
"return_value": {
"type": "void*"
},
"arguments": [
{
"name": "p_class_userdata",
"type": "void*"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "p_hash",
"type": "uint32_t"
}
]
},
{
"name": "GDExtensionClassCallVirtualWithData",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "p_virtual_call_userdata",
"type": "void*"
},
{
"name": "p_args",
"type": "const GDExtensionConstTypePtr*"
},
{
"name": "r_ret",
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionClassCreationInfo",
"kind": "struct",
"members": [
{
"name": "is_virtual",
"type": "GDExtensionBool"
},
{
"name": "is_abstract",
"type": "GDExtensionBool"
},
{
"name": "set_func",
"type": "GDExtensionClassSet"
},
{
"name": "get_func",
"type": "GDExtensionClassGet"
},
{
"name": "get_property_list_func",
"type": "GDExtensionClassGetPropertyList"
},
{
"name": "free_property_list_func",
"type": "GDExtensionClassFreePropertyList"
},
{
"name": "property_can_revert_func",
"type": "GDExtensionClassPropertyCanRevert"
},
{
"name": "property_get_revert_func",
"type": "GDExtensionClassPropertyGetRevert"
},
{
"name": "notification_func",
"type": "GDExtensionClassNotification"
},
{
"name": "to_string_func",
"type": "GDExtensionClassToString"
},
{
"name": "reference_func",
"type": "GDExtensionClassReference"
},
{
"name": "unreference_func",
"type": "GDExtensionClassUnreference"
},
{
"name": "create_instance_func",
"type": "GDExtensionClassCreateInstance",
"description": [
"(Default) constructor; mandatory. If the class is not instantiable, consider making it virtual or abstract."
]
},
{
"name": "free_instance_func",
"type": "GDExtensionClassFreeInstance",
"description": [
"Destructor; mandatory."
]
},
{
"name": "get_virtual_func",
"type": "GDExtensionClassGetVirtual",
"description": [
"Queries a virtual function by name and returns a callback to invoke the requested virtual function."
]
},
{
"name": "get_rid_func",
"type": "GDExtensionClassGetRID"
},
{
"name": "class_userdata",
"type": "void*",
"description": [
"Per-class user data, later accessible in instance bindings."
]
}
],
"deprecated": "Deprecated. Use GDExtensionClassCreationInfo4 instead."
},
{
"name": "GDExtensionClassCreationInfo2",
"kind": "struct",
"members": [
{
"name": "is_virtual",
"type": "GDExtensionBool"
},
{
"name": "is_abstract",
"type": "GDExtensionBool"
},
{
"name": "is_exposed",
"type": "GDExtensionBool"
},
{
"name": "set_func",
"type": "GDExtensionClassSet"
},
{
"name": "get_func",
"type": "GDExtensionClassGet"
},
{
"name": "get_property_list_func",
"type": "GDExtensionClassGetPropertyList"
},
{
"name": "free_property_list_func",
"type": "GDExtensionClassFreePropertyList"
},
{
"name": "property_can_revert_func",
"type": "GDExtensionClassPropertyCanRevert"
},
{
"name": "property_get_revert_func",
"type": "GDExtensionClassPropertyGetRevert"
},
{
"name": "validate_property_func",
"type": "GDExtensionClassValidateProperty"
},
{
"name": "notification_func",
"type": "GDExtensionClassNotification2"
},
{
"name": "to_string_func",
"type": "GDExtensionClassToString"
},
{
"name": "reference_func",
"type": "GDExtensionClassReference"
},
{
"name": "unreference_func",
"type": "GDExtensionClassUnreference"
},
{
"name": "create_instance_func",
"type": "GDExtensionClassCreateInstance",
"description": [
"(Default) constructor; mandatory. If the class is not instantiable, consider making it virtual or abstract."
]
},
{
"name": "free_instance_func",
"type": "GDExtensionClassFreeInstance",
"description": [
"Destructor; mandatory."
]
},
{
"name": "recreate_instance_func",
"type": "GDExtensionClassRecreateInstance"
},
{
"name": "get_virtual_func",
"type": "GDExtensionClassGetVirtual",
"description": [
"Queries a virtual function by name and returns a callback to invoke the requested virtual function."
]
},
{
"name": "get_virtual_call_data_func",
"type": "GDExtensionClassGetVirtualCallData",
"description": [
"Paired with `call_virtual_with_data_func`, this is an alternative to `get_virtual_func` for extensions that",
"need or benefit from extra data when calling virtual functions.",
"Returns user data that will be passed to `call_virtual_with_data_func`.",
"Returning `NULL` from this function signals to Godot that the virtual function is not overridden.",
"Data returned from this function should be managed by the extension and must be valid until the extension is deinitialized.",
"You should supply either `get_virtual_func`, or `get_virtual_call_data_func` with `call_virtual_with_data_func`."
]
},
{
"name": "call_virtual_with_data_func",
"type": "GDExtensionClassCallVirtualWithData",
"description": [
"Used to call virtual functions when `get_virtual_call_data_func` is not null."
]
},
{
"name": "get_rid_func",
"type": "GDExtensionClassGetRID"
},
{
"name": "class_userdata",
"type": "void*",
"description": [
"Per-class user data, later accessible in instance bindings."
]
}
],
"deprecated": "Deprecated. Use GDExtensionClassCreationInfo4 instead."
},
{
"name": "GDExtensionClassCreationInfo3",
"kind": "struct",
"members": [
{
"name": "is_virtual",
"type": "GDExtensionBool"
},
{
"name": "is_abstract",
"type": "GDExtensionBool"
},
{
"name": "is_exposed",
"type": "GDExtensionBool"
},
{
"name": "is_runtime",
"type": "GDExtensionBool"
},
{
"name": "set_func",
"type": "GDExtensionClassSet"
},
{
"name": "get_func",
"type": "GDExtensionClassGet"
},
{
"name": "get_property_list_func",
"type": "GDExtensionClassGetPropertyList"
},
{
"name": "free_property_list_func",
"type": "GDExtensionClassFreePropertyList2"
},
{
"name": "property_can_revert_func",
"type": "GDExtensionClassPropertyCanRevert"
},
{
"name": "property_get_revert_func",
"type": "GDExtensionClassPropertyGetRevert"
},
{
"name": "validate_property_func",
"type": "GDExtensionClassValidateProperty"
},
{
"name": "notification_func",
"type": "GDExtensionClassNotification2"
},
{
"name": "to_string_func",
"type": "GDExtensionClassToString"
},
{
"name": "reference_func",
"type": "GDExtensionClassReference"
},
{
"name": "unreference_func",
"type": "GDExtensionClassUnreference"
},
{
"name": "create_instance_func",
"type": "GDExtensionClassCreateInstance",
"description": [
"(Default) constructor; mandatory. If the class is not instantiable, consider making it virtual or abstract."
]
},
{
"name": "free_instance_func",
"type": "GDExtensionClassFreeInstance",
"description": [
"Destructor; mandatory."
]
},
{
"name": "recreate_instance_func",
"type": "GDExtensionClassRecreateInstance"
},
{
"name": "get_virtual_func",
"type": "GDExtensionClassGetVirtual",
"description": [
"Queries a virtual function by name and returns a callback to invoke the requested virtual function."
]
},
{
"name": "get_virtual_call_data_func",
"type": "GDExtensionClassGetVirtualCallData",
"description": [
"Paired with `call_virtual_with_data_func`, this is an alternative to `get_virtual_func` for extensions that",
"need or benefit from extra data when calling virtual functions.",
"Returns user data that will be passed to `call_virtual_with_data_func`.",
"Returning `NULL` from this function signals to Godot that the virtual function is not overridden.",
"Data returned from this function should be managed by the extension and must be valid until the extension is deinitialized.",
"You should supply either `get_virtual_func`, or `get_virtual_call_data_func` with `call_virtual_with_data_func`."
]
},
{
"name": "call_virtual_with_data_func",
"type": "GDExtensionClassCallVirtualWithData",
"description": [
"Used to call virtual functions when `get_virtual_call_data_func` is not null."
]
},
{
"name": "get_rid_func",
"type": "GDExtensionClassGetRID"
},
{
"name": "class_userdata",
"type": "void*",
"description": [
"Per-class user data, later accessible in instance bindings."
]
}
],
"deprecated": "Deprecated. Use GDExtensionClassCreationInfo4 instead."
},
{
"name": "GDExtensionClassCreationInfo4",
"kind": "struct",
"members": [
{
"name": "is_virtual",
"type": "GDExtensionBool"
},
{
"name": "is_abstract",
"type": "GDExtensionBool"
},
{
"name": "is_exposed",
"type": "GDExtensionBool"
},
{
"name": "is_runtime",
"type": "GDExtensionBool"
},
{
"name": "icon_path",
"type": "GDExtensionConstStringPtr"
},
{
"name": "set_func",
"type": "GDExtensionClassSet"
},
{
"name": "get_func",
"type": "GDExtensionClassGet"
},
{
"name": "get_property_list_func",
"type": "GDExtensionClassGetPropertyList"
},
{
"name": "free_property_list_func",
"type": "GDExtensionClassFreePropertyList2"
},
{
"name": "property_can_revert_func",
"type": "GDExtensionClassPropertyCanRevert"
},
{
"name": "property_get_revert_func",
"type": "GDExtensionClassPropertyGetRevert"
},
{
"name": "validate_property_func",
"type": "GDExtensionClassValidateProperty"
},
{
"name": "notification_func",
"type": "GDExtensionClassNotification2"
},
{
"name": "to_string_func",
"type": "GDExtensionClassToString"
},
{
"name": "reference_func",
"type": "GDExtensionClassReference"
},
{
"name": "unreference_func",
"type": "GDExtensionClassUnreference"
},
{
"name": "create_instance_func",
"type": "GDExtensionClassCreateInstance2",
"description": [
"(Default) constructor; mandatory. If the class is not instantiable, consider making it virtual or abstract."
]
},
{
"name": "free_instance_func",
"type": "GDExtensionClassFreeInstance",
"description": [
"Destructor; mandatory."
]
},
{
"name": "recreate_instance_func",
"type": "GDExtensionClassRecreateInstance"
},
{
"name": "get_virtual_func",
"type": "GDExtensionClassGetVirtual2",
"description": [
"Queries a virtual function by name and returns a callback to invoke the requested virtual function."
]
},
{
"name": "get_virtual_call_data_func",
"type": "GDExtensionClassGetVirtualCallData2",
"description": [
"Paired with `call_virtual_with_data_func`, this is an alternative to `get_virtual_func` for extensions that",
"need or benefit from extra data when calling virtual functions.",
"Returns user data that will be passed to `call_virtual_with_data_func`.",
"Returning `NULL` from this function signals to Godot that the virtual function is not overridden.",
"Data returned from this function should be managed by the extension and must be valid until the extension is deinitialized.",
"You should supply either `get_virtual_func`, or `get_virtual_call_data_func` with `call_virtual_with_data_func`."
]
},
{
"name": "call_virtual_with_data_func",
"type": "GDExtensionClassCallVirtualWithData",
"description": [
"Used to call virtual functions when `get_virtual_call_data_func` is not null."
]
},
{
"name": "class_userdata",
"type": "void*",
"description": [
"Per-class user data, later accessible in instance bindings."
]
}
]
},
{
"name": "GDExtensionClassCreationInfo5",
"kind": "alias",
"type": "GDExtensionClassCreationInfo4"
},
{
"name": "GDExtensionClassLibraryPtr",
"kind": "handle"
},
{
"name": "GDExtensionEditorGetClassesUsedCallback",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_packed_string_array",
"type": "GDExtensionTypePtr"
}
],
"description": [
"Passed a pointer to a PackedStringArray that should be filled with the classes that may be used by the GDExtension."
]
},
{
"name": "GDExtensionClassMethodFlags",
"kind": "enum",
"values": [
{
"name": "GDEXTENSION_METHOD_FLAG_NORMAL",
"value": 1
},
{
"name": "GDEXTENSION_METHOD_FLAG_EDITOR",
"value": 2
},
{
"name": "GDEXTENSION_METHOD_FLAG_CONST",
"value": 4
},
{
"name": "GDEXTENSION_METHOD_FLAG_VIRTUAL",
"value": 8
},
{
"name": "GDEXTENSION_METHOD_FLAG_VARARG",
"value": 16
},
{
"name": "GDEXTENSION_METHOD_FLAG_STATIC",
"value": 32
},
{
"name": "GDEXTENSION_METHOD_FLAG_VIRTUAL_REQUIRED",
"value": 128
},
{
"name": "GDEXTENSION_METHOD_FLAGS_DEFAULT",
"value": 1
}
]
},
{
"name": "GDExtensionClassMethodArgumentMetadata",
"kind": "enum",
"values": [
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_NONE",
"value": 0
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_INT8",
"value": 1
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_INT16",
"value": 2
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_INT32",
"value": 3
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_INT64",
"value": 4
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_UINT8",
"value": 5
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_UINT16",
"value": 6
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_UINT32",
"value": 7
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_UINT64",
"value": 8
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_REAL_IS_FLOAT",
"value": 9
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_REAL_IS_DOUBLE",
"value": 10
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_CHAR16",
"value": 11
},
{
"name": "GDEXTENSION_METHOD_ARGUMENT_METADATA_INT_IS_CHAR32",
"value": 12
}
]
},
{
"name": "GDExtensionClassMethodCall",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "method_userdata",
"type": "void*"
},
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*"
},
{
"name": "p_argument_count",
"type": "GDExtensionInt"
},
{
"name": "r_return",
"type": "GDExtensionVariantPtr"
},
{
"name": "r_error",
"type": "GDExtensionCallError*"
}
]
},
{
"name": "GDExtensionClassMethodValidatedCall",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "method_userdata",
"type": "void*"
},
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*"
},
{
"name": "r_return",
"type": "GDExtensionVariantPtr"
}
]
},
{
"name": "GDExtensionClassMethodPtrCall",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "method_userdata",
"type": "void*"
},
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr"
},
{
"name": "p_args",
"type": "const GDExtensionConstTypePtr*"
},
{
"name": "r_ret",
"type": "GDExtensionTypePtr"
}
]
},
{
"name": "GDExtensionClassMethodInfo",
"kind": "struct",
"members": [
{
"name": "name",
"type": "GDExtensionStringNamePtr"
},
{
"name": "method_userdata",
"type": "void*"
},
{
"name": "call_func",
"type": "GDExtensionClassMethodCall"
},
{
"name": "ptrcall_func",
"type": "GDExtensionClassMethodPtrCall"
},
{
"name": "method_flags",
"type": "uint32_t",
"description": [
"Bitfield of `GDExtensionClassMethodFlags`."
]
},
{
"name": "has_return_value",
"type": "GDExtensionBool",
"description": [
"If `has_return_value` is false, `return_value_info` and `return_value_metadata` are ignored.",
"",
"@todo Consider dropping `has_return_value` and making the other two properties match `GDExtensionMethodInfo` and `GDExtensionClassVirtualMethod` for consistency in future version of this struct."
]
},
{
"name": "return_value_info",
"type": "GDExtensionPropertyInfo*"
},
{
"name": "return_value_metadata",
"type": "GDExtensionClassMethodArgumentMetadata"
},
{
"name": "argument_count",
"type": "uint32_t",
"description": [
"Arguments: `arguments_info` and `arguments_metadata` are array of size `argument_count`.",
"Name and hint information for the argument can be omitted in release builds. Class name should always be present if it applies.",
"",
"@todo Consider renaming `arguments_info` to `arguments` for consistency in future version of this struct."
]
},
{
"name": "arguments_info",
"type": "GDExtensionPropertyInfo*"
},
{
"name": "arguments_metadata",
"type": "GDExtensionClassMethodArgumentMetadata*"
},
{
"name": "default_argument_count",
"type": "uint32_t",
"description": [
"Default arguments: `default_arguments` is an array of size `default_argument_count`."
]
},
{
"name": "default_arguments",
"type": "GDExtensionVariantPtr*"
}
]
},
{
"name": "GDExtensionClassVirtualMethodInfo",
"kind": "struct",
"members": [
{
"name": "name",
"type": "GDExtensionStringNamePtr"
},
{
"name": "method_flags",
"type": "uint32_t",
"description": [
"Bitfield of `GDExtensionClassMethodFlags`."
]
},
{
"name": "return_value",
"type": "GDExtensionPropertyInfo"
},
{
"name": "return_value_metadata",
"type": "GDExtensionClassMethodArgumentMetadata"
},
{
"name": "argument_count",
"type": "uint32_t"
},
{
"name": "arguments",
"type": "GDExtensionPropertyInfo*"
},
{
"name": "arguments_metadata",
"type": "GDExtensionClassMethodArgumentMetadata*"
}
]
},
{
"name": "GDExtensionCallableCustomCall",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "callable_userdata",
"type": "void*"
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*"
},
{
"name": "p_argument_count",
"type": "GDExtensionInt"
},
{
"name": "r_return",
"type": "GDExtensionVariantPtr"
},
{
"name": "r_error",
"type": "GDExtensionCallError*"
}
]
},
{
"name": "GDExtensionCallableCustomIsValid",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "callable_userdata",
"type": "void*"
}
]
},
{
"name": "GDExtensionCallableCustomFree",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "callable_userdata",
"type": "void*"
}
]
},
{
"name": "GDExtensionCallableCustomHash",
"kind": "function",
"return_value": {
"type": "uint32_t"
},
"arguments": [
{
"name": "callable_userdata",
"type": "void*"
}
]
},
{
"name": "GDExtensionCallableCustomEqual",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "callable_userdata_a",
"type": "void*"
},
{
"name": "callable_userdata_b",
"type": "void*"
}
]
},
{
"name": "GDExtensionCallableCustomLessThan",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "callable_userdata_a",
"type": "void*"
},
{
"name": "callable_userdata_b",
"type": "void*"
}
]
},
{
"name": "GDExtensionCallableCustomToString",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "callable_userdata",
"type": "void*"
},
{
"name": "r_is_valid",
"type": "GDExtensionBool*"
},
{
"name": "r_out",
"type": "GDExtensionStringPtr"
}
]
},
{
"name": "GDExtensionCallableCustomGetArgumentCount",
"kind": "function",
"return_value": {
"type": "GDExtensionInt"
},
"arguments": [
{
"name": "callable_userdata",
"type": "void*"
},
{
"name": "r_is_valid",
"type": "GDExtensionBool*"
}
]
},
{
"name": "GDExtensionCallableCustomInfo",
"kind": "struct",
"members": [
{
"name": "callable_userdata",
"type": "void*"
},
{
"name": "token",
"type": "void*"
},
{
"name": "object_id",
"type": "GDObjectInstanceID"
},
{
"name": "call_func",
"type": "GDExtensionCallableCustomCall"
},
{
"name": "is_valid_func",
"type": "GDExtensionCallableCustomIsValid"
},
{
"name": "free_func",
"type": "GDExtensionCallableCustomFree"
},
{
"name": "hash_func",
"type": "GDExtensionCallableCustomHash"
},
{
"name": "equal_func",
"type": "GDExtensionCallableCustomEqual"
},
{
"name": "less_than_func",
"type": "GDExtensionCallableCustomLessThan"
},
{
"name": "to_string_func",
"type": "GDExtensionCallableCustomToString"
}
],
"description": [
"Only `call_func` and `token` are strictly required, however, `object_id` should be passed if its not a static method.",
"",
"`token` should point to an address that uniquely identifies the GDExtension (for example, the",
"`GDExtensionClassLibraryPtr` passed to the entry symbol function.",
"",
"`hash_func`, `equal_func`, and `less_than_func` are optional. If not provided both `call_func` and",
"`callable_userdata` together are used as the identity of the callable for hashing and comparison purposes.",
"",
"The hash returned by `hash_func` is cached, `hash_func` will not be called more than once per callable.",
"",
"`is_valid_func` is necessary if the validity of the callable can change before destruction.",
"",
"`free_func` is necessary if `callable_userdata` needs to be cleaned up when the callable is freed."
],
"deprecated": "Deprecated. Use GDExtensionCallableCustomInfo2 instead."
},
{
"name": "GDExtensionCallableCustomInfo2",
"kind": "struct",
"members": [
{
"name": "callable_userdata",
"type": "void*"
},
{
"name": "token",
"type": "void*"
},
{
"name": "object_id",
"type": "GDObjectInstanceID"
},
{
"name": "call_func",
"type": "GDExtensionCallableCustomCall"
},
{
"name": "is_valid_func",
"type": "GDExtensionCallableCustomIsValid"
},
{
"name": "free_func",
"type": "GDExtensionCallableCustomFree"
},
{
"name": "hash_func",
"type": "GDExtensionCallableCustomHash"
},
{
"name": "equal_func",
"type": "GDExtensionCallableCustomEqual"
},
{
"name": "less_than_func",
"type": "GDExtensionCallableCustomLessThan"
},
{
"name": "to_string_func",
"type": "GDExtensionCallableCustomToString"
},
{
"name": "get_argument_count_func",
"type": "GDExtensionCallableCustomGetArgumentCount"
}
],
"description": [
"Only `call_func` and `token` are strictly required, however, `object_id` should be passed if its not a static method.",
"",
"`token` should point to an address that uniquely identifies the GDExtension (for example, the",
"`GDExtensionClassLibraryPtr` passed to the entry symbol function.",
"",
"`hash_func`, `equal_func`, and `less_than_func` are optional. If not provided both `call_func` and",
"`callable_userdata` together are used as the identity of the callable for hashing and comparison purposes.",
"",
"The hash returned by `hash_func` is cached, `hash_func` will not be called more than once per callable.",
"",
"`is_valid_func` is necessary if the validity of the callable can change before destruction.",
"",
"`free_func` is necessary if `callable_userdata` needs to be cleaned up when the callable is freed."
]
},
{
"name": "GDExtensionScriptInstanceDataPtr",
"kind": "handle",
"description": [
"Pointer to custom ScriptInstance native implementation."
]
},
{
"name": "GDExtensionScriptInstanceSet",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "p_value",
"type": "GDExtensionConstVariantPtr"
}
]
},
{
"name": "GDExtensionScriptInstanceGet",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "r_ret",
"type": "GDExtensionVariantPtr"
}
]
},
{
"name": "GDExtensionScriptInstanceGetPropertyList",
"kind": "function",
"return_value": {
"type": "const GDExtensionPropertyInfo*"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "r_count",
"type": "uint32_t*"
}
]
},
{
"name": "GDExtensionScriptInstanceFreePropertyList",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_list",
"type": "const GDExtensionPropertyInfo*"
}
],
"deprecated": "Deprecated. Use GDExtensionScriptInstanceFreePropertyList2 instead."
},
{
"name": "GDExtensionScriptInstanceFreePropertyList2",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_list",
"type": "const GDExtensionPropertyInfo*"
},
{
"name": "p_count",
"type": "uint32_t"
}
]
},
{
"name": "GDExtensionScriptInstanceGetClassCategory",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_class_category",
"type": "GDExtensionPropertyInfo*"
}
]
},
{
"name": "GDExtensionScriptInstanceGetPropertyType",
"kind": "function",
"return_value": {
"type": "GDExtensionVariantType"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "r_is_valid",
"type": "GDExtensionBool*"
}
]
},
{
"name": "GDExtensionScriptInstanceValidateProperty",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_property",
"type": "GDExtensionPropertyInfo*"
}
]
},
{
"name": "GDExtensionScriptInstancePropertyCanRevert",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
}
]
},
{
"name": "GDExtensionScriptInstancePropertyGetRevert",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "r_ret",
"type": "GDExtensionVariantPtr"
}
]
},
{
"name": "GDExtensionScriptInstanceGetOwner",
"kind": "function",
"return_value": {
"type": "GDExtensionObjectPtr"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
}
]
},
{
"name": "GDExtensionScriptInstancePropertyStateAdd",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "p_value",
"type": "GDExtensionConstVariantPtr"
},
{
"name": "p_userdata",
"type": "void*"
}
]
},
{
"name": "GDExtensionScriptInstanceGetPropertyState",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_add_func",
"type": "GDExtensionScriptInstancePropertyStateAdd"
},
{
"name": "p_userdata",
"type": "void*"
}
]
},
{
"name": "GDExtensionScriptInstanceGetMethodList",
"kind": "function",
"return_value": {
"type": "const GDExtensionMethodInfo*"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "r_count",
"type": "uint32_t*"
}
]
},
{
"name": "GDExtensionScriptInstanceFreeMethodList",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_list",
"type": "const GDExtensionMethodInfo*"
}
],
"deprecated": "Deprecated. Use GDExtensionScriptInstanceFreeMethodList2 instead."
},
{
"name": "GDExtensionScriptInstanceFreeMethodList2",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_list",
"type": "const GDExtensionMethodInfo*"
},
{
"name": "p_count",
"type": "uint32_t"
}
]
},
{
"name": "GDExtensionScriptInstanceHasMethod",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
}
]
},
{
"name": "GDExtensionScriptInstanceGetMethodArgumentCount",
"kind": "function",
"return_value": {
"type": "GDExtensionInt"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "r_is_valid",
"type": "GDExtensionBool*"
}
]
},
{
"name": "GDExtensionScriptInstanceCall",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_method",
"type": "GDExtensionConstStringNamePtr"
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*"
},
{
"name": "p_argument_count",
"type": "GDExtensionInt"
},
{
"name": "r_return",
"type": "GDExtensionVariantPtr"
},
{
"name": "r_error",
"type": "GDExtensionCallError*"
}
]
},
{
"name": "GDExtensionScriptInstanceNotification",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_what",
"type": "int32_t"
}
],
"deprecated": "Deprecated. Use GDExtensionScriptInstanceNotification2 instead."
},
{
"name": "GDExtensionScriptInstanceNotification2",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "p_what",
"type": "int32_t"
},
{
"name": "p_reversed",
"type": "GDExtensionBool"
}
]
},
{
"name": "GDExtensionScriptInstanceToString",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
},
{
"name": "r_is_valid",
"type": "GDExtensionBool*"
},
{
"name": "r_out",
"type": "GDExtensionStringPtr"
}
]
},
{
"name": "GDExtensionScriptInstanceRefCountIncremented",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
}
]
},
{
"name": "GDExtensionScriptInstanceRefCountDecremented",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
}
]
},
{
"name": "GDExtensionScriptInstanceGetScript",
"kind": "function",
"return_value": {
"type": "GDExtensionObjectPtr"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
}
]
},
{
"name": "GDExtensionScriptInstanceIsPlaceholder",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
}
]
},
{
"name": "GDExtensionScriptLanguagePtr",
"kind": "handle"
},
{
"name": "GDExtensionScriptInstanceGetLanguage",
"kind": "function",
"return_value": {
"type": "GDExtensionScriptLanguagePtr"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
}
]
},
{
"name": "GDExtensionScriptInstanceFree",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionScriptInstanceDataPtr"
}
]
},
{
"name": "GDExtensionScriptInstancePtr",
"kind": "handle",
"description": [
"Pointer to ScriptInstance."
]
},
{
"name": "GDExtensionScriptInstanceInfo",
"kind": "struct",
"members": [
{
"name": "set_func",
"type": "GDExtensionScriptInstanceSet"
},
{
"name": "get_func",
"type": "GDExtensionScriptInstanceGet"
},
{
"name": "get_property_list_func",
"type": "GDExtensionScriptInstanceGetPropertyList"
},
{
"name": "free_property_list_func",
"type": "GDExtensionScriptInstanceFreePropertyList"
},
{
"name": "property_can_revert_func",
"type": "GDExtensionScriptInstancePropertyCanRevert"
},
{
"name": "property_get_revert_func",
"type": "GDExtensionScriptInstancePropertyGetRevert"
},
{
"name": "get_owner_func",
"type": "GDExtensionScriptInstanceGetOwner"
},
{
"name": "get_property_state_func",
"type": "GDExtensionScriptInstanceGetPropertyState"
},
{
"name": "get_method_list_func",
"type": "GDExtensionScriptInstanceGetMethodList"
},
{
"name": "free_method_list_func",
"type": "GDExtensionScriptInstanceFreeMethodList"
},
{
"name": "get_property_type_func",
"type": "GDExtensionScriptInstanceGetPropertyType"
},
{
"name": "has_method_func",
"type": "GDExtensionScriptInstanceHasMethod"
},
{
"name": "call_func",
"type": "GDExtensionScriptInstanceCall"
},
{
"name": "notification_func",
"type": "GDExtensionScriptInstanceNotification"
},
{
"name": "to_string_func",
"type": "GDExtensionScriptInstanceToString"
},
{
"name": "refcount_incremented_func",
"type": "GDExtensionScriptInstanceRefCountIncremented"
},
{
"name": "refcount_decremented_func",
"type": "GDExtensionScriptInstanceRefCountDecremented"
},
{
"name": "get_script_func",
"type": "GDExtensionScriptInstanceGetScript"
},
{
"name": "is_placeholder_func",
"type": "GDExtensionScriptInstanceIsPlaceholder"
},
{
"name": "set_fallback_func",
"type": "GDExtensionScriptInstanceSet"
},
{
"name": "get_fallback_func",
"type": "GDExtensionScriptInstanceGet"
},
{
"name": "get_language_func",
"type": "GDExtensionScriptInstanceGetLanguage"
},
{
"name": "free_func",
"type": "GDExtensionScriptInstanceFree"
}
],
"deprecated": "Deprecated. Use GDExtensionScriptInstanceInfo3 instead."
},
{
"name": "GDExtensionScriptInstanceInfo2",
"kind": "struct",
"members": [
{
"name": "set_func",
"type": "GDExtensionScriptInstanceSet"
},
{
"name": "get_func",
"type": "GDExtensionScriptInstanceGet"
},
{
"name": "get_property_list_func",
"type": "GDExtensionScriptInstanceGetPropertyList"
},
{
"name": "free_property_list_func",
"type": "GDExtensionScriptInstanceFreePropertyList"
},
{
"name": "get_class_category_func",
"type": "GDExtensionScriptInstanceGetClassCategory",
"description": [
"Optional. Set to NULL for the default behavior."
]
},
{
"name": "property_can_revert_func",
"type": "GDExtensionScriptInstancePropertyCanRevert"
},
{
"name": "property_get_revert_func",
"type": "GDExtensionScriptInstancePropertyGetRevert"
},
{
"name": "get_owner_func",
"type": "GDExtensionScriptInstanceGetOwner"
},
{
"name": "get_property_state_func",
"type": "GDExtensionScriptInstanceGetPropertyState"
},
{
"name": "get_method_list_func",
"type": "GDExtensionScriptInstanceGetMethodList"
},
{
"name": "free_method_list_func",
"type": "GDExtensionScriptInstanceFreeMethodList"
},
{
"name": "get_property_type_func",
"type": "GDExtensionScriptInstanceGetPropertyType"
},
{
"name": "validate_property_func",
"type": "GDExtensionScriptInstanceValidateProperty"
},
{
"name": "has_method_func",
"type": "GDExtensionScriptInstanceHasMethod"
},
{
"name": "call_func",
"type": "GDExtensionScriptInstanceCall"
},
{
"name": "notification_func",
"type": "GDExtensionScriptInstanceNotification2"
},
{
"name": "to_string_func",
"type": "GDExtensionScriptInstanceToString"
},
{
"name": "refcount_incremented_func",
"type": "GDExtensionScriptInstanceRefCountIncremented"
},
{
"name": "refcount_decremented_func",
"type": "GDExtensionScriptInstanceRefCountDecremented"
},
{
"name": "get_script_func",
"type": "GDExtensionScriptInstanceGetScript"
},
{
"name": "is_placeholder_func",
"type": "GDExtensionScriptInstanceIsPlaceholder"
},
{
"name": "set_fallback_func",
"type": "GDExtensionScriptInstanceSet"
},
{
"name": "get_fallback_func",
"type": "GDExtensionScriptInstanceGet"
},
{
"name": "get_language_func",
"type": "GDExtensionScriptInstanceGetLanguage"
},
{
"name": "free_func",
"type": "GDExtensionScriptInstanceFree"
}
],
"deprecated": "Deprecated. Use GDExtensionScriptInstanceInfo3 instead."
},
{
"name": "GDExtensionScriptInstanceInfo3",
"kind": "struct",
"members": [
{
"name": "set_func",
"type": "GDExtensionScriptInstanceSet"
},
{
"name": "get_func",
"type": "GDExtensionScriptInstanceGet"
},
{
"name": "get_property_list_func",
"type": "GDExtensionScriptInstanceGetPropertyList"
},
{
"name": "free_property_list_func",
"type": "GDExtensionScriptInstanceFreePropertyList2"
},
{
"name": "get_class_category_func",
"type": "GDExtensionScriptInstanceGetClassCategory",
"description": [
"Optional. Set to NULL for the default behavior."
]
},
{
"name": "property_can_revert_func",
"type": "GDExtensionScriptInstancePropertyCanRevert"
},
{
"name": "property_get_revert_func",
"type": "GDExtensionScriptInstancePropertyGetRevert"
},
{
"name": "get_owner_func",
"type": "GDExtensionScriptInstanceGetOwner"
},
{
"name": "get_property_state_func",
"type": "GDExtensionScriptInstanceGetPropertyState"
},
{
"name": "get_method_list_func",
"type": "GDExtensionScriptInstanceGetMethodList"
},
{
"name": "free_method_list_func",
"type": "GDExtensionScriptInstanceFreeMethodList2"
},
{
"name": "get_property_type_func",
"type": "GDExtensionScriptInstanceGetPropertyType"
},
{
"name": "validate_property_func",
"type": "GDExtensionScriptInstanceValidateProperty"
},
{
"name": "has_method_func",
"type": "GDExtensionScriptInstanceHasMethod"
},
{
"name": "get_method_argument_count_func",
"type": "GDExtensionScriptInstanceGetMethodArgumentCount"
},
{
"name": "call_func",
"type": "GDExtensionScriptInstanceCall"
},
{
"name": "notification_func",
"type": "GDExtensionScriptInstanceNotification2"
},
{
"name": "to_string_func",
"type": "GDExtensionScriptInstanceToString"
},
{
"name": "refcount_incremented_func",
"type": "GDExtensionScriptInstanceRefCountIncremented"
},
{
"name": "refcount_decremented_func",
"type": "GDExtensionScriptInstanceRefCountDecremented"
},
{
"name": "get_script_func",
"type": "GDExtensionScriptInstanceGetScript"
},
{
"name": "is_placeholder_func",
"type": "GDExtensionScriptInstanceIsPlaceholder"
},
{
"name": "set_fallback_func",
"type": "GDExtensionScriptInstanceSet"
},
{
"name": "get_fallback_func",
"type": "GDExtensionScriptInstanceGet"
},
{
"name": "get_language_func",
"type": "GDExtensionScriptInstanceGetLanguage"
},
{
"name": "free_func",
"type": "GDExtensionScriptInstanceFree"
}
]
},
{
"name": "GDExtensionWorkerThreadPoolGroupTask",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "",
"type": "void*"
},
{
"type": "uint32_t"
}
]
},
{
"name": "GDExtensionWorkerThreadPoolTask",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "",
"type": "void*"
}
]
},
{
"name": "GDExtensionInitializationLevel",
"kind": "enum",
"values": [
{
"name": "GDEXTENSION_INITIALIZATION_CORE",
"value": 0
},
{
"name": "GDEXTENSION_INITIALIZATION_SERVERS",
"value": 1
},
{
"name": "GDEXTENSION_INITIALIZATION_SCENE",
"value": 2
},
{
"name": "GDEXTENSION_INITIALIZATION_EDITOR",
"value": 3
},
{
"name": "GDEXTENSION_MAX_INITIALIZATION_LEVEL",
"value": 4
}
]
},
{
"name": "GDExtensionInitializeCallback",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_userdata",
"type": "void*"
},
{
"name": "p_level",
"type": "GDExtensionInitializationLevel"
}
]
},
{
"name": "GDExtensionDeinitializeCallback",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_userdata",
"type": "void*"
},
{
"name": "p_level",
"type": "GDExtensionInitializationLevel"
}
]
},
{
"name": "GDExtensionInitialization",
"kind": "struct",
"members": [
{
"name": "minimum_initialization_level",
"type": "GDExtensionInitializationLevel",
"description": [
"Minimum initialization level required.",
"If Core or Servers, the extension needs editor or game restart to take effect"
]
},
{
"name": "userdata",
"type": "void*",
"description": [
"Up to the user to supply when initializing"
]
},
{
"name": "initialize",
"type": "GDExtensionInitializeCallback",
"description": [
"This function will be called multiple times for each initialization level."
]
},
{
"name": "deinitialize",
"type": "GDExtensionDeinitializeCallback"
}
]
},
{
"name": "GDExtensionInterfaceFunctionPtr",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": []
},
{
"name": "GDExtensionInterfaceGetProcAddress",
"kind": "function",
"return_value": {
"type": "GDExtensionInterfaceFunctionPtr"
},
"arguments": [
{
"name": "p_function_name",
"type": "const char*"
}
]
},
{
"name": "GDExtensionInitializationFunction",
"kind": "function",
"return_value": {
"type": "GDExtensionBool"
},
"arguments": [
{
"name": "p_get_proc_address",
"type": "GDExtensionInterfaceGetProcAddress"
},
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr"
},
{
"name": "r_initialization",
"type": "GDExtensionInitialization*"
}
],
"description": [
"Each GDExtension should define a C function that matches the signature of GDExtensionInitializationFunction,",
"and export it so that it can be loaded via dlopen() or equivalent for the given platform.",
"",
"For example:",
"",
" GDExtensionBool my_extension_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization);",
"",
"This function's name must be specified as the 'entry_symbol' in the .gdextension file.",
"",
"This makes it the entry point of the GDExtension and will be called on initialization.",
"",
"The GDExtension can then modify the r_initialization structure, setting the minimum initialization level,",
"and providing pointers to functions that will be called at various stages of initialization/shutdown.",
"",
"The rest of the GDExtension's interface to Godot consists of function pointers that can be loaded",
"by calling p_get_proc_address(\"...\") with the name of the function.",
"",
"For example:",
"",
" GDExtensionInterfaceGetGodotVersion get_godot_version = (GDExtensionInterfaceGetGodotVersion)p_get_proc_address(\"get_godot_version\");",
"",
"(Note that snippet may cause \"cast between incompatible function types\" on some compilers, you can",
"silence this by adding an intermediary `void*` cast.)",
"",
"You can then call it like a normal function:",
"",
" GDExtensionGodotVersion godot_version;",
" get_godot_version(&godot_version);",
" printf(\"Godot v%d.%d.%d\\n\", godot_version.major, godot_version.minor, godot_version.patch);",
"",
"All of these interface functions are described below, together with the name that's used to load it,",
"and the function pointer typedef that shows its signature."
]
},
{
"name": "GDExtensionGodotVersion",
"kind": "struct",
"members": [
{
"name": "major",
"type": "uint32_t"
},
{
"name": "minor",
"type": "uint32_t"
},
{
"name": "patch",
"type": "uint32_t"
},
{
"name": "string",
"type": "const char*"
}
]
},
{
"name": "GDExtensionGodotVersion2",
"kind": "struct",
"members": [
{
"name": "major",
"type": "uint32_t"
},
{
"name": "minor",
"type": "uint32_t"
},
{
"name": "patch",
"type": "uint32_t"
},
{
"name": "hex",
"type": "uint32_t",
"description": [
"Full version encoded as hexadecimal with one byte (2 hex digits) per number (e.g. for \"3.1.12\" it would be 0x03010C)"
]
},
{
"name": "status",
"type": "const char*",
"description": [
"(e.g. \"stable\", \"beta\", \"rc1\", \"rc2\")"
]
},
{
"name": "build",
"type": "const char*",
"description": [
"(e.g. \"custom_build\")"
]
},
{
"name": "hash",
"type": "const char*",
"description": [
"Full Git commit hash."
]
},
{
"name": "timestamp",
"type": "uint64_t",
"description": [
"Git commit date UNIX timestamp in seconds, or 0 if unavailable."
]
},
{
"name": "string",
"type": "const char*",
"description": [
"(e.g. \"Godot v3.1.4.stable.official.mono\")"
]
}
]
},
{
"name": "GDExtensionMainLoopStartupCallback",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [],
"description": [
"Called when starting the main loop."
]
},
{
"name": "GDExtensionMainLoopShutdownCallback",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [],
"description": [
"Called when shutting down the main loop."
]
},
{
"name": "GDExtensionMainLoopFrameCallback",
"kind": "function",
"return_value": {
"type": "void"
},
"arguments": [],
"description": [
"Called for every frame iteration of the main loop."
]
},
{
"name": "GDExtensionMainLoopCallbacks",
"kind": "struct",
"members": [
{
"name": "startup_func",
"type": "GDExtensionMainLoopStartupCallback",
"description": [
"Will be called after Godot is started and is fully initialized."
]
},
{
"name": "shutdown_func",
"type": "GDExtensionMainLoopShutdownCallback",
"description": [
"Will be called before Godot is shutdown when it is still fully initialized."
]
},
{
"name": "frame_func",
"type": "GDExtensionMainLoopFrameCallback",
"description": [
"Will be called for each process frame. This will run after all `_process()` methods on Node, and before `ScriptServer::frame()`.",
"This is intended to be the equivalent of `ScriptLanguage::frame()` for GDExtension language bindings that don't use the script API."
]
}
]
}
],
"interface": [
{
"name": "get_godot_version",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_godot_version",
"type": "GDExtensionGodotVersion*",
"description": [
"A pointer to the structure to write the version information into."
]
}
],
"description": [
"Gets the Godot version that the GDExtension was loaded into."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.5. Use `get_godot_version2` instead."
},
{
"name": "get_godot_version2",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_godot_version",
"type": "GDExtensionGodotVersion2*",
"description": [
"A pointer to the structure to write the version information into."
]
}
],
"description": [
"Gets the Godot version that the GDExtension was loaded into."
],
"since": "4.5"
},
{
"name": "mem_alloc",
"return_value": {
"type": "void*",
"description": [
"A pointer to the allocated memory, or NULL if unsuccessful."
]
},
"arguments": [
{
"name": "p_bytes",
"type": "size_t",
"description": [
"The amount of memory to allocate in bytes."
]
}
],
"description": [
"Allocates memory."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.6. Use `mem_alloc2` instead."
},
{
"name": "mem_realloc",
"return_value": {
"type": "void*",
"description": [
"A pointer to the allocated memory, or NULL if unsuccessful."
]
},
"arguments": [
{
"name": "p_ptr",
"type": "void*",
"description": [
"A pointer to the previously allocated memory."
]
},
{
"name": "p_bytes",
"type": "size_t",
"description": [
"The number of bytes to resize the memory block to."
]
}
],
"description": [
"Reallocates memory."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.6. Use `mem_realloc2` instead."
},
{
"name": "mem_free",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_ptr",
"type": "void*",
"description": [
"A pointer to the previously allocated memory."
]
}
],
"description": [
"Frees memory."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.6. Use `mem_free2` instead."
},
{
"name": "mem_alloc2",
"return_value": {
"type": "void*",
"description": [
"A pointer to the allocated memory, or NULL if unsuccessful."
]
},
"arguments": [
{
"name": "p_bytes",
"type": "size_t",
"description": [
"The amount of memory to allocate in bytes."
]
},
{
"name": "p_pad_align",
"type": "GDExtensionBool",
"description": [
"If true, the returned memory will have prepadding of at least 8 bytes."
]
}
],
"description": [
"Allocates memory."
],
"since": "4.6"
},
{
"name": "mem_realloc2",
"return_value": {
"type": "void*",
"description": [
"A pointer to the allocated memory, or NULL if unsuccessful."
]
},
"arguments": [
{
"name": "p_ptr",
"type": "void*",
"description": [
"A pointer to the previously allocated memory."
]
},
{
"name": "p_bytes",
"type": "size_t",
"description": [
"The number of bytes to resize the memory block to."
]
},
{
"name": "p_pad_align",
"type": "GDExtensionBool",
"description": [
"If true, the returned memory will have prepadding of at least 8 bytes."
]
}
],
"description": [
"Reallocates memory."
],
"since": "4.6"
},
{
"name": "mem_free2",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_ptr",
"type": "void*",
"description": [
"A pointer to the previously allocated memory."
]
},
{
"name": "p_pad_align",
"type": "GDExtensionBool",
"description": [
"If true, the given memory was allocated with prepadding."
]
}
],
"description": [
"Frees memory."
],
"since": "4.6"
},
{
"name": "print_error",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_description",
"type": "const char*",
"description": [
"The code triggering the error."
]
},
{
"name": "p_function",
"type": "const char*",
"description": [
"The function name where the error occurred."
]
},
{
"name": "p_file",
"type": "const char*",
"description": [
"The file where the error occurred."
]
},
{
"name": "p_line",
"type": "int32_t",
"description": [
"The line where the error occurred."
]
},
{
"name": "p_editor_notify",
"type": "GDExtensionBool",
"description": [
"Whether or not to notify the editor."
]
}
],
"description": [
"Logs an error to Godot's built-in debugger and to the OS terminal."
],
"since": "4.1"
},
{
"name": "print_error_with_message",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_description",
"type": "const char*",
"description": [
"The code triggering the error."
]
},
{
"name": "p_message",
"type": "const char*",
"description": [
"The message to show along with the error."
]
},
{
"name": "p_function",
"type": "const char*",
"description": [
"The function name where the error occurred."
]
},
{
"name": "p_file",
"type": "const char*",
"description": [
"The file where the error occurred."
]
},
{
"name": "p_line",
"type": "int32_t",
"description": [
"The line where the error occurred."
]
},
{
"name": "p_editor_notify",
"type": "GDExtensionBool",
"description": [
"Whether or not to notify the editor."
]
}
],
"description": [
"Logs an error with a message to Godot's built-in debugger and to the OS terminal."
],
"since": "4.1"
},
{
"name": "print_warning",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_description",
"type": "const char*",
"description": [
"The code triggering the warning."
]
},
{
"name": "p_function",
"type": "const char*",
"description": [
"The function name where the warning occurred."
]
},
{
"name": "p_file",
"type": "const char*",
"description": [
"The file where the warning occurred."
]
},
{
"name": "p_line",
"type": "int32_t",
"description": [
"The line where the warning occurred."
]
},
{
"name": "p_editor_notify",
"type": "GDExtensionBool",
"description": [
"Whether or not to notify the editor."
]
}
],
"description": [
"Logs a warning to Godot's built-in debugger and to the OS terminal."
],
"since": "4.1"
},
{
"name": "print_warning_with_message",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_description",
"type": "const char*",
"description": [
"The code triggering the warning."
]
},
{
"name": "p_message",
"type": "const char*",
"description": [
"The message to show along with the warning."
]
},
{
"name": "p_function",
"type": "const char*",
"description": [
"The function name where the warning occurred."
]
},
{
"name": "p_file",
"type": "const char*",
"description": [
"The file where the warning occurred."
]
},
{
"name": "p_line",
"type": "int32_t",
"description": [
"The line where the warning occurred."
]
},
{
"name": "p_editor_notify",
"type": "GDExtensionBool",
"description": [
"Whether or not to notify the editor."
]
}
],
"description": [
"Logs a warning with a message to Godot's built-in debugger and to the OS terminal."
],
"since": "4.1"
},
{
"name": "print_script_error",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_description",
"type": "const char*",
"description": [
"The code triggering the error."
]
},
{
"name": "p_function",
"type": "const char*",
"description": [
"The function name where the error occurred."
]
},
{
"name": "p_file",
"type": "const char*",
"description": [
"The file where the error occurred."
]
},
{
"name": "p_line",
"type": "int32_t",
"description": [
"The line where the error occurred."
]
},
{
"name": "p_editor_notify",
"type": "GDExtensionBool",
"description": [
"Whether or not to notify the editor."
]
}
],
"description": [
"Logs a script error to Godot's built-in debugger and to the OS terminal."
],
"since": "4.1"
},
{
"name": "print_script_error_with_message",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_description",
"type": "const char*",
"description": [
"The code triggering the error."
]
},
{
"name": "p_message",
"type": "const char*",
"description": [
"The message to show along with the error."
]
},
{
"name": "p_function",
"type": "const char*",
"description": [
"The function name where the error occurred."
]
},
{
"name": "p_file",
"type": "const char*",
"description": [
"The file where the error occurred."
]
},
{
"name": "p_line",
"type": "int32_t",
"description": [
"The line where the error occurred."
]
},
{
"name": "p_editor_notify",
"type": "GDExtensionBool",
"description": [
"Whether or not to notify the editor."
]
}
],
"description": [
"Logs a script error with a message to Godot's built-in debugger and to the OS terminal."
],
"since": "4.1"
},
{
"name": "get_native_struct_size",
"return_value": {
"type": "uint64_t",
"description": [
"The size in bytes."
]
},
"arguments": [
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName identifying the struct name."
]
}
],
"description": [
"Gets the size of a native struct (ex. ObjectID) in bytes."
],
"since": "4.1"
},
{
"name": "variant_new_copy",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to the destination Variant."
]
},
{
"name": "p_src",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the source Variant."
]
}
],
"description": [
"Copies one Variant into a another."
],
"since": "4.1"
},
{
"name": "variant_new_nil",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to the destination Variant."
]
}
],
"description": [
"Creates a new Variant containing nil."
],
"since": "4.1"
},
{
"name": "variant_destroy",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to the Variant to destroy."
]
}
],
"description": [
"Destroys a Variant."
],
"since": "4.1"
},
{
"name": "variant_call",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_method",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName identifying the method."
]
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*",
"description": [
"A pointer to a C array of Variant."
]
},
{
"name": "p_argument_count",
"type": "GDExtensionInt",
"description": [
"The number of arguments."
]
},
{
"name": "r_return",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer a Variant which will be assigned the return value."
]
},
{
"name": "r_error",
"type": "GDExtensionCallError*",
"description": [
"A pointer the structure which will hold error information."
]
}
],
"description": [
"Calls a method on a Variant."
],
"since": "4.1",
"see": [
"Variant::callp()"
]
},
{
"name": "variant_call_static",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The variant type."
]
},
{
"name": "p_method",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName identifying the method."
]
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*",
"description": [
"A pointer to a C array of Variant."
]
},
{
"name": "p_argument_count",
"type": "GDExtensionInt",
"description": [
"The number of arguments."
]
},
{
"name": "r_return",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer a Variant which will be assigned the return value."
]
},
{
"name": "r_error",
"type": "GDExtensionCallError*",
"description": [
"A pointer the structure which will be updated with error information."
]
}
],
"description": [
"Calls a static method on a Variant."
],
"since": "4.1",
"see": [
"Variant::call_static()"
]
},
{
"name": "variant_evaluate",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_op",
"type": "GDExtensionVariantOperator",
"description": [
"The operator to evaluate."
]
},
{
"name": "p_a",
"type": "GDExtensionConstVariantPtr",
"description": [
"The first Variant."
]
},
{
"name": "p_b",
"type": "GDExtensionConstVariantPtr",
"description": [
"The second Variant."
]
},
{
"name": "r_return",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer a Variant which will be assigned the return value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Evaluate an operator on two Variants."
],
"since": "4.1",
"see": [
"Variant::evaluate()"
]
},
{
"name": "variant_set",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_key",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the key."
]
},
{
"name": "p_value",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Sets a key on a Variant to a value."
],
"since": "4.1",
"see": [
"Variant::set()"
]
},
{
"name": "variant_set_named",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_key",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName representing the key."
]
},
{
"name": "p_value",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Sets a named key on a Variant to a value."
],
"since": "4.1",
"see": [
"Variant::set_named()"
]
},
{
"name": "variant_set_keyed",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_key",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the key."
]
},
{
"name": "p_value",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Sets a keyed property on a Variant to a value."
],
"since": "4.1",
"see": [
"Variant::set_keyed()"
]
},
{
"name": "variant_set_indexed",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index."
]
},
{
"name": "p_value",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
},
{
"name": "r_oob",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to true if the index is out of bounds."
]
}
],
"description": [
"Sets an index on a Variant to a value."
],
"since": "4.1"
},
{
"name": "variant_get",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_key",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the key."
]
},
{
"name": "r_ret",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to a Variant which will be assigned the value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Gets the value of a key from a Variant."
],
"since": "4.1"
},
{
"name": "variant_get_named",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_key",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName representing the key."
]
},
{
"name": "r_ret",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to a Variant which will be assigned the value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Gets the value of a named key from a Variant."
],
"since": "4.1"
},
{
"name": "variant_get_keyed",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_key",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the key."
]
},
{
"name": "r_ret",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to a Variant which will be assigned the value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Gets the value of a keyed property from a Variant."
],
"since": "4.1"
},
{
"name": "variant_get_indexed",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index."
]
},
{
"name": "r_ret",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to a Variant which will be assigned the value."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
},
{
"name": "r_oob",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to true if the index is out of bounds."
]
}
],
"description": [
"Gets the value of an index from a Variant."
],
"since": "4.1"
},
{
"name": "variant_iter_init",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if the operation is valid; otherwise false."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "r_iter",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to a Variant which will be assigned the iterator."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Initializes an iterator over a Variant."
],
"since": "4.1",
"see": [
"Variant::iter_init()"
]
},
{
"name": "variant_iter_next",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if the operation is valid; otherwise false."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "r_iter",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to a Variant which will be assigned the iterator."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Gets the next value for an iterator over a Variant."
],
"since": "4.1",
"see": [
"Variant::iter_next()"
]
},
{
"name": "variant_iter_get",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "r_iter",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to a Variant which will be assigned the iterator."
]
},
{
"name": "r_ret",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to a Variant which will be assigned false if the operation is invalid."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the operation is invalid."
]
}
],
"description": [
"Gets the next value for an iterator over a Variant."
],
"since": "4.1",
"see": [
"Variant::iter_get()"
]
},
{
"name": "variant_hash",
"return_value": {
"type": "GDExtensionInt",
"description": [
"The hash value."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
}
],
"description": [
"Gets the hash of a Variant."
],
"since": "4.1",
"see": [
"Variant::hash()"
]
},
{
"name": "variant_recursive_hash",
"return_value": {
"type": "GDExtensionInt",
"description": [
"The hash value."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_recursion_count",
"type": "GDExtensionInt",
"description": [
"The number of recursive loops so far."
]
}
],
"description": [
"Gets the recursive hash of a Variant."
],
"since": "4.1",
"see": [
"Variant::recursive_hash()"
]
},
{
"name": "variant_hash_compare",
"return_value": {
"type": "GDExtensionBool",
"description": [
"The hash value."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_other",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the other Variant to compare it to."
]
}
],
"description": [
"Compares two Variants by their hash."
],
"since": "4.1",
"see": [
"Variant::hash_compare()"
]
},
{
"name": "variant_booleanize",
"return_value": {
"type": "GDExtensionBool",
"description": [
"The boolean value of the Variant."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
}
],
"description": [
"Converts a Variant to a boolean."
],
"since": "4.1"
},
{
"name": "variant_duplicate",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "r_ret",
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to a Variant to store the duplicated value."
]
},
{
"name": "p_deep",
"type": "GDExtensionBool",
"description": [
"Whether or not to duplicate deeply (when supported by the Variant type)."
]
}
],
"description": [
"Duplicates a Variant."
],
"since": "4.1"
},
{
"name": "variant_stringify",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "r_ret",
"type": "GDExtensionStringPtr",
"description": [
"A pointer to a String to store the resulting value."
]
}
],
"description": [
"Converts a Variant to a string."
],
"since": "4.1"
},
{
"name": "variant_get_type",
"return_value": {
"type": "GDExtensionVariantType",
"description": [
"The variant type."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
}
],
"description": [
"Gets the type of a Variant."
],
"since": "4.1"
},
{
"name": "variant_has_method",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if the variant has the given method; otherwise false."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_method",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the method name."
]
}
],
"description": [
"Checks if a Variant has the given method."
],
"since": "4.1"
},
{
"name": "variant_has_member",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if the variant has the given method; otherwise false."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
},
{
"name": "p_member",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the member name."
]
}
],
"description": [
"Checks if a type of Variant has the given member."
],
"since": "4.1"
},
{
"name": "variant_has_key",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if the key exists; otherwise false."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
},
{
"name": "p_key",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the key."
]
},
{
"name": "r_valid",
"type": "GDExtensionBool*",
"description": [
"A pointer to a boolean which will be set to false if the key doesn't exist."
]
}
],
"description": [
"Checks if a Variant has a key."
],
"since": "4.1"
},
{
"name": "variant_get_object_instance_id",
"return_value": {
"type": "GDObjectInstanceID",
"description": [
"The instance ID for the contained object."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to the Variant."
]
}
],
"description": [
"Gets the object instance ID from a variant of type GDEXTENSION_VARIANT_TYPE_OBJECT.",
"If the variant isn't of type GDEXTENSION_VARIANT_TYPE_OBJECT, then zero will be returned.",
"The instance ID will be returned even if the object is no longer valid - use `object_get_instance_by_id()` to check if the object is still valid."
],
"since": "4.4"
},
{
"name": "variant_get_type_name",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
},
{
"name": "r_name",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a String to store the Variant type name."
]
}
],
"description": [
"Gets the name of a Variant type."
],
"since": "4.1"
},
{
"name": "variant_can_convert",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if the conversion is possible; otherwise false."
]
},
"arguments": [
{
"name": "p_from",
"type": "GDExtensionVariantType",
"description": [
"The Variant type to convert from."
]
},
{
"name": "p_to",
"type": "GDExtensionVariantType",
"description": [
"The Variant type to convert to."
]
}
],
"description": [
"Checks if Variants can be converted from one type to another."
],
"since": "4.1"
},
{
"name": "variant_can_convert_strict",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if the conversion is possible; otherwise false."
]
},
"arguments": [
{
"name": "p_from",
"type": "GDExtensionVariantType",
"description": [
"The Variant type to convert from."
]
},
{
"name": "p_to",
"type": "GDExtensionVariantType",
"description": [
"The Variant type to convert to."
]
}
],
"description": [
"Checks if Variant can be converted from one type to another using stricter rules."
],
"since": "4.1"
},
{
"name": "get_variant_from_type_constructor",
"return_value": {
"type": "GDExtensionVariantFromTypeConstructorFunc",
"description": [
"A pointer to a function that can create a Variant of the given type from a raw value."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Gets a pointer to a function that can create a Variant of the given type from a raw value."
],
"since": "4.1"
},
{
"name": "get_variant_to_type_constructor",
"return_value": {
"type": "GDExtensionTypeFromVariantConstructorFunc",
"description": [
"A pointer to a function that can get the raw value from a Variant of the given type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Gets a pointer to a function that can get the raw value from a Variant of the given type."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_internal_getter",
"return_value": {
"type": "GDExtensionVariantGetInternalPtrFunc",
"description": [
"A pointer to a type-specific function that returns a pointer to the internal value of a variant. Check the implementation of this function (gdextension_variant_get_ptr_internal_getter) for pointee type info of each variant type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Provides a function pointer for retrieving a pointer to a variant's internal value.",
"Access to a variant's internal value can be used to modify it in-place, or to retrieve its value without the overhead of variant conversion functions.",
"It is recommended to cache the getter for all variant types in a function table to avoid retrieval overhead upon use.",
"",
"Each function assumes the variant's type has already been determined and matches the function.",
"Invoking the function with a variant of a mismatched type has undefined behavior, and may lead to a segmentation fault."
],
"since": "4.4",
"legacy_type_name": "GDExtensionInterfaceGetVariantGetInternalPtrFunc"
},
{
"name": "variant_get_ptr_operator_evaluator",
"return_value": {
"type": "GDExtensionPtrOperatorEvaluator",
"description": [
"A pointer to a function that can evaluate the given Variant operator on the given Variant types."
]
},
"arguments": [
{
"name": "p_operator",
"type": "GDExtensionVariantOperator",
"description": [
"The variant operator."
]
},
{
"name": "p_type_a",
"type": "GDExtensionVariantType",
"description": [
"The type of the first Variant."
]
},
{
"name": "p_type_b",
"type": "GDExtensionVariantType",
"description": [
"The type of the second Variant."
]
}
],
"description": [
"Gets a pointer to a function that can evaluate the given Variant operator on the given Variant types."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_builtin_method",
"return_value": {
"type": "GDExtensionPtrBuiltInMethod",
"description": [
"A pointer to a function that can call a builtin method on a type of Variant."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
},
{
"name": "p_method",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the method name."
]
},
{
"name": "p_hash",
"type": "GDExtensionInt",
"description": [
"A hash representing the method signature."
]
}
],
"description": [
"Gets a pointer to a function that can call a builtin method on a type of Variant."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_constructor",
"return_value": {
"type": "GDExtensionPtrConstructor",
"description": [
"A pointer to a function that can call one of the constructors for a type of Variant."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
},
{
"name": "p_constructor",
"type": "int32_t",
"description": [
"The index of the constructor."
]
}
],
"description": [
"Gets a pointer to a function that can call one of the constructors for a type of Variant."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_destructor",
"return_value": {
"type": "GDExtensionPtrDestructor",
"description": [
"A pointer to a function than can call the destructor for a type of Variant."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Gets a pointer to a function than can call the destructor for a type of Variant."
],
"since": "4.1"
},
{
"name": "variant_construct",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
},
{
"name": "r_base",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to a Variant to store the constructed value."
]
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*",
"description": [
"A pointer to a C array of Variant pointers representing the arguments for the constructor."
]
},
{
"name": "p_argument_count",
"type": "int32_t",
"description": [
"The number of arguments to pass to the constructor."
]
},
{
"name": "r_error",
"type": "GDExtensionCallError*",
"description": [
"A pointer the structure which will be updated with error information."
]
}
],
"description": [
"Constructs a Variant of the given type, using the first constructor that matches the given arguments."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_setter",
"return_value": {
"type": "GDExtensionPtrSetter",
"description": [
"A pointer to a function that can call a member's setter on the given Variant type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
},
{
"name": "p_member",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the member name."
]
}
],
"description": [
"Gets a pointer to a function that can call a member's setter on the given Variant type."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_getter",
"return_value": {
"type": "GDExtensionPtrGetter",
"description": [
"A pointer to a function that can call a member's getter on the given Variant type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
},
{
"name": "p_member",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the member name."
]
}
],
"description": [
"Gets a pointer to a function that can call a member's getter on the given Variant type."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_indexed_setter",
"return_value": {
"type": "GDExtensionPtrIndexedSetter",
"description": [
"A pointer to a function that can set an index on the given Variant type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Gets a pointer to a function that can set an index on the given Variant type."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_indexed_getter",
"return_value": {
"type": "GDExtensionPtrIndexedGetter",
"description": [
"A pointer to a function that can get an index on the given Variant type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Gets a pointer to a function that can get an index on the given Variant type."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_keyed_setter",
"return_value": {
"type": "GDExtensionPtrKeyedSetter",
"description": [
"A pointer to a function that can set a key on the given Variant type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Gets a pointer to a function that can set a key on the given Variant type."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_keyed_getter",
"return_value": {
"type": "GDExtensionPtrKeyedGetter",
"description": [
"A pointer to a function that can get a key on the given Variant type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Gets a pointer to a function that can get a key on the given Variant type."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_keyed_checker",
"return_value": {
"type": "GDExtensionPtrKeyedChecker",
"description": [
"A pointer to a function that can check a key on the given Variant type."
]
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
}
],
"description": [
"Gets a pointer to a function that can check a key on the given Variant type."
],
"since": "4.1"
},
{
"name": "variant_get_constant_value",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The Variant type."
]
},
{
"name": "p_constant",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the constant name."
]
},
{
"name": "r_ret",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to a Variant to store the value."
]
}
],
"description": [
"Gets the value of a constant from the given Variant type."
],
"since": "4.1"
},
{
"name": "variant_get_ptr_utility_function",
"return_value": {
"type": "GDExtensionPtrUtilityFunction",
"description": [
"A pointer to a function that can call a Variant utility function."
]
},
"arguments": [
{
"name": "p_function",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the function name."
]
},
{
"name": "p_hash",
"type": "GDExtensionInt",
"description": [
"A hash representing the function signature."
]
}
],
"description": [
"Gets a pointer to a function that can call a Variant utility function."
],
"since": "4.1"
},
{
"name": "string_new_with_latin1_chars",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char*",
"description": [
"A pointer to a Latin-1 encoded C string (null terminated)."
]
}
],
"description": [
"Creates a String from a Latin-1 encoded C string."
],
"since": "4.1"
},
{
"name": "string_new_with_utf8_chars",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char*",
"description": [
"A pointer to a UTF-8 encoded C string (null terminated)."
]
}
],
"description": [
"Creates a String from a UTF-8 encoded C string."
],
"since": "4.1"
},
{
"name": "string_new_with_utf16_chars",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char16_t*",
"description": [
"A pointer to a UTF-16 encoded C string (null terminated)."
]
}
],
"description": [
"Creates a String from a UTF-16 encoded C string."
],
"since": "4.1"
},
{
"name": "string_new_with_utf32_chars",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char32_t*",
"description": [
"A pointer to a UTF-32 encoded C string (null terminated)."
]
}
],
"description": [
"Creates a String from a UTF-32 encoded C string."
],
"since": "4.1"
},
{
"name": "string_new_with_wide_chars",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const wchar_t*",
"description": [
"A pointer to a wide C string (null terminated)."
]
}
],
"description": [
"Creates a String from a wide C string."
],
"since": "4.1"
},
{
"name": "string_new_with_latin1_chars_and_len",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char*",
"description": [
"A pointer to a Latin-1 encoded C string."
]
},
{
"name": "p_size",
"type": "GDExtensionInt",
"description": [
"The number of characters (= number of bytes)."
]
}
],
"description": [
"Creates a String from a Latin-1 encoded C string with the given length."
],
"since": "4.1"
},
{
"name": "string_new_with_utf8_chars_and_len",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char*",
"description": [
"A pointer to a UTF-8 encoded C string."
]
},
{
"name": "p_size",
"type": "GDExtensionInt",
"description": [
"The number of bytes (not code units)."
]
}
],
"description": [
"Creates a String from a UTF-8 encoded C string with the given length."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.3. Use `string_new_with_utf8_chars_and_len2` instead."
},
{
"name": "string_new_with_utf8_chars_and_len2",
"return_value": {
"type": "GDExtensionInt",
"description": [
"Error code signifying if the operation successful."
]
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char*",
"description": [
"A pointer to a UTF-8 encoded C string."
]
},
{
"name": "p_size",
"type": "GDExtensionInt",
"description": [
"The number of bytes (not code units)."
]
}
],
"description": [
"Creates a String from a UTF-8 encoded C string with the given length."
],
"since": "4.3"
},
{
"name": "string_new_with_utf16_chars_and_len",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char16_t*",
"description": [
"A pointer to a UTF-16 encoded C string."
]
},
{
"name": "p_char_count",
"type": "GDExtensionInt",
"description": [
"The number of characters (not bytes)."
]
}
],
"description": [
"Creates a String from a UTF-16 encoded C string with the given length."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.3. Use `string_new_with_utf16_chars_and_len2` instead."
},
{
"name": "string_new_with_utf16_chars_and_len2",
"return_value": {
"type": "GDExtensionInt",
"description": [
"Error code signifying if the operation successful."
]
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char16_t*",
"description": [
"A pointer to a UTF-16 encoded C string."
]
},
{
"name": "p_char_count",
"type": "GDExtensionInt",
"description": [
"The number of characters (not bytes)."
]
},
{
"name": "p_default_little_endian",
"type": "GDExtensionBool",
"description": [
"If true, UTF-16 use little endian."
]
}
],
"description": [
"Creates a String from a UTF-16 encoded C string with the given length."
],
"since": "4.3"
},
{
"name": "string_new_with_utf32_chars_and_len",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const char32_t*",
"description": [
"A pointer to a UTF-32 encoded C string."
]
},
{
"name": "p_char_count",
"type": "GDExtensionInt",
"description": [
"The number of characters (not bytes)."
]
}
],
"description": [
"Creates a String from a UTF-32 encoded C string with the given length."
],
"since": "4.1"
},
{
"name": "string_new_with_wide_chars_and_len",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a Variant to hold the newly created String."
]
},
{
"name": "p_contents",
"type": "const wchar_t*",
"description": [
"A pointer to a wide C string."
]
},
{
"name": "p_char_count",
"type": "GDExtensionInt",
"description": [
"The number of characters (not bytes)."
]
}
],
"description": [
"Creates a String from a wide C string with the given length."
],
"since": "4.1"
},
{
"name": "string_to_latin1_chars",
"return_value": {
"type": "GDExtensionInt",
"description": [
"The resulting encoded string length in characters (not bytes), not including a null terminator."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "r_text",
"type": "char*",
"description": [
"A pointer to the buffer to hold the resulting data. If NULL is passed in, only the length will be computed."
]
},
{
"name": "p_max_write_length",
"type": "GDExtensionInt",
"description": [
"The maximum number of characters that can be written to r_text. It has no affect on the return value."
]
}
],
"description": [
"Converts a String to a Latin-1 encoded C string.",
"It doesn't write a null terminator."
],
"since": "4.1"
},
{
"name": "string_to_utf8_chars",
"return_value": {
"type": "GDExtensionInt",
"description": [
"The resulting encoded string length in characters (not bytes), not including a null terminator."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "r_text",
"type": "char*",
"description": [
"A pointer to the buffer to hold the resulting data. If NULL is passed in, only the length will be computed."
]
},
{
"name": "p_max_write_length",
"type": "GDExtensionInt",
"description": [
"The maximum number of characters that can be written to r_text. It has no affect on the return value."
]
}
],
"description": [
"Converts a String to a UTF-8 encoded C string.",
"It doesn't write a null terminator."
],
"since": "4.1"
},
{
"name": "string_to_utf16_chars",
"return_value": {
"type": "GDExtensionInt",
"description": [
"The resulting encoded string length in characters (not bytes), not including a null terminator."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "r_text",
"type": "char16_t*",
"description": [
"A pointer to the buffer to hold the resulting data. If NULL is passed in, only the length will be computed."
]
},
{
"name": "p_max_write_length",
"type": "GDExtensionInt",
"description": [
"The maximum number of characters that can be written to r_text. It has no affect on the return value."
]
}
],
"description": [
"Converts a String to a UTF-16 encoded C string.",
"It doesn't write a null terminator."
],
"since": "4.1"
},
{
"name": "string_to_utf32_chars",
"return_value": {
"type": "GDExtensionInt",
"description": [
"The resulting encoded string length in characters (not bytes), not including a null terminator."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "r_text",
"type": "char32_t*",
"description": [
"A pointer to the buffer to hold the resulting data. If NULL is passed in, only the length will be computed."
]
},
{
"name": "p_max_write_length",
"type": "GDExtensionInt",
"description": [
"The maximum number of characters that can be written to r_text. It has no affect on the return value."
]
}
],
"description": [
"Converts a String to a UTF-32 encoded C string.",
"It doesn't write a null terminator."
],
"since": "4.1"
},
{
"name": "string_to_wide_chars",
"return_value": {
"type": "GDExtensionInt",
"description": [
"The resulting encoded string length in characters (not bytes), not including a null terminator."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "r_text",
"type": "wchar_t*",
"description": [
"A pointer to the buffer to hold the resulting data. If NULL is passed in, only the length will be computed."
]
},
{
"name": "p_max_write_length",
"type": "GDExtensionInt",
"description": [
"The maximum number of characters that can be written to r_text. It has no affect on the return value."
]
}
],
"description": [
"Converts a String to a wide C string.",
"It doesn't write a null terminator."
],
"since": "4.1"
},
{
"name": "string_operator_index",
"return_value": {
"type": "char32_t*",
"description": [
"A pointer to the requested character."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index."
]
}
],
"description": [
"Gets a pointer to the character at the given index from a String."
],
"since": "4.1"
},
{
"name": "string_operator_index_const",
"return_value": {
"type": "const char32_t*",
"description": [
"A const pointer to the requested character."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index."
]
}
],
"description": [
"Gets a const pointer to the character at the given index from a String."
],
"since": "4.1"
},
{
"name": "string_operator_plus_eq_string",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "p_b",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to the other String to append."
]
}
],
"description": [
"Appends another String to a String."
],
"since": "4.1"
},
{
"name": "string_operator_plus_eq_char",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "p_b",
"type": "char32_t",
"description": [
"A pointer to the character to append."
]
}
],
"description": [
"Appends a character to a String."
],
"since": "4.1"
},
{
"name": "string_operator_plus_eq_cstr",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "p_b",
"type": "const char*",
"description": [
"A pointer to a Latin-1 encoded C string (null terminated)."
]
}
],
"description": [
"Appends a Latin-1 encoded C string to a String."
],
"since": "4.1"
},
{
"name": "string_operator_plus_eq_wcstr",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "p_b",
"type": "const wchar_t*",
"description": [
"A pointer to a wide C string (null terminated)."
]
}
],
"description": [
"Appends a wide C string to a String."
],
"since": "4.1"
},
{
"name": "string_operator_plus_eq_c32str",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "p_b",
"type": "const char32_t*",
"description": [
"A pointer to a UTF-32 encoded C string (null terminated)."
]
}
],
"description": [
"Appends a UTF-32 encoded C string to a String."
],
"since": "4.1"
},
{
"name": "string_resize",
"return_value": {
"type": "GDExtensionInt",
"description": [
"Error code signifying if the operation successful."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionStringPtr",
"description": [
"A pointer to the String."
]
},
{
"name": "p_resize",
"type": "GDExtensionInt",
"description": [
"The new length for the String."
]
}
],
"description": [
"Resizes the underlying string data to the given number of characters.",
"Space needs to be allocated for the null terminating character ('\\0') which",
"also must be added manually, in order for all string functions to work correctly.",
"",
"Warning: This is an error-prone operation - only use it if there's no other",
"efficient way to accomplish your goal."
],
"since": "4.2"
},
{
"name": "string_name_new_with_latin1_chars",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringNamePtr",
"description": [
"A pointer to uninitialized storage, into which the newly created StringName is constructed."
]
},
{
"name": "p_contents",
"type": "const char*",
"description": [
"A pointer to a C string (null terminated and Latin-1 or ASCII encoded)."
]
},
{
"name": "p_is_static",
"type": "GDExtensionBool",
"description": [
"Whether the StringName reuses the buffer directly (see above)."
]
}
],
"description": [
"Creates a StringName from a Latin-1 encoded C string.",
"If `p_is_static` is true, then:",
"- The StringName will reuse the `p_contents` buffer instead of copying it.",
"- You must guarantee that the buffer remains valid for the duration of the application (e.g. string literal).",
"- You must not call a destructor for this StringName. Incrementing the initial reference once should achieve this.",
"",
"`p_is_static` is purely an optimization and can easily introduce undefined behavior if used wrong. In case of doubt, set it to false."
],
"since": "4.2"
},
{
"name": "string_name_new_with_utf8_chars",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringNamePtr",
"description": [
"A pointer to uninitialized storage, into which the newly created StringName is constructed."
]
},
{
"name": "p_contents",
"type": "const char*",
"description": [
"A pointer to a C string (null terminated and UTF-8 encoded)."
]
}
],
"description": [
"Creates a StringName from a UTF-8 encoded C string."
],
"since": "4.2"
},
{
"name": "string_name_new_with_utf8_chars_and_len",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_dest",
"type": "GDExtensionUninitializedStringNamePtr",
"description": [
"A pointer to uninitialized storage, into which the newly created StringName is constructed."
]
},
{
"name": "p_contents",
"type": "const char*",
"description": [
"A pointer to a C string (null terminated and UTF-8 encoded)."
]
},
{
"name": "p_size",
"type": "GDExtensionInt",
"description": [
"The number of bytes (not UTF-8 code points)."
]
}
],
"description": [
"Creates a StringName from a UTF-8 encoded string with a given number of characters."
],
"since": "4.2"
},
{
"name": "xml_parser_open_buffer",
"return_value": {
"type": "GDExtensionInt",
"description": [
"A Godot error code (ex. OK, ERR_INVALID_DATA, etc)."
]
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to an XMLParser object."
]
},
{
"name": "p_buffer",
"type": "const uint8_t*",
"description": [
"A pointer to the buffer."
]
},
{
"name": "p_size",
"type": "size_t",
"description": [
"The size of the buffer."
]
}
],
"description": [
"Opens a raw XML buffer on an XMLParser instance."
],
"since": "4.1",
"see": [
"XMLParser::open_buffer()"
]
},
{
"name": "file_access_store_buffer",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to a FileAccess object."
]
},
{
"name": "p_src",
"type": "const uint8_t*",
"description": [
"A pointer to the buffer."
]
},
{
"name": "p_length",
"type": "uint64_t",
"description": [
"The size of the buffer."
]
}
],
"description": [
"Stores the given buffer using an instance of FileAccess."
],
"since": "4.1",
"see": [
"FileAccess::store_buffer()"
]
},
{
"name": "file_access_get_buffer",
"return_value": {
"type": "uint64_t",
"description": [
"The actual number of bytes read (may be less than requested)."
]
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionConstObjectPtr",
"description": [
"A pointer to a FileAccess object."
]
},
{
"name": "p_dst",
"type": "uint8_t*",
"description": [
"A pointer to the buffer to store the data."
]
},
{
"name": "p_length",
"type": "uint64_t",
"description": [
"The requested number of bytes to read."
]
}
],
"description": [
"Reads the next p_length bytes into the given buffer using an instance of FileAccess."
],
"since": "4.1"
},
{
"name": "image_ptrw",
"return_value": {
"type": "uint8_t*",
"description": [
"Pointer to internal Image buffer."
]
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to a Image object."
]
}
],
"description": [
"Returns writable pointer to internal Image buffer."
],
"since": "4.3",
"see": [
"Image::ptrw()"
]
},
{
"name": "image_ptr",
"return_value": {
"type": "const uint8_t*",
"description": [
"Pointer to internal Image buffer."
]
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to a Image object."
]
}
],
"description": [
"Returns read only pointer to internal Image buffer."
],
"since": "4.3",
"see": [
"Image::ptr()"
]
},
{
"name": "worker_thread_pool_add_native_group_task",
"return_value": {
"type": "int64_t",
"description": [
"The task group ID."
]
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to a WorkerThreadPool object."
]
},
{
"name": "p_func",
"type": "GDExtensionWorkerThreadPoolGroupTask",
"description": [
"A pointer to a function to run in the thread pool."
]
},
{
"name": "p_userdata",
"type": "void*",
"description": [
"A pointer to arbitrary data which will be passed to p_func."
]
},
{
"name": "p_elements",
"type": "int",
"description": [
"The number of element needed in the group."
]
},
{
"name": "p_tasks",
"type": "int",
"description": [
"The number of tasks needed in the group."
]
},
{
"name": "p_high_priority",
"type": "GDExtensionBool",
"description": [
"Whether or not this is a high priority task."
]
},
{
"name": "p_description",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to a String with the task description."
]
}
],
"description": [
"Adds a group task to an instance of WorkerThreadPool."
],
"since": "4.1",
"see": [
"WorkerThreadPool::add_group_task()"
]
},
{
"name": "worker_thread_pool_add_native_task",
"return_value": {
"type": "int64_t",
"description": [
"The task ID."
]
},
"arguments": [
{
"name": "p_instance",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to a WorkerThreadPool object."
]
},
{
"name": "p_func",
"type": "GDExtensionWorkerThreadPoolTask",
"description": [
"A pointer to a function to run in the thread pool."
]
},
{
"name": "p_userdata",
"type": "void*",
"description": [
"A pointer to arbitrary data which will be passed to p_func."
]
},
{
"name": "p_high_priority",
"type": "GDExtensionBool",
"description": [
"Whether or not this is a high priority task."
]
},
{
"name": "p_description",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to a String with the task description."
]
}
],
"description": [
"Adds a task to an instance of WorkerThreadPool."
],
"since": "4.1"
},
{
"name": "packed_byte_array_operator_index",
"return_value": {
"type": "uint8_t*",
"description": [
"A pointer to the requested byte."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedByteArray object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the byte to get."
]
}
],
"description": [
"Gets a pointer to a byte in a PackedByteArray."
],
"since": "4.1"
},
{
"name": "packed_byte_array_operator_index_const",
"return_value": {
"type": "const uint8_t*",
"description": [
"A const pointer to the requested byte."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedByteArray object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the byte to get."
]
}
],
"description": [
"Gets a const pointer to a byte in a PackedByteArray."
],
"since": "4.1"
},
{
"name": "packed_float32_array_operator_index",
"return_value": {
"type": "float*",
"description": [
"A pointer to the requested 32-bit float."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedFloat32Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the float to get."
]
}
],
"description": [
"Gets a pointer to a 32-bit float in a PackedFloat32Array."
],
"since": "4.1"
},
{
"name": "packed_float32_array_operator_index_const",
"return_value": {
"type": "const float*",
"description": [
"A const pointer to the requested 32-bit float."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedFloat32Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the float to get."
]
}
],
"description": [
"Gets a const pointer to a 32-bit float in a PackedFloat32Array."
],
"since": "4.1"
},
{
"name": "packed_float64_array_operator_index",
"return_value": {
"type": "double*",
"description": [
"A pointer to the requested 64-bit float."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedFloat64Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the float to get."
]
}
],
"description": [
"Gets a pointer to a 64-bit float in a PackedFloat64Array."
],
"since": "4.1"
},
{
"name": "packed_float64_array_operator_index_const",
"return_value": {
"type": "const double*",
"description": [
"A const pointer to the requested 64-bit float."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedFloat64Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the float to get."
]
}
],
"description": [
"Gets a const pointer to a 64-bit float in a PackedFloat64Array."
],
"since": "4.1"
},
{
"name": "packed_int32_array_operator_index",
"return_value": {
"type": "int32_t*",
"description": [
"A pointer to the requested 32-bit integer."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedInt32Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the integer to get."
]
}
],
"description": [
"Gets a pointer to a 32-bit integer in a PackedInt32Array."
],
"since": "4.1"
},
{
"name": "packed_int32_array_operator_index_const",
"return_value": {
"type": "const int32_t*",
"description": [
"A const pointer to the requested 32-bit integer."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedInt32Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the integer to get."
]
}
],
"description": [
"Gets a const pointer to a 32-bit integer in a PackedInt32Array."
],
"since": "4.1"
},
{
"name": "packed_int64_array_operator_index",
"return_value": {
"type": "int64_t*",
"description": [
"A pointer to the requested 64-bit integer."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedInt64Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the integer to get."
]
}
],
"description": [
"Gets a pointer to a 64-bit integer in a PackedInt64Array."
],
"since": "4.1"
},
{
"name": "packed_int64_array_operator_index_const",
"return_value": {
"type": "const int64_t*",
"description": [
"A const pointer to the requested 64-bit integer."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedInt64Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the integer to get."
]
}
],
"description": [
"Gets a const pointer to a 64-bit integer in a PackedInt64Array."
],
"since": "4.1"
},
{
"name": "packed_string_array_operator_index",
"return_value": {
"type": "GDExtensionStringPtr",
"description": [
"A pointer to the requested String."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedStringArray object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the String to get."
]
}
],
"description": [
"Gets a pointer to a string in a PackedStringArray."
],
"since": "4.1"
},
{
"name": "packed_string_array_operator_index_const",
"return_value": {
"type": "GDExtensionStringPtr",
"description": [
"A const pointer to the requested String."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedStringArray object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the String to get."
]
}
],
"description": [
"Gets a const pointer to a string in a PackedStringArray."
],
"since": "4.1"
},
{
"name": "packed_vector2_array_operator_index",
"return_value": {
"type": "GDExtensionTypePtr",
"description": [
"A pointer to the requested Vector2."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedVector2Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Vector2 to get."
]
}
],
"description": [
"Gets a pointer to a Vector2 in a PackedVector2Array."
],
"since": "4.1"
},
{
"name": "packed_vector2_array_operator_index_const",
"return_value": {
"type": "GDExtensionTypePtr",
"description": [
"A const pointer to the requested Vector2."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedVector2Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Vector2 to get."
]
}
],
"description": [
"Gets a const pointer to a Vector2 in a PackedVector2Array."
],
"since": "4.1"
},
{
"name": "packed_vector3_array_operator_index",
"return_value": {
"type": "GDExtensionTypePtr",
"description": [
"A pointer to the requested Vector3."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedVector3Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Vector3 to get."
]
}
],
"description": [
"Gets a pointer to a Vector3 in a PackedVector3Array."
],
"since": "4.1"
},
{
"name": "packed_vector3_array_operator_index_const",
"return_value": {
"type": "GDExtensionTypePtr",
"description": [
"A const pointer to the requested Vector3."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedVector3Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Vector3 to get."
]
}
],
"description": [
"Gets a const pointer to a Vector3 in a PackedVector3Array."
],
"since": "4.1"
},
{
"name": "packed_vector4_array_operator_index",
"return_value": {
"type": "GDExtensionTypePtr",
"description": [
"A pointer to the requested Vector4."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedVector4Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Vector4 to get."
]
}
],
"description": [
"Gets a pointer to a Vector4 in a PackedVector4Array."
],
"since": "4.3"
},
{
"name": "packed_vector4_array_operator_index_const",
"return_value": {
"type": "GDExtensionTypePtr",
"description": [
"A const pointer to the requested Vector4."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedVector4Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Vector4 to get."
]
}
],
"description": [
"Gets a const pointer to a Vector4 in a PackedVector4Array."
],
"since": "4.3"
},
{
"name": "packed_color_array_operator_index",
"return_value": {
"type": "GDExtensionTypePtr",
"description": [
"A pointer to the requested Color."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a PackedColorArray object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Color to get."
]
}
],
"description": [
"Gets a pointer to a color in a PackedColorArray."
],
"since": "4.1"
},
{
"name": "packed_color_array_operator_index_const",
"return_value": {
"type": "GDExtensionTypePtr",
"description": [
"A const pointer to the requested Color."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a PackedColorArray object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Color to get."
]
}
],
"description": [
"Gets a const pointer to a color in a PackedColorArray."
],
"since": "4.1"
},
{
"name": "array_operator_index",
"return_value": {
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to the requested Variant."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to an Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Variant to get."
]
}
],
"description": [
"Gets a pointer to a Variant in an Array."
],
"since": "4.1"
},
{
"name": "array_operator_index_const",
"return_value": {
"type": "GDExtensionVariantPtr",
"description": [
"A const pointer to the requested Variant."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to an Array object."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index of the Variant to get."
]
}
],
"description": [
"Gets a const pointer to a Variant in an Array."
],
"since": "4.1"
},
{
"name": "array_ref",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to the Array object to update."
]
},
{
"name": "p_from",
"type": "GDExtensionConstTypePtr",
"description": [
"A pointer to the Array object to reference."
]
}
],
"description": [
"Sets an Array to be a reference to another Array object."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.5. use `Array::operator=` instead."
},
{
"name": "array_set_typed",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to the Array."
]
},
{
"name": "p_type",
"type": "GDExtensionVariantType",
"description": [
"The type of Variant the Array will store."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of the object (if p_type is GDEXTENSION_VARIANT_TYPE_OBJECT)."
]
},
{
"name": "p_script",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Script object (if p_type is GDEXTENSION_VARIANT_TYPE_OBJECT and the base class is extended by a script)."
]
}
],
"description": [
"Makes an Array into a typed Array."
],
"since": "4.1"
},
{
"name": "dictionary_operator_index",
"return_value": {
"type": "GDExtensionVariantPtr",
"description": [
"A pointer to a Variant representing the value at the given key."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to a Dictionary object."
]
},
{
"name": "p_key",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the key."
]
}
],
"description": [
"Gets a pointer to a Variant in a Dictionary with the given key."
],
"since": "4.1"
},
{
"name": "dictionary_operator_index_const",
"return_value": {
"type": "GDExtensionVariantPtr",
"description": [
"A const pointer to a Variant representing the value at the given key."
]
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionConstTypePtr",
"description": [
"A const pointer to a Dictionary object."
]
},
{
"name": "p_key",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Variant representing the key."
]
}
],
"description": [
"Gets a const pointer to a Variant in a Dictionary with the given key."
],
"since": "4.1"
},
{
"name": "dictionary_set_typed",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_self",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to the Dictionary."
]
},
{
"name": "p_key_type",
"type": "GDExtensionVariantType",
"description": [
"The type of Variant the Dictionary key will store."
]
},
{
"name": "p_key_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of the object (if p_key_type is GDEXTENSION_VARIANT_TYPE_OBJECT)."
]
},
{
"name": "p_key_script",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Script object (if p_key_type is GDEXTENSION_VARIANT_TYPE_OBJECT and the base class is extended by a script)."
]
},
{
"name": "p_value_type",
"type": "GDExtensionVariantType",
"description": [
"The type of Variant the Dictionary value will store."
]
},
{
"name": "p_value_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of the object (if p_value_type is GDEXTENSION_VARIANT_TYPE_OBJECT)."
]
},
{
"name": "p_value_script",
"type": "GDExtensionConstVariantPtr",
"description": [
"A pointer to a Script object (if p_value_type is GDEXTENSION_VARIANT_TYPE_OBJECT and the base class is extended by a script)."
]
}
],
"description": [
"Makes a Dictionary into a typed Dictionary."
],
"since": "4.4"
},
{
"name": "object_method_bind_call",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_method_bind",
"type": "GDExtensionMethodBindPtr",
"description": [
"A pointer to the MethodBind representing the method on the Object's class."
]
},
{
"name": "p_instance",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*",
"description": [
"A pointer to a C array of Variants representing the arguments."
]
},
{
"name": "p_arg_count",
"type": "GDExtensionInt",
"description": [
"The number of arguments."
]
},
{
"name": "r_ret",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer to Variant which will receive the return value."
]
},
{
"name": "r_error",
"type": "GDExtensionCallError*",
"description": [
"A pointer to a GDExtensionCallError struct that will receive error information."
]
}
],
"description": [
"Calls a method on an Object."
],
"since": "4.1"
},
{
"name": "object_method_bind_ptrcall",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_method_bind",
"type": "GDExtensionMethodBindPtr",
"description": [
"A pointer to the MethodBind representing the method on the Object's class."
]
},
{
"name": "p_instance",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_args",
"type": "const GDExtensionConstTypePtr*",
"description": [
"A pointer to a C array representing the arguments."
]
},
{
"name": "r_ret",
"type": "GDExtensionTypePtr",
"description": [
"A pointer to the Object that will receive the return value."
]
}
],
"description": [
"Calls a method on an Object (using a \"ptrcall\")."
],
"since": "4.1"
},
{
"name": "object_destroy",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_o",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
}
],
"description": [
"Destroys an Object."
],
"since": "4.1"
},
{
"name": "global_get_singleton",
"return_value": {
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the singleton Object."
]
},
"arguments": [
{
"name": "p_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the singleton name."
]
}
],
"description": [
"Gets a global singleton by name."
],
"since": "4.1"
},
{
"name": "object_get_instance_binding",
"return_value": {
"type": "void*",
"description": [
"A pointer to the instance binding."
]
},
"arguments": [
{
"name": "p_o",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_token",
"type": "void*",
"description": [
"A token the library received by the GDExtension's entry point function."
]
},
{
"name": "p_callbacks",
"type": "const GDExtensionInstanceBindingCallbacks*",
"description": [
"A pointer to a GDExtensionInstanceBindingCallbacks struct."
]
}
],
"description": [
"Gets a pointer representing an Object's instance binding."
],
"since": "4.1"
},
{
"name": "object_set_instance_binding",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_o",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_token",
"type": "void*",
"description": [
"A token the library received by the GDExtension's entry point function."
]
},
{
"name": "p_binding",
"type": "void*",
"description": [
"A pointer to the instance binding."
]
},
{
"name": "p_callbacks",
"type": "const GDExtensionInstanceBindingCallbacks*",
"description": [
"A pointer to a GDExtensionInstanceBindingCallbacks struct."
]
}
],
"description": [
"Sets an Object's instance binding."
],
"since": "4.1"
},
{
"name": "object_free_instance_binding",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_o",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_token",
"type": "void*",
"description": [
"A token the library received by the GDExtension's entry point function."
]
}
],
"description": [
"Free an Object's instance binding."
],
"since": "4.2"
},
{
"name": "object_set_instance",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_o",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_classname",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the registered extension class's name."
]
},
{
"name": "p_instance",
"type": "GDExtensionClassInstancePtr",
"description": [
"A pointer to the extension class instance."
]
}
],
"description": [
"Sets an extension class instance on a Object.",
"`p_classname` should be a registered extension class and should extend the `p_o` Object's class."
],
"since": "4.1"
},
{
"name": "object_get_class_name",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if successful in getting the class name; otherwise false."
]
},
"arguments": [
{
"name": "p_object",
"type": "GDExtensionConstObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "r_class_name",
"type": "GDExtensionUninitializedStringNamePtr",
"description": [
"A pointer to a String to receive the class name."
]
}
],
"description": [
"Gets the class name of an Object.",
"If the GDExtension wraps the Godot object in an abstraction specific to its class, this is the",
"function that should be used to determine which wrapper to use."
],
"since": "4.1"
},
{
"name": "object_cast_to",
"return_value": {
"type": "GDExtensionObjectPtr",
"description": [
"Returns a pointer to the Object, or NULL if it can't be cast to the requested type."
]
},
"arguments": [
{
"name": "p_object",
"type": "GDExtensionConstObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_class_tag",
"type": "void*",
"description": [
"A pointer uniquely identifying a built-in class in the ClassDB."
]
}
],
"description": [
"Casts an Object to a different type."
],
"since": "4.1"
},
{
"name": "object_get_instance_from_id",
"return_value": {
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
"arguments": [
{
"name": "p_instance_id",
"type": "GDObjectInstanceID",
"description": [
"The instance ID."
]
}
],
"description": [
"Gets an Object by its instance ID."
],
"since": "4.1"
},
{
"name": "object_get_instance_id",
"return_value": {
"type": "GDObjectInstanceID",
"description": [
"The instance ID."
]
},
"arguments": [
{
"name": "p_object",
"type": "GDExtensionConstObjectPtr",
"description": [
"A pointer to the Object."
]
}
],
"description": [
"Gets the instance ID from an Object."
],
"since": "4.1"
},
{
"name": "object_has_script_method",
"return_value": {
"type": "GDExtensionBool",
"description": [
"true if the object has a script and that script has a method with the given name. Returns false if the object has no script."
]
},
"arguments": [
{
"name": "p_object",
"type": "GDExtensionConstObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_method",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName identifying the method."
]
}
],
"description": [
"Checks if this object has a script with the given method."
],
"since": "4.3"
},
{
"name": "object_call_script_method",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_object",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_method",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName identifying the method."
]
},
{
"name": "p_args",
"type": "const GDExtensionConstVariantPtr*",
"description": [
"A pointer to a C array of Variant."
]
},
{
"name": "p_argument_count",
"type": "GDExtensionInt",
"description": [
"The number of arguments."
]
},
{
"name": "r_return",
"type": "GDExtensionUninitializedVariantPtr",
"description": [
"A pointer a Variant which will be assigned the return value."
]
},
{
"name": "r_error",
"type": "GDExtensionCallError*",
"description": [
"A pointer the structure which will hold error information."
]
}
],
"description": [
"Call the given script method on this object."
],
"since": "4.3"
},
{
"name": "ref_get_object",
"return_value": {
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object from the reference or NULL."
]
},
"arguments": [
{
"name": "p_ref",
"type": "GDExtensionConstRefPtr",
"description": [
"A pointer to the reference."
]
}
],
"description": [
"Gets the Object from a reference."
],
"since": "4.1"
},
{
"name": "ref_set_object",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_ref",
"type": "GDExtensionRefPtr",
"description": [
"A pointer to the reference."
]
},
{
"name": "p_object",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object to refer to."
]
}
],
"description": [
"Sets the Object referred to by a reference."
],
"since": "4.1"
},
{
"name": "script_instance_create",
"return_value": {
"type": "GDExtensionScriptInstancePtr",
"description": [
"A pointer to a ScriptInstanceExtension object."
]
},
"arguments": [
{
"name": "p_info",
"type": "const GDExtensionScriptInstanceInfo*",
"description": [
"A pointer to a GDExtensionScriptInstanceInfo struct."
]
},
{
"name": "p_instance_data",
"type": "GDExtensionScriptInstanceDataPtr",
"description": [
"A pointer to a data representing the script instance in the GDExtension. This will be passed to all the function pointers on p_info."
]
}
],
"description": [
"Creates a script instance that contains the given info and instance data."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.2. Use `script_instance_create3` instead."
},
{
"name": "script_instance_create2",
"return_value": {
"type": "GDExtensionScriptInstancePtr",
"description": [
"A pointer to a ScriptInstanceExtension object."
]
},
"arguments": [
{
"name": "p_info",
"type": "const GDExtensionScriptInstanceInfo2*",
"description": [
"A pointer to a GDExtensionScriptInstanceInfo2 struct."
]
},
{
"name": "p_instance_data",
"type": "GDExtensionScriptInstanceDataPtr",
"description": [
"A pointer to a data representing the script instance in the GDExtension. This will be passed to all the function pointers on p_info."
]
}
],
"description": [
"Creates a script instance that contains the given info and instance data."
],
"since": "4.2",
"deprecated": "Deprecated in Godot 4.3. Use `script_instance_create3` instead."
},
{
"name": "script_instance_create3",
"return_value": {
"type": "GDExtensionScriptInstancePtr",
"description": [
"A pointer to a ScriptInstanceExtension object."
]
},
"arguments": [
{
"name": "p_info",
"type": "const GDExtensionScriptInstanceInfo3*",
"description": [
"A pointer to a GDExtensionScriptInstanceInfo3 struct."
]
},
{
"name": "p_instance_data",
"type": "GDExtensionScriptInstanceDataPtr",
"description": [
"A pointer to a data representing the script instance in the GDExtension. This will be passed to all the function pointers on p_info."
]
}
],
"description": [
"Creates a script instance that contains the given info and instance data."
],
"since": "4.3"
},
{
"name": "placeholder_script_instance_create",
"return_value": {
"type": "GDExtensionScriptInstancePtr",
"description": [
"A pointer to a PlaceHolderScriptInstance object."
]
},
"arguments": [
{
"name": "p_language",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to a ScriptLanguage."
]
},
{
"name": "p_script",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to a Script."
]
},
{
"name": "p_owner",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to an Object."
]
}
],
"description": [
"Creates a placeholder script instance for a given script and instance.",
"This interface is optional as a custom placeholder could also be created with script_instance_create()."
],
"since": "4.2",
"legacy_type_name": "GDExtensionInterfacePlaceHolderScriptInstanceCreate"
},
{
"name": "placeholder_script_instance_update",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_placeholder",
"type": "GDExtensionScriptInstancePtr",
"description": [
"A pointer to a PlaceHolderScriptInstance."
]
},
{
"name": "p_properties",
"type": "GDExtensionConstTypePtr",
"description": [
"A pointer to an Array of Dictionary representing PropertyInfo."
]
},
{
"name": "p_values",
"type": "GDExtensionConstTypePtr",
"description": [
"A pointer to a Dictionary mapping StringName to Variant values."
]
}
],
"description": [
"Updates a placeholder script instance with the given properties and values.",
"The passed in placeholder must be an instance of PlaceHolderScriptInstance",
"such as the one returned by placeholder_script_instance_create()."
],
"since": "4.2",
"legacy_type_name": "GDExtensionInterfacePlaceHolderScriptInstanceUpdate"
},
{
"name": "object_get_script_instance",
"return_value": {
"type": "GDExtensionScriptInstanceDataPtr",
"description": [
"A GDExtensionScriptInstanceDataPtr that was attached to this object as part of script_instance_create."
]
},
"arguments": [
{
"name": "p_object",
"type": "GDExtensionConstObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_language",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the language expected for this script instance."
]
}
],
"description": [
"Get the script instance data attached to this object."
],
"since": "4.2"
},
{
"name": "object_set_script_instance",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_object",
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the Object."
]
},
{
"name": "p_script_instance",
"type": "GDExtensionScriptInstanceDataPtr",
"description": [
"A pointer to the script instance data to attach to this object."
]
}
],
"description": [
"Set the script instance data attached to this object."
],
"since": "4.5"
},
{
"name": "callable_custom_create",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_callable",
"type": "GDExtensionUninitializedTypePtr",
"description": [
"A pointer that will receive the new Callable."
]
},
{
"name": "p_callable_custom_info",
"type": "GDExtensionCallableCustomInfo*",
"description": [
"The info required to construct a Callable."
]
}
],
"description": [
"Creates a custom Callable object from a function pointer.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.2",
"deprecated": "Deprecated in Godot 4.3. Use `callable_custom_create2` instead."
},
{
"name": "callable_custom_create2",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "r_callable",
"type": "GDExtensionUninitializedTypePtr",
"description": [
"A pointer that will receive the new Callable."
]
},
{
"name": "p_callable_custom_info",
"type": "GDExtensionCallableCustomInfo2*",
"description": [
"The info required to construct a Callable."
]
}
],
"description": [
"Creates a custom Callable object from a function pointer.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.3"
},
{
"name": "callable_custom_get_userdata",
"return_value": {
"type": "void*",
"description": [
"The userdata pointer given when creating this custom Callable."
]
},
"arguments": [
{
"name": "p_callable",
"type": "GDExtensionConstTypePtr",
"description": [
"A pointer to a Callable."
]
},
{
"name": "p_token",
"type": "void*",
"description": [
"A pointer to an address that uniquely identifies the GDExtension."
]
}
],
"description": [
"Retrieves the userdata pointer from a custom Callable.",
"If the Callable is not a custom Callable or the token does not match the one provided to callable_custom_create() via GDExtensionCallableCustomInfo then NULL will be returned."
],
"since": "4.2",
"legacy_type_name": "GDExtensionInterfaceCallableCustomGetUserData"
},
{
"name": "classdb_construct_object",
"return_value": {
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the newly created Object."
]
},
"arguments": [
{
"name": "p_classname",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
}
],
"description": [
"Constructs an Object of the requested class.",
"The passed class must be a built-in godot class, or an already-registered extension class. In both cases, object_set_instance() should be called to fully initialize the object."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.4. Use `classdb_construct_object2` instead."
},
{
"name": "classdb_construct_object2",
"return_value": {
"type": "GDExtensionObjectPtr",
"description": [
"A pointer to the newly created Object."
]
},
"arguments": [
{
"name": "p_classname",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
}
],
"description": [
"Constructs an Object of the requested class.",
"The passed class must be a built-in godot class, or an already-registered extension class. In both cases, object_set_instance() should be called to fully initialize the object.",
"",
"\"NOTIFICATION_POSTINITIALIZE\" must be sent after construction."
],
"since": "4.4"
},
{
"name": "classdb_get_method_bind",
"return_value": {
"type": "GDExtensionMethodBindPtr",
"description": [
"A pointer to the MethodBind from ClassDB."
]
},
"arguments": [
{
"name": "p_classname",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_methodname",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the method name."
]
},
{
"name": "p_hash",
"type": "GDExtensionInt",
"description": [
"A hash representing the function signature."
]
}
],
"description": [
"Gets a pointer to the MethodBind in ClassDB for the given class, method and hash."
],
"since": "4.1"
},
{
"name": "classdb_get_class_tag",
"return_value": {
"type": "void*",
"description": [
"A pointer uniquely identifying the built-in class in the ClassDB."
]
},
"arguments": [
{
"name": "p_classname",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
}
],
"description": [
"Gets a pointer uniquely identifying the given built-in class in the ClassDB."
],
"since": "4.1"
},
{
"name": "classdb_register_extension_class",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_parent_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the parent class name."
]
},
{
"name": "p_extension_funcs",
"type": "const GDExtensionClassCreationInfo*",
"description": [
"A pointer to a GDExtensionClassCreationInfo struct."
]
}
],
"description": [
"Registers an extension class in the ClassDB.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.1",
"deprecated": "Deprecated in Godot 4.2. Use `classdb_register_extension_class4` instead."
},
{
"name": "classdb_register_extension_class2",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_parent_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the parent class name."
]
},
{
"name": "p_extension_funcs",
"type": "const GDExtensionClassCreationInfo2*",
"description": [
"A pointer to a GDExtensionClassCreationInfo2 struct."
]
}
],
"description": [
"Registers an extension class in the ClassDB.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.2",
"deprecated": "Deprecated in Godot 4.3. Use `classdb_register_extension_class4` instead."
},
{
"name": "classdb_register_extension_class3",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_parent_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the parent class name."
]
},
{
"name": "p_extension_funcs",
"type": "const GDExtensionClassCreationInfo3*",
"description": [
"A pointer to a GDExtensionClassCreationInfo3 struct."
]
}
],
"description": [
"Registers an extension class in the ClassDB.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.3",
"deprecated": "Deprecated in Godot 4.4. Use `classdb_register_extension_class4` instead."
},
{
"name": "classdb_register_extension_class4",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_parent_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the parent class name."
]
},
{
"name": "p_extension_funcs",
"type": "const GDExtensionClassCreationInfo4*",
"description": [
"A pointer to a GDExtensionClassCreationInfo4 struct."
]
}
],
"description": [
"Registers an extension class in the ClassDB.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.4",
"deprecated": "Deprecated in Godot 4.5. Use `classdb_register_extension_class5` instead."
},
{
"name": "classdb_register_extension_class5",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_parent_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the parent class name."
]
},
{
"name": "p_extension_funcs",
"type": "const GDExtensionClassCreationInfo5*",
"description": [
"A pointer to a GDExtensionClassCreationInfo5 struct."
]
}
],
"description": [
"Registers an extension class in the ClassDB.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.5"
},
{
"name": "classdb_register_extension_class_method",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_method_info",
"type": "const GDExtensionClassMethodInfo*",
"description": [
"A pointer to a GDExtensionClassMethodInfo struct."
]
}
],
"description": [
"Registers a method on an extension class in the ClassDB.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.1"
},
{
"name": "classdb_register_extension_class_virtual_method",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_method_info",
"type": "const GDExtensionClassVirtualMethodInfo*",
"description": [
"A pointer to a GDExtensionClassMethodInfo struct."
]
}
],
"description": [
"Registers a virtual method on an extension class in ClassDB, that can be implemented by scripts or other extensions.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.3"
},
{
"name": "classdb_register_extension_class_integer_constant",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_enum_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the enum name."
]
},
{
"name": "p_constant_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the constant name."
]
},
{
"name": "p_constant_value",
"type": "GDExtensionInt",
"description": [
"The constant value."
]
},
{
"name": "p_is_bitfield",
"type": "GDExtensionBool",
"description": [
"Whether or not this constant is part of a bitfield."
]
}
],
"description": [
"Registers an integer constant on an extension class in the ClassDB.",
"Note about registering bitfield values (if p_is_bitfield is true): even though p_constant_value is signed, language bindings are",
"advised to treat bitfields as uint64_t, since this is generally clearer and can prevent mistakes like using -1 for setting all bits.",
"Language APIs should thus provide an abstraction that registers bitfields (uint64_t) separately from regular constants (int64_t)."
],
"since": "4.1"
},
{
"name": "classdb_register_extension_class_property",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_info",
"type": "const GDExtensionPropertyInfo*",
"description": [
"A pointer to a GDExtensionPropertyInfo struct."
]
},
{
"name": "p_setter",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of the setter method."
]
},
{
"name": "p_getter",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of the getter method."
]
}
],
"description": [
"Registers a property on an extension class in the ClassDB.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.1"
},
{
"name": "classdb_register_extension_class_property_indexed",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_info",
"type": "const GDExtensionPropertyInfo*",
"description": [
"A pointer to a GDExtensionPropertyInfo struct."
]
},
{
"name": "p_setter",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of the setter method."
]
},
{
"name": "p_getter",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of the getter method."
]
},
{
"name": "p_index",
"type": "GDExtensionInt",
"description": [
"The index to pass as the first argument to the getter and setter methods."
]
}
],
"description": [
"Registers an indexed property on an extension class in the ClassDB.",
"Provided struct can be safely freed once the function returns."
],
"since": "4.2"
},
{
"name": "classdb_register_extension_class_property_group",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_group_name",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to a String with the group name."
]
},
{
"name": "p_prefix",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to a String with the prefix used by properties in this group."
]
}
],
"description": [
"Registers a property group on an extension class in the ClassDB."
],
"since": "4.1"
},
{
"name": "classdb_register_extension_class_property_subgroup",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_subgroup_name",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to a String with the subgroup name."
]
},
{
"name": "p_prefix",
"type": "GDExtensionConstStringPtr",
"description": [
"A pointer to a String with the prefix used by properties in this subgroup."
]
}
],
"description": [
"Registers a property subgroup on an extension class in the ClassDB."
],
"since": "4.1"
},
{
"name": "classdb_register_extension_class_signal",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
},
{
"name": "p_signal_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the signal name."
]
},
{
"name": "p_argument_info",
"type": "const GDExtensionPropertyInfo*",
"description": [
"A pointer to a GDExtensionPropertyInfo struct."
]
},
{
"name": "p_argument_count",
"type": "GDExtensionInt",
"description": [
"The number of arguments the signal receives."
]
}
],
"description": [
"Registers a signal on an extension class in the ClassDB.",
"Provided structs can be safely freed once the function returns."
],
"since": "4.1"
},
{
"name": "classdb_unregister_extension_class",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the class name."
]
}
],
"description": [
"Unregisters an extension class in the ClassDB.",
"Unregistering a parent class before a class that inherits it will result in failure. Inheritors must be unregistered first."
],
"since": "4.1"
},
{
"name": "get_library_path",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "r_path",
"type": "GDExtensionUninitializedStringPtr",
"description": [
"A pointer to a String which will receive the path."
]
}
],
"description": [
"Gets the path to the current GDExtension library."
],
"since": "4.1"
},
{
"name": "editor_add_plugin",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of a class (descending from EditorPlugin) which is already registered with ClassDB."
]
}
],
"description": [
"Adds an editor plugin.",
"It's safe to call during initialization."
],
"since": "4.1"
},
{
"name": "editor_remove_plugin",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_class_name",
"type": "GDExtensionConstStringNamePtr",
"description": [
"A pointer to a StringName with the name of a class that was previously added as an editor plugin."
]
}
],
"description": [
"Removes an editor plugin."
],
"since": "4.1"
},
{
"name": "editor_help_load_xml_from_utf8_chars",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_data",
"type": "const char*",
"description": [
"A pointer to a UTF-8 encoded C string (null terminated)."
]
}
],
"description": [
"Loads new XML-formatted documentation data in the editor.",
"The provided pointer can be immediately freed once the function returns."
],
"since": "4.3",
"legacy_type_name": "GDExtensionsInterfaceEditorHelpLoadXmlFromUtf8Chars"
},
{
"name": "editor_help_load_xml_from_utf8_chars_and_len",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_data",
"type": "const char*",
"description": [
"A pointer to a UTF-8 encoded C string."
]
},
{
"name": "p_size",
"type": "GDExtensionInt",
"description": [
"The number of bytes (not code units)."
]
}
],
"description": [
"Loads new XML-formatted documentation data in the editor.",
"The provided pointer can be immediately freed once the function returns."
],
"since": "4.3",
"legacy_type_name": "GDExtensionsInterfaceEditorHelpLoadXmlFromUtf8CharsAndLen"
},
{
"name": "editor_register_get_classes_used_callback",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_callback",
"type": "GDExtensionEditorGetClassesUsedCallback",
"description": [
"The callback to retrieve the list of classes used."
]
}
],
"description": [
"Registers a callback that Godot can call to get the list of all classes (from ClassDB) that may be used by the calling GDExtension.",
"This is used by the editor to generate a build profile (in \"Tools\" > \"Engine Compilation Configuration Editor...\" > \"Detect from project\"),",
"in order to recompile Godot with only the classes used.",
"In the provided callback, the GDExtension should provide the list of classes that _may_ be used statically, thus the time of invocation shouldn't matter.",
"If a GDExtension doesn't register a callback, Godot will assume that it could be using any classes."
],
"since": "4.5"
},
{
"name": "register_main_loop_callbacks",
"return_value": {
"type": "void"
},
"arguments": [
{
"name": "p_library",
"type": "GDExtensionClassLibraryPtr",
"description": [
"A pointer the library received by the GDExtension's entry point function."
]
},
{
"name": "p_callbacks",
"type": "const GDExtensionMainLoopCallbacks*",
"description": [
"A pointer to the structure that contains the callbacks."
]
}
],
"description": [
"Registers callbacks to be called at different phases of the main loop."
],
"since": "4.5"
}
]
}