// Package glib was automatically generated by github.com/bnema/puregotk DO NOT EDIT package glib import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" ) type Allocator struct { _ structs.HostLayout } func (x *Allocator) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } var xAllocatorFree func(uintptr) func (x *Allocator) Free() { xAllocatorFree(x.GoPointer()) } type MemChunk struct { _ structs.HostLayout } func (x *MemChunk) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } var xMemChunkAlloc func(uintptr) uintptr func (x *MemChunk) Alloc() uintptr { cret := xMemChunkAlloc(x.GoPointer()) return cret } var xMemChunkAlloc0 func(uintptr) uintptr func (x *MemChunk) Alloc0() uintptr { cret := xMemChunkAlloc0(x.GoPointer()) return cret } var xMemChunkClean func(uintptr) func (x *MemChunk) Clean() { xMemChunkClean(x.GoPointer()) } var xMemChunkDestroy func(uintptr) func (x *MemChunk) Destroy() { xMemChunkDestroy(x.GoPointer()) } var xMemChunkFree func(uintptr, uintptr) func (x *MemChunk) Free(MemVar uintptr) { xMemChunkFree(x.GoPointer(), MemVar) } var xMemChunkPrint func(uintptr) func (x *MemChunk) Print() { xMemChunkPrint(x.GoPointer()) } var xMemChunkReset func(uintptr) func (x *MemChunk) Reset() { xMemChunkReset(x.GoPointer()) } const ( ALLOCATOR_LIST int = 1 ALLOCATOR_NODE int = 3 ALLOCATOR_SLIST int = 2 ALLOC_AND_FREE int = 2 ALLOC_ONLY int = 1 ) var xBlowChunks func() func BlowChunks() { xBlowChunks() } var xListPopAllocator func() func ListPopAllocator() { xListPopAllocator() } var xListPushAllocator func(*Allocator) func ListPushAllocator(AllocatorVar *Allocator) { xListPushAllocator(AllocatorVar) } var xMemChunkInfo func() func MemChunkInfo() { xMemChunkInfo() } var xNodePopAllocator func() func NodePopAllocator() { xNodePopAllocator() } var xNodePushAllocator func(*Allocator) func NodePushAllocator(AllocatorVar *Allocator) { xNodePushAllocator(AllocatorVar) } var xSlistPopAllocator func() func SlistPopAllocator() { xSlistPopAllocator() } var xSlistPushAllocator func(*Allocator) func SlistPushAllocator(AllocatorVar *Allocator) { xSlistPushAllocator(AllocatorVar) } func init() { core.SetPackageName("GLIB", "glib-2.0") core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GLIB") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xBlowChunks, libs, "g_blow_chunks") core.PuregoSafeRegister(&xListPopAllocator, libs, "g_list_pop_allocator") core.PuregoSafeRegister(&xListPushAllocator, libs, "g_list_push_allocator") core.PuregoSafeRegister(&xMemChunkInfo, libs, "g_mem_chunk_info") core.PuregoSafeRegister(&xNodePopAllocator, libs, "g_node_pop_allocator") core.PuregoSafeRegister(&xNodePushAllocator, libs, "g_node_push_allocator") core.PuregoSafeRegister(&xSlistPopAllocator, libs, "g_slist_pop_allocator") core.PuregoSafeRegister(&xSlistPushAllocator, libs, "g_slist_push_allocator") core.PuregoSafeRegister(&xAllocatorFree, libs, "g_allocator_free") core.PuregoSafeRegister(&xMemChunkAlloc, libs, "g_mem_chunk_alloc") core.PuregoSafeRegister(&xMemChunkAlloc0, libs, "g_mem_chunk_alloc0") core.PuregoSafeRegister(&xMemChunkClean, libs, "g_mem_chunk_clean") core.PuregoSafeRegister(&xMemChunkDestroy, libs, "g_mem_chunk_destroy") core.PuregoSafeRegister(&xMemChunkFree, libs, "g_mem_chunk_free") core.PuregoSafeRegister(&xMemChunkPrint, libs, "g_mem_chunk_print") core.PuregoSafeRegister(&xMemChunkReset, libs, "g_mem_chunk_reset") }