// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk 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" ) type LayoutChildClass struct { _ structs.HostLayout ParentClass gobject.ObjectClass } func (x *LayoutChildClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // The base class for objects that are meant to hold layout properties. // // If a `GtkLayoutManager` has per-child properties, like their packing type, // or the horizontal and vertical span, or the icon name, then the layout // manager should use a `GtkLayoutChild` implementation to store those properties. // // A `GtkLayoutChild` instance is only ever valid while a widget is part // of a layout. type LayoutChild struct { gobject.Object } var xLayoutChildGLibType func() types.GType func LayoutChildGLibType() types.GType { return xLayoutChildGLibType() } func LayoutChildNewFromInternalPtr(ptr uintptr) *LayoutChild { cls := &LayoutChild{} cls.Ptr = ptr return cls } var xLayoutChildGetChildWidget func(uintptr) uintptr // Retrieves the `GtkWidget` associated to the given @layout_child. func (x *LayoutChild) GetChildWidget() *Widget { var cls *Widget cret := xLayoutChildGetChildWidget(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xLayoutChildGetLayoutManager func(uintptr) uintptr // Retrieves the `GtkLayoutManager` instance that created the // given @layout_child. func (x *LayoutChild) GetLayoutManager() *LayoutManager { var cls *LayoutManager cret := xLayoutChildGetLayoutManager(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &LayoutManager{} cls.Ptr = cret return cls } func (c *LayoutChild) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *LayoutChild) SetGoPointer(ptr uintptr) { c.Ptr = ptr } func init() { core.SetPackageName("GTK", "gtk4") core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"}) var libs []uintptr for _, libPath := range core.GetPaths("GTK") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xLayoutChildGLibType, libs, "gtk_layout_child_get_type") core.PuregoSafeRegister(&xLayoutChildGetChildWidget, libs, "gtk_layout_child_get_child_widget") core.PuregoSafeRegister(&xLayoutChildGetLayoutManager, libs, "gtk_layout_child_get_layout_manager") }