v0.2.2 9100209

adw-flap.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/gobject"
13	"github.com/bnema/puregotk/v4/gobject/types"
14	"github.com/bnema/puregotk/v4/gtk"
15)
16
17type FlapClass struct {
18	_ structs.HostLayout
19
20	ParentClass gtk.WidgetClass
21}
22
23func (x *FlapClass) GoPointer() uintptr {
24	return uintptr(unsafe.Pointer(x))
25}
26
27// Describes the possible folding behavior of a [class@Flap] widget.
28type FlapFoldPolicy int
29
30var xFlapFoldPolicyGLibType func() types.GType
31
32func FlapFoldPolicyGLibType() types.GType {
33	return xFlapFoldPolicyGLibType()
34}
35
36const (
37
38	// Disable folding, the flap cannot reach narrow
39	//   sizes.
40	FlapFoldPolicyNeverValue FlapFoldPolicy = 0
41	// Keep the flap always folded.
42	FlapFoldPolicyAlwaysValue FlapFoldPolicy = 1
43	// Fold and unfold the flap based on available
44	//   space.
45	FlapFoldPolicyAutoValue FlapFoldPolicy = 2
46)
47
48// Describes transitions types of a [class@Flap] widget.
49//
50// It determines the type of animation when transitioning between children in a
51// [class@Flap] widget, as well as which areas can be swiped via
52// [property@Flap:swipe-to-open] and [property@Flap:swipe-to-close].
53type FlapTransitionType int
54
55var xFlapTransitionTypeGLibType func() types.GType
56
57func FlapTransitionTypeGLibType() types.GType {
58	return xFlapTransitionTypeGLibType()
59}
60
61const (
62
63	// The flap slides over the content, which is
64	//   dimmed. When folded, only the flap can be swiped.
65	FlapTransitionTypeOverValue FlapTransitionType = 0
66	// The content slides over the flap. Only the
67	//   content can be swiped.
68	FlapTransitionTypeUnderValue FlapTransitionType = 1
69	// The flap slides offscreen when hidden,
70	//   neither the flap nor content overlap each other. Both widgets can be
71	//   swiped.
72	FlapTransitionTypeSlideValue FlapTransitionType = 2
73)
74
75// An adaptive container acting like a box or an overlay.
76//
77// <picture>
78//
79//	<source srcset="flap-wide-dark.png" media="(prefers-color-scheme: dark)">
80//	<img src="flap-wide.png" alt="flap-wide">
81//
82// </picture>
83// <picture>
84//
85//	<source srcset="flap-narrow-dark.png" media="(prefers-color-scheme: dark)">
86//	<img src="flap-narrow.png" alt="flap-narrow">
87//
88// </picture>
89//
90// The `AdwFlap` widget can display its children like a [class@Gtk.Box] does or
91// like a [class@Gtk.Overlay] does, according to the
92// [property@Flap:fold-policy] value.
93//
94// `AdwFlap` has at most three children: [property@Flap:content],
95// [property@Flap:flap] and [property@Flap:separator]. Content is the primary
96// child, flap is displayed next to it when unfolded, or overlays it when
97// folded. Flap can be shown or hidden by changing the
98// [property@Flap:reveal-flap] value, as well as via swipe gestures if
99// [property@Flap:swipe-to-open] and/or [property@Flap:swipe-to-close] are set
100// to `TRUE`.
101//
102// Optionally, a separator can be provided, which would be displayed between
103// the content and the flap when there's no shadow to separate them, depending
104// on the transition type.
105//
106// [property@Flap:flap] is transparent by default; add the
107// [`.background`](style-classes.html#background) style class to it if this is
108// unwanted.
109//
110// If [property@Flap:modal] is set to `TRUE`, content becomes completely
111// inaccessible when the flap is revealed while folded.
112//
113// The position of the flap and separator children relative to the content is
114// determined by orientation, as well as the [property@Flap:flap-position]
115// value.
116//
117// Folding the flap will automatically hide the flap widget, and unfolding it
118// will automatically reveal it. If this behavior is not desired, the
119// [property@Flap:locked] property can be used to override it.
120//
121// Common use cases include sidebars, header bars that need to be able to
122// overlap the window content (for example, in fullscreen mode) and bottom
123// sheets.
124//
125// ## AdwFlap as GtkBuildable
126//
127// The `AdwFlap` implementation of the [iface@Gtk.Buildable] interface supports
128// setting the flap child by specifying “flap” as the “type” attribute of a
129// `<child>` element, and separator by specifying “separator”. Specifying
130// “content” child type or omitting it results in setting the content child.
131//
132// ## CSS nodes
133//
134// `AdwFlap` has a single CSS node with name `flap`. The node will get the style
135// classes `.folded` when it is folded, and `.unfolded` when it's not.
136type Flap struct {
137	gtk.Widget
138}
139
140var xFlapGLibType func() types.GType
141
142func FlapGLibType() types.GType {
143	return xFlapGLibType()
144}
145
146func FlapNewFromInternalPtr(ptr uintptr) *Flap {
147	cls := &Flap{}
148	cls.Ptr = ptr
149	return cls
150}
151
152var xNewFlap func() uintptr
153
154// Creates a new `AdwFlap`.
155func NewFlap() *Flap {
156	var cls *Flap
157
158	cret := xNewFlap()
159
160	if cret == 0 {
161		return nil
162	}
163	gobject.IncreaseRef(cret)
164	cls = &Flap{}
165	cls.Ptr = cret
166	return cls
167}
168
169var xFlapGetContent func(uintptr) uintptr
170
171// Gets the content widget for @self.
172func (x *Flap) GetContent() *gtk.Widget {
173	var cls *gtk.Widget
174
175	cret := xFlapGetContent(x.GoPointer())
176
177	if cret == 0 {
178		return nil
179	}
180	gobject.IncreaseRef(cret)
181	cls = &gtk.Widget{}
182	cls.Ptr = cret
183	return cls
184}
185
186var xFlapGetFlap func(uintptr) uintptr
187
188// Gets the flap widget for @self.
189func (x *Flap) GetFlap() *gtk.Widget {
190	var cls *gtk.Widget
191
192	cret := xFlapGetFlap(x.GoPointer())
193
194	if cret == 0 {
195		return nil
196	}
197	gobject.IncreaseRef(cret)
198	cls = &gtk.Widget{}
199	cls.Ptr = cret
200	return cls
201}
202
203var xFlapGetFlapPosition func(uintptr) gtk.PackType
204
205// Gets the flap position for @self.
206func (x *Flap) GetFlapPosition() gtk.PackType {
207
208	cret := xFlapGetFlapPosition(x.GoPointer())
209	return cret
210}
211
212var xFlapGetFoldDuration func(uintptr) uint
213
214// Gets the fold transition animation duration for @self, in milliseconds.
215func (x *Flap) GetFoldDuration() uint {
216
217	cret := xFlapGetFoldDuration(x.GoPointer())
218	return cret
219}
220
221var xFlapGetFoldPolicy func(uintptr) FlapFoldPolicy
222
223// Gets the fold policy for @self.
224func (x *Flap) GetFoldPolicy() FlapFoldPolicy {
225
226	cret := xFlapGetFoldPolicy(x.GoPointer())
227	return cret
228}
229
230var xFlapGetFoldThresholdPolicy func(uintptr) FoldThresholdPolicy
231
232// Gets the fold threshold policy for @self.
233func (x *Flap) GetFoldThresholdPolicy() FoldThresholdPolicy {
234
235	cret := xFlapGetFoldThresholdPolicy(x.GoPointer())
236	return cret
237}
238
239var xFlapGetFolded func(uintptr) bool
240
241// Gets whether @self is currently folded.
242//
243// See [property@Flap:fold-policy].
244func (x *Flap) GetFolded() bool {
245
246	cret := xFlapGetFolded(x.GoPointer())
247	return cret
248}
249
250var xFlapGetLocked func(uintptr) bool
251
252// Gets whether @self is locked.
253func (x *Flap) GetLocked() bool {
254
255	cret := xFlapGetLocked(x.GoPointer())
256	return cret
257}
258
259var xFlapGetModal func(uintptr) bool
260
261// Gets whether @self is modal.
262func (x *Flap) GetModal() bool {
263
264	cret := xFlapGetModal(x.GoPointer())
265	return cret
266}
267
268var xFlapGetRevealFlap func(uintptr) bool
269
270// Gets whether the flap widget is revealed for @self.
271func (x *Flap) GetRevealFlap() bool {
272
273	cret := xFlapGetRevealFlap(x.GoPointer())
274	return cret
275}
276
277var xFlapGetRevealParams func(uintptr) *SpringParams
278
279// Gets the reveal animation spring parameters for @self.
280func (x *Flap) GetRevealParams() *SpringParams {
281
282	cret := xFlapGetRevealParams(x.GoPointer())
283	return cret
284}
285
286var xFlapGetRevealProgress func(uintptr) float64
287
288// Gets the current reveal progress for @self.
289//
290// 0 means fully hidden, 1 means fully revealed.
291//
292// See [property@Flap:reveal-flap].
293func (x *Flap) GetRevealProgress() float64 {
294
295	cret := xFlapGetRevealProgress(x.GoPointer())
296	return cret
297}
298
299var xFlapGetSeparator func(uintptr) uintptr
300
301// Gets the separator widget for @self.
302func (x *Flap) GetSeparator() *gtk.Widget {
303	var cls *gtk.Widget
304
305	cret := xFlapGetSeparator(x.GoPointer())
306
307	if cret == 0 {
308		return nil
309	}
310	gobject.IncreaseRef(cret)
311	cls = &gtk.Widget{}
312	cls.Ptr = cret
313	return cls
314}
315
316var xFlapGetSwipeToClose func(uintptr) bool
317
318// Gets whether @self can be closed with a swipe gesture.
319func (x *Flap) GetSwipeToClose() bool {
320
321	cret := xFlapGetSwipeToClose(x.GoPointer())
322	return cret
323}
324
325var xFlapGetSwipeToOpen func(uintptr) bool
326
327// Gets whether @self can be opened with a swipe gesture.
328func (x *Flap) GetSwipeToOpen() bool {
329
330	cret := xFlapGetSwipeToOpen(x.GoPointer())
331	return cret
332}
333
334var xFlapGetTransitionType func(uintptr) FlapTransitionType
335
336// Gets the type of animation used for reveal and fold transitions in @self.
337func (x *Flap) GetTransitionType() FlapTransitionType {
338
339	cret := xFlapGetTransitionType(x.GoPointer())
340	return cret
341}
342
343var xFlapSetContent func(uintptr, uintptr)
344
345// Sets the content widget for @self.
346//
347// It's always displayed when unfolded, and partially visible when folded.
348func (x *Flap) SetContent(ContentVar *gtk.Widget) {
349
350	xFlapSetContent(x.GoPointer(), ContentVar.GoPointer())
351
352}
353
354var xFlapSetFlap func(uintptr, uintptr)
355
356// Sets the flap widget for @self.
357//
358// It's only visible when [property@Flap:reveal-progress] is greater than 0.
359func (x *Flap) SetFlap(FlapVar *gtk.Widget) {
360
361	xFlapSetFlap(x.GoPointer(), FlapVar.GoPointer())
362
363}
364
365var xFlapSetFlapPosition func(uintptr, gtk.PackType)
366
367// Sets the flap position for @self.
368//
369// If it's set to `GTK_PACK_START`, the flap is displayed before the content,
370// if `GTK_PACK_END`, it's displayed after the content.
371func (x *Flap) SetFlapPosition(PositionVar gtk.PackType) {
372
373	xFlapSetFlapPosition(x.GoPointer(), PositionVar)
374
375}
376
377var xFlapSetFoldDuration func(uintptr, uint)
378
379// Sets the fold transition animation duration for @self, in milliseconds.
380func (x *Flap) SetFoldDuration(DurationVar uint) {
381
382	xFlapSetFoldDuration(x.GoPointer(), DurationVar)
383
384}
385
386var xFlapSetFoldPolicy func(uintptr, FlapFoldPolicy)
387
388// Sets the fold policy for @self.
389func (x *Flap) SetFoldPolicy(PolicyVar FlapFoldPolicy) {
390
391	xFlapSetFoldPolicy(x.GoPointer(), PolicyVar)
392
393}
394
395var xFlapSetFoldThresholdPolicy func(uintptr, FoldThresholdPolicy)
396
397// Sets the fold threshold policy for @self.
398//
399// If set to `ADW_FOLD_THRESHOLD_POLICY_MINIMUM`, flap will only fold when the
400// children cannot fit anymore. With `ADW_FOLD_THRESHOLD_POLICY_NATURAL`, it
401// will fold as soon as children don't get their natural size.
402//
403// This can be useful if you have a long ellipsizing label and want to let it
404// ellipsize instead of immediately folding.
405func (x *Flap) SetFoldThresholdPolicy(PolicyVar FoldThresholdPolicy) {
406
407	xFlapSetFoldThresholdPolicy(x.GoPointer(), PolicyVar)
408
409}
410
411var xFlapSetLocked func(uintptr, bool)
412
413// Sets whether @self is locked.
414//
415// If `FALSE`, folding when the flap is revealed automatically closes it, and
416// unfolding it when the flap is not revealed opens it. If `TRUE`,
417// [property@Flap:reveal-flap] value never changes on its own.
418func (x *Flap) SetLocked(LockedVar bool) {
419
420	xFlapSetLocked(x.GoPointer(), LockedVar)
421
422}
423
424var xFlapSetModal func(uintptr, bool)
425
426// Sets whether @self is modal.
427//
428// If `TRUE`, clicking the content widget while flap is revealed, as well as
429// pressing the <kbd>Esc</kbd> key, will close the flap. If `FALSE`, clicks are
430// passed through to the content widget.
431func (x *Flap) SetModal(ModalVar bool) {
432
433	xFlapSetModal(x.GoPointer(), ModalVar)
434
435}
436
437var xFlapSetRevealFlap func(uintptr, bool)
438
439// Sets whether the flap widget is revealed for @self.
440func (x *Flap) SetRevealFlap(RevealFlapVar bool) {
441
442	xFlapSetRevealFlap(x.GoPointer(), RevealFlapVar)
443
444}
445
446var xFlapSetRevealParams func(uintptr, *SpringParams)
447
448// Sets the reveal animation spring parameters for @self.
449//
450// The default value is equivalent to:
451//
452// ```c
453// adw_spring_params_new (1, 0.5, 500)
454// ```
455func (x *Flap) SetRevealParams(ParamsVar *SpringParams) {
456
457	xFlapSetRevealParams(x.GoPointer(), ParamsVar)
458
459}
460
461var xFlapSetSeparator func(uintptr, uintptr)
462
463// Sets the separator widget for @self.
464//
465// It's displayed between content and flap when there's no shadow to display.
466// When exactly it's visible depends on the [property@Flap:transition-type]
467// value.
468func (x *Flap) SetSeparator(SeparatorVar *gtk.Widget) {
469
470	xFlapSetSeparator(x.GoPointer(), SeparatorVar.GoPointer())
471
472}
473
474var xFlapSetSwipeToClose func(uintptr, bool)
475
476// Sets whether @self can be closed with a swipe gesture.
477//
478// The area that can be swiped depends on the [property@Flap:transition-type]
479// value.
480func (x *Flap) SetSwipeToClose(SwipeToCloseVar bool) {
481
482	xFlapSetSwipeToClose(x.GoPointer(), SwipeToCloseVar)
483
484}
485
486var xFlapSetSwipeToOpen func(uintptr, bool)
487
488// Sets whether @self can be opened with a swipe gesture.
489//
490// The area that can be swiped depends on the [property@Flap:transition-type]
491// value.
492func (x *Flap) SetSwipeToOpen(SwipeToOpenVar bool) {
493
494	xFlapSetSwipeToOpen(x.GoPointer(), SwipeToOpenVar)
495
496}
497
498var xFlapSetTransitionType func(uintptr, FlapTransitionType)
499
500// Sets the type of animation used for reveal and fold transitions in @self.
501//
502// [property@Flap:flap] is transparent by default, which means the content will
503// be seen through it with `ADW_FLAP_TRANSITION_TYPE_OVER` transitions; add the
504// [`.background`](style-classes.html#background) style class to it if this is
505// unwanted.
506func (x *Flap) SetTransitionType(TransitionTypeVar FlapTransitionType) {
507
508	xFlapSetTransitionType(x.GoPointer(), TransitionTypeVar)
509
510}
511
512func (c *Flap) GoPointer() uintptr {
513	if c == nil {
514		return 0
515	}
516	return c.Ptr
517}
518
519func (c *Flap) SetGoPointer(ptr uintptr) {
520	c.Ptr = ptr
521}
522
523// SetPropertyFoldDuration sets the "fold-duration" property.
524// The fold transition animation duration, in milliseconds.
525func (x *Flap) SetPropertyFoldDuration(value uint) {
526	var v gobject.Value
527	v.Init(gobject.TypeUintVal)
528	v.SetUint(value)
529	x.SetProperty("fold-duration", &v)
530}
531
532// GetPropertyFoldDuration gets the "fold-duration" property.
533// The fold transition animation duration, in milliseconds.
534func (x *Flap) GetPropertyFoldDuration() uint {
535	var v gobject.Value
536	x.GetProperty("fold-duration", &v)
537	return v.GetUint()
538}
539
540// GetPropertyFolded gets the "folded" property.
541// Whether the flap is currently folded.
542//
543// See [property@Flap:fold-policy].
544func (x *Flap) GetPropertyFolded() bool {
545	var v gobject.Value
546	x.GetProperty("folded", &v)
547	return v.GetBoolean()
548}
549
550// SetPropertyLocked sets the "locked" property.
551// Whether the flap is locked.
552//
553// If `FALSE`, folding when the flap is revealed automatically closes it, and
554// unfolding it when the flap is not revealed opens it. If `TRUE`,
555// [property@Flap:reveal-flap] value never changes on its own.
556func (x *Flap) SetPropertyLocked(value bool) {
557	var v gobject.Value
558	v.Init(gobject.TypeBooleanVal)
559	v.SetBoolean(value)
560	x.SetProperty("locked", &v)
561}
562
563// GetPropertyLocked gets the "locked" property.
564// Whether the flap is locked.
565//
566// If `FALSE`, folding when the flap is revealed automatically closes it, and
567// unfolding it when the flap is not revealed opens it. If `TRUE`,
568// [property@Flap:reveal-flap] value never changes on its own.
569func (x *Flap) GetPropertyLocked() bool {
570	var v gobject.Value
571	x.GetProperty("locked", &v)
572	return v.GetBoolean()
573}
574
575// SetPropertyModal sets the "modal" property.
576// Whether the flap is modal.
577//
578// If `TRUE`, clicking the content widget while flap is revealed, as well as
579// pressing the <kbd>Esc</kbd> key, will close the flap. If `FALSE`, clicks
580// are passed through to the content widget.
581func (x *Flap) SetPropertyModal(value bool) {
582	var v gobject.Value
583	v.Init(gobject.TypeBooleanVal)
584	v.SetBoolean(value)
585	x.SetProperty("modal", &v)
586}
587
588// GetPropertyModal gets the "modal" property.
589// Whether the flap is modal.
590//
591// If `TRUE`, clicking the content widget while flap is revealed, as well as
592// pressing the <kbd>Esc</kbd> key, will close the flap. If `FALSE`, clicks
593// are passed through to the content widget.
594func (x *Flap) GetPropertyModal() bool {
595	var v gobject.Value
596	x.GetProperty("modal", &v)
597	return v.GetBoolean()
598}
599
600// SetPropertyRevealFlap sets the "reveal-flap" property.
601// Whether the flap widget is revealed.
602func (x *Flap) SetPropertyRevealFlap(value bool) {
603	var v gobject.Value
604	v.Init(gobject.TypeBooleanVal)
605	v.SetBoolean(value)
606	x.SetProperty("reveal-flap", &v)
607}
608
609// GetPropertyRevealFlap gets the "reveal-flap" property.
610// Whether the flap widget is revealed.
611func (x *Flap) GetPropertyRevealFlap() bool {
612	var v gobject.Value
613	x.GetProperty("reveal-flap", &v)
614	return v.GetBoolean()
615}
616
617// SetPropertyRevealParams sets the "reveal-params" property.
618// The reveal animation spring parameters.
619//
620// The default value is equivalent to:
621//
622// ```c
623// adw_spring_params_new (1, 0.5, 500)
624// ```
625func (x *Flap) SetPropertyRevealParams(value uintptr) {
626	var v gobject.Value
627	v.Init(gobject.TypePointerVal)
628	v.SetPointer(value)
629	x.SetProperty("reveal-params", &v)
630}
631
632// GetPropertyRevealParams gets the "reveal-params" property.
633// The reveal animation spring parameters.
634//
635// The default value is equivalent to:
636//
637// ```c
638// adw_spring_params_new (1, 0.5, 500)
639// ```
640func (x *Flap) GetPropertyRevealParams() uintptr {
641	var v gobject.Value
642	x.GetProperty("reveal-params", &v)
643	return v.GetPointer()
644}
645
646// GetPropertyRevealProgress gets the "reveal-progress" property.
647// The current reveal transition progress.
648//
649// 0 means fully hidden, 1 means fully revealed.
650//
651// See [property@Flap:reveal-flap].
652func (x *Flap) GetPropertyRevealProgress() float64 {
653	var v gobject.Value
654	x.GetProperty("reveal-progress", &v)
655	return v.GetDouble()
656}
657
658// SetPropertySwipeToClose sets the "swipe-to-close" property.
659// Whether the flap can be closed with a swipe gesture.
660//
661// The area that can be swiped depends on the [property@Flap:transition-type]
662// value.
663func (x *Flap) SetPropertySwipeToClose(value bool) {
664	var v gobject.Value
665	v.Init(gobject.TypeBooleanVal)
666	v.SetBoolean(value)
667	x.SetProperty("swipe-to-close", &v)
668}
669
670// GetPropertySwipeToClose gets the "swipe-to-close" property.
671// Whether the flap can be closed with a swipe gesture.
672//
673// The area that can be swiped depends on the [property@Flap:transition-type]
674// value.
675func (x *Flap) GetPropertySwipeToClose() bool {
676	var v gobject.Value
677	x.GetProperty("swipe-to-close", &v)
678	return v.GetBoolean()
679}
680
681// SetPropertySwipeToOpen sets the "swipe-to-open" property.
682// Whether the flap can be opened with a swipe gesture.
683//
684// The area that can be swiped depends on the [property@Flap:transition-type]
685// value.
686func (x *Flap) SetPropertySwipeToOpen(value bool) {
687	var v gobject.Value
688	v.Init(gobject.TypeBooleanVal)
689	v.SetBoolean(value)
690	x.SetProperty("swipe-to-open", &v)
691}
692
693// GetPropertySwipeToOpen gets the "swipe-to-open" property.
694// Whether the flap can be opened with a swipe gesture.
695//
696// The area that can be swiped depends on the [property@Flap:transition-type]
697// value.
698func (x *Flap) GetPropertySwipeToOpen() bool {
699	var v gobject.Value
700	x.GetProperty("swipe-to-open", &v)
701	return v.GetBoolean()
702}
703
704// Gets the progress @self will snap back to after the gesture is canceled.
705func (x *Flap) GetCancelProgress() float64 {
706
707	cret := XAdwSwipeableGetCancelProgress(x.GoPointer())
708	return cret
709}
710
711// Gets the swipe distance of @self.
712//
713// This corresponds to how many pixels 1 unit represents.
714func (x *Flap) GetDistance() float64 {
715
716	cret := XAdwSwipeableGetDistance(x.GoPointer())
717	return cret
718}
719
720// Gets the current progress of @self.
721func (x *Flap) GetProgress() float64 {
722
723	cret := XAdwSwipeableGetProgress(x.GoPointer())
724	return cret
725}
726
727// Gets the snap points of @self.
728//
729// Each snap point represents a progress value that is considered acceptable to
730// end the swipe on.
731func (x *Flap) GetSnapPoints(NSnapPointsVar *int) uintptr {
732
733	cret := XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)
734	return cret
735}
736
737// Gets the area @self can start a swipe from for the given direction and
738// gesture type.
739//
740// This can be used to restrict swipes to only be possible from a certain area,
741// for example, to only allow edge swipes, or to have a draggable element and
742// ignore swipes elsewhere.
743//
744// If not implemented, the default implementation returns the allocation of
745// @self, allowing swipes from anywhere.
746func (x *Flap) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDragVar bool, RectVar *gdk.Rectangle) {
747
748	XAdwSwipeableGetSwipeArea(x.GoPointer(), NavigationDirectionVar, IsDragVar, RectVar)
749
750}
751
752// Requests the user's screen reader to announce the given message.
753//
754// This kind of notification is useful for messages that
755// either have only a visual representation or that are not
756// exposed visually at all, e.g. a notification about a
757// successful operation.
758//
759// Also, by using this API, you can ensure that the message
760// does not interrupts the user's current screen reader output.
761func (x *Flap) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
762
763	gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
764
765}
766
767// Retrieves the accessible parent for an accessible object.
768//
769// This function returns `NULL` for top level widgets.
770func (x *Flap) GetAccessibleParent() *gtk.AccessibleBase {
771	var cls *gtk.AccessibleBase
772
773	cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
774
775	if cret == 0 {
776		return nil
777	}
778	cls = &gtk.AccessibleBase{}
779	cls.Ptr = cret
780	return cls
781}
782
783// Retrieves the accessible role of an accessible object.
784func (x *Flap) GetAccessibleRole() gtk.AccessibleRole {
785
786	cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
787	return cret
788}
789
790// Retrieves the implementation for the given accessible object.
791func (x *Flap) GetAtContext() *gtk.ATContext {
792	var cls *gtk.ATContext
793
794	cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
795
796	if cret == 0 {
797		return nil
798	}
799	cls = &gtk.ATContext{}
800	cls.Ptr = cret
801	return cls
802}
803
804// Queries the coordinates and dimensions of this accessible
805//
806// This functionality can be overridden by `GtkAccessible`
807// implementations, e.g. to get the bounds from an ignored
808// child widget.
809func (x *Flap) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
810
811	cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
812	return cret
813}
814
815// Retrieves the first accessible child of an accessible object.
816func (x *Flap) GetFirstAccessibleChild() *gtk.AccessibleBase {
817	var cls *gtk.AccessibleBase
818
819	cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
820
821	if cret == 0 {
822		return nil
823	}
824	cls = &gtk.AccessibleBase{}
825	cls.Ptr = cret
826	return cls
827}
828
829// Retrieves the next accessible sibling of an accessible object
830func (x *Flap) GetNextAccessibleSibling() *gtk.AccessibleBase {
831	var cls *gtk.AccessibleBase
832
833	cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
834
835	if cret == 0 {
836		return nil
837	}
838	cls = &gtk.AccessibleBase{}
839	cls.Ptr = cret
840	return cls
841}
842
843// Queries a platform state, such as focus.
844//
845// This functionality can be overridden by `GtkAccessible`
846// implementations, e.g. to get platform state from an ignored
847// child widget, as is the case for `GtkText` wrappers.
848func (x *Flap) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
849
850	cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
851	return cret
852}
853
854// Resets the accessible property to its default value.
855func (x *Flap) ResetProperty(PropertyVar gtk.AccessibleProperty) {
856
857	gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
858
859}
860
861// Resets the accessible relation to its default value.
862func (x *Flap) ResetRelation(RelationVar gtk.AccessibleRelation) {
863
864	gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
865
866}
867
868// Resets the accessible state to its default value.
869func (x *Flap) ResetState(StateVar gtk.AccessibleState) {
870
871	gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
872
873}
874
875// Sets the parent and sibling of an accessible object.
876//
877// This function is meant to be used by accessible implementations that are
878// not part of the widget hierarchy, and but act as a logical bridge between
879// widgets. For instance, if a widget creates an object that holds metadata
880// for each child, and you want that object to implement the `GtkAccessible`
881// interface, you will use this function to ensure that the parent of each
882// child widget is the metadata object, and the parent of each metadata
883// object is the container widget.
884func (x *Flap) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
885
886	gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
887
888}
889
890// Updates the next accessible sibling.
891//
892// That might be useful when a new child of a custom accessible
893// is created, and it needs to be linked to a previous child.
894func (x *Flap) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
895
896	gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
897
898}
899
900// Informs ATs that the platform state has changed.
901//
902// This function should be used by `GtkAccessible` implementations that
903// have a platform state but are not widgets. Widgets handle platform
904// states automatically.
905func (x *Flap) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
906
907	gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
908
909}
910
911// Updates a list of accessible properties.
912//
913// See the [enum@Gtk.AccessibleProperty] documentation for the
914// value types of accessible properties.
915//
916// This function should be called by `GtkWidget` types whenever
917// an accessible property change must be communicated to assistive
918// technologies.
919//
920// Example:
921// ```c
922// value = gtk_adjustment_get_value (adjustment);
923// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
924//
925//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
926//	-1);
927//
928// ```
929func (x *Flap) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
930
931	gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
932
933}
934
935// Updates an array of accessible properties.
936//
937// This function should be called by `GtkWidget` types whenever an accessible
938// property change must be communicated to assistive technologies.
939//
940// This function is meant to be used by language bindings.
941func (x *Flap) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
942
943	gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
944
945}
946
947// Updates a list of accessible relations.
948//
949// This function should be called by `GtkWidget` types whenever an accessible
950// relation change must be communicated to assistive technologies.
951//
952// If the [enum@Gtk.AccessibleRelation] requires a list of references,
953// you should pass each reference individually, followed by `NULL`, e.g.
954//
955// ```c
956// gtk_accessible_update_relation (accessible,
957//
958//	GTK_ACCESSIBLE_RELATION_CONTROLS,
959//	  ref1, NULL,
960//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
961//	  ref1, ref2, ref3, NULL,
962//	-1);
963//
964// ```
965func (x *Flap) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
966
967	gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
968
969}
970
971// Updates an array of accessible relations.
972//
973// This function should be called by `GtkWidget` types whenever an accessible
974// relation change must be communicated to assistive technologies.
975//
976// This function is meant to be used by language bindings.
977func (x *Flap) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
978
979	gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
980
981}
982
983// Updates a list of accessible states.
984//
985// See the [enum@Gtk.AccessibleState] documentation for the
986// value types of accessible states.
987//
988// This function should be called by `GtkWidget` types whenever
989// an accessible state change must be communicated to assistive
990// technologies.
991//
992// Example:
993//
994// ```c
995// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
996// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
997//
998//	GTK_ACCESSIBLE_STATE_CHECKED, value,
999//	-1);
1000//
1001// ```
1002func (x *Flap) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
1003
1004	gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
1005
1006}
1007
1008// Updates an array of accessible states.
1009//
1010// This function should be called by `GtkWidget` types whenever an accessible
1011// state change must be communicated to assistive technologies.
1012//
1013// This function is meant to be used by language bindings.
1014func (x *Flap) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
1015
1016	gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
1017
1018}
1019
1020// Gets the ID of the @buildable object.
1021//
1022// `GtkBuilder` sets the name based on the ID attribute
1023// of the `<object>` tag used to construct the @buildable.
1024func (x *Flap) GetBuildableId() string {
1025
1026	cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
1027	return cret
1028}
1029
1030// Retrieves the orientation of the @orientable.
1031func (x *Flap) GetOrientation() gtk.Orientation {
1032
1033	cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
1034	return cret
1035}
1036
1037// Sets the orientation of the @orientable.
1038func (x *Flap) SetOrientation(OrientationVar gtk.Orientation) {
1039
1040	gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
1041
1042}
1043
1044func init() {
1045	core.SetPackageName("ADW", "libadwaita-1")
1046	core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
1047	var libs []uintptr
1048	for _, libPath := range core.GetPaths("ADW") {
1049		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1050		if err != nil {
1051			panic(err)
1052		}
1053		libs = append(libs, lib)
1054	}
1055
1056	core.PuregoSafeRegister(&xFlapFoldPolicyGLibType, libs, "adw_flap_fold_policy_get_type")
1057
1058	core.PuregoSafeRegister(&xFlapTransitionTypeGLibType, libs, "adw_flap_transition_type_get_type")
1059
1060	core.PuregoSafeRegister(&xFlapGLibType, libs, "adw_flap_get_type")
1061
1062	core.PuregoSafeRegister(&xNewFlap, libs, "adw_flap_new")
1063
1064	core.PuregoSafeRegister(&xFlapGetContent, libs, "adw_flap_get_content")
1065	core.PuregoSafeRegister(&xFlapGetFlap, libs, "adw_flap_get_flap")
1066	core.PuregoSafeRegister(&xFlapGetFlapPosition, libs, "adw_flap_get_flap_position")
1067	core.PuregoSafeRegister(&xFlapGetFoldDuration, libs, "adw_flap_get_fold_duration")
1068	core.PuregoSafeRegister(&xFlapGetFoldPolicy, libs, "adw_flap_get_fold_policy")
1069	core.PuregoSafeRegister(&xFlapGetFoldThresholdPolicy, libs, "adw_flap_get_fold_threshold_policy")
1070	core.PuregoSafeRegister(&xFlapGetFolded, libs, "adw_flap_get_folded")
1071	core.PuregoSafeRegister(&xFlapGetLocked, libs, "adw_flap_get_locked")
1072	core.PuregoSafeRegister(&xFlapGetModal, libs, "adw_flap_get_modal")
1073	core.PuregoSafeRegister(&xFlapGetRevealFlap, libs, "adw_flap_get_reveal_flap")
1074	core.PuregoSafeRegister(&xFlapGetRevealParams, libs, "adw_flap_get_reveal_params")
1075	core.PuregoSafeRegister(&xFlapGetRevealProgress, libs, "adw_flap_get_reveal_progress")
1076	core.PuregoSafeRegister(&xFlapGetSeparator, libs, "adw_flap_get_separator")
1077	core.PuregoSafeRegister(&xFlapGetSwipeToClose, libs, "adw_flap_get_swipe_to_close")
1078	core.PuregoSafeRegister(&xFlapGetSwipeToOpen, libs, "adw_flap_get_swipe_to_open")
1079	core.PuregoSafeRegister(&xFlapGetTransitionType, libs, "adw_flap_get_transition_type")
1080	core.PuregoSafeRegister(&xFlapSetContent, libs, "adw_flap_set_content")
1081	core.PuregoSafeRegister(&xFlapSetFlap, libs, "adw_flap_set_flap")
1082	core.PuregoSafeRegister(&xFlapSetFlapPosition, libs, "adw_flap_set_flap_position")
1083	core.PuregoSafeRegister(&xFlapSetFoldDuration, libs, "adw_flap_set_fold_duration")
1084	core.PuregoSafeRegister(&xFlapSetFoldPolicy, libs, "adw_flap_set_fold_policy")
1085	core.PuregoSafeRegister(&xFlapSetFoldThresholdPolicy, libs, "adw_flap_set_fold_threshold_policy")
1086	core.PuregoSafeRegister(&xFlapSetLocked, libs, "adw_flap_set_locked")
1087	core.PuregoSafeRegister(&xFlapSetModal, libs, "adw_flap_set_modal")
1088	core.PuregoSafeRegister(&xFlapSetRevealFlap, libs, "adw_flap_set_reveal_flap")
1089	core.PuregoSafeRegister(&xFlapSetRevealParams, libs, "adw_flap_set_reveal_params")
1090	core.PuregoSafeRegister(&xFlapSetSeparator, libs, "adw_flap_set_separator")
1091	core.PuregoSafeRegister(&xFlapSetSwipeToClose, libs, "adw_flap_set_swipe_to_close")
1092	core.PuregoSafeRegister(&xFlapSetSwipeToOpen, libs, "adw_flap_set_swipe_to_open")
1093	core.PuregoSafeRegister(&xFlapSetTransitionType, libs, "adw_flap_set_transition_type")
1094
1095}

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