// 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/gio" "github.com/bnema/puregotk/v4/glib" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) type ColumnViewClass struct { _ structs.HostLayout } func (x *ColumnViewClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // Presents a large dynamic list of items using multiple columns with headers. // // `GtkColumnView` uses the factories of its columns to generate a cell widget for // each column, for each visible item and displays them together as the row for // this item. // // The [property@Gtk.ColumnView:show-row-separators] and // [property@Gtk.ColumnView:show-column-separators] properties offer a simple way // to display separators between the rows or columns. // // `GtkColumnView` allows the user to select items according to the selection // characteristics of the model. For models that allow multiple selected items, // it is possible to turn on *rubberband selection*, using // [property@Gtk.ColumnView:enable-rubberband]. // // The column view supports sorting that can be customized by the user by // clicking on column headers. To set this up, the `GtkSorter` returned by // [method@Gtk.ColumnView.get_sorter] must be attached to a sort model for the // data that the view is showing, and the columns must have sorters attached to // them by calling [method@Gtk.ColumnViewColumn.set_sorter]. The initial sort // order can be set with [method@Gtk.ColumnView.sort_by_column]. // // The column view also supports interactive resizing and reordering of // columns, via Drag-and-Drop of the column headers. This can be enabled or // disabled with the [property@Gtk.ColumnView:reorderable] and // [property@Gtk.ColumnViewColumn:resizable] properties. // // To learn more about the list widget framework, see the // [overview](section-list-widget.html). // // # CSS nodes // // ``` // columnview[.column-separators][.rich-list][.navigation-sidebar][.data-table] // ├── header // │ ├── <column header> // ┊ ┊ // │ ╰── <column header> // │ // ├── listview // │ // ┊ // ╰── [rubberband] // ``` // // `GtkColumnView` uses a single CSS node named columnview. It may carry the // .column-separators style class, when [property@Gtk.ColumnView:show-column-separators] // property is set. Header widgets appear below a node with name header. // The rows are contained in a `GtkListView` widget, so there is a listview // node with the same structure as for a standalone `GtkListView` widget. // If [property@Gtk.ColumnView:show-row-separators] is set, it will be passed // on to the list view, causing its CSS node to carry the .separators style class. // For rubberband selection, a node with name rubberband is used. // // The main columnview node may also carry style classes to select // the style of [list presentation](section-list-widget.html#list-styles): // .rich-list, .navigation-sidebar or .data-table. // // # Accessibility // // `GtkColumnView` uses the [enum@Gtk.AccessibleRole.tree_grid] role, header title // widgets are using the [enum@Gtk.AccessibleRole.column_header] role. The row widgets // are using the [enum@Gtk.AccessibleRole.row] role, and individual cells are using // the [enum@Gtk.AccessibleRole.grid_cell] role type ColumnView struct { Widget } var xColumnViewGLibType func() types.GType func ColumnViewGLibType() types.GType { return xColumnViewGLibType() } func ColumnViewNewFromInternalPtr(ptr uintptr) *ColumnView { cls := &ColumnView{} cls.Ptr = ptr return cls } var xNewColumnView func(uintptr) uintptr // Creates a new `GtkColumnView`. // // You most likely want to call [method@Gtk.ColumnView.append_column] // to add columns next. func NewColumnView(ModelVar SelectionModel) *ColumnView { var cls *ColumnView cret := xNewColumnView(ModelVar.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ColumnView{} cls.Ptr = cret return cls } var xColumnViewAppendColumn func(uintptr, uintptr) // Appends the @column to the end of the columns in @self. func (x *ColumnView) AppendColumn(ColumnVar *ColumnViewColumn) { xColumnViewAppendColumn(x.GoPointer(), ColumnVar.GoPointer()) } var xColumnViewGetColumns func(uintptr) uintptr // Gets the list of columns in this column view. // // This list is constant over the lifetime of @self and can be used to // monitor changes to the columns of @self by connecting to the // [signal@Gio.ListModel::items-changed] signal. func (x *ColumnView) GetColumns() *gio.ListModelBase { var cls *gio.ListModelBase cret := xColumnViewGetColumns(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &gio.ListModelBase{} cls.Ptr = cret return cls } var xColumnViewGetEnableRubberband func(uintptr) bool // Returns whether rows can be selected by dragging with the mouse. func (x *ColumnView) GetEnableRubberband() bool { cret := xColumnViewGetEnableRubberband(x.GoPointer()) return cret } var xColumnViewGetHeaderFactory func(uintptr) uintptr // Gets the factory that's currently used to populate section headers. func (x *ColumnView) GetHeaderFactory() *ListItemFactory { var cls *ListItemFactory cret := xColumnViewGetHeaderFactory(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ListItemFactory{} cls.Ptr = cret return cls } var xColumnViewGetModel func(uintptr) uintptr // Gets the model that's currently used to read the items displayed. func (x *ColumnView) GetModel() *SelectionModelBase { var cls *SelectionModelBase cret := xColumnViewGetModel(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &SelectionModelBase{} cls.Ptr = cret return cls } var xColumnViewGetReorderable func(uintptr) bool // Returns whether columns are reorderable. func (x *ColumnView) GetReorderable() bool { cret := xColumnViewGetReorderable(x.GoPointer()) return cret } var xColumnViewGetRowFactory func(uintptr) uintptr // Gets the factory set via [method@Gtk.ColumnView.set_row_factory]. func (x *ColumnView) GetRowFactory() *ListItemFactory { var cls *ListItemFactory cret := xColumnViewGetRowFactory(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ListItemFactory{} cls.Ptr = cret return cls } var xColumnViewGetShowColumnSeparators func(uintptr) bool // Returns whether the list should show separators between columns. func (x *ColumnView) GetShowColumnSeparators() bool { cret := xColumnViewGetShowColumnSeparators(x.GoPointer()) return cret } var xColumnViewGetShowRowSeparators func(uintptr) bool // Returns whether the list should show separators between rows. func (x *ColumnView) GetShowRowSeparators() bool { cret := xColumnViewGetShowRowSeparators(x.GoPointer()) return cret } var xColumnViewGetSingleClickActivate func(uintptr) bool // Returns whether rows will be activated on single click and // selected on hover. func (x *ColumnView) GetSingleClickActivate() bool { cret := xColumnViewGetSingleClickActivate(x.GoPointer()) return cret } var xColumnViewGetSorter func(uintptr) uintptr // Returns a special sorter that reflects the users sorting // choices in the column view. // // To allow users to customizable sorting by clicking on column // headers, this sorter needs to be set on the sort model underneath // the model that is displayed by the view. // // See [method@Gtk.ColumnViewColumn.set_sorter] for setting up // per-column sorting. // // Here is an example: // ```c // gtk_column_view_column_set_sorter (column, sorter); // gtk_column_view_append_column (view, column); // sorter = g_object_ref (gtk_column_view_get_sorter (view))); // model = gtk_sort_list_model_new (store, sorter); // selection = gtk_no_selection_new (model); // gtk_column_view_set_model (view, selection); // ``` func (x *ColumnView) GetSorter() *Sorter { var cls *Sorter cret := xColumnViewGetSorter(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Sorter{} cls.Ptr = cret return cls } var xColumnViewGetTabBehavior func(uintptr) ListTabBehavior // Gets the behavior set for the <kbd>Tab</kbd> key. func (x *ColumnView) GetTabBehavior() ListTabBehavior { cret := xColumnViewGetTabBehavior(x.GoPointer()) return cret } var xColumnViewInsertColumn func(uintptr, uint, uintptr) // Inserts a column at the given position in the columns of @self. // // If @column is already a column of @self, it will be repositioned. func (x *ColumnView) InsertColumn(PositionVar uint, ColumnVar *ColumnViewColumn) { xColumnViewInsertColumn(x.GoPointer(), PositionVar, ColumnVar.GoPointer()) } var xColumnViewRemoveColumn func(uintptr, uintptr) // Removes the @column from the list of columns of @self. func (x *ColumnView) RemoveColumn(ColumnVar *ColumnViewColumn) { xColumnViewRemoveColumn(x.GoPointer(), ColumnVar.GoPointer()) } var xColumnViewScrollTo func(uintptr, uint, uintptr, ListScrollFlags, *ScrollInfo) // Scroll to the row at the given position - or cell if a column is // given - and performs the actions specified in @flags. // // This function works no matter if the columnview is shown or focused. // If it isn't, then the changes will take effect once that happens. func (x *ColumnView) ScrollTo(PosVar uint, ColumnVar *ColumnViewColumn, FlagsVar ListScrollFlags, ScrollVar *ScrollInfo) { xColumnViewScrollTo(x.GoPointer(), PosVar, ColumnVar.GoPointer(), FlagsVar, ScrollVar) } var xColumnViewSetEnableRubberband func(uintptr, bool) // Sets whether selections can be changed by dragging with the mouse. func (x *ColumnView) SetEnableRubberband(EnableRubberbandVar bool) { xColumnViewSetEnableRubberband(x.GoPointer(), EnableRubberbandVar) } var xColumnViewSetHeaderFactory func(uintptr, uintptr) // Sets the factory to use for populating the // [class@Gtk.ListHeader] objects used in section headers. // // If this factory is set to `NULL`, the list will not show // section headers. func (x *ColumnView) SetHeaderFactory(FactoryVar *ListItemFactory) { xColumnViewSetHeaderFactory(x.GoPointer(), FactoryVar.GoPointer()) } var xColumnViewSetModel func(uintptr, uintptr) // Sets the model to use. // // This must be a [iface@Gtk.SelectionModel]. func (x *ColumnView) SetModel(ModelVar SelectionModel) { xColumnViewSetModel(x.GoPointer(), ModelVar.GoPointer()) } var xColumnViewSetReorderable func(uintptr, bool) // Sets whether columns should be reorderable by dragging. func (x *ColumnView) SetReorderable(ReorderableVar bool) { xColumnViewSetReorderable(x.GoPointer(), ReorderableVar) } var xColumnViewSetRowFactory func(uintptr, uintptr) // Sets the factory used for configuring rows. // // The factory must be for configuring [class@Gtk.ColumnViewRow] objects. // // If this factory is not set - which is the default - then the defaults // will be used. // // This factory is not used to set the widgets displayed in the individual // cells. For that see [method@GtkColumnViewColumn.set_factory] and // [class@GtkColumnViewCell]. func (x *ColumnView) SetRowFactory(FactoryVar *ListItemFactory) { xColumnViewSetRowFactory(x.GoPointer(), FactoryVar.GoPointer()) } var xColumnViewSetShowColumnSeparators func(uintptr, bool) // Sets whether the list should show separators between columns. func (x *ColumnView) SetShowColumnSeparators(ShowColumnSeparatorsVar bool) { xColumnViewSetShowColumnSeparators(x.GoPointer(), ShowColumnSeparatorsVar) } var xColumnViewSetShowRowSeparators func(uintptr, bool) // Sets whether the list should show separators between rows. func (x *ColumnView) SetShowRowSeparators(ShowRowSeparatorsVar bool) { xColumnViewSetShowRowSeparators(x.GoPointer(), ShowRowSeparatorsVar) } var xColumnViewSetSingleClickActivate func(uintptr, bool) // Sets whether rows should be activated on single click and // selected on hover. func (x *ColumnView) SetSingleClickActivate(SingleClickActivateVar bool) { xColumnViewSetSingleClickActivate(x.GoPointer(), SingleClickActivateVar) } var xColumnViewSetTabBehavior func(uintptr, ListTabBehavior) // Sets the <kbd>Tab</kbd> key behavior. // // This influences how the <kbd>Tab</kbd> and // <kbd>Shift</kbd>+<kbd>Tab</kbd> keys move the // focus in the columnview. func (x *ColumnView) SetTabBehavior(TabBehaviorVar ListTabBehavior) { xColumnViewSetTabBehavior(x.GoPointer(), TabBehaviorVar) } var xColumnViewSortByColumn func(uintptr, uintptr, SortType) // Sets the sorting of the view. // // This function should be used to set up the initial sorting. // At runtime, users can change the sorting of a column view // by clicking on the list headers. // // This call only has an effect if the sorter returned by // [method@Gtk.ColumnView.get_sorter] is set on a sort model, // and [method@Gtk.ColumnViewColumn.set_sorter] has been called // on @column to associate a sorter with the column. // // If @column is unset, the view will be unsorted. func (x *ColumnView) SortByColumn(ColumnVar *ColumnViewColumn, DirectionVar SortType) { xColumnViewSortByColumn(x.GoPointer(), ColumnVar.GoPointer(), DirectionVar) } func (c *ColumnView) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *ColumnView) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyEnableRubberband sets the "enable-rubberband" property. // Allow rubberband selection. func (x *ColumnView) SetPropertyEnableRubberband(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("enable-rubberband", &v) } // GetPropertyEnableRubberband gets the "enable-rubberband" property. // Allow rubberband selection. func (x *ColumnView) GetPropertyEnableRubberband() bool { var v gobject.Value x.GetProperty("enable-rubberband", &v) return v.GetBoolean() } // SetPropertyReorderable sets the "reorderable" property. // Whether columns are reorderable. func (x *ColumnView) SetPropertyReorderable(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("reorderable", &v) } // GetPropertyReorderable gets the "reorderable" property. // Whether columns are reorderable. func (x *ColumnView) GetPropertyReorderable() bool { var v gobject.Value x.GetProperty("reorderable", &v) return v.GetBoolean() } // SetPropertyShowColumnSeparators sets the "show-column-separators" property. // Show separators between columns. func (x *ColumnView) SetPropertyShowColumnSeparators(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("show-column-separators", &v) } // GetPropertyShowColumnSeparators gets the "show-column-separators" property. // Show separators between columns. func (x *ColumnView) GetPropertyShowColumnSeparators() bool { var v gobject.Value x.GetProperty("show-column-separators", &v) return v.GetBoolean() } // SetPropertyShowRowSeparators sets the "show-row-separators" property. // Show separators between rows. func (x *ColumnView) SetPropertyShowRowSeparators(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("show-row-separators", &v) } // GetPropertyShowRowSeparators gets the "show-row-separators" property. // Show separators between rows. func (x *ColumnView) GetPropertyShowRowSeparators() bool { var v gobject.Value x.GetProperty("show-row-separators", &v) return v.GetBoolean() } // SetPropertySingleClickActivate sets the "single-click-activate" property. // Activate rows on single click and select them on hover. func (x *ColumnView) SetPropertySingleClickActivate(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("single-click-activate", &v) } // GetPropertySingleClickActivate gets the "single-click-activate" property. // Activate rows on single click and select them on hover. func (x *ColumnView) GetPropertySingleClickActivate() bool { var v gobject.Value x.GetProperty("single-click-activate", &v) return v.GetBoolean() } // Emitted when a row has been activated by the user, usually via activating // the GtkListBase|list.activate-item action. // // This allows for a convenient way to handle activation in a columnview. // See [method@Gtk.ListItem.set_activatable] for details on how to use this // signal. func (x *ColumnView) ConnectActivate(cb *func(ColumnView, uint)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr, PositionVarp uint) { fa := ColumnView{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa, PositionVarp) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Requests the user's screen reader to announce the given message. // // This kind of notification is useful for messages that // either have only a visual representation or that are not // exposed visually at all, e.g. a notification about a // successful operation. // // Also, by using this API, you can ensure that the message // does not interrupts the user's current screen reader output. func (x *ColumnView) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) { XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar) } // Retrieves the accessible parent for an accessible object. // // This function returns `NULL` for top level widgets. func (x *ColumnView) GetAccessibleParent() *AccessibleBase { var cls *AccessibleBase cret := XGtkAccessibleGetAccessibleParent(x.GoPointer()) if cret == 0 { return nil } cls = &AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the accessible role of an accessible object. func (x *ColumnView) GetAccessibleRole() AccessibleRole { cret := XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *ColumnView) GetAtContext() *ATContext { var cls *ATContext cret := XGtkAccessibleGetAtContext(x.GoPointer()) if cret == 0 { return nil } cls = &ATContext{} cls.Ptr = cret return cls } // Queries the coordinates and dimensions of this accessible // // This functionality can be overridden by `GtkAccessible` // implementations, e.g. to get the bounds from an ignored // child widget. func (x *ColumnView) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool { cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar) return cret } // Retrieves the first accessible child of an accessible object. func (x *ColumnView) GetFirstAccessibleChild() *AccessibleBase { var cls *AccessibleBase cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer()) if cret == 0 { return nil } cls = &AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the next accessible sibling of an accessible object func (x *ColumnView) GetNextAccessibleSibling() *AccessibleBase { var cls *AccessibleBase cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer()) if cret == 0 { return nil } cls = &AccessibleBase{} cls.Ptr = cret return cls } // Queries a platform state, such as focus. // // This functionality can be overridden by `GtkAccessible` // implementations, e.g. to get platform state from an ignored // child widget, as is the case for `GtkText` wrappers. func (x *ColumnView) GetPlatformState(StateVar AccessiblePlatformState) bool { cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *ColumnView) ResetProperty(PropertyVar AccessibleProperty) { XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *ColumnView) ResetRelation(RelationVar AccessibleRelation) { XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *ColumnView) ResetState(StateVar AccessibleState) { XGtkAccessibleResetState(x.GoPointer(), StateVar) } // Sets the parent and sibling of an accessible object. // // This function is meant to be used by accessible implementations that are // not part of the widget hierarchy, and but act as a logical bridge between // widgets. For instance, if a widget creates an object that holds metadata // for each child, and you want that object to implement the `GtkAccessible` // interface, you will use this function to ensure that the parent of each // child widget is the metadata object, and the parent of each metadata // object is the container widget. func (x *ColumnView) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) { XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer()) } // Updates the next accessible sibling. // // That might be useful when a new child of a custom accessible // is created, and it needs to be linked to a previous child. func (x *ColumnView) UpdateNextAccessibleSibling(NewSiblingVar Accessible) { XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer()) } // Informs ATs that the platform state has changed. // // This function should be used by `GtkAccessible` implementations that // have a platform state but are not widgets. Widgets handle platform // states automatically. func (x *ColumnView) UpdatePlatformState(StateVar AccessiblePlatformState) { XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar) } // Updates a list of accessible properties. // // See the [enum@Gtk.AccessibleProperty] documentation for the // value types of accessible properties. // // This function should be called by `GtkWidget` types whenever // an accessible property change must be communicated to assistive // technologies. // // Example: // ```c // value = gtk_adjustment_get_value (adjustment); // gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button), // // GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value, // -1); // // ``` func (x *ColumnView) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) { XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...) } // Updates an array of accessible properties. // // This function should be called by `GtkWidget` types whenever an accessible // property change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *ColumnView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) { XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar) } // Updates a list of accessible relations. // // This function should be called by `GtkWidget` types whenever an accessible // relation change must be communicated to assistive technologies. // // If the [enum@Gtk.AccessibleRelation] requires a list of references, // you should pass each reference individually, followed by `NULL`, e.g. // // ```c // gtk_accessible_update_relation (accessible, // // GTK_ACCESSIBLE_RELATION_CONTROLS, // ref1, NULL, // GTK_ACCESSIBLE_RELATION_LABELLED_BY, // ref1, ref2, ref3, NULL, // -1); // // ``` func (x *ColumnView) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) { XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...) } // Updates an array of accessible relations. // // This function should be called by `GtkWidget` types whenever an accessible // relation change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *ColumnView) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) { XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar) } // Updates a list of accessible states. // // See the [enum@Gtk.AccessibleState] documentation for the // value types of accessible states. // // This function should be called by `GtkWidget` types whenever // an accessible state change must be communicated to assistive // technologies. // // Example: // // ```c // value = GTK_ACCESSIBLE_TRISTATE_MIXED; // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button), // // GTK_ACCESSIBLE_STATE_CHECKED, value, // -1); // // ``` func (x *ColumnView) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) { XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...) } // Updates an array of accessible states. // // This function should be called by `GtkWidget` types whenever an accessible // state change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *ColumnView) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) { XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar) } // 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 *ColumnView) GetBuildableId() string { cret := XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // Returns the size of a non-scrolling border around the // outside of the scrollable. // // An example for this would be treeview headers. GTK can use // this information to display overlaid graphics, like the // overshoot indication, at the right position. func (x *ColumnView) GetBorder(BorderVar *Border) bool { cret := XGtkScrollableGetBorder(x.GoPointer(), BorderVar) return cret } // Retrieves the `GtkAdjustment` used for horizontal scrolling. func (x *ColumnView) GetHadjustment() *Adjustment { var cls *Adjustment cret := XGtkScrollableGetHadjustment(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Adjustment{} cls.Ptr = cret return cls } // Gets the horizontal `GtkScrollablePolicy`. func (x *ColumnView) GetHscrollPolicy() ScrollablePolicy { cret := XGtkScrollableGetHscrollPolicy(x.GoPointer()) return cret } // Retrieves the `GtkAdjustment` used for vertical scrolling. func (x *ColumnView) GetVadjustment() *Adjustment { var cls *Adjustment cret := XGtkScrollableGetVadjustment(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Adjustment{} cls.Ptr = cret return cls } // Gets the vertical `GtkScrollablePolicy`. func (x *ColumnView) GetVscrollPolicy() ScrollablePolicy { cret := XGtkScrollableGetVscrollPolicy(x.GoPointer()) return cret } // Sets the horizontal adjustment of the `GtkScrollable`. func (x *ColumnView) SetHadjustment(HadjustmentVar *Adjustment) { XGtkScrollableSetHadjustment(x.GoPointer(), HadjustmentVar.GoPointer()) } // Sets the `GtkScrollablePolicy`. // // The policy determines whether horizontal scrolling should start // below the minimum width or below the natural width. func (x *ColumnView) SetHscrollPolicy(PolicyVar ScrollablePolicy) { XGtkScrollableSetHscrollPolicy(x.GoPointer(), PolicyVar) } // Sets the vertical adjustment of the `GtkScrollable`. func (x *ColumnView) SetVadjustment(VadjustmentVar *Adjustment) { XGtkScrollableSetVadjustment(x.GoPointer(), VadjustmentVar.GoPointer()) } // Sets the `GtkScrollablePolicy`. // // The policy determines whether vertical scrolling should start // below the minimum height or below the natural height. func (x *ColumnView) SetVscrollPolicy(PolicyVar ScrollablePolicy) { XGtkScrollableSetVscrollPolicy(x.GoPointer(), PolicyVar) } 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(&xColumnViewGLibType, libs, "gtk_column_view_get_type") core.PuregoSafeRegister(&xNewColumnView, libs, "gtk_column_view_new") core.PuregoSafeRegister(&xColumnViewAppendColumn, libs, "gtk_column_view_append_column") core.PuregoSafeRegister(&xColumnViewGetColumns, libs, "gtk_column_view_get_columns") core.PuregoSafeRegister(&xColumnViewGetEnableRubberband, libs, "gtk_column_view_get_enable_rubberband") core.PuregoSafeRegister(&xColumnViewGetHeaderFactory, libs, "gtk_column_view_get_header_factory") core.PuregoSafeRegister(&xColumnViewGetModel, libs, "gtk_column_view_get_model") core.PuregoSafeRegister(&xColumnViewGetReorderable, libs, "gtk_column_view_get_reorderable") core.PuregoSafeRegister(&xColumnViewGetRowFactory, libs, "gtk_column_view_get_row_factory") core.PuregoSafeRegister(&xColumnViewGetShowColumnSeparators, libs, "gtk_column_view_get_show_column_separators") core.PuregoSafeRegister(&xColumnViewGetShowRowSeparators, libs, "gtk_column_view_get_show_row_separators") core.PuregoSafeRegister(&xColumnViewGetSingleClickActivate, libs, "gtk_column_view_get_single_click_activate") core.PuregoSafeRegister(&xColumnViewGetSorter, libs, "gtk_column_view_get_sorter") core.PuregoSafeRegister(&xColumnViewGetTabBehavior, libs, "gtk_column_view_get_tab_behavior") core.PuregoSafeRegister(&xColumnViewInsertColumn, libs, "gtk_column_view_insert_column") core.PuregoSafeRegister(&xColumnViewRemoveColumn, libs, "gtk_column_view_remove_column") core.PuregoSafeRegister(&xColumnViewScrollTo, libs, "gtk_column_view_scroll_to") core.PuregoSafeRegister(&xColumnViewSetEnableRubberband, libs, "gtk_column_view_set_enable_rubberband") core.PuregoSafeRegister(&xColumnViewSetHeaderFactory, libs, "gtk_column_view_set_header_factory") core.PuregoSafeRegister(&xColumnViewSetModel, libs, "gtk_column_view_set_model") core.PuregoSafeRegister(&xColumnViewSetReorderable, libs, "gtk_column_view_set_reorderable") core.PuregoSafeRegister(&xColumnViewSetRowFactory, libs, "gtk_column_view_set_row_factory") core.PuregoSafeRegister(&xColumnViewSetShowColumnSeparators, libs, "gtk_column_view_set_show_column_separators") core.PuregoSafeRegister(&xColumnViewSetShowRowSeparators, libs, "gtk_column_view_set_show_row_separators") core.PuregoSafeRegister(&xColumnViewSetSingleClickActivate, libs, "gtk_column_view_set_single_click_activate") core.PuregoSafeRegister(&xColumnViewSetTabBehavior, libs, "gtk_column_view_set_tab_behavior") core.PuregoSafeRegister(&xColumnViewSortByColumn, libs, "gtk_column_view_sort_by_column") }