// 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 ConstraintGuideClass struct { _ structs.HostLayout ParentClass gobject.ObjectClass } func (x *ConstraintGuideClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // An invisible layout element in a `GtkConstraintLayout`. // // The `GtkConstraintLayout` treats guides like widgets. They // can be used as the source or target of a `GtkConstraint`. // // Guides have a minimum, maximum and natural size. Depending // on the constraints that are applied, they can act like a // guideline that widgets can be aligned to, or like *flexible // space*. // // Unlike a `GtkWidget`, a `GtkConstraintGuide` will not be drawn. type ConstraintGuide struct { gobject.Object } var xConstraintGuideGLibType func() types.GType func ConstraintGuideGLibType() types.GType { return xConstraintGuideGLibType() } func ConstraintGuideNewFromInternalPtr(ptr uintptr) *ConstraintGuide { cls := &ConstraintGuide{} cls.Ptr = ptr return cls } var xNewConstraintGuide func() uintptr // Creates a new `GtkConstraintGuide` object. func NewConstraintGuide() *ConstraintGuide { var cls *ConstraintGuide cret := xNewConstraintGuide() if cret == 0 { return nil } cls = &ConstraintGuide{} cls.Ptr = cret return cls } var xConstraintGuideGetMaxSize func(uintptr, *int, *int) // Gets the maximum size of @guide. func (x *ConstraintGuide) GetMaxSize(WidthVar *int, HeightVar *int) { xConstraintGuideGetMaxSize(x.GoPointer(), WidthVar, HeightVar) } var xConstraintGuideGetMinSize func(uintptr, *int, *int) // Gets the minimum size of @guide. func (x *ConstraintGuide) GetMinSize(WidthVar *int, HeightVar *int) { xConstraintGuideGetMinSize(x.GoPointer(), WidthVar, HeightVar) } var xConstraintGuideGetName func(uintptr) string // Retrieves the name set using gtk_constraint_guide_set_name(). func (x *ConstraintGuide) GetName() string { cret := xConstraintGuideGetName(x.GoPointer()) return cret } var xConstraintGuideGetNatSize func(uintptr, *int, *int) // Gets the natural size of @guide. func (x *ConstraintGuide) GetNatSize(WidthVar *int, HeightVar *int) { xConstraintGuideGetNatSize(x.GoPointer(), WidthVar, HeightVar) } var xConstraintGuideGetStrength func(uintptr) ConstraintStrength // Retrieves the strength set using gtk_constraint_guide_set_strength(). func (x *ConstraintGuide) GetStrength() ConstraintStrength { cret := xConstraintGuideGetStrength(x.GoPointer()) return cret } var xConstraintGuideSetMaxSize func(uintptr, int, int) // Sets the maximum size of @guide. // // If @guide is attached to a `GtkConstraintLayout`, // the constraints will be updated to reflect the new size. func (x *ConstraintGuide) SetMaxSize(WidthVar int, HeightVar int) { xConstraintGuideSetMaxSize(x.GoPointer(), WidthVar, HeightVar) } var xConstraintGuideSetMinSize func(uintptr, int, int) // Sets the minimum size of @guide. // // If @guide is attached to a `GtkConstraintLayout`, // the constraints will be updated to reflect the new size. func (x *ConstraintGuide) SetMinSize(WidthVar int, HeightVar int) { xConstraintGuideSetMinSize(x.GoPointer(), WidthVar, HeightVar) } var xConstraintGuideSetName func(uintptr, uintptr) // Sets a name for the given `GtkConstraintGuide`. // // The name is useful for debugging purposes. func (x *ConstraintGuide) SetName(NameVar *string) { NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) xConstraintGuideSetName(x.GoPointer(), NameVarPtr) } var xConstraintGuideSetNatSize func(uintptr, int, int) // Sets the natural size of @guide. // // If @guide is attached to a `GtkConstraintLayout`, // the constraints will be updated to reflect the new size. func (x *ConstraintGuide) SetNatSize(WidthVar int, HeightVar int) { xConstraintGuideSetNatSize(x.GoPointer(), WidthVar, HeightVar) } var xConstraintGuideSetStrength func(uintptr, ConstraintStrength) // Sets the strength of the constraint on the natural size of the // given `GtkConstraintGuide`. func (x *ConstraintGuide) SetStrength(StrengthVar ConstraintStrength) { xConstraintGuideSetStrength(x.GoPointer(), StrengthVar) } func (c *ConstraintGuide) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *ConstraintGuide) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyMaxHeight sets the "max-height" property. // The maximum height of the guide. func (x *ConstraintGuide) SetPropertyMaxHeight(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("max-height", &v) } // GetPropertyMaxHeight gets the "max-height" property. // The maximum height of the guide. func (x *ConstraintGuide) GetPropertyMaxHeight() int { var v gobject.Value x.GetProperty("max-height", &v) return v.GetInt() } // SetPropertyMaxWidth sets the "max-width" property. // The maximum width of the guide. func (x *ConstraintGuide) SetPropertyMaxWidth(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("max-width", &v) } // GetPropertyMaxWidth gets the "max-width" property. // The maximum width of the guide. func (x *ConstraintGuide) GetPropertyMaxWidth() int { var v gobject.Value x.GetProperty("max-width", &v) return v.GetInt() } // SetPropertyMinHeight sets the "min-height" property. // The minimum height of the guide. func (x *ConstraintGuide) SetPropertyMinHeight(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("min-height", &v) } // GetPropertyMinHeight gets the "min-height" property. // The minimum height of the guide. func (x *ConstraintGuide) GetPropertyMinHeight() int { var v gobject.Value x.GetProperty("min-height", &v) return v.GetInt() } // SetPropertyMinWidth sets the "min-width" property. // The minimum width of the guide. func (x *ConstraintGuide) SetPropertyMinWidth(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("min-width", &v) } // GetPropertyMinWidth gets the "min-width" property. // The minimum width of the guide. func (x *ConstraintGuide) GetPropertyMinWidth() int { var v gobject.Value x.GetProperty("min-width", &v) return v.GetInt() } // SetPropertyName sets the "name" property. // A name that identifies the `GtkConstraintGuide`, for debugging. func (x *ConstraintGuide) SetPropertyName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("name", &v) } // GetPropertyName gets the "name" property. // A name that identifies the `GtkConstraintGuide`, for debugging. func (x *ConstraintGuide) GetPropertyName() string { var v gobject.Value x.GetProperty("name", &v) return v.GetString() } // SetPropertyNatHeight sets the "nat-height" property. // The preferred, or natural, height of the guide. func (x *ConstraintGuide) SetPropertyNatHeight(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("nat-height", &v) } // GetPropertyNatHeight gets the "nat-height" property. // The preferred, or natural, height of the guide. func (x *ConstraintGuide) GetPropertyNatHeight() int { var v gobject.Value x.GetProperty("nat-height", &v) return v.GetInt() } // SetPropertyNatWidth sets the "nat-width" property. // The preferred, or natural, width of the guide. func (x *ConstraintGuide) SetPropertyNatWidth(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("nat-width", &v) } // GetPropertyNatWidth gets the "nat-width" property. // The preferred, or natural, width of the guide. func (x *ConstraintGuide) GetPropertyNatWidth() int { var v gobject.Value x.GetProperty("nat-width", &v) return v.GetInt() } 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(&xConstraintGuideGLibType, libs, "gtk_constraint_guide_get_type") core.PuregoSafeRegister(&xNewConstraintGuide, libs, "gtk_constraint_guide_new") core.PuregoSafeRegister(&xConstraintGuideGetMaxSize, libs, "gtk_constraint_guide_get_max_size") core.PuregoSafeRegister(&xConstraintGuideGetMinSize, libs, "gtk_constraint_guide_get_min_size") core.PuregoSafeRegister(&xConstraintGuideGetName, libs, "gtk_constraint_guide_get_name") core.PuregoSafeRegister(&xConstraintGuideGetNatSize, libs, "gtk_constraint_guide_get_nat_size") core.PuregoSafeRegister(&xConstraintGuideGetStrength, libs, "gtk_constraint_guide_get_strength") core.PuregoSafeRegister(&xConstraintGuideSetMaxSize, libs, "gtk_constraint_guide_set_max_size") core.PuregoSafeRegister(&xConstraintGuideSetMinSize, libs, "gtk_constraint_guide_set_min_size") core.PuregoSafeRegister(&xConstraintGuideSetName, libs, "gtk_constraint_guide_set_name") core.PuregoSafeRegister(&xConstraintGuideSetNatSize, libs, "gtk_constraint_guide_set_nat_size") core.PuregoSafeRegister(&xConstraintGuideSetStrength, libs, "gtk_constraint_guide_set_strength") }