|
@@ -34,15 +34,16 @@
|
|
* Together with the JSON file, you should be able to generate any binder.
|
|
* Together with the JSON file, you should be able to generate any binder.
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
+#ifndef __cplusplus
|
|
#include <stddef.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <stdint.h>
|
|
|
|
|
|
-#ifndef __cplusplus
|
|
|
|
typedef uint32_t char32_t;
|
|
typedef uint32_t char32_t;
|
|
typedef uint16_t char16_t;
|
|
typedef uint16_t char16_t;
|
|
-#endif
|
|
|
|
|
|
+#else
|
|
|
|
+#include <cstddef>
|
|
|
|
+#include <cstdint>
|
|
|
|
|
|
-#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
extern "C" {
|
|
#endif
|
|
#endif
|
|
|
|
|
|
@@ -792,9 +793,22 @@ typedef struct {
|
|
const char *string;
|
|
const char *string;
|
|
} GDExtensionGodotVersion;
|
|
} GDExtensionGodotVersion;
|
|
|
|
|
|
|
|
+typedef struct {
|
|
|
|
+ uint32_t major;
|
|
|
|
+ uint32_t minor;
|
|
|
|
+ uint32_t patch;
|
|
|
|
+ uint32_t hex; // Full version encoded as hexadecimal with one byte (2 hex digits) per number (e.g. for "3.1.12" it would be 0x03010C)
|
|
|
|
+ const char *status; // (e.g. "stable", "beta", "rc1", "rc2")
|
|
|
|
+ const char *build; // (e.g. "custom_build")
|
|
|
|
+ const char *hash; // Full Git commit hash.
|
|
|
|
+ uint64_t timestamp; // Git commit date UNIX timestamp in seconds, or 0 if unavailable.
|
|
|
|
+ const char *string; // (e.g. "Godot v3.1.4.stable.official.mono")
|
|
|
|
+} GDExtensionGodotVersion2;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @name get_godot_version
|
|
* @name get_godot_version
|
|
* @since 4.1
|
|
* @since 4.1
|
|
|
|
+ * @deprecated in Godot 4.5. Use `get_godot_version2` instead.
|
|
*
|
|
*
|
|
* Gets the Godot version that the GDExtension was loaded into.
|
|
* Gets the Godot version that the GDExtension was loaded into.
|
|
*
|
|
*
|
|
@@ -802,6 +816,16 @@ typedef struct {
|
|
*/
|
|
*/
|
|
typedef void (*GDExtensionInterfaceGetGodotVersion)(GDExtensionGodotVersion *r_godot_version);
|
|
typedef void (*GDExtensionInterfaceGetGodotVersion)(GDExtensionGodotVersion *r_godot_version);
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * @name get_godot_version2
|
|
|
|
+ * @since 4.5
|
|
|
|
+ *
|
|
|
|
+ * Gets the Godot version that the GDExtension was loaded into.
|
|
|
|
+ *
|
|
|
|
+ * @param r_godot_version A pointer to the structure to write the version information into.
|
|
|
|
+ */
|
|
|
|
+typedef void (*GDExtensionInterfaceGetGodotVersion2)(GDExtensionGodotVersion2 *r_godot_version);
|
|
|
|
+
|
|
/* INTERFACE: Memory */
|
|
/* INTERFACE: Memory */
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -2723,6 +2747,17 @@ typedef void (*GDExtensionInterfacePlaceHolderScriptInstanceUpdate)(GDExtensionS
|
|
*/
|
|
*/
|
|
typedef GDExtensionScriptInstanceDataPtr (*GDExtensionInterfaceObjectGetScriptInstance)(GDExtensionConstObjectPtr p_object, GDExtensionObjectPtr p_language);
|
|
typedef GDExtensionScriptInstanceDataPtr (*GDExtensionInterfaceObjectGetScriptInstance)(GDExtensionConstObjectPtr p_object, GDExtensionObjectPtr p_language);
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * @name object_set_script_instance
|
|
|
|
+ * @since 4.5
|
|
|
|
+ *
|
|
|
|
+ * Set the script instance data attached to this object.
|
|
|
|
+ *
|
|
|
|
+ * @param p_object A pointer to the Object.
|
|
|
|
+ * @param p_script_instance A pointer to the script instance data to attach to this object.
|
|
|
|
+ */
|
|
|
|
+typedef void (*GDExtensionInterfaceObjectSetScriptInstance)(GDExtensionObjectPtr p_object, GDExtensionScriptInstanceDataPtr p_script_instance);
|
|
|
|
+
|
|
/* INTERFACE: Callable */
|
|
/* INTERFACE: Callable */
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -3086,7 +3121,7 @@ typedef void (*GDExtensionsInterfaceEditorHelpLoadXmlFromUtf8CharsAndLen)(const
|
|
*
|
|
*
|
|
* Registers a callback that Godot can call to get the list of all classes (from ClassDB) that may be used by the calling GDExtension.
|
|
* 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 profiles (in "Tools" > "Engine Compilation Configuration Editor..." > "Detect from project"),
|
|
|
|
|
|
+ * 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 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.
|
|
* 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.
|
|
* If a GDExtension doesn't register a callback, Godot will assume that it could be using any classes.
|