girepository

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MPL-2.0, ISC Imports: 9 Imported by: 0

Documentation

Overview

Packagee girepository provides convenient bindings around libgirepository's C API. It is handwritten, so the API surface is very abstracted and is kept to the bare minimum. As such, it is not a 1:1 binding.

Index

Constants

LoadFlags constants.

Variables

This section is empty.

Functions

func Require

func Require(namespace, version string, flags LoadFlags)

Require forces the namespace to be loaded if it isn't already. If namespace is not loaded, this function will search for a ".typelib" file using the repository search path. In addition, a version version of namespace may be specified. If version is not specified, the latest will be used.

Types

type Argument

type Argument C.GIArgument

Argument is a type to a GIArgument union.

func (Argument) String

func (a Argument) String() string

type Info

type Info struct {
	// contains filtered or unexported fields
}

func Find

func Find(namespace, name string) *Info

Find finds name from the given namespace.

func MustFind

func MustFind(namespace, name string) *Info

MustFind finds or panics.

func (*Info) InvokeClassMethod

func (i *Info) InvokeClassMethod(name string, in, out []Argument) Argument

InvokeClassMethod invokes the method of this ClassInfo with the given name.

func (*Info) InvokeFunction

func (i *Info) InvokeFunction(in, out []Argument) Argument

InvokeFunction invokes this BaseInfo as a FunctionInfo.

func (*Info) InvokeIfaceMethod

func (i *Info) InvokeIfaceMethod(name string, in, out []Argument) Argument

InvokeIfaceMethod invokes the method of this InterfaceInfo with the given name.

func (*Info) InvokeRecordMethod

func (i *Info) InvokeRecordMethod(name string, in, out []Argument) Argument

InvokeRecordMethod invokes the method of this StructInfo with the given name.

func (*Info) RegisteredGType

func (i *Info) RegisteredGType() coreglib.Type

RegisteredGType returns the GType of the type belonging to this Info.

func (*Info) String

func (i *Info) String() string

String formats the type Info as a string describing its name.

func (*Info) StructFieldOffset

func (i *Info) StructFieldOffset(name string) uintptr

StructFieldOffset gets the offset of the field for the record that is i.

type LoadFlags

type LoadFlags C.GIRepositoryLoadFlags

LoadFlags are flags that control how a typelib is loaded.

Jump to

Keyboard shortcuts

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