v0.2.2 9100209

adw-tab-view.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/gio"
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 TabPageClass struct {
19	_ structs.HostLayout
20
21	ParentClass gobject.ObjectClass
22}
23
24func (x *TabPageClass) GoPointer() uintptr {
25	return uintptr(unsafe.Pointer(x))
26}
27
28type TabViewClass struct {
29	_ structs.HostLayout
30
31	ParentClass gtk.WidgetClass
32}
33
34func (x *TabViewClass) GoPointer() uintptr {
35	return uintptr(unsafe.Pointer(x))
36}
37
38// Describes available shortcuts in an [class@TabView].
39//
40// Shortcuts can be set with [property@TabView:shortcuts], or added/removed
41// individually with [method@TabView.add_shortcuts] and
42// [method@TabView.remove_shortcuts].
43//
44// New values may be added to this enumeration over time.
45type TabViewShortcuts int
46
47var xTabViewShortcutsGLibType func() types.GType
48
49func TabViewShortcutsGLibType() types.GType {
50	return xTabViewShortcutsGLibType()
51}
52
53const (
54
55	// No shortcuts
56	TabViewShortcutNoneValue TabViewShortcuts = 0
57	// <kbd>Ctrl</kbd>+<kbd>Tab</kbd> - switch to the next page
58	TabViewShortcutControlTabValue TabViewShortcuts = 1
59	// <kbd>Shift</kbd>+<kbd>Ctrl</kbd>+<kbd>Tab</kbd> - switch to the previous
60	//   page
61	TabViewShortcutControlShiftTabValue TabViewShortcuts = 2
62	// <kbd>Ctrl</kbd>+<kbd>Page Up</kbd> - switch to the previous page
63	TabViewShortcutControlPageUpValue TabViewShortcuts = 4
64	// <kbd>Ctrl</kbd>+<kbd>Page Down</kbd> - switch to the next page
65	TabViewShortcutControlPageDownValue TabViewShortcuts = 8
66	// <kbd>Ctrl</kbd>+<kbd>Home</kbd> - switch to the first page
67	TabViewShortcutControlHomeValue TabViewShortcuts = 16
68	// <kbd>Ctrl</kbd>+<kbd>End</kbd> - switch to the last page
69	TabViewShortcutControlEndValue TabViewShortcuts = 32
70	// <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Page Up</kbd> - move the selected
71	//   page backward
72	TabViewShortcutControlShiftPageUpValue TabViewShortcuts = 64
73	// <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Page Down</kbd> - move the selected
74	//   page forward
75	TabViewShortcutControlShiftPageDownValue TabViewShortcuts = 128
76	// <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Home</kbd> - move the selected page
77	//   at the start
78	TabViewShortcutControlShiftHomeValue TabViewShortcuts = 256
79	// <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>End</kbd> - move the current page at
80	//   the end
81	TabViewShortcutControlShiftEndValue TabViewShortcuts = 512
82	// <kbd>Alt</kbd>+<kbd>1</kbd>⋯<kbd>9</kbd> - switch to pages 1-9
83	TabViewShortcutAltDigitsValue TabViewShortcuts = 1024
84	// <kbd>Alt</kbd>+<kbd>0</kbd> - switch to page 10
85	TabViewShortcutAltZeroValue TabViewShortcuts = 2048
86	// All of the shortcuts
87	TabViewShortcutAllShortcutsValue TabViewShortcuts = 4095
88)
89
90// An auxiliary class used by [class@TabView].
91type TabPage struct {
92	gobject.Object
93}
94
95var xTabPageGLibType func() types.GType
96
97func TabPageGLibType() types.GType {
98	return xTabPageGLibType()
99}
100
101func TabPageNewFromInternalPtr(ptr uintptr) *TabPage {
102	cls := &TabPage{}
103	cls.Ptr = ptr
104	return cls
105}
106
107var xTabPageGetChild func(uintptr) uintptr
108
109// Gets the child of @self.
110func (x *TabPage) GetChild() *gtk.Widget {
111	var cls *gtk.Widget
112
113	cret := xTabPageGetChild(x.GoPointer())
114
115	if cret == 0 {
116		return nil
117	}
118	gobject.IncreaseRef(cret)
119	cls = &gtk.Widget{}
120	cls.Ptr = cret
121	return cls
122}
123
124var xTabPageGetIcon func(uintptr) uintptr
125
126// Gets the icon of @self.
127func (x *TabPage) GetIcon() *gio.IconBase {
128	var cls *gio.IconBase
129
130	cret := xTabPageGetIcon(x.GoPointer())
131
132	if cret == 0 {
133		return nil
134	}
135	gobject.IncreaseRef(cret)
136	cls = &gio.IconBase{}
137	cls.Ptr = cret
138	return cls
139}
140
141var xTabPageGetIndicatorActivatable func(uintptr) bool
142
143// Gets whether the indicator of @self is activatable.
144func (x *TabPage) GetIndicatorActivatable() bool {
145
146	cret := xTabPageGetIndicatorActivatable(x.GoPointer())
147	return cret
148}
149
150var xTabPageGetIndicatorIcon func(uintptr) uintptr
151
152// Gets the indicator icon of @self.
153func (x *TabPage) GetIndicatorIcon() *gio.IconBase {
154	var cls *gio.IconBase
155
156	cret := xTabPageGetIndicatorIcon(x.GoPointer())
157
158	if cret == 0 {
159		return nil
160	}
161	gobject.IncreaseRef(cret)
162	cls = &gio.IconBase{}
163	cls.Ptr = cret
164	return cls
165}
166
167var xTabPageGetIndicatorTooltip func(uintptr) string
168
169// Gets the tooltip of the indicator icon of @self.
170func (x *TabPage) GetIndicatorTooltip() string {
171
172	cret := xTabPageGetIndicatorTooltip(x.GoPointer())
173	return cret
174}
175
176var xTabPageGetKeyword func(uintptr) string
177
178// Gets the search keyword of @self.
179func (x *TabPage) GetKeyword() string {
180
181	cret := xTabPageGetKeyword(x.GoPointer())
182	return cret
183}
184
185var xTabPageGetLiveThumbnail func(uintptr) bool
186
187// Gets whether to live thumbnail is enabled @self.
188func (x *TabPage) GetLiveThumbnail() bool {
189
190	cret := xTabPageGetLiveThumbnail(x.GoPointer())
191	return cret
192}
193
194var xTabPageGetLoading func(uintptr) bool
195
196// Gets whether @self is loading.
197func (x *TabPage) GetLoading() bool {
198
199	cret := xTabPageGetLoading(x.GoPointer())
200	return cret
201}
202
203var xTabPageGetNeedsAttention func(uintptr) bool
204
205// Gets whether @self needs attention.
206func (x *TabPage) GetNeedsAttention() bool {
207
208	cret := xTabPageGetNeedsAttention(x.GoPointer())
209	return cret
210}
211
212var xTabPageGetParent func(uintptr) uintptr
213
214// Gets the parent page of @self.
215//
216// See [method@TabView.add_page] and [method@TabView.close_page].
217func (x *TabPage) GetParent() *TabPage {
218	var cls *TabPage
219
220	cret := xTabPageGetParent(x.GoPointer())
221
222	if cret == 0 {
223		return nil
224	}
225	gobject.IncreaseRef(cret)
226	cls = &TabPage{}
227	cls.Ptr = cret
228	return cls
229}
230
231var xTabPageGetPinned func(uintptr) bool
232
233// Gets whether @self is pinned.
234//
235// See [method@TabView.set_page_pinned].
236func (x *TabPage) GetPinned() bool {
237
238	cret := xTabPageGetPinned(x.GoPointer())
239	return cret
240}
241
242var xTabPageGetSelected func(uintptr) bool
243
244// Gets whether @self is selected.
245func (x *TabPage) GetSelected() bool {
246
247	cret := xTabPageGetSelected(x.GoPointer())
248	return cret
249}
250
251var xTabPageGetThumbnailXalign func(uintptr) float32
252
253// Gets the horizontal alignment of the thumbnail for @self.
254func (x *TabPage) GetThumbnailXalign() float32 {
255
256	cret := xTabPageGetThumbnailXalign(x.GoPointer())
257	return cret
258}
259
260var xTabPageGetThumbnailYalign func(uintptr) float32
261
262// Gets the vertical alignment of the thumbnail for @self.
263func (x *TabPage) GetThumbnailYalign() float32 {
264
265	cret := xTabPageGetThumbnailYalign(x.GoPointer())
266	return cret
267}
268
269var xTabPageGetTitle func(uintptr) string
270
271// Gets the title of @self.
272func (x *TabPage) GetTitle() string {
273
274	cret := xTabPageGetTitle(x.GoPointer())
275	return cret
276}
277
278var xTabPageGetTooltip func(uintptr) string
279
280// Gets the tooltip of @self.
281func (x *TabPage) GetTooltip() string {
282
283	cret := xTabPageGetTooltip(x.GoPointer())
284	return cret
285}
286
287var xTabPageInvalidateThumbnail func(uintptr)
288
289// Invalidates thumbnail for @self.
290//
291// If an [class@TabOverview] is open, the thumbnail representing @self will be
292// immediately updated. Otherwise it will be update when opening the overview.
293//
294// Does nothing if [property@TabPage:live-thumbnail] is set to `TRUE`.
295//
296// See also [method@TabView.invalidate_thumbnails].
297func (x *TabPage) InvalidateThumbnail() {
298
299	xTabPageInvalidateThumbnail(x.GoPointer())
300
301}
302
303var xTabPageSetIcon func(uintptr, uintptr)
304
305// Sets the icon of @self.
306//
307// [class@TabBar] and [class@TabOverview] display the icon next to the title,
308// unless [property@TabPage:loading] is set to `TRUE`.
309//
310// `AdwTabBar` also won't show the icon if the page is pinned and
311// [propertyTabPage:indicator-icon] is set.
312func (x *TabPage) SetIcon(IconVar gio.Icon) {
313
314	xTabPageSetIcon(x.GoPointer(), IconVar.GoPointer())
315
316}
317
318var xTabPageSetIndicatorActivatable func(uintptr, bool)
319
320// Sets whether the indicator of @self is activatable.
321//
322// If set to `TRUE`, [signal@TabView::indicator-activated] will be emitted
323// when the indicator icon is clicked.
324//
325// If [property@TabPage:indicator-icon] is not set, does nothing.
326func (x *TabPage) SetIndicatorActivatable(ActivatableVar bool) {
327
328	xTabPageSetIndicatorActivatable(x.GoPointer(), ActivatableVar)
329
330}
331
332var xTabPageSetIndicatorIcon func(uintptr, uintptr)
333
334// Sets the indicator icon of @self.
335//
336// A common use case is an audio or camera indicator in a web browser.
337//
338// [class@TabBar] will show it at the beginning of the tab, alongside icon
339// representing [property@TabPage:icon] or loading spinner.
340//
341// If the page is pinned, the indicator will be shown instead of icon or
342// spinner.
343//
344// [class@TabOverview] will show it at the at the top part of the thumbnail.
345//
346// [property@TabPage:indicator-tooltip] can be used to set the tooltip on the
347// indicator icon.
348//
349// If [property@TabPage:indicator-activatable] is set to `TRUE`, the
350// indicator icon can act as a button.
351func (x *TabPage) SetIndicatorIcon(IndicatorIconVar gio.Icon) {
352
353	xTabPageSetIndicatorIcon(x.GoPointer(), IndicatorIconVar.GoPointer())
354
355}
356
357var xTabPageSetIndicatorTooltip func(uintptr, string)
358
359// Sets the tooltip of the indicator icon of @self.
360//
361// The tooltip can be marked up with the Pango text markup language.
362//
363// See [property@TabPage:indicator-icon].
364func (x *TabPage) SetIndicatorTooltip(TooltipVar string) {
365
366	xTabPageSetIndicatorTooltip(x.GoPointer(), TooltipVar)
367
368}
369
370var xTabPageSetKeyword func(uintptr, string)
371
372// Sets the search keyword for @self.
373//
374// [class@TabOverview] can search pages by their keywords in addition to their
375// titles and tooltips.
376//
377// Keywords allow to include e.g. page URLs into tab search in a web browser.
378func (x *TabPage) SetKeyword(KeywordVar string) {
379
380	xTabPageSetKeyword(x.GoPointer(), KeywordVar)
381
382}
383
384var xTabPageSetLiveThumbnail func(uintptr, bool)
385
386// Sets whether to enable live thumbnail for @self.
387//
388// When set to `TRUE`, @self's thumbnail in [class@TabOverview] will update
389// immediately when @self is redrawn or resized.
390//
391// If it's set to `FALSE`, the thumbnail will only be live when the @self is
392// selected, and otherwise it will be static and will only update when
393// [method@TabPage.invalidate_thumbnail] or
394// [method@TabView.invalidate_thumbnails] is called.
395func (x *TabPage) SetLiveThumbnail(LiveThumbnailVar bool) {
396
397	xTabPageSetLiveThumbnail(x.GoPointer(), LiveThumbnailVar)
398
399}
400
401var xTabPageSetLoading func(uintptr, bool)
402
403// Sets whether @self is loading.
404//
405// If set to `TRUE`, [class@TabBar] and [class@TabOverview] will display a
406// spinner in place of icon.
407//
408// If the page is pinned and [property@TabPage:indicator-icon] is set, loading
409// status will not be visible with `AdwTabBar`.
410func (x *TabPage) SetLoading(LoadingVar bool) {
411
412	xTabPageSetLoading(x.GoPointer(), LoadingVar)
413
414}
415
416var xTabPageSetNeedsAttention func(uintptr, bool)
417
418// Sets whether @self needs attention.
419//
420// [class@TabBar] will display a line under the tab representing the page if
421// set to `TRUE`. If the tab is not visible, the corresponding edge of the tab
422// bar will be highlighted.
423//
424// [class@TabOverview] will display a dot in the corner of the thumbnail if set
425// to `TRUE`.
426//
427// [class@TabButton] will display a dot if any of the pages that aren't
428// selected have [property@TabPage:needs-attention] set to `TRUE`.
429func (x *TabPage) SetNeedsAttention(NeedsAttentionVar bool) {
430
431	xTabPageSetNeedsAttention(x.GoPointer(), NeedsAttentionVar)
432
433}
434
435var xTabPageSetThumbnailXalign func(uintptr, float32)
436
437// Sets the horizontal alignment of the thumbnail for @self.
438//
439// If the page is so wide that [class@TabOverview] can't display it completely
440// and has to crop it, horizontal alignment will determine which part of the
441// page will be visible.
442//
443// For example, 0.5 means the center of the page will be visible, 0 means the
444// start edge will be visible and 1 means the end edge will be visible.
445//
446// The default horizontal alignment is 0.
447func (x *TabPage) SetThumbnailXalign(XalignVar float32) {
448
449	xTabPageSetThumbnailXalign(x.GoPointer(), XalignVar)
450
451}
452
453var xTabPageSetThumbnailYalign func(uintptr, float32)
454
455// Sets the vertical alignment of the thumbnail for @self.
456//
457// If the page is so tall that [class@TabOverview] can't display it completely
458// and has to crop it, vertical alignment will determine which part of the page
459// will be visible.
460//
461// For example, 0.5 means the center of the page will be visible, 0 means the
462// top edge will be visible and 1 means the bottom edge will be visible.
463//
464// The default vertical alignment is 0.
465func (x *TabPage) SetThumbnailYalign(YalignVar float32) {
466
467	xTabPageSetThumbnailYalign(x.GoPointer(), YalignVar)
468
469}
470
471var xTabPageSetTitle func(uintptr, string)
472
473// [class@TabBar] will display it in the center of the tab unless it's pinned,
474// and will use it as a tooltip unless [property@TabPage:tooltip] is set.
475//
476// [class@TabOverview] will display it below the thumbnail unless it's pinned,
477// or inside the card otherwise, and will use it as a tooltip unless
478// [property@TabPage:tooltip] is set.
479//
480// Sets the title of @self.
481func (x *TabPage) SetTitle(TitleVar string) {
482
483	xTabPageSetTitle(x.GoPointer(), TitleVar)
484
485}
486
487var xTabPageSetTooltip func(uintptr, string)
488
489// Sets the tooltip of @self.
490//
491// The tooltip can be marked up with the Pango text markup language.
492//
493// If not set, [class@TabBar] and [class@TabOverview] will use
494// [property@TabPage:title] as a tooltip instead.
495func (x *TabPage) SetTooltip(TooltipVar string) {
496
497	xTabPageSetTooltip(x.GoPointer(), TooltipVar)
498
499}
500
501func (c *TabPage) GoPointer() uintptr {
502	if c == nil {
503		return 0
504	}
505	return c.Ptr
506}
507
508func (c *TabPage) SetGoPointer(ptr uintptr) {
509	c.Ptr = ptr
510}
511
512// SetPropertyIndicatorActivatable sets the "indicator-activatable" property.
513// Whether the indicator icon is activatable.
514//
515// If set to `TRUE`, [signal@TabView::indicator-activated] will be emitted
516// when the indicator icon is clicked.
517//
518// If [property@TabPage:indicator-icon] is not set, does nothing.
519func (x *TabPage) SetPropertyIndicatorActivatable(value bool) {
520	var v gobject.Value
521	v.Init(gobject.TypeBooleanVal)
522	v.SetBoolean(value)
523	x.SetProperty("indicator-activatable", &v)
524}
525
526// GetPropertyIndicatorActivatable gets the "indicator-activatable" property.
527// Whether the indicator icon is activatable.
528//
529// If set to `TRUE`, [signal@TabView::indicator-activated] will be emitted
530// when the indicator icon is clicked.
531//
532// If [property@TabPage:indicator-icon] is not set, does nothing.
533func (x *TabPage) GetPropertyIndicatorActivatable() bool {
534	var v gobject.Value
535	x.GetProperty("indicator-activatable", &v)
536	return v.GetBoolean()
537}
538
539// SetPropertyIndicatorTooltip sets the "indicator-tooltip" property.
540// The tooltip of the indicator icon.
541//
542// The tooltip can be marked up with the Pango text markup language.
543//
544// See [property@TabPage:indicator-icon].
545func (x *TabPage) SetPropertyIndicatorTooltip(value string) {
546	var v gobject.Value
547	v.Init(gobject.TypeStringVal)
548	v.SetString(&value)
549	x.SetProperty("indicator-tooltip", &v)
550}
551
552// GetPropertyIndicatorTooltip gets the "indicator-tooltip" property.
553// The tooltip of the indicator icon.
554//
555// The tooltip can be marked up with the Pango text markup language.
556//
557// See [property@TabPage:indicator-icon].
558func (x *TabPage) GetPropertyIndicatorTooltip() string {
559	var v gobject.Value
560	x.GetProperty("indicator-tooltip", &v)
561	return v.GetString()
562}
563
564// SetPropertyKeyword sets the "keyword" property.
565// The search keyboard of the page.
566//
567// [class@TabOverview] can search pages by their keywords in addition to their
568// titles and tooltips.
569//
570// Keywords allow to include e.g. page URLs into tab search in a web browser.
571func (x *TabPage) SetPropertyKeyword(value string) {
572	var v gobject.Value
573	v.Init(gobject.TypeStringVal)
574	v.SetString(&value)
575	x.SetProperty("keyword", &v)
576}
577
578// GetPropertyKeyword gets the "keyword" property.
579// The search keyboard of the page.
580//
581// [class@TabOverview] can search pages by their keywords in addition to their
582// titles and tooltips.
583//
584// Keywords allow to include e.g. page URLs into tab search in a web browser.
585func (x *TabPage) GetPropertyKeyword() string {
586	var v gobject.Value
587	x.GetProperty("keyword", &v)
588	return v.GetString()
589}
590
591// SetPropertyLiveThumbnail sets the "live-thumbnail" property.
592// Whether to enable live thumbnail for this page.
593//
594// When set to `TRUE`, the page's thumbnail in [class@TabOverview] will update
595// immediately when the page is redrawn or resized.
596//
597// If it's set to `FALSE`, the thumbnail will only be live when the page is
598// selected, and otherwise it will be static and will only update when
599// [method@TabPage.invalidate_thumbnail] or
600// [method@TabView.invalidate_thumbnails] is called.
601func (x *TabPage) SetPropertyLiveThumbnail(value bool) {
602	var v gobject.Value
603	v.Init(gobject.TypeBooleanVal)
604	v.SetBoolean(value)
605	x.SetProperty("live-thumbnail", &v)
606}
607
608// GetPropertyLiveThumbnail gets the "live-thumbnail" property.
609// Whether to enable live thumbnail for this page.
610//
611// When set to `TRUE`, the page's thumbnail in [class@TabOverview] will update
612// immediately when the page is redrawn or resized.
613//
614// If it's set to `FALSE`, the thumbnail will only be live when the page is
615// selected, and otherwise it will be static and will only update when
616// [method@TabPage.invalidate_thumbnail] or
617// [method@TabView.invalidate_thumbnails] is called.
618func (x *TabPage) GetPropertyLiveThumbnail() bool {
619	var v gobject.Value
620	x.GetProperty("live-thumbnail", &v)
621	return v.GetBoolean()
622}
623
624// SetPropertyLoading sets the "loading" property.
625// Whether the page is loading.
626//
627// If set to `TRUE`, [class@TabBar] and [class@TabOverview] will display a
628// spinner in place of icon.
629//
630// If the page is pinned and [property@TabPage:indicator-icon] is set,
631// loading status will not be visible with `AdwTabBar`.
632func (x *TabPage) SetPropertyLoading(value bool) {
633	var v gobject.Value
634	v.Init(gobject.TypeBooleanVal)
635	v.SetBoolean(value)
636	x.SetProperty("loading", &v)
637}
638
639// GetPropertyLoading gets the "loading" property.
640// Whether the page is loading.
641//
642// If set to `TRUE`, [class@TabBar] and [class@TabOverview] will display a
643// spinner in place of icon.
644//
645// If the page is pinned and [property@TabPage:indicator-icon] is set,
646// loading status will not be visible with `AdwTabBar`.
647func (x *TabPage) GetPropertyLoading() bool {
648	var v gobject.Value
649	x.GetProperty("loading", &v)
650	return v.GetBoolean()
651}
652
653// SetPropertyNeedsAttention sets the "needs-attention" property.
654// Whether the page needs attention.
655//
656// [class@TabBar] will display a line under the tab representing the page if
657// set to `TRUE`. If the tab is not visible, the corresponding edge of the tab
658// bar will be highlighted.
659//
660// [class@TabOverview] will display a dot in the corner of the thumbnail if set
661// to `TRUE`.
662//
663// [class@TabButton] will display a dot if any of the pages that aren't
664// selected have this property set to `TRUE`.
665func (x *TabPage) SetPropertyNeedsAttention(value bool) {
666	var v gobject.Value
667	v.Init(gobject.TypeBooleanVal)
668	v.SetBoolean(value)
669	x.SetProperty("needs-attention", &v)
670}
671
672// GetPropertyNeedsAttention gets the "needs-attention" property.
673// Whether the page needs attention.
674//
675// [class@TabBar] will display a line under the tab representing the page if
676// set to `TRUE`. If the tab is not visible, the corresponding edge of the tab
677// bar will be highlighted.
678//
679// [class@TabOverview] will display a dot in the corner of the thumbnail if set
680// to `TRUE`.
681//
682// [class@TabButton] will display a dot if any of the pages that aren't
683// selected have this property set to `TRUE`.
684func (x *TabPage) GetPropertyNeedsAttention() bool {
685	var v gobject.Value
686	x.GetProperty("needs-attention", &v)
687	return v.GetBoolean()
688}
689
690// GetPropertyPinned gets the "pinned" property.
691// Whether the page is pinned.
692//
693// See [method@TabView.set_page_pinned].
694func (x *TabPage) GetPropertyPinned() bool {
695	var v gobject.Value
696	x.GetProperty("pinned", &v)
697	return v.GetBoolean()
698}
699
700// GetPropertySelected gets the "selected" property.
701// Whether the page is selected.
702func (x *TabPage) GetPropertySelected() bool {
703	var v gobject.Value
704	x.GetProperty("selected", &v)
705	return v.GetBoolean()
706}
707
708// SetPropertyThumbnailXalign sets the "thumbnail-xalign" property.
709// The horizontal alignment of the page thumbnail.
710//
711// If the page is so wide that [class@TabOverview] can't display it completely
712// and has to crop it, horizontal alignment will determine which part of the
713// page will be visible.
714//
715// For example, 0.5 means the center of the page will be visible, 0 means the
716// start edge will be visible and 1 means the end edge will be visible.
717//
718// The default horizontal alignment is 0.
719func (x *TabPage) SetPropertyThumbnailXalign(value float32) {
720	var v gobject.Value
721	v.Init(gobject.TypeFloatVal)
722	v.SetFloat(value)
723	x.SetProperty("thumbnail-xalign", &v)
724}
725
726// GetPropertyThumbnailXalign gets the "thumbnail-xalign" property.
727// The horizontal alignment of the page thumbnail.
728//
729// If the page is so wide that [class@TabOverview] can't display it completely
730// and has to crop it, horizontal alignment will determine which part of the
731// page will be visible.
732//
733// For example, 0.5 means the center of the page will be visible, 0 means the
734// start edge will be visible and 1 means the end edge will be visible.
735//
736// The default horizontal alignment is 0.
737func (x *TabPage) GetPropertyThumbnailXalign() float32 {
738	var v gobject.Value
739	x.GetProperty("thumbnail-xalign", &v)
740	return v.GetFloat()
741}
742
743// SetPropertyThumbnailYalign sets the "thumbnail-yalign" property.
744// The vertical alignment of the page thumbnail.
745//
746// If the page is so tall that [class@TabOverview] can't display it completely
747// and has to crop it, vertical alignment will determine which part of the
748// page will be visible.
749//
750// For example, 0.5 means the center of the page will be visible, 0 means the
751// top edge will be visible and 1 means the bottom edge will be visible.
752//
753// The default vertical alignment is 0.
754func (x *TabPage) SetPropertyThumbnailYalign(value float32) {
755	var v gobject.Value
756	v.Init(gobject.TypeFloatVal)
757	v.SetFloat(value)
758	x.SetProperty("thumbnail-yalign", &v)
759}
760
761// GetPropertyThumbnailYalign gets the "thumbnail-yalign" property.
762// The vertical alignment of the page thumbnail.
763//
764// If the page is so tall that [class@TabOverview] can't display it completely
765// and has to crop it, vertical alignment will determine which part of the
766// page will be visible.
767//
768// For example, 0.5 means the center of the page will be visible, 0 means the
769// top edge will be visible and 1 means the bottom edge will be visible.
770//
771// The default vertical alignment is 0.
772func (x *TabPage) GetPropertyThumbnailYalign() float32 {
773	var v gobject.Value
774	x.GetProperty("thumbnail-yalign", &v)
775	return v.GetFloat()
776}
777
778// SetPropertyTitle sets the "title" property.
779// The title of the page.
780//
781// [class@TabBar] will display it in the center of the tab unless it's pinned,
782// and will use it as a tooltip unless [property@TabPage:tooltip] is set.
783//
784// [class@TabOverview] will display it below the thumbnail unless it's pinned,
785// or inside the card otherwise, and will use it as a tooltip unless
786// [property@TabPage:tooltip] is set.
787func (x *TabPage) SetPropertyTitle(value string) {
788	var v gobject.Value
789	v.Init(gobject.TypeStringVal)
790	v.SetString(&value)
791	x.SetProperty("title", &v)
792}
793
794// GetPropertyTitle gets the "title" property.
795// The title of the page.
796//
797// [class@TabBar] will display it in the center of the tab unless it's pinned,
798// and will use it as a tooltip unless [property@TabPage:tooltip] is set.
799//
800// [class@TabOverview] will display it below the thumbnail unless it's pinned,
801// or inside the card otherwise, and will use it as a tooltip unless
802// [property@TabPage:tooltip] is set.
803func (x *TabPage) GetPropertyTitle() string {
804	var v gobject.Value
805	x.GetProperty("title", &v)
806	return v.GetString()
807}
808
809// SetPropertyTooltip sets the "tooltip" property.
810// The tooltip of the page.
811//
812// The tooltip can be marked up with the Pango text markup language.
813//
814// If not set, [class@TabBar] and [class@TabOverview] will use
815// [property@TabPage:title] as a tooltip instead.
816func (x *TabPage) SetPropertyTooltip(value string) {
817	var v gobject.Value
818	v.Init(gobject.TypeStringVal)
819	v.SetString(&value)
820	x.SetProperty("tooltip", &v)
821}
822
823// GetPropertyTooltip gets the "tooltip" property.
824// The tooltip of the page.
825//
826// The tooltip can be marked up with the Pango text markup language.
827//
828// If not set, [class@TabBar] and [class@TabOverview] will use
829// [property@TabPage:title] as a tooltip instead.
830func (x *TabPage) GetPropertyTooltip() string {
831	var v gobject.Value
832	x.GetProperty("tooltip", &v)
833	return v.GetString()
834}
835
836// Requests the user's screen reader to announce the given message.
837//
838// This kind of notification is useful for messages that
839// either have only a visual representation or that are not
840// exposed visually at all, e.g. a notification about a
841// successful operation.
842//
843// Also, by using this API, you can ensure that the message
844// does not interrupts the user's current screen reader output.
845func (x *TabPage) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
846
847	gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
848
849}
850
851// Retrieves the accessible parent for an accessible object.
852//
853// This function returns `NULL` for top level widgets.
854func (x *TabPage) GetAccessibleParent() *gtk.AccessibleBase {
855	var cls *gtk.AccessibleBase
856
857	cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
858
859	if cret == 0 {
860		return nil
861	}
862	cls = &gtk.AccessibleBase{}
863	cls.Ptr = cret
864	return cls
865}
866
867// Retrieves the accessible role of an accessible object.
868func (x *TabPage) GetAccessibleRole() gtk.AccessibleRole {
869
870	cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
871	return cret
872}
873
874// Retrieves the implementation for the given accessible object.
875func (x *TabPage) GetAtContext() *gtk.ATContext {
876	var cls *gtk.ATContext
877
878	cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
879
880	if cret == 0 {
881		return nil
882	}
883	cls = &gtk.ATContext{}
884	cls.Ptr = cret
885	return cls
886}
887
888// Queries the coordinates and dimensions of this accessible
889//
890// This functionality can be overridden by `GtkAccessible`
891// implementations, e.g. to get the bounds from an ignored
892// child widget.
893func (x *TabPage) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
894
895	cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
896	return cret
897}
898
899// Retrieves the first accessible child of an accessible object.
900func (x *TabPage) GetFirstAccessibleChild() *gtk.AccessibleBase {
901	var cls *gtk.AccessibleBase
902
903	cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
904
905	if cret == 0 {
906		return nil
907	}
908	cls = &gtk.AccessibleBase{}
909	cls.Ptr = cret
910	return cls
911}
912
913// Retrieves the next accessible sibling of an accessible object
914func (x *TabPage) GetNextAccessibleSibling() *gtk.AccessibleBase {
915	var cls *gtk.AccessibleBase
916
917	cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
918
919	if cret == 0 {
920		return nil
921	}
922	cls = &gtk.AccessibleBase{}
923	cls.Ptr = cret
924	return cls
925}
926
927// Queries a platform state, such as focus.
928//
929// This functionality can be overridden by `GtkAccessible`
930// implementations, e.g. to get platform state from an ignored
931// child widget, as is the case for `GtkText` wrappers.
932func (x *TabPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
933
934	cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
935	return cret
936}
937
938// Resets the accessible property to its default value.
939func (x *TabPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {
940
941	gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
942
943}
944
945// Resets the accessible relation to its default value.
946func (x *TabPage) ResetRelation(RelationVar gtk.AccessibleRelation) {
947
948	gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
949
950}
951
952// Resets the accessible state to its default value.
953func (x *TabPage) ResetState(StateVar gtk.AccessibleState) {
954
955	gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
956
957}
958
959// Sets the parent and sibling of an accessible object.
960//
961// This function is meant to be used by accessible implementations that are
962// not part of the widget hierarchy, and but act as a logical bridge between
963// widgets. For instance, if a widget creates an object that holds metadata
964// for each child, and you want that object to implement the `GtkAccessible`
965// interface, you will use this function to ensure that the parent of each
966// child widget is the metadata object, and the parent of each metadata
967// object is the container widget.
968func (x *TabPage) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
969
970	gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
971
972}
973
974// Updates the next accessible sibling.
975//
976// That might be useful when a new child of a custom accessible
977// is created, and it needs to be linked to a previous child.
978func (x *TabPage) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
979
980	gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
981
982}
983
984// Informs ATs that the platform state has changed.
985//
986// This function should be used by `GtkAccessible` implementations that
987// have a platform state but are not widgets. Widgets handle platform
988// states automatically.
989func (x *TabPage) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
990
991	gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
992
993}
994
995// Updates a list of accessible properties.
996//
997// See the [enum@Gtk.AccessibleProperty] documentation for the
998// value types of accessible properties.
999//
1000// This function should be called by `GtkWidget` types whenever
1001// an accessible property change must be communicated to assistive
1002// technologies.
1003//
1004// Example:
1005// ```c
1006// value = gtk_adjustment_get_value (adjustment);
1007// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
1008//
1009//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
1010//	-1);
1011//
1012// ```
1013func (x *TabPage) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
1014
1015	gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
1016
1017}
1018
1019// Updates an array of accessible properties.
1020//
1021// This function should be called by `GtkWidget` types whenever an accessible
1022// property change must be communicated to assistive technologies.
1023//
1024// This function is meant to be used by language bindings.
1025func (x *TabPage) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
1026
1027	gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
1028
1029}
1030
1031// Updates a list of accessible relations.
1032//
1033// This function should be called by `GtkWidget` types whenever an accessible
1034// relation change must be communicated to assistive technologies.
1035//
1036// If the [enum@Gtk.AccessibleRelation] requires a list of references,
1037// you should pass each reference individually, followed by `NULL`, e.g.
1038//
1039// ```c
1040// gtk_accessible_update_relation (accessible,
1041//
1042//	GTK_ACCESSIBLE_RELATION_CONTROLS,
1043//	  ref1, NULL,
1044//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
1045//	  ref1, ref2, ref3, NULL,
1046//	-1);
1047//
1048// ```
1049func (x *TabPage) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
1050
1051	gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
1052
1053}
1054
1055// Updates an array of accessible relations.
1056//
1057// This function should be called by `GtkWidget` types whenever an accessible
1058// relation change must be communicated to assistive technologies.
1059//
1060// This function is meant to be used by language bindings.
1061func (x *TabPage) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
1062
1063	gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
1064
1065}
1066
1067// Updates a list of accessible states.
1068//
1069// See the [enum@Gtk.AccessibleState] documentation for the
1070// value types of accessible states.
1071//
1072// This function should be called by `GtkWidget` types whenever
1073// an accessible state change must be communicated to assistive
1074// technologies.
1075//
1076// Example:
1077//
1078// ```c
1079// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1080// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
1081//
1082//	GTK_ACCESSIBLE_STATE_CHECKED, value,
1083//	-1);
1084//
1085// ```
1086func (x *TabPage) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
1087
1088	gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
1089
1090}
1091
1092// Updates an array of accessible states.
1093//
1094// This function should be called by `GtkWidget` types whenever an accessible
1095// state change must be communicated to assistive technologies.
1096//
1097// This function is meant to be used by language bindings.
1098func (x *TabPage) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
1099
1100	gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
1101
1102}
1103
1104// A dynamic tabbed container.
1105//
1106// `AdwTabView` is a container which shows one child at a time. While it
1107// provides keyboard shortcuts for switching between pages, it does not provide
1108// a visible tab switcher and relies on external widgets for that, such as
1109// [class@TabBar], [class@TabOverview] and [class@TabButton].
1110//
1111// `AdwTabView` maintains a [class@TabPage] object for each page, which holds
1112// additional per-page properties. You can obtain the `AdwTabPage` for a page
1113// with [method@TabView.get_page], and as the return value for
1114// [method@TabView.append] and other functions for adding children.
1115//
1116// `AdwTabView` only aims to be useful for dynamic tabs in multi-window
1117// document-based applications, such as web browsers, file managers, text
1118// editors or terminals. It does not aim to replace [class@Gtk.Notebook] for use
1119// cases such as tabbed dialogs.
1120//
1121// As such, it does not support disabling page reordering or detaching.
1122//
1123// `AdwTabView` adds a number of global page switching and reordering shortcuts.
1124// The [property@TabView:shortcuts] property can be used to manage them.
1125//
1126// See [flags@TabViewShortcuts] for the list of the available shortcuts. All of
1127// the shortcuts are enabled by default.
1128//
1129// [method@TabView.add_shortcuts] and [method@TabView.remove_shortcuts] can be
1130// used to manage shortcuts in a convenient way, for example:
1131//
1132// ```c
1133// adw_tab_view_remove_shortcuts (view, ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME |
1134//
1135//	ADW_TAB_VIEW_SHORTCUT_CONTROL_END);
1136//
1137// ```
1138//
1139// ## CSS nodes
1140//
1141// `AdwTabView` has a main CSS node with the name `tabview`.
1142//
1143// ## Accessibility
1144//
1145// `AdwTabView` uses the `GTK_ACCESSIBLE_ROLE_TAB_PANEL` for the tab pages which
1146// are the accessible parent objects of the child widgets.
1147type TabView struct {
1148	gtk.Widget
1149}
1150
1151var xTabViewGLibType func() types.GType
1152
1153func TabViewGLibType() types.GType {
1154	return xTabViewGLibType()
1155}
1156
1157func TabViewNewFromInternalPtr(ptr uintptr) *TabView {
1158	cls := &TabView{}
1159	cls.Ptr = ptr
1160	return cls
1161}
1162
1163var xNewTabView func() uintptr
1164
1165// Creates a new `AdwTabView`.
1166func NewTabView() *TabView {
1167	var cls *TabView
1168
1169	cret := xNewTabView()
1170
1171	if cret == 0 {
1172		return nil
1173	}
1174	gobject.IncreaseRef(cret)
1175	cls = &TabView{}
1176	cls.Ptr = cret
1177	return cls
1178}
1179
1180var xTabViewAddPage func(uintptr, uintptr, uintptr) uintptr
1181
1182// Adds @child to @self with @parent as the parent.
1183//
1184// This function can be used to automatically position new pages, and to select
1185// the correct page when this page is closed while being selected (see
1186// [method@TabView.close_page]).
1187//
1188// If @parent is `NULL`, this function is equivalent to [method@TabView.append].
1189func (x *TabView) AddPage(ChildVar *gtk.Widget, ParentVar *TabPage) *TabPage {
1190	var cls *TabPage
1191
1192	cret := xTabViewAddPage(x.GoPointer(), ChildVar.GoPointer(), ParentVar.GoPointer())
1193
1194	if cret == 0 {
1195		return nil
1196	}
1197	gobject.IncreaseRef(cret)
1198	cls = &TabPage{}
1199	cls.Ptr = cret
1200	return cls
1201}
1202
1203var xTabViewAddShortcuts func(uintptr, TabViewShortcuts)
1204
1205// Adds @shortcuts for @self.
1206//
1207// See [property@TabView:shortcuts] for details.
1208func (x *TabView) AddShortcuts(ShortcutsVar TabViewShortcuts) {
1209
1210	xTabViewAddShortcuts(x.GoPointer(), ShortcutsVar)
1211
1212}
1213
1214var xTabViewAppend func(uintptr, uintptr) uintptr
1215
1216// Inserts @child as the last non-pinned page.
1217func (x *TabView) Append(ChildVar *gtk.Widget) *TabPage {
1218	var cls *TabPage
1219
1220	cret := xTabViewAppend(x.GoPointer(), ChildVar.GoPointer())
1221
1222	if cret == 0 {
1223		return nil
1224	}
1225	gobject.IncreaseRef(cret)
1226	cls = &TabPage{}
1227	cls.Ptr = cret
1228	return cls
1229}
1230
1231var xTabViewAppendPinned func(uintptr, uintptr) uintptr
1232
1233// Inserts @child as the last pinned page.
1234func (x *TabView) AppendPinned(ChildVar *gtk.Widget) *TabPage {
1235	var cls *TabPage
1236
1237	cret := xTabViewAppendPinned(x.GoPointer(), ChildVar.GoPointer())
1238
1239	if cret == 0 {
1240		return nil
1241	}
1242	gobject.IncreaseRef(cret)
1243	cls = &TabPage{}
1244	cls.Ptr = cret
1245	return cls
1246}
1247
1248var xTabViewCloseOtherPages func(uintptr, uintptr)
1249
1250// Requests to close all pages other than @page.
1251func (x *TabView) CloseOtherPages(PageVar *TabPage) {
1252
1253	xTabViewCloseOtherPages(x.GoPointer(), PageVar.GoPointer())
1254
1255}
1256
1257var xTabViewClosePage func(uintptr, uintptr)
1258
1259// Requests to close @page.
1260//
1261// Calling this function will result in the [signal@TabView::close-page] signal
1262// being emitted for @page. Closing the page can then be confirmed or
1263// denied via [method@TabView.close_page_finish].
1264//
1265// If the page is waiting for a [method@TabView.close_page_finish] call, this
1266// function will do nothing.
1267//
1268// The default handler for [signal@TabView::close-page] will immediately confirm
1269// closing the page if it's non-pinned, or reject it if it's pinned. This
1270// behavior can be changed by registering your own handler for that signal.
1271//
1272// If @page was selected, another page will be selected instead:
1273//
1274// If the [property@TabPage:parent] value is `NULL`, the next page will be
1275// selected when possible, or if the page was already last, the previous page
1276// will be selected instead.
1277//
1278// If it's not `NULL`, the previous page will be selected if it's a descendant
1279// (possibly indirect) of the parent. If both the previous page and the parent
1280// are pinned, the parent will be selected instead.
1281func (x *TabView) ClosePage(PageVar *TabPage) {
1282
1283	xTabViewClosePage(x.GoPointer(), PageVar.GoPointer())
1284
1285}
1286
1287var xTabViewClosePageFinish func(uintptr, uintptr, bool)
1288
1289// Completes a [method@TabView.close_page] call for @page.
1290//
1291// If @confirm is `TRUE`, @page will be closed. If it's `FALSE`, it will be
1292// reverted to its previous state and [method@TabView.close_page] can be called
1293// for it again.
1294//
1295// This function should not be called unless a custom handler for
1296// [signal@TabView::close-page] is used.
1297func (x *TabView) ClosePageFinish(PageVar *TabPage, ConfirmVar bool) {
1298
1299	xTabViewClosePageFinish(x.GoPointer(), PageVar.GoPointer(), ConfirmVar)
1300
1301}
1302
1303var xTabViewClosePagesAfter func(uintptr, uintptr)
1304
1305// Requests to close all pages after @page.
1306func (x *TabView) ClosePagesAfter(PageVar *TabPage) {
1307
1308	xTabViewClosePagesAfter(x.GoPointer(), PageVar.GoPointer())
1309
1310}
1311
1312var xTabViewClosePagesBefore func(uintptr, uintptr)
1313
1314// Requests to close all pages before @page.
1315func (x *TabView) ClosePagesBefore(PageVar *TabPage) {
1316
1317	xTabViewClosePagesBefore(x.GoPointer(), PageVar.GoPointer())
1318
1319}
1320
1321var xTabViewGetDefaultIcon func(uintptr) uintptr
1322
1323// Gets the default icon of @self.
1324func (x *TabView) GetDefaultIcon() *gio.IconBase {
1325	var cls *gio.IconBase
1326
1327	cret := xTabViewGetDefaultIcon(x.GoPointer())
1328
1329	if cret == 0 {
1330		return nil
1331	}
1332	gobject.IncreaseRef(cret)
1333	cls = &gio.IconBase{}
1334	cls.Ptr = cret
1335	return cls
1336}
1337
1338var xTabViewGetIsTransferringPage func(uintptr) bool
1339
1340// Whether a page is being transferred.
1341//
1342// The corresponding property will be set to `TRUE` when a drag-n-drop tab
1343// transfer starts on any `AdwTabView`, and to `FALSE` after it ends.
1344//
1345// During the transfer, children cannot receive pointer input and a tab can
1346// be safely dropped on the tab view.
1347func (x *TabView) GetIsTransferringPage() bool {
1348
1349	cret := xTabViewGetIsTransferringPage(x.GoPointer())
1350	return cret
1351}
1352
1353var xTabViewGetMenuModel func(uintptr) uintptr
1354
1355// Gets the tab context menu model for @self.
1356func (x *TabView) GetMenuModel() *gio.MenuModel {
1357	var cls *gio.MenuModel
1358
1359	cret := xTabViewGetMenuModel(x.GoPointer())
1360
1361	if cret == 0 {
1362		return nil
1363	}
1364	gobject.IncreaseRef(cret)
1365	cls = &gio.MenuModel{}
1366	cls.Ptr = cret
1367	return cls
1368}
1369
1370var xTabViewGetNPages func(uintptr) int
1371
1372// Gets the number of pages in @self.
1373func (x *TabView) GetNPages() int {
1374
1375	cret := xTabViewGetNPages(x.GoPointer())
1376	return cret
1377}
1378
1379var xTabViewGetNPinnedPages func(uintptr) int
1380
1381// Gets the number of pinned pages in @self.
1382//
1383// See [method@TabView.set_page_pinned].
1384func (x *TabView) GetNPinnedPages() int {
1385
1386	cret := xTabViewGetNPinnedPages(x.GoPointer())
1387	return cret
1388}
1389
1390var xTabViewGetNthPage func(uintptr, int) uintptr
1391
1392// Gets the [class@TabPage] representing the child at @position.
1393func (x *TabView) GetNthPage(PositionVar int) *TabPage {
1394	var cls *TabPage
1395
1396	cret := xTabViewGetNthPage(x.GoPointer(), PositionVar)
1397
1398	if cret == 0 {
1399		return nil
1400	}
1401	gobject.IncreaseRef(cret)
1402	cls = &TabPage{}
1403	cls.Ptr = cret
1404	return cls
1405}
1406
1407var xTabViewGetPage func(uintptr, uintptr) uintptr
1408
1409// Gets the [class@TabPage] object representing @child.
1410func (x *TabView) GetPage(ChildVar *gtk.Widget) *TabPage {
1411	var cls *TabPage
1412
1413	cret := xTabViewGetPage(x.GoPointer(), ChildVar.GoPointer())
1414
1415	if cret == 0 {
1416		return nil
1417	}
1418	gobject.IncreaseRef(cret)
1419	cls = &TabPage{}
1420	cls.Ptr = cret
1421	return cls
1422}
1423
1424var xTabViewGetPagePosition func(uintptr, uintptr) int
1425
1426// Finds the position of @page in @self, starting from 0.
1427func (x *TabView) GetPagePosition(PageVar *TabPage) int {
1428
1429	cret := xTabViewGetPagePosition(x.GoPointer(), PageVar.GoPointer())
1430	return cret
1431}
1432
1433var xTabViewGetPages func(uintptr) uintptr
1434
1435// Returns a [iface@Gio.ListModel] that contains the pages of @self.
1436//
1437// This can be used to keep an up-to-date view. The model also implements
1438// [iface@Gtk.SelectionModel] and can be used to track and change the selected
1439// page.
1440func (x *TabView) GetPages() *gtk.SelectionModelBase {
1441	var cls *gtk.SelectionModelBase
1442
1443	cret := xTabViewGetPages(x.GoPointer())
1444
1445	if cret == 0 {
1446		return nil
1447	}
1448	cls = &gtk.SelectionModelBase{}
1449	cls.Ptr = cret
1450	return cls
1451}
1452
1453var xTabViewGetSelectedPage func(uintptr) uintptr
1454
1455// Gets the currently selected page in @self.
1456func (x *TabView) GetSelectedPage() *TabPage {
1457	var cls *TabPage
1458
1459	cret := xTabViewGetSelectedPage(x.GoPointer())
1460
1461	if cret == 0 {
1462		return nil
1463	}
1464	gobject.IncreaseRef(cret)
1465	cls = &TabPage{}
1466	cls.Ptr = cret
1467	return cls
1468}
1469
1470var xTabViewGetShortcuts func(uintptr) TabViewShortcuts
1471
1472// Gets the enabled shortcuts for @self.
1473func (x *TabView) GetShortcuts() TabViewShortcuts {
1474
1475	cret := xTabViewGetShortcuts(x.GoPointer())
1476	return cret
1477}
1478
1479var xTabViewInsert func(uintptr, uintptr, int) uintptr
1480
1481// Inserts a non-pinned page at @position.
1482//
1483// It's an error to try to insert a page before a pinned page, in that case
1484// [method@TabView.insert_pinned] should be used instead.
1485func (x *TabView) Insert(ChildVar *gtk.Widget, PositionVar int) *TabPage {
1486	var cls *TabPage
1487
1488	cret := xTabViewInsert(x.GoPointer(), ChildVar.GoPointer(), PositionVar)
1489
1490	if cret == 0 {
1491		return nil
1492	}
1493	gobject.IncreaseRef(cret)
1494	cls = &TabPage{}
1495	cls.Ptr = cret
1496	return cls
1497}
1498
1499var xTabViewInsertPinned func(uintptr, uintptr, int) uintptr
1500
1501// Inserts a pinned page at @position.
1502//
1503// It's an error to try to insert a pinned page after a non-pinned page, in
1504// that case [method@TabView.insert] should be used instead.
1505func (x *TabView) InsertPinned(ChildVar *gtk.Widget, PositionVar int) *TabPage {
1506	var cls *TabPage
1507
1508	cret := xTabViewInsertPinned(x.GoPointer(), ChildVar.GoPointer(), PositionVar)
1509
1510	if cret == 0 {
1511		return nil
1512	}
1513	gobject.IncreaseRef(cret)
1514	cls = &TabPage{}
1515	cls.Ptr = cret
1516	return cls
1517}
1518
1519var xTabViewInvalidateThumbnails func(uintptr)
1520
1521// Invalidates thumbnails for all pages in @self.
1522//
1523// This is a convenience method, equivalent to calling
1524// [method@TabPage.invalidate_thumbnail] on each page.
1525func (x *TabView) InvalidateThumbnails() {
1526
1527	xTabViewInvalidateThumbnails(x.GoPointer())
1528
1529}
1530
1531var xTabViewPrepend func(uintptr, uintptr) uintptr
1532
1533// Inserts @child as the first non-pinned page.
1534func (x *TabView) Prepend(ChildVar *gtk.Widget) *TabPage {
1535	var cls *TabPage
1536
1537	cret := xTabViewPrepend(x.GoPointer(), ChildVar.GoPointer())
1538
1539	if cret == 0 {
1540		return nil
1541	}
1542	gobject.IncreaseRef(cret)
1543	cls = &TabPage{}
1544	cls.Ptr = cret
1545	return cls
1546}
1547
1548var xTabViewPrependPinned func(uintptr, uintptr) uintptr
1549
1550// Inserts @child as the first pinned page.
1551func (x *TabView) PrependPinned(ChildVar *gtk.Widget) *TabPage {
1552	var cls *TabPage
1553
1554	cret := xTabViewPrependPinned(x.GoPointer(), ChildVar.GoPointer())
1555
1556	if cret == 0 {
1557		return nil
1558	}
1559	gobject.IncreaseRef(cret)
1560	cls = &TabPage{}
1561	cls.Ptr = cret
1562	return cls
1563}
1564
1565var xTabViewRemoveShortcuts func(uintptr, TabViewShortcuts)
1566
1567// Removes @shortcuts from @self.
1568//
1569// See [property@TabView:shortcuts] for details.
1570func (x *TabView) RemoveShortcuts(ShortcutsVar TabViewShortcuts) {
1571
1572	xTabViewRemoveShortcuts(x.GoPointer(), ShortcutsVar)
1573
1574}
1575
1576var xTabViewReorderBackward func(uintptr, uintptr) bool
1577
1578// Reorders @page to before its previous page if possible.
1579func (x *TabView) ReorderBackward(PageVar *TabPage) bool {
1580
1581	cret := xTabViewReorderBackward(x.GoPointer(), PageVar.GoPointer())
1582	return cret
1583}
1584
1585var xTabViewReorderFirst func(uintptr, uintptr) bool
1586
1587// Reorders @page to the first possible position.
1588func (x *TabView) ReorderFirst(PageVar *TabPage) bool {
1589
1590	cret := xTabViewReorderFirst(x.GoPointer(), PageVar.GoPointer())
1591	return cret
1592}
1593
1594var xTabViewReorderForward func(uintptr, uintptr) bool
1595
1596// Reorders @page to after its next page if possible.
1597func (x *TabView) ReorderForward(PageVar *TabPage) bool {
1598
1599	cret := xTabViewReorderForward(x.GoPointer(), PageVar.GoPointer())
1600	return cret
1601}
1602
1603var xTabViewReorderLast func(uintptr, uintptr) bool
1604
1605// Reorders @page to the last possible position.
1606func (x *TabView) ReorderLast(PageVar *TabPage) bool {
1607
1608	cret := xTabViewReorderLast(x.GoPointer(), PageVar.GoPointer())
1609	return cret
1610}
1611
1612var xTabViewReorderPage func(uintptr, uintptr, int) bool
1613
1614// Reorders @page to @position.
1615//
1616// It's a programmer error to try to reorder a pinned page after a non-pinned
1617// one, or a non-pinned page before a pinned one.
1618func (x *TabView) ReorderPage(PageVar *TabPage, PositionVar int) bool {
1619
1620	cret := xTabViewReorderPage(x.GoPointer(), PageVar.GoPointer(), PositionVar)
1621	return cret
1622}
1623
1624var xTabViewSelectNextPage func(uintptr) bool
1625
1626// Selects the page after the currently selected page.
1627//
1628// If the last page was already selected, this function does nothing.
1629func (x *TabView) SelectNextPage() bool {
1630
1631	cret := xTabViewSelectNextPage(x.GoPointer())
1632	return cret
1633}
1634
1635var xTabViewSelectPreviousPage func(uintptr) bool
1636
1637// Selects the page before the currently selected page.
1638//
1639// If the first page was already selected, this function does nothing.
1640func (x *TabView) SelectPreviousPage() bool {
1641
1642	cret := xTabViewSelectPreviousPage(x.GoPointer())
1643	return cret
1644}
1645
1646var xTabViewSetDefaultIcon func(uintptr, uintptr)
1647
1648// Sets the default page icon for @self.
1649//
1650// If a page doesn't provide its own icon via [property@TabPage:icon], a default
1651// icon may be used instead for contexts where having an icon is necessary.
1652//
1653// [class@TabBar] will use default icon for pinned tabs in case the page is not
1654// loading, doesn't have an icon and an indicator. Default icon is never used
1655// for tabs that aren't pinned.
1656//
1657// [class@TabOverview] will use default icon for pages with missing thumbnails.
1658//
1659// By default, the `adw-tab-icon-missing-symbolic` icon is used.
1660func (x *TabView) SetDefaultIcon(DefaultIconVar gio.Icon) {
1661
1662	xTabViewSetDefaultIcon(x.GoPointer(), DefaultIconVar.GoPointer())
1663
1664}
1665
1666var xTabViewSetMenuModel func(uintptr, uintptr)
1667
1668// Sets the tab context menu model for @self.
1669//
1670// When a context menu is shown for a tab, it will be constructed from the
1671// provided menu model. Use the [signal@TabView::setup-menu] signal to set up
1672// the menu actions for the particular tab.
1673func (x *TabView) SetMenuModel(MenuModelVar *gio.MenuModel) {
1674
1675	xTabViewSetMenuModel(x.GoPointer(), MenuModelVar.GoPointer())
1676
1677}
1678
1679var xTabViewSetPagePinned func(uintptr, uintptr, bool)
1680
1681// Pins or unpins @page.
1682//
1683// Pinned pages are guaranteed to be placed before all non-pinned pages; at any
1684// given moment the first [property@TabView:n-pinned-pages] pages in @self are
1685// guaranteed to be pinned.
1686//
1687// When a page is pinned or unpinned, it's automatically reordered: pinning a
1688// page moves it after other pinned pages; unpinning a page moves it before
1689// other non-pinned pages.
1690//
1691// Pinned pages can still be reordered between each other.
1692//
1693// [class@TabBar] will display pinned pages in a compact form, never showing the
1694// title or close button, and only showing a single icon, selected in the
1695// following order:
1696//
1697// 1. [property@TabPage:indicator-icon]
1698// 2. A spinner if [property@TabPage:loading] is `TRUE`
1699// 3. [property@TabPage:icon]
1700// 4. [property@TabView:default-icon]
1701//
1702// [class@TabOverview] will not show a thumbnail for pinned pages, and replace
1703// the close button with an unpin button. Unlike `AdwTabBar`, it will still
1704// display the page's title, icon and indicator separately.
1705//
1706// Pinned pages cannot be closed by default, see [signal@TabView::close-page]
1707// for how to override that behavior.
1708//
1709// Changes the value of the [property@TabPage:pinned] property.
1710func (x *TabView) SetPagePinned(PageVar *TabPage, PinnedVar bool) {
1711
1712	xTabViewSetPagePinned(x.GoPointer(), PageVar.GoPointer(), PinnedVar)
1713
1714}
1715
1716var xTabViewSetSelectedPage func(uintptr, uintptr)
1717
1718// Sets the currently selected page in @self.
1719func (x *TabView) SetSelectedPage(SelectedPageVar *TabPage) {
1720
1721	xTabViewSetSelectedPage(x.GoPointer(), SelectedPageVar.GoPointer())
1722
1723}
1724
1725var xTabViewSetShortcuts func(uintptr, TabViewShortcuts)
1726
1727// Sets the enabled shortcuts for @self.
1728//
1729// See [flags@TabViewShortcuts] for the list of the available shortcuts. All of
1730// the shortcuts are enabled by default.
1731//
1732// [method@TabView.add_shortcuts] and [method@TabView.remove_shortcuts] provide
1733// a convenient way to manage individual shortcuts.
1734func (x *TabView) SetShortcuts(ShortcutsVar TabViewShortcuts) {
1735
1736	xTabViewSetShortcuts(x.GoPointer(), ShortcutsVar)
1737
1738}
1739
1740var xTabViewTransferPage func(uintptr, uintptr, uintptr, int)
1741
1742// Transfers @page from @self to @other_view.
1743//
1744// The @page object will be reused.
1745//
1746// It's a programmer error to try to insert a pinned page after a non-pinned
1747// one, or a non-pinned page before a pinned one.
1748func (x *TabView) TransferPage(PageVar *TabPage, OtherViewVar *TabView, PositionVar int) {
1749
1750	xTabViewTransferPage(x.GoPointer(), PageVar.GoPointer(), OtherViewVar.GoPointer(), PositionVar)
1751
1752}
1753
1754func (c *TabView) GoPointer() uintptr {
1755	if c == nil {
1756		return 0
1757	}
1758	return c.Ptr
1759}
1760
1761func (c *TabView) SetGoPointer(ptr uintptr) {
1762	c.Ptr = ptr
1763}
1764
1765// GetPropertyIsTransferringPage gets the "is-transferring-page" property.
1766// Whether a page is being transferred.
1767//
1768// This property will be set to `TRUE` when a drag-n-drop tab transfer starts
1769// on any `AdwTabView`, and to `FALSE` after it ends.
1770//
1771// During the transfer, children cannot receive pointer input and a tab can
1772// be safely dropped on the tab view.
1773func (x *TabView) GetPropertyIsTransferringPage() bool {
1774	var v gobject.Value
1775	x.GetProperty("is-transferring-page", &v)
1776	return v.GetBoolean()
1777}
1778
1779// GetPropertyNPages gets the "n-pages" property.
1780// The number of pages in the tab view.
1781func (x *TabView) GetPropertyNPages() int {
1782	var v gobject.Value
1783	x.GetProperty("n-pages", &v)
1784	return v.GetInt()
1785}
1786
1787// GetPropertyNPinnedPages gets the "n-pinned-pages" property.
1788// The number of pinned pages in the tab view.
1789//
1790// See [method@TabView.set_page_pinned].
1791func (x *TabView) GetPropertyNPinnedPages() int {
1792	var v gobject.Value
1793	x.GetProperty("n-pinned-pages", &v)
1794	return v.GetInt()
1795}
1796
1797// Emitted after [method@TabView.close_page] has been called for @page.
1798//
1799// The handler is expected to call [method@TabView.close_page_finish] to
1800// confirm or reject the closing.
1801//
1802// The default handler will immediately confirm closing for non-pinned pages,
1803// or reject it for pinned pages, equivalent to the following example:
1804//
1805// ```c
1806// static gboolean
1807// close_page_cb (AdwTabView *view,
1808//
1809//	AdwTabPage *page,
1810//	gpointer    user_data)
1811//
1812//	{
1813//	  adw_tab_view_close_page_finish (view, page, !adw_tab_page_get_pinned (page));
1814//
1815//	  return GDK_EVENT_STOP;
1816//	}
1817//
1818// ```
1819//
1820// The [method@TabView.close_page_finish] call doesn't have to happen inside
1821// the handler, so can be used to do asynchronous checks before confirming the
1822// closing.
1823//
1824// A typical reason to connect to this signal is to show a confirmation dialog
1825// for closing a tab.
1826//
1827// The signal handler should return `GDK_EVENT_STOP` to stop propagation or
1828// `GDK_EVENT_CONTINUE` to invoke the default handler.
1829func (x *TabView) ConnectClosePage(cb *func(TabView, uintptr) bool) uint {
1830	cbPtr := uintptr(unsafe.Pointer(cb))
1831	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1832		handlerID := gobject.SignalConnect(x.GoPointer(), "close-page", cbRefPtr)
1833		glib.SaveHandlerMapping(handlerID, cbPtr)
1834		return handlerID
1835	}
1836
1837	fcb := func(clsPtr uintptr, PageVarp uintptr) bool {
1838		fa := TabView{}
1839		fa.Ptr = clsPtr
1840		cbFn := *cb
1841
1842		return cbFn(fa, PageVarp)
1843
1844	}
1845	cbRefPtr := purego.NewCallback(fcb)
1846	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1847	handlerID := gobject.SignalConnect(x.GoPointer(), "close-page", cbRefPtr)
1848	glib.SaveHandlerMapping(handlerID, cbPtr)
1849	return handlerID
1850}
1851
1852// Emitted when a tab should be transferred into a new window.
1853//
1854// This can happen after a tab has been dropped on desktop.
1855//
1856// The signal handler is expected to create a new window, position it as
1857// needed and return its `AdwTabView` that the page will be transferred into.
1858func (x *TabView) ConnectCreateWindow(cb *func(TabView) TabView) uint {
1859	cbPtr := uintptr(unsafe.Pointer(cb))
1860	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1861		handlerID := gobject.SignalConnect(x.GoPointer(), "create-window", cbRefPtr)
1862		glib.SaveHandlerMapping(handlerID, cbPtr)
1863		return handlerID
1864	}
1865
1866	fcb := func(clsPtr uintptr) uintptr {
1867		fa := TabView{}
1868		fa.Ptr = clsPtr
1869		cbFn := *cb
1870
1871		CreateWindowCls := cbFn(fa)
1872		return CreateWindowCls.Ptr
1873
1874	}
1875	cbRefPtr := purego.NewCallback(fcb)
1876	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1877	handlerID := gobject.SignalConnect(x.GoPointer(), "create-window", cbRefPtr)
1878	glib.SaveHandlerMapping(handlerID, cbPtr)
1879	return handlerID
1880}
1881
1882// Emitted after the indicator icon on @page has been activated.
1883//
1884// See [property@TabPage:indicator-icon] and
1885// [property@TabPage:indicator-activatable].
1886func (x *TabView) ConnectIndicatorActivated(cb *func(TabView, uintptr)) uint {
1887	cbPtr := uintptr(unsafe.Pointer(cb))
1888	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1889		handlerID := gobject.SignalConnect(x.GoPointer(), "indicator-activated", cbRefPtr)
1890		glib.SaveHandlerMapping(handlerID, cbPtr)
1891		return handlerID
1892	}
1893
1894	fcb := func(clsPtr uintptr, PageVarp uintptr) {
1895		fa := TabView{}
1896		fa.Ptr = clsPtr
1897		cbFn := *cb
1898
1899		cbFn(fa, PageVarp)
1900
1901	}
1902	cbRefPtr := purego.NewCallback(fcb)
1903	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1904	handlerID := gobject.SignalConnect(x.GoPointer(), "indicator-activated", cbRefPtr)
1905	glib.SaveHandlerMapping(handlerID, cbPtr)
1906	return handlerID
1907}
1908
1909// Emitted when a page has been created or transferred to @self.
1910//
1911// A typical reason to connect to this signal would be to connect to page
1912// signals for things such as updating window title.
1913func (x *TabView) ConnectPageAttached(cb *func(TabView, uintptr, int)) uint {
1914	cbPtr := uintptr(unsafe.Pointer(cb))
1915	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1916		handlerID := gobject.SignalConnect(x.GoPointer(), "page-attached", cbRefPtr)
1917		glib.SaveHandlerMapping(handlerID, cbPtr)
1918		return handlerID
1919	}
1920
1921	fcb := func(clsPtr uintptr, PageVarp uintptr, PositionVarp int) {
1922		fa := TabView{}
1923		fa.Ptr = clsPtr
1924		cbFn := *cb
1925
1926		cbFn(fa, PageVarp, PositionVarp)
1927
1928	}
1929	cbRefPtr := purego.NewCallback(fcb)
1930	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1931	handlerID := gobject.SignalConnect(x.GoPointer(), "page-attached", cbRefPtr)
1932	glib.SaveHandlerMapping(handlerID, cbPtr)
1933	return handlerID
1934}
1935
1936// Emitted when a page has been removed or transferred to another view.
1937//
1938// A typical reason to connect to this signal would be to disconnect signal
1939// handlers connected in the [signal@TabView::page-attached] handler.
1940//
1941// It is important not to try and destroy the page child in the handler of
1942// this function as the child might merely be moved to another window; use
1943// child dispose handler for that or do it in sync with your
1944// [method@TabView.close_page_finish] calls.
1945func (x *TabView) ConnectPageDetached(cb *func(TabView, uintptr, int)) uint {
1946	cbPtr := uintptr(unsafe.Pointer(cb))
1947	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1948		handlerID := gobject.SignalConnect(x.GoPointer(), "page-detached", cbRefPtr)
1949		glib.SaveHandlerMapping(handlerID, cbPtr)
1950		return handlerID
1951	}
1952
1953	fcb := func(clsPtr uintptr, PageVarp uintptr, PositionVarp int) {
1954		fa := TabView{}
1955		fa.Ptr = clsPtr
1956		cbFn := *cb
1957
1958		cbFn(fa, PageVarp, PositionVarp)
1959
1960	}
1961	cbRefPtr := purego.NewCallback(fcb)
1962	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1963	handlerID := gobject.SignalConnect(x.GoPointer(), "page-detached", cbRefPtr)
1964	glib.SaveHandlerMapping(handlerID, cbPtr)
1965	return handlerID
1966}
1967
1968// Emitted after @page has been reordered to @position.
1969func (x *TabView) ConnectPageReordered(cb *func(TabView, uintptr, int)) uint {
1970	cbPtr := uintptr(unsafe.Pointer(cb))
1971	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1972		handlerID := gobject.SignalConnect(x.GoPointer(), "page-reordered", cbRefPtr)
1973		glib.SaveHandlerMapping(handlerID, cbPtr)
1974		return handlerID
1975	}
1976
1977	fcb := func(clsPtr uintptr, PageVarp uintptr, PositionVarp int) {
1978		fa := TabView{}
1979		fa.Ptr = clsPtr
1980		cbFn := *cb
1981
1982		cbFn(fa, PageVarp, PositionVarp)
1983
1984	}
1985	cbRefPtr := purego.NewCallback(fcb)
1986	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1987	handlerID := gobject.SignalConnect(x.GoPointer(), "page-reordered", cbRefPtr)
1988	glib.SaveHandlerMapping(handlerID, cbPtr)
1989	return handlerID
1990}
1991
1992// Emitted when a context menu is opened or closed for @page.
1993//
1994// If the menu has been closed, @page will be set to `NULL`.
1995//
1996// It can be used to set up menu actions before showing the menu, for example
1997// disable actions not applicable to @page.
1998func (x *TabView) ConnectSetupMenu(cb *func(TabView, uintptr)) uint {
1999	cbPtr := uintptr(unsafe.Pointer(cb))
2000	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
2001		handlerID := gobject.SignalConnect(x.GoPointer(), "setup-menu", cbRefPtr)
2002		glib.SaveHandlerMapping(handlerID, cbPtr)
2003		return handlerID
2004	}
2005
2006	fcb := func(clsPtr uintptr, PageVarp uintptr) {
2007		fa := TabView{}
2008		fa.Ptr = clsPtr
2009		cbFn := *cb
2010
2011		cbFn(fa, PageVarp)
2012
2013	}
2014	cbRefPtr := purego.NewCallback(fcb)
2015	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
2016	handlerID := gobject.SignalConnect(x.GoPointer(), "setup-menu", cbRefPtr)
2017	glib.SaveHandlerMapping(handlerID, cbPtr)
2018	return handlerID
2019}
2020
2021// Requests the user's screen reader to announce the given message.
2022//
2023// This kind of notification is useful for messages that
2024// either have only a visual representation or that are not
2025// exposed visually at all, e.g. a notification about a
2026// successful operation.
2027//
2028// Also, by using this API, you can ensure that the message
2029// does not interrupts the user's current screen reader output.
2030func (x *TabView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
2031
2032	gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
2033
2034}
2035
2036// Retrieves the accessible parent for an accessible object.
2037//
2038// This function returns `NULL` for top level widgets.
2039func (x *TabView) GetAccessibleParent() *gtk.AccessibleBase {
2040	var cls *gtk.AccessibleBase
2041
2042	cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
2043
2044	if cret == 0 {
2045		return nil
2046	}
2047	cls = &gtk.AccessibleBase{}
2048	cls.Ptr = cret
2049	return cls
2050}
2051
2052// Retrieves the accessible role of an accessible object.
2053func (x *TabView) GetAccessibleRole() gtk.AccessibleRole {
2054
2055	cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
2056	return cret
2057}
2058
2059// Retrieves the implementation for the given accessible object.
2060func (x *TabView) GetAtContext() *gtk.ATContext {
2061	var cls *gtk.ATContext
2062
2063	cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
2064
2065	if cret == 0 {
2066		return nil
2067	}
2068	cls = &gtk.ATContext{}
2069	cls.Ptr = cret
2070	return cls
2071}
2072
2073// Queries the coordinates and dimensions of this accessible
2074//
2075// This functionality can be overridden by `GtkAccessible`
2076// implementations, e.g. to get the bounds from an ignored
2077// child widget.
2078func (x *TabView) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
2079
2080	cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
2081	return cret
2082}
2083
2084// Retrieves the first accessible child of an accessible object.
2085func (x *TabView) GetFirstAccessibleChild() *gtk.AccessibleBase {
2086	var cls *gtk.AccessibleBase
2087
2088	cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
2089
2090	if cret == 0 {
2091		return nil
2092	}
2093	cls = &gtk.AccessibleBase{}
2094	cls.Ptr = cret
2095	return cls
2096}
2097
2098// Retrieves the next accessible sibling of an accessible object
2099func (x *TabView) GetNextAccessibleSibling() *gtk.AccessibleBase {
2100	var cls *gtk.AccessibleBase
2101
2102	cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
2103
2104	if cret == 0 {
2105		return nil
2106	}
2107	cls = &gtk.AccessibleBase{}
2108	cls.Ptr = cret
2109	return cls
2110}
2111
2112// Queries a platform state, such as focus.
2113//
2114// This functionality can be overridden by `GtkAccessible`
2115// implementations, e.g. to get platform state from an ignored
2116// child widget, as is the case for `GtkText` wrappers.
2117func (x *TabView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
2118
2119	cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
2120	return cret
2121}
2122
2123// Resets the accessible property to its default value.
2124func (x *TabView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
2125
2126	gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
2127
2128}
2129
2130// Resets the accessible relation to its default value.
2131func (x *TabView) ResetRelation(RelationVar gtk.AccessibleRelation) {
2132
2133	gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
2134
2135}
2136
2137// Resets the accessible state to its default value.
2138func (x *TabView) ResetState(StateVar gtk.AccessibleState) {
2139
2140	gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
2141
2142}
2143
2144// Sets the parent and sibling of an accessible object.
2145//
2146// This function is meant to be used by accessible implementations that are
2147// not part of the widget hierarchy, and but act as a logical bridge between
2148// widgets. For instance, if a widget creates an object that holds metadata
2149// for each child, and you want that object to implement the `GtkAccessible`
2150// interface, you will use this function to ensure that the parent of each
2151// child widget is the metadata object, and the parent of each metadata
2152// object is the container widget.
2153func (x *TabView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
2154
2155	gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
2156
2157}
2158
2159// Updates the next accessible sibling.
2160//
2161// That might be useful when a new child of a custom accessible
2162// is created, and it needs to be linked to a previous child.
2163func (x *TabView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
2164
2165	gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
2166
2167}
2168
2169// Informs ATs that the platform state has changed.
2170//
2171// This function should be used by `GtkAccessible` implementations that
2172// have a platform state but are not widgets. Widgets handle platform
2173// states automatically.
2174func (x *TabView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
2175
2176	gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
2177
2178}
2179
2180// Updates a list of accessible properties.
2181//
2182// See the [enum@Gtk.AccessibleProperty] documentation for the
2183// value types of accessible properties.
2184//
2185// This function should be called by `GtkWidget` types whenever
2186// an accessible property change must be communicated to assistive
2187// technologies.
2188//
2189// Example:
2190// ```c
2191// value = gtk_adjustment_get_value (adjustment);
2192// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
2193//
2194//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
2195//	-1);
2196//
2197// ```
2198func (x *TabView) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
2199
2200	gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
2201
2202}
2203
2204// Updates an array of accessible properties.
2205//
2206// This function should be called by `GtkWidget` types whenever an accessible
2207// property change must be communicated to assistive technologies.
2208//
2209// This function is meant to be used by language bindings.
2210func (x *TabView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
2211
2212	gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
2213
2214}
2215
2216// Updates a list of accessible relations.
2217//
2218// This function should be called by `GtkWidget` types whenever an accessible
2219// relation change must be communicated to assistive technologies.
2220//
2221// If the [enum@Gtk.AccessibleRelation] requires a list of references,
2222// you should pass each reference individually, followed by `NULL`, e.g.
2223//
2224// ```c
2225// gtk_accessible_update_relation (accessible,
2226//
2227//	GTK_ACCESSIBLE_RELATION_CONTROLS,
2228//	  ref1, NULL,
2229//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
2230//	  ref1, ref2, ref3, NULL,
2231//	-1);
2232//
2233// ```
2234func (x *TabView) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
2235
2236	gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
2237
2238}
2239
2240// Updates an array of accessible relations.
2241//
2242// This function should be called by `GtkWidget` types whenever an accessible
2243// relation change must be communicated to assistive technologies.
2244//
2245// This function is meant to be used by language bindings.
2246func (x *TabView) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
2247
2248	gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
2249
2250}
2251
2252// Updates a list of accessible states.
2253//
2254// See the [enum@Gtk.AccessibleState] documentation for the
2255// value types of accessible states.
2256//
2257// This function should be called by `GtkWidget` types whenever
2258// an accessible state change must be communicated to assistive
2259// technologies.
2260//
2261// Example:
2262//
2263// ```c
2264// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
2265// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
2266//
2267//	GTK_ACCESSIBLE_STATE_CHECKED, value,
2268//	-1);
2269//
2270// ```
2271func (x *TabView) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
2272
2273	gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
2274
2275}
2276
2277// Updates an array of accessible states.
2278//
2279// This function should be called by `GtkWidget` types whenever an accessible
2280// state change must be communicated to assistive technologies.
2281//
2282// This function is meant to be used by language bindings.
2283func (x *TabView) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
2284
2285	gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
2286
2287}
2288
2289// Gets the ID of the @buildable object.
2290//
2291// `GtkBuilder` sets the name based on the ID attribute
2292// of the `<object>` tag used to construct the @buildable.
2293func (x *TabView) GetBuildableId() string {
2294
2295	cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
2296	return cret
2297}
2298
2299func init() {
2300	core.SetPackageName("ADW", "libadwaita-1")
2301	core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
2302	var libs []uintptr
2303	for _, libPath := range core.GetPaths("ADW") {
2304		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
2305		if err != nil {
2306			panic(err)
2307		}
2308		libs = append(libs, lib)
2309	}
2310
2311	core.PuregoSafeRegister(&xTabViewShortcutsGLibType, libs, "adw_tab_view_shortcuts_get_type")
2312
2313	core.PuregoSafeRegister(&xTabPageGLibType, libs, "adw_tab_page_get_type")
2314
2315	core.PuregoSafeRegister(&xTabPageGetChild, libs, "adw_tab_page_get_child")
2316	core.PuregoSafeRegister(&xTabPageGetIcon, libs, "adw_tab_page_get_icon")
2317	core.PuregoSafeRegister(&xTabPageGetIndicatorActivatable, libs, "adw_tab_page_get_indicator_activatable")
2318	core.PuregoSafeRegister(&xTabPageGetIndicatorIcon, libs, "adw_tab_page_get_indicator_icon")
2319	core.PuregoSafeRegister(&xTabPageGetIndicatorTooltip, libs, "adw_tab_page_get_indicator_tooltip")
2320	core.PuregoSafeRegister(&xTabPageGetKeyword, libs, "adw_tab_page_get_keyword")
2321	core.PuregoSafeRegister(&xTabPageGetLiveThumbnail, libs, "adw_tab_page_get_live_thumbnail")
2322	core.PuregoSafeRegister(&xTabPageGetLoading, libs, "adw_tab_page_get_loading")
2323	core.PuregoSafeRegister(&xTabPageGetNeedsAttention, libs, "adw_tab_page_get_needs_attention")
2324	core.PuregoSafeRegister(&xTabPageGetParent, libs, "adw_tab_page_get_parent")
2325	core.PuregoSafeRegister(&xTabPageGetPinned, libs, "adw_tab_page_get_pinned")
2326	core.PuregoSafeRegister(&xTabPageGetSelected, libs, "adw_tab_page_get_selected")
2327	core.PuregoSafeRegister(&xTabPageGetThumbnailXalign, libs, "adw_tab_page_get_thumbnail_xalign")
2328	core.PuregoSafeRegister(&xTabPageGetThumbnailYalign, libs, "adw_tab_page_get_thumbnail_yalign")
2329	core.PuregoSafeRegister(&xTabPageGetTitle, libs, "adw_tab_page_get_title")
2330	core.PuregoSafeRegister(&xTabPageGetTooltip, libs, "adw_tab_page_get_tooltip")
2331	core.PuregoSafeRegister(&xTabPageInvalidateThumbnail, libs, "adw_tab_page_invalidate_thumbnail")
2332	core.PuregoSafeRegister(&xTabPageSetIcon, libs, "adw_tab_page_set_icon")
2333	core.PuregoSafeRegister(&xTabPageSetIndicatorActivatable, libs, "adw_tab_page_set_indicator_activatable")
2334	core.PuregoSafeRegister(&xTabPageSetIndicatorIcon, libs, "adw_tab_page_set_indicator_icon")
2335	core.PuregoSafeRegister(&xTabPageSetIndicatorTooltip, libs, "adw_tab_page_set_indicator_tooltip")
2336	core.PuregoSafeRegister(&xTabPageSetKeyword, libs, "adw_tab_page_set_keyword")
2337	core.PuregoSafeRegister(&xTabPageSetLiveThumbnail, libs, "adw_tab_page_set_live_thumbnail")
2338	core.PuregoSafeRegister(&xTabPageSetLoading, libs, "adw_tab_page_set_loading")
2339	core.PuregoSafeRegister(&xTabPageSetNeedsAttention, libs, "adw_tab_page_set_needs_attention")
2340	core.PuregoSafeRegister(&xTabPageSetThumbnailXalign, libs, "adw_tab_page_set_thumbnail_xalign")
2341	core.PuregoSafeRegister(&xTabPageSetThumbnailYalign, libs, "adw_tab_page_set_thumbnail_yalign")
2342	core.PuregoSafeRegister(&xTabPageSetTitle, libs, "adw_tab_page_set_title")
2343	core.PuregoSafeRegister(&xTabPageSetTooltip, libs, "adw_tab_page_set_tooltip")
2344
2345	core.PuregoSafeRegister(&xTabViewGLibType, libs, "adw_tab_view_get_type")
2346
2347	core.PuregoSafeRegister(&xNewTabView, libs, "adw_tab_view_new")
2348
2349	core.PuregoSafeRegister(&xTabViewAddPage, libs, "adw_tab_view_add_page")
2350	core.PuregoSafeRegister(&xTabViewAddShortcuts, libs, "adw_tab_view_add_shortcuts")
2351	core.PuregoSafeRegister(&xTabViewAppend, libs, "adw_tab_view_append")
2352	core.PuregoSafeRegister(&xTabViewAppendPinned, libs, "adw_tab_view_append_pinned")
2353	core.PuregoSafeRegister(&xTabViewCloseOtherPages, libs, "adw_tab_view_close_other_pages")
2354	core.PuregoSafeRegister(&xTabViewClosePage, libs, "adw_tab_view_close_page")
2355	core.PuregoSafeRegister(&xTabViewClosePageFinish, libs, "adw_tab_view_close_page_finish")
2356	core.PuregoSafeRegister(&xTabViewClosePagesAfter, libs, "adw_tab_view_close_pages_after")
2357	core.PuregoSafeRegister(&xTabViewClosePagesBefore, libs, "adw_tab_view_close_pages_before")
2358	core.PuregoSafeRegister(&xTabViewGetDefaultIcon, libs, "adw_tab_view_get_default_icon")
2359	core.PuregoSafeRegister(&xTabViewGetIsTransferringPage, libs, "adw_tab_view_get_is_transferring_page")
2360	core.PuregoSafeRegister(&xTabViewGetMenuModel, libs, "adw_tab_view_get_menu_model")
2361	core.PuregoSafeRegister(&xTabViewGetNPages, libs, "adw_tab_view_get_n_pages")
2362	core.PuregoSafeRegister(&xTabViewGetNPinnedPages, libs, "adw_tab_view_get_n_pinned_pages")
2363	core.PuregoSafeRegister(&xTabViewGetNthPage, libs, "adw_tab_view_get_nth_page")
2364	core.PuregoSafeRegister(&xTabViewGetPage, libs, "adw_tab_view_get_page")
2365	core.PuregoSafeRegister(&xTabViewGetPagePosition, libs, "adw_tab_view_get_page_position")
2366	core.PuregoSafeRegister(&xTabViewGetPages, libs, "adw_tab_view_get_pages")
2367	core.PuregoSafeRegister(&xTabViewGetSelectedPage, libs, "adw_tab_view_get_selected_page")
2368	core.PuregoSafeRegister(&xTabViewGetShortcuts, libs, "adw_tab_view_get_shortcuts")
2369	core.PuregoSafeRegister(&xTabViewInsert, libs, "adw_tab_view_insert")
2370	core.PuregoSafeRegister(&xTabViewInsertPinned, libs, "adw_tab_view_insert_pinned")
2371	core.PuregoSafeRegister(&xTabViewInvalidateThumbnails, libs, "adw_tab_view_invalidate_thumbnails")
2372	core.PuregoSafeRegister(&xTabViewPrepend, libs, "adw_tab_view_prepend")
2373	core.PuregoSafeRegister(&xTabViewPrependPinned, libs, "adw_tab_view_prepend_pinned")
2374	core.PuregoSafeRegister(&xTabViewRemoveShortcuts, libs, "adw_tab_view_remove_shortcuts")
2375	core.PuregoSafeRegister(&xTabViewReorderBackward, libs, "adw_tab_view_reorder_backward")
2376	core.PuregoSafeRegister(&xTabViewReorderFirst, libs, "adw_tab_view_reorder_first")
2377	core.PuregoSafeRegister(&xTabViewReorderForward, libs, "adw_tab_view_reorder_forward")
2378	core.PuregoSafeRegister(&xTabViewReorderLast, libs, "adw_tab_view_reorder_last")
2379	core.PuregoSafeRegister(&xTabViewReorderPage, libs, "adw_tab_view_reorder_page")
2380	core.PuregoSafeRegister(&xTabViewSelectNextPage, libs, "adw_tab_view_select_next_page")
2381	core.PuregoSafeRegister(&xTabViewSelectPreviousPage, libs, "adw_tab_view_select_previous_page")
2382	core.PuregoSafeRegister(&xTabViewSetDefaultIcon, libs, "adw_tab_view_set_default_icon")
2383	core.PuregoSafeRegister(&xTabViewSetMenuModel, libs, "adw_tab_view_set_menu_model")
2384	core.PuregoSafeRegister(&xTabViewSetPagePinned, libs, "adw_tab_view_set_page_pinned")
2385	core.PuregoSafeRegister(&xTabViewSetSelectedPage, libs, "adw_tab_view_set_selected_page")
2386	core.PuregoSafeRegister(&xTabViewSetShortcuts, libs, "adw_tab_view_set_shortcuts")
2387	core.PuregoSafeRegister(&xTabViewTransferPage, libs, "adw_tab_view_transfer_page")
2388
2389}

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