v0.2.1 c0399be

adw-tab-overview.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/gio"
13	"github.com/bnema/puregotk/v4/glib"
14	"github.com/bnema/puregotk/v4/gobject"
15	"github.com/bnema/puregotk/v4/gobject/types"
16	"github.com/bnema/puregotk/v4/gtk"
17)
18
19type TabOverviewClass struct {
20	_ structs.HostLayout
21
22	ParentClass gtk.WidgetClass
23}
24
25func (x *TabOverviewClass) GoPointer() uintptr {
26	return uintptr(unsafe.Pointer(x))
27}
28
29// A tab overview for [class@TabView].
30//
31// <picture>
32//
33//	<source srcset="tab-overview-dark.png" media="(prefers-color-scheme: dark)">
34//	<img src="tab-overview.png" alt="tab-overview">
35//
36// </picture>
37//
38// `AdwTabOverview` is a widget that can display tabs from an `AdwTabView` in a
39// grid.
40//
41// `AdwTabOverview` shows a thumbnail for each tab. By default thumbnails are
42// static for all pages except the selected one. They can be made always live
43// by setting [property@TabPage:live-thumbnail] to `TRUE`, or refreshed with
44// [method@TabPage.invalidate_thumbnail] or
45// [method@TabView.invalidate_thumbnails] otherwise.
46//
47// If the pages are too tall or too wide, the thumbnails will be cropped; use
48// [property@TabPage:thumbnail-xalign] and [property@TabPage:thumbnail-yalign] to
49// control which part of the page should be visible in this case.
50//
51// Pinned tabs are shown as smaller cards without thumbnails above the other
52// tabs. Unlike in [class@TabBar], they still have titles, as well as an unpin
53// button.
54//
55// `AdwTabOverview` provides search in open tabs. It searches in tab titles and
56// tooltips, as well as [property@TabPage:keyword].
57//
58// If [property@TabOverview:enable-new-tab] is set to `TRUE`, a new tab button
59// will be shown. Connect to the [signal@TabOverview::create-tab] signal to use
60// it.
61//
62// [property@TabOverview:secondary-menu] can be used to provide a secondary menu
63// for the overview. Use it to add extra actions, e.g. to open a new window or
64// undo closed tab.
65//
66// `AdwTabOverview` is intended to be used as the direct child of the window,
67// with the rest of the window contents set as the [property@TabOverview:child].
68// The child is expected to contain an [class@TabView].
69//
70// `AdwTabOverview` shows window buttons by default. They can be disabled by
71// setting [property@TabOverview:show-start-title-buttons] and/or
72// [property@TabOverview:show-start-title-buttons] and/or
73// [property@TabOverview:show-end-title-buttons] to `FALSE`.
74//
75// If search and window buttons are disabled, and secondary menu is not set, the
76// header bar will be hidden.
77//
78// ## Actions
79//
80// `AdwTabOverview` defines the `overview.open` and `overview.close` actions for
81// opening and closing itself. They can be convenient when used together with
82// [class@TabButton].
83//
84// ## CSS nodes
85//
86// `AdwTabOverview` has a single CSS node with name `taboverview`.
87type TabOverview struct {
88	gtk.Widget
89}
90
91var xTabOverviewGLibType func() types.GType
92
93func TabOverviewGLibType() types.GType {
94	return xTabOverviewGLibType()
95}
96
97func TabOverviewNewFromInternalPtr(ptr uintptr) *TabOverview {
98	cls := &TabOverview{}
99	cls.Ptr = ptr
100	return cls
101}
102
103var xNewTabOverview func() uintptr
104
105// Creates a new `AdwTabOverview`.
106func NewTabOverview() *TabOverview {
107	var cls *TabOverview
108
109	cret := xNewTabOverview()
110
111	if cret == 0 {
112		return nil
113	}
114	gobject.IncreaseRef(cret)
115	cls = &TabOverview{}
116	cls.Ptr = cret
117	return cls
118}
119
120var xTabOverviewGetChild func(uintptr) uintptr
121
122// Gets the child widget of @self.
123func (x *TabOverview) GetChild() *gtk.Widget {
124	var cls *gtk.Widget
125
126	cret := xTabOverviewGetChild(x.GoPointer())
127
128	if cret == 0 {
129		return nil
130	}
131	gobject.IncreaseRef(cret)
132	cls = &gtk.Widget{}
133	cls.Ptr = cret
134	return cls
135}
136
137var xTabOverviewGetEnableNewTab func(uintptr) bool
138
139// Gets whether to new tab button is enabled for @self.
140func (x *TabOverview) GetEnableNewTab() bool {
141
142	cret := xTabOverviewGetEnableNewTab(x.GoPointer())
143	return cret
144}
145
146var xTabOverviewGetEnableSearch func(uintptr) bool
147
148// Gets whether search in tabs is enabled for @self.
149func (x *TabOverview) GetEnableSearch() bool {
150
151	cret := xTabOverviewGetEnableSearch(x.GoPointer())
152	return cret
153}
154
155var xTabOverviewGetExtraDragPreferredAction func(uintptr) gdk.DragAction
156
157// Gets the current action during a drop on the extra_drop_target.
158func (x *TabOverview) GetExtraDragPreferredAction() gdk.DragAction {
159
160	cret := xTabOverviewGetExtraDragPreferredAction(x.GoPointer())
161	return cret
162}
163
164var xTabOverviewGetExtraDragPreload func(uintptr) bool
165
166// Gets whether drop data should be preloaded on hover.
167func (x *TabOverview) GetExtraDragPreload() bool {
168
169	cret := xTabOverviewGetExtraDragPreload(x.GoPointer())
170	return cret
171}
172
173var xTabOverviewGetInverted func(uintptr) bool
174
175// Gets whether thumbnails use inverted layout.
176func (x *TabOverview) GetInverted() bool {
177
178	cret := xTabOverviewGetInverted(x.GoPointer())
179	return cret
180}
181
182var xTabOverviewGetOpen func(uintptr) bool
183
184// Gets whether @self is open.
185func (x *TabOverview) GetOpen() bool {
186
187	cret := xTabOverviewGetOpen(x.GoPointer())
188	return cret
189}
190
191var xTabOverviewGetSearchActive func(uintptr) bool
192
193// Gets whether search is currently active for @self.
194//
195// See [property@TabOverview:enable-search].
196func (x *TabOverview) GetSearchActive() bool {
197
198	cret := xTabOverviewGetSearchActive(x.GoPointer())
199	return cret
200}
201
202var xTabOverviewGetSecondaryMenu func(uintptr) uintptr
203
204// Gets the secondary menu model for @self.
205func (x *TabOverview) GetSecondaryMenu() *gio.MenuModel {
206	var cls *gio.MenuModel
207
208	cret := xTabOverviewGetSecondaryMenu(x.GoPointer())
209
210	if cret == 0 {
211		return nil
212	}
213	gobject.IncreaseRef(cret)
214	cls = &gio.MenuModel{}
215	cls.Ptr = cret
216	return cls
217}
218
219var xTabOverviewGetShowEndTitleButtons func(uintptr) bool
220
221// Gets whether end title buttons are shown in @self's header bar.
222func (x *TabOverview) GetShowEndTitleButtons() bool {
223
224	cret := xTabOverviewGetShowEndTitleButtons(x.GoPointer())
225	return cret
226}
227
228var xTabOverviewGetShowStartTitleButtons func(uintptr) bool
229
230// Gets whether start title buttons are shown in @self's header bar.
231func (x *TabOverview) GetShowStartTitleButtons() bool {
232
233	cret := xTabOverviewGetShowStartTitleButtons(x.GoPointer())
234	return cret
235}
236
237var xTabOverviewGetView func(uintptr) uintptr
238
239// Gets the tab view @self controls.
240func (x *TabOverview) GetView() *TabView {
241	var cls *TabView
242
243	cret := xTabOverviewGetView(x.GoPointer())
244
245	if cret == 0 {
246		return nil
247	}
248	gobject.IncreaseRef(cret)
249	cls = &TabView{}
250	cls.Ptr = cret
251	return cls
252}
253
254var xTabOverviewSetChild func(uintptr, uintptr)
255
256// Sets the child widget of @self.
257func (x *TabOverview) SetChild(ChildVar *gtk.Widget) {
258
259	xTabOverviewSetChild(x.GoPointer(), ChildVar.GoPointer())
260
261}
262
263var xTabOverviewSetEnableNewTab func(uintptr, bool)
264
265// Sets whether to enable new tab button for @self.
266//
267// Connect to the [signal@TabOverview::create-tab] signal to use it.
268func (x *TabOverview) SetEnableNewTab(EnableNewTabVar bool) {
269
270	xTabOverviewSetEnableNewTab(x.GoPointer(), EnableNewTabVar)
271
272}
273
274var xTabOverviewSetEnableSearch func(uintptr, bool)
275
276// Sets whether to enable search in tabs for @self.
277//
278// Search matches tab titles and tooltips, as well as keywords, set via
279// [property@TabPage:keyword]. Use keywords to search in e.g. page URLs in a web
280// browser.
281//
282// During search, tab reordering and drag-n-drop are disabled.
283//
284// Use [property@TabOverview:search-active] to check out if search is currently
285// active.
286func (x *TabOverview) SetEnableSearch(EnableSearchVar bool) {
287
288	xTabOverviewSetEnableSearch(x.GoPointer(), EnableSearchVar)
289
290}
291
292var xTabOverviewSetExtraDragPreload func(uintptr, bool)
293
294// Sets whether drop data should be preloaded on hover.
295//
296// See [property@Gtk.DropTarget:preload].
297func (x *TabOverview) SetExtraDragPreload(PreloadVar bool) {
298
299	xTabOverviewSetExtraDragPreload(x.GoPointer(), PreloadVar)
300
301}
302
303var xTabOverviewSetInverted func(uintptr, bool)
304
305// Sets whether thumbnails use inverted layout.
306//
307// If set to `TRUE`, thumbnails will have the close or unpin button at the
308// beginning and the indicator at the end rather than the other way around.
309func (x *TabOverview) SetInverted(InvertedVar bool) {
310
311	xTabOverviewSetInverted(x.GoPointer(), InvertedVar)
312
313}
314
315var xTabOverviewSetOpen func(uintptr, bool)
316
317// Sets whether the to open @self.
318func (x *TabOverview) SetOpen(OpenVar bool) {
319
320	xTabOverviewSetOpen(x.GoPointer(), OpenVar)
321
322}
323
324var xTabOverviewSetSecondaryMenu func(uintptr, uintptr)
325
326// Sets the secondary menu model for @self.
327//
328// Use it to add extra actions, e.g. to open a new window or undo closed tab.
329func (x *TabOverview) SetSecondaryMenu(SecondaryMenuVar *gio.MenuModel) {
330
331	xTabOverviewSetSecondaryMenu(x.GoPointer(), SecondaryMenuVar.GoPointer())
332
333}
334
335var xTabOverviewSetShowEndTitleButtons func(uintptr, bool)
336
337// Sets whether to show end title buttons in @self's header bar.
338//
339// See [property@HeaderBar:show-start-title-buttons] for the other side.
340func (x *TabOverview) SetShowEndTitleButtons(ShowEndTitleButtonsVar bool) {
341
342	xTabOverviewSetShowEndTitleButtons(x.GoPointer(), ShowEndTitleButtonsVar)
343
344}
345
346var xTabOverviewSetShowStartTitleButtons func(uintptr, bool)
347
348// Sets whether to show start title buttons in @self's header bar.
349//
350// See [property@HeaderBar:show-end-title-buttons] for the other side.
351func (x *TabOverview) SetShowStartTitleButtons(ShowStartTitleButtonsVar bool) {
352
353	xTabOverviewSetShowStartTitleButtons(x.GoPointer(), ShowStartTitleButtonsVar)
354
355}
356
357var xTabOverviewSetView func(uintptr, uintptr)
358
359// Sets the tab view to control.
360//
361// The view must be inside @self, see [property@TabOverview:child].
362func (x *TabOverview) SetView(ViewVar *TabView) {
363
364	xTabOverviewSetView(x.GoPointer(), ViewVar.GoPointer())
365
366}
367
368var xTabOverviewSetupExtraDropTarget func(uintptr, gdk.DragAction, []types.GType, uint)
369
370// Sets the supported types for this drop target.
371//
372// Sets up an extra drop target on tabs.
373//
374// This allows to drag arbitrary content onto tabs, for example URLs in a web
375// browser.
376//
377// If a tab is hovered for a certain period of time while dragging the content,
378// it will be automatically selected.
379//
380// The [signal@TabOverview::extra-drag-drop] signal can be used to handle the
381// drop.
382func (x *TabOverview) SetupExtraDropTarget(ActionsVar gdk.DragAction, TypesVar []types.GType, NTypesVar uint) {
383
384	xTabOverviewSetupExtraDropTarget(x.GoPointer(), ActionsVar, TypesVar, NTypesVar)
385
386}
387
388func (c *TabOverview) GoPointer() uintptr {
389	if c == nil {
390		return 0
391	}
392	return c.Ptr
393}
394
395func (c *TabOverview) SetGoPointer(ptr uintptr) {
396	c.Ptr = ptr
397}
398
399// SetPropertyEnableNewTab sets the "enable-new-tab" property.
400// Whether to enable new tab button.
401//
402// Connect to the [signal@TabOverview::create-tab] signal to use it.
403func (x *TabOverview) SetPropertyEnableNewTab(value bool) {
404	var v gobject.Value
405	v.Init(gobject.TypeBooleanVal)
406	v.SetBoolean(value)
407	x.SetProperty("enable-new-tab", &v)
408}
409
410// GetPropertyEnableNewTab gets the "enable-new-tab" property.
411// Whether to enable new tab button.
412//
413// Connect to the [signal@TabOverview::create-tab] signal to use it.
414func (x *TabOverview) GetPropertyEnableNewTab() bool {
415	var v gobject.Value
416	x.GetProperty("enable-new-tab", &v)
417	return v.GetBoolean()
418}
419
420// SetPropertyEnableSearch sets the "enable-search" property.
421// Whether to enable search in tabs.
422//
423// Search matches tab titles and tooltips, as well as keywords, set via
424// [property@TabPage:keyword]. Use keywords to search in e.g. page URLs in a
425// web browser.
426//
427// During search, tab reordering and drag-n-drop are disabled.
428//
429// Use [property@TabOverview:search-active] to check out if search is
430// currently active.
431func (x *TabOverview) SetPropertyEnableSearch(value bool) {
432	var v gobject.Value
433	v.Init(gobject.TypeBooleanVal)
434	v.SetBoolean(value)
435	x.SetProperty("enable-search", &v)
436}
437
438// GetPropertyEnableSearch gets the "enable-search" property.
439// Whether to enable search in tabs.
440//
441// Search matches tab titles and tooltips, as well as keywords, set via
442// [property@TabPage:keyword]. Use keywords to search in e.g. page URLs in a
443// web browser.
444//
445// During search, tab reordering and drag-n-drop are disabled.
446//
447// Use [property@TabOverview:search-active] to check out if search is
448// currently active.
449func (x *TabOverview) GetPropertyEnableSearch() bool {
450	var v gobject.Value
451	x.GetProperty("enable-search", &v)
452	return v.GetBoolean()
453}
454
455// SetPropertyExtraDragPreload sets the "extra-drag-preload" property.
456// Whether the drop data should be preloaded on hover.
457//
458// See [property@Gtk.DropTarget:preload].
459func (x *TabOverview) SetPropertyExtraDragPreload(value bool) {
460	var v gobject.Value
461	v.Init(gobject.TypeBooleanVal)
462	v.SetBoolean(value)
463	x.SetProperty("extra-drag-preload", &v)
464}
465
466// GetPropertyExtraDragPreload gets the "extra-drag-preload" property.
467// Whether the drop data should be preloaded on hover.
468//
469// See [property@Gtk.DropTarget:preload].
470func (x *TabOverview) GetPropertyExtraDragPreload() bool {
471	var v gobject.Value
472	x.GetProperty("extra-drag-preload", &v)
473	return v.GetBoolean()
474}
475
476// SetPropertyInverted sets the "inverted" property.
477// Whether thumbnails use inverted layout.
478//
479// If set to `TRUE`, thumbnails will have the close or unpin buttons at the
480// beginning and the indicator at the end rather than the other way around.
481func (x *TabOverview) SetPropertyInverted(value bool) {
482	var v gobject.Value
483	v.Init(gobject.TypeBooleanVal)
484	v.SetBoolean(value)
485	x.SetProperty("inverted", &v)
486}
487
488// GetPropertyInverted gets the "inverted" property.
489// Whether thumbnails use inverted layout.
490//
491// If set to `TRUE`, thumbnails will have the close or unpin buttons at the
492// beginning and the indicator at the end rather than the other way around.
493func (x *TabOverview) GetPropertyInverted() bool {
494	var v gobject.Value
495	x.GetProperty("inverted", &v)
496	return v.GetBoolean()
497}
498
499// SetPropertyOpen sets the "open" property.
500// Whether the overview is open.
501func (x *TabOverview) SetPropertyOpen(value bool) {
502	var v gobject.Value
503	v.Init(gobject.TypeBooleanVal)
504	v.SetBoolean(value)
505	x.SetProperty("open", &v)
506}
507
508// GetPropertyOpen gets the "open" property.
509// Whether the overview is open.
510func (x *TabOverview) GetPropertyOpen() bool {
511	var v gobject.Value
512	x.GetProperty("open", &v)
513	return v.GetBoolean()
514}
515
516// GetPropertySearchActive gets the "search-active" property.
517// Whether search is currently active.
518//
519// See [property@TabOverview:enable-search].
520func (x *TabOverview) GetPropertySearchActive() bool {
521	var v gobject.Value
522	x.GetProperty("search-active", &v)
523	return v.GetBoolean()
524}
525
526// SetPropertyShowEndTitleButtons sets the "show-end-title-buttons" property.
527// Whether to show end title buttons in the overview's header bar.
528//
529// See [property@HeaderBar:show-start-title-buttons] for the other side.
530func (x *TabOverview) SetPropertyShowEndTitleButtons(value bool) {
531	var v gobject.Value
532	v.Init(gobject.TypeBooleanVal)
533	v.SetBoolean(value)
534	x.SetProperty("show-end-title-buttons", &v)
535}
536
537// GetPropertyShowEndTitleButtons gets the "show-end-title-buttons" property.
538// Whether to show end title buttons in the overview's header bar.
539//
540// See [property@HeaderBar:show-start-title-buttons] for the other side.
541func (x *TabOverview) GetPropertyShowEndTitleButtons() bool {
542	var v gobject.Value
543	x.GetProperty("show-end-title-buttons", &v)
544	return v.GetBoolean()
545}
546
547// SetPropertyShowStartTitleButtons sets the "show-start-title-buttons" property.
548// Whether to show start title buttons in the overview's header bar.
549//
550// See [property@HeaderBar:show-end-title-buttons] for the other side.
551func (x *TabOverview) SetPropertyShowStartTitleButtons(value bool) {
552	var v gobject.Value
553	v.Init(gobject.TypeBooleanVal)
554	v.SetBoolean(value)
555	x.SetProperty("show-start-title-buttons", &v)
556}
557
558// GetPropertyShowStartTitleButtons gets the "show-start-title-buttons" property.
559// Whether to show start title buttons in the overview's header bar.
560//
561// See [property@HeaderBar:show-end-title-buttons] for the other side.
562func (x *TabOverview) GetPropertyShowStartTitleButtons() bool {
563	var v gobject.Value
564	x.GetProperty("show-start-title-buttons", &v)
565	return v.GetBoolean()
566}
567
568// Emitted when a tab needs to be created.
569//
570// This can happen after the new tab button has been pressed, see
571// [property@TabOverview:enable-new-tab].
572//
573// The signal handler is expected to create a new page in the corresponding
574// [class@TabView] and return it.
575func (x *TabOverview) ConnectCreateTab(cb *func(TabOverview) TabPage) uint {
576	cbPtr := uintptr(unsafe.Pointer(cb))
577	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
578		handlerID := gobject.SignalConnect(x.GoPointer(), "create-tab", cbRefPtr)
579		glib.SaveHandlerMapping(handlerID, cbPtr)
580		return handlerID
581	}
582
583	fcb := func(clsPtr uintptr) uintptr {
584		fa := TabOverview{}
585		fa.Ptr = clsPtr
586		cbFn := *cb
587
588		CreateTabCls := cbFn(fa)
589		return CreateTabCls.Ptr
590
591	}
592	cbRefPtr := purego.NewCallback(fcb)
593	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
594	handlerID := gobject.SignalConnect(x.GoPointer(), "create-tab", cbRefPtr)
595	glib.SaveHandlerMapping(handlerID, cbPtr)
596	return handlerID
597}
598
599// This signal is emitted when content is dropped onto a tab.
600//
601// The content must be of one of the types set up via
602// [method@TabOverview.setup_extra_drop_target].
603//
604// See [signal@Gtk.DropTarget::drop].
605func (x *TabOverview) ConnectExtraDragDrop(cb *func(TabOverview, uintptr, uintptr) bool) uint {
606	cbPtr := uintptr(unsafe.Pointer(cb))
607	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
608		handlerID := gobject.SignalConnect(x.GoPointer(), "extra-drag-drop", cbRefPtr)
609		glib.SaveHandlerMapping(handlerID, cbPtr)
610		return handlerID
611	}
612
613	fcb := func(clsPtr uintptr, PageVarp uintptr, ValueVarp uintptr) bool {
614		fa := TabOverview{}
615		fa.Ptr = clsPtr
616		cbFn := *cb
617
618		return cbFn(fa, PageVarp, ValueVarp)
619
620	}
621	cbRefPtr := purego.NewCallback(fcb)
622	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
623	handlerID := gobject.SignalConnect(x.GoPointer(), "extra-drag-drop", cbRefPtr)
624	glib.SaveHandlerMapping(handlerID, cbPtr)
625	return handlerID
626}
627
628// This signal is emitted when the dropped content is preloaded.
629//
630// In order for data to be preloaded, [property@TabOverview:extra-drag-preload]
631// must be set to `TRUE`.
632//
633// The content must be of one of the types set up via
634// [method@TabOverview.setup_extra_drop_target].
635//
636// See [property@Gtk.DropTarget:value].
637func (x *TabOverview) ConnectExtraDragValue(cb *func(TabOverview, uintptr, uintptr) gdk.DragAction) uint {
638	cbPtr := uintptr(unsafe.Pointer(cb))
639	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
640		handlerID := gobject.SignalConnect(x.GoPointer(), "extra-drag-value", cbRefPtr)
641		glib.SaveHandlerMapping(handlerID, cbPtr)
642		return handlerID
643	}
644
645	fcb := func(clsPtr uintptr, PageVarp uintptr, ValueVarp uintptr) gdk.DragAction {
646		fa := TabOverview{}
647		fa.Ptr = clsPtr
648		cbFn := *cb
649
650		return cbFn(fa, PageVarp, ValueVarp)
651
652	}
653	cbRefPtr := purego.NewCallback(fcb)
654	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
655	handlerID := gobject.SignalConnect(x.GoPointer(), "extra-drag-value", cbRefPtr)
656	glib.SaveHandlerMapping(handlerID, cbPtr)
657	return handlerID
658}
659
660// Requests the user's screen reader to announce the given message.
661//
662// This kind of notification is useful for messages that
663// either have only a visual representation or that are not
664// exposed visually at all, e.g. a notification about a
665// successful operation.
666//
667// Also, by using this API, you can ensure that the message
668// does not interrupts the user's current screen reader output.
669func (x *TabOverview) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
670
671	gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
672
673}
674
675// Retrieves the accessible parent for an accessible object.
676//
677// This function returns `NULL` for top level widgets.
678func (x *TabOverview) GetAccessibleParent() *gtk.AccessibleBase {
679	var cls *gtk.AccessibleBase
680
681	cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
682
683	if cret == 0 {
684		return nil
685	}
686	cls = &gtk.AccessibleBase{}
687	cls.Ptr = cret
688	return cls
689}
690
691// Retrieves the accessible role of an accessible object.
692func (x *TabOverview) GetAccessibleRole() gtk.AccessibleRole {
693
694	cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
695	return cret
696}
697
698// Retrieves the implementation for the given accessible object.
699func (x *TabOverview) GetAtContext() *gtk.ATContext {
700	var cls *gtk.ATContext
701
702	cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
703
704	if cret == 0 {
705		return nil
706	}
707	cls = &gtk.ATContext{}
708	cls.Ptr = cret
709	return cls
710}
711
712// Queries the coordinates and dimensions of this accessible
713//
714// This functionality can be overridden by `GtkAccessible`
715// implementations, e.g. to get the bounds from an ignored
716// child widget.
717func (x *TabOverview) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
718
719	cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
720	return cret
721}
722
723// Retrieves the first accessible child of an accessible object.
724func (x *TabOverview) GetFirstAccessibleChild() *gtk.AccessibleBase {
725	var cls *gtk.AccessibleBase
726
727	cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
728
729	if cret == 0 {
730		return nil
731	}
732	cls = &gtk.AccessibleBase{}
733	cls.Ptr = cret
734	return cls
735}
736
737// Retrieves the next accessible sibling of an accessible object
738func (x *TabOverview) GetNextAccessibleSibling() *gtk.AccessibleBase {
739	var cls *gtk.AccessibleBase
740
741	cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
742
743	if cret == 0 {
744		return nil
745	}
746	cls = &gtk.AccessibleBase{}
747	cls.Ptr = cret
748	return cls
749}
750
751// Queries a platform state, such as focus.
752//
753// This functionality can be overridden by `GtkAccessible`
754// implementations, e.g. to get platform state from an ignored
755// child widget, as is the case for `GtkText` wrappers.
756func (x *TabOverview) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
757
758	cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
759	return cret
760}
761
762// Resets the accessible property to its default value.
763func (x *TabOverview) ResetProperty(PropertyVar gtk.AccessibleProperty) {
764
765	gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
766
767}
768
769// Resets the accessible relation to its default value.
770func (x *TabOverview) ResetRelation(RelationVar gtk.AccessibleRelation) {
771
772	gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
773
774}
775
776// Resets the accessible state to its default value.
777func (x *TabOverview) ResetState(StateVar gtk.AccessibleState) {
778
779	gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
780
781}
782
783// Sets the parent and sibling of an accessible object.
784//
785// This function is meant to be used by accessible implementations that are
786// not part of the widget hierarchy, and but act as a logical bridge between
787// widgets. For instance, if a widget creates an object that holds metadata
788// for each child, and you want that object to implement the `GtkAccessible`
789// interface, you will use this function to ensure that the parent of each
790// child widget is the metadata object, and the parent of each metadata
791// object is the container widget.
792func (x *TabOverview) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
793
794	gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
795
796}
797
798// Updates the next accessible sibling.
799//
800// That might be useful when a new child of a custom accessible
801// is created, and it needs to be linked to a previous child.
802func (x *TabOverview) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
803
804	gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
805
806}
807
808// Informs ATs that the platform state has changed.
809//
810// This function should be used by `GtkAccessible` implementations that
811// have a platform state but are not widgets. Widgets handle platform
812// states automatically.
813func (x *TabOverview) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
814
815	gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
816
817}
818
819// Updates a list of accessible properties.
820//
821// See the [enum@Gtk.AccessibleProperty] documentation for the
822// value types of accessible properties.
823//
824// This function should be called by `GtkWidget` types whenever
825// an accessible property change must be communicated to assistive
826// technologies.
827//
828// Example:
829// ```c
830// value = gtk_adjustment_get_value (adjustment);
831// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
832//
833//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
834//	-1);
835//
836// ```
837func (x *TabOverview) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
838
839	gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
840
841}
842
843// Updates an array of accessible properties.
844//
845// This function should be called by `GtkWidget` types whenever an accessible
846// property change must be communicated to assistive technologies.
847//
848// This function is meant to be used by language bindings.
849func (x *TabOverview) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
850
851	gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
852
853}
854
855// Updates a list of accessible relations.
856//
857// This function should be called by `GtkWidget` types whenever an accessible
858// relation change must be communicated to assistive technologies.
859//
860// If the [enum@Gtk.AccessibleRelation] requires a list of references,
861// you should pass each reference individually, followed by `NULL`, e.g.
862//
863// ```c
864// gtk_accessible_update_relation (accessible,
865//
866//	GTK_ACCESSIBLE_RELATION_CONTROLS,
867//	  ref1, NULL,
868//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
869//	  ref1, ref2, ref3, NULL,
870//	-1);
871//
872// ```
873func (x *TabOverview) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
874
875	gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
876
877}
878
879// Updates an array of accessible relations.
880//
881// This function should be called by `GtkWidget` types whenever an accessible
882// relation change must be communicated to assistive technologies.
883//
884// This function is meant to be used by language bindings.
885func (x *TabOverview) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
886
887	gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
888
889}
890
891// Updates a list of accessible states.
892//
893// See the [enum@Gtk.AccessibleState] documentation for the
894// value types of accessible states.
895//
896// This function should be called by `GtkWidget` types whenever
897// an accessible state change must be communicated to assistive
898// technologies.
899//
900// Example:
901//
902// ```c
903// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
904// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
905//
906//	GTK_ACCESSIBLE_STATE_CHECKED, value,
907//	-1);
908//
909// ```
910func (x *TabOverview) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
911
912	gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
913
914}
915
916// Updates an array of accessible states.
917//
918// This function should be called by `GtkWidget` types whenever an accessible
919// state change must be communicated to assistive technologies.
920//
921// This function is meant to be used by language bindings.
922func (x *TabOverview) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
923
924	gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
925
926}
927
928// Gets the ID of the @buildable object.
929//
930// `GtkBuilder` sets the name based on the ID attribute
931// of the `<object>` tag used to construct the @buildable.
932func (x *TabOverview) GetBuildableId() string {
933
934	cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
935	return cret
936}
937
938func init() {
939	core.SetPackageName("ADW", "libadwaita-1")
940	core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
941	var libs []uintptr
942	for _, libPath := range core.GetPaths("ADW") {
943		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
944		if err != nil {
945			panic(err)
946		}
947		libs = append(libs, lib)
948	}
949
950	core.PuregoSafeRegister(&xTabOverviewGLibType, libs, "adw_tab_overview_get_type")
951
952	core.PuregoSafeRegister(&xNewTabOverview, libs, "adw_tab_overview_new")
953
954	core.PuregoSafeRegister(&xTabOverviewGetChild, libs, "adw_tab_overview_get_child")
955	core.PuregoSafeRegister(&xTabOverviewGetEnableNewTab, libs, "adw_tab_overview_get_enable_new_tab")
956	core.PuregoSafeRegister(&xTabOverviewGetEnableSearch, libs, "adw_tab_overview_get_enable_search")
957	core.PuregoSafeRegister(&xTabOverviewGetExtraDragPreferredAction, libs, "adw_tab_overview_get_extra_drag_preferred_action")
958	core.PuregoSafeRegister(&xTabOverviewGetExtraDragPreload, libs, "adw_tab_overview_get_extra_drag_preload")
959	core.PuregoSafeRegister(&xTabOverviewGetInverted, libs, "adw_tab_overview_get_inverted")
960	core.PuregoSafeRegister(&xTabOverviewGetOpen, libs, "adw_tab_overview_get_open")
961	core.PuregoSafeRegister(&xTabOverviewGetSearchActive, libs, "adw_tab_overview_get_search_active")
962	core.PuregoSafeRegister(&xTabOverviewGetSecondaryMenu, libs, "adw_tab_overview_get_secondary_menu")
963	core.PuregoSafeRegister(&xTabOverviewGetShowEndTitleButtons, libs, "adw_tab_overview_get_show_end_title_buttons")
964	core.PuregoSafeRegister(&xTabOverviewGetShowStartTitleButtons, libs, "adw_tab_overview_get_show_start_title_buttons")
965	core.PuregoSafeRegister(&xTabOverviewGetView, libs, "adw_tab_overview_get_view")
966	core.PuregoSafeRegister(&xTabOverviewSetChild, libs, "adw_tab_overview_set_child")
967	core.PuregoSafeRegister(&xTabOverviewSetEnableNewTab, libs, "adw_tab_overview_set_enable_new_tab")
968	core.PuregoSafeRegister(&xTabOverviewSetEnableSearch, libs, "adw_tab_overview_set_enable_search")
969	core.PuregoSafeRegister(&xTabOverviewSetExtraDragPreload, libs, "adw_tab_overview_set_extra_drag_preload")
970	core.PuregoSafeRegister(&xTabOverviewSetInverted, libs, "adw_tab_overview_set_inverted")
971	core.PuregoSafeRegister(&xTabOverviewSetOpen, libs, "adw_tab_overview_set_open")
972	core.PuregoSafeRegister(&xTabOverviewSetSecondaryMenu, libs, "adw_tab_overview_set_secondary_menu")
973	core.PuregoSafeRegister(&xTabOverviewSetShowEndTitleButtons, libs, "adw_tab_overview_set_show_end_title_buttons")
974	core.PuregoSafeRegister(&xTabOverviewSetShowStartTitleButtons, libs, "adw_tab_overview_set_show_start_title_buttons")
975	core.PuregoSafeRegister(&xTabOverviewSetView, libs, "adw_tab_overview_set_view")
976	core.PuregoSafeRegister(&xTabOverviewSetupExtraDropTarget, libs, "adw_tab_overview_setup_extra_drop_target")
977
978}

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