// 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 4 vertex quadrilateral, as represented by four #graphene_point_t. // // The contents of a #graphene_quad_t are private and should never be // accessed directly. type Quad struct { _ structs.HostLayout Points [4]Point } var xQuadGLibType func() types.GType func QuadGLibType() types.GType { return xQuadGLibType() } func (x *Quad) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } var xQuadAlloc func() *Quad // Allocates a new #graphene_quad_t instance. // // The contents of the returned instance are undefined. func QuadAlloc() *Quad { cret := xQuadAlloc() return cret } var xQuadBounds func(uintptr, *Rect) // Computes the bounding rectangle of @q and places it into @r. func (x *Quad) Bounds(RVar *Rect) { xQuadBounds(x.GoPointer(), RVar) } var xQuadContains func(uintptr, *Point) bool // Checks if the given #graphene_quad_t contains the given #graphene_point_t. func (x *Quad) Contains(PVar *Point) bool { cret := xQuadContains(x.GoPointer(), PVar) return cret } var xQuadFree func(uintptr) // Frees the resources allocated by graphene_quad_alloc() func (x *Quad) Free() { xQuadFree(x.GoPointer()) } var xQuadGetPoint func(uintptr, uint) *Point // Retrieves the point of a #graphene_quad_t at the given index. func (x *Quad) GetPoint(IndexVar uint) *Point { cret := xQuadGetPoint(x.GoPointer(), IndexVar) return cret } var xQuadInit func(uintptr, *Point, *Point, *Point, *Point) *Quad // Initializes a #graphene_quad_t with the given points. func (x *Quad) Init(P1Var *Point, P2Var *Point, P3Var *Point, P4Var *Point) *Quad { cret := xQuadInit(x.GoPointer(), P1Var, P2Var, P3Var, P4Var) return cret } var xQuadInitFromPoints func(uintptr, *[4]Point) *Quad // Initializes a #graphene_quad_t using an array of points. func (x *Quad) InitFromPoints(PointsVar [4]Point) *Quad { cret := xQuadInitFromPoints(x.GoPointer(), &PointsVar) return cret } var xQuadInitFromRect func(uintptr, *Rect) *Quad // Initializes a #graphene_quad_t using the four corners of the // given #graphene_rect_t. func (x *Quad) InitFromRect(RVar *Rect) *Quad { cret := xQuadInitFromRect(x.GoPointer(), RVar) 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(&xQuadGLibType, libs, "graphene_quad_get_type") core.PuregoSafeRegister(&xQuadAlloc, libs, "graphene_quad_alloc") core.PuregoSafeRegister(&xQuadBounds, libs, "graphene_quad_bounds") core.PuregoSafeRegister(&xQuadContains, libs, "graphene_quad_contains") core.PuregoSafeRegister(&xQuadFree, libs, "graphene_quad_free") core.PuregoSafeRegister(&xQuadGetPoint, libs, "graphene_quad_get_point") core.PuregoSafeRegister(&xQuadInit, libs, "graphene_quad_init") core.PuregoSafeRegister(&xQuadInitFromPoints, libs, "graphene_quad_init_from_points") core.PuregoSafeRegister(&xQuadInitFromRect, libs, "graphene_quad_init_from_rect") }