// Package graphene was automatically generated by github.com/bnema/puregotk DO NOT EDIT package graphene import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject/types" ) // A size. type Size struct { _ structs.HostLayout Width float32 Height float32 } var xSizeGLibType func() types.GType func SizeGLibType() types.GType { return xSizeGLibType() } func (x *Size) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } var xSizeAlloc func() *Size // Allocates a new #graphene_size_t. // // The contents of the returned value are undefined. func SizeAlloc() *Size { cret := xSizeAlloc() return cret } var xSizeEqual func(uintptr, *Size) bool // Checks whether the two give #graphene_size_t are equal. func (x *Size) Equal(BVar *Size) bool { cret := xSizeEqual(x.GoPointer(), BVar) return cret } var xSizeFree func(uintptr) // Frees the resources allocated by graphene_size_alloc(). func (x *Size) Free() { xSizeFree(x.GoPointer()) } var xSizeInit func(uintptr, float32, float32) *Size // Initializes a #graphene_size_t using the given @width and @height. func (x *Size) Init(WidthVar float32, HeightVar float32) *Size { cret := xSizeInit(x.GoPointer(), WidthVar, HeightVar) return cret } var xSizeInitFromSize func(uintptr, *Size) *Size // Initializes a #graphene_size_t using the width and height of // the given @src. func (x *Size) InitFromSize(SrcVar *Size) *Size { cret := xSizeInitFromSize(x.GoPointer(), SrcVar) return cret } var xSizeInterpolate func(uintptr, *Size, float64, *Size) // Linearly interpolates the two given #graphene_size_t using the given // interpolation @factor. func (x *Size) Interpolate(BVar *Size, FactorVar float64, ResVar *Size) { xSizeInterpolate(x.GoPointer(), BVar, FactorVar, ResVar) } var xSizeScale func(uintptr, float32, *Size) // Scales the components of a #graphene_size_t using the given @factor. func (x *Size) Scale(FactorVar float32, ResVar *Size) { xSizeScale(x.GoPointer(), FactorVar, ResVar) } var xSizeZero func() *Size // A constant pointer to a zero #graphene_size_t, useful for // equality checks and interpolations. func SizeZero() *Size { cret := xSizeZero() return cret } func init() { core.SetPackageName("GRAPHENE", "graphene-gobject-1.0") core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GRAPHENE") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xSizeZero, libs, "graphene_size_zero") core.PuregoSafeRegister(&xSizeGLibType, libs, "graphene_size_get_type") core.PuregoSafeRegister(&xSizeAlloc, libs, "graphene_size_alloc") core.PuregoSafeRegister(&xSizeEqual, libs, "graphene_size_equal") core.PuregoSafeRegister(&xSizeFree, libs, "graphene_size_free") core.PuregoSafeRegister(&xSizeInit, libs, "graphene_size_init") core.PuregoSafeRegister(&xSizeInitFromSize, libs, "graphene_size_init_from_size") core.PuregoSafeRegister(&xSizeInterpolate, libs, "graphene_size_interpolate") core.PuregoSafeRegister(&xSizeScale, libs, "graphene_size_scale") }