v0.2.2 9100209

adw-header-bar.go RawHistoryFolder

1// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package adw
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/gobject"
12	"github.com/bnema/puregotk/v4/gobject/types"
13	"github.com/bnema/puregotk/v4/gtk"
14)
15
16type HeaderBarClass struct {
17	_ structs.HostLayout
18
19	ParentClass gtk.WidgetClass
20}
21
22func (x *HeaderBarClass) GoPointer() uintptr {
23	return uintptr(unsafe.Pointer(x))
24}
25
26// Describes title centering behavior of a [class@HeaderBar] widget.
27type CenteringPolicy int
28
29var xCenteringPolicyGLibType func() types.GType
30
31func CenteringPolicyGLibType() types.GType {
32	return xCenteringPolicyGLibType()
33}
34
35const (
36
37	// Keep the title centered when possible
38	CenteringPolicyLooseValue CenteringPolicy = 0
39	// Keep the title centered at all cost
40	CenteringPolicyStrictValue CenteringPolicy = 1
41)
42
43// A title bar widget.
44//
45// <picture>
46//
47//	<source srcset="header-bar-dark.png" media="(prefers-color-scheme: dark)">
48//	<img src="header-bar.png" alt="header-bar">
49//
50// </picture>
51//
52// `AdwHeaderBar` is similar to [class@Gtk.HeaderBar], but provides additional
53// features compared to it. Refer to `GtkHeaderBar` for details. It is typically
54// used as a top bar within [class@ToolbarView].
55//
56// ## Dialog Integration
57//
58// When placed inside an [class@Dialog], `AdwHeaderBar` will display the dialog
59// title instead of window title. It will also adjust the decoration layout to
60// ensure it always has a close button and nothing else. Set
61// [property@HeaderBar:show-start-title-buttons] and
62// [property@HeaderBar:show-end-title-buttons] to `FALSE` to remove it if it's
63// unwanted.
64//
65// ## Navigation View Integration
66//
67// When placed inside an [class@NavigationPage], `AdwHeaderBar` will display the
68// page title instead of window title.
69//
70// When used together with [class@NavigationView] or [class@NavigationSplitView],
71// it will also display a back button that can be used to go back to the previous
72// page. The button also has a context menu, allowing to pop multiple pages at
73// once, potentially across multiple navigation views.
74//
75// Set [property@HeaderBar:show-back-button] to `FALSE` to disable this behavior
76// in rare scenarios where it's unwanted.
77//
78// ## Split View Integration
79//
80// When placed inside [class@NavigationSplitView] or [class@OverlaySplitView],
81// `AdwHeaderBar` will automatically hide the title buttons other than at the
82// edges of the window.
83//
84// ## Bottom Sheet Integration
85//
86// When played inside [class@BottomSheet], `AdwHeaderBar` will not show the title
87// unless [property@BottomSheet:show-drag-handle] is set to `FALSE`, regardless
88// of [property@HeaderBar:show-title]. This only applies to the default title,
89// titles set with [property@HeaderBar:title-widget] will still be shown.
90//
91// ## Centering Policy
92//
93// [property@HeaderBar:centering-policy] allows to enforce strict centering of
94// the title widget. This can be useful for entries inside [class@Clamp].
95//
96// ## Title Buttons
97//
98// Unlike `GtkHeaderBar`, `AdwHeaderBar` allows to toggle title button
99// visibility for each side individually, using the
100// [property@HeaderBar:show-start-title-buttons] and
101// [property@HeaderBar:show-end-title-buttons] properties.
102//
103// ## CSS nodes
104//
105// ```
106// headerbar
107// ╰── windowhandle
108//
109//	╰── box
110//	    ├── widget
111//	    │   ╰── box.start
112//	    │       ├── windowcontrols.start
113//	    │       ├── widget
114//	    │       │   ╰── [button.back]
115//	    │       ╰── [other children]
116//	    ├── widget
117//	    │   ╰── [Title Widget]
118//	    ╰── widget
119//	        ╰── box.end
120//	            ├── [other children]
121//	            ╰── windowcontrols.end
122//
123// ```
124//
125// `AdwHeaderBar`'s CSS node is called `headerbar`. It contains a `windowhandle`
126// subnode, which contains a `box` subnode, which contains three `widget`
127// subnodes at the start, center and end of the header bar. The start and end
128// subnodes contain a `box` subnode with the `.start` and `.end` style classes
129// respectively, and the center node contains a node that represents the title.
130//
131// Each of the boxes contains a `windowcontrols` subnode, see
132// [class@Gtk.WindowControls] for details, as well as other children.
133//
134// When [property@HeaderBar:show-back-button] is `TRUE`, the start box also
135// contains a node with the name `widget` that contains a node with the name
136// `button` and `.back` style class.
137//
138// ## Accessibility
139//
140// `AdwHeaderBar` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
141type HeaderBar struct {
142	gtk.Widget
143}
144
145var xHeaderBarGLibType func() types.GType
146
147func HeaderBarGLibType() types.GType {
148	return xHeaderBarGLibType()
149}
150
151func HeaderBarNewFromInternalPtr(ptr uintptr) *HeaderBar {
152	cls := &HeaderBar{}
153	cls.Ptr = ptr
154	return cls
155}
156
157var xNewHeaderBar func() uintptr
158
159// Creates a new `AdwHeaderBar`.
160func NewHeaderBar() *HeaderBar {
161	var cls *HeaderBar
162
163	cret := xNewHeaderBar()
164
165	if cret == 0 {
166		return nil
167	}
168	gobject.IncreaseRef(cret)
169	cls = &HeaderBar{}
170	cls.Ptr = cret
171	return cls
172}
173
174var xHeaderBarGetCenteringPolicy func(uintptr) CenteringPolicy
175
176// Gets the policy for aligning the center widget.
177func (x *HeaderBar) GetCenteringPolicy() CenteringPolicy {
178
179	cret := xHeaderBarGetCenteringPolicy(x.GoPointer())
180	return cret
181}
182
183var xHeaderBarGetDecorationLayout func(uintptr) string
184
185// Gets the decoration layout for @self.
186func (x *HeaderBar) GetDecorationLayout() string {
187
188	cret := xHeaderBarGetDecorationLayout(x.GoPointer())
189	return cret
190}
191
192var xHeaderBarGetShowBackButton func(uintptr) bool
193
194// Gets whether @self can show the back button.
195func (x *HeaderBar) GetShowBackButton() bool {
196
197	cret := xHeaderBarGetShowBackButton(x.GoPointer())
198	return cret
199}
200
201var xHeaderBarGetShowEndTitleButtons func(uintptr) bool
202
203// Gets whether to show title buttons at the end of @self.
204func (x *HeaderBar) GetShowEndTitleButtons() bool {
205
206	cret := xHeaderBarGetShowEndTitleButtons(x.GoPointer())
207	return cret
208}
209
210var xHeaderBarGetShowStartTitleButtons func(uintptr) bool
211
212// Gets whether to show title buttons at the start of @self.
213func (x *HeaderBar) GetShowStartTitleButtons() bool {
214
215	cret := xHeaderBarGetShowStartTitleButtons(x.GoPointer())
216	return cret
217}
218
219var xHeaderBarGetShowTitle func(uintptr) bool
220
221// Gets whether the title widget should be shown.
222func (x *HeaderBar) GetShowTitle() bool {
223
224	cret := xHeaderBarGetShowTitle(x.GoPointer())
225	return cret
226}
227
228var xHeaderBarGetTitleWidget func(uintptr) uintptr
229
230// Gets the title widget widget of @self.
231func (x *HeaderBar) GetTitleWidget() *gtk.Widget {
232	var cls *gtk.Widget
233
234	cret := xHeaderBarGetTitleWidget(x.GoPointer())
235
236	if cret == 0 {
237		return nil
238	}
239	gobject.IncreaseRef(cret)
240	cls = &gtk.Widget{}
241	cls.Ptr = cret
242	return cls
243}
244
245var xHeaderBarPackEnd func(uintptr, uintptr)
246
247// Adds @child to @self, packed with reference to the end of @self.
248func (x *HeaderBar) PackEnd(ChildVar *gtk.Widget) {
249
250	xHeaderBarPackEnd(x.GoPointer(), ChildVar.GoPointer())
251
252}
253
254var xHeaderBarPackStart func(uintptr, uintptr)
255
256// Adds @child to @self, packed with reference to the start of the @self.
257func (x *HeaderBar) PackStart(ChildVar *gtk.Widget) {
258
259	xHeaderBarPackStart(x.GoPointer(), ChildVar.GoPointer())
260
261}
262
263var xHeaderBarRemove func(uintptr, uintptr)
264
265// Removes a child from @self.
266//
267// The child must have been added with [method@HeaderBar.pack_start],
268// [method@HeaderBar.pack_end] or [property@HeaderBar:title-widget].
269func (x *HeaderBar) Remove(ChildVar *gtk.Widget) {
270
271	xHeaderBarRemove(x.GoPointer(), ChildVar.GoPointer())
272
273}
274
275var xHeaderBarSetCenteringPolicy func(uintptr, CenteringPolicy)
276
277// Sets the policy for aligning the center widget.
278func (x *HeaderBar) SetCenteringPolicy(CenteringPolicyVar CenteringPolicy) {
279
280	xHeaderBarSetCenteringPolicy(x.GoPointer(), CenteringPolicyVar)
281
282}
283
284var xHeaderBarSetDecorationLayout func(uintptr, uintptr)
285
286// Sets the decoration layout for @self.
287//
288// If this property is not set, the
289// [property@Gtk.Settings:gtk-decoration-layout] setting is used.
290//
291// The format of the string is button names, separated by commas. A colon
292// separates the buttons that should appear at the start from those at the end.
293// Recognized button names are minimize, maximize, close and icon (the window
294// icon).
295//
296// For example, “icon:minimize,maximize,close” specifies an icon at the start,
297// and minimize, maximize and close buttons at the end.
298func (x *HeaderBar) SetDecorationLayout(LayoutVar *string) {
299
300	LayoutVarPtr := core.GStrdupNullable(LayoutVar)
301	defer core.GFreeNullable(LayoutVarPtr)
302
303	xHeaderBarSetDecorationLayout(x.GoPointer(), LayoutVarPtr)
304
305}
306
307var xHeaderBarSetShowBackButton func(uintptr, bool)
308
309// Sets whether @self can show the back button.
310//
311// The back button will never be shown unless the header bar is placed inside an
312// [class@NavigationView]. Usually, there is no reason to set it to `FALSE`.
313func (x *HeaderBar) SetShowBackButton(ShowBackButtonVar bool) {
314
315	xHeaderBarSetShowBackButton(x.GoPointer(), ShowBackButtonVar)
316
317}
318
319var xHeaderBarSetShowEndTitleButtons func(uintptr, bool)
320
321// Sets whether to show title buttons at the end of @self.
322//
323// See [property@HeaderBar:show-start-title-buttons] for the other side.
324//
325// Which buttons are actually shown and where is determined by the
326// [property@HeaderBar:decoration-layout] property, and by the state of the
327// window (e.g. a close button will not be shown if the window can't be closed).
328func (x *HeaderBar) SetShowEndTitleButtons(SettingVar bool) {
329
330	xHeaderBarSetShowEndTitleButtons(x.GoPointer(), SettingVar)
331
332}
333
334var xHeaderBarSetShowStartTitleButtons func(uintptr, bool)
335
336// Sets whether to show title buttons at the start of @self.
337//
338// See [property@HeaderBar:show-end-title-buttons] for the other side.
339//
340// Which buttons are actually shown and where is determined by the
341// [property@HeaderBar:decoration-layout] property, and by the state of the
342// window (e.g. a close button will not be shown if the window can't be closed).
343func (x *HeaderBar) SetShowStartTitleButtons(SettingVar bool) {
344
345	xHeaderBarSetShowStartTitleButtons(x.GoPointer(), SettingVar)
346
347}
348
349var xHeaderBarSetShowTitle func(uintptr, bool)
350
351// Sets whether the title widget should be shown.
352func (x *HeaderBar) SetShowTitle(ShowTitleVar bool) {
353
354	xHeaderBarSetShowTitle(x.GoPointer(), ShowTitleVar)
355
356}
357
358var xHeaderBarSetTitleWidget func(uintptr, uintptr)
359
360// Sets the title widget for @self.
361//
362// When set to `NULL`, the header bar will display the title of the window it
363// is contained in.
364//
365// To use a different title, use [class@WindowTitle]:
366//
367// ```xml
368// <object class="AdwHeaderBar">
369//
370//	<property name="title-widget">
371//	  <object class="AdwWindowTitle">
372//	    <property name="title" translatable="yes">Title</property>
373//	  </object>
374//	</property>
375//
376// </object>
377// ```
378func (x *HeaderBar) SetTitleWidget(TitleWidgetVar *gtk.Widget) {
379
380	xHeaderBarSetTitleWidget(x.GoPointer(), TitleWidgetVar.GoPointer())
381
382}
383
384func (c *HeaderBar) GoPointer() uintptr {
385	if c == nil {
386		return 0
387	}
388	return c.Ptr
389}
390
391func (c *HeaderBar) SetGoPointer(ptr uintptr) {
392	c.Ptr = ptr
393}
394
395// SetPropertyDecorationLayout sets the "decoration-layout" property.
396// The decoration layout for buttons.
397//
398// If this property is not set, the
399// [property@Gtk.Settings:gtk-decoration-layout] setting is used.
400//
401// The format of the string is button names, separated by commas. A colon
402// separates the buttons that should appear at the start from those at the
403// end. Recognized button names are minimize, maximize, close and icon (the
404// window icon).
405//
406// For example, “icon:minimize,maximize,close” specifies an icon at the start,
407// and minimize, maximize and close buttons at the end.
408func (x *HeaderBar) SetPropertyDecorationLayout(value string) {
409	var v gobject.Value
410	v.Init(gobject.TypeStringVal)
411	v.SetString(&value)
412	x.SetProperty("decoration-layout", &v)
413}
414
415// GetPropertyDecorationLayout gets the "decoration-layout" property.
416// The decoration layout for buttons.
417//
418// If this property is not set, the
419// [property@Gtk.Settings:gtk-decoration-layout] setting is used.
420//
421// The format of the string is button names, separated by commas. A colon
422// separates the buttons that should appear at the start from those at the
423// end. Recognized button names are minimize, maximize, close and icon (the
424// window icon).
425//
426// For example, “icon:minimize,maximize,close” specifies an icon at the start,
427// and minimize, maximize and close buttons at the end.
428func (x *HeaderBar) GetPropertyDecorationLayout() string {
429	var v gobject.Value
430	x.GetProperty("decoration-layout", &v)
431	return v.GetString()
432}
433
434// SetPropertyShowBackButton sets the "show-back-button" property.
435// Whether the header bar can show the back button.
436//
437// The back button will never be shown unless the header bar is placed inside an
438// [class@NavigationView]. Usually, there is no reason to set this to `FALSE`.
439func (x *HeaderBar) SetPropertyShowBackButton(value bool) {
440	var v gobject.Value
441	v.Init(gobject.TypeBooleanVal)
442	v.SetBoolean(value)
443	x.SetProperty("show-back-button", &v)
444}
445
446// GetPropertyShowBackButton gets the "show-back-button" property.
447// Whether the header bar can show the back button.
448//
449// The back button will never be shown unless the header bar is placed inside an
450// [class@NavigationView]. Usually, there is no reason to set this to `FALSE`.
451func (x *HeaderBar) GetPropertyShowBackButton() bool {
452	var v gobject.Value
453	x.GetProperty("show-back-button", &v)
454	return v.GetBoolean()
455}
456
457// SetPropertyShowEndTitleButtons sets the "show-end-title-buttons" property.
458// Whether to show title buttons at the end of the header bar.
459//
460// See [property@HeaderBar:show-start-title-buttons] for the other side.
461//
462// Which buttons are actually shown and where is determined by the
463// [property@HeaderBar:decoration-layout] property, and by the state of the
464// window (e.g. a close button will not be shown if the window can't be
465// closed).
466func (x *HeaderBar) SetPropertyShowEndTitleButtons(value bool) {
467	var v gobject.Value
468	v.Init(gobject.TypeBooleanVal)
469	v.SetBoolean(value)
470	x.SetProperty("show-end-title-buttons", &v)
471}
472
473// GetPropertyShowEndTitleButtons gets the "show-end-title-buttons" property.
474// Whether to show title buttons at the end of the header bar.
475//
476// See [property@HeaderBar:show-start-title-buttons] for the other side.
477//
478// Which buttons are actually shown and where is determined by the
479// [property@HeaderBar:decoration-layout] property, and by the state of the
480// window (e.g. a close button will not be shown if the window can't be
481// closed).
482func (x *HeaderBar) GetPropertyShowEndTitleButtons() bool {
483	var v gobject.Value
484	x.GetProperty("show-end-title-buttons", &v)
485	return v.GetBoolean()
486}
487
488// SetPropertyShowStartTitleButtons sets the "show-start-title-buttons" property.
489// Whether to show title buttons at the start of the header bar.
490//
491// See [property@HeaderBar:show-end-title-buttons] for the other side.
492//
493// Which buttons are actually shown and where is determined by the
494// [property@HeaderBar:decoration-layout] property, and by the state of the
495// window (e.g. a close button will not be shown if the window can't be
496// closed).
497func (x *HeaderBar) SetPropertyShowStartTitleButtons(value bool) {
498	var v gobject.Value
499	v.Init(gobject.TypeBooleanVal)
500	v.SetBoolean(value)
501	x.SetProperty("show-start-title-buttons", &v)
502}
503
504// GetPropertyShowStartTitleButtons gets the "show-start-title-buttons" property.
505// Whether to show title buttons at the start of the header bar.
506//
507// See [property@HeaderBar:show-end-title-buttons] for the other side.
508//
509// Which buttons are actually shown and where is determined by the
510// [property@HeaderBar:decoration-layout] property, and by the state of the
511// window (e.g. a close button will not be shown if the window can't be
512// closed).
513func (x *HeaderBar) GetPropertyShowStartTitleButtons() bool {
514	var v gobject.Value
515	x.GetProperty("show-start-title-buttons", &v)
516	return v.GetBoolean()
517}
518
519// SetPropertyShowTitle sets the "show-title" property.
520// Whether the title widget should be shown.
521func (x *HeaderBar) SetPropertyShowTitle(value bool) {
522	var v gobject.Value
523	v.Init(gobject.TypeBooleanVal)
524	v.SetBoolean(value)
525	x.SetProperty("show-title", &v)
526}
527
528// GetPropertyShowTitle gets the "show-title" property.
529// Whether the title widget should be shown.
530func (x *HeaderBar) GetPropertyShowTitle() bool {
531	var v gobject.Value
532	x.GetProperty("show-title", &v)
533	return v.GetBoolean()
534}
535
536// Requests the user's screen reader to announce the given message.
537//
538// This kind of notification is useful for messages that
539// either have only a visual representation or that are not
540// exposed visually at all, e.g. a notification about a
541// successful operation.
542//
543// Also, by using this API, you can ensure that the message
544// does not interrupts the user's current screen reader output.
545func (x *HeaderBar) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
546
547	gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
548
549}
550
551// Retrieves the accessible parent for an accessible object.
552//
553// This function returns `NULL` for top level widgets.
554func (x *HeaderBar) GetAccessibleParent() *gtk.AccessibleBase {
555	var cls *gtk.AccessibleBase
556
557	cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
558
559	if cret == 0 {
560		return nil
561	}
562	cls = &gtk.AccessibleBase{}
563	cls.Ptr = cret
564	return cls
565}
566
567// Retrieves the accessible role of an accessible object.
568func (x *HeaderBar) GetAccessibleRole() gtk.AccessibleRole {
569
570	cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
571	return cret
572}
573
574// Retrieves the implementation for the given accessible object.
575func (x *HeaderBar) GetAtContext() *gtk.ATContext {
576	var cls *gtk.ATContext
577
578	cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
579
580	if cret == 0 {
581		return nil
582	}
583	cls = &gtk.ATContext{}
584	cls.Ptr = cret
585	return cls
586}
587
588// Queries the coordinates and dimensions of this accessible
589//
590// This functionality can be overridden by `GtkAccessible`
591// implementations, e.g. to get the bounds from an ignored
592// child widget.
593func (x *HeaderBar) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
594
595	cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
596	return cret
597}
598
599// Retrieves the first accessible child of an accessible object.
600func (x *HeaderBar) GetFirstAccessibleChild() *gtk.AccessibleBase {
601	var cls *gtk.AccessibleBase
602
603	cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
604
605	if cret == 0 {
606		return nil
607	}
608	cls = &gtk.AccessibleBase{}
609	cls.Ptr = cret
610	return cls
611}
612
613// Retrieves the next accessible sibling of an accessible object
614func (x *HeaderBar) GetNextAccessibleSibling() *gtk.AccessibleBase {
615	var cls *gtk.AccessibleBase
616
617	cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
618
619	if cret == 0 {
620		return nil
621	}
622	cls = &gtk.AccessibleBase{}
623	cls.Ptr = cret
624	return cls
625}
626
627// Queries a platform state, such as focus.
628//
629// This functionality can be overridden by `GtkAccessible`
630// implementations, e.g. to get platform state from an ignored
631// child widget, as is the case for `GtkText` wrappers.
632func (x *HeaderBar) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
633
634	cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
635	return cret
636}
637
638// Resets the accessible property to its default value.
639func (x *HeaderBar) ResetProperty(PropertyVar gtk.AccessibleProperty) {
640
641	gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
642
643}
644
645// Resets the accessible relation to its default value.
646func (x *HeaderBar) ResetRelation(RelationVar gtk.AccessibleRelation) {
647
648	gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
649
650}
651
652// Resets the accessible state to its default value.
653func (x *HeaderBar) ResetState(StateVar gtk.AccessibleState) {
654
655	gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
656
657}
658
659// Sets the parent and sibling of an accessible object.
660//
661// This function is meant to be used by accessible implementations that are
662// not part of the widget hierarchy, and but act as a logical bridge between
663// widgets. For instance, if a widget creates an object that holds metadata
664// for each child, and you want that object to implement the `GtkAccessible`
665// interface, you will use this function to ensure that the parent of each
666// child widget is the metadata object, and the parent of each metadata
667// object is the container widget.
668func (x *HeaderBar) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
669
670	gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
671
672}
673
674// Updates the next accessible sibling.
675//
676// That might be useful when a new child of a custom accessible
677// is created, and it needs to be linked to a previous child.
678func (x *HeaderBar) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
679
680	gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
681
682}
683
684// Informs ATs that the platform state has changed.
685//
686// This function should be used by `GtkAccessible` implementations that
687// have a platform state but are not widgets. Widgets handle platform
688// states automatically.
689func (x *HeaderBar) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
690
691	gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
692
693}
694
695// Updates a list of accessible properties.
696//
697// See the [enum@Gtk.AccessibleProperty] documentation for the
698// value types of accessible properties.
699//
700// This function should be called by `GtkWidget` types whenever
701// an accessible property change must be communicated to assistive
702// technologies.
703//
704// Example:
705// ```c
706// value = gtk_adjustment_get_value (adjustment);
707// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
708//
709//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
710//	-1);
711//
712// ```
713func (x *HeaderBar) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
714
715	gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
716
717}
718
719// Updates an array of accessible properties.
720//
721// This function should be called by `GtkWidget` types whenever an accessible
722// property change must be communicated to assistive technologies.
723//
724// This function is meant to be used by language bindings.
725func (x *HeaderBar) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
726
727	gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
728
729}
730
731// Updates a list of accessible relations.
732//
733// This function should be called by `GtkWidget` types whenever an accessible
734// relation change must be communicated to assistive technologies.
735//
736// If the [enum@Gtk.AccessibleRelation] requires a list of references,
737// you should pass each reference individually, followed by `NULL`, e.g.
738//
739// ```c
740// gtk_accessible_update_relation (accessible,
741//
742//	GTK_ACCESSIBLE_RELATION_CONTROLS,
743//	  ref1, NULL,
744//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
745//	  ref1, ref2, ref3, NULL,
746//	-1);
747//
748// ```
749func (x *HeaderBar) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
750
751	gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
752
753}
754
755// Updates an array of accessible relations.
756//
757// This function should be called by `GtkWidget` types whenever an accessible
758// relation change must be communicated to assistive technologies.
759//
760// This function is meant to be used by language bindings.
761func (x *HeaderBar) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
762
763	gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
764
765}
766
767// Updates a list of accessible states.
768//
769// See the [enum@Gtk.AccessibleState] documentation for the
770// value types of accessible states.
771//
772// This function should be called by `GtkWidget` types whenever
773// an accessible state change must be communicated to assistive
774// technologies.
775//
776// Example:
777//
778// ```c
779// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
780// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
781//
782//	GTK_ACCESSIBLE_STATE_CHECKED, value,
783//	-1);
784//
785// ```
786func (x *HeaderBar) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
787
788	gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
789
790}
791
792// Updates an array of accessible states.
793//
794// This function should be called by `GtkWidget` types whenever an accessible
795// state change must be communicated to assistive technologies.
796//
797// This function is meant to be used by language bindings.
798func (x *HeaderBar) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
799
800	gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
801
802}
803
804// Gets the ID of the @buildable object.
805//
806// `GtkBuilder` sets the name based on the ID attribute
807// of the `<object>` tag used to construct the @buildable.
808func (x *HeaderBar) GetBuildableId() string {
809
810	cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
811	return cret
812}
813
814func init() {
815	core.SetPackageName("ADW", "libadwaita-1")
816	core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
817	var libs []uintptr
818	for _, libPath := range core.GetPaths("ADW") {
819		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
820		if err != nil {
821			panic(err)
822		}
823		libs = append(libs, lib)
824	}
825
826	core.PuregoSafeRegister(&xCenteringPolicyGLibType, libs, "adw_centering_policy_get_type")
827
828	core.PuregoSafeRegister(&xHeaderBarGLibType, libs, "adw_header_bar_get_type")
829
830	core.PuregoSafeRegister(&xNewHeaderBar, libs, "adw_header_bar_new")
831
832	core.PuregoSafeRegister(&xHeaderBarGetCenteringPolicy, libs, "adw_header_bar_get_centering_policy")
833	core.PuregoSafeRegister(&xHeaderBarGetDecorationLayout, libs, "adw_header_bar_get_decoration_layout")
834	core.PuregoSafeRegister(&xHeaderBarGetShowBackButton, libs, "adw_header_bar_get_show_back_button")
835	core.PuregoSafeRegister(&xHeaderBarGetShowEndTitleButtons, libs, "adw_header_bar_get_show_end_title_buttons")
836	core.PuregoSafeRegister(&xHeaderBarGetShowStartTitleButtons, libs, "adw_header_bar_get_show_start_title_buttons")
837	core.PuregoSafeRegister(&xHeaderBarGetShowTitle, libs, "adw_header_bar_get_show_title")
838	core.PuregoSafeRegister(&xHeaderBarGetTitleWidget, libs, "adw_header_bar_get_title_widget")
839	core.PuregoSafeRegister(&xHeaderBarPackEnd, libs, "adw_header_bar_pack_end")
840	core.PuregoSafeRegister(&xHeaderBarPackStart, libs, "adw_header_bar_pack_start")
841	core.PuregoSafeRegister(&xHeaderBarRemove, libs, "adw_header_bar_remove")
842	core.PuregoSafeRegister(&xHeaderBarSetCenteringPolicy, libs, "adw_header_bar_set_centering_policy")
843	core.PuregoSafeRegister(&xHeaderBarSetDecorationLayout, libs, "adw_header_bar_set_decoration_layout")
844	core.PuregoSafeRegister(&xHeaderBarSetShowBackButton, libs, "adw_header_bar_set_show_back_button")
845	core.PuregoSafeRegister(&xHeaderBarSetShowEndTitleButtons, libs, "adw_header_bar_set_show_end_title_buttons")
846	core.PuregoSafeRegister(&xHeaderBarSetShowStartTitleButtons, libs, "adw_header_bar_set_show_start_title_buttons")
847	core.PuregoSafeRegister(&xHeaderBarSetShowTitle, libs, "adw_header_bar_set_show_title")
848	core.PuregoSafeRegister(&xHeaderBarSetTitleWidget, libs, "adw_header_bar_set_title_widget")
849
850}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close