// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) // Possible transitions between pages in a `GtkStack` widget. // // New values may be added to this enumeration over time. type StackTransitionType int var xStackTransitionTypeGLibType func() types.GType func StackTransitionTypeGLibType() types.GType { return xStackTransitionTypeGLibType() } const ( // No transition StackTransitionTypeNoneValue StackTransitionType = 0 // A cross-fade StackTransitionTypeCrossfadeValue StackTransitionType = 1 // Slide from left to right StackTransitionTypeSlideRightValue StackTransitionType = 2 // Slide from right to left StackTransitionTypeSlideLeftValue StackTransitionType = 3 // Slide from bottom up StackTransitionTypeSlideUpValue StackTransitionType = 4 // Slide from top down StackTransitionTypeSlideDownValue StackTransitionType = 5 // Slide from left or right according to the children order StackTransitionTypeSlideLeftRightValue StackTransitionType = 6 // Slide from top down or bottom up according to the order StackTransitionTypeSlideUpDownValue StackTransitionType = 7 // Cover the old page by sliding up StackTransitionTypeOverUpValue StackTransitionType = 8 // Cover the old page by sliding down StackTransitionTypeOverDownValue StackTransitionType = 9 // Cover the old page by sliding to the left StackTransitionTypeOverLeftValue StackTransitionType = 10 // Cover the old page by sliding to the right StackTransitionTypeOverRightValue StackTransitionType = 11 // Uncover the new page by sliding up StackTransitionTypeUnderUpValue StackTransitionType = 12 // Uncover the new page by sliding down StackTransitionTypeUnderDownValue StackTransitionType = 13 // Uncover the new page by sliding to the left StackTransitionTypeUnderLeftValue StackTransitionType = 14 // Uncover the new page by sliding to the right StackTransitionTypeUnderRightValue StackTransitionType = 15 // Cover the old page sliding up or uncover the new page sliding down, according to order StackTransitionTypeOverUpDownValue StackTransitionType = 16 // Cover the old page sliding down or uncover the new page sliding up, according to order StackTransitionTypeOverDownUpValue StackTransitionType = 17 // Cover the old page sliding left or uncover the new page sliding right, according to order StackTransitionTypeOverLeftRightValue StackTransitionType = 18 // Cover the old page sliding right or uncover the new page sliding left, according to order StackTransitionTypeOverRightLeftValue StackTransitionType = 19 // Pretend the pages are sides of a cube and rotate that cube to the left StackTransitionTypeRotateLeftValue StackTransitionType = 20 // Pretend the pages are sides of a cube and rotate that cube to the right StackTransitionTypeRotateRightValue StackTransitionType = 21 // Pretend the pages are sides of a cube and rotate that cube to the left or right according to the children order StackTransitionTypeRotateLeftRightValue StackTransitionType = 22 ) // Shows one of its children at a time. // // <picture> // // <source srcset="stack-dark.png" media="(prefers-color-scheme: dark)"> // <img alt="An example GtkStack" src="stack.png"> // // </picture> // // In contrast to `GtkNotebook`, `GtkStack` does not provide a means // for users to change the visible child. Instead, a separate widget // such as [class@Gtk.StackSwitcher] or [class@Gtk.StackSidebar] can // be used with `GtkStack` to provide this functionality. // // Transitions between pages can be animated as slides or fades. This // can be controlled with [method@Gtk.Stack.set_transition_type]. // These animations respect the [property@Gtk.Settings:gtk-enable-animations] // setting. // // `GtkStack` maintains a [class@Gtk.StackPage] object for each added // child, which holds additional per-child properties. You // obtain the `GtkStackPage` for a child with [method@Gtk.Stack.get_page] // and you can obtain a `GtkSelectionModel` containing all the pages // with [method@Gtk.Stack.get_pages]. // // # GtkStack as GtkBuildable // // To set child-specific properties in a .ui file, create `GtkStackPage` // objects explicitly, and set the child widget as a property on it: // // ```xml // // <object class="GtkStack" id="stack"> // <child> // <object class="GtkStackPage"> // <property name="name">page1</property> // <property name="title">In the beginning…</property> // <property name="child"> // <object class="GtkLabel"> // <property name="label">It was dark</property> // </object> // </property> // </object> // </child> // // ``` // // # CSS nodes // // `GtkStack` has a single CSS node named stack. // // # Accessibility // // `GtkStack` uses the [enum@Gtk.AccessibleRole.tab_panel] role for the stack // pages, which are the accessible parent objects of the child widgets. type Stack struct { Widget } var xStackGLibType func() types.GType func StackGLibType() types.GType { return xStackGLibType() } func StackNewFromInternalPtr(ptr uintptr) *Stack { cls := &Stack{} cls.Ptr = ptr return cls } var xNewStack func() uintptr // Creates a new `GtkStack`. func NewStack() *Stack { var cls *Stack cret := xNewStack() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Stack{} cls.Ptr = cret return cls } var xStackAddChild func(uintptr, uintptr) uintptr // Adds a child to @stack. func (x *Stack) AddChild(ChildVar *Widget) *StackPage { var cls *StackPage cret := xStackAddChild(x.GoPointer(), ChildVar.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &StackPage{} cls.Ptr = cret return cls } var xStackAddNamed func(uintptr, uintptr, uintptr) uintptr // Adds a child to @stack. // // The child is identified by the @name. func (x *Stack) AddNamed(ChildVar *Widget, NameVar *string) *StackPage { var cls *StackPage NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) cret := xStackAddNamed(x.GoPointer(), ChildVar.GoPointer(), NameVarPtr) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &StackPage{} cls.Ptr = cret return cls } var xStackAddTitled func(uintptr, uintptr, uintptr, string) uintptr // Adds a child to @stack. // // The child is identified by the @name. The @title // will be used by `GtkStackSwitcher` to represent // @child in a tab bar, so it should be short. func (x *Stack) AddTitled(ChildVar *Widget, NameVar *string, TitleVar string) *StackPage { var cls *StackPage NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) cret := xStackAddTitled(x.GoPointer(), ChildVar.GoPointer(), NameVarPtr, TitleVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &StackPage{} cls.Ptr = cret return cls } var xStackGetChildByName func(uintptr, string) uintptr // Finds the child with the name given as the argument. // // Returns %NULL if there is no child with this name. func (x *Stack) GetChildByName(NameVar string) *Widget { var cls *Widget cret := xStackGetChildByName(x.GoPointer(), NameVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xStackGetHhomogeneous func(uintptr) bool // Gets whether @stack is horizontally homogeneous. func (x *Stack) GetHhomogeneous() bool { cret := xStackGetHhomogeneous(x.GoPointer()) return cret } var xStackGetInterpolateSize func(uintptr) bool // Returns whether the `GtkStack` is set up to interpolate between // the sizes of children on page switch. func (x *Stack) GetInterpolateSize() bool { cret := xStackGetInterpolateSize(x.GoPointer()) return cret } var xStackGetPage func(uintptr, uintptr) uintptr // Returns the `GtkStackPage` object for @child. func (x *Stack) GetPage(ChildVar *Widget) *StackPage { var cls *StackPage cret := xStackGetPage(x.GoPointer(), ChildVar.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &StackPage{} cls.Ptr = cret return cls } var xStackGetPages func(uintptr) uintptr // Returns a `GListModel` 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 modify the visible page. func (x *Stack) GetPages() *SelectionModelBase { var cls *SelectionModelBase cret := xStackGetPages(x.GoPointer()) if cret == 0 { return nil } cls = &SelectionModelBase{} cls.Ptr = cret return cls } var xStackGetTransitionDuration func(uintptr) uint // Returns the amount of time (in milliseconds) that // transitions between pages in @stack will take. func (x *Stack) GetTransitionDuration() uint { cret := xStackGetTransitionDuration(x.GoPointer()) return cret } var xStackGetTransitionRunning func(uintptr) bool // Returns whether the @stack is currently in a transition from one page to // another. func (x *Stack) GetTransitionRunning() bool { cret := xStackGetTransitionRunning(x.GoPointer()) return cret } var xStackGetTransitionType func(uintptr) StackTransitionType // Gets the type of animation that will be used // for transitions between pages in @stack. func (x *Stack) GetTransitionType() StackTransitionType { cret := xStackGetTransitionType(x.GoPointer()) return cret } var xStackGetVhomogeneous func(uintptr) bool // Gets whether @stack is vertically homogeneous. func (x *Stack) GetVhomogeneous() bool { cret := xStackGetVhomogeneous(x.GoPointer()) return cret } var xStackGetVisibleChild func(uintptr) uintptr // Gets the currently visible child of @stack. // // Returns %NULL if there are no visible children. func (x *Stack) GetVisibleChild() *Widget { var cls *Widget cret := xStackGetVisibleChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xStackGetVisibleChildName func(uintptr) string // Returns the name of the currently visible child of @stack. // // Returns %NULL if there is no visible child. func (x *Stack) GetVisibleChildName() string { cret := xStackGetVisibleChildName(x.GoPointer()) return cret } var xStackRemove func(uintptr, uintptr) // Removes a child widget from @stack. func (x *Stack) Remove(ChildVar *Widget) { xStackRemove(x.GoPointer(), ChildVar.GoPointer()) } var xStackSetHhomogeneous func(uintptr, bool) // Sets the `GtkStack` to be horizontally homogeneous or not. // // If it is homogeneous, the `GtkStack` will request the same // width for all its children. If it isn't, the stack // may change width when a different child becomes visible. func (x *Stack) SetHhomogeneous(HhomogeneousVar bool) { xStackSetHhomogeneous(x.GoPointer(), HhomogeneousVar) } var xStackSetInterpolateSize func(uintptr, bool) // Sets whether or not @stack will interpolate its size when // changing the visible child. // // If the [property@Gtk.Stack:interpolate-size] property is set // to %TRUE, @stack will interpolate its size between the current // one and the one it'll take after changing the visible child, // according to the set transition duration. func (x *Stack) SetInterpolateSize(InterpolateSizeVar bool) { xStackSetInterpolateSize(x.GoPointer(), InterpolateSizeVar) } var xStackSetTransitionDuration func(uintptr, uint) // Sets the duration that transitions between pages in @stack // will take. func (x *Stack) SetTransitionDuration(DurationVar uint) { xStackSetTransitionDuration(x.GoPointer(), DurationVar) } var xStackSetTransitionType func(uintptr, StackTransitionType) // Sets the type of animation that will be used for // transitions between pages in @stack. // // Available types include various kinds of fades and slides. // // The transition type can be changed without problems // at runtime, so it is possible to change the animation // based on the page that is about to become current. func (x *Stack) SetTransitionType(TransitionVar StackTransitionType) { xStackSetTransitionType(x.GoPointer(), TransitionVar) } var xStackSetVhomogeneous func(uintptr, bool) // Sets the `GtkStack` to be vertically homogeneous or not. // // If it is homogeneous, the `GtkStack` will request the same // height for all its children. If it isn't, the stack // may change height when a different child becomes visible. func (x *Stack) SetVhomogeneous(VhomogeneousVar bool) { xStackSetVhomogeneous(x.GoPointer(), VhomogeneousVar) } var xStackSetVisibleChild func(uintptr, uintptr) // Makes @child the visible child of @stack. // // If @child is different from the currently visible child, // the transition between the two will be animated with the // current transition type of @stack. // // Note that the @child widget has to be visible itself // (see [method@Gtk.Widget.show]) in order to become the visible // child of @stack. func (x *Stack) SetVisibleChild(ChildVar *Widget) { xStackSetVisibleChild(x.GoPointer(), ChildVar.GoPointer()) } var xStackSetVisibleChildFull func(uintptr, string, StackTransitionType) // Makes the child with the given name visible. // // Note that the child widget has to be visible itself // (see [method@Gtk.Widget.show]) in order to become the visible // child of @stack. func (x *Stack) SetVisibleChildFull(NameVar string, TransitionVar StackTransitionType) { xStackSetVisibleChildFull(x.GoPointer(), NameVar, TransitionVar) } var xStackSetVisibleChildName func(uintptr, string) // Makes the child with the given name visible. // // If @child is different from the currently visible child, // the transition between the two will be animated with the // current transition type of @stack. // // Note that the child widget has to be visible itself // (see [method@Gtk.Widget.show]) in order to become the visible // child of @stack. func (x *Stack) SetVisibleChildName(NameVar string) { xStackSetVisibleChildName(x.GoPointer(), NameVar) } func (c *Stack) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *Stack) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyHhomogeneous sets the "hhomogeneous" property. // %TRUE if the stack allocates the same width for all children. func (x *Stack) SetPropertyHhomogeneous(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("hhomogeneous", &v) } // GetPropertyHhomogeneous gets the "hhomogeneous" property. // %TRUE if the stack allocates the same width for all children. func (x *Stack) GetPropertyHhomogeneous() bool { var v gobject.Value x.GetProperty("hhomogeneous", &v) return v.GetBoolean() } // SetPropertyInterpolateSize sets the "interpolate-size" property. // Whether or not the size should smoothly change during the transition. func (x *Stack) SetPropertyInterpolateSize(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("interpolate-size", &v) } // GetPropertyInterpolateSize gets the "interpolate-size" property. // Whether or not the size should smoothly change during the transition. func (x *Stack) GetPropertyInterpolateSize() bool { var v gobject.Value x.GetProperty("interpolate-size", &v) return v.GetBoolean() } // SetPropertyTransitionDuration sets the "transition-duration" property. // The animation duration, in milliseconds. func (x *Stack) 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 animation duration, in milliseconds. func (x *Stack) GetPropertyTransitionDuration() uint { var v gobject.Value x.GetProperty("transition-duration", &v) return v.GetUint() } // GetPropertyTransitionRunning gets the "transition-running" property. // Whether or not the transition is currently running. func (x *Stack) GetPropertyTransitionRunning() bool { var v gobject.Value x.GetProperty("transition-running", &v) return v.GetBoolean() } // SetPropertyVhomogeneous sets the "vhomogeneous" property. // %TRUE if the stack allocates the same height for all children. func (x *Stack) SetPropertyVhomogeneous(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("vhomogeneous", &v) } // GetPropertyVhomogeneous gets the "vhomogeneous" property. // %TRUE if the stack allocates the same height for all children. func (x *Stack) 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. func (x *Stack) 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. func (x *Stack) 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 *Stack) 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 *Stack) 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 *Stack) GetAccessibleRole() AccessibleRole { cret := XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *Stack) 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 *Stack) 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 *Stack) 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 *Stack) 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 *Stack) GetPlatformState(StateVar AccessiblePlatformState) bool { cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *Stack) ResetProperty(PropertyVar AccessibleProperty) { XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *Stack) ResetRelation(RelationVar AccessibleRelation) { XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *Stack) 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 *Stack) 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 *Stack) 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 *Stack) 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 *Stack) 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 *Stack) 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 *Stack) 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 *Stack) 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 *Stack) 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 *Stack) 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 *Stack) GetBuildableId() string { cret := XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // An auxiliary class used by `GtkStack`. type StackPage struct { gobject.Object } var xStackPageGLibType func() types.GType func StackPageGLibType() types.GType { return xStackPageGLibType() } func StackPageNewFromInternalPtr(ptr uintptr) *StackPage { cls := &StackPage{} cls.Ptr = ptr return cls } var xStackPageGetChild func(uintptr) uintptr // Returns the stack child to which @self belongs. func (x *StackPage) GetChild() *Widget { var cls *Widget cret := xStackPageGetChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Widget{} cls.Ptr = cret return cls } var xStackPageGetIconName func(uintptr) string // Returns the icon name of the page. func (x *StackPage) GetIconName() string { cret := xStackPageGetIconName(x.GoPointer()) return cret } var xStackPageGetName func(uintptr) string // Returns the name of the page. func (x *StackPage) GetName() string { cret := xStackPageGetName(x.GoPointer()) return cret } var xStackPageGetNeedsAttention func(uintptr) bool // Returns whether the page is marked as “needs attention”. func (x *StackPage) GetNeedsAttention() bool { cret := xStackPageGetNeedsAttention(x.GoPointer()) return cret } var xStackPageGetTitle func(uintptr) string // Gets the page title. func (x *StackPage) GetTitle() string { cret := xStackPageGetTitle(x.GoPointer()) return cret } var xStackPageGetUseUnderline func(uintptr) bool // Gets whether underlines in the page title indicate mnemonics. func (x *StackPage) GetUseUnderline() bool { cret := xStackPageGetUseUnderline(x.GoPointer()) return cret } var xStackPageGetVisible func(uintptr) bool // Returns whether @page is visible in its `GtkStack`. // // This is independent from the [property@Gtk.Widget:visible] // property of its widget. func (x *StackPage) GetVisible() bool { cret := xStackPageGetVisible(x.GoPointer()) return cret } var xStackPageSetIconName func(uintptr, string) // Sets the icon name of the page. func (x *StackPage) SetIconName(SettingVar string) { xStackPageSetIconName(x.GoPointer(), SettingVar) } var xStackPageSetName func(uintptr, string) // Sets the name of the page. func (x *StackPage) SetName(SettingVar string) { xStackPageSetName(x.GoPointer(), SettingVar) } var xStackPageSetNeedsAttention func(uintptr, bool) // Sets whether the page is marked as “needs attention”. func (x *StackPage) SetNeedsAttention(SettingVar bool) { xStackPageSetNeedsAttention(x.GoPointer(), SettingVar) } var xStackPageSetTitle func(uintptr, string) // Sets the page title. func (x *StackPage) SetTitle(SettingVar string) { xStackPageSetTitle(x.GoPointer(), SettingVar) } var xStackPageSetUseUnderline func(uintptr, bool) // Sets whether underlines in the page title indicate mnemonics. func (x *StackPage) SetUseUnderline(SettingVar bool) { xStackPageSetUseUnderline(x.GoPointer(), SettingVar) } var xStackPageSetVisible func(uintptr, bool) // Sets whether @page is visible in its `GtkStack`. func (x *StackPage) SetVisible(VisibleVar bool) { xStackPageSetVisible(x.GoPointer(), VisibleVar) } func (c *StackPage) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *StackPage) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyIconName sets the "icon-name" property. // The icon name of the child page. func (x *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) 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. // // This is used by the [class@Gtk.StackSwitcher] to change the // appearance of the corresponding button when a page needs // attention and it is not the current one. func (x *StackPage) 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. // // This is used by the [class@Gtk.StackSwitcher] to change the // appearance of the corresponding button when a page needs // attention and it is not the current one. func (x *StackPage) 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 *StackPage) 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 *StackPage) GetPropertyTitle() string { var v gobject.Value x.GetProperty("title", &v) return v.GetString() } // SetPropertyUseUnderline sets the "use-underline" property. // If set, an underline in the title indicates a mnemonic. func (x *StackPage) 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. // If set, an underline in the title indicates a mnemonic. func (x *StackPage) GetPropertyUseUnderline() bool { var v gobject.Value x.GetProperty("use-underline", &v) return v.GetBoolean() } // SetPropertyVisible sets the "visible" property. // Whether this page is visible. func (x *StackPage) 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. func (x *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) GetAccessibleRole() AccessibleRole { cret := XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) GetPlatformState(StateVar AccessiblePlatformState) bool { cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *StackPage) ResetProperty(PropertyVar AccessibleProperty) { XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *StackPage) ResetRelation(RelationVar AccessibleRelation) { XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) 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 *StackPage) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) { XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar) } 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(&xStackTransitionTypeGLibType, libs, "gtk_stack_transition_type_get_type") core.PuregoSafeRegister(&xStackGLibType, libs, "gtk_stack_get_type") core.PuregoSafeRegister(&xNewStack, libs, "gtk_stack_new") core.PuregoSafeRegister(&xStackAddChild, libs, "gtk_stack_add_child") core.PuregoSafeRegister(&xStackAddNamed, libs, "gtk_stack_add_named") core.PuregoSafeRegister(&xStackAddTitled, libs, "gtk_stack_add_titled") core.PuregoSafeRegister(&xStackGetChildByName, libs, "gtk_stack_get_child_by_name") core.PuregoSafeRegister(&xStackGetHhomogeneous, libs, "gtk_stack_get_hhomogeneous") core.PuregoSafeRegister(&xStackGetInterpolateSize, libs, "gtk_stack_get_interpolate_size") core.PuregoSafeRegister(&xStackGetPage, libs, "gtk_stack_get_page") core.PuregoSafeRegister(&xStackGetPages, libs, "gtk_stack_get_pages") core.PuregoSafeRegister(&xStackGetTransitionDuration, libs, "gtk_stack_get_transition_duration") core.PuregoSafeRegister(&xStackGetTransitionRunning, libs, "gtk_stack_get_transition_running") core.PuregoSafeRegister(&xStackGetTransitionType, libs, "gtk_stack_get_transition_type") core.PuregoSafeRegister(&xStackGetVhomogeneous, libs, "gtk_stack_get_vhomogeneous") core.PuregoSafeRegister(&xStackGetVisibleChild, libs, "gtk_stack_get_visible_child") core.PuregoSafeRegister(&xStackGetVisibleChildName, libs, "gtk_stack_get_visible_child_name") core.PuregoSafeRegister(&xStackRemove, libs, "gtk_stack_remove") core.PuregoSafeRegister(&xStackSetHhomogeneous, libs, "gtk_stack_set_hhomogeneous") core.PuregoSafeRegister(&xStackSetInterpolateSize, libs, "gtk_stack_set_interpolate_size") core.PuregoSafeRegister(&xStackSetTransitionDuration, libs, "gtk_stack_set_transition_duration") core.PuregoSafeRegister(&xStackSetTransitionType, libs, "gtk_stack_set_transition_type") core.PuregoSafeRegister(&xStackSetVhomogeneous, libs, "gtk_stack_set_vhomogeneous") core.PuregoSafeRegister(&xStackSetVisibleChild, libs, "gtk_stack_set_visible_child") core.PuregoSafeRegister(&xStackSetVisibleChildFull, libs, "gtk_stack_set_visible_child_full") core.PuregoSafeRegister(&xStackSetVisibleChildName, libs, "gtk_stack_set_visible_child_name") core.PuregoSafeRegister(&xStackPageGLibType, libs, "gtk_stack_page_get_type") core.PuregoSafeRegister(&xStackPageGetChild, libs, "gtk_stack_page_get_child") core.PuregoSafeRegister(&xStackPageGetIconName, libs, "gtk_stack_page_get_icon_name") core.PuregoSafeRegister(&xStackPageGetName, libs, "gtk_stack_page_get_name") core.PuregoSafeRegister(&xStackPageGetNeedsAttention, libs, "gtk_stack_page_get_needs_attention") core.PuregoSafeRegister(&xStackPageGetTitle, libs, "gtk_stack_page_get_title") core.PuregoSafeRegister(&xStackPageGetUseUnderline, libs, "gtk_stack_page_get_use_underline") core.PuregoSafeRegister(&xStackPageGetVisible, libs, "gtk_stack_page_get_visible") core.PuregoSafeRegister(&xStackPageSetIconName, libs, "gtk_stack_page_set_icon_name") core.PuregoSafeRegister(&xStackPageSetName, libs, "gtk_stack_page_set_name") core.PuregoSafeRegister(&xStackPageSetNeedsAttention, libs, "gtk_stack_page_set_needs_attention") core.PuregoSafeRegister(&xStackPageSetTitle, libs, "gtk_stack_page_set_title") core.PuregoSafeRegister(&xStackPageSetUseUnderline, libs, "gtk_stack_page_set_use_underline") core.PuregoSafeRegister(&xStackPageSetVisible, libs, "gtk_stack_page_set_visible") }