// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT package adw import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gio" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" "github.com/bnema/puregotk/v4/gtk" ) type ViewStackClass struct { _ structs.HostLayout ParentClass gtk.WidgetClass } func (x *ViewStackClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type ViewStackPageClass struct { _ structs.HostLayout ParentClass gobject.ObjectClass } func (x *ViewStackPageClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type ViewStackPagesClass struct { _ structs.HostLayout ParentClass gobject.ObjectClass } func (x *ViewStackPagesClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A view container for [class@ViewSwitcher]. // // `AdwViewStack` is a container which only shows one page at a time. // It is typically used to hold an application's main views. // // It doesn't provide a way to transition between pages. // Instead, a separate widget such as [class@ViewSwitcher] can be used with // `AdwViewStack` to provide this functionality. // // `AdwViewStack` pages can have a title, an icon, an attention request, and a // numbered badge that [class@ViewSwitcher] will use to let users identify which // page is which. Set them using the [property@ViewStackPage:title], // [property@ViewStackPage:icon-name], // [property@ViewStackPage:needs-attention], and // [property@ViewStackPage:badge-number] properties. // // Unlike [class@Gtk.Stack], transitions between views can only be animated via // a crossfade and size changes are always interpolated. Animations are disabled // by default. Use [property@ViewStack:enable-transitions] to enable them. // // `AdwViewStack` maintains a [class@ViewStackPage] object for each added child, // which holds additional per-child properties. You obtain the // [class@ViewStackPage] for a child with [method@ViewStack.get_page] and you // can obtain a [iface@Gtk.SelectionModel] containing all the pages with // [method@ViewStack.get_pages]. // // ## AdwViewStack as GtkBuildable // // To set child-specific properties in a .ui file, create // [class@ViewStackPage] objects explicitly, and set the child widget as a // property on it: // // ```xml // // <object class="AdwViewStack" id="stack"> // <child> // <object class="AdwViewStackPage"> // <property name="name">overview</property> // <property name="title">Overview</property> // <property name="child"> // <object class="AdwStatusPage"> // <property name="title">Welcome!</property> // </object> // </property> // </object> // </child> // </object> // // ``` // // ## CSS nodes // // `AdwViewStack` has a single CSS node named `stack`. // // ## Accessibility // // `AdwViewStack` uses the `GTK_ACCESSIBLE_ROLE_TAB_PANEL` for the stack pages // which are the accessible parent objects of the child widgets. type ViewStack struct { gtk.Widget } var xViewStackGLibType func() types.GType func ViewStackGLibType() types.GType { return xViewStackGLibType() } func ViewStackNewFromInternalPtr(ptr uintptr) *ViewStack { cls := &ViewStack{} cls.Ptr = ptr return cls } var xNewViewStack func() uintptr // Creates a new `AdwViewStack`. func NewViewStack() *ViewStack { var cls *ViewStack cret := xNewViewStack() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ViewStack{} cls.Ptr = cret return cls } var xViewStackAdd func(uintptr, uintptr) uintptr // Adds a child to @self. func (x *ViewStack) Add(ChildVar *gtk.Widget) *ViewStackPage { var cls *ViewStackPage cret := xViewStackAdd(x.GoPointer(), ChildVar.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ViewStackPage{} cls.Ptr = cret return cls } var xViewStackAddNamed func(uintptr, uintptr, uintptr) uintptr // Adds a child to @self. // // The child is identified by the @name. func (x *ViewStack) AddNamed(ChildVar *gtk.Widget, NameVar *string) *ViewStackPage { var cls *ViewStackPage NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) cret := xViewStackAddNamed(x.GoPointer(), ChildVar.GoPointer(), NameVarPtr) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ViewStackPage{} cls.Ptr = cret return cls } var xViewStackAddTitled func(uintptr, uintptr, uintptr, string) uintptr // Adds a child to @self. // // The child is identified by the @name. The @title will be used by // [class@ViewSwitcher] to represent @child, so it should be short. func (x *ViewStack) AddTitled(ChildVar *gtk.Widget, NameVar *string, TitleVar string) *ViewStackPage { var cls *ViewStackPage NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) cret := xViewStackAddTitled(x.GoPointer(), ChildVar.GoPointer(), NameVarPtr, TitleVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ViewStackPage{} cls.Ptr = cret return cls } var xViewStackAddTitledWithIcon func(uintptr, uintptr, uintptr, string, string) uintptr // Adds a child to @self. // // The child is identified by the @name. The @title and @icon_name will be used // by [class@ViewSwitcher] to represent @child. func (x *ViewStack) AddTitledWithIcon(ChildVar *gtk.Widget, NameVar *string, TitleVar string, IconNameVar string) *ViewStackPage { var cls *ViewStackPage NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) cret := xViewStackAddTitledWithIcon(x.GoPointer(), ChildVar.GoPointer(), NameVarPtr, TitleVar, IconNameVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ViewStackPage{} cls.Ptr = cret return cls } var xViewStackGetChildByName func(uintptr, string) uintptr // Finds the child with @name in @self. func (x *ViewStack) GetChildByName(NameVar string) *gtk.Widget { var cls *gtk.Widget cret := xViewStackGetChildByName(x.GoPointer(), NameVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xViewStackGetEnableTransitions func(uintptr) bool // Gets whether @self uses a crossfade transition between pages. // // Use [property@ViewStack:transition-duration] to control the duration, and // [property@ViewStack:transition-running] to know when the transition is // running. func (x *ViewStack) GetEnableTransitions() bool { cret := xViewStackGetEnableTransitions(x.GoPointer()) return cret } var xViewStackGetHhomogeneous func(uintptr) bool // Gets whether @self is horizontally homogeneous. func (x *ViewStack) GetHhomogeneous() bool { cret := xViewStackGetHhomogeneous(x.GoPointer()) return cret } var xViewStackGetPage func(uintptr, uintptr) uintptr // Gets the [class@ViewStackPage] object for @child. func (x *ViewStack) GetPage(ChildVar *gtk.Widget) *ViewStackPage { var cls *ViewStackPage cret := xViewStackGetPage(x.GoPointer(), ChildVar.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ViewStackPage{} cls.Ptr = cret return cls } var xViewStackGetPages func(uintptr) uintptr // Returns a [iface@Gio.ListModel] that contains the pages of the stack. // // This can be used to keep an up-to-date view. The model also implements // [iface@Gtk.SelectionModel] and can be used to track and change the visible // page. func (x *ViewStack) GetPages() *gtk.SelectionModelBase { var cls *gtk.SelectionModelBase cret := xViewStackGetPages(x.GoPointer()) if cret == 0 { return nil } cls = >k.SelectionModelBase{} cls.Ptr = cret return cls } var xViewStackGetTransitionDuration func(uintptr) uint // Gets the transition animation duration for @self. func (x *ViewStack) GetTransitionDuration() uint { cret := xViewStackGetTransitionDuration(x.GoPointer()) return cret } var xViewStackGetTransitionRunning func(uintptr) bool // Gets whether a transition is currently running for @self. // // If a transition is impossible, the property value will be set to `TRUE` and // then immediately to `FALSE`, so it's possible to rely on its notifications // to know that a transition has happened. func (x *ViewStack) GetTransitionRunning() bool { cret := xViewStackGetTransitionRunning(x.GoPointer()) return cret } var xViewStackGetVhomogeneous func(uintptr) bool // Gets whether @self is vertically homogeneous. func (x *ViewStack) GetVhomogeneous() bool { cret := xViewStackGetVhomogeneous(x.GoPointer()) return cret } var xViewStackGetVisibleChild func(uintptr) uintptr // Gets the currently visible child of @self. func (x *ViewStack) GetVisibleChild() *gtk.Widget { var cls *gtk.Widget cret := xViewStackGetVisibleChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xViewStackGetVisibleChildName func(uintptr) string // Returns the name of the currently visible child of @self. func (x *ViewStack) GetVisibleChildName() string { cret := xViewStackGetVisibleChildName(x.GoPointer()) return cret } var xViewStackRemove func(uintptr, uintptr) // Removes a child widget from @self. func (x *ViewStack) Remove(ChildVar *gtk.Widget) { xViewStackRemove(x.GoPointer(), ChildVar.GoPointer()) } var xViewStackSetEnableTransitions func(uintptr, bool) // Sets whether @self uses a crossfade transition between pages. func (x *ViewStack) SetEnableTransitions(EnableTransitionsVar bool) { xViewStackSetEnableTransitions(x.GoPointer(), EnableTransitionsVar) } var xViewStackSetHhomogeneous func(uintptr, bool) // Sets @self to be horizontally homogeneous or not. // // If the stack is horizontally homogeneous, it allocates the same width for // all children. // // If it's `FALSE`, the stack may change width when a different child becomes // visible. func (x *ViewStack) SetHhomogeneous(HhomogeneousVar bool) { xViewStackSetHhomogeneous(x.GoPointer(), HhomogeneousVar) } var xViewStackSetTransitionDuration func(uintptr, uint) // Sets the transition animation duration for @self. // // Only used when [property@ViewStack:enable-transitions] is set to `TRUE`. func (x *ViewStack) SetTransitionDuration(DurationVar uint) { xViewStackSetTransitionDuration(x.GoPointer(), DurationVar) } var xViewStackSetVhomogeneous func(uintptr, bool) // Sets @self to be vertically homogeneous or not. // // If the stack is vertically homogeneous, it allocates the same height for // all children. // // If it's `FALSE`, the stack may change height when a different child becomes // visible. func (x *ViewStack) SetVhomogeneous(VhomogeneousVar bool) { xViewStackSetVhomogeneous(x.GoPointer(), VhomogeneousVar) } var xViewStackSetVisibleChild func(uintptr, uintptr) // Makes @child the visible child of @self. func (x *ViewStack) SetVisibleChild(ChildVar *gtk.Widget) { xViewStackSetVisibleChild(x.GoPointer(), ChildVar.GoPointer()) } var xViewStackSetVisibleChildName func(uintptr, string) // Makes the child with @name visible. // // See [property@ViewStack:visible-child]. func (x *ViewStack) SetVisibleChildName(NameVar string) { xViewStackSetVisibleChildName(x.GoPointer(), NameVar) } func (c *ViewStack) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *ViewStack) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyEnableTransitions sets the "enable-transitions" property. // Whether the stack uses a crossfade transition between pages. // // Use [property@ViewStack:transition-duration] to control the duration, and // [property@ViewStack:transition-running] to know when the transition is // running. func (x *ViewStack) SetPropertyEnableTransitions(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("enable-transitions", &v) } // GetPropertyEnableTransitions gets the "enable-transitions" property. // Whether the stack uses a crossfade transition between pages. // // Use [property@ViewStack:transition-duration] to control the duration, and // [property@ViewStack:transition-running] to know when the transition is // running. func (x *ViewStack) GetPropertyEnableTransitions() bool { var v gobject.Value x.GetProperty("enable-transitions", &v) return v.GetBoolean() } // SetPropertyHhomogeneous sets the "hhomogeneous" property. // Whether the stack is horizontally homogeneous. // // If the stack is horizontally homogeneous, it allocates the same width for // all children. // // If it's `FALSE`, the stack may change width when a different child becomes // visible. func (x *ViewStack) SetPropertyHhomogeneous(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("hhomogeneous", &v) } // GetPropertyHhomogeneous gets the "hhomogeneous" property. // Whether the stack is horizontally homogeneous. // // If the stack is horizontally homogeneous, it allocates the same width for // all children. // // If it's `FALSE`, the stack may change width when a different child becomes // visible. func (x *ViewStack) GetPropertyHhomogeneous() bool { var v gobject.Value x.GetProperty("hhomogeneous", &v) return v.GetBoolean() } // SetPropertyTransitionDuration sets the "transition-duration" property. // The transition animation duration, in milliseconds. // // Only used when [property@ViewStack:enable-transitions] is set to `TRUE`. func (x *ViewStack) SetPropertyTransitionDuration(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("transition-duration", &v) } // GetPropertyTransitionDuration gets the "transition-duration" property. // The transition animation duration, in milliseconds. // // Only used when [property@ViewStack:enable-transitions] is set to `TRUE`. func (x *ViewStack) GetPropertyTransitionDuration() uint { var v gobject.Value x.GetProperty("transition-duration", &v) return v.GetUint() } // GetPropertyTransitionRunning gets the "transition-running" property. // Whether a transition is currently running. // // If a transition is impossible, the property value will be set to `TRUE` and // then immediately to `FALSE`, so it's possible to rely on its notifications // to know that a transition has happened. func (x *ViewStack) GetPropertyTransitionRunning() bool { var v gobject.Value x.GetProperty("transition-running", &v) return v.GetBoolean() } // SetPropertyVhomogeneous sets the "vhomogeneous" property. // Whether the stack is vertically homogeneous. // // If the stack is vertically homogeneous, it allocates the same height for // all children. // // If it's `FALSE`, the stack may change height when a different child becomes // visible. func (x *ViewStack) SetPropertyVhomogeneous(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("vhomogeneous", &v) } // GetPropertyVhomogeneous gets the "vhomogeneous" property. // Whether the stack is vertically homogeneous. // // If the stack is vertically homogeneous, it allocates the same height for // all children. // // If it's `FALSE`, the stack may change height when a different child becomes // visible. func (x *ViewStack) GetPropertyVhomogeneous() bool { var v gobject.Value x.GetProperty("vhomogeneous", &v) return v.GetBoolean() } // SetPropertyVisibleChildName sets the "visible-child-name" property. // The name of the widget currently visible in the stack. // // See [property@ViewStack:visible-child]. func (x *ViewStack) SetPropertyVisibleChildName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("visible-child-name", &v) } // GetPropertyVisibleChildName gets the "visible-child-name" property. // The name of the widget currently visible in the stack. // // See [property@ViewStack:visible-child]. func (x *ViewStack) GetPropertyVisibleChildName() string { var v gobject.Value x.GetProperty("visible-child-name", &v) return v.GetString() } // 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 *ViewStack) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) { gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar) } // Retrieves the accessible parent for an accessible object. // // This function returns `NULL` for top level widgets. func (x *ViewStack) GetAccessibleParent() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the accessible role of an accessible object. func (x *ViewStack) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *ViewStack) GetAtContext() *gtk.ATContext { var cls *gtk.ATContext cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer()) if cret == 0 { return nil } cls = >k.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 *ViewStack) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool { cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar) return cret } // Retrieves the first accessible child of an accessible object. func (x *ViewStack) GetFirstAccessibleChild() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the next accessible sibling of an accessible object func (x *ViewStack) GetNextAccessibleSibling() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer()) if cret == 0 { return nil } cls = >k.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 *ViewStack) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *ViewStack) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *ViewStack) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *ViewStack) ResetState(StateVar gtk.AccessibleState) { gtk.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 *ViewStack) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) { gtk.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 *ViewStack) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) { gtk.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 *ViewStack) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) { gtk.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 *ViewStack) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) { gtk.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 *ViewStack) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) { gtk.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 *ViewStack) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) { gtk.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 *ViewStack) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) { gtk.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 *ViewStack) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) { gtk.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 *ViewStack) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) { gtk.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 *ViewStack) GetBuildableId() string { cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // An auxiliary class used by [class@ViewStack]. type ViewStackPage struct { gobject.Object } var xViewStackPageGLibType func() types.GType func ViewStackPageGLibType() types.GType { return xViewStackPageGLibType() } func ViewStackPageNewFromInternalPtr(ptr uintptr) *ViewStackPage { cls := &ViewStackPage{} cls.Ptr = ptr return cls } var xViewStackPageGetBadgeNumber func(uintptr) uint // Gets the badge number for this page. func (x *ViewStackPage) GetBadgeNumber() uint { cret := xViewStackPageGetBadgeNumber(x.GoPointer()) return cret } var xViewStackPageGetChild func(uintptr) uintptr // Gets the stack child to which @self belongs. func (x *ViewStackPage) GetChild() *gtk.Widget { var cls *gtk.Widget cret := xViewStackPageGetChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xViewStackPageGetIconName func(uintptr) string // Gets the icon name of the page. func (x *ViewStackPage) GetIconName() string { cret := xViewStackPageGetIconName(x.GoPointer()) return cret } var xViewStackPageGetName func(uintptr) string // Gets the name of the page. func (x *ViewStackPage) GetName() string { cret := xViewStackPageGetName(x.GoPointer()) return cret } var xViewStackPageGetNeedsAttention func(uintptr) bool // Gets whether the page requires the user attention. func (x *ViewStackPage) GetNeedsAttention() bool { cret := xViewStackPageGetNeedsAttention(x.GoPointer()) return cret } var xViewStackPageGetTitle func(uintptr) string // Gets the page title. func (x *ViewStackPage) GetTitle() string { cret := xViewStackPageGetTitle(x.GoPointer()) return cret } var xViewStackPageGetUseUnderline func(uintptr) bool // Gets whether underlines in the page title indicate mnemonics. func (x *ViewStackPage) GetUseUnderline() bool { cret := xViewStackPageGetUseUnderline(x.GoPointer()) return cret } var xViewStackPageGetVisible func(uintptr) bool // Gets whether @self is visible in its `AdwViewStack`. // // This is independent from the [property@Gtk.Widget:visible] // property of its widget. func (x *ViewStackPage) GetVisible() bool { cret := xViewStackPageGetVisible(x.GoPointer()) return cret } var xViewStackPageSetBadgeNumber func(uintptr, uint) // Sets the badge number for this page. // // [class@ViewSwitcher] can display it as a badge next to the page icon. It is // commonly used to display a number of unread items within the page. // // It can be used together with [property@ViewStack{age}:needs-attention]. func (x *ViewStackPage) SetBadgeNumber(BadgeNumberVar uint) { xViewStackPageSetBadgeNumber(x.GoPointer(), BadgeNumberVar) } var xViewStackPageSetIconName func(uintptr, uintptr) // Sets the icon name of the page. func (x *ViewStackPage) SetIconName(IconNameVar *string) { IconNameVarPtr := core.GStrdupNullable(IconNameVar) defer core.GFreeNullable(IconNameVarPtr) xViewStackPageSetIconName(x.GoPointer(), IconNameVarPtr) } var xViewStackPageSetName func(uintptr, uintptr) // Sets the name of the page. func (x *ViewStackPage) SetName(NameVar *string) { NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) xViewStackPageSetName(x.GoPointer(), NameVarPtr) } var xViewStackPageSetNeedsAttention func(uintptr, bool) // Sets whether the page requires the user attention. // // [class@ViewSwitcher] will display it as a dot next to the page icon. func (x *ViewStackPage) SetNeedsAttention(NeedsAttentionVar bool) { xViewStackPageSetNeedsAttention(x.GoPointer(), NeedsAttentionVar) } var xViewStackPageSetTitle func(uintptr, uintptr) // Sets the page title. func (x *ViewStackPage) SetTitle(TitleVar *string) { TitleVarPtr := core.GStrdupNullable(TitleVar) defer core.GFreeNullable(TitleVarPtr) xViewStackPageSetTitle(x.GoPointer(), TitleVarPtr) } var xViewStackPageSetUseUnderline func(uintptr, bool) // Sets whether underlines in the page title indicate mnemonics. func (x *ViewStackPage) SetUseUnderline(UseUnderlineVar bool) { xViewStackPageSetUseUnderline(x.GoPointer(), UseUnderlineVar) } var xViewStackPageSetVisible func(uintptr, bool) // Sets whether @page is visible in its `AdwViewStack`. // // This is independent from the [property@Gtk.Widget:visible] property of // [property@ViewStackPage:child]. func (x *ViewStackPage) SetVisible(VisibleVar bool) { xViewStackPageSetVisible(x.GoPointer(), VisibleVar) } func (c *ViewStackPage) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *ViewStackPage) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyBadgeNumber sets the "badge-number" property. // The badge number for this page. // // [class@ViewSwitcher] can display it as a badge next to the page icon. It is // commonly used to display a number of unread items within the page. // // It can be used together with [property@ViewStack{age}:needs-attention]. func (x *ViewStackPage) SetPropertyBadgeNumber(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("badge-number", &v) } // GetPropertyBadgeNumber gets the "badge-number" property. // The badge number for this page. // // [class@ViewSwitcher] can display it as a badge next to the page icon. It is // commonly used to display a number of unread items within the page. // // It can be used together with [property@ViewStack{age}:needs-attention]. func (x *ViewStackPage) GetPropertyBadgeNumber() uint { var v gobject.Value x.GetProperty("badge-number", &v) return v.GetUint() } // SetPropertyIconName sets the "icon-name" property. // The icon name of the child page. func (x *ViewStackPage) SetPropertyIconName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("icon-name", &v) } // GetPropertyIconName gets the "icon-name" property. // The icon name of the child page. func (x *ViewStackPage) GetPropertyIconName() string { var v gobject.Value x.GetProperty("icon-name", &v) return v.GetString() } // SetPropertyName sets the "name" property. // The name of the child page. func (x *ViewStackPage) SetPropertyName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("name", &v) } // GetPropertyName gets the "name" property. // The name of the child page. func (x *ViewStackPage) GetPropertyName() string { var v gobject.Value x.GetProperty("name", &v) return v.GetString() } // SetPropertyNeedsAttention sets the "needs-attention" property. // Whether the page requires the user attention. // // [class@ViewSwitcher] will display it as a dot next to the page icon. func (x *ViewStackPage) SetPropertyNeedsAttention(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("needs-attention", &v) } // GetPropertyNeedsAttention gets the "needs-attention" property. // Whether the page requires the user attention. // // [class@ViewSwitcher] will display it as a dot next to the page icon. func (x *ViewStackPage) GetPropertyNeedsAttention() bool { var v gobject.Value x.GetProperty("needs-attention", &v) return v.GetBoolean() } // SetPropertyTitle sets the "title" property. // The title of the child page. func (x *ViewStackPage) SetPropertyTitle(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("title", &v) } // GetPropertyTitle gets the "title" property. // The title of the child page. func (x *ViewStackPage) GetPropertyTitle() string { var v gobject.Value x.GetProperty("title", &v) return v.GetString() } // SetPropertyUseUnderline sets the "use-underline" property. // Whether an embedded underline in the title indicates a mnemonic. func (x *ViewStackPage) SetPropertyUseUnderline(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("use-underline", &v) } // GetPropertyUseUnderline gets the "use-underline" property. // Whether an embedded underline in the title indicates a mnemonic. func (x *ViewStackPage) GetPropertyUseUnderline() bool { var v gobject.Value x.GetProperty("use-underline", &v) return v.GetBoolean() } // SetPropertyVisible sets the "visible" property. // Whether this page is visible. // // This is independent from the [property@Gtk.Widget:visible] property of // [property@ViewStackPage:child]. func (x *ViewStackPage) SetPropertyVisible(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("visible", &v) } // GetPropertyVisible gets the "visible" property. // Whether this page is visible. // // This is independent from the [property@Gtk.Widget:visible] property of // [property@ViewStackPage:child]. func (x *ViewStackPage) GetPropertyVisible() bool { var v gobject.Value x.GetProperty("visible", &v) return v.GetBoolean() } // 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 *ViewStackPage) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) { gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar) } // Retrieves the accessible parent for an accessible object. // // This function returns `NULL` for top level widgets. func (x *ViewStackPage) GetAccessibleParent() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the accessible role of an accessible object. func (x *ViewStackPage) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *ViewStackPage) GetAtContext() *gtk.ATContext { var cls *gtk.ATContext cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer()) if cret == 0 { return nil } cls = >k.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 *ViewStackPage) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool { cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar) return cret } // Retrieves the first accessible child of an accessible object. func (x *ViewStackPage) GetFirstAccessibleChild() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the next accessible sibling of an accessible object func (x *ViewStackPage) GetNextAccessibleSibling() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer()) if cret == 0 { return nil } cls = >k.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 *ViewStackPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *ViewStackPage) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *ViewStackPage) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *ViewStackPage) ResetState(StateVar gtk.AccessibleState) { gtk.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 *ViewStackPage) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) { gtk.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 *ViewStackPage) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) { gtk.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 *ViewStackPage) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) { gtk.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 *ViewStackPage) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) { gtk.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 *ViewStackPage) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) { gtk.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 *ViewStackPage) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) { gtk.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 *ViewStackPage) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) { gtk.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 *ViewStackPage) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) { gtk.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 *ViewStackPage) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar) } // An auxiliary class used by [class@ViewStack]. // // See [property@ViewStack:pages]. type ViewStackPages struct { gobject.Object } var xViewStackPagesGLibType func() types.GType func ViewStackPagesGLibType() types.GType { return xViewStackPagesGLibType() } func ViewStackPagesNewFromInternalPtr(ptr uintptr) *ViewStackPages { cls := &ViewStackPages{} cls.Ptr = ptr return cls } var xViewStackPagesGetSelectedPage func(uintptr) uintptr // Gets the [class@ViewStackPage] for the visible child of a view stack // // Gets the [class@ViewStackPage] for the visible child of the associated stack. // // Returns `NULL` if there's no selected page. func (x *ViewStackPages) GetSelectedPage() *ViewStackPage { var cls *ViewStackPage cret := xViewStackPagesGetSelectedPage(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &ViewStackPage{} cls.Ptr = cret return cls } var xViewStackPagesSetSelectedPage func(uintptr, uintptr) // Sets the visible child in the associated [class@ViewStack]. // // See [property@ViewStack:visible-child]. func (x *ViewStackPages) SetSelectedPage(PageVar *ViewStackPage) { xViewStackPagesSetSelectedPage(x.GoPointer(), PageVar.GoPointer()) } func (c *ViewStackPages) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *ViewStackPages) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // Get the item at @position. // // If @position is greater than the number of items in @list, %NULL is // returned. // // %NULL is never returned for an index that is smaller than the length // of the list. // // See also: g_list_model_get_n_items() func (x *ViewStackPages) GetItem(PositionVar uint) uintptr { cret := gio.XGListModelGetItem(x.GoPointer(), PositionVar) return cret } // Gets the type of the items in @list. // // All items returned from g_list_model_get_item() are of the type // returned by this function, or a subtype, or if the type is an // interface, they are an implementation of that interface. // // The item type of a #GListModel can not change during the life of the // model. func (x *ViewStackPages) GetItemType() types.GType { cret := gio.XGListModelGetItemType(x.GoPointer()) return cret } // Gets the number of items in @list. // // Depending on the model implementation, calling this function may be // less efficient than iterating the list with increasing values for // @position until g_list_model_get_item() returns %NULL. func (x *ViewStackPages) GetNItems() uint { cret := gio.XGListModelGetNItems(x.GoPointer()) return cret } // Get the item at @position. // // If @position is greater than the number of items in @list, %NULL is // returned. // // %NULL is never returned for an index that is smaller than the length // of the list. // // This function is meant to be used by language bindings in place // of g_list_model_get_item(). // // See also: g_list_model_get_n_items() func (x *ViewStackPages) GetObject(PositionVar uint) *gobject.Object { var cls *gobject.Object cret := gio.XGListModelGetObject(x.GoPointer(), PositionVar) if cret == 0 { return nil } cls = &gobject.Object{} cls.Ptr = cret return cls } // Emits the #GListModel::items-changed signal on @list. // // This function should only be called by classes implementing // #GListModel. It has to be called after the internal representation // of @list has been updated, because handlers connected to this signal // might query the new state of the list. // // Implementations must only make changes to the model (as visible to // its consumer) in places that will not cause problems for that // consumer. For models that are driven directly by a write API (such // as #GListStore), changes can be reported in response to uses of that // API. For models that represent remote data, changes should only be // made from a fresh mainloop dispatch. It is particularly not // permitted to make changes in response to a call to the #GListModel // consumer API. // // Stated another way: in general, it is assumed that code making a // series of accesses to the model via the API, without returning to the // mainloop, and without calling other code, will continue to view the // same contents of the model. func (x *ViewStackPages) ItemsChanged(PositionVar uint, RemovedVar uint, AddedVar uint) { gio.XGListModelItemsChanged(x.GoPointer(), PositionVar, RemovedVar, AddedVar) } // Gets the set containing all currently selected items in the model. // // This function may be slow, so if you are only interested in single item, // consider using [method@Gtk.SelectionModel.is_selected] or if you are only // interested in a few, consider [method@Gtk.SelectionModel.get_selection_in_range]. func (x *ViewStackPages) GetSelection() *gtk.Bitset { cret := gtk.XGtkSelectionModelGetSelection(x.GoPointer()) return cret } // Gets the set of selected items in a range. // // This function is an optimization for // [method@Gtk.SelectionModel.get_selection] when you are only // interested in part of the model's selected state. A common use // case is in response to the [signal@Gtk.SelectionModel::selection-changed] // signal. func (x *ViewStackPages) GetSelectionInRange(PositionVar uint, NItemsVar uint) *gtk.Bitset { cret := gtk.XGtkSelectionModelGetSelectionInRange(x.GoPointer(), PositionVar, NItemsVar) return cret } // Checks if the given item is selected. func (x *ViewStackPages) IsSelected(PositionVar uint) bool { cret := gtk.XGtkSelectionModelIsSelected(x.GoPointer(), PositionVar) return cret } // Requests to select all items in the model. func (x *ViewStackPages) SelectAll() bool { cret := gtk.XGtkSelectionModelSelectAll(x.GoPointer()) return cret } // Requests to select an item in the model. func (x *ViewStackPages) SelectItem(PositionVar uint, UnselectRestVar bool) bool { cret := gtk.XGtkSelectionModelSelectItem(x.GoPointer(), PositionVar, UnselectRestVar) return cret } // Requests to select a range of items in the model. func (x *ViewStackPages) SelectRange(PositionVar uint, NItemsVar uint, UnselectRestVar bool) bool { cret := gtk.XGtkSelectionModelSelectRange(x.GoPointer(), PositionVar, NItemsVar, UnselectRestVar) return cret } // Helper function for implementations of `GtkSelectionModel`. // // Call this when the selection changes to emit the // [signal@Gtk.SelectionModel::selection-changed] signal. func (x *ViewStackPages) SelectionChanged(PositionVar uint, NItemsVar uint) { gtk.XGtkSelectionModelSelectionChanged(x.GoPointer(), PositionVar, NItemsVar) } // Make selection changes. // // This is the most advanced selection updating method that allows // the most fine-grained control over selection changes. If you can, // you should try the simpler versions, as implementations are more // likely to implement support for those. // // Requests that the selection state of all positions set in @mask // be updated to the respective value in the @selected bitmask. // // In pseudocode, it would look something like this: // // ```c // for (i = 0; i < n_items; i++) // // { // // don't change values not in the mask // if (!gtk_bitset_contains (mask, i)) // continue; // // if (gtk_bitset_contains (selected, i)) // select_item (i); // else // unselect_item (i); // } // // gtk_selection_model_selection_changed (model, // // first_changed_item, // n_changed_items); // // ``` // // @mask and @selected must not be modified. They may refer to the // same bitset, which would mean that every item in the set should // be selected. func (x *ViewStackPages) SetSelection(SelectedVar *gtk.Bitset, MaskVar *gtk.Bitset) bool { cret := gtk.XGtkSelectionModelSetSelection(x.GoPointer(), SelectedVar, MaskVar) return cret } // Requests to unselect all items in the model. func (x *ViewStackPages) UnselectAll() bool { cret := gtk.XGtkSelectionModelUnselectAll(x.GoPointer()) return cret } // Requests to unselect an item in the model. func (x *ViewStackPages) UnselectItem(PositionVar uint) bool { cret := gtk.XGtkSelectionModelUnselectItem(x.GoPointer(), PositionVar) return cret } // Requests to unselect a range of items in the model. func (x *ViewStackPages) UnselectRange(PositionVar uint, NItemsVar uint) bool { cret := gtk.XGtkSelectionModelUnselectRange(x.GoPointer(), PositionVar, NItemsVar) return cret } func init() { core.SetPackageName("ADW", "libadwaita-1") core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("ADW") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xViewStackGLibType, libs, "adw_view_stack_get_type") core.PuregoSafeRegister(&xNewViewStack, libs, "adw_view_stack_new") core.PuregoSafeRegister(&xViewStackAdd, libs, "adw_view_stack_add") core.PuregoSafeRegister(&xViewStackAddNamed, libs, "adw_view_stack_add_named") core.PuregoSafeRegister(&xViewStackAddTitled, libs, "adw_view_stack_add_titled") core.PuregoSafeRegister(&xViewStackAddTitledWithIcon, libs, "adw_view_stack_add_titled_with_icon") core.PuregoSafeRegister(&xViewStackGetChildByName, libs, "adw_view_stack_get_child_by_name") core.PuregoSafeRegister(&xViewStackGetEnableTransitions, libs, "adw_view_stack_get_enable_transitions") core.PuregoSafeRegister(&xViewStackGetHhomogeneous, libs, "adw_view_stack_get_hhomogeneous") core.PuregoSafeRegister(&xViewStackGetPage, libs, "adw_view_stack_get_page") core.PuregoSafeRegister(&xViewStackGetPages, libs, "adw_view_stack_get_pages") core.PuregoSafeRegister(&xViewStackGetTransitionDuration, libs, "adw_view_stack_get_transition_duration") core.PuregoSafeRegister(&xViewStackGetTransitionRunning, libs, "adw_view_stack_get_transition_running") core.PuregoSafeRegister(&xViewStackGetVhomogeneous, libs, "adw_view_stack_get_vhomogeneous") core.PuregoSafeRegister(&xViewStackGetVisibleChild, libs, "adw_view_stack_get_visible_child") core.PuregoSafeRegister(&xViewStackGetVisibleChildName, libs, "adw_view_stack_get_visible_child_name") core.PuregoSafeRegister(&xViewStackRemove, libs, "adw_view_stack_remove") core.PuregoSafeRegister(&xViewStackSetEnableTransitions, libs, "adw_view_stack_set_enable_transitions") core.PuregoSafeRegister(&xViewStackSetHhomogeneous, libs, "adw_view_stack_set_hhomogeneous") core.PuregoSafeRegister(&xViewStackSetTransitionDuration, libs, "adw_view_stack_set_transition_duration") core.PuregoSafeRegister(&xViewStackSetVhomogeneous, libs, "adw_view_stack_set_vhomogeneous") core.PuregoSafeRegister(&xViewStackSetVisibleChild, libs, "adw_view_stack_set_visible_child") core.PuregoSafeRegister(&xViewStackSetVisibleChildName, libs, "adw_view_stack_set_visible_child_name") core.PuregoSafeRegister(&xViewStackPageGLibType, libs, "adw_view_stack_page_get_type") core.PuregoSafeRegister(&xViewStackPageGetBadgeNumber, libs, "adw_view_stack_page_get_badge_number") core.PuregoSafeRegister(&xViewStackPageGetChild, libs, "adw_view_stack_page_get_child") core.PuregoSafeRegister(&xViewStackPageGetIconName, libs, "adw_view_stack_page_get_icon_name") core.PuregoSafeRegister(&xViewStackPageGetName, libs, "adw_view_stack_page_get_name") core.PuregoSafeRegister(&xViewStackPageGetNeedsAttention, libs, "adw_view_stack_page_get_needs_attention") core.PuregoSafeRegister(&xViewStackPageGetTitle, libs, "adw_view_stack_page_get_title") core.PuregoSafeRegister(&xViewStackPageGetUseUnderline, libs, "adw_view_stack_page_get_use_underline") core.PuregoSafeRegister(&xViewStackPageGetVisible, libs, "adw_view_stack_page_get_visible") core.PuregoSafeRegister(&xViewStackPageSetBadgeNumber, libs, "adw_view_stack_page_set_badge_number") core.PuregoSafeRegister(&xViewStackPageSetIconName, libs, "adw_view_stack_page_set_icon_name") core.PuregoSafeRegister(&xViewStackPageSetName, libs, "adw_view_stack_page_set_name") core.PuregoSafeRegister(&xViewStackPageSetNeedsAttention, libs, "adw_view_stack_page_set_needs_attention") core.PuregoSafeRegister(&xViewStackPageSetTitle, libs, "adw_view_stack_page_set_title") core.PuregoSafeRegister(&xViewStackPageSetUseUnderline, libs, "adw_view_stack_page_set_use_underline") core.PuregoSafeRegister(&xViewStackPageSetVisible, libs, "adw_view_stack_page_set_visible") core.PuregoSafeRegister(&xViewStackPagesGLibType, libs, "adw_view_stack_pages_get_type") core.PuregoSafeRegister(&xViewStackPagesGetSelectedPage, libs, "adw_view_stack_pages_get_selected_page") core.PuregoSafeRegister(&xViewStackPagesSetSelectedPage, libs, "adw_view_stack_pages_set_selected_page") }