GodotNativeLibrary

This mixin will generate the GDNative 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 GDNativeLibrary'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

main
void main()

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

Mixins

__anonymous
mixin SimpleDllMain
Undocumented in source.

Static functions

godot_gdnative_init
void godot_gdnative_init(godot.c.godot_gdnative_init_options* options)
Undocumented in source. Be warned that the author may not have intended to support it.
godot_gdnative_terminate
void godot_gdnative_terminate(godot.c.godot_gdnative_terminate_options* options)
Undocumented in source. Be warned that the author may not have intended to support it.
godot_nativescript_init
void godot_nativescript_init(void* handle)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_GODOT_projectInfo
enum godotutil.classes.ProjectInfo _GODOT_projectInfo;
Undocumented in source.
_GODOT_projectInfo
enum godotutil.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