Basics
Guides
API Reference
Basics
Guides
API Reference
[16:7] extends: object
The #GModule struct is an opaque data structure to represent a
dynamically-loaded module. It
should only be accessed via the following functions. To ensure correct lock
ordering, these functions must not be called from global constructors (for
example, those using GCC’s __attribute__((constructor)) attribute).
GModule (Handle = null)
Creates a new
Moduleby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.close ()
Closes a module.
%TRUE on success.make_resident ()
Ensures that a module will never be unloaded. Any future g_module_close() calls on the module will be ignored.
None.name ()
Returns the filename that the module was opened with. If @module refers to the application itself, "main" is returned.
the filename of the module.symbol (string symbol_name)
Gets a symbol pointer from a module, such as one exported by %G_MODULE_EXPORT. Note that a valid symbol can be %NULL.
symbol_name is the name of the symbol to find.symbol is returns the pointer to the symbol value.%TRUE on success.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.