// 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 OverlayLayoutChildClass struct { _ structs.HostLayout ParentClass LayoutChildClass } func (x *OverlayLayoutChildClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type OverlayLayoutClass struct { _ structs.HostLayout ParentClass LayoutManagerClass } func (x *OverlayLayoutClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // The layout manager used by [class@Gtk.Overlay]. // // It places widgets as overlays on top of the main child. // // This is not a reusable layout manager, since it expects its widget // to be a `GtkOverlay`. It is only listed here so that its layout // properties get documented. type OverlayLayout struct { LayoutManager } var xOverlayLayoutGLibType func() types.GType func OverlayLayoutGLibType() types.GType { return xOverlayLayoutGLibType() } func OverlayLayoutNewFromInternalPtr(ptr uintptr) *OverlayLayout { cls := &OverlayLayout{} cls.Ptr = ptr return cls } var xNewOverlayLayout func() uintptr // Creates a new `GtkOverlayLayout` instance. func NewOverlayLayout() *OverlayLayout { var cls *OverlayLayout cret := xNewOverlayLayout() if cret == 0 { return nil } cls = &OverlayLayout{} cls.Ptr = cret return cls } func (c *OverlayLayout) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *OverlayLayout) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // `GtkLayoutChild` subclass for children in a `GtkOverlayLayout`. type OverlayLayoutChild struct { LayoutChild } var xOverlayLayoutChildGLibType func() types.GType func OverlayLayoutChildGLibType() types.GType { return xOverlayLayoutChildGLibType() } func OverlayLayoutChildNewFromInternalPtr(ptr uintptr) *OverlayLayoutChild { cls := &OverlayLayoutChild{} cls.Ptr = ptr return cls } var xOverlayLayoutChildGetClipOverlay func(uintptr) bool // Retrieves whether the child is clipped. func (x *OverlayLayoutChild) GetClipOverlay() bool { cret := xOverlayLayoutChildGetClipOverlay(x.GoPointer()) return cret } var xOverlayLayoutChildGetMeasure func(uintptr) bool // Retrieves whether the child is measured. func (x *OverlayLayoutChild) GetMeasure() bool { cret := xOverlayLayoutChildGetMeasure(x.GoPointer()) return cret } var xOverlayLayoutChildSetClipOverlay func(uintptr, bool) // Sets whether to clip this child. func (x *OverlayLayoutChild) SetClipOverlay(ClipOverlayVar bool) { xOverlayLayoutChildSetClipOverlay(x.GoPointer(), ClipOverlayVar) } var xOverlayLayoutChildSetMeasure func(uintptr, bool) // Sets whether to measure this child. func (x *OverlayLayoutChild) SetMeasure(MeasureVar bool) { xOverlayLayoutChildSetMeasure(x.GoPointer(), MeasureVar) } func (c *OverlayLayoutChild) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *OverlayLayoutChild) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyClipOverlay sets the "clip-overlay" property. // Whether the child should be clipped to fit the parent's size. func (x *OverlayLayoutChild) SetPropertyClipOverlay(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("clip-overlay", &v) } // GetPropertyClipOverlay gets the "clip-overlay" property. // Whether the child should be clipped to fit the parent's size. func (x *OverlayLayoutChild) GetPropertyClipOverlay() bool { var v gobject.Value x.GetProperty("clip-overlay", &v) return v.GetBoolean() } // SetPropertyMeasure sets the "measure" property. // Whether the child size should contribute to the `GtkOverlayLayout`'s // measurement. func (x *OverlayLayoutChild) SetPropertyMeasure(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("measure", &v) } // GetPropertyMeasure gets the "measure" property. // Whether the child size should contribute to the `GtkOverlayLayout`'s // measurement. func (x *OverlayLayoutChild) GetPropertyMeasure() bool { var v gobject.Value x.GetProperty("measure", &v) return v.GetBoolean() } 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(&xOverlayLayoutGLibType, libs, "gtk_overlay_layout_get_type") core.PuregoSafeRegister(&xNewOverlayLayout, libs, "gtk_overlay_layout_new") core.PuregoSafeRegister(&xOverlayLayoutChildGLibType, libs, "gtk_overlay_layout_child_get_type") core.PuregoSafeRegister(&xOverlayLayoutChildGetClipOverlay, libs, "gtk_overlay_layout_child_get_clip_overlay") core.PuregoSafeRegister(&xOverlayLayoutChildGetMeasure, libs, "gtk_overlay_layout_child_get_measure") core.PuregoSafeRegister(&xOverlayLayoutChildSetClipOverlay, libs, "gtk_overlay_layout_child_set_clip_overlay") core.PuregoSafeRegister(&xOverlayLayoutChildSetMeasure, libs, "gtk_overlay_layout_child_set_measure") }