// 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/gobject" "github.com/bnema/puregotk/v4/gobject/types" "github.com/bnema/puregotk/v4/gtk" ) type PreferencesPageClass struct { _ structs.HostLayout ParentClass gtk.WidgetClass Padding [4]uintptr } func (x *PreferencesPageClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A page from [class@PreferencesDialog]. // // <picture> // // <source srcset="preferences-page-dark.png" media="(prefers-color-scheme: dark)"> // <img src="preferences-page.png" alt="preferences-page"> // // </picture> // // The `AdwPreferencesPage` widget gathers preferences groups into a single page // of a preferences window. // // ## CSS nodes // // `AdwPreferencesPage` has a single CSS node with name `preferencespage`. // // ## Accessibility // // `AdwPreferencesPage` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. type PreferencesPage struct { gtk.Widget } var xPreferencesPageGLibType func() types.GType func PreferencesPageGLibType() types.GType { return xPreferencesPageGLibType() } func PreferencesPageNewFromInternalPtr(ptr uintptr) *PreferencesPage { cls := &PreferencesPage{} cls.Ptr = ptr return cls } var xNewPreferencesPage func() uintptr // Creates a new `AdwPreferencesPage`. func NewPreferencesPage() *PreferencesPage { var cls *PreferencesPage cret := xNewPreferencesPage() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &PreferencesPage{} cls.Ptr = cret return cls } var xPreferencesPageAdd func(uintptr, uintptr) // Adds a preferences group to @self. func (x *PreferencesPage) Add(GroupVar *PreferencesGroup) { xPreferencesPageAdd(x.GoPointer(), GroupVar.GoPointer()) } var xPreferencesPageGetBanner func(uintptr) uintptr // Gets the banner displayed at the top of the page. func (x *PreferencesPage) GetBanner() *Banner { var cls *Banner cret := xPreferencesPageGetBanner(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Banner{} cls.Ptr = cret return cls } var xPreferencesPageGetDescription func(uintptr) string // Gets the description of @self. func (x *PreferencesPage) GetDescription() string { cret := xPreferencesPageGetDescription(x.GoPointer()) return cret } var xPreferencesPageGetDescriptionCentered func(uintptr) bool // Gets whether the description is centered. func (x *PreferencesPage) GetDescriptionCentered() bool { cret := xPreferencesPageGetDescriptionCentered(x.GoPointer()) return cret } var xPreferencesPageGetGroup func(uintptr, uint) uintptr // Gets the group at @index. // // Can return `NULL` if @index is larger than the number of groups in the page. func (x *PreferencesPage) GetGroup(IndexVar uint) *PreferencesGroup { var cls *PreferencesGroup cret := xPreferencesPageGetGroup(x.GoPointer(), IndexVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &PreferencesGroup{} cls.Ptr = cret return cls } var xPreferencesPageGetIconName func(uintptr) string // Gets the icon name for @self. func (x *PreferencesPage) GetIconName() string { cret := xPreferencesPageGetIconName(x.GoPointer()) return cret } var xPreferencesPageGetName func(uintptr) string // Gets the name of @self. func (x *PreferencesPage) GetName() string { cret := xPreferencesPageGetName(x.GoPointer()) return cret } var xPreferencesPageGetTitle func(uintptr) string // Gets the title of @self. func (x *PreferencesPage) GetTitle() string { cret := xPreferencesPageGetTitle(x.GoPointer()) return cret } var xPreferencesPageGetUseUnderline func(uintptr) bool // Gets whether an embedded underline in the title indicates a mnemonic. func (x *PreferencesPage) GetUseUnderline() bool { cret := xPreferencesPageGetUseUnderline(x.GoPointer()) return cret } var xPreferencesPageInsert func(uintptr, uintptr, int) // Inserts a preferences group to @self at @index. // // If @index is negative or larger than the number of groups, appends the group, // same as [method@PreferencesPage.add]. func (x *PreferencesPage) Insert(GroupVar *PreferencesGroup, IndexVar int) { xPreferencesPageInsert(x.GoPointer(), GroupVar.GoPointer(), IndexVar) } var xPreferencesPageRemove func(uintptr, uintptr) // Removes a group from @self. func (x *PreferencesPage) Remove(GroupVar *PreferencesGroup) { xPreferencesPageRemove(x.GoPointer(), GroupVar.GoPointer()) } var xPreferencesPageScrollToTop func(uintptr) // Scrolls the scrolled window of @self to the top. func (x *PreferencesPage) ScrollToTop() { xPreferencesPageScrollToTop(x.GoPointer()) } var xPreferencesPageSetBanner func(uintptr, uintptr) // Sets the banner displayed at the top of the page. func (x *PreferencesPage) SetBanner(BannerVar *Banner) { xPreferencesPageSetBanner(x.GoPointer(), BannerVar.GoPointer()) } var xPreferencesPageSetDescription func(uintptr, string) // Sets the description of @self. // // The description is displayed at the top of the page. func (x *PreferencesPage) SetDescription(DescriptionVar string) { xPreferencesPageSetDescription(x.GoPointer(), DescriptionVar) } var xPreferencesPageSetDescriptionCentered func(uintptr, bool) // Sets whether the description should be centered. func (x *PreferencesPage) SetDescriptionCentered(CenteredVar bool) { xPreferencesPageSetDescriptionCentered(x.GoPointer(), CenteredVar) } var xPreferencesPageSetIconName func(uintptr, uintptr) // Sets the icon name for @self. func (x *PreferencesPage) SetIconName(IconNameVar *string) { IconNameVarPtr := core.GStrdupNullable(IconNameVar) defer core.GFreeNullable(IconNameVarPtr) xPreferencesPageSetIconName(x.GoPointer(), IconNameVarPtr) } var xPreferencesPageSetName func(uintptr, uintptr) // Sets the name of @self. func (x *PreferencesPage) SetName(NameVar *string) { NameVarPtr := core.GStrdupNullable(NameVar) defer core.GFreeNullable(NameVarPtr) xPreferencesPageSetName(x.GoPointer(), NameVarPtr) } var xPreferencesPageSetTitle func(uintptr, string) // Sets the title of @self. func (x *PreferencesPage) SetTitle(TitleVar string) { xPreferencesPageSetTitle(x.GoPointer(), TitleVar) } var xPreferencesPageSetUseUnderline func(uintptr, bool) // Sets whether an embedded underline in the title indicates a mnemonic. func (x *PreferencesPage) SetUseUnderline(UseUnderlineVar bool) { xPreferencesPageSetUseUnderline(x.GoPointer(), UseUnderlineVar) } func (c *PreferencesPage) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *PreferencesPage) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyDescription sets the "description" property. // The description to be displayed at the top of the page. func (x *PreferencesPage) SetPropertyDescription(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("description", &v) } // GetPropertyDescription gets the "description" property. // The description to be displayed at the top of the page. func (x *PreferencesPage) GetPropertyDescription() string { var v gobject.Value x.GetProperty("description", &v) return v.GetString() } // SetPropertyDescriptionCentered sets the "description-centered" property. // Whether the description should be centered. func (x *PreferencesPage) SetPropertyDescriptionCentered(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("description-centered", &v) } // GetPropertyDescriptionCentered gets the "description-centered" property. // Whether the description should be centered. func (x *PreferencesPage) GetPropertyDescriptionCentered() bool { var v gobject.Value x.GetProperty("description-centered", &v) return v.GetBoolean() } // SetPropertyIconName sets the "icon-name" property. // The icon name for this page. func (x *PreferencesPage) 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 for this page. func (x *PreferencesPage) GetPropertyIconName() string { var v gobject.Value x.GetProperty("icon-name", &v) return v.GetString() } // SetPropertyName sets the "name" property. // The name of this page. func (x *PreferencesPage) 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 this page. func (x *PreferencesPage) GetPropertyName() string { var v gobject.Value x.GetProperty("name", &v) return v.GetString() } // SetPropertyTitle sets the "title" property. // The title for this page. func (x *PreferencesPage) 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 for this page. func (x *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) GetPropertyUseUnderline() bool { var v gobject.Value x.GetProperty("use-underline", &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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *PreferencesPage) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *PreferencesPage) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) 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 *PreferencesPage) GetBuildableId() string { cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer()) 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(&xPreferencesPageGLibType, libs, "adw_preferences_page_get_type") core.PuregoSafeRegister(&xNewPreferencesPage, libs, "adw_preferences_page_new") core.PuregoSafeRegister(&xPreferencesPageAdd, libs, "adw_preferences_page_add") core.PuregoSafeRegister(&xPreferencesPageGetBanner, libs, "adw_preferences_page_get_banner") core.PuregoSafeRegister(&xPreferencesPageGetDescription, libs, "adw_preferences_page_get_description") core.PuregoSafeRegister(&xPreferencesPageGetDescriptionCentered, libs, "adw_preferences_page_get_description_centered") core.PuregoSafeRegister(&xPreferencesPageGetGroup, libs, "adw_preferences_page_get_group") core.PuregoSafeRegister(&xPreferencesPageGetIconName, libs, "adw_preferences_page_get_icon_name") core.PuregoSafeRegister(&xPreferencesPageGetName, libs, "adw_preferences_page_get_name") core.PuregoSafeRegister(&xPreferencesPageGetTitle, libs, "adw_preferences_page_get_title") core.PuregoSafeRegister(&xPreferencesPageGetUseUnderline, libs, "adw_preferences_page_get_use_underline") core.PuregoSafeRegister(&xPreferencesPageInsert, libs, "adw_preferences_page_insert") core.PuregoSafeRegister(&xPreferencesPageRemove, libs, "adw_preferences_page_remove") core.PuregoSafeRegister(&xPreferencesPageScrollToTop, libs, "adw_preferences_page_scroll_to_top") core.PuregoSafeRegister(&xPreferencesPageSetBanner, libs, "adw_preferences_page_set_banner") core.PuregoSafeRegister(&xPreferencesPageSetDescription, libs, "adw_preferences_page_set_description") core.PuregoSafeRegister(&xPreferencesPageSetDescriptionCentered, libs, "adw_preferences_page_set_description_centered") core.PuregoSafeRegister(&xPreferencesPageSetIconName, libs, "adw_preferences_page_set_icon_name") core.PuregoSafeRegister(&xPreferencesPageSetName, libs, "adw_preferences_page_set_name") core.PuregoSafeRegister(&xPreferencesPageSetTitle, libs, "adw_preferences_page_set_title") core.PuregoSafeRegister(&xPreferencesPageSetUseUnderline, libs, "adw_preferences_page_set_use_underline") }