Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: IOModule

[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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • IOModule (filename = null)

    Creates a new GIOModule that will load the specific shared library when in use.

    • @p 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asTypeModule ()

    Wraps this handle as TypeModule.

    • @r A TypeModule object.
  • asTypePlugin ()

    Wraps this handle as TypePlugin.

    • @r 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, where modulename is the plugin’s filename with the lib or libgio prefix and everything after the first dot removed, and with - replaced with _ throughout. For example, libgiognutls-helper.so becomes gnutls_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.

    • @r 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, where modulename is the plugin’s filename with the lib or libgio prefix and everything after the first dot removed, and with - replaced with _ throughout. For example, libgiognutls-helper.so becomes gnutls_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.

    • @r None.