// 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 GridLayoutChildClass struct { _ structs.HostLayout ParentClass LayoutChildClass } func (x *GridLayoutChildClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type GridLayoutClass struct { _ structs.HostLayout ParentClass LayoutManagerClass } func (x *GridLayoutClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // Arranges child widgets in rows and columns. // // Children have an "attach point" defined by the horizontal and vertical // index of the cell they occupy; children can span multiple rows or columns. // The layout properties for setting the attach points and spans are set // using the [class@Gtk.GridLayoutChild] associated to each child widget. // // The behaviour of `GtkGridLayout` when several children occupy the same // grid cell is undefined. // // `GtkGridLayout` can be used like a `GtkBoxLayout` if all children are // attached to the same row or column; however, if you only ever need a // single row or column, you should consider using `GtkBoxLayout`. type GridLayout struct { LayoutManager } var xGridLayoutGLibType func() types.GType func GridLayoutGLibType() types.GType { return xGridLayoutGLibType() } func GridLayoutNewFromInternalPtr(ptr uintptr) *GridLayout { cls := &GridLayout{} cls.Ptr = ptr return cls } var xNewGridLayout func() uintptr // Creates a new `GtkGridLayout`. func NewGridLayout() *GridLayout { var cls *GridLayout cret := xNewGridLayout() if cret == 0 { return nil } cls = &GridLayout{} cls.Ptr = cret return cls } var xGridLayoutGetBaselineRow func(uintptr) int // Retrieves the row set with gtk_grid_layout_set_baseline_row(). func (x *GridLayout) GetBaselineRow() int { cret := xGridLayoutGetBaselineRow(x.GoPointer()) return cret } var xGridLayoutGetColumnHomogeneous func(uintptr) bool // Checks whether all columns of @grid should have the same width. func (x *GridLayout) GetColumnHomogeneous() bool { cret := xGridLayoutGetColumnHomogeneous(x.GoPointer()) return cret } var xGridLayoutGetColumnSpacing func(uintptr) uint // Retrieves the spacing set with gtk_grid_layout_set_column_spacing(). func (x *GridLayout) GetColumnSpacing() uint { cret := xGridLayoutGetColumnSpacing(x.GoPointer()) return cret } var xGridLayoutGetRowBaselinePosition func(uintptr, int) BaselinePosition // Returns the baseline position of @row. // // If no value has been set with // [method@Gtk.GridLayout.set_row_baseline_position], // the default value of %GTK_BASELINE_POSITION_CENTER // is returned. func (x *GridLayout) GetRowBaselinePosition(RowVar int) BaselinePosition { cret := xGridLayoutGetRowBaselinePosition(x.GoPointer(), RowVar) return cret } var xGridLayoutGetRowHomogeneous func(uintptr) bool // Checks whether all rows of @grid should have the same height. func (x *GridLayout) GetRowHomogeneous() bool { cret := xGridLayoutGetRowHomogeneous(x.GoPointer()) return cret } var xGridLayoutGetRowSpacing func(uintptr) uint // Retrieves the spacing set with gtk_grid_layout_set_row_spacing(). func (x *GridLayout) GetRowSpacing() uint { cret := xGridLayoutGetRowSpacing(x.GoPointer()) return cret } var xGridLayoutSetBaselineRow func(uintptr, int) // Sets which row defines the global baseline for the entire grid. // // Each row in the grid can have its own local baseline, but only // one of those is global, meaning it will be the baseline in the // parent of the @grid. func (x *GridLayout) SetBaselineRow(RowVar int) { xGridLayoutSetBaselineRow(x.GoPointer(), RowVar) } var xGridLayoutSetColumnHomogeneous func(uintptr, bool) // Sets whether all columns of @grid should have the same width. func (x *GridLayout) SetColumnHomogeneous(HomogeneousVar bool) { xGridLayoutSetColumnHomogeneous(x.GoPointer(), HomogeneousVar) } var xGridLayoutSetColumnSpacing func(uintptr, uint) // Sets the amount of space to insert between consecutive columns. func (x *GridLayout) SetColumnSpacing(SpacingVar uint) { xGridLayoutSetColumnSpacing(x.GoPointer(), SpacingVar) } var xGridLayoutSetRowBaselinePosition func(uintptr, int, BaselinePosition) // Sets how the baseline should be positioned on @row of the // grid, in case that row is assigned more space than is requested. func (x *GridLayout) SetRowBaselinePosition(RowVar int, PosVar BaselinePosition) { xGridLayoutSetRowBaselinePosition(x.GoPointer(), RowVar, PosVar) } var xGridLayoutSetRowHomogeneous func(uintptr, bool) // Sets whether all rows of @grid should have the same height. func (x *GridLayout) SetRowHomogeneous(HomogeneousVar bool) { xGridLayoutSetRowHomogeneous(x.GoPointer(), HomogeneousVar) } var xGridLayoutSetRowSpacing func(uintptr, uint) // Sets the amount of space to insert between consecutive rows. func (x *GridLayout) SetRowSpacing(SpacingVar uint) { xGridLayoutSetRowSpacing(x.GoPointer(), SpacingVar) } func (c *GridLayout) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *GridLayout) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyBaselineRow sets the "baseline-row" property. // The row to align to the baseline, when `GtkWidget:valign` is set // to %GTK_ALIGN_BASELINE. func (x *GridLayout) SetPropertyBaselineRow(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("baseline-row", &v) } // GetPropertyBaselineRow gets the "baseline-row" property. // The row to align to the baseline, when `GtkWidget:valign` is set // to %GTK_ALIGN_BASELINE. func (x *GridLayout) GetPropertyBaselineRow() int { var v gobject.Value x.GetProperty("baseline-row", &v) return v.GetInt() } // SetPropertyColumnHomogeneous sets the "column-homogeneous" property. // Whether all the columns in the grid have the same width. func (x *GridLayout) SetPropertyColumnHomogeneous(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("column-homogeneous", &v) } // GetPropertyColumnHomogeneous gets the "column-homogeneous" property. // Whether all the columns in the grid have the same width. func (x *GridLayout) GetPropertyColumnHomogeneous() bool { var v gobject.Value x.GetProperty("column-homogeneous", &v) return v.GetBoolean() } // SetPropertyColumnSpacing sets the "column-spacing" property. // The amount of space between to consecutive columns. func (x *GridLayout) SetPropertyColumnSpacing(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("column-spacing", &v) } // GetPropertyColumnSpacing gets the "column-spacing" property. // The amount of space between to consecutive columns. func (x *GridLayout) GetPropertyColumnSpacing() int { var v gobject.Value x.GetProperty("column-spacing", &v) return v.GetInt() } // SetPropertyRowHomogeneous sets the "row-homogeneous" property. // Whether all the rows in the grid have the same height. func (x *GridLayout) SetPropertyRowHomogeneous(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("row-homogeneous", &v) } // GetPropertyRowHomogeneous gets the "row-homogeneous" property. // Whether all the rows in the grid have the same height. func (x *GridLayout) GetPropertyRowHomogeneous() bool { var v gobject.Value x.GetProperty("row-homogeneous", &v) return v.GetBoolean() } // SetPropertyRowSpacing sets the "row-spacing" property. // The amount of space between to consecutive rows. func (x *GridLayout) SetPropertyRowSpacing(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("row-spacing", &v) } // GetPropertyRowSpacing gets the "row-spacing" property. // The amount of space between to consecutive rows. func (x *GridLayout) GetPropertyRowSpacing() int { var v gobject.Value x.GetProperty("row-spacing", &v) return v.GetInt() } // `GtkLayoutChild` subclass for children in a `GtkGridLayout`. type GridLayoutChild struct { LayoutChild } var xGridLayoutChildGLibType func() types.GType func GridLayoutChildGLibType() types.GType { return xGridLayoutChildGLibType() } func GridLayoutChildNewFromInternalPtr(ptr uintptr) *GridLayoutChild { cls := &GridLayoutChild{} cls.Ptr = ptr return cls } var xGridLayoutChildGetColumn func(uintptr) int // Retrieves the column number to which @child attaches its left side. func (x *GridLayoutChild) GetColumn() int { cret := xGridLayoutChildGetColumn(x.GoPointer()) return cret } var xGridLayoutChildGetColumnSpan func(uintptr) int // Retrieves the number of columns that @child spans to. func (x *GridLayoutChild) GetColumnSpan() int { cret := xGridLayoutChildGetColumnSpan(x.GoPointer()) return cret } var xGridLayoutChildGetRow func(uintptr) int // Retrieves the row number to which @child attaches its top side. func (x *GridLayoutChild) GetRow() int { cret := xGridLayoutChildGetRow(x.GoPointer()) return cret } var xGridLayoutChildGetRowSpan func(uintptr) int // Retrieves the number of rows that @child spans to. func (x *GridLayoutChild) GetRowSpan() int { cret := xGridLayoutChildGetRowSpan(x.GoPointer()) return cret } var xGridLayoutChildSetColumn func(uintptr, int) // Sets the column number to attach the left side of @child. func (x *GridLayoutChild) SetColumn(ColumnVar int) { xGridLayoutChildSetColumn(x.GoPointer(), ColumnVar) } var xGridLayoutChildSetColumnSpan func(uintptr, int) // Sets the number of columns @child spans to. func (x *GridLayoutChild) SetColumnSpan(SpanVar int) { xGridLayoutChildSetColumnSpan(x.GoPointer(), SpanVar) } var xGridLayoutChildSetRow func(uintptr, int) // Sets the row to place @child in. func (x *GridLayoutChild) SetRow(RowVar int) { xGridLayoutChildSetRow(x.GoPointer(), RowVar) } var xGridLayoutChildSetRowSpan func(uintptr, int) // Sets the number of rows @child spans to. func (x *GridLayoutChild) SetRowSpan(SpanVar int) { xGridLayoutChildSetRowSpan(x.GoPointer(), SpanVar) } func (c *GridLayoutChild) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *GridLayoutChild) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyColumn sets the "column" property. // The column to place the child in. func (x *GridLayoutChild) SetPropertyColumn(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("column", &v) } // GetPropertyColumn gets the "column" property. // The column to place the child in. func (x *GridLayoutChild) GetPropertyColumn() int { var v gobject.Value x.GetProperty("column", &v) return v.GetInt() } // SetPropertyColumnSpan sets the "column-span" property. // The number of columns the child spans to. func (x *GridLayoutChild) SetPropertyColumnSpan(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("column-span", &v) } // GetPropertyColumnSpan gets the "column-span" property. // The number of columns the child spans to. func (x *GridLayoutChild) GetPropertyColumnSpan() int { var v gobject.Value x.GetProperty("column-span", &v) return v.GetInt() } // SetPropertyRow sets the "row" property. // The row to place the child in. func (x *GridLayoutChild) SetPropertyRow(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("row", &v) } // GetPropertyRow gets the "row" property. // The row to place the child in. func (x *GridLayoutChild) GetPropertyRow() int { var v gobject.Value x.GetProperty("row", &v) return v.GetInt() } // SetPropertyRowSpan sets the "row-span" property. // The number of rows the child spans to. func (x *GridLayoutChild) SetPropertyRowSpan(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("row-span", &v) } // GetPropertyRowSpan gets the "row-span" property. // The number of rows the child spans to. func (x *GridLayoutChild) GetPropertyRowSpan() int { var v gobject.Value x.GetProperty("row-span", &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(&xGridLayoutGLibType, libs, "gtk_grid_layout_get_type") core.PuregoSafeRegister(&xNewGridLayout, libs, "gtk_grid_layout_new") core.PuregoSafeRegister(&xGridLayoutGetBaselineRow, libs, "gtk_grid_layout_get_baseline_row") core.PuregoSafeRegister(&xGridLayoutGetColumnHomogeneous, libs, "gtk_grid_layout_get_column_homogeneous") core.PuregoSafeRegister(&xGridLayoutGetColumnSpacing, libs, "gtk_grid_layout_get_column_spacing") core.PuregoSafeRegister(&xGridLayoutGetRowBaselinePosition, libs, "gtk_grid_layout_get_row_baseline_position") core.PuregoSafeRegister(&xGridLayoutGetRowHomogeneous, libs, "gtk_grid_layout_get_row_homogeneous") core.PuregoSafeRegister(&xGridLayoutGetRowSpacing, libs, "gtk_grid_layout_get_row_spacing") core.PuregoSafeRegister(&xGridLayoutSetBaselineRow, libs, "gtk_grid_layout_set_baseline_row") core.PuregoSafeRegister(&xGridLayoutSetColumnHomogeneous, libs, "gtk_grid_layout_set_column_homogeneous") core.PuregoSafeRegister(&xGridLayoutSetColumnSpacing, libs, "gtk_grid_layout_set_column_spacing") core.PuregoSafeRegister(&xGridLayoutSetRowBaselinePosition, libs, "gtk_grid_layout_set_row_baseline_position") core.PuregoSafeRegister(&xGridLayoutSetRowHomogeneous, libs, "gtk_grid_layout_set_row_homogeneous") core.PuregoSafeRegister(&xGridLayoutSetRowSpacing, libs, "gtk_grid_layout_set_row_spacing") core.PuregoSafeRegister(&xGridLayoutChildGLibType, libs, "gtk_grid_layout_child_get_type") core.PuregoSafeRegister(&xGridLayoutChildGetColumn, libs, "gtk_grid_layout_child_get_column") core.PuregoSafeRegister(&xGridLayoutChildGetColumnSpan, libs, "gtk_grid_layout_child_get_column_span") core.PuregoSafeRegister(&xGridLayoutChildGetRow, libs, "gtk_grid_layout_child_get_row") core.PuregoSafeRegister(&xGridLayoutChildGetRowSpan, libs, "gtk_grid_layout_child_get_row_span") core.PuregoSafeRegister(&xGridLayoutChildSetColumn, libs, "gtk_grid_layout_child_set_column") core.PuregoSafeRegister(&xGridLayoutChildSetColumnSpan, libs, "gtk_grid_layout_child_set_column_span") core.PuregoSafeRegister(&xGridLayoutChildSetRow, libs, "gtk_grid_layout_child_set_row") core.PuregoSafeRegister(&xGridLayoutChildSetRowSpan, libs, "gtk_grid_layout_child_set_row_span") }