// 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 HeaderBarClass struct { _ structs.HostLayout ParentClass gtk.WidgetClass } func (x *HeaderBarClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // Describes title centering behavior of a [class@HeaderBar] widget. type CenteringPolicy int var xCenteringPolicyGLibType func() types.GType func CenteringPolicyGLibType() types.GType { return xCenteringPolicyGLibType() } const ( // Keep the title centered when possible CenteringPolicyLooseValue CenteringPolicy = 0 // Keep the title centered at all cost CenteringPolicyStrictValue CenteringPolicy = 1 ) // A title bar widget. // // <picture> // // <source srcset="header-bar-dark.png" media="(prefers-color-scheme: dark)"> // <img src="header-bar.png" alt="header-bar"> // // </picture> // // `AdwHeaderBar` is similar to [class@Gtk.HeaderBar], but provides additional // features compared to it. Refer to `GtkHeaderBar` for details. It is typically // used as a top bar within [class@ToolbarView]. // // ## Dialog Integration // // When placed inside an [class@Dialog], `AdwHeaderBar` will display the dialog // title instead of window title. It will also adjust the decoration layout to // ensure it always has a close button and nothing else. Set // [property@HeaderBar:show-start-title-buttons] and // [property@HeaderBar:show-end-title-buttons] to `FALSE` to remove it if it's // unwanted. // // ## Navigation View Integration // // When placed inside an [class@NavigationPage], `AdwHeaderBar` will display the // page title instead of window title. // // When used together with [class@NavigationView] or [class@NavigationSplitView], // it will also display a back button that can be used to go back to the previous // page. The button also has a context menu, allowing to pop multiple pages at // once, potentially across multiple navigation views. // // Set [property@HeaderBar:show-back-button] to `FALSE` to disable this behavior // in rare scenarios where it's unwanted. // // ## Split View Integration // // When placed inside [class@NavigationSplitView] or [class@OverlaySplitView], // `AdwHeaderBar` will automatically hide the title buttons other than at the // edges of the window. // // ## Bottom Sheet Integration // // When played inside [class@BottomSheet], `AdwHeaderBar` will not show the title // unless [property@BottomSheet:show-drag-handle] is set to `FALSE`, regardless // of [property@HeaderBar:show-title]. This only applies to the default title, // titles set with [property@HeaderBar:title-widget] will still be shown. // // ## Centering Policy // // [property@HeaderBar:centering-policy] allows to enforce strict centering of // the title widget. This can be useful for entries inside [class@Clamp]. // // ## Title Buttons // // Unlike `GtkHeaderBar`, `AdwHeaderBar` allows to toggle title button // visibility for each side individually, using the // [property@HeaderBar:show-start-title-buttons] and // [property@HeaderBar:show-end-title-buttons] properties. // // ## CSS nodes // // ``` // headerbar // ╰── windowhandle // // ╰── box // ├── widget // │ ╰── box.start // │ ├── windowcontrols.start // │ ├── widget // │ │ ╰── [button.back] // │ ╰── [other children] // ├── widget // │ ╰── [Title Widget] // ╰── widget // ╰── box.end // ├── [other children] // ╰── windowcontrols.end // // ``` // // `AdwHeaderBar`'s CSS node is called `headerbar`. It contains a `windowhandle` // subnode, which contains a `box` subnode, which contains three `widget` // subnodes at the start, center and end of the header bar. The start and end // subnodes contain a `box` subnode with the `.start` and `.end` style classes // respectively, and the center node contains a node that represents the title. // // Each of the boxes contains a `windowcontrols` subnode, see // [class@Gtk.WindowControls] for details, as well as other children. // // When [property@HeaderBar:show-back-button] is `TRUE`, the start box also // contains a node with the name `widget` that contains a node with the name // `button` and `.back` style class. // // ## Accessibility // // `AdwHeaderBar` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. type HeaderBar struct { gtk.Widget } var xHeaderBarGLibType func() types.GType func HeaderBarGLibType() types.GType { return xHeaderBarGLibType() } func HeaderBarNewFromInternalPtr(ptr uintptr) *HeaderBar { cls := &HeaderBar{} cls.Ptr = ptr return cls } var xNewHeaderBar func() uintptr // Creates a new `AdwHeaderBar`. func NewHeaderBar() *HeaderBar { var cls *HeaderBar cret := xNewHeaderBar() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &HeaderBar{} cls.Ptr = cret return cls } var xHeaderBarGetCenteringPolicy func(uintptr) CenteringPolicy // Gets the policy for aligning the center widget. func (x *HeaderBar) GetCenteringPolicy() CenteringPolicy { cret := xHeaderBarGetCenteringPolicy(x.GoPointer()) return cret } var xHeaderBarGetDecorationLayout func(uintptr) string // Gets the decoration layout for @self. func (x *HeaderBar) GetDecorationLayout() string { cret := xHeaderBarGetDecorationLayout(x.GoPointer()) return cret } var xHeaderBarGetShowBackButton func(uintptr) bool // Gets whether @self can show the back button. func (x *HeaderBar) GetShowBackButton() bool { cret := xHeaderBarGetShowBackButton(x.GoPointer()) return cret } var xHeaderBarGetShowEndTitleButtons func(uintptr) bool // Gets whether to show title buttons at the end of @self. func (x *HeaderBar) GetShowEndTitleButtons() bool { cret := xHeaderBarGetShowEndTitleButtons(x.GoPointer()) return cret } var xHeaderBarGetShowStartTitleButtons func(uintptr) bool // Gets whether to show title buttons at the start of @self. func (x *HeaderBar) GetShowStartTitleButtons() bool { cret := xHeaderBarGetShowStartTitleButtons(x.GoPointer()) return cret } var xHeaderBarGetShowTitle func(uintptr) bool // Gets whether the title widget should be shown. func (x *HeaderBar) GetShowTitle() bool { cret := xHeaderBarGetShowTitle(x.GoPointer()) return cret } var xHeaderBarGetTitleWidget func(uintptr) uintptr // Gets the title widget widget of @self. func (x *HeaderBar) GetTitleWidget() *gtk.Widget { var cls *gtk.Widget cret := xHeaderBarGetTitleWidget(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xHeaderBarPackEnd func(uintptr, uintptr) // Adds @child to @self, packed with reference to the end of @self. func (x *HeaderBar) PackEnd(ChildVar *gtk.Widget) { xHeaderBarPackEnd(x.GoPointer(), ChildVar.GoPointer()) } var xHeaderBarPackStart func(uintptr, uintptr) // Adds @child to @self, packed with reference to the start of the @self. func (x *HeaderBar) PackStart(ChildVar *gtk.Widget) { xHeaderBarPackStart(x.GoPointer(), ChildVar.GoPointer()) } var xHeaderBarRemove func(uintptr, uintptr) // Removes a child from @self. // // The child must have been added with [method@HeaderBar.pack_start], // [method@HeaderBar.pack_end] or [property@HeaderBar:title-widget]. func (x *HeaderBar) Remove(ChildVar *gtk.Widget) { xHeaderBarRemove(x.GoPointer(), ChildVar.GoPointer()) } var xHeaderBarSetCenteringPolicy func(uintptr, CenteringPolicy) // Sets the policy for aligning the center widget. func (x *HeaderBar) SetCenteringPolicy(CenteringPolicyVar CenteringPolicy) { xHeaderBarSetCenteringPolicy(x.GoPointer(), CenteringPolicyVar) } var xHeaderBarSetDecorationLayout func(uintptr, uintptr) // Sets the decoration layout for @self. // // If this property is not set, the // [property@Gtk.Settings:gtk-decoration-layout] setting is used. // // The format of the string is button names, separated by commas. A colon // separates the buttons that should appear at the start from those at the end. // Recognized button names are minimize, maximize, close and icon (the window // icon). // // For example, “icon:minimize,maximize,close” specifies an icon at the start, // and minimize, maximize and close buttons at the end. func (x *HeaderBar) SetDecorationLayout(LayoutVar *string) { LayoutVarPtr := core.GStrdupNullable(LayoutVar) defer core.GFreeNullable(LayoutVarPtr) xHeaderBarSetDecorationLayout(x.GoPointer(), LayoutVarPtr) } var xHeaderBarSetShowBackButton func(uintptr, bool) // Sets whether @self can show the back button. // // The back button will never be shown unless the header bar is placed inside an // [class@NavigationView]. Usually, there is no reason to set it to `FALSE`. func (x *HeaderBar) SetShowBackButton(ShowBackButtonVar bool) { xHeaderBarSetShowBackButton(x.GoPointer(), ShowBackButtonVar) } var xHeaderBarSetShowEndTitleButtons func(uintptr, bool) // Sets whether to show title buttons at the end of @self. // // See [property@HeaderBar:show-start-title-buttons] for the other side. // // Which buttons are actually shown and where is determined by the // [property@HeaderBar:decoration-layout] property, and by the state of the // window (e.g. a close button will not be shown if the window can't be closed). func (x *HeaderBar) SetShowEndTitleButtons(SettingVar bool) { xHeaderBarSetShowEndTitleButtons(x.GoPointer(), SettingVar) } var xHeaderBarSetShowStartTitleButtons func(uintptr, bool) // Sets whether to show title buttons at the start of @self. // // See [property@HeaderBar:show-end-title-buttons] for the other side. // // Which buttons are actually shown and where is determined by the // [property@HeaderBar:decoration-layout] property, and by the state of the // window (e.g. a close button will not be shown if the window can't be closed). func (x *HeaderBar) SetShowStartTitleButtons(SettingVar bool) { xHeaderBarSetShowStartTitleButtons(x.GoPointer(), SettingVar) } var xHeaderBarSetShowTitle func(uintptr, bool) // Sets whether the title widget should be shown. func (x *HeaderBar) SetShowTitle(ShowTitleVar bool) { xHeaderBarSetShowTitle(x.GoPointer(), ShowTitleVar) } var xHeaderBarSetTitleWidget func(uintptr, uintptr) // Sets the title widget for @self. // // When set to `NULL`, the header bar will display the title of the window it // is contained in. // // To use a different title, use [class@WindowTitle]: // // ```xml // <object class="AdwHeaderBar"> // // <property name="title-widget"> // <object class="AdwWindowTitle"> // <property name="title" translatable="yes">Title</property> // </object> // </property> // // </object> // ``` func (x *HeaderBar) SetTitleWidget(TitleWidgetVar *gtk.Widget) { xHeaderBarSetTitleWidget(x.GoPointer(), TitleWidgetVar.GoPointer()) } func (c *HeaderBar) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *HeaderBar) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyDecorationLayout sets the "decoration-layout" property. // The decoration layout for buttons. // // If this property is not set, the // [property@Gtk.Settings:gtk-decoration-layout] setting is used. // // The format of the string is button names, separated by commas. A colon // separates the buttons that should appear at the start from those at the // end. Recognized button names are minimize, maximize, close and icon (the // window icon). // // For example, “icon:minimize,maximize,close” specifies an icon at the start, // and minimize, maximize and close buttons at the end. func (x *HeaderBar) SetPropertyDecorationLayout(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("decoration-layout", &v) } // GetPropertyDecorationLayout gets the "decoration-layout" property. // The decoration layout for buttons. // // If this property is not set, the // [property@Gtk.Settings:gtk-decoration-layout] setting is used. // // The format of the string is button names, separated by commas. A colon // separates the buttons that should appear at the start from those at the // end. Recognized button names are minimize, maximize, close and icon (the // window icon). // // For example, “icon:minimize,maximize,close” specifies an icon at the start, // and minimize, maximize and close buttons at the end. func (x *HeaderBar) GetPropertyDecorationLayout() string { var v gobject.Value x.GetProperty("decoration-layout", &v) return v.GetString() } // SetPropertyShowBackButton sets the "show-back-button" property. // Whether the header bar can show the back button. // // The back button will never be shown unless the header bar is placed inside an // [class@NavigationView]. Usually, there is no reason to set this to `FALSE`. func (x *HeaderBar) SetPropertyShowBackButton(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("show-back-button", &v) } // GetPropertyShowBackButton gets the "show-back-button" property. // Whether the header bar can show the back button. // // The back button will never be shown unless the header bar is placed inside an // [class@NavigationView]. Usually, there is no reason to set this to `FALSE`. func (x *HeaderBar) GetPropertyShowBackButton() bool { var v gobject.Value x.GetProperty("show-back-button", &v) return v.GetBoolean() } // SetPropertyShowEndTitleButtons sets the "show-end-title-buttons" property. // Whether to show title buttons at the end of the header bar. // // See [property@HeaderBar:show-start-title-buttons] for the other side. // // Which buttons are actually shown and where is determined by the // [property@HeaderBar:decoration-layout] property, and by the state of the // window (e.g. a close button will not be shown if the window can't be // closed). func (x *HeaderBar) SetPropertyShowEndTitleButtons(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("show-end-title-buttons", &v) } // GetPropertyShowEndTitleButtons gets the "show-end-title-buttons" property. // Whether to show title buttons at the end of the header bar. // // See [property@HeaderBar:show-start-title-buttons] for the other side. // // Which buttons are actually shown and where is determined by the // [property@HeaderBar:decoration-layout] property, and by the state of the // window (e.g. a close button will not be shown if the window can't be // closed). func (x *HeaderBar) GetPropertyShowEndTitleButtons() bool { var v gobject.Value x.GetProperty("show-end-title-buttons", &v) return v.GetBoolean() } // SetPropertyShowStartTitleButtons sets the "show-start-title-buttons" property. // Whether to show title buttons at the start of the header bar. // // See [property@HeaderBar:show-end-title-buttons] for the other side. // // Which buttons are actually shown and where is determined by the // [property@HeaderBar:decoration-layout] property, and by the state of the // window (e.g. a close button will not be shown if the window can't be // closed). func (x *HeaderBar) SetPropertyShowStartTitleButtons(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("show-start-title-buttons", &v) } // GetPropertyShowStartTitleButtons gets the "show-start-title-buttons" property. // Whether to show title buttons at the start of the header bar. // // See [property@HeaderBar:show-end-title-buttons] for the other side. // // Which buttons are actually shown and where is determined by the // [property@HeaderBar:decoration-layout] property, and by the state of the // window (e.g. a close button will not be shown if the window can't be // closed). func (x *HeaderBar) GetPropertyShowStartTitleButtons() bool { var v gobject.Value x.GetProperty("show-start-title-buttons", &v) return v.GetBoolean() } // SetPropertyShowTitle sets the "show-title" property. // Whether the title widget should be shown. func (x *HeaderBar) SetPropertyShowTitle(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("show-title", &v) } // GetPropertyShowTitle gets the "show-title" property. // Whether the title widget should be shown. func (x *HeaderBar) GetPropertyShowTitle() bool { var v gobject.Value x.GetProperty("show-title", &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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *HeaderBar) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *HeaderBar) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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 *HeaderBar) 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(&xCenteringPolicyGLibType, libs, "adw_centering_policy_get_type") core.PuregoSafeRegister(&xHeaderBarGLibType, libs, "adw_header_bar_get_type") core.PuregoSafeRegister(&xNewHeaderBar, libs, "adw_header_bar_new") core.PuregoSafeRegister(&xHeaderBarGetCenteringPolicy, libs, "adw_header_bar_get_centering_policy") core.PuregoSafeRegister(&xHeaderBarGetDecorationLayout, libs, "adw_header_bar_get_decoration_layout") core.PuregoSafeRegister(&xHeaderBarGetShowBackButton, libs, "adw_header_bar_get_show_back_button") core.PuregoSafeRegister(&xHeaderBarGetShowEndTitleButtons, libs, "adw_header_bar_get_show_end_title_buttons") core.PuregoSafeRegister(&xHeaderBarGetShowStartTitleButtons, libs, "adw_header_bar_get_show_start_title_buttons") core.PuregoSafeRegister(&xHeaderBarGetShowTitle, libs, "adw_header_bar_get_show_title") core.PuregoSafeRegister(&xHeaderBarGetTitleWidget, libs, "adw_header_bar_get_title_widget") core.PuregoSafeRegister(&xHeaderBarPackEnd, libs, "adw_header_bar_pack_end") core.PuregoSafeRegister(&xHeaderBarPackStart, libs, "adw_header_bar_pack_start") core.PuregoSafeRegister(&xHeaderBarRemove, libs, "adw_header_bar_remove") core.PuregoSafeRegister(&xHeaderBarSetCenteringPolicy, libs, "adw_header_bar_set_centering_policy") core.PuregoSafeRegister(&xHeaderBarSetDecorationLayout, libs, "adw_header_bar_set_decoration_layout") core.PuregoSafeRegister(&xHeaderBarSetShowBackButton, libs, "adw_header_bar_set_show_back_button") core.PuregoSafeRegister(&xHeaderBarSetShowEndTitleButtons, libs, "adw_header_bar_set_show_end_title_buttons") core.PuregoSafeRegister(&xHeaderBarSetShowStartTitleButtons, libs, "adw_header_bar_set_show_start_title_buttons") core.PuregoSafeRegister(&xHeaderBarSetShowTitle, libs, "adw_header_bar_set_show_title") core.PuregoSafeRegister(&xHeaderBarSetTitleWidget, libs, "adw_header_bar_set_title_widget") }