// 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" ) // Called for flow boxes that are bound to a `GListModel`. // // This function is called for each item that gets added to the model. type FlowBoxCreateWidgetFunc func(uintptr, uintptr) uintptr // A function that will be called whenever a child changes // or is added. // // It lets you control if the child should be visible or not. type FlowBoxFilterFunc func(uintptr, uintptr) bool // A function used by gtk_flow_box_selected_foreach(). // // It will be called on every selected child of the @box. type FlowBoxForeachFunc func(uintptr, uintptr, uintptr) // A function to compare two children to determine which // should come first. type FlowBoxSortFunc func(uintptr, uintptr, uintptr) int type FlowBoxChildClass struct { _ structs.HostLayout ParentClass WidgetClass xActivate uintptr Padding [8]uintptr } func (x *FlowBoxChildClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // OverrideActivate sets the "activate" callback function. func (x *FlowBoxChildClass) OverrideActivate(cb func(*FlowBoxChild)) { if cb == nil { x.xActivate = 0 } else { x.xActivate = purego.NewCallback(func(ChildVarp uintptr) { cb(FlowBoxChildNewFromInternalPtr(ChildVarp)) }) } } // GetActivate gets the "activate" callback function. func (x *FlowBoxChildClass) GetActivate() func(*FlowBoxChild) { if x.xActivate == 0 { return nil } var rawCallback func(ChildVarp uintptr) purego.RegisterFunc(&rawCallback, x.xActivate) return func(ChildVar *FlowBoxChild) { rawCallback(ChildVar.GoPointer()) } } // Puts child widgets in a reflowing grid. // // <picture> // // <source srcset="flow-box-dark.png" media="(prefers-color-scheme: dark)"> // <img alt="An example GtkFlowBox" src="flow-box.png"> // // </picture> // // For instance, with the horizontal orientation, the widgets will be // arranged from left to right, starting a new row under the previous // row when necessary. Reducing the width in this case will require more // rows, so a larger height will be requested. // // Likewise, with the vertical orientation, the widgets will be arranged // from top to bottom, starting a new column to the right when necessary. // Reducing the height will require more columns, so a larger width will // be requested. // // The size request of a `GtkFlowBox` alone may not be what you expect; // if you need to be able to shrink it along both axes and dynamically // reflow its children, you may have to wrap it in a `GtkScrolledWindow` // to enable that. // // The children of a `GtkFlowBox` can be dynamically sorted and filtered. // // Although a `GtkFlowBox` must have only `GtkFlowBoxChild` children, you // can add any kind of widget to it via [method@Gtk.FlowBox.insert], and a // `GtkFlowBoxChild` widget will automatically be inserted between the box // and the widget. // // Also see [class@Gtk.ListBox]. // // # Shortcuts and Gestures // // The following signals have default keybindings: // // - [signal@Gtk.FlowBox::move-cursor] // - [signal@Gtk.FlowBox::select-all] // - [signal@Gtk.FlowBox::toggle-cursor-child] // - [signal@Gtk.FlowBox::unselect-all] // // # CSS nodes // // ``` // flowbox // ├── flowboxchild // │ ╰── <child> // ├── flowboxchild // │ ╰── <child> // ┊ // ╰── [rubberband] // ``` // // `GtkFlowBox` uses a single CSS node with name flowbox. `GtkFlowBoxChild` // uses a single CSS node with name flowboxchild. For rubberband selection, // a subnode with name rubberband is used. // // # Accessibility // // `GtkFlowBox` uses the [enum@Gtk.AccessibleRole.grid] role, and `GtkFlowBoxChild` // uses the [enum@Gtk.AccessibleRole.grid_cell] role. type FlowBox struct { Widget } var xFlowBoxGLibType func() types.GType func FlowBoxGLibType() types.GType { return xFlowBoxGLibType() } func FlowBoxNewFromInternalPtr(ptr uintptr) *FlowBox { cls := &FlowBox{} cls.Ptr = ptr return cls } var xNewFlowBox func() uintptr // Creates a `GtkFlowBox`. func NewFlowBox() *FlowBox { var cls *FlowBox cret := xNewFlowBox() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &FlowBox{} cls.Ptr = cret return cls } var xFlowBoxAppend func(uintptr, uintptr) // Adds @child to the end of @self. // // If a sort function is set, the widget will // actually be inserted at the calculated position. // // See also: [method@Gtk.FlowBox.insert]. func (x *FlowBox) Append(ChildVar *Widget) { xFlowBoxAppend(x.GoPointer(), ChildVar.GoPointer()) } var xFlowBoxBindModel func(uintptr, uintptr, uintptr, uintptr, uintptr) // Binds @model to @box. // // If @box was already bound to a model, that previous binding is // destroyed. // // The contents of @box are cleared and then filled with widgets that // represent items from @model. @box is updated whenever @model changes. // If @model is %NULL, @box is left empty. // // It is undefined to add or remove widgets directly (for example, with // [method@Gtk.FlowBox.insert]) while @box is bound to a model. // // Note that using a model is incompatible with the filtering and sorting // functionality in `GtkFlowBox`. When using a model, filtering and sorting // should be implemented by the model. func (x *FlowBox) BindModel(ModelVar gio.ListModel, CreateWidgetFuncVar *FlowBoxCreateWidgetFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) { var CreateWidgetFuncVarRef uintptr if CreateWidgetFuncVar != nil { CreateWidgetFuncVarPtr := uintptr(unsafe.Pointer(CreateWidgetFuncVar)) if cbRefPtr, ok := glib.GetCallback(CreateWidgetFuncVarPtr); ok { CreateWidgetFuncVarRef = cbRefPtr } else { fcb := func(arg0 uintptr, arg1 uintptr) uintptr { cbFn := *CreateWidgetFuncVar return cbFn(arg0, arg1) } CreateWidgetFuncVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(CreateWidgetFuncVarPtr, CreateWidgetFuncVarRef, CreateWidgetFuncVar) } } var UserDataFreeFuncVarRef uintptr if UserDataFreeFuncVar != nil { UserDataFreeFuncVarPtr := uintptr(unsafe.Pointer(UserDataFreeFuncVar)) if cbRefPtr, ok := glib.GetCallback(UserDataFreeFuncVarPtr); ok { UserDataFreeFuncVarRef = cbRefPtr } else { fcb := func(arg0 uintptr) { cbFn := *UserDataFreeFuncVar cbFn(arg0) } UserDataFreeFuncVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(UserDataFreeFuncVarPtr, UserDataFreeFuncVarRef, UserDataFreeFuncVar) } } xFlowBoxBindModel(x.GoPointer(), ModelVar.GoPointer(), CreateWidgetFuncVarRef, UserDataVar, UserDataFreeFuncVarRef) } var xFlowBoxGetActivateOnSingleClick func(uintptr) bool // Returns whether children activate on single clicks. func (x *FlowBox) GetActivateOnSingleClick() bool { cret := xFlowBoxGetActivateOnSingleClick(x.GoPointer()) return cret } var xFlowBoxGetChildAtIndex func(uintptr, int) uintptr // Gets the nth child in the @box. func (x *FlowBox) GetChildAtIndex(IdxVar int) *FlowBoxChild { var cls *FlowBoxChild cret := xFlowBoxGetChildAtIndex(x.GoPointer(), IdxVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &FlowBoxChild{} cls.Ptr = cret return cls } var xFlowBoxGetChildAtPos func(uintptr, int, int) uintptr // Gets the child in the (@x, @y) position. // // Both @x and @y are assumed to be relative to the origin of @box. func (x *FlowBox) GetChildAtPos(XVar int, YVar int) *FlowBoxChild { var cls *FlowBoxChild cret := xFlowBoxGetChildAtPos(x.GoPointer(), XVar, YVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &FlowBoxChild{} cls.Ptr = cret return cls } var xFlowBoxGetColumnSpacing func(uintptr) uint // Gets the horizontal spacing. func (x *FlowBox) GetColumnSpacing() uint { cret := xFlowBoxGetColumnSpacing(x.GoPointer()) return cret } var xFlowBoxGetHomogeneous func(uintptr) bool // Returns whether the box is homogeneous. func (x *FlowBox) GetHomogeneous() bool { cret := xFlowBoxGetHomogeneous(x.GoPointer()) return cret } var xFlowBoxGetMaxChildrenPerLine func(uintptr) uint // Gets the maximum number of children per line. func (x *FlowBox) GetMaxChildrenPerLine() uint { cret := xFlowBoxGetMaxChildrenPerLine(x.GoPointer()) return cret } var xFlowBoxGetMinChildrenPerLine func(uintptr) uint // Gets the minimum number of children per line. func (x *FlowBox) GetMinChildrenPerLine() uint { cret := xFlowBoxGetMinChildrenPerLine(x.GoPointer()) return cret } var xFlowBoxGetRowSpacing func(uintptr) uint // Gets the vertical spacing. func (x *FlowBox) GetRowSpacing() uint { cret := xFlowBoxGetRowSpacing(x.GoPointer()) return cret } var xFlowBoxGetSelectedChildren func(uintptr) *glib.List // Creates a list of all selected children. func (x *FlowBox) GetSelectedChildren() *glib.List { cret := xFlowBoxGetSelectedChildren(x.GoPointer()) return cret } var xFlowBoxGetSelectionMode func(uintptr) SelectionMode // Gets the selection mode of @box. func (x *FlowBox) GetSelectionMode() SelectionMode { cret := xFlowBoxGetSelectionMode(x.GoPointer()) return cret } var xFlowBoxInsert func(uintptr, uintptr, int) // Inserts the @widget into @box at @position. // // If a sort function is set, the widget will actually be inserted // at the calculated position. // // If @position is -1, or larger than the total number of children // in the @box, then the @widget will be appended to the end. func (x *FlowBox) Insert(WidgetVar *Widget, PositionVar int) { xFlowBoxInsert(x.GoPointer(), WidgetVar.GoPointer(), PositionVar) } var xFlowBoxInvalidateFilter func(uintptr) // Updates the filtering for all children. // // Call this function when the result of the filter // function on the @box is changed due to an external // factor. For instance, this would be used if the // filter function just looked for a specific search // term, and the entry with the string has changed. func (x *FlowBox) InvalidateFilter() { xFlowBoxInvalidateFilter(x.GoPointer()) } var xFlowBoxInvalidateSort func(uintptr) // Updates the sorting for all children. // // Call this when the result of the sort function on // @box is changed due to an external factor. func (x *FlowBox) InvalidateSort() { xFlowBoxInvalidateSort(x.GoPointer()) } var xFlowBoxPrepend func(uintptr, uintptr) // Adds @child to the start of @self. // // If a sort function is set, the widget will // actually be inserted at the calculated position. // // See also: [method@Gtk.FlowBox.insert]. func (x *FlowBox) Prepend(ChildVar *Widget) { xFlowBoxPrepend(x.GoPointer(), ChildVar.GoPointer()) } var xFlowBoxRemove func(uintptr, uintptr) // Removes a child from @box. func (x *FlowBox) Remove(WidgetVar *Widget) { xFlowBoxRemove(x.GoPointer(), WidgetVar.GoPointer()) } var xFlowBoxRemoveAll func(uintptr) // Removes all children from @box. // // This function does nothing if @box is backed by a model. func (x *FlowBox) RemoveAll() { xFlowBoxRemoveAll(x.GoPointer()) } var xFlowBoxSelectAll func(uintptr) // Select all children of @box, if the selection // mode allows it. func (x *FlowBox) SelectAll() { xFlowBoxSelectAll(x.GoPointer()) } var xFlowBoxSelectChild func(uintptr, uintptr) // Selects a single child of @box, if the selection // mode allows it. func (x *FlowBox) SelectChild(ChildVar *FlowBoxChild) { xFlowBoxSelectChild(x.GoPointer(), ChildVar.GoPointer()) } var xFlowBoxSelectedForeach func(uintptr, uintptr, uintptr) // Calls a function for each selected child. // // Note that the selection cannot be modified from within // this function. func (x *FlowBox) SelectedForeach(FuncVar *FlowBoxForeachFunc, DataVar uintptr) { 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) { cbFn := *FuncVar cbFn(arg0, arg1, arg2) } FuncVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(FuncVarPtr, FuncVarRef, FuncVar) } } xFlowBoxSelectedForeach(x.GoPointer(), FuncVarRef, DataVar) } var xFlowBoxSetActivateOnSingleClick func(uintptr, bool) // If @single is %TRUE, children will be activated when you click // on them, otherwise you need to double-click. func (x *FlowBox) SetActivateOnSingleClick(SingleVar bool) { xFlowBoxSetActivateOnSingleClick(x.GoPointer(), SingleVar) } var xFlowBoxSetColumnSpacing func(uintptr, uint) // Sets the horizontal space to add between children. func (x *FlowBox) SetColumnSpacing(SpacingVar uint) { xFlowBoxSetColumnSpacing(x.GoPointer(), SpacingVar) } var xFlowBoxSetFilterFunc func(uintptr, uintptr, uintptr, uintptr) // By setting a filter function on the @box one can decide dynamically // which of the children to show. // // For instance, to implement a search function that only shows the // children matching the search terms. // // The @filter_func will be called for each child after the call, and // it will continue to be called each time a child changes (via // [method@Gtk.FlowBoxChild.changed]) or when // [method@Gtk.FlowBox.invalidate_filter] is called. // // Note that using a filter function is incompatible with using a model // (see [method@Gtk.FlowBox.bind_model]). func (x *FlowBox) SetFilterFunc(FilterFuncVar *FlowBoxFilterFunc, UserDataVar uintptr, DestroyVar *glib.DestroyNotify) { var FilterFuncVarRef uintptr if FilterFuncVar != nil { FilterFuncVarPtr := uintptr(unsafe.Pointer(FilterFuncVar)) if cbRefPtr, ok := glib.GetCallback(FilterFuncVarPtr); ok { FilterFuncVarRef = cbRefPtr } else { fcb := func(arg0 uintptr, arg1 uintptr) bool { cbFn := *FilterFuncVar return cbFn(arg0, arg1) } FilterFuncVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(FilterFuncVarPtr, FilterFuncVarRef, FilterFuncVar) } } 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) } } xFlowBoxSetFilterFunc(x.GoPointer(), FilterFuncVarRef, UserDataVar, DestroyVarRef) } var xFlowBoxSetHadjustment func(uintptr, uintptr) // Hooks up an adjustment to focus handling in @box. // // The adjustment is also used for autoscrolling during // rubberband selection. See [method@Gtk.ScrolledWindow.get_hadjustment] // for a typical way of obtaining the adjustment, and // [method@Gtk.FlowBox.set_vadjustment] for setting the vertical // adjustment. // // The adjustments have to be in pixel units and in the same // coordinate system as the allocation for immediate children // of the box. func (x *FlowBox) SetHadjustment(AdjustmentVar *Adjustment) { xFlowBoxSetHadjustment(x.GoPointer(), AdjustmentVar.GoPointer()) } var xFlowBoxSetHomogeneous func(uintptr, bool) // Sets whether or not all children of @box are given // equal space in the box. func (x *FlowBox) SetHomogeneous(HomogeneousVar bool) { xFlowBoxSetHomogeneous(x.GoPointer(), HomogeneousVar) } var xFlowBoxSetMaxChildrenPerLine func(uintptr, uint) // Sets the maximum number of children to request and // allocate space for in @box’s orientation. // // Setting the maximum number of children per line // limits the overall natural size request to be no more // than @n_children children long in the given orientation. func (x *FlowBox) SetMaxChildrenPerLine(NChildrenVar uint) { xFlowBoxSetMaxChildrenPerLine(x.GoPointer(), NChildrenVar) } var xFlowBoxSetMinChildrenPerLine func(uintptr, uint) // Sets the minimum number of children to line up // in @box’s orientation before flowing. func (x *FlowBox) SetMinChildrenPerLine(NChildrenVar uint) { xFlowBoxSetMinChildrenPerLine(x.GoPointer(), NChildrenVar) } var xFlowBoxSetRowSpacing func(uintptr, uint) // Sets the vertical space to add between children. func (x *FlowBox) SetRowSpacing(SpacingVar uint) { xFlowBoxSetRowSpacing(x.GoPointer(), SpacingVar) } var xFlowBoxSetSelectionMode func(uintptr, SelectionMode) // Sets how selection works in @box. func (x *FlowBox) SetSelectionMode(ModeVar SelectionMode) { xFlowBoxSetSelectionMode(x.GoPointer(), ModeVar) } var xFlowBoxSetSortFunc func(uintptr, uintptr, uintptr, uintptr) // By setting a sort function on the @box, one can dynamically // reorder the children of the box, based on the contents of // the children. // // The @sort_func will be called for each child after the call, // and will continue to be called each time a child changes (via // [method@Gtk.FlowBoxChild.changed]) and when // [method@Gtk.FlowBox.invalidate_sort] is called. // // Note that using a sort function is incompatible with using a model // (see [method@Gtk.FlowBox.bind_model]). func (x *FlowBox) SetSortFunc(SortFuncVar *FlowBoxSortFunc, UserDataVar uintptr, DestroyVar *glib.DestroyNotify) { var SortFuncVarRef uintptr if SortFuncVar != nil { SortFuncVarPtr := uintptr(unsafe.Pointer(SortFuncVar)) if cbRefPtr, ok := glib.GetCallback(SortFuncVarPtr); ok { SortFuncVarRef = cbRefPtr } else { fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) int { cbFn := *SortFuncVar return cbFn(arg0, arg1, arg2) } SortFuncVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(SortFuncVarPtr, SortFuncVarRef, SortFuncVar) } } 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) } } xFlowBoxSetSortFunc(x.GoPointer(), SortFuncVarRef, UserDataVar, DestroyVarRef) } var xFlowBoxSetVadjustment func(uintptr, uintptr) // Hooks up an adjustment to focus handling in @box. // // The adjustment is also used for autoscrolling during // rubberband selection. See [method@Gtk.ScrolledWindow.get_vadjustment] // for a typical way of obtaining the adjustment, and // [method@Gtk.FlowBox.set_hadjustment] for setting the horizontal // adjustment. // // The adjustments have to be in pixel units and in the same // coordinate system as the allocation for immediate children // of the box. func (x *FlowBox) SetVadjustment(AdjustmentVar *Adjustment) { xFlowBoxSetVadjustment(x.GoPointer(), AdjustmentVar.GoPointer()) } var xFlowBoxUnselectAll func(uintptr) // Unselect all children of @box, if the selection // mode allows it. func (x *FlowBox) UnselectAll() { xFlowBoxUnselectAll(x.GoPointer()) } var xFlowBoxUnselectChild func(uintptr, uintptr) // Unselects a single child of @box, if the selection // mode allows it. func (x *FlowBox) UnselectChild(ChildVar *FlowBoxChild) { xFlowBoxUnselectChild(x.GoPointer(), ChildVar.GoPointer()) } func (c *FlowBox) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *FlowBox) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyAcceptUnpairedRelease sets the "accept-unpaired-release" property. // Whether to accept unpaired release events. func (x *FlowBox) SetPropertyAcceptUnpairedRelease(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("accept-unpaired-release", &v) } // GetPropertyAcceptUnpairedRelease gets the "accept-unpaired-release" property. // Whether to accept unpaired release events. func (x *FlowBox) GetPropertyAcceptUnpairedRelease() bool { var v gobject.Value x.GetProperty("accept-unpaired-release", &v) return v.GetBoolean() } // SetPropertyActivateOnSingleClick sets the "activate-on-single-click" property. // Determines whether children can be activated with a single // click, or require a double-click. func (x *FlowBox) SetPropertyActivateOnSingleClick(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("activate-on-single-click", &v) } // GetPropertyActivateOnSingleClick gets the "activate-on-single-click" property. // Determines whether children can be activated with a single // click, or require a double-click. func (x *FlowBox) GetPropertyActivateOnSingleClick() bool { var v gobject.Value x.GetProperty("activate-on-single-click", &v) return v.GetBoolean() } // SetPropertyColumnSpacing sets the "column-spacing" property. // The amount of horizontal space between two children. func (x *FlowBox) SetPropertyColumnSpacing(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("column-spacing", &v) } // GetPropertyColumnSpacing gets the "column-spacing" property. // The amount of horizontal space between two children. func (x *FlowBox) GetPropertyColumnSpacing() uint { var v gobject.Value x.GetProperty("column-spacing", &v) return v.GetUint() } // SetPropertyHomogeneous sets the "homogeneous" property. // Determines whether all children should be allocated the // same size. func (x *FlowBox) SetPropertyHomogeneous(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("homogeneous", &v) } // GetPropertyHomogeneous gets the "homogeneous" property. // Determines whether all children should be allocated the // same size. func (x *FlowBox) GetPropertyHomogeneous() bool { var v gobject.Value x.GetProperty("homogeneous", &v) return v.GetBoolean() } // SetPropertyMaxChildrenPerLine sets the "max-children-per-line" property. // The maximum amount of children to request space for consecutively // in the given orientation. func (x *FlowBox) SetPropertyMaxChildrenPerLine(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("max-children-per-line", &v) } // GetPropertyMaxChildrenPerLine gets the "max-children-per-line" property. // The maximum amount of children to request space for consecutively // in the given orientation. func (x *FlowBox) GetPropertyMaxChildrenPerLine() uint { var v gobject.Value x.GetProperty("max-children-per-line", &v) return v.GetUint() } // SetPropertyMinChildrenPerLine sets the "min-children-per-line" property. // The minimum number of children to allocate consecutively // in the given orientation. // // Setting the minimum children per line ensures // that a reasonably small height will be requested // for the overall minimum width of the box. func (x *FlowBox) SetPropertyMinChildrenPerLine(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("min-children-per-line", &v) } // GetPropertyMinChildrenPerLine gets the "min-children-per-line" property. // The minimum number of children to allocate consecutively // in the given orientation. // // Setting the minimum children per line ensures // that a reasonably small height will be requested // for the overall minimum width of the box. func (x *FlowBox) GetPropertyMinChildrenPerLine() uint { var v gobject.Value x.GetProperty("min-children-per-line", &v) return v.GetUint() } // SetPropertyRowSpacing sets the "row-spacing" property. // The amount of vertical space between two children. func (x *FlowBox) SetPropertyRowSpacing(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("row-spacing", &v) } // GetPropertyRowSpacing gets the "row-spacing" property. // The amount of vertical space between two children. func (x *FlowBox) GetPropertyRowSpacing() uint { var v gobject.Value x.GetProperty("row-spacing", &v) return v.GetUint() } // Emitted when the user activates the @box. // // This is a [keybinding signal](class.SignalAction.html). func (x *FlowBox) ConnectActivateCursorChild(cb *func(FlowBox)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "activate-cursor-child", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := FlowBox{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "activate-cursor-child", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when a child has been activated by the user. func (x *FlowBox) ConnectChildActivated(cb *func(FlowBox, uintptr)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "child-activated", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr, ChildVarp uintptr) { fa := FlowBox{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa, ChildVarp) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "child-activated", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when the user initiates a cursor movement. // // This is a [keybinding signal](class.SignalAction.html). // Applications should not connect to it, but may emit it with // g_signal_emit_by_name() if they need to control the cursor // programmatically. // // The default bindings for this signal come in two variants, // the variant with the Shift modifier extends the selection, // the variant without the Shift modifier does not. // There are too many key combinations to list them all here. // // - <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd> // move by individual children // - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the box // - <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages func (x *FlowBox) ConnectMoveCursor(cb *func(FlowBox, MovementStep, int, bool, bool) bool) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "move-cursor", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr, StepVarp MovementStep, CountVarp int, ExtendVarp bool, ModifyVarp bool) bool { fa := FlowBox{} fa.Ptr = clsPtr cbFn := *cb return cbFn(fa, StepVarp, CountVarp, ExtendVarp, ModifyVarp) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "move-cursor", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted to select all children of the box, // if the selection mode permits it. // // This is a [keybinding signal](class.SignalAction.html). // // The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>a</kbd>. func (x *FlowBox) ConnectSelectAll(cb *func(FlowBox)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "select-all", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := FlowBox{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "select-all", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when the set of selected children changes. // // Use [method@Gtk.FlowBox.selected_foreach] or // [method@Gtk.FlowBox.get_selected_children] to obtain the // selected children. func (x *FlowBox) ConnectSelectedChildrenChanged(cb *func(FlowBox)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "selected-children-changed", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := FlowBox{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "selected-children-changed", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted to toggle the selection of the child that has the focus. // // This is a [keybinding signal](class.SignalAction.html). // // The default binding for this signal is <kbd>Ctrl</kbd>-<kbd>Space</kbd>. func (x *FlowBox) ConnectToggleCursorChild(cb *func(FlowBox)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "toggle-cursor-child", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := FlowBox{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "toggle-cursor-child", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted to unselect all children of the box, // if the selection mode permits it. // // This is a [keybinding signal](class.SignalAction.html). // // The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>a</kbd>. func (x *FlowBox) ConnectUnselectAll(cb *func(FlowBox)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "unselect-all", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := FlowBox{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "unselect-all", 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) GetAccessibleRole() AccessibleRole { cret := XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) GetPlatformState(StateVar AccessiblePlatformState) bool { cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *FlowBox) ResetProperty(PropertyVar AccessibleProperty) { XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *FlowBox) ResetRelation(RelationVar AccessibleRelation) { XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) 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 *FlowBox) GetBuildableId() string { cret := XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // Retrieves the orientation of the @orientable. func (x *FlowBox) GetOrientation() Orientation { cret := XGtkOrientableGetOrientation(x.GoPointer()) return cret } // Sets the orientation of the @orientable. func (x *FlowBox) SetOrientation(OrientationVar Orientation) { XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar) } // The kind of widget that can be added to a `GtkFlowBox`. // // [class@Gtk.FlowBox] will automatically wrap its children in a `GtkFlowBoxChild` // when necessary. type FlowBoxChild struct { Widget } var xFlowBoxChildGLibType func() types.GType func FlowBoxChildGLibType() types.GType { return xFlowBoxChildGLibType() } func FlowBoxChildNewFromInternalPtr(ptr uintptr) *FlowBoxChild { cls := &FlowBoxChild{} cls.Ptr = ptr return cls } var xNewFlowBoxChild func() uintptr // Creates a new `GtkFlowBoxChild`. // // This should only be used as a child of a `GtkFlowBox`. func NewFlowBoxChild() *FlowBoxChild { var cls *FlowBoxChild cret := xNewFlowBoxChild() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &FlowBoxChild{} cls.Ptr = cret return cls } var xFlowBoxChildChanged func(uintptr) // Marks @child as changed, causing any state that depends on this // to be updated. // // This affects sorting and filtering. // // Note that calls to this method must be in sync with the data // used for the sorting and filtering functions. For instance, if // the list is mirroring some external data set, and *two* children // changed in the external data set when you call // gtk_flow_box_child_changed() on the first child, the sort function // must only read the new data for the first of the two changed // children, otherwise the resorting of the children will be wrong. // // This generally means that if you don’t fully control the data // model, you have to duplicate the data that affects the sorting // and filtering functions into the widgets themselves. // // Another alternative is to call [method@Gtk.FlowBox.invalidate_sort] // on any model change, but that is more expensive. func (x *FlowBoxChild) Changed() { xFlowBoxChildChanged(x.GoPointer()) } var xFlowBoxChildGetChild func(uintptr) uintptr // Gets the child widget of @self. func (x *FlowBoxChild) GetChild() *Widget { var cls *Widget cret := xFlowBoxChildGetChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xFlowBoxChildGetIndex func(uintptr) int // Gets the current index of the @child in its `GtkFlowBox` container. func (x *FlowBoxChild) GetIndex() int { cret := xFlowBoxChildGetIndex(x.GoPointer()) return cret } var xFlowBoxChildIsSelected func(uintptr) bool // Returns whether the @child is currently selected in its // `GtkFlowBox` container. func (x *FlowBoxChild) IsSelected() bool { cret := xFlowBoxChildIsSelected(x.GoPointer()) return cret } var xFlowBoxChildSetChild func(uintptr, uintptr) // Sets the child widget of @self. func (x *FlowBoxChild) SetChild(ChildVar *Widget) { xFlowBoxChildSetChild(x.GoPointer(), ChildVar.GoPointer()) } func (c *FlowBoxChild) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *FlowBoxChild) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // Emitted when the user activates a child widget in a `GtkFlowBox`. // // This can happen either by clicking or double-clicking, // or via a keybinding. // // This is a [keybinding signal](class.SignalAction.html), // but it can be used by applications for their own purposes. // // The default bindings are <kbd>Space</kbd> and <kbd>Enter</kbd>. func (x *FlowBoxChild) ConnectActivate(cb *func(FlowBoxChild)) 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) { fa := FlowBoxChild{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) GetAccessibleRole() AccessibleRole { cret := XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) GetPlatformState(StateVar AccessiblePlatformState) bool { cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *FlowBoxChild) ResetProperty(PropertyVar AccessibleProperty) { XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *FlowBoxChild) ResetRelation(RelationVar AccessibleRelation) { XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) 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 *FlowBoxChild) GetBuildableId() string { cret := XGtkBuildableGetBuildableId(x.GoPointer()) return cret } 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(&xFlowBoxGLibType, libs, "gtk_flow_box_get_type") core.PuregoSafeRegister(&xNewFlowBox, libs, "gtk_flow_box_new") core.PuregoSafeRegister(&xFlowBoxAppend, libs, "gtk_flow_box_append") core.PuregoSafeRegister(&xFlowBoxBindModel, libs, "gtk_flow_box_bind_model") core.PuregoSafeRegister(&xFlowBoxGetActivateOnSingleClick, libs, "gtk_flow_box_get_activate_on_single_click") core.PuregoSafeRegister(&xFlowBoxGetChildAtIndex, libs, "gtk_flow_box_get_child_at_index") core.PuregoSafeRegister(&xFlowBoxGetChildAtPos, libs, "gtk_flow_box_get_child_at_pos") core.PuregoSafeRegister(&xFlowBoxGetColumnSpacing, libs, "gtk_flow_box_get_column_spacing") core.PuregoSafeRegister(&xFlowBoxGetHomogeneous, libs, "gtk_flow_box_get_homogeneous") core.PuregoSafeRegister(&xFlowBoxGetMaxChildrenPerLine, libs, "gtk_flow_box_get_max_children_per_line") core.PuregoSafeRegister(&xFlowBoxGetMinChildrenPerLine, libs, "gtk_flow_box_get_min_children_per_line") core.PuregoSafeRegister(&xFlowBoxGetRowSpacing, libs, "gtk_flow_box_get_row_spacing") core.PuregoSafeRegister(&xFlowBoxGetSelectedChildren, libs, "gtk_flow_box_get_selected_children") core.PuregoSafeRegister(&xFlowBoxGetSelectionMode, libs, "gtk_flow_box_get_selection_mode") core.PuregoSafeRegister(&xFlowBoxInsert, libs, "gtk_flow_box_insert") core.PuregoSafeRegister(&xFlowBoxInvalidateFilter, libs, "gtk_flow_box_invalidate_filter") core.PuregoSafeRegister(&xFlowBoxInvalidateSort, libs, "gtk_flow_box_invalidate_sort") core.PuregoSafeRegister(&xFlowBoxPrepend, libs, "gtk_flow_box_prepend") core.PuregoSafeRegister(&xFlowBoxRemove, libs, "gtk_flow_box_remove") core.PuregoSafeRegister(&xFlowBoxRemoveAll, libs, "gtk_flow_box_remove_all") core.PuregoSafeRegister(&xFlowBoxSelectAll, libs, "gtk_flow_box_select_all") core.PuregoSafeRegister(&xFlowBoxSelectChild, libs, "gtk_flow_box_select_child") core.PuregoSafeRegister(&xFlowBoxSelectedForeach, libs, "gtk_flow_box_selected_foreach") core.PuregoSafeRegister(&xFlowBoxSetActivateOnSingleClick, libs, "gtk_flow_box_set_activate_on_single_click") core.PuregoSafeRegister(&xFlowBoxSetColumnSpacing, libs, "gtk_flow_box_set_column_spacing") core.PuregoSafeRegister(&xFlowBoxSetFilterFunc, libs, "gtk_flow_box_set_filter_func") core.PuregoSafeRegister(&xFlowBoxSetHadjustment, libs, "gtk_flow_box_set_hadjustment") core.PuregoSafeRegister(&xFlowBoxSetHomogeneous, libs, "gtk_flow_box_set_homogeneous") core.PuregoSafeRegister(&xFlowBoxSetMaxChildrenPerLine, libs, "gtk_flow_box_set_max_children_per_line") core.PuregoSafeRegister(&xFlowBoxSetMinChildrenPerLine, libs, "gtk_flow_box_set_min_children_per_line") core.PuregoSafeRegister(&xFlowBoxSetRowSpacing, libs, "gtk_flow_box_set_row_spacing") core.PuregoSafeRegister(&xFlowBoxSetSelectionMode, libs, "gtk_flow_box_set_selection_mode") core.PuregoSafeRegister(&xFlowBoxSetSortFunc, libs, "gtk_flow_box_set_sort_func") core.PuregoSafeRegister(&xFlowBoxSetVadjustment, libs, "gtk_flow_box_set_vadjustment") core.PuregoSafeRegister(&xFlowBoxUnselectAll, libs, "gtk_flow_box_unselect_all") core.PuregoSafeRegister(&xFlowBoxUnselectChild, libs, "gtk_flow_box_unselect_child") core.PuregoSafeRegister(&xFlowBoxChildGLibType, libs, "gtk_flow_box_child_get_type") core.PuregoSafeRegister(&xNewFlowBoxChild, libs, "gtk_flow_box_child_new") core.PuregoSafeRegister(&xFlowBoxChildChanged, libs, "gtk_flow_box_child_changed") core.PuregoSafeRegister(&xFlowBoxChildGetChild, libs, "gtk_flow_box_child_get_child") core.PuregoSafeRegister(&xFlowBoxChildGetIndex, libs, "gtk_flow_box_child_get_index") core.PuregoSafeRegister(&xFlowBoxChildIsSelected, libs, "gtk_flow_box_child_is_selected") core.PuregoSafeRegister(&xFlowBoxChildSetChild, libs, "gtk_flow_box_child_set_child") }