Documentation ¶
Overview ¶
本文件是用 gen_array_code 工具自动生成的
Index ¶
- Constants
- Variables
- func Bool2Int(v bool) int
- func CString(str string) unsafe.Pointer
- func CallMyDestroyFn(ptr unsafe.Pointer)
- func Free(p unsafe.Pointer)
- func GetClosureDestroyNotifyPtr() unsafe.Pointer
- func GoString(p unsafe.Pointer) string
- func Int2Bool(v int) bool
- func Malloc(nBytes int) unsafe.Pointer
- func Malloc0(nBytes int) unsafe.Pointer
- func RegisterFClosure(fn FClosureFunc, scope Scope, callableInfo CallableInfo) (uint, unsafe.Pointer)
- func RegisterFunc(fn interface{}, scope Scope) uint
- func SliceAlloc(blockSize int) unsafe.Pointer
- func SliceAlloc0(blockSize int) unsafe.Pointer
- func SliceFree(blockSize int, memBlock unsafe.Pointer)
- func Store(src []interface{}, dest ...interface{}) error
- func StoreInterfaces(src, dest interface{}) error
- func StoreStruct(src []interface{}, dest interface{}) error
- func ToError(ptr unsafe.Pointer) (err error)
- func Uint2Ptr(n uint) unsafe.Pointer
- func UnregisterFClosure(id uint)
- func UnregisterFunc(id uint)
- type Argument
- func NewBoolArgument(v bool) (arg Argument)
- func NewDoubleArgument(v float64) (arg Argument)
- func NewFloatArgument(v float32) (arg Argument)
- func NewInt16Argument(v int16) (arg Argument)
- func NewInt32Argument(v int32) (arg Argument)
- func NewInt64Argument(v int64) (arg Argument)
- func NewInt8Argument(v int8) (arg Argument)
- func NewIntArgument(v int) (arg Argument)
- func NewLongArgument(v int64) (arg Argument)
- func NewPointerArgument(v unsafe.Pointer) (arg Argument)
- func NewPointerArgumentU(v uint) (arg Argument)
- func NewSSizeArgument(v int64) (arg Argument)
- func NewShortArgument(v int16) (arg Argument)
- func NewSizeArgument(v uint64) (arg Argument)
- func NewStringArgument(v unsafe.Pointer) (arg Argument)
- func NewULongArgument(v uint64) (arg Argument)
- func NewUShortArgument(v int16) (arg Argument)
- func NewUint16Argument(v uint16) (arg Argument)
- func NewUint32Argument(v uint32) (arg Argument)
- func NewUint64Argument(v uint64) (arg Argument)
- func NewUint8Argument(v uint8) (arg Argument)
- func NewUintArgument(v uint) (arg Argument)
- func (arg Argument) Bool() bool
- func (arg Argument) Double() float64
- func (arg Argument) Float() float32
- func (arg Argument) Int() int
- func (arg Argument) Int16() int16
- func (arg Argument) Int32() int32
- func (arg Argument) Int64() int64
- func (arg Argument) Int8() int8
- func (arg Argument) Long() int64
- func (arg Argument) Pointer() unsafe.Pointer
- func (arg Argument) SSize() int64
- func (arg Argument) Short() int16
- func (arg Argument) Size() uint64
- func (arg Argument) String() StrPtr
- func (arg Argument) ULong() uint64
- func (arg Argument) UShort() uint16
- func (arg Argument) Uint() uint
- func (arg Argument) Uint16() uint16
- func (arg Argument) Uint32() uint32
- func (arg Argument) Uint64() uint64
- func (arg Argument) Uint8() uint8
- type BaseInfo
- type BoolArray
- type CStrArray
- type CStrvArray
- type CallableInfo
- type Closure
- type DoubleArray
- type Enum
- type FClosure
- type FClosureFunc
- type FFIClosure
- type FieldInfo
- type FindMethodFlags
- type Flags
- type FloatArray
- type FunctionInfo
- type GType
- type GTypeArray
- type InfoType
- type Int16Array
- type Int32Array
- type Int64Array
- type Int8Array
- type InterfaceInfo
- type Invoker
- type InvokerCache
- func (ic *InvokerCache) Get(id uint, nameLv1, nameLv2 string, idxLv1, idxLv2 int, infoType InfoType, ...) (Invoker, error)
- func (ic *InvokerCache) Get1(id uint, ns, nameLv1, nameLv2 string, idxLv1, idxLv2 int, infoType InfoType, ...) (Invoker, error)
- func (ic *InvokerCache) GetGType(id uint, typeName string) GType
- func (ic *InvokerCache) GetGType1(id uint, ns, typeName string) GType
- type Long
- type ObjectInfo
- type ParamBox
- type PointerArray
- type RegisteredTypeInfo
- type Repository
- type RepositoryLoadFlags
- type Scope
- type StrPtr
- type StructInfo
- type Typelib
- type Uint16Array
- type Uint32Array
- type Uint64Array
- type Uint8Array
- type Ulong
- type UniCharArray
- type UnionInfo
Constants ¶
View Source
const NilStr = "\x00\x00\x00\x00"
Variables ¶
View Source
var TypeInt = reflect.TypeOf(0)
View Source
var TypeUint = reflect.TypeOf(uint(0))
Functions ¶
func CallMyDestroyFn ¶
func RegisterFClosure ¶
func RegisterFClosure(fn FClosureFunc, scope Scope, callableInfo CallableInfo) (uint, unsafe.Pointer)
func RegisterFunc ¶
func SliceAlloc ¶
func SliceAlloc0 ¶
func StoreInterfaces ¶
func StoreInterfaces(src, dest interface{}) error
func StoreStruct ¶
func StoreStruct(src []interface{}, dest interface{}) error
func UnregisterFClosure ¶
func UnregisterFClosure(id uint)
func UnregisterFunc ¶
func UnregisterFunc(id uint)
Types ¶
type Argument ¶
type Argument [8]byte
C.GIArgument is [8]byte
func NewBoolArgument ¶
func NewDoubleArgument ¶
func NewFloatArgument ¶
func NewInt16Argument ¶
func NewInt32Argument ¶
func NewInt64Argument ¶
func NewInt8Argument ¶
func NewIntArgument ¶
func NewLongArgument ¶
func NewPointerArgument ¶
func NewPointerArgumentU ¶
func NewSSizeArgument ¶
func NewShortArgument ¶
func NewSizeArgument ¶
func NewStringArgument ¶
func NewULongArgument ¶
func NewUShortArgument ¶
func NewUint16Argument ¶
func NewUint32Argument ¶
func NewUint64Argument ¶
func NewUint8Argument ¶
func NewUintArgument ¶
type BoolArray ¶
func NewBoolArray ¶
type CStrvArray ¶
strArr 的 array
func (CStrvArray) Copy ¶
func (arr CStrvArray) Copy() (result [][]string)
func (*CStrvArray) Free ¶
func (arr *CStrvArray) Free()
func (*CStrvArray) FreeAll ¶
func (arr *CStrvArray) FreeAll()
func (*CStrvArray) SetLenZT ¶
func (arr *CStrvArray) SetLenZT()
type CallableInfo ¶
type CallableInfo struct {
BaseInfo
}
func GetCallableInfo ¶
func GetCallableInfo(namespace, name string) CallableInfo
func WrapCallableInfo ¶
func WrapCallableInfo(p unsafe.Pointer) (ret CallableInfo)
func (CallableInfo) FreeClosure ¶
func (v CallableInfo) FreeClosure(c FFIClosure)
g_callable_info_free_closure
func (CallableInfo) PrepareClosure ¶
func (v CallableInfo) PrepareClosure(userData unsafe.Pointer) FFIClosure
g_callable_info_prepare_closure
type DoubleArray ¶
func MakeDoubleArray ¶
func MakeDoubleArray(length int) DoubleArray
func NewDoubleArray ¶
func NewDoubleArray(values []float64) DoubleArray
func (DoubleArray) AsSlice ¶
func (arr DoubleArray) AsSlice() []float64
func (DoubleArray) Copy ¶
func (arr DoubleArray) Copy() []float64
func (*DoubleArray) Free ¶
func (arr *DoubleArray) Free()
func (*DoubleArray) SetLenZT ¶
func (arr *DoubleArray) SetLenZT()
type FClosure ¶
type FClosure struct { Fn FClosureFunc Scope Scope FFIClosure FFIClosure CallableInfo CallableInfo }
新的 ffi 实现的 closure
func GetFClosure ¶
type FFIClosure ¶
type FFIClosure struct {
// contains filtered or unexported fields
}
func (FFIClosure) ExecPtr ¶
func (v FFIClosure) ExecPtr() unsafe.Pointer
type FindMethodFlags ¶
type FindMethodFlags uint
const (
FindMethodNoCallFind FindMethodFlags = 1 << iota // 不要调用 FindMethod 方法
)
type FloatArray ¶
func MakeFloatArray ¶
func MakeFloatArray(length int) FloatArray
func NewFloatArray ¶
func NewFloatArray(values []float32) FloatArray
func (FloatArray) AsSlice ¶
func (arr FloatArray) AsSlice() []float32
func (FloatArray) Copy ¶
func (arr FloatArray) Copy() []float32
func (*FloatArray) Free ¶
func (arr *FloatArray) Free()
func (*FloatArray) SetLenZT ¶
func (arr *FloatArray) SetLenZT()
type FunctionInfo ¶
type FunctionInfo struct {
CallableInfo
}
func WrapFunctionInfo ¶
func WrapFunctionInfo(p unsafe.Pointer) (ret FunctionInfo)
func (FunctionInfo) PrepInvoker ¶
func (fi FunctionInfo) PrepInvoker() (Invoker, error)
type GTypeArray ¶
func MakeGTypeArray ¶
func MakeGTypeArray(length int) GTypeArray
func NewGTypeArray ¶
func NewGTypeArray(values []GType) GTypeArray
func (GTypeArray) AsSlice ¶
func (arr GTypeArray) AsSlice() []GType
func (GTypeArray) Copy ¶
func (arr GTypeArray) Copy() []GType
func (*GTypeArray) Free ¶
func (arr *GTypeArray) Free()
func (*GTypeArray) SetLenZT ¶
func (arr *GTypeArray) SetLenZT()
type InfoType ¶
type InfoType int
const ( INFO_TYPE_INVALID InfoType = C.GI_INFO_TYPE_INVALID INFO_TYPE_FUNCTION InfoType = C.GI_INFO_TYPE_FUNCTION INFO_TYPE_CALLBACK InfoType = C.GI_INFO_TYPE_CALLBACK INFO_TYPE_STRUCT InfoType = C.GI_INFO_TYPE_STRUCT INFO_TYPE_BOXED InfoType = C.GI_INFO_TYPE_BOXED INFO_TYPE_ENUM InfoType = C.GI_INFO_TYPE_ENUM INFO_TYPE_FLAGS InfoType = C.GI_INFO_TYPE_FLAGS INFO_TYPE_OBJECT InfoType = C.GI_INFO_TYPE_OBJECT INFO_TYPE_INTERFACE InfoType = C.GI_INFO_TYPE_INTERFACE INFO_TYPE_CONSTANT InfoType = C.GI_INFO_TYPE_CONSTANT INFO_TYPE_INVALID_0 InfoType = C.GI_INFO_TYPE_INVALID_0 INFO_TYPE_UNION InfoType = C.GI_INFO_TYPE_UNION INFO_TYPE_VALUE InfoType = C.GI_INFO_TYPE_VALUE INFO_TYPE_SIGNAL InfoType = C.GI_INFO_TYPE_SIGNAL INFO_TYPE_VFUNC InfoType = C.GI_INFO_TYPE_VFUNC INFO_TYPE_PROPERTY InfoType = C.GI_INFO_TYPE_PROPERTY INFO_TYPE_FIELD InfoType = C.GI_INFO_TYPE_FIELD INFO_TYPE_ARG InfoType = C.GI_INFO_TYPE_ARG INFO_TYPE_TYPE InfoType = C.GI_INFO_TYPE_TYPE INFO_TYPE_UNRESOLVED InfoType = C.GI_INFO_TYPE_UNRESOLVED )
type Int16Array ¶
func MakeInt16Array ¶
func MakeInt16Array(length int) Int16Array
func NewInt16Array ¶
func NewInt16Array(values []int16) Int16Array
func (Int16Array) AsSlice ¶
func (arr Int16Array) AsSlice() []int16
func (Int16Array) Copy ¶
func (arr Int16Array) Copy() []int16
func (*Int16Array) Free ¶
func (arr *Int16Array) Free()
func (*Int16Array) SetLenZT ¶
func (arr *Int16Array) SetLenZT()
type Int32Array ¶
func MakeInt32Array ¶
func MakeInt32Array(length int) Int32Array
func NewInt32Array ¶
func NewInt32Array(values []int32) Int32Array
func (Int32Array) AsSlice ¶
func (arr Int32Array) AsSlice() []int32
func (Int32Array) Copy ¶
func (arr Int32Array) Copy() []int32
func (*Int32Array) Free ¶
func (arr *Int32Array) Free()
func (*Int32Array) SetLenZT ¶
func (arr *Int32Array) SetLenZT()
type Int64Array ¶
func MakeInt64Array ¶
func MakeInt64Array(length int) Int64Array
func NewInt64Array ¶
func NewInt64Array(values []int64) Int64Array
func (Int64Array) AsSlice ¶
func (arr Int64Array) AsSlice() []int64
func (Int64Array) Copy ¶
func (arr Int64Array) Copy() []int64
func (*Int64Array) Free ¶
func (arr *Int64Array) Free()
func (*Int64Array) SetLenZT ¶
func (arr *Int64Array) SetLenZT()
type InterfaceInfo ¶
type InterfaceInfo struct {
RegisteredTypeInfo
}
func WrapInterfaceInfo ¶
func WrapInterfaceInfo(p unsafe.Pointer) (ret InterfaceInfo)
func (InterfaceInfo) FindMethod ¶
func (ii InterfaceInfo) FindMethod(name string) FunctionInfo
g_interface_info_find_method
func (InterfaceInfo) Method ¶
func (ii InterfaceInfo) Method(index int) FunctionInfo
g_interface_info_get_method
func (InterfaceInfo) NumMethods ¶
func (ii InterfaceInfo) NumMethods() int
g_interface_info_get_n_methods
type InvokerCache ¶
type InvokerCache struct {
// contains filtered or unexported fields
}
func NewInvokerCache ¶
func NewInvokerCache(ns string) *InvokerCache
func (*InvokerCache) Get ¶
func (ic *InvokerCache) Get(id uint, nameLv1, nameLv2 string, idxLv1, idxLv2 int, infoType InfoType, flags FindMethodFlags) (Invoker, error)
func (*InvokerCache) Get1 ¶
func (ic *InvokerCache) Get1(id uint, ns, nameLv1, nameLv2 string, idxLv1, idxLv2 int, infoType InfoType, flags FindMethodFlags) (Invoker, error)
type ObjectInfo ¶
type ObjectInfo struct {
RegisteredTypeInfo
}
func WrapObjectInfo ¶
func WrapObjectInfo(p unsafe.Pointer) (ret ObjectInfo)
func (ObjectInfo) FindMethod ¶
func (oi ObjectInfo) FindMethod(name string) FunctionInfo
g_object_info_find_method
func (ObjectInfo) Method ¶
func (oi ObjectInfo) Method(index int) FunctionInfo
g_object_info_get_method
type ParamBox ¶
type ParamBox struct { Params []interface{} UserData interface{} }
func (ParamBox) StoreStruct ¶
type PointerArray ¶
func NewPointerArray ¶
func NewPointerArray(values ...unsafe.Pointer) PointerArray
func (PointerArray) AsSlice ¶
func (arr PointerArray) AsSlice() []unsafe.Pointer
func (PointerArray) Copy ¶
func (arr PointerArray) Copy() []unsafe.Pointer
func (*PointerArray) Free ¶
func (arr *PointerArray) Free()
func (*PointerArray) SetLenZT ¶
func (arr *PointerArray) SetLenZT()
type RegisteredTypeInfo ¶
type RegisteredTypeInfo struct {
BaseInfo
}
func WrapRegisteredTypeInfo ¶
func WrapRegisteredTypeInfo(p unsafe.Pointer) (ret RegisteredTypeInfo)
func (RegisteredTypeInfo) GetGType ¶
func (rti RegisteredTypeInfo) GetGType() GType
type Repository ¶
func DefaultRepository ¶
func DefaultRepository() Repository
func (Repository) FindByName ¶
func (r Repository) FindByName(namespace, name string) BaseInfo
g_irepository_find_by_name
func (Repository) Info ¶
func (r Repository) Info(namespace string, index int) BaseInfo
g_irepository_get_info
func (*Repository) Require ¶
func (r *Repository) Require(namespace, version string, flags RepositoryLoadFlags) (Typelib, error)
g_irepository_require
type RepositoryLoadFlags ¶
type RepositoryLoadFlags int
const (
REPOSITORY_LOAD_FLAG_LAZY RepositoryLoadFlags = C.G_IREPOSITORY_LOAD_FLAG_LAZY
)
type StructInfo ¶
type StructInfo struct {
RegisteredTypeInfo
}
func WrapStructInfo ¶
func WrapStructInfo(p unsafe.Pointer) (ret StructInfo)
func (StructInfo) FindField ¶
func (si StructInfo) FindField(name string) FieldInfo
func (StructInfo) FindMethod ¶
func (si StructInfo) FindMethod(name string) FunctionInfo
g_struct_info_find_method
func (StructInfo) Method ¶
func (si StructInfo) Method(index int) FunctionInfo
g_struct_info_get_method
type Uint16Array ¶
func MakeUint16Array ¶
func MakeUint16Array(length int) Uint16Array
func NewUint16Array ¶
func NewUint16Array(values []uint16) Uint16Array
func (Uint16Array) AsSlice ¶
func (arr Uint16Array) AsSlice() []uint16
func (Uint16Array) Copy ¶
func (arr Uint16Array) Copy() []uint16
func (*Uint16Array) Free ¶
func (arr *Uint16Array) Free()
func (*Uint16Array) SetLenZT ¶
func (arr *Uint16Array) SetLenZT()
type Uint32Array ¶
func MakeUint32Array ¶
func MakeUint32Array(length int) Uint32Array
func NewUint32Array ¶
func NewUint32Array(values []uint32) Uint32Array
func (Uint32Array) AsSlice ¶
func (arr Uint32Array) AsSlice() []uint32
func (Uint32Array) Copy ¶
func (arr Uint32Array) Copy() []uint32
func (*Uint32Array) Free ¶
func (arr *Uint32Array) Free()
func (*Uint32Array) SetLenZT ¶
func (arr *Uint32Array) SetLenZT()
type Uint64Array ¶
func MakeUint64Array ¶
func MakeUint64Array(length int) Uint64Array
func NewUint64Array ¶
func NewUint64Array(values []uint64) Uint64Array
func (Uint64Array) AsSlice ¶
func (arr Uint64Array) AsSlice() []uint64
func (Uint64Array) Copy ¶
func (arr Uint64Array) Copy() []uint64
func (*Uint64Array) Free ¶
func (arr *Uint64Array) Free()
func (*Uint64Array) SetLenZT ¶
func (arr *Uint64Array) SetLenZT()
type Uint8Array ¶
func MakeUint8Array ¶
func MakeUint8Array(length int) Uint8Array
func NewUint8Array ¶
func NewUint8Array(values []uint8) Uint8Array
func (Uint8Array) AsSlice ¶
func (arr Uint8Array) AsSlice() []uint8
func (Uint8Array) Copy ¶
func (arr Uint8Array) Copy() []uint8
func (*Uint8Array) Free ¶
func (arr *Uint8Array) Free()
func (*Uint8Array) SetLenZT ¶
func (arr *Uint8Array) SetLenZT()
type UniCharArray ¶
func MakeUniCharArray ¶
func MakeUniCharArray(length int) UniCharArray
func NewUniCharArray ¶
func NewUniCharArray(values []rune) UniCharArray
func (UniCharArray) AsSlice ¶
func (arr UniCharArray) AsSlice() []rune
func (UniCharArray) Copy ¶
func (arr UniCharArray) Copy() []rune
func (*UniCharArray) Free ¶
func (arr *UniCharArray) Free()
func (*UniCharArray) SetLenZT ¶
func (arr *UniCharArray) SetLenZT()
type UnionInfo ¶
type UnionInfo struct {
RegisteredTypeInfo
}
func WrapUnionInfo ¶
func (UnionInfo) FindMethod ¶
func (ui UnionInfo) FindMethod(name string) FunctionInfo
g_union_info_find_method
func (UnionInfo) Method ¶
func (ui UnionInfo) Method(index int) FunctionInfo
g_union_info_get_method
Click to show internal directories.
Click to hide internal directories.