Module

The #GModule struct is an opaque data structure to represent a [dynamically-loaded module][glib-Dynamic-Loading-of-Modules]. It should only be accessed via the following functions.

Members

Functions

close
bool close()

Closes a module.

makeResident
void makeResident()

Ensures that a module will never be unloaded. Any future gmodule.module_.Module.close calls on the module will be ignored.

name
string name()

Returns the filename that the module was opened with.

symbol
bool symbol(string symbolName, void* symbol)

Gets a symbol pointer from a module, such as one exported by G_MODULE_EXPORT. Note that a valid symbol can be null.

Static functions

buildPath
string buildPath(string directory, string moduleName)

A portable way to build the filename of a module. The platform-specific prefix and suffix are added to the filename, if needed, and the result is added to the directory, using the correct separator character.

error
string error()

Gets a string describing the last module error.

errorQuark
glib.types.Quark errorQuark()
supported
bool supported()

Checks if modules are supported on the current platform.