// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/glib" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) // A function to set the properties of a cell instead of just using the // straight mapping between the cell and the model. // // This function is useful for customizing the cell renderer. For example, // a function might get an* integer from the @tree_model, and render it to // the “text” attribute of “cell” by converting it to its written equivalent. // // See also: gtk_tree_view_column_set_cell_data_func() type TreeCellDataFunc func(uintptr, uintptr, uintptr, *TreeIter, uintptr) // The sizing method the column uses to determine its width. Please note // that %GTK_TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large views, and // can make columns appear choppy. type TreeViewColumnSizing int var xTreeViewColumnSizingGLibType func() types.GType func TreeViewColumnSizingGLibType() types.GType { return xTreeViewColumnSizingGLibType() } const ( // Columns only get bigger in reaction to changes in the model TreeViewColumnGrowOnlyValue TreeViewColumnSizing = 0 // Columns resize to be the optimal size every time the model changes. TreeViewColumnAutosizeValue TreeViewColumnSizing = 1 // Columns are a fixed numbers of pixels wide. TreeViewColumnFixedValue TreeViewColumnSizing = 2 ) // A visible column in a [class@Gtk.TreeView] widget // // The `GtkTreeViewColumn` object represents a visible column in a `GtkTreeView` widget. // It allows to set properties of the column header, and functions as a holding pen // for the cell renderers which determine how the data in the column is displayed. // // Please refer to the [tree widget conceptual overview](section-tree-widget.html) // for an overview of all the objects and data types related to the tree widget and // how they work together, and to the [class@Gtk.TreeView] documentation for specifics // about the CSS node structure for treeviews and their headers. type TreeViewColumn struct { gobject.InitiallyUnowned } var xTreeViewColumnGLibType func() types.GType func TreeViewColumnGLibType() types.GType { return xTreeViewColumnGLibType() } func TreeViewColumnNewFromInternalPtr(ptr uintptr) *TreeViewColumn { cls := &TreeViewColumn{} cls.Ptr = ptr return cls } var xNewTreeViewColumn func() uintptr // Creates a new `GtkTreeViewColumn`. func NewTreeViewColumn() *TreeViewColumn { var cls *TreeViewColumn cret := xNewTreeViewColumn() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &TreeViewColumn{} cls.Ptr = cret return cls } var xNewTreeViewColumnWithArea func(uintptr) uintptr // Creates a new `GtkTreeViewColumn` using @area to render its cells. func NewTreeViewColumnWithArea(AreaVar *CellArea) *TreeViewColumn { var cls *TreeViewColumn cret := xNewTreeViewColumnWithArea(AreaVar.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &TreeViewColumn{} cls.Ptr = cret return cls } var xNewTreeViewColumnWithAttributes func(string, uintptr, ...interface{}) uintptr // Creates a new `GtkTreeViewColumn` with a number of default values. // This is equivalent to calling gtk_tree_view_column_set_title(), // gtk_tree_view_column_pack_start(), and // gtk_tree_view_column_set_attributes() on the newly created `GtkTreeViewColumn`. // // Here’s a simple example: // // ```c // // enum { TEXT_COLUMN, COLOR_COLUMN, N_COLUMNS }; // // ... // { // GtkTreeViewColumn *column; // GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); // // column = gtk_tree_view_column_new_with_attributes ("Title", // renderer, // "text", TEXT_COLUMN, // "foreground", COLOR_COLUMN, // NULL); // } // // ``` func NewTreeViewColumnWithAttributes(TitleVar string, CellVar *CellRenderer, varArgs ...interface{}) *TreeViewColumn { var cls *TreeViewColumn cret := xNewTreeViewColumnWithAttributes(TitleVar, CellVar.GoPointer(), varArgs...) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &TreeViewColumn{} cls.Ptr = cret return cls } var xTreeViewColumnAddAttribute func(uintptr, uintptr, string, int) // Adds an attribute mapping to the list in @tree_column. // // The @column is the // column of the model to get a value from, and the @attribute is the // parameter on @cell_renderer to be set from the value. So for example // if column 2 of the model contains strings, you could have the // “text” attribute of a `GtkCellRendererText` get its values from // column 2. func (x *TreeViewColumn) AddAttribute(CellRendererVar *CellRenderer, AttributeVar string, ColumnVar int) { xTreeViewColumnAddAttribute(x.GoPointer(), CellRendererVar.GoPointer(), AttributeVar, ColumnVar) } var xTreeViewColumnCellGetPosition func(uintptr, uintptr, *int, *int) bool // Obtains the horizontal position and size of a cell in a column. // // If the cell is not found in the column, @start_pos and @width // are not changed and %FALSE is returned. func (x *TreeViewColumn) CellGetPosition(CellRendererVar *CellRenderer, XOffsetVar *int, WidthVar *int) bool { cret := xTreeViewColumnCellGetPosition(x.GoPointer(), CellRendererVar.GoPointer(), XOffsetVar, WidthVar) return cret } var xTreeViewColumnCellGetSize func(uintptr, *int, *int, *int, *int) // Obtains the width and height needed to render the column. This is used // primarily by the `GtkTreeView`. func (x *TreeViewColumn) CellGetSize(XOffsetVar *int, YOffsetVar *int, WidthVar *int, HeightVar *int) { xTreeViewColumnCellGetSize(x.GoPointer(), XOffsetVar, YOffsetVar, WidthVar, HeightVar) } var xTreeViewColumnCellIsVisible func(uintptr) bool // Returns %TRUE if any of the cells packed into the @tree_column are visible. // For this to be meaningful, you must first initialize the cells with // gtk_tree_view_column_cell_set_cell_data() func (x *TreeViewColumn) CellIsVisible() bool { cret := xTreeViewColumnCellIsVisible(x.GoPointer()) return cret } var xTreeViewColumnCellSetCellData func(uintptr, uintptr, *TreeIter, bool, bool) // Sets the cell renderer based on the @tree_model and @iter. That is, for // every attribute mapping in @tree_column, it will get a value from the set // column on the @iter, and use that value to set the attribute on the cell // renderer. This is used primarily by the `GtkTreeView`. func (x *TreeViewColumn) CellSetCellData(TreeModelVar TreeModel, IterVar *TreeIter, IsExpanderVar bool, IsExpandedVar bool) { xTreeViewColumnCellSetCellData(x.GoPointer(), TreeModelVar.GoPointer(), IterVar, IsExpanderVar, IsExpandedVar) } var xTreeViewColumnClear func(uintptr) // Unsets all the mappings on all renderers on the @tree_column. func (x *TreeViewColumn) Clear() { xTreeViewColumnClear(x.GoPointer()) } var xTreeViewColumnClearAttributes func(uintptr, uintptr) // Clears all existing attributes previously set with // gtk_tree_view_column_set_attributes(). func (x *TreeViewColumn) ClearAttributes(CellRendererVar *CellRenderer) { xTreeViewColumnClearAttributes(x.GoPointer(), CellRendererVar.GoPointer()) } var xTreeViewColumnClicked func(uintptr) // Emits the “clicked” signal on the column. This function will only work if // @tree_column is clickable. func (x *TreeViewColumn) Clicked() { xTreeViewColumnClicked(x.GoPointer()) } var xTreeViewColumnFocusCell func(uintptr, uintptr) // Sets the current keyboard focus to be at @cell, if the column contains // 2 or more editable and activatable cells. func (x *TreeViewColumn) FocusCell(CellVar *CellRenderer) { xTreeViewColumnFocusCell(x.GoPointer(), CellVar.GoPointer()) } var xTreeViewColumnGetAlignment func(uintptr) float32 // Returns the current x alignment of @tree_column. This value can range // between 0.0 and 1.0. func (x *TreeViewColumn) GetAlignment() float32 { cret := xTreeViewColumnGetAlignment(x.GoPointer()) return cret } var xTreeViewColumnGetButton func(uintptr) uintptr // Returns the button used in the treeview column header func (x *TreeViewColumn) GetButton() *Widget { var cls *Widget cret := xTreeViewColumnGetButton(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xTreeViewColumnGetClickable func(uintptr) bool // Returns %TRUE if the user can click on the header for the column. func (x *TreeViewColumn) GetClickable() bool { cret := xTreeViewColumnGetClickable(x.GoPointer()) return cret } var xTreeViewColumnGetExpand func(uintptr) bool // Returns %TRUE if the column expands to fill available space. func (x *TreeViewColumn) GetExpand() bool { cret := xTreeViewColumnGetExpand(x.GoPointer()) return cret } var xTreeViewColumnGetFixedWidth func(uintptr) int // Gets the fixed width of the column. This may not be the actual displayed // width of the column; for that, use gtk_tree_view_column_get_width(). func (x *TreeViewColumn) GetFixedWidth() int { cret := xTreeViewColumnGetFixedWidth(x.GoPointer()) return cret } var xTreeViewColumnGetMaxWidth func(uintptr) int // Returns the maximum width in pixels of the @tree_column, or -1 if no maximum // width is set. func (x *TreeViewColumn) GetMaxWidth() int { cret := xTreeViewColumnGetMaxWidth(x.GoPointer()) return cret } var xTreeViewColumnGetMinWidth func(uintptr) int // Returns the minimum width in pixels of the @tree_column, or -1 if no minimum // width is set. func (x *TreeViewColumn) GetMinWidth() int { cret := xTreeViewColumnGetMinWidth(x.GoPointer()) return cret } var xTreeViewColumnGetReorderable func(uintptr) bool // Returns %TRUE if the @tree_column can be reordered by the user. func (x *TreeViewColumn) GetReorderable() bool { cret := xTreeViewColumnGetReorderable(x.GoPointer()) return cret } var xTreeViewColumnGetResizable func(uintptr) bool // Returns %TRUE if the @tree_column can be resized by the end user. func (x *TreeViewColumn) GetResizable() bool { cret := xTreeViewColumnGetResizable(x.GoPointer()) return cret } var xTreeViewColumnGetSizing func(uintptr) TreeViewColumnSizing // Returns the current type of @tree_column. func (x *TreeViewColumn) GetSizing() TreeViewColumnSizing { cret := xTreeViewColumnGetSizing(x.GoPointer()) return cret } var xTreeViewColumnGetSortColumnId func(uintptr) int // Gets the logical @sort_column_id that the model sorts on // when this column is selected for sorting. // // See [method@Gtk.TreeViewColumn.set_sort_column_id]. func (x *TreeViewColumn) GetSortColumnId() int { cret := xTreeViewColumnGetSortColumnId(x.GoPointer()) return cret } var xTreeViewColumnGetSortIndicator func(uintptr) bool // Gets the value set by gtk_tree_view_column_set_sort_indicator(). func (x *TreeViewColumn) GetSortIndicator() bool { cret := xTreeViewColumnGetSortIndicator(x.GoPointer()) return cret } var xTreeViewColumnGetSortOrder func(uintptr) SortType // Gets the value set by gtk_tree_view_column_set_sort_order(). func (x *TreeViewColumn) GetSortOrder() SortType { cret := xTreeViewColumnGetSortOrder(x.GoPointer()) return cret } var xTreeViewColumnGetSpacing func(uintptr) int // Returns the spacing of @tree_column. func (x *TreeViewColumn) GetSpacing() int { cret := xTreeViewColumnGetSpacing(x.GoPointer()) return cret } var xTreeViewColumnGetTitle func(uintptr) string // Returns the title of the widget. func (x *TreeViewColumn) GetTitle() string { cret := xTreeViewColumnGetTitle(x.GoPointer()) return cret } var xTreeViewColumnGetTreeView func(uintptr) uintptr // Returns the `GtkTreeView` wherein @tree_column has been inserted. // If @column is currently not inserted in any tree view, %NULL is // returned. func (x *TreeViewColumn) GetTreeView() *Widget { var cls *Widget cret := xTreeViewColumnGetTreeView(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xTreeViewColumnGetVisible func(uintptr) bool // Returns %TRUE if @tree_column is visible. func (x *TreeViewColumn) GetVisible() bool { cret := xTreeViewColumnGetVisible(x.GoPointer()) return cret } var xTreeViewColumnGetWidget func(uintptr) uintptr // Returns the `GtkWidget` in the button on the column header. // // If a custom widget has not been set then %NULL is returned. func (x *TreeViewColumn) GetWidget() *Widget { var cls *Widget cret := xTreeViewColumnGetWidget(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xTreeViewColumnGetWidth func(uintptr) int // Returns the current size of @tree_column in pixels. func (x *TreeViewColumn) GetWidth() int { cret := xTreeViewColumnGetWidth(x.GoPointer()) return cret } var xTreeViewColumnGetXOffset func(uintptr) int // Returns the current X offset of @tree_column in pixels. func (x *TreeViewColumn) GetXOffset() int { cret := xTreeViewColumnGetXOffset(x.GoPointer()) return cret } var xTreeViewColumnPackEnd func(uintptr, uintptr, bool) // Adds the @cell to end of the column. If @expand is %FALSE, then the @cell // is allocated no more space than it needs. Any unused space is divided // evenly between cells for which @expand is %TRUE. func (x *TreeViewColumn) PackEnd(CellVar *CellRenderer, ExpandVar bool) { xTreeViewColumnPackEnd(x.GoPointer(), CellVar.GoPointer(), ExpandVar) } var xTreeViewColumnPackStart func(uintptr, uintptr, bool) // Packs the @cell into the beginning of the column. If @expand is %FALSE, then // the @cell is allocated no more space than it needs. Any unused space is divided // evenly between cells for which @expand is %TRUE. func (x *TreeViewColumn) PackStart(CellVar *CellRenderer, ExpandVar bool) { xTreeViewColumnPackStart(x.GoPointer(), CellVar.GoPointer(), ExpandVar) } var xTreeViewColumnQueueResize func(uintptr) // Flags the column, and the cell renderers added to this column, to have // their sizes renegotiated. func (x *TreeViewColumn) QueueResize() { xTreeViewColumnQueueResize(x.GoPointer()) } var xTreeViewColumnSetAlignment func(uintptr, float32) // Sets the alignment of the title or custom widget inside the column header. // The alignment determines its location inside the button -- 0.0 for left, 0.5 // for center, 1.0 for right. func (x *TreeViewColumn) SetAlignment(XalignVar float32) { xTreeViewColumnSetAlignment(x.GoPointer(), XalignVar) } var xTreeViewColumnSetAttributes func(uintptr, uintptr, ...interface{}) // Sets the attributes in the list as the attributes of @tree_column. // // The attributes should be in attribute/column order, as in // gtk_tree_view_column_add_attribute(). All existing attributes // are removed, and replaced with the new attributes. func (x *TreeViewColumn) SetAttributes(CellRendererVar *CellRenderer, varArgs ...interface{}) { xTreeViewColumnSetAttributes(x.GoPointer(), CellRendererVar.GoPointer(), varArgs...) } var xTreeViewColumnSetCellDataFunc func(uintptr, uintptr, uintptr, uintptr, uintptr) // Sets the `GtkTreeCellDataFunc` to use for the column. // // This // function is used instead of the standard attributes mapping for // setting the column value, and should set the value of @tree_column's // cell renderer as appropriate. @func may be %NULL to remove an // older one. func (x *TreeViewColumn) SetCellDataFunc(CellRendererVar *CellRenderer, FuncVar *TreeCellDataFunc, FuncDataVar uintptr, DestroyVar *glib.DestroyNotify) { var FuncVarRef uintptr if FuncVar != nil { FuncVarPtr := uintptr(unsafe.Pointer(FuncVar)) if cbRefPtr, ok := glib.GetCallback(FuncVarPtr); ok { FuncVarRef = cbRefPtr } else { fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr, arg3 *TreeIter, arg4 uintptr) { cbFn := *FuncVar cbFn(arg0, arg1, arg2, arg3, arg4) } FuncVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(FuncVarPtr, FuncVarRef, FuncVar) } } var DestroyVarRef uintptr if DestroyVar != nil { DestroyVarPtr := uintptr(unsafe.Pointer(DestroyVar)) if cbRefPtr, ok := glib.GetCallback(DestroyVarPtr); ok { DestroyVarRef = cbRefPtr } else { fcb := func(arg0 uintptr) { cbFn := *DestroyVar cbFn(arg0) } DestroyVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(DestroyVarPtr, DestroyVarRef, DestroyVar) } } xTreeViewColumnSetCellDataFunc(x.GoPointer(), CellRendererVar.GoPointer(), FuncVarRef, FuncDataVar, DestroyVarRef) } var xTreeViewColumnSetClickable func(uintptr, bool) // Sets the header to be active if @clickable is %TRUE. When the header is // active, then it can take keyboard focus, and can be clicked. func (x *TreeViewColumn) SetClickable(ClickableVar bool) { xTreeViewColumnSetClickable(x.GoPointer(), ClickableVar) } var xTreeViewColumnSetExpand func(uintptr, bool) // Sets the column to take available extra space. This space is shared equally // amongst all columns that have the expand set to %TRUE. If no column has this // option set, then the last column gets all extra space. By default, every // column is created with this %FALSE. // // Along with “fixed-width”, the “expand” property changes when the column is // resized by the user. func (x *TreeViewColumn) SetExpand(ExpandVar bool) { xTreeViewColumnSetExpand(x.GoPointer(), ExpandVar) } var xTreeViewColumnSetFixedWidth func(uintptr, int) // If @fixed_width is not -1, sets the fixed width of @tree_column; otherwise // unsets it. The effective value of @fixed_width is clamped between the // minimum and maximum width of the column; however, the value stored in the // “fixed-width” property is not clamped. If the column sizing is // %GTK_TREE_VIEW_COLUMN_GROW_ONLY or %GTK_TREE_VIEW_COLUMN_AUTOSIZE, setting // a fixed width overrides the automatically calculated width. Note that // @fixed_width is only a hint to GTK; the width actually allocated to the // column may be greater or less than requested. // // Along with “expand”, the “fixed-width” property changes when the column is // resized by the user. func (x *TreeViewColumn) SetFixedWidth(FixedWidthVar int) { xTreeViewColumnSetFixedWidth(x.GoPointer(), FixedWidthVar) } var xTreeViewColumnSetMaxWidth func(uintptr, int) // Sets the maximum width of the @tree_column. If @max_width is -1, then the // maximum width is unset. Note, the column can actually be wider than max // width if it’s the last column in a view. In this case, the column expands to // fill any extra space. func (x *TreeViewColumn) SetMaxWidth(MaxWidthVar int) { xTreeViewColumnSetMaxWidth(x.GoPointer(), MaxWidthVar) } var xTreeViewColumnSetMinWidth func(uintptr, int) // Sets the minimum width of the @tree_column. If @min_width is -1, then the // minimum width is unset. func (x *TreeViewColumn) SetMinWidth(MinWidthVar int) { xTreeViewColumnSetMinWidth(x.GoPointer(), MinWidthVar) } var xTreeViewColumnSetReorderable func(uintptr, bool) // If @reorderable is %TRUE, then the column can be reordered by the end user // dragging the header. func (x *TreeViewColumn) SetReorderable(ReorderableVar bool) { xTreeViewColumnSetReorderable(x.GoPointer(), ReorderableVar) } var xTreeViewColumnSetResizable func(uintptr, bool) // If @resizable is %TRUE, then the user can explicitly resize the column by // grabbing the outer edge of the column button. // // If resizable is %TRUE and // sizing mode of the column is %GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing // mode is changed to %GTK_TREE_VIEW_COLUMN_GROW_ONLY. func (x *TreeViewColumn) SetResizable(ResizableVar bool) { xTreeViewColumnSetResizable(x.GoPointer(), ResizableVar) } var xTreeViewColumnSetSizing func(uintptr, TreeViewColumnSizing) // Sets the growth behavior of @tree_column to @type. func (x *TreeViewColumn) SetSizing(TypeVar TreeViewColumnSizing) { xTreeViewColumnSetSizing(x.GoPointer(), TypeVar) } var xTreeViewColumnSetSortColumnId func(uintptr, int) // Sets the logical @sort_column_id that this column sorts on when this column // is selected for sorting. Doing so makes the column header clickable. func (x *TreeViewColumn) SetSortColumnId(SortColumnIdVar int) { xTreeViewColumnSetSortColumnId(x.GoPointer(), SortColumnIdVar) } var xTreeViewColumnSetSortIndicator func(uintptr, bool) // Call this function with a @setting of %TRUE to display an arrow in // the header button indicating the column is sorted. Call // gtk_tree_view_column_set_sort_order() to change the direction of // the arrow. func (x *TreeViewColumn) SetSortIndicator(SettingVar bool) { xTreeViewColumnSetSortIndicator(x.GoPointer(), SettingVar) } var xTreeViewColumnSetSortOrder func(uintptr, SortType) // Changes the appearance of the sort indicator. // // This does not actually sort the model. Use // gtk_tree_view_column_set_sort_column_id() if you want automatic sorting // support. This function is primarily for custom sorting behavior, and should // be used in conjunction with gtk_tree_sortable_set_sort_column_id() to do // that. For custom models, the mechanism will vary. // // The sort indicator changes direction to indicate normal sort or reverse sort. // Note that you must have the sort indicator enabled to see anything when // calling this function; see gtk_tree_view_column_set_sort_indicator(). func (x *TreeViewColumn) SetSortOrder(OrderVar SortType) { xTreeViewColumnSetSortOrder(x.GoPointer(), OrderVar) } var xTreeViewColumnSetSpacing func(uintptr, int) // Sets the spacing field of @tree_column, which is the number of pixels to // place between cell renderers packed into it. func (x *TreeViewColumn) SetSpacing(SpacingVar int) { xTreeViewColumnSetSpacing(x.GoPointer(), SpacingVar) } var xTreeViewColumnSetTitle func(uintptr, string) // Sets the title of the @tree_column. If a custom widget has been set, then // this value is ignored. func (x *TreeViewColumn) SetTitle(TitleVar string) { xTreeViewColumnSetTitle(x.GoPointer(), TitleVar) } var xTreeViewColumnSetVisible func(uintptr, bool) // Sets the visibility of @tree_column. func (x *TreeViewColumn) SetVisible(VisibleVar bool) { xTreeViewColumnSetVisible(x.GoPointer(), VisibleVar) } var xTreeViewColumnSetWidget func(uintptr, uintptr) // Sets the widget in the header to be @widget. If widget is %NULL, then the // header button is set with a `GtkLabel` set to the title of @tree_column. func (x *TreeViewColumn) SetWidget(WidgetVar *Widget) { xTreeViewColumnSetWidget(x.GoPointer(), WidgetVar.GoPointer()) } func (c *TreeViewColumn) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *TreeViewColumn) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyAlignment sets the "alignment" property. func (x *TreeViewColumn) SetPropertyAlignment(value float32) { var v gobject.Value v.Init(gobject.TypeFloatVal) v.SetFloat(value) x.SetProperty("alignment", &v) } // GetPropertyAlignment gets the "alignment" property. func (x *TreeViewColumn) GetPropertyAlignment() float32 { var v gobject.Value x.GetProperty("alignment", &v) return v.GetFloat() } // SetPropertyClickable sets the "clickable" property. func (x *TreeViewColumn) SetPropertyClickable(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("clickable", &v) } // GetPropertyClickable gets the "clickable" property. func (x *TreeViewColumn) GetPropertyClickable() bool { var v gobject.Value x.GetProperty("clickable", &v) return v.GetBoolean() } // SetPropertyExpand sets the "expand" property. func (x *TreeViewColumn) SetPropertyExpand(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("expand", &v) } // GetPropertyExpand gets the "expand" property. func (x *TreeViewColumn) GetPropertyExpand() bool { var v gobject.Value x.GetProperty("expand", &v) return v.GetBoolean() } // SetPropertyFixedWidth sets the "fixed-width" property. func (x *TreeViewColumn) SetPropertyFixedWidth(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("fixed-width", &v) } // GetPropertyFixedWidth gets the "fixed-width" property. func (x *TreeViewColumn) GetPropertyFixedWidth() int { var v gobject.Value x.GetProperty("fixed-width", &v) return v.GetInt() } // SetPropertyMaxWidth sets the "max-width" property. func (x *TreeViewColumn) 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. func (x *TreeViewColumn) GetPropertyMaxWidth() int { var v gobject.Value x.GetProperty("max-width", &v) return v.GetInt() } // SetPropertyMinWidth sets the "min-width" property. func (x *TreeViewColumn) 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. func (x *TreeViewColumn) GetPropertyMinWidth() int { var v gobject.Value x.GetProperty("min-width", &v) return v.GetInt() } // SetPropertyReorderable sets the "reorderable" property. func (x *TreeViewColumn) SetPropertyReorderable(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("reorderable", &v) } // GetPropertyReorderable gets the "reorderable" property. func (x *TreeViewColumn) GetPropertyReorderable() bool { var v gobject.Value x.GetProperty("reorderable", &v) return v.GetBoolean() } // SetPropertyResizable sets the "resizable" property. func (x *TreeViewColumn) SetPropertyResizable(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("resizable", &v) } // GetPropertyResizable gets the "resizable" property. func (x *TreeViewColumn) GetPropertyResizable() bool { var v gobject.Value x.GetProperty("resizable", &v) return v.GetBoolean() } // SetPropertySortColumnId sets the "sort-column-id" property. // Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header // clickable. Set to -1 to make the column unsortable. func (x *TreeViewColumn) SetPropertySortColumnId(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("sort-column-id", &v) } // GetPropertySortColumnId gets the "sort-column-id" property. // Logical sort column ID this column sorts on when selected for sorting. Setting the sort column ID makes the column header // clickable. Set to -1 to make the column unsortable. func (x *TreeViewColumn) GetPropertySortColumnId() int { var v gobject.Value x.GetProperty("sort-column-id", &v) return v.GetInt() } // SetPropertySortIndicator sets the "sort-indicator" property. func (x *TreeViewColumn) SetPropertySortIndicator(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("sort-indicator", &v) } // GetPropertySortIndicator gets the "sort-indicator" property. func (x *TreeViewColumn) GetPropertySortIndicator() bool { var v gobject.Value x.GetProperty("sort-indicator", &v) return v.GetBoolean() } // SetPropertySpacing sets the "spacing" property. func (x *TreeViewColumn) SetPropertySpacing(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("spacing", &v) } // GetPropertySpacing gets the "spacing" property. func (x *TreeViewColumn) GetPropertySpacing() int { var v gobject.Value x.GetProperty("spacing", &v) return v.GetInt() } // SetPropertyTitle sets the "title" property. func (x *TreeViewColumn) SetPropertyTitle(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("title", &v) } // GetPropertyTitle gets the "title" property. func (x *TreeViewColumn) GetPropertyTitle() string { var v gobject.Value x.GetProperty("title", &v) return v.GetString() } // SetPropertyVisible sets the "visible" property. func (x *TreeViewColumn) SetPropertyVisible(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("visible", &v) } // GetPropertyVisible gets the "visible" property. func (x *TreeViewColumn) GetPropertyVisible() bool { var v gobject.Value x.GetProperty("visible", &v) return v.GetBoolean() } // GetPropertyWidth gets the "width" property. func (x *TreeViewColumn) GetPropertyWidth() int { var v gobject.Value x.GetProperty("width", &v) return v.GetInt() } // GetPropertyXOffset gets the "x-offset" property. func (x *TreeViewColumn) GetPropertyXOffset() int { var v gobject.Value x.GetProperty("x-offset", &v) return v.GetInt() } // Emitted when the column's header has been clicked. func (x *TreeViewColumn) ConnectClicked(cb *func(TreeViewColumn)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "clicked", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := TreeViewColumn{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "clicked", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // 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 *TreeViewColumn) GetBuildableId() string { cret := XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // Returns the underlying `GtkCellArea` which might be @cell_layout // if called on a `GtkCellArea` or might be %NULL if no `GtkCellArea` // is used by @cell_layout. func (x *TreeViewColumn) GetArea() *CellArea { var cls *CellArea cret := XGtkCellLayoutGetArea(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &CellArea{} cls.Ptr = cret return cls } // Returns the cell renderers which have been added to @cell_layout. func (x *TreeViewColumn) GetCells() *glib.List { cret := XGtkCellLayoutGetCells(x.GoPointer()) return cret } // Re-inserts @cell at @position. // // Note that @cell has already to be packed into @cell_layout // for this to function properly. func (x *TreeViewColumn) Reorder(CellVar *CellRenderer, PositionVar int) { XGtkCellLayoutReorder(x.GoPointer(), CellVar.GoPointer(), PositionVar) } 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(&xTreeViewColumnSizingGLibType, libs, "gtk_tree_view_column_sizing_get_type") core.PuregoSafeRegister(&xTreeViewColumnGLibType, libs, "gtk_tree_view_column_get_type") core.PuregoSafeRegister(&xNewTreeViewColumn, libs, "gtk_tree_view_column_new") core.PuregoSafeRegister(&xNewTreeViewColumnWithArea, libs, "gtk_tree_view_column_new_with_area") core.PuregoSafeRegister(&xNewTreeViewColumnWithAttributes, libs, "gtk_tree_view_column_new_with_attributes") core.PuregoSafeRegister(&xTreeViewColumnAddAttribute, libs, "gtk_tree_view_column_add_attribute") core.PuregoSafeRegister(&xTreeViewColumnCellGetPosition, libs, "gtk_tree_view_column_cell_get_position") core.PuregoSafeRegister(&xTreeViewColumnCellGetSize, libs, "gtk_tree_view_column_cell_get_size") core.PuregoSafeRegister(&xTreeViewColumnCellIsVisible, libs, "gtk_tree_view_column_cell_is_visible") core.PuregoSafeRegister(&xTreeViewColumnCellSetCellData, libs, "gtk_tree_view_column_cell_set_cell_data") core.PuregoSafeRegister(&xTreeViewColumnClear, libs, "gtk_tree_view_column_clear") core.PuregoSafeRegister(&xTreeViewColumnClearAttributes, libs, "gtk_tree_view_column_clear_attributes") core.PuregoSafeRegister(&xTreeViewColumnClicked, libs, "gtk_tree_view_column_clicked") core.PuregoSafeRegister(&xTreeViewColumnFocusCell, libs, "gtk_tree_view_column_focus_cell") core.PuregoSafeRegister(&xTreeViewColumnGetAlignment, libs, "gtk_tree_view_column_get_alignment") core.PuregoSafeRegister(&xTreeViewColumnGetButton, libs, "gtk_tree_view_column_get_button") core.PuregoSafeRegister(&xTreeViewColumnGetClickable, libs, "gtk_tree_view_column_get_clickable") core.PuregoSafeRegister(&xTreeViewColumnGetExpand, libs, "gtk_tree_view_column_get_expand") core.PuregoSafeRegister(&xTreeViewColumnGetFixedWidth, libs, "gtk_tree_view_column_get_fixed_width") core.PuregoSafeRegister(&xTreeViewColumnGetMaxWidth, libs, "gtk_tree_view_column_get_max_width") core.PuregoSafeRegister(&xTreeViewColumnGetMinWidth, libs, "gtk_tree_view_column_get_min_width") core.PuregoSafeRegister(&xTreeViewColumnGetReorderable, libs, "gtk_tree_view_column_get_reorderable") core.PuregoSafeRegister(&xTreeViewColumnGetResizable, libs, "gtk_tree_view_column_get_resizable") core.PuregoSafeRegister(&xTreeViewColumnGetSizing, libs, "gtk_tree_view_column_get_sizing") core.PuregoSafeRegister(&xTreeViewColumnGetSortColumnId, libs, "gtk_tree_view_column_get_sort_column_id") core.PuregoSafeRegister(&xTreeViewColumnGetSortIndicator, libs, "gtk_tree_view_column_get_sort_indicator") core.PuregoSafeRegister(&xTreeViewColumnGetSortOrder, libs, "gtk_tree_view_column_get_sort_order") core.PuregoSafeRegister(&xTreeViewColumnGetSpacing, libs, "gtk_tree_view_column_get_spacing") core.PuregoSafeRegister(&xTreeViewColumnGetTitle, libs, "gtk_tree_view_column_get_title") core.PuregoSafeRegister(&xTreeViewColumnGetTreeView, libs, "gtk_tree_view_column_get_tree_view") core.PuregoSafeRegister(&xTreeViewColumnGetVisible, libs, "gtk_tree_view_column_get_visible") core.PuregoSafeRegister(&xTreeViewColumnGetWidget, libs, "gtk_tree_view_column_get_widget") core.PuregoSafeRegister(&xTreeViewColumnGetWidth, libs, "gtk_tree_view_column_get_width") core.PuregoSafeRegister(&xTreeViewColumnGetXOffset, libs, "gtk_tree_view_column_get_x_offset") core.PuregoSafeRegister(&xTreeViewColumnPackEnd, libs, "gtk_tree_view_column_pack_end") core.PuregoSafeRegister(&xTreeViewColumnPackStart, libs, "gtk_tree_view_column_pack_start") core.PuregoSafeRegister(&xTreeViewColumnQueueResize, libs, "gtk_tree_view_column_queue_resize") core.PuregoSafeRegister(&xTreeViewColumnSetAlignment, libs, "gtk_tree_view_column_set_alignment") core.PuregoSafeRegister(&xTreeViewColumnSetAttributes, libs, "gtk_tree_view_column_set_attributes") core.PuregoSafeRegister(&xTreeViewColumnSetCellDataFunc, libs, "gtk_tree_view_column_set_cell_data_func") core.PuregoSafeRegister(&xTreeViewColumnSetClickable, libs, "gtk_tree_view_column_set_clickable") core.PuregoSafeRegister(&xTreeViewColumnSetExpand, libs, "gtk_tree_view_column_set_expand") core.PuregoSafeRegister(&xTreeViewColumnSetFixedWidth, libs, "gtk_tree_view_column_set_fixed_width") core.PuregoSafeRegister(&xTreeViewColumnSetMaxWidth, libs, "gtk_tree_view_column_set_max_width") core.PuregoSafeRegister(&xTreeViewColumnSetMinWidth, libs, "gtk_tree_view_column_set_min_width") core.PuregoSafeRegister(&xTreeViewColumnSetReorderable, libs, "gtk_tree_view_column_set_reorderable") core.PuregoSafeRegister(&xTreeViewColumnSetResizable, libs, "gtk_tree_view_column_set_resizable") core.PuregoSafeRegister(&xTreeViewColumnSetSizing, libs, "gtk_tree_view_column_set_sizing") core.PuregoSafeRegister(&xTreeViewColumnSetSortColumnId, libs, "gtk_tree_view_column_set_sort_column_id") core.PuregoSafeRegister(&xTreeViewColumnSetSortIndicator, libs, "gtk_tree_view_column_set_sort_indicator") core.PuregoSafeRegister(&xTreeViewColumnSetSortOrder, libs, "gtk_tree_view_column_set_sort_order") core.PuregoSafeRegister(&xTreeViewColumnSetSpacing, libs, "gtk_tree_view_column_set_spacing") core.PuregoSafeRegister(&xTreeViewColumnSetTitle, libs, "gtk_tree_view_column_set_title") core.PuregoSafeRegister(&xTreeViewColumnSetVisible, libs, "gtk_tree_view_column_set_visible") core.PuregoSafeRegister(&xTreeViewColumnSetWidget, libs, "gtk_tree_view_column_set_widget") }