v0.2.2 9100209

adw-wrap-box.go RawHistoryFolder

1// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package adw
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/gobject"
12	"github.com/bnema/puregotk/v4/gobject/types"
13	"github.com/bnema/puregotk/v4/gtk"
14)
15
16type WrapBoxClass struct {
17	_ structs.HostLayout
18
19	ParentClass gtk.WidgetClass
20}
21
22func (x *WrapBoxClass) GoPointer() uintptr {
23	return uintptr(unsafe.Pointer(x))
24}
25
26// A box-like widget that can wrap into multiple lines.
27//
28// <picture>
29//
30//	<source srcset="wrap-box-dark.png" media="(prefers-color-scheme: dark)">
31//	<img src="wrap-box.png" alt="wrap-box">
32//
33// </picture>
34//
35// `AdwWrapBox` is similar to [class@Gtk.Box], but can wrap lines when the
36// widgets cannot fit otherwise. Unlike [class@Gtk.FlowBox], the children aren't
37// arranged into a grid and behave more like words in a wrapping label.
38//
39// Like `GtkBox`, `AdwWrapBox` is orientable and has spacing:
40//
41// - [property@WrapBox:child-spacing] between children in the same line;
42// - [property@WrapBox:line-spacing] between lines.
43//
44// ::: note
45//
46//	Unlike `GtkBox`, `AdwWrapBox` cannot follow the CSS `border-spacing`
47//	property.
48//
49// Use the [property@WrapBox:natural-line-length] property to determine the
50// layout's natural size, e.g. when using it in a [class@Gtk.Popover].
51//
52// Normally, a horizontal `AdwWrapBox` wraps left to right and top to bottom
53// for left-to-right languages. Both of these directions can be reversed, using
54// the [property@WrapBox:pack-direction] and [property@WrapBox:wrap-reverse]
55// properties. Additionally, the alignment of each line can be controlled with
56// the [property@WrapBox:align] property.
57//
58// Lines can be justified using the [property@WrapBox:justify] property, filling
59// the entire line by either increasing child size or spacing depending on the
60// value. Set [property@WrapBox:justify-last-line] to justify the last line as
61// well.
62//
63// By default, `AdwWrapBox` wraps as soon as the previous line cannot fit any
64// more children without shrinking them past their natural size. Set
65// [property@WrapBox:wrap-policy] to [enum@Adw.WrapPolicy.MINIMUM] to only wrap
66// once all the children in the previous line have been shrunk to their minimum
67// size.
68//
69// To make each line take the same amount of space, set
70// [property@WrapBox:line-homogeneous] to `TRUE`.
71//
72// Spacing and natural line length can scale with the text scale factor, use the
73// [property@WrapBox:child-spacing-unit], [property@WrapBox:line-spacing-unit]
74// and/or [property@WrapBox:natural-line-length-unit] properties to enable that
75// behavior.
76//
77// See [class@WrapLayout].
78//
79// ## CSS nodes
80//
81// `AdwWrapBox` uses a single CSS node with name `wrap-box`.
82//
83// ## Accessibility
84//
85// `AdwWrapBox` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
86type WrapBox struct {
87	gtk.Widget
88}
89
90var xWrapBoxGLibType func() types.GType
91
92func WrapBoxGLibType() types.GType {
93	return xWrapBoxGLibType()
94}
95
96func WrapBoxNewFromInternalPtr(ptr uintptr) *WrapBox {
97	cls := &WrapBox{}
98	cls.Ptr = ptr
99	return cls
100}
101
102var xNewWrapBox func() uintptr
103
104// Creates a new `AdwWrapBox`.
105func NewWrapBox() *WrapBox {
106	var cls *WrapBox
107
108	cret := xNewWrapBox()
109
110	if cret == 0 {
111		return nil
112	}
113	gobject.IncreaseRef(cret)
114	cls = &WrapBox{}
115	cls.Ptr = cret
116	return cls
117}
118
119var xWrapBoxAppend func(uintptr, uintptr)
120
121// Adds @child as the last child to @self.
122func (x *WrapBox) Append(ChildVar *gtk.Widget) {
123
124	xWrapBoxAppend(x.GoPointer(), ChildVar.GoPointer())
125
126}
127
128var xWrapBoxGetAlign func(uintptr) float32
129
130// Gets the alignment of the children within each line.
131func (x *WrapBox) GetAlign() float32 {
132
133	cret := xWrapBoxGetAlign(x.GoPointer())
134	return cret
135}
136
137var xWrapBoxGetChildSpacing func(uintptr) int
138
139// Gets spacing between widgets on the same line.
140func (x *WrapBox) GetChildSpacing() int {
141
142	cret := xWrapBoxGetChildSpacing(x.GoPointer())
143	return cret
144}
145
146var xWrapBoxGetChildSpacingUnit func(uintptr) LengthUnit
147
148// Gets the length unit for child spacing.
149func (x *WrapBox) GetChildSpacingUnit() LengthUnit {
150
151	cret := xWrapBoxGetChildSpacingUnit(x.GoPointer())
152	return cret
153}
154
155var xWrapBoxGetJustify func(uintptr) JustifyMode
156
157// Gets whether and how each complete line is stretched to fill the entire widget.
158func (x *WrapBox) GetJustify() JustifyMode {
159
160	cret := xWrapBoxGetJustify(x.GoPointer())
161	return cret
162}
163
164var xWrapBoxGetJustifyLastLine func(uintptr) bool
165
166// Gets whether the last line should be stretched to fill the entire widget.
167func (x *WrapBox) GetJustifyLastLine() bool {
168
169	cret := xWrapBoxGetJustifyLastLine(x.GoPointer())
170	return cret
171}
172
173var xWrapBoxGetLineHomogeneous func(uintptr) bool
174
175// Gets whether all lines should take the same amount of space.
176func (x *WrapBox) GetLineHomogeneous() bool {
177
178	cret := xWrapBoxGetLineHomogeneous(x.GoPointer())
179	return cret
180}
181
182var xWrapBoxGetLineSpacing func(uintptr) int
183
184// Gets the spacing between lines.
185//
186// See [property@WrapBox:line-spacing-unit].
187func (x *WrapBox) GetLineSpacing() int {
188
189	cret := xWrapBoxGetLineSpacing(x.GoPointer())
190	return cret
191}
192
193var xWrapBoxGetLineSpacingUnit func(uintptr) LengthUnit
194
195// Gets the length unit for line spacing.
196func (x *WrapBox) GetLineSpacingUnit() LengthUnit {
197
198	cret := xWrapBoxGetLineSpacingUnit(x.GoPointer())
199	return cret
200}
201
202var xWrapBoxGetNaturalLineLength func(uintptr) int
203
204// Gets the natural size for each line.
205func (x *WrapBox) GetNaturalLineLength() int {
206
207	cret := xWrapBoxGetNaturalLineLength(x.GoPointer())
208	return cret
209}
210
211var xWrapBoxGetNaturalLineLengthUnit func(uintptr) LengthUnit
212
213// Gets the length unit for line spacing.
214func (x *WrapBox) GetNaturalLineLengthUnit() LengthUnit {
215
216	cret := xWrapBoxGetNaturalLineLengthUnit(x.GoPointer())
217	return cret
218}
219
220var xWrapBoxGetPackDirection func(uintptr) PackDirection
221
222// Gets the direction children are packed in each line.
223func (x *WrapBox) GetPackDirection() PackDirection {
224
225	cret := xWrapBoxGetPackDirection(x.GoPointer())
226	return cret
227}
228
229var xWrapBoxGetWrapPolicy func(uintptr) WrapPolicy
230
231// Gets the policy for line wrapping.
232func (x *WrapBox) GetWrapPolicy() WrapPolicy {
233
234	cret := xWrapBoxGetWrapPolicy(x.GoPointer())
235	return cret
236}
237
238var xWrapBoxGetWrapReverse func(uintptr) bool
239
240// Gets whether wrap direction is reversed.
241func (x *WrapBox) GetWrapReverse() bool {
242
243	cret := xWrapBoxGetWrapReverse(x.GoPointer())
244	return cret
245}
246
247var xWrapBoxInsertChildAfter func(uintptr, uintptr, uintptr)
248
249// Inserts @child in the position after @sibling in the list of @self children.
250//
251// If @sibling is `NULL`, inserts @child at the first position.
252func (x *WrapBox) InsertChildAfter(ChildVar *gtk.Widget, SiblingVar *gtk.Widget) {
253
254	xWrapBoxInsertChildAfter(x.GoPointer(), ChildVar.GoPointer(), SiblingVar.GoPointer())
255
256}
257
258var xWrapBoxPrepend func(uintptr, uintptr)
259
260// Adds @child as the first child to @self.
261func (x *WrapBox) Prepend(ChildVar *gtk.Widget) {
262
263	xWrapBoxPrepend(x.GoPointer(), ChildVar.GoPointer())
264
265}
266
267var xWrapBoxRemove func(uintptr, uintptr)
268
269// Removes a child widget from @self.
270//
271// The child must have been added before with [method@Adw.WrapBox.append],
272// [method@Adw.WrapBox.prepend], or [method@Adw.WrapBox.insert_child_after].
273func (x *WrapBox) Remove(ChildVar *gtk.Widget) {
274
275	xWrapBoxRemove(x.GoPointer(), ChildVar.GoPointer())
276
277}
278
279var xWrapBoxRemoveAll func(uintptr)
280
281// Removes all children from @self.
282func (x *WrapBox) RemoveAll() {
283
284	xWrapBoxRemoveAll(x.GoPointer())
285
286}
287
288var xWrapBoxReorderChildAfter func(uintptr, uintptr, uintptr)
289
290// Moves @child to the position after @sibling in the list of @self children.
291//
292// If @sibling is `NULL`, moves @child to the first position.
293func (x *WrapBox) ReorderChildAfter(ChildVar *gtk.Widget, SiblingVar *gtk.Widget) {
294
295	xWrapBoxReorderChildAfter(x.GoPointer(), ChildVar.GoPointer(), SiblingVar.GoPointer())
296
297}
298
299var xWrapBoxSetAlign func(uintptr, float32)
300
301// Sets the alignment of the children within each line.
302//
303// 0 means the children are placed at the start of the line, 1 means they are
304// placed at the end of the line. 0.5 means they are placed in the middle of the
305// line.
306//
307// Alignment is only used when [property@WrapBox:justify] is set to
308// `ADW_JUSTIFY_NONE`, or on the last line when the
309// [property@WrapBox:justify-last-line] is `FALSE`.
310func (x *WrapBox) SetAlign(AlignVar float32) {
311
312	xWrapBoxSetAlign(x.GoPointer(), AlignVar)
313
314}
315
316var xWrapBoxSetChildSpacing func(uintptr, int)
317
318// Sets the spacing between widgets on the same line.
319//
320// See [property@WrapBox:child-spacing-unit].
321func (x *WrapBox) SetChildSpacing(ChildSpacingVar int) {
322
323	xWrapBoxSetChildSpacing(x.GoPointer(), ChildSpacingVar)
324
325}
326
327var xWrapBoxSetChildSpacingUnit func(uintptr, LengthUnit)
328
329// Sets the length unit for child spacing.
330//
331// Allows the spacing to vary depending on the text scale factor.
332//
333// See [property@WrapBox:child-spacing].
334func (x *WrapBox) SetChildSpacingUnit(UnitVar LengthUnit) {
335
336	xWrapBoxSetChildSpacingUnit(x.GoPointer(), UnitVar)
337
338}
339
340var xWrapBoxSetJustify func(uintptr, JustifyMode)
341
342// Determines whether and how each complete line should be stretched to fill
343// the entire widget.
344//
345// If set to `ADW_JUSTIFY_FILL`, each widget in the line will be stretched,
346// keeping consistent spacing, so that the line fills the entire widget.
347//
348// If set to `ADW_JUSTIFY_SPREAD`, the spacing between widgets will be
349// increased, keeping widget sizes intact. The first and last widget will be
350// aligned with the beginning and end of the line. If the line only contains a
351// single widget, it will be stretched regardless.
352//
353// If set to `ADW_JUSTIFY_NONE`, the line will not be stretched and the children
354// will be placed together within the line, according to
355// [property@WrapBox:align].
356//
357// By default this doesn't affect the last line, as it will be incomplete. Use
358// [property@WrapBox:justify-last-line] to justify it as well.
359func (x *WrapBox) SetJustify(JustifyVar JustifyMode) {
360
361	xWrapBoxSetJustify(x.GoPointer(), JustifyVar)
362
363}
364
365var xWrapBoxSetJustifyLastLine func(uintptr, bool)
366
367// Sets whether the last line should be stretched to fill the entire widget.
368//
369// See [property@WrapBox:justify].
370func (x *WrapBox) SetJustifyLastLine(JustifyLastLineVar bool) {
371
372	xWrapBoxSetJustifyLastLine(x.GoPointer(), JustifyLastLineVar)
373
374}
375
376var xWrapBoxSetLineHomogeneous func(uintptr, bool)
377
378// Sets whether all lines should take the same amount of space.
379func (x *WrapBox) SetLineHomogeneous(HomogeneousVar bool) {
380
381	xWrapBoxSetLineHomogeneous(x.GoPointer(), HomogeneousVar)
382
383}
384
385var xWrapBoxSetLineSpacing func(uintptr, int)
386
387// Sets the spacing between lines.
388func (x *WrapBox) SetLineSpacing(LineSpacingVar int) {
389
390	xWrapBoxSetLineSpacing(x.GoPointer(), LineSpacingVar)
391
392}
393
394var xWrapBoxSetLineSpacingUnit func(uintptr, LengthUnit)
395
396// Sets the length unit for line spacing.
397//
398// Allows the spacing to vary depending on the text scale factor.
399//
400// See [property@WrapBox:line-spacing].
401func (x *WrapBox) SetLineSpacingUnit(UnitVar LengthUnit) {
402
403	xWrapBoxSetLineSpacingUnit(x.GoPointer(), UnitVar)
404
405}
406
407var xWrapBoxSetNaturalLineLength func(uintptr, int)
408
409// Sets the natural size for each line.
410//
411// It should be used to limit the line lengths, for example when used in
412// popovers.
413//
414// See [property@WrapBox:natural-line-length-unit].
415func (x *WrapBox) SetNaturalLineLength(NaturalLineLengthVar int) {
416
417	xWrapBoxSetNaturalLineLength(x.GoPointer(), NaturalLineLengthVar)
418
419}
420
421var xWrapBoxSetNaturalLineLengthUnit func(uintptr, LengthUnit)
422
423// Sets the length unit for natural line length.
424//
425// Allows the length to vary depending on the text scale factor.
426//
427// See [property@WrapBox:natural-line-length].
428func (x *WrapBox) SetNaturalLineLengthUnit(UnitVar LengthUnit) {
429
430	xWrapBoxSetNaturalLineLengthUnit(x.GoPointer(), UnitVar)
431
432}
433
434var xWrapBoxSetPackDirection func(uintptr, PackDirection)
435
436// Sets the direction children are packed in each line.
437func (x *WrapBox) SetPackDirection(PackDirectionVar PackDirection) {
438
439	xWrapBoxSetPackDirection(x.GoPointer(), PackDirectionVar)
440
441}
442
443var xWrapBoxSetWrapPolicy func(uintptr, WrapPolicy)
444
445// Sets the policy for line wrapping.
446//
447// If set to `ADW_WRAP_NATURAL`, the box will wrap to the next line as soon as
448// the previous line cannot fit any more children without shrinking them past
449// their natural size.
450//
451// If set to `ADW_WRAP_MINIMUM`, the box will try to fit as many children into
452// each line as possible, shrinking them down to their minimum size before
453// wrapping to the next line.
454func (x *WrapBox) SetWrapPolicy(WrapPolicyVar WrapPolicy) {
455
456	xWrapBoxSetWrapPolicy(x.GoPointer(), WrapPolicyVar)
457
458}
459
460var xWrapBoxSetWrapReverse func(uintptr, bool)
461
462// Sets whether wrap direction should be reversed.
463//
464// By default, lines wrap downwards in a horizontal box, and towards the end
465// in a vertical box. If set to `TRUE`, they wrap upwards or towards the start
466// respectively.
467func (x *WrapBox) SetWrapReverse(WrapReverseVar bool) {
468
469	xWrapBoxSetWrapReverse(x.GoPointer(), WrapReverseVar)
470
471}
472
473func (c *WrapBox) GoPointer() uintptr {
474	if c == nil {
475		return 0
476	}
477	return c.Ptr
478}
479
480func (c *WrapBox) SetGoPointer(ptr uintptr) {
481	c.Ptr = ptr
482}
483
484// SetPropertyAlign sets the "align" property.
485// The alignment of the children within each line.
486//
487// 0 means the children are placed at the start of the line, 1 means they are
488// placed at the end of the line. 0.5 means they are placed in the middle of
489// the line.
490//
491// Alignment is only used when [property@WrapBox:justify] is set to
492// `ADW_JUSTIFY_NONE`, or on the last line when the
493// [property@WrapBox:justify-last-line] is `FALSE`.
494func (x *WrapBox) SetPropertyAlign(value float32) {
495	var v gobject.Value
496	v.Init(gobject.TypeFloatVal)
497	v.SetFloat(value)
498	x.SetProperty("align", &v)
499}
500
501// GetPropertyAlign gets the "align" property.
502// The alignment of the children within each line.
503//
504// 0 means the children are placed at the start of the line, 1 means they are
505// placed at the end of the line. 0.5 means they are placed in the middle of
506// the line.
507//
508// Alignment is only used when [property@WrapBox:justify] is set to
509// `ADW_JUSTIFY_NONE`, or on the last line when the
510// [property@WrapBox:justify-last-line] is `FALSE`.
511func (x *WrapBox) GetPropertyAlign() float32 {
512	var v gobject.Value
513	x.GetProperty("align", &v)
514	return v.GetFloat()
515}
516
517// SetPropertyChildSpacing sets the "child-spacing" property.
518// The spacing between widgets on the same line.
519//
520// See [property@WrapBox:child-spacing-unit].
521func (x *WrapBox) SetPropertyChildSpacing(value int) {
522	var v gobject.Value
523	v.Init(gobject.TypeIntVal)
524	v.SetInt(value)
525	x.SetProperty("child-spacing", &v)
526}
527
528// GetPropertyChildSpacing gets the "child-spacing" property.
529// The spacing between widgets on the same line.
530//
531// See [property@WrapBox:child-spacing-unit].
532func (x *WrapBox) GetPropertyChildSpacing() int {
533	var v gobject.Value
534	x.GetProperty("child-spacing", &v)
535	return v.GetInt()
536}
537
538// SetPropertyJustifyLastLine sets the "justify-last-line" property.
539// Whether the last line should be stretched to fill the entire widget.
540//
541// See [property@WrapBox:justify].
542func (x *WrapBox) SetPropertyJustifyLastLine(value bool) {
543	var v gobject.Value
544	v.Init(gobject.TypeBooleanVal)
545	v.SetBoolean(value)
546	x.SetProperty("justify-last-line", &v)
547}
548
549// GetPropertyJustifyLastLine gets the "justify-last-line" property.
550// Whether the last line should be stretched to fill the entire widget.
551//
552// See [property@WrapBox:justify].
553func (x *WrapBox) GetPropertyJustifyLastLine() bool {
554	var v gobject.Value
555	x.GetProperty("justify-last-line", &v)
556	return v.GetBoolean()
557}
558
559// SetPropertyLineHomogeneous sets the "line-homogeneous" property.
560// Whether all lines should take the same amount of space.
561func (x *WrapBox) SetPropertyLineHomogeneous(value bool) {
562	var v gobject.Value
563	v.Init(gobject.TypeBooleanVal)
564	v.SetBoolean(value)
565	x.SetProperty("line-homogeneous", &v)
566}
567
568// GetPropertyLineHomogeneous gets the "line-homogeneous" property.
569// Whether all lines should take the same amount of space.
570func (x *WrapBox) GetPropertyLineHomogeneous() bool {
571	var v gobject.Value
572	x.GetProperty("line-homogeneous", &v)
573	return v.GetBoolean()
574}
575
576// SetPropertyLineSpacing sets the "line-spacing" property.
577// The spacing between lines.
578//
579// See [property@WrapBox:line-spacing-unit].
580func (x *WrapBox) SetPropertyLineSpacing(value int) {
581	var v gobject.Value
582	v.Init(gobject.TypeIntVal)
583	v.SetInt(value)
584	x.SetProperty("line-spacing", &v)
585}
586
587// GetPropertyLineSpacing gets the "line-spacing" property.
588// The spacing between lines.
589//
590// See [property@WrapBox:line-spacing-unit].
591func (x *WrapBox) GetPropertyLineSpacing() int {
592	var v gobject.Value
593	x.GetProperty("line-spacing", &v)
594	return v.GetInt()
595}
596
597// SetPropertyNaturalLineLength sets the "natural-line-length" property.
598// Determines the natural size for each line.
599//
600// It should be used to limit the line lengths, for example when used in
601// popovers.
602//
603// See [property@WrapBox:natural-line-length-unit].
604func (x *WrapBox) SetPropertyNaturalLineLength(value int) {
605	var v gobject.Value
606	v.Init(gobject.TypeIntVal)
607	v.SetInt(value)
608	x.SetProperty("natural-line-length", &v)
609}
610
611// GetPropertyNaturalLineLength gets the "natural-line-length" property.
612// Determines the natural size for each line.
613//
614// It should be used to limit the line lengths, for example when used in
615// popovers.
616//
617// See [property@WrapBox:natural-line-length-unit].
618func (x *WrapBox) GetPropertyNaturalLineLength() int {
619	var v gobject.Value
620	x.GetProperty("natural-line-length", &v)
621	return v.GetInt()
622}
623
624// SetPropertyWrapReverse sets the "wrap-reverse" property.
625// Whether wrap direction should be reversed.
626//
627// By default, lines wrap downwards in a horizontal box, and towards the end
628// in a vertical box. If set to `TRUE`, they wrap upwards or towards the start
629// respectively.
630func (x *WrapBox) SetPropertyWrapReverse(value bool) {
631	var v gobject.Value
632	v.Init(gobject.TypeBooleanVal)
633	v.SetBoolean(value)
634	x.SetProperty("wrap-reverse", &v)
635}
636
637// GetPropertyWrapReverse gets the "wrap-reverse" property.
638// Whether wrap direction should be reversed.
639//
640// By default, lines wrap downwards in a horizontal box, and towards the end
641// in a vertical box. If set to `TRUE`, they wrap upwards or towards the start
642// respectively.
643func (x *WrapBox) GetPropertyWrapReverse() bool {
644	var v gobject.Value
645	x.GetProperty("wrap-reverse", &v)
646	return v.GetBoolean()
647}
648
649// Requests the user's screen reader to announce the given message.
650//
651// This kind of notification is useful for messages that
652// either have only a visual representation or that are not
653// exposed visually at all, e.g. a notification about a
654// successful operation.
655//
656// Also, by using this API, you can ensure that the message
657// does not interrupts the user's current screen reader output.
658func (x *WrapBox) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
659
660	gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
661
662}
663
664// Retrieves the accessible parent for an accessible object.
665//
666// This function returns `NULL` for top level widgets.
667func (x *WrapBox) GetAccessibleParent() *gtk.AccessibleBase {
668	var cls *gtk.AccessibleBase
669
670	cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
671
672	if cret == 0 {
673		return nil
674	}
675	cls = &gtk.AccessibleBase{}
676	cls.Ptr = cret
677	return cls
678}
679
680// Retrieves the accessible role of an accessible object.
681func (x *WrapBox) GetAccessibleRole() gtk.AccessibleRole {
682
683	cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
684	return cret
685}
686
687// Retrieves the implementation for the given accessible object.
688func (x *WrapBox) GetAtContext() *gtk.ATContext {
689	var cls *gtk.ATContext
690
691	cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
692
693	if cret == 0 {
694		return nil
695	}
696	cls = &gtk.ATContext{}
697	cls.Ptr = cret
698	return cls
699}
700
701// Queries the coordinates and dimensions of this accessible
702//
703// This functionality can be overridden by `GtkAccessible`
704// implementations, e.g. to get the bounds from an ignored
705// child widget.
706func (x *WrapBox) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
707
708	cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
709	return cret
710}
711
712// Retrieves the first accessible child of an accessible object.
713func (x *WrapBox) GetFirstAccessibleChild() *gtk.AccessibleBase {
714	var cls *gtk.AccessibleBase
715
716	cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
717
718	if cret == 0 {
719		return nil
720	}
721	cls = &gtk.AccessibleBase{}
722	cls.Ptr = cret
723	return cls
724}
725
726// Retrieves the next accessible sibling of an accessible object
727func (x *WrapBox) GetNextAccessibleSibling() *gtk.AccessibleBase {
728	var cls *gtk.AccessibleBase
729
730	cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
731
732	if cret == 0 {
733		return nil
734	}
735	cls = &gtk.AccessibleBase{}
736	cls.Ptr = cret
737	return cls
738}
739
740// Queries a platform state, such as focus.
741//
742// This functionality can be overridden by `GtkAccessible`
743// implementations, e.g. to get platform state from an ignored
744// child widget, as is the case for `GtkText` wrappers.
745func (x *WrapBox) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
746
747	cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
748	return cret
749}
750
751// Resets the accessible property to its default value.
752func (x *WrapBox) ResetProperty(PropertyVar gtk.AccessibleProperty) {
753
754	gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
755
756}
757
758// Resets the accessible relation to its default value.
759func (x *WrapBox) ResetRelation(RelationVar gtk.AccessibleRelation) {
760
761	gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
762
763}
764
765// Resets the accessible state to its default value.
766func (x *WrapBox) ResetState(StateVar gtk.AccessibleState) {
767
768	gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
769
770}
771
772// Sets the parent and sibling of an accessible object.
773//
774// This function is meant to be used by accessible implementations that are
775// not part of the widget hierarchy, and but act as a logical bridge between
776// widgets. For instance, if a widget creates an object that holds metadata
777// for each child, and you want that object to implement the `GtkAccessible`
778// interface, you will use this function to ensure that the parent of each
779// child widget is the metadata object, and the parent of each metadata
780// object is the container widget.
781func (x *WrapBox) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
782
783	gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
784
785}
786
787// Updates the next accessible sibling.
788//
789// That might be useful when a new child of a custom accessible
790// is created, and it needs to be linked to a previous child.
791func (x *WrapBox) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
792
793	gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
794
795}
796
797// Informs ATs that the platform state has changed.
798//
799// This function should be used by `GtkAccessible` implementations that
800// have a platform state but are not widgets. Widgets handle platform
801// states automatically.
802func (x *WrapBox) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
803
804	gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
805
806}
807
808// Updates a list of accessible properties.
809//
810// See the [enum@Gtk.AccessibleProperty] documentation for the
811// value types of accessible properties.
812//
813// This function should be called by `GtkWidget` types whenever
814// an accessible property change must be communicated to assistive
815// technologies.
816//
817// Example:
818// ```c
819// value = gtk_adjustment_get_value (adjustment);
820// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
821//
822//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
823//	-1);
824//
825// ```
826func (x *WrapBox) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
827
828	gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
829
830}
831
832// Updates an array of accessible properties.
833//
834// This function should be called by `GtkWidget` types whenever an accessible
835// property change must be communicated to assistive technologies.
836//
837// This function is meant to be used by language bindings.
838func (x *WrapBox) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
839
840	gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
841
842}
843
844// Updates a list of accessible relations.
845//
846// This function should be called by `GtkWidget` types whenever an accessible
847// relation change must be communicated to assistive technologies.
848//
849// If the [enum@Gtk.AccessibleRelation] requires a list of references,
850// you should pass each reference individually, followed by `NULL`, e.g.
851//
852// ```c
853// gtk_accessible_update_relation (accessible,
854//
855//	GTK_ACCESSIBLE_RELATION_CONTROLS,
856//	  ref1, NULL,
857//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
858//	  ref1, ref2, ref3, NULL,
859//	-1);
860//
861// ```
862func (x *WrapBox) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
863
864	gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
865
866}
867
868// Updates an array of accessible relations.
869//
870// This function should be called by `GtkWidget` types whenever an accessible
871// relation change must be communicated to assistive technologies.
872//
873// This function is meant to be used by language bindings.
874func (x *WrapBox) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
875
876	gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
877
878}
879
880// Updates a list of accessible states.
881//
882// See the [enum@Gtk.AccessibleState] documentation for the
883// value types of accessible states.
884//
885// This function should be called by `GtkWidget` types whenever
886// an accessible state change must be communicated to assistive
887// technologies.
888//
889// Example:
890//
891// ```c
892// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
893// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
894//
895//	GTK_ACCESSIBLE_STATE_CHECKED, value,
896//	-1);
897//
898// ```
899func (x *WrapBox) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
900
901	gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
902
903}
904
905// Updates an array of accessible states.
906//
907// This function should be called by `GtkWidget` types whenever an accessible
908// state change must be communicated to assistive technologies.
909//
910// This function is meant to be used by language bindings.
911func (x *WrapBox) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
912
913	gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
914
915}
916
917// Gets the ID of the @buildable object.
918//
919// `GtkBuilder` sets the name based on the ID attribute
920// of the `<object>` tag used to construct the @buildable.
921func (x *WrapBox) GetBuildableId() string {
922
923	cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
924	return cret
925}
926
927// Retrieves the orientation of the @orientable.
928func (x *WrapBox) GetOrientation() gtk.Orientation {
929
930	cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
931	return cret
932}
933
934// Sets the orientation of the @orientable.
935func (x *WrapBox) SetOrientation(OrientationVar gtk.Orientation) {
936
937	gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
938
939}
940
941func init() {
942	core.SetPackageName("ADW", "libadwaita-1")
943	core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
944	var libs []uintptr
945	for _, libPath := range core.GetPaths("ADW") {
946		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
947		if err != nil {
948			panic(err)
949		}
950		libs = append(libs, lib)
951	}
952
953	core.PuregoSafeRegister(&xWrapBoxGLibType, libs, "adw_wrap_box_get_type")
954
955	core.PuregoSafeRegister(&xNewWrapBox, libs, "adw_wrap_box_new")
956
957	core.PuregoSafeRegister(&xWrapBoxAppend, libs, "adw_wrap_box_append")
958	core.PuregoSafeRegister(&xWrapBoxGetAlign, libs, "adw_wrap_box_get_align")
959	core.PuregoSafeRegister(&xWrapBoxGetChildSpacing, libs, "adw_wrap_box_get_child_spacing")
960	core.PuregoSafeRegister(&xWrapBoxGetChildSpacingUnit, libs, "adw_wrap_box_get_child_spacing_unit")
961	core.PuregoSafeRegister(&xWrapBoxGetJustify, libs, "adw_wrap_box_get_justify")
962	core.PuregoSafeRegister(&xWrapBoxGetJustifyLastLine, libs, "adw_wrap_box_get_justify_last_line")
963	core.PuregoSafeRegister(&xWrapBoxGetLineHomogeneous, libs, "adw_wrap_box_get_line_homogeneous")
964	core.PuregoSafeRegister(&xWrapBoxGetLineSpacing, libs, "adw_wrap_box_get_line_spacing")
965	core.PuregoSafeRegister(&xWrapBoxGetLineSpacingUnit, libs, "adw_wrap_box_get_line_spacing_unit")
966	core.PuregoSafeRegister(&xWrapBoxGetNaturalLineLength, libs, "adw_wrap_box_get_natural_line_length")
967	core.PuregoSafeRegister(&xWrapBoxGetNaturalLineLengthUnit, libs, "adw_wrap_box_get_natural_line_length_unit")
968	core.PuregoSafeRegister(&xWrapBoxGetPackDirection, libs, "adw_wrap_box_get_pack_direction")
969	core.PuregoSafeRegister(&xWrapBoxGetWrapPolicy, libs, "adw_wrap_box_get_wrap_policy")
970	core.PuregoSafeRegister(&xWrapBoxGetWrapReverse, libs, "adw_wrap_box_get_wrap_reverse")
971	core.PuregoSafeRegister(&xWrapBoxInsertChildAfter, libs, "adw_wrap_box_insert_child_after")
972	core.PuregoSafeRegister(&xWrapBoxPrepend, libs, "adw_wrap_box_prepend")
973	core.PuregoSafeRegister(&xWrapBoxRemove, libs, "adw_wrap_box_remove")
974	core.PuregoSafeRegister(&xWrapBoxRemoveAll, libs, "adw_wrap_box_remove_all")
975	core.PuregoSafeRegister(&xWrapBoxReorderChildAfter, libs, "adw_wrap_box_reorder_child_after")
976	core.PuregoSafeRegister(&xWrapBoxSetAlign, libs, "adw_wrap_box_set_align")
977	core.PuregoSafeRegister(&xWrapBoxSetChildSpacing, libs, "adw_wrap_box_set_child_spacing")
978	core.PuregoSafeRegister(&xWrapBoxSetChildSpacingUnit, libs, "adw_wrap_box_set_child_spacing_unit")
979	core.PuregoSafeRegister(&xWrapBoxSetJustify, libs, "adw_wrap_box_set_justify")
980	core.PuregoSafeRegister(&xWrapBoxSetJustifyLastLine, libs, "adw_wrap_box_set_justify_last_line")
981	core.PuregoSafeRegister(&xWrapBoxSetLineHomogeneous, libs, "adw_wrap_box_set_line_homogeneous")
982	core.PuregoSafeRegister(&xWrapBoxSetLineSpacing, libs, "adw_wrap_box_set_line_spacing")
983	core.PuregoSafeRegister(&xWrapBoxSetLineSpacingUnit, libs, "adw_wrap_box_set_line_spacing_unit")
984	core.PuregoSafeRegister(&xWrapBoxSetNaturalLineLength, libs, "adw_wrap_box_set_natural_line_length")
985	core.PuregoSafeRegister(&xWrapBoxSetNaturalLineLengthUnit, libs, "adw_wrap_box_set_natural_line_length_unit")
986	core.PuregoSafeRegister(&xWrapBoxSetPackDirection, libs, "adw_wrap_box_set_pack_direction")
987	core.PuregoSafeRegister(&xWrapBoxSetWrapPolicy, libs, "adw_wrap_box_set_wrap_policy")
988	core.PuregoSafeRegister(&xWrapBoxSetWrapReverse, libs, "adw_wrap_box_set_wrap_reverse")
989
990}

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