@@ -805,6 +805,21 @@ typedef struct {
805
805
const char *string; // (e.g. "Godot v3.1.4.stable.official.mono")
806
806
} GDExtensionGodotVersion2;
807
807
808
+ /* Called when starting the main loop. */
809
+ typedef void (*GDExtensionMainLoopStartupCallback)();
810
+
811
+ /* Called when shutting down the main loop. */
812
+ typedef void (*GDExtensionMainLoopShutdownCallback)();
813
+
814
+ /* Called for every frame iteration of the main loop. */
815
+ typedef void (*GDExtensionMainLoopFrameCallback)();
816
+
817
+ typedef struct {
818
+ GDExtensionMainLoopStartupCallback startup_func;
819
+ GDExtensionMainLoopShutdownCallback shutdown_func;
820
+ GDExtensionMainLoopFrameCallback frame_func;
821
+ } GDExtensionMainLoopCallbacks;
822
+
808
823
/* *
809
824
* @name get_godot_version
810
825
* @since 4.1
@@ -2386,6 +2401,7 @@ typedef GDExtensionVariantPtr (*GDExtensionInterfaceArrayOperatorIndexConst)(GDE
2386
2401
/* *
2387
2402
* @name array_ref
2388
2403
* @since 4.1
2404
+ * @deprecated in Godot 4.5. use `Array::operator=` instead.
2389
2405
*
2390
2406
* Sets an Array to be a reference to another Array object.
2391
2407
*
@@ -3131,6 +3147,17 @@ typedef void (*GDExtensionsInterfaceEditorHelpLoadXmlFromUtf8CharsAndLen)(const
3131
3147
*/
3132
3148
typedef void (*GDExtensionInterfaceEditorRegisterGetClassesUsedCallback)(GDExtensionClassLibraryPtr p_library, GDExtensionEditorGetClassesUsedCallback p_callback);
3133
3149
3150
+ /* *
3151
+ * @name register_main_loop_callbacks
3152
+ * @since 4.5
3153
+ *
3154
+ * Registers callbacks to be called at different phases of the main loop.
3155
+ *
3156
+ * @param p_library A pointer the library received by the GDExtension's entry point function.
3157
+ * @param p_callback A pointer to the structure that contains the callbacks.
3158
+ */
3159
+ typedef void (*GDExtensionInterfaceRegisterMainLoopCallbacks)(GDExtensionClassLibraryPtr p_library, const GDExtensionMainLoopCallbacks *p_callbacks);
3160
+
3134
3161
#ifdef __cplusplus
3135
3162
}
3136
3163
#endif
0 commit comments