// Package pango was automatically generated by github.com/bnema/puregotk DO NOT EDIT package pango import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject/types" ) type FontsetSimpleClass struct { _ structs.HostLayout } func (x *FontsetSimpleClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // `PangoFontsetSimple` is a implementation of the abstract // `PangoFontset` base class as an array of fonts. // // When creating a `PangoFontsetSimple`, you have to provide // the array of fonts that make up the fontset. type FontsetSimple struct { Fontset } var xFontsetSimpleGLibType func() types.GType func FontsetSimpleGLibType() types.GType { return xFontsetSimpleGLibType() } func FontsetSimpleNewFromInternalPtr(ptr uintptr) *FontsetSimple { cls := &FontsetSimple{} cls.Ptr = ptr return cls } var xNewFontsetSimple func(*Language) uintptr // Creates a new `PangoFontsetSimple` for the given language. func NewFontsetSimple(LanguageVar *Language) *FontsetSimple { var cls *FontsetSimple cret := xNewFontsetSimple(LanguageVar) if cret == 0 { return nil } cls = &FontsetSimple{} cls.Ptr = cret return cls } var xFontsetSimpleAppend func(uintptr, uintptr) // Adds a font to the fontset. // // The fontset takes ownership of @font. func (x *FontsetSimple) Append(FontVar *Font) { xFontsetSimpleAppend(x.GoPointer(), FontVar.GoPointer()) } var xFontsetSimpleSize func(uintptr) int // Returns the number of fonts in the fontset. func (x *FontsetSimple) Size() int { cret := xFontsetSimpleSize(x.GoPointer()) return cret } func (c *FontsetSimple) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *FontsetSimple) SetGoPointer(ptr uintptr) { c.Ptr = ptr } func init() { core.SetPackageName("PANGO", "pango") core.SetSharedLibraries("PANGO", []string{"libpango-1.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("PANGO") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xFontsetSimpleGLibType, libs, "pango_fontset_simple_get_type") core.PuregoSafeRegister(&xNewFontsetSimple, libs, "pango_fontset_simple_new") core.PuregoSafeRegister(&xFontsetSimpleAppend, libs, "pango_fontset_simple_append") core.PuregoSafeRegister(&xFontsetSimpleSize, libs, "pango_fontset_simple_size") }