// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT package adw import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" "github.com/bnema/puregotk/v4/gtk" ) type LayoutClass struct { _ structs.HostLayout ParentClass gobject.ObjectClass } func (x *LayoutClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // An individual layout in [class@MultiLayoutView]. type Layout struct { gobject.Object } var xLayoutGLibType func() types.GType func LayoutGLibType() types.GType { return xLayoutGLibType() } func LayoutNewFromInternalPtr(ptr uintptr) *Layout { cls := &Layout{} cls.Ptr = ptr return cls } var xNewLayout func(uintptr) uintptr // Creates a new `AdwLayout` that contains @content. func NewLayout(ContentVar *gtk.Widget) *Layout { var cls *Layout cret := xNewLayout(ContentVar.GoPointer()) if cret == 0 { return nil } cls = &Layout{} cls.Ptr = cret return cls } var xLayoutGetContent func(uintptr) uintptr // Gets the content widget. func (x *Layout) GetContent() *gtk.Widget { var cls *gtk.Widget cret := xLayoutGetContent(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xLayoutGetName func(uintptr) string // Gets the name of the layout. func (x *Layout) GetName() string { cret := xLayoutGetName(x.GoPointer()) return cret } var xLayoutSetName func(uintptr, uintptr) // Sets the name of the layout. func (x *Layout) SetName(NameVar *string) { NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) xLayoutSetName(x.GoPointer(), NameVarPtr) } func (c *Layout) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *Layout) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyName sets the "name" property. // The name of the layout. func (x *Layout) SetPropertyName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("name", &v) } // GetPropertyName gets the "name" property. // The name of the layout. func (x *Layout) GetPropertyName() string { var v gobject.Value x.GetProperty("name", &v) return v.GetString() } // Gets the ID of the @buildable object. // // `GtkBuilder` sets the name based on the ID attribute // of the `<object>` tag used to construct the @buildable. func (x *Layout) GetBuildableId() string { cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer()) return cret } func init() { core.SetPackageName("ADW", "libadwaita-1") core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("ADW") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xLayoutGLibType, libs, "adw_layout_get_type") core.PuregoSafeRegister(&xNewLayout, libs, "adw_layout_new") core.PuregoSafeRegister(&xLayoutGetContent, libs, "adw_layout_get_content") core.PuregoSafeRegister(&xLayoutGetName, libs, "adw_layout_get_name") core.PuregoSafeRegister(&xLayoutSetName, libs, "adw_layout_set_name") }