GodotNativeLibrary

This mixin will generate the GDExtension C interface functions for this D library. Pass to it a name string for the library, followed by the GodotScript types to register, functions to call, and other options to configure Godot-D.

The symbolPrefix must match the GDExtensionLibrary's symbolPrefix in Godot.

D runtime will be initialized and terminated, unless you pass LoadDRuntime.no or compile with BetterC.

Functions taking GodotInitOptions or no arguments will be called at init. Functions taking GodotTerminateOptions will be called at termination.

Members

Functions

deinitializeLevel
void deinitializeLevel(void* userdata, GDExtensionInitializationLevel level)
Undocumented in source. Be warned that the author may not have intended to support it.
initializeLevel
void initializeLevel(void* userdata, GDExtensionInitializationLevel level)
Undocumented in source. Be warned that the author may not have intended to support it.
main
void main()

HACK: empty main to force the compiler to add emulated TLS.

Mixins

__anonymous
mixin SimpleDllMain
Undocumented in source.

Static functions

godot_gdextension_entry
GDExtensionBool godot_gdextension_entry(GDExtensionInterface* p_interface, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization* r_initialization)

This is the main entry point declared in your .gdextension file, it will be called by godot engine on load

register_types
void register_types(void* userdata, GDExtensionInitializationLevel level)
Undocumented in source. Be warned that the author may not have intended to support it.
unregister_types
void unregister_types(void* userdata, GDExtensionInitializationLevel level)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_GODOT_projectInfo
enum godot.util.classes.ProjectInfo _GODOT_projectInfo;
Undocumented in source.
_GODOT_projectInfo
enum godot.util.classes.ProjectInfo _GODOT_projectInfo;
Undocumented in source.

Examples

import godot, godot.node;
class TestClass : GodotScript!Node
{ }
mixin GodotNativeLibrary!(
	"testlib",
	TestClass,
	(GodotInitOptions o){ print("Initialized"); },
	(GodotTerminateOptions o){ print("Terminated"); }
);

Meta