Gjsify LogoGjsify Logo

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.

record

Hierarchy

  • Module

Index

Constructors

Properties

name: string

Methods

  • close(): boolean
  • makeResident(): void
  • Ensures that a module will never be unloaded. Any future g_module_close() calls on the module will be ignored.

    Returns void

  • name(): string
  • Returns the filename that the module was opened with.

    If module refers to the application itself, "main" is returned.

    Returns string

  • symbol(symbolName: string): [boolean, object]
  • Gets a symbol pointer from a module, such as one exported by %G_MODULE_EXPORT. Note that a valid symbol can be %NULL.

    Parameters

    • symbolName: string

      the name of the symbol to find

    Returns [boolean, object]

  • buildPath(directory: string, moduleName: string): string
  • 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.

    The directory should specify the directory where the module can be found. It can be %NULL or an empty string to indicate that the module is in a standard platform-specific directory, though this is not recommended since the wrong module may be found.

    For example, calling g_module_build_path() on a Linux system with a directory of /lib and a module_name of "mylibrary" will return /lib/libmylibrary.so. On a Windows system, using \Windows as the directory it will return \Windows\mylibrary.dll.

    Parameters

    • directory: string

      the directory where the module is. This can be %NULL or the empty string to indicate that the standard platform-specific directories will be used, though that is not recommended

    • moduleName: string

      the name of the module

    Returns string

  • error(): string
  • errorQuark(): number
  • supported(): boolean
  • Checks if modules are supported on the current platform.

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method