gmodule

package
v0.0.0-...-51f7e66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package gmodule was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT

Package gmodule was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModuleBuildPath

func ModuleBuildPath(DirectoryVar string, ModuleNameVar 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`.

func ModuleErrorQuark

func ModuleErrorQuark() glib.Quark

func ModuleSupported

func ModuleSupported() bool

Checks if modules are supported on the current platform.

func NewModuleError

func NewModuleError() string

Gets a string describing the last module error.

Types

type Module

type Module struct {
}

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.

func (*Module) Close

func (x *Module) Close() bool

Closes a module.

func (*Module) GoPointer

func (x *Module) GoPointer() uintptr

func (*Module) MakeResident

func (x *Module) MakeResident()

Ensures that a module will never be unloaded. Any future g_module_close() calls on the module will be ignored.

func (*Module) Name

func (x *Module) Name() string

Returns the filename that the module was opened with.

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

func (*Module) Symbol

func (x *Module) Symbol(SymbolNameVar string, SymbolVar uintptr) bool

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

type ModuleCheckInit

type ModuleCheckInit func(*Module) string

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.

type ModuleError

type ModuleError int

Errors returned by g_module_open_full().

const (

	// there was an error loading or opening a module file
	GModuleErrorFailedValue ModuleError = 0
	// a module returned an error from its `g_module_check_init()` function
	GModuleErrorCheckFailedValue ModuleError = 1
)

type ModuleFlags

type ModuleFlags int

Flags passed to g_module_open(). Note that these flags are not supported on all platforms.

const (

	// specifies that symbols are only resolved when
	//     needed. The default action is to bind all symbols when the module
	//     is loaded.
	GModuleBindLazyValue ModuleFlags = 1
	// specifies that symbols in the module should
	//     not be added to the global name space. The default action on most
	//     platforms is to place symbols in the module in the global name space,
	//     which may cause conflicts with existing symbols.
	GModuleBindLocalValue ModuleFlags = 2
	// mask for all flags.
	GModuleBindMaskValue ModuleFlags = 3
)

type ModuleUnload

type ModuleUnload func(*Module)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL