// 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/gdk" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" "github.com/bnema/puregotk/v4/gtk" ) type StatusPageClass struct { _ structs.HostLayout ParentClass gtk.WidgetClass } func (x *StatusPageClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A page used for empty/error states and similar use-cases. // // <picture> // // <source srcset="status-page-dark.png" media="(prefers-color-scheme: dark)"> // <img src="status-page.png" alt="status-page"> // // </picture> // // The `AdwStatusPage` widget can have an icon, a title, a description and a // custom widget which is displayed below them. // // ## CSS nodes // // `AdwStatusPage` has a main CSS node with name `statuspage`. // // When setting an [class@SpinnerPaintable] as [property@StatusPage:paintable], // the main nodes gains the `.spinner` style class for a more compact // appearance. // // ## Style classes // // `AdwStatusPage` can use the // [`.compact`](style-classes.html#compact-status-page) style class for when it // needs to fit into a small space such a sidebar or a popover, similar to when // using a spinner as the paintable. // // <picture> // // <source srcset="status-page-compact-dark.png" media="(prefers-color-scheme: dark)"> // <img src="status-page-compact.png" alt="status-page-compact"> // // </picture> type StatusPage struct { gtk.Widget } var xStatusPageGLibType func() types.GType func StatusPageGLibType() types.GType { return xStatusPageGLibType() } func StatusPageNewFromInternalPtr(ptr uintptr) *StatusPage { cls := &StatusPage{} cls.Ptr = ptr return cls } var xNewStatusPage func() uintptr // Creates a new `AdwStatusPage`. func NewStatusPage() *StatusPage { var cls *StatusPage cret := xNewStatusPage() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &StatusPage{} cls.Ptr = cret return cls } var xStatusPageGetChild func(uintptr) uintptr // Gets the child widget of @self. func (x *StatusPage) GetChild() *gtk.Widget { var cls *gtk.Widget cret := xStatusPageGetChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xStatusPageGetDescription func(uintptr) string // Gets the description markup for @self. func (x *StatusPage) GetDescription() string { cret := xStatusPageGetDescription(x.GoPointer()) return cret } var xStatusPageGetIconName func(uintptr) string // Gets the icon name for @self. func (x *StatusPage) GetIconName() string { cret := xStatusPageGetIconName(x.GoPointer()) return cret } var xStatusPageGetPaintable func(uintptr) uintptr // Gets the paintable for @self. func (x *StatusPage) GetPaintable() *gdk.PaintableBase { var cls *gdk.PaintableBase cret := xStatusPageGetPaintable(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &gdk.PaintableBase{} cls.Ptr = cret return cls } var xStatusPageGetTitle func(uintptr) string // Gets the title for @self. func (x *StatusPage) GetTitle() string { cret := xStatusPageGetTitle(x.GoPointer()) return cret } var xStatusPageSetChild func(uintptr, uintptr) // Sets the child widget of @self. func (x *StatusPage) SetChild(ChildVar *gtk.Widget) { xStatusPageSetChild(x.GoPointer(), ChildVar.GoPointer()) } var xStatusPageSetDescription func(uintptr, uintptr) // Sets the description markup for @self. // // The description is displayed below the title. It is parsed as Pango markup. func (x *StatusPage) SetDescription(DescriptionVar *string) { DescriptionVarPtr := core.GStrdupNullable(DescriptionVar) defer core.GFreeNullable(DescriptionVarPtr) xStatusPageSetDescription(x.GoPointer(), DescriptionVarPtr) } var xStatusPageSetIconName func(uintptr, uintptr) // Sets the icon name for @self. // // Changing this will set [property@StatusPage:paintable] to `NULL`. func (x *StatusPage) SetIconName(IconNameVar *string) { IconNameVarPtr := core.GStrdupNullable(IconNameVar) defer core.GFreeNullable(IconNameVarPtr) xStatusPageSetIconName(x.GoPointer(), IconNameVarPtr) } var xStatusPageSetPaintable func(uintptr, uintptr) // Sets the paintable for @self. // // Changing this will set [property@StatusPage:icon-name] to `NULL`. func (x *StatusPage) SetPaintable(PaintableVar gdk.Paintable) { xStatusPageSetPaintable(x.GoPointer(), PaintableVar.GoPointer()) } var xStatusPageSetTitle func(uintptr, string) // Sets the title for @self. // // The title is displayed below the icon. It is not parsed as Pango markup. func (x *StatusPage) SetTitle(TitleVar string) { xStatusPageSetTitle(x.GoPointer(), TitleVar) } func (c *StatusPage) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *StatusPage) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyDescription sets the "description" property. // The description markup to be displayed below the title. func (x *StatusPage) 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 markup to be displayed below the title. func (x *StatusPage) GetPropertyDescription() string { var v gobject.Value x.GetProperty("description", &v) return v.GetString() } // SetPropertyIconName sets the "icon-name" property. // The name of the icon to be used. // // Changing this will set [property@StatusPage:paintable] to `NULL`. func (x *StatusPage) 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 name of the icon to be used. // // Changing this will set [property@StatusPage:paintable] to `NULL`. func (x *StatusPage) GetPropertyIconName() string { var v gobject.Value x.GetProperty("icon-name", &v) return v.GetString() } // SetPropertyTitle sets the "title" property. // The title to be displayed below the icon. // // It is not parsed as Pango markup. func (x *StatusPage) 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 to be displayed below the icon. // // It is not parsed as Pango markup. func (x *StatusPage) GetPropertyTitle() string { var v gobject.Value x.GetProperty("title", &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 *StatusPage) 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 *StatusPage) 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 *StatusPage) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *StatusPage) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *StatusPage) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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 *StatusPage) 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(&xStatusPageGLibType, libs, "adw_status_page_get_type") core.PuregoSafeRegister(&xNewStatusPage, libs, "adw_status_page_new") core.PuregoSafeRegister(&xStatusPageGetChild, libs, "adw_status_page_get_child") core.PuregoSafeRegister(&xStatusPageGetDescription, libs, "adw_status_page_get_description") core.PuregoSafeRegister(&xStatusPageGetIconName, libs, "adw_status_page_get_icon_name") core.PuregoSafeRegister(&xStatusPageGetPaintable, libs, "adw_status_page_get_paintable") core.PuregoSafeRegister(&xStatusPageGetTitle, libs, "adw_status_page_get_title") core.PuregoSafeRegister(&xStatusPageSetChild, libs, "adw_status_page_set_child") core.PuregoSafeRegister(&xStatusPageSetDescription, libs, "adw_status_page_set_description") core.PuregoSafeRegister(&xStatusPageSetIconName, libs, "adw_status_page_set_icon_name") core.PuregoSafeRegister(&xStatusPageSetPaintable, libs, "adw_status_page_set_paintable") core.PuregoSafeRegister(&xStatusPageSetTitle, libs, "adw_status_page_set_title") }