Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GModuleApi

[157:14] static extends: object

Generated low-level function wrappers for namespace GModule.

Members

  • lib

Methods

  • getLib ()

  • module_build_path (string directory, string module_name)

    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.
    • @p directory is 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.
    • @p module_name is the name of the module.
  • module_error ()

    Gets a string describing the last module error.

  • module_supported ()

    Checks if modules are supported on the current platform.

class: ModuleUnloadCallback

[87:7] extends: object

Specifies the type of the module function called when it is unloaded. If a module contains a function named g_module_unload() it is called automatically when the module is unloaded. It is passed the #GModule structure.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • ModuleUnloadCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (module)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: ModuleCheckInitCallback

[15:7] extends: object

Specifies the type of the module initialization function. If a module contains a function named g_module_check_init() it is called automatically when the module is loaded. It is passed the #GModule structure and should return %NULL on success or a string describing the initialization error.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • ModuleCheckInitCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (module)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.