v0.2.1 c0399be

adw-tab-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/gdk"
12	"github.com/bnema/puregotk/v4/glib"
13	"github.com/bnema/puregotk/v4/gobject"
14	"github.com/bnema/puregotk/v4/gobject/types"
15	"github.com/bnema/puregotk/v4/gtk"
16)
17
18type TabBarClass struct {
19	_ structs.HostLayout
20
21	ParentClass gtk.WidgetClass
22}
23
24func (x *TabBarClass) GoPointer() uintptr {
25	return uintptr(unsafe.Pointer(x))
26}
27
28// A tab bar for [class@TabView].
29//
30// <picture>
31//
32//	<source srcset="tab-bar-dark.png" media="(prefers-color-scheme: dark)">
33//	<img src="tab-bar.png" alt="tab-bar">
34//
35// </picture>
36//
37// The `AdwTabBar` widget is a tab bar that can be used with conjunction with
38// `AdwTabView`. It is typically used as a top bar within [class@ToolbarView].
39//
40// `AdwTabBar` can autohide and can optionally contain action widgets on both
41// sides of the tabs.
42//
43// When there's not enough space to show all the tabs, `AdwTabBar` will scroll
44// them. Pinned tabs always stay visible and aren't a part of the scrollable
45// area.
46//
47// ## CSS nodes
48//
49// `AdwTabBar` has a single CSS node with name `tabbar`.
50//
51// ## Style classes
52//
53// By default `AdwTabBar` look like a part of an `AdwHeaderBar` and is intended
54// to be used directly attached to one or used as a [class@ToolbarView] toolbar.
55// The [`.inline`](style-classes.html#inline) style class removes its background,
56// so that it can be used in different contexts instead.
57//
58// <picture>
59//
60//	<source srcset="tab-bar-inline-dark.png" media="(prefers-color-scheme: dark)">
61//	<img src="tab-bar-inline.png" alt="tab-bar-inline">
62//
63// </picture>
64type TabBar struct {
65	gtk.Widget
66}
67
68var xTabBarGLibType func() types.GType
69
70func TabBarGLibType() types.GType {
71	return xTabBarGLibType()
72}
73
74func TabBarNewFromInternalPtr(ptr uintptr) *TabBar {
75	cls := &TabBar{}
76	cls.Ptr = ptr
77	return cls
78}
79
80var xNewTabBar func() uintptr
81
82// Creates a new `AdwTabBar`.
83func NewTabBar() *TabBar {
84	var cls *TabBar
85
86	cret := xNewTabBar()
87
88	if cret == 0 {
89		return nil
90	}
91	gobject.IncreaseRef(cret)
92	cls = &TabBar{}
93	cls.Ptr = cret
94	return cls
95}
96
97var xTabBarGetAutohide func(uintptr) bool
98
99// Gets whether the tabs automatically hide.
100func (x *TabBar) GetAutohide() bool {
101
102	cret := xTabBarGetAutohide(x.GoPointer())
103	return cret
104}
105
106var xTabBarGetEndActionWidget func(uintptr) uintptr
107
108// Gets the widget shown after the tabs.
109func (x *TabBar) GetEndActionWidget() *gtk.Widget {
110	var cls *gtk.Widget
111
112	cret := xTabBarGetEndActionWidget(x.GoPointer())
113
114	if cret == 0 {
115		return nil
116	}
117	gobject.IncreaseRef(cret)
118	cls = &gtk.Widget{}
119	cls.Ptr = cret
120	return cls
121}
122
123var xTabBarGetExpandTabs func(uintptr) bool
124
125// Gets whether tabs expand to full width.
126func (x *TabBar) GetExpandTabs() bool {
127
128	cret := xTabBarGetExpandTabs(x.GoPointer())
129	return cret
130}
131
132var xTabBarGetExtraDragPreferredAction func(uintptr) gdk.DragAction
133
134// Gets the current action during a drop on the extra_drop_target.
135func (x *TabBar) GetExtraDragPreferredAction() gdk.DragAction {
136
137	cret := xTabBarGetExtraDragPreferredAction(x.GoPointer())
138	return cret
139}
140
141var xTabBarGetExtraDragPreload func(uintptr) bool
142
143// Gets whether drop data should be preloaded on hover.
144func (x *TabBar) GetExtraDragPreload() bool {
145
146	cret := xTabBarGetExtraDragPreload(x.GoPointer())
147	return cret
148}
149
150var xTabBarGetInverted func(uintptr) bool
151
152// Gets whether tabs use inverted layout.
153func (x *TabBar) GetInverted() bool {
154
155	cret := xTabBarGetInverted(x.GoPointer())
156	return cret
157}
158
159var xTabBarGetIsOverflowing func(uintptr) bool
160
161// Gets whether @self is overflowing.
162//
163// If `TRUE`, all tabs cannot be displayed at once and require scrolling.
164func (x *TabBar) GetIsOverflowing() bool {
165
166	cret := xTabBarGetIsOverflowing(x.GoPointer())
167	return cret
168}
169
170var xTabBarGetStartActionWidget func(uintptr) uintptr
171
172// Gets the widget shown before the tabs.
173func (x *TabBar) GetStartActionWidget() *gtk.Widget {
174	var cls *gtk.Widget
175
176	cret := xTabBarGetStartActionWidget(x.GoPointer())
177
178	if cret == 0 {
179		return nil
180	}
181	gobject.IncreaseRef(cret)
182	cls = &gtk.Widget{}
183	cls.Ptr = cret
184	return cls
185}
186
187var xTabBarGetTabsRevealed func(uintptr) bool
188
189// Gets whether the tabs are currently revealed.
190//
191// See [property@TabBar:autohide].
192func (x *TabBar) GetTabsRevealed() bool {
193
194	cret := xTabBarGetTabsRevealed(x.GoPointer())
195	return cret
196}
197
198var xTabBarGetView func(uintptr) uintptr
199
200// Gets the tab view @self controls.
201func (x *TabBar) GetView() *TabView {
202	var cls *TabView
203
204	cret := xTabBarGetView(x.GoPointer())
205
206	if cret == 0 {
207		return nil
208	}
209	gobject.IncreaseRef(cret)
210	cls = &TabView{}
211	cls.Ptr = cret
212	return cls
213}
214
215var xTabBarSetAutohide func(uintptr, bool)
216
217// Sets whether the tabs automatically hide.
218//
219// If set to `TRUE`, the tab bar disappears when [property@TabBar:view] has 0
220// or 1 tab, no pinned tabs, and no tab is being transferred.
221//
222// See [property@TabBar:tabs-revealed].
223func (x *TabBar) SetAutohide(AutohideVar bool) {
224
225	xTabBarSetAutohide(x.GoPointer(), AutohideVar)
226
227}
228
229var xTabBarSetEndActionWidget func(uintptr, uintptr)
230
231// Sets the widget to show after the tabs.
232func (x *TabBar) SetEndActionWidget(WidgetVar *gtk.Widget) {
233
234	xTabBarSetEndActionWidget(x.GoPointer(), WidgetVar.GoPointer())
235
236}
237
238var xTabBarSetExpandTabs func(uintptr, bool)
239
240// Sets whether tabs expand to full width.
241//
242// If set to `TRUE`, the tabs will always vary width filling the whole width
243// when possible, otherwise tabs will always have the minimum possible size.
244func (x *TabBar) SetExpandTabs(ExpandTabsVar bool) {
245
246	xTabBarSetExpandTabs(x.GoPointer(), ExpandTabsVar)
247
248}
249
250var xTabBarSetExtraDragPreload func(uintptr, bool)
251
252// Sets whether drop data should be preloaded on hover.
253//
254// See [property@Gtk.DropTarget:preload].
255func (x *TabBar) SetExtraDragPreload(PreloadVar bool) {
256
257	xTabBarSetExtraDragPreload(x.GoPointer(), PreloadVar)
258
259}
260
261var xTabBarSetInverted func(uintptr, bool)
262
263// Sets whether tabs tabs use inverted layout.
264//
265// If set to `TRUE`, non-pinned tabs will have the close button at the beginning
266// and the indicator at the end rather than the opposite.
267func (x *TabBar) SetInverted(InvertedVar bool) {
268
269	xTabBarSetInverted(x.GoPointer(), InvertedVar)
270
271}
272
273var xTabBarSetStartActionWidget func(uintptr, uintptr)
274
275// Sets the widget to show before the tabs.
276func (x *TabBar) SetStartActionWidget(WidgetVar *gtk.Widget) {
277
278	xTabBarSetStartActionWidget(x.GoPointer(), WidgetVar.GoPointer())
279
280}
281
282var xTabBarSetView func(uintptr, uintptr)
283
284// Sets the tab view @self controls.
285func (x *TabBar) SetView(ViewVar *TabView) {
286
287	xTabBarSetView(x.GoPointer(), ViewVar.GoPointer())
288
289}
290
291var xTabBarSetupExtraDropTarget func(uintptr, gdk.DragAction, []types.GType, uint)
292
293// Sets the supported types for this drop target.
294//
295// Sets up an extra drop target on tabs.
296//
297// This allows to drag arbitrary content onto tabs, for example URLs in a web
298// browser.
299//
300// If a tab is hovered for a certain period of time while dragging the content,
301// it will be automatically selected.
302//
303// The [signal@TabBar::extra-drag-drop] signal can be used to handle the drop.
304func (x *TabBar) SetupExtraDropTarget(ActionsVar gdk.DragAction, TypesVar []types.GType, NTypesVar uint) {
305
306	xTabBarSetupExtraDropTarget(x.GoPointer(), ActionsVar, TypesVar, NTypesVar)
307
308}
309
310func (c *TabBar) GoPointer() uintptr {
311	if c == nil {
312		return 0
313	}
314	return c.Ptr
315}
316
317func (c *TabBar) SetGoPointer(ptr uintptr) {
318	c.Ptr = ptr
319}
320
321// SetPropertyAutohide sets the "autohide" property.
322// Whether the tabs automatically hide.
323//
324// If set to `TRUE`, the tab bar disappears when [property@TabBar:view] has 0
325// or 1 tab, no pinned tabs, and no tab is being transferred.
326//
327// See [property@TabBar:tabs-revealed].
328func (x *TabBar) SetPropertyAutohide(value bool) {
329	var v gobject.Value
330	v.Init(gobject.TypeBooleanVal)
331	v.SetBoolean(value)
332	x.SetProperty("autohide", &v)
333}
334
335// GetPropertyAutohide gets the "autohide" property.
336// Whether the tabs automatically hide.
337//
338// If set to `TRUE`, the tab bar disappears when [property@TabBar:view] has 0
339// or 1 tab, no pinned tabs, and no tab is being transferred.
340//
341// See [property@TabBar:tabs-revealed].
342func (x *TabBar) GetPropertyAutohide() bool {
343	var v gobject.Value
344	x.GetProperty("autohide", &v)
345	return v.GetBoolean()
346}
347
348// SetPropertyExpandTabs sets the "expand-tabs" property.
349// Whether tabs expand to full width.
350//
351// If set to `TRUE`, the tabs will always vary width filling the whole width
352// when possible, otherwise tabs will always have the minimum possible size.
353func (x *TabBar) SetPropertyExpandTabs(value bool) {
354	var v gobject.Value
355	v.Init(gobject.TypeBooleanVal)
356	v.SetBoolean(value)
357	x.SetProperty("expand-tabs", &v)
358}
359
360// GetPropertyExpandTabs gets the "expand-tabs" property.
361// Whether tabs expand to full width.
362//
363// If set to `TRUE`, the tabs will always vary width filling the whole width
364// when possible, otherwise tabs will always have the minimum possible size.
365func (x *TabBar) GetPropertyExpandTabs() bool {
366	var v gobject.Value
367	x.GetProperty("expand-tabs", &v)
368	return v.GetBoolean()
369}
370
371// SetPropertyExtraDragPreload sets the "extra-drag-preload" property.
372// Whether the drop data should be preloaded on hover.
373//
374// See [property@Gtk.DropTarget:preload].
375func (x *TabBar) SetPropertyExtraDragPreload(value bool) {
376	var v gobject.Value
377	v.Init(gobject.TypeBooleanVal)
378	v.SetBoolean(value)
379	x.SetProperty("extra-drag-preload", &v)
380}
381
382// GetPropertyExtraDragPreload gets the "extra-drag-preload" property.
383// Whether the drop data should be preloaded on hover.
384//
385// See [property@Gtk.DropTarget:preload].
386func (x *TabBar) GetPropertyExtraDragPreload() bool {
387	var v gobject.Value
388	x.GetProperty("extra-drag-preload", &v)
389	return v.GetBoolean()
390}
391
392// SetPropertyInverted sets the "inverted" property.
393// Whether tabs use inverted layout.
394//
395// If set to `TRUE`, non-pinned tabs will have the close button at the
396// beginning and the indicator at the end rather than the opposite.
397func (x *TabBar) SetPropertyInverted(value bool) {
398	var v gobject.Value
399	v.Init(gobject.TypeBooleanVal)
400	v.SetBoolean(value)
401	x.SetProperty("inverted", &v)
402}
403
404// GetPropertyInverted gets the "inverted" property.
405// Whether tabs use inverted layout.
406//
407// If set to `TRUE`, non-pinned tabs will have the close button at the
408// beginning and the indicator at the end rather than the opposite.
409func (x *TabBar) GetPropertyInverted() bool {
410	var v gobject.Value
411	x.GetProperty("inverted", &v)
412	return v.GetBoolean()
413}
414
415// GetPropertyIsOverflowing gets the "is-overflowing" property.
416// Whether the tab bar is overflowing.
417//
418// If `TRUE`, all tabs cannot be displayed at once and require scrolling.
419func (x *TabBar) GetPropertyIsOverflowing() bool {
420	var v gobject.Value
421	x.GetProperty("is-overflowing", &v)
422	return v.GetBoolean()
423}
424
425// GetPropertyTabsRevealed gets the "tabs-revealed" property.
426// Whether the tabs are currently revealed.
427//
428// See [property@TabBar:autohide].
429func (x *TabBar) GetPropertyTabsRevealed() bool {
430	var v gobject.Value
431	x.GetProperty("tabs-revealed", &v)
432	return v.GetBoolean()
433}
434
435// This signal is emitted when content is dropped onto a tab.
436//
437// The content must be of one of the types set up via
438// [method@TabBar.setup_extra_drop_target].
439//
440// See [signal@Gtk.DropTarget::drop].
441func (x *TabBar) ConnectExtraDragDrop(cb *func(TabBar, uintptr, uintptr) bool) uint {
442	cbPtr := uintptr(unsafe.Pointer(cb))
443	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
444		handlerID := gobject.SignalConnect(x.GoPointer(), "extra-drag-drop", cbRefPtr)
445		glib.SaveHandlerMapping(handlerID, cbPtr)
446		return handlerID
447	}
448
449	fcb := func(clsPtr uintptr, PageVarp uintptr, ValueVarp uintptr) bool {
450		fa := TabBar{}
451		fa.Ptr = clsPtr
452		cbFn := *cb
453
454		return cbFn(fa, PageVarp, ValueVarp)
455
456	}
457	cbRefPtr := purego.NewCallback(fcb)
458	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
459	handlerID := gobject.SignalConnect(x.GoPointer(), "extra-drag-drop", cbRefPtr)
460	glib.SaveHandlerMapping(handlerID, cbPtr)
461	return handlerID
462}
463
464// This signal is emitted when the dropped content is preloaded.
465//
466// In order for data to be preloaded, [property@TabBar:extra-drag-preload]
467// must be set to `TRUE`.
468//
469// The content must be of one of the types set up via
470// [method@TabBar.setup_extra_drop_target].
471//
472// See [property@Gtk.DropTarget:value].
473func (x *TabBar) ConnectExtraDragValue(cb *func(TabBar, uintptr, uintptr) gdk.DragAction) uint {
474	cbPtr := uintptr(unsafe.Pointer(cb))
475	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
476		handlerID := gobject.SignalConnect(x.GoPointer(), "extra-drag-value", cbRefPtr)
477		glib.SaveHandlerMapping(handlerID, cbPtr)
478		return handlerID
479	}
480
481	fcb := func(clsPtr uintptr, PageVarp uintptr, ValueVarp uintptr) gdk.DragAction {
482		fa := TabBar{}
483		fa.Ptr = clsPtr
484		cbFn := *cb
485
486		return cbFn(fa, PageVarp, ValueVarp)
487
488	}
489	cbRefPtr := purego.NewCallback(fcb)
490	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
491	handlerID := gobject.SignalConnect(x.GoPointer(), "extra-drag-value", cbRefPtr)
492	glib.SaveHandlerMapping(handlerID, cbPtr)
493	return handlerID
494}
495
496// Requests the user's screen reader to announce the given message.
497//
498// This kind of notification is useful for messages that
499// either have only a visual representation or that are not
500// exposed visually at all, e.g. a notification about a
501// successful operation.
502//
503// Also, by using this API, you can ensure that the message
504// does not interrupts the user's current screen reader output.
505func (x *TabBar) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
506
507	gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
508
509}
510
511// Retrieves the accessible parent for an accessible object.
512//
513// This function returns `NULL` for top level widgets.
514func (x *TabBar) GetAccessibleParent() *gtk.AccessibleBase {
515	var cls *gtk.AccessibleBase
516
517	cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
518
519	if cret == 0 {
520		return nil
521	}
522	cls = &gtk.AccessibleBase{}
523	cls.Ptr = cret
524	return cls
525}
526
527// Retrieves the accessible role of an accessible object.
528func (x *TabBar) GetAccessibleRole() gtk.AccessibleRole {
529
530	cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
531	return cret
532}
533
534// Retrieves the implementation for the given accessible object.
535func (x *TabBar) GetAtContext() *gtk.ATContext {
536	var cls *gtk.ATContext
537
538	cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
539
540	if cret == 0 {
541		return nil
542	}
543	cls = &gtk.ATContext{}
544	cls.Ptr = cret
545	return cls
546}
547
548// Queries the coordinates and dimensions of this accessible
549//
550// This functionality can be overridden by `GtkAccessible`
551// implementations, e.g. to get the bounds from an ignored
552// child widget.
553func (x *TabBar) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
554
555	cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
556	return cret
557}
558
559// Retrieves the first accessible child of an accessible object.
560func (x *TabBar) GetFirstAccessibleChild() *gtk.AccessibleBase {
561	var cls *gtk.AccessibleBase
562
563	cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
564
565	if cret == 0 {
566		return nil
567	}
568	cls = &gtk.AccessibleBase{}
569	cls.Ptr = cret
570	return cls
571}
572
573// Retrieves the next accessible sibling of an accessible object
574func (x *TabBar) GetNextAccessibleSibling() *gtk.AccessibleBase {
575	var cls *gtk.AccessibleBase
576
577	cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
578
579	if cret == 0 {
580		return nil
581	}
582	cls = &gtk.AccessibleBase{}
583	cls.Ptr = cret
584	return cls
585}
586
587// Queries a platform state, such as focus.
588//
589// This functionality can be overridden by `GtkAccessible`
590// implementations, e.g. to get platform state from an ignored
591// child widget, as is the case for `GtkText` wrappers.
592func (x *TabBar) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
593
594	cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
595	return cret
596}
597
598// Resets the accessible property to its default value.
599func (x *TabBar) ResetProperty(PropertyVar gtk.AccessibleProperty) {
600
601	gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
602
603}
604
605// Resets the accessible relation to its default value.
606func (x *TabBar) ResetRelation(RelationVar gtk.AccessibleRelation) {
607
608	gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
609
610}
611
612// Resets the accessible state to its default value.
613func (x *TabBar) ResetState(StateVar gtk.AccessibleState) {
614
615	gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
616
617}
618
619// Sets the parent and sibling of an accessible object.
620//
621// This function is meant to be used by accessible implementations that are
622// not part of the widget hierarchy, and but act as a logical bridge between
623// widgets. For instance, if a widget creates an object that holds metadata
624// for each child, and you want that object to implement the `GtkAccessible`
625// interface, you will use this function to ensure that the parent of each
626// child widget is the metadata object, and the parent of each metadata
627// object is the container widget.
628func (x *TabBar) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
629
630	gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
631
632}
633
634// Updates the next accessible sibling.
635//
636// That might be useful when a new child of a custom accessible
637// is created, and it needs to be linked to a previous child.
638func (x *TabBar) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
639
640	gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
641
642}
643
644// Informs ATs that the platform state has changed.
645//
646// This function should be used by `GtkAccessible` implementations that
647// have a platform state but are not widgets. Widgets handle platform
648// states automatically.
649func (x *TabBar) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
650
651	gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
652
653}
654
655// Updates a list of accessible properties.
656//
657// See the [enum@Gtk.AccessibleProperty] documentation for the
658// value types of accessible properties.
659//
660// This function should be called by `GtkWidget` types whenever
661// an accessible property change must be communicated to assistive
662// technologies.
663//
664// Example:
665// ```c
666// value = gtk_adjustment_get_value (adjustment);
667// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
668//
669//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
670//	-1);
671//
672// ```
673func (x *TabBar) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
674
675	gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
676
677}
678
679// Updates an array of accessible properties.
680//
681// This function should be called by `GtkWidget` types whenever an accessible
682// property change must be communicated to assistive technologies.
683//
684// This function is meant to be used by language bindings.
685func (x *TabBar) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
686
687	gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
688
689}
690
691// Updates a list of accessible relations.
692//
693// This function should be called by `GtkWidget` types whenever an accessible
694// relation change must be communicated to assistive technologies.
695//
696// If the [enum@Gtk.AccessibleRelation] requires a list of references,
697// you should pass each reference individually, followed by `NULL`, e.g.
698//
699// ```c
700// gtk_accessible_update_relation (accessible,
701//
702//	GTK_ACCESSIBLE_RELATION_CONTROLS,
703//	  ref1, NULL,
704//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
705//	  ref1, ref2, ref3, NULL,
706//	-1);
707//
708// ```
709func (x *TabBar) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
710
711	gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
712
713}
714
715// Updates an array of accessible relations.
716//
717// This function should be called by `GtkWidget` types whenever an accessible
718// relation change must be communicated to assistive technologies.
719//
720// This function is meant to be used by language bindings.
721func (x *TabBar) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
722
723	gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
724
725}
726
727// Updates a list of accessible states.
728//
729// See the [enum@Gtk.AccessibleState] documentation for the
730// value types of accessible states.
731//
732// This function should be called by `GtkWidget` types whenever
733// an accessible state change must be communicated to assistive
734// technologies.
735//
736// Example:
737//
738// ```c
739// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
740// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
741//
742//	GTK_ACCESSIBLE_STATE_CHECKED, value,
743//	-1);
744//
745// ```
746func (x *TabBar) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
747
748	gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
749
750}
751
752// Updates an array of accessible states.
753//
754// This function should be called by `GtkWidget` types whenever an accessible
755// state change must be communicated to assistive technologies.
756//
757// This function is meant to be used by language bindings.
758func (x *TabBar) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
759
760	gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
761
762}
763
764// Gets the ID of the @buildable object.
765//
766// `GtkBuilder` sets the name based on the ID attribute
767// of the `<object>` tag used to construct the @buildable.
768func (x *TabBar) GetBuildableId() string {
769
770	cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
771	return cret
772}
773
774func init() {
775	core.SetPackageName("ADW", "libadwaita-1")
776	core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
777	var libs []uintptr
778	for _, libPath := range core.GetPaths("ADW") {
779		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
780		if err != nil {
781			panic(err)
782		}
783		libs = append(libs, lib)
784	}
785
786	core.PuregoSafeRegister(&xTabBarGLibType, libs, "adw_tab_bar_get_type")
787
788	core.PuregoSafeRegister(&xNewTabBar, libs, "adw_tab_bar_new")
789
790	core.PuregoSafeRegister(&xTabBarGetAutohide, libs, "adw_tab_bar_get_autohide")
791	core.PuregoSafeRegister(&xTabBarGetEndActionWidget, libs, "adw_tab_bar_get_end_action_widget")
792	core.PuregoSafeRegister(&xTabBarGetExpandTabs, libs, "adw_tab_bar_get_expand_tabs")
793	core.PuregoSafeRegister(&xTabBarGetExtraDragPreferredAction, libs, "adw_tab_bar_get_extra_drag_preferred_action")
794	core.PuregoSafeRegister(&xTabBarGetExtraDragPreload, libs, "adw_tab_bar_get_extra_drag_preload")
795	core.PuregoSafeRegister(&xTabBarGetInverted, libs, "adw_tab_bar_get_inverted")
796	core.PuregoSafeRegister(&xTabBarGetIsOverflowing, libs, "adw_tab_bar_get_is_overflowing")
797	core.PuregoSafeRegister(&xTabBarGetStartActionWidget, libs, "adw_tab_bar_get_start_action_widget")
798	core.PuregoSafeRegister(&xTabBarGetTabsRevealed, libs, "adw_tab_bar_get_tabs_revealed")
799	core.PuregoSafeRegister(&xTabBarGetView, libs, "adw_tab_bar_get_view")
800	core.PuregoSafeRegister(&xTabBarSetAutohide, libs, "adw_tab_bar_set_autohide")
801	core.PuregoSafeRegister(&xTabBarSetEndActionWidget, libs, "adw_tab_bar_set_end_action_widget")
802	core.PuregoSafeRegister(&xTabBarSetExpandTabs, libs, "adw_tab_bar_set_expand_tabs")
803	core.PuregoSafeRegister(&xTabBarSetExtraDragPreload, libs, "adw_tab_bar_set_extra_drag_preload")
804	core.PuregoSafeRegister(&xTabBarSetInverted, libs, "adw_tab_bar_set_inverted")
805	core.PuregoSafeRegister(&xTabBarSetStartActionWidget, libs, "adw_tab_bar_set_start_action_widget")
806	core.PuregoSafeRegister(&xTabBarSetView, libs, "adw_tab_bar_set_view")
807	core.PuregoSafeRegister(&xTabBarSetupExtraDropTarget, libs, "adw_tab_bar_setup_extra_drop_target")
808
809}

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