Basics
Guides
API Reference
Basics
Guides
API Reference
[14:7] extends: object
Provides an interface and default functions for loading and unloading modules. This is used internally to make GIO extensible, but can also be used by others to implement module loading.
IOModule (filename = null)
Creates a new GIOModule that will load the specific shared library when in use.
filename is filename of the shared library module..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.asTypeModule ()
Wraps this handle as
TypeModule.
A TypeModule object.asTypePlugin ()
Wraps this handle as
TypePlugin.
A TypePlugin object.load ()
Required API for GIO modules to implement. This function is run after the module has been loaded into GIO, to initialize the module. Typically, this function will call g_io_extension_point_implement(). Since 2.56, this function should be named
g_io_<modulename>_load, wheremodulenameis the plugin’s filename with theliborlibgioprefix and everything after the first dot removed, and with-replaced with_throughout. For example,libgiognutls-helper.sobecomesgnutls_helper. Using the new symbol names avoids name clashes when building modules statically. The old symbol names continue to be supported, but cannot be used for static builds.
None.unload ()
Required API for GIO modules to implement. This function is run when the module is being unloaded from GIO, to finalize the module. Since 2.56, this function should be named
g_io_<modulename>_unload, wheremodulenameis the plugin’s filename with theliborlibgioprefix and everything after the first dot removed, and with-replaced with_throughout. For example,libgiognutls-helper.sobecomesgnutls_helper. Using the new symbol names avoids name clashes when building modules statically. The old symbol names continue to be supported, but cannot be used for static builds.
None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.