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 OverlaySplitViewClass struct {
18 _ structs.HostLayout
19
20 ParentClass gtk.WidgetClass
21}
22
23func (x *OverlaySplitViewClass) GoPointer() uintptr {
24 return uintptr(unsafe.Pointer(x))
25}
26
27// A widget presenting sidebar and content side by side or as an overlay.
28//
29// <picture>
30//
31// <source srcset="overlay-split-view-dark.png" media="(prefers-color-scheme: dark)">
32// <img src="overlay-split-view.png" alt="overlay-split-view">
33//
34// </picture>
35// <picture>
36//
37// <source srcset="overlay-split-view-collapsed-dark.png" media="(prefers-color-scheme: dark)">
38// <img src="overlay-split-view-collapsed.png" alt="overlay-split-view-collapsed">
39//
40// </picture>
41//
42// `AdwOverlaySplitView` has two children: sidebar and content, and displays
43// them side by side.
44//
45// When [property@OverlaySplitView:collapsed] is set to `TRUE`, the sidebar is
46// instead shown as an overlay above the content widget.
47//
48// The sidebar can be hidden or shown using the
49// [property@OverlaySplitView:show-sidebar] property.
50//
51// Sidebar can be displayed before or after the content, this can be controlled
52// with the [property@OverlaySplitView:sidebar-position] property.
53//
54// Collapsing the split view automatically hides the sidebar widget, and
55// uncollapsing it shows the sidebar. If this behavior is not desired, the
56// [property@OverlaySplitView:pin-sidebar] property can be used to override it.
57//
58// `AdwOverlaySplitView` supports an edge swipe gesture for showing the sidebar,
59// and a swipe from the sidebar for hiding it. Gestures are only supported on
60// touchscreen, but not touchpad. Gestures can be controlled with the
61// [property@OverlaySplitView:enable-show-gesture] and
62// [property@OverlaySplitView:enable-hide-gesture] properties.
63//
64// See also [class@NavigationSplitView].
65//
66// `AdwOverlaySplitView` is typically used together with an [class@Breakpoint]
67// setting the `collapsed` property to `TRUE` on small widths, as follows:
68//
69// ```xml
70// <object class="AdwWindow">
71//
72// <property name="default-width">800</property>
73// <property name="default-height">800</property>
74// <child>
75// <object class="AdwBreakpoint">
76// <condition>max-width: 400sp</condition>
77// <setter object="split_view" property="collapsed">True</setter>
78// </object>
79// </child>
80// <property name="content">
81// <object class="AdwOverlaySplitView" id="split_view">
82// <property name="sidebar">
83// <!-- ... -->
84// </property>
85// <property name="content">
86// <!-- ... -->
87// </property>
88// </object>
89// </property>
90//
91// </object>
92// ```
93//
94// `AdwOverlaySplitView` is often used for implementing the
95// [utility pane](https://developer.gnome.org/hig/patterns/containers/utility-panes.html)
96// pattern.
97//
98// ## Sizing
99//
100// When not collapsed, `AdwOverlaySplitView` changes the sidebar width
101// depending on its own width.
102//
103// If possible, it tries to allocate a fraction of the total width, controlled
104// with the [property@OverlaySplitView:sidebar-width-fraction] property.
105//
106// The sidebar also has minimum and maximum sizes, controlled with the
107// [property@OverlaySplitView:min-sidebar-width] and
108// [property@OverlaySplitView:max-sidebar-width] properties.
109//
110// The minimum and maximum sizes are using the length unit specified with the
111// [property@OverlaySplitView:sidebar-width-unit].
112//
113// By default, sidebar is using 25% of the total width, with 180sp as the
114// minimum size and 280sp as the maximum size.
115//
116// When collapsed, the preferred width fraction is ignored and the sidebar uses
117// [property@OverlaySplitView:max-sidebar-width] when possible.
118//
119// ## Header Bar Integration
120//
121// When used inside `AdwOverlaySplitView`, [class@HeaderBar] will automatically
122// hide the window buttons in the middle.
123//
124// ## `AdwOverlaySplitView` as `GtkBuildable`
125//
126// The `AdwOverlaySplitView` implementation of the [iface@Gtk.Buildable]
127// interface supports setting the sidebar widget by specifying “sidebar” as the
128// “type” attribute of a `<child>` element, Specifying “content” child type or
129// omitting it results in setting the content widget.
130//
131// ## CSS nodes
132//
133// `AdwOverlaySplitView` has a single CSS node with the name
134// `overlay-split-view`.
135//
136// It contains two nodes with the name `widget`, containing the sidebar and
137// content children.
138//
139// When not collapsed, they have the `.sidebar-view` and `.content-view` style
140// classes respectively.
141//
142// ```
143// overlay-split-view
144// ├── widget.sidebar-pane
145// │ ╰── [sidebar child]
146// ╰── widget.content-pane
147//
148// ╰── [content child]
149//
150// ```
151//
152// When collapsed, the one containing the sidebar child has the `.background`
153// style class and the other one has no style classes.
154//
155// ```
156// overlay-split-view
157// ├── widget.background
158// │ ╰── [sidebar child]
159// ╰── widget
160//
161// ╰── [content child]
162//
163// ```
164//
165// ## Accessibility
166//
167// `AdwOverlaySplitView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
168type OverlaySplitView struct {
169 gtk.Widget
170}
171
172var xOverlaySplitViewGLibType func() types.GType
173
174func OverlaySplitViewGLibType() types.GType {
175 return xOverlaySplitViewGLibType()
176}
177
178func OverlaySplitViewNewFromInternalPtr(ptr uintptr) *OverlaySplitView {
179 cls := &OverlaySplitView{}
180 cls.Ptr = ptr
181 return cls
182}
183
184var xNewOverlaySplitView func() uintptr
185
186// Creates a new `AdwOverlaySplitView`.
187func NewOverlaySplitView() *OverlaySplitView {
188 var cls *OverlaySplitView
189
190 cret := xNewOverlaySplitView()
191
192 if cret == 0 {
193 return nil
194 }
195 gobject.IncreaseRef(cret)
196 cls = &OverlaySplitView{}
197 cls.Ptr = cret
198 return cls
199}
200
201var xOverlaySplitViewGetCollapsed func(uintptr) bool
202
203// Gets whether @self is collapsed.
204func (x *OverlaySplitView) GetCollapsed() bool {
205
206 cret := xOverlaySplitViewGetCollapsed(x.GoPointer())
207 return cret
208}
209
210var xOverlaySplitViewGetContent func(uintptr) uintptr
211
212// Gets the content widget for @self.
213func (x *OverlaySplitView) GetContent() *gtk.Widget {
214 var cls *gtk.Widget
215
216 cret := xOverlaySplitViewGetContent(x.GoPointer())
217
218 if cret == 0 {
219 return nil
220 }
221 gobject.IncreaseRef(cret)
222 cls = >k.Widget{}
223 cls.Ptr = cret
224 return cls
225}
226
227var xOverlaySplitViewGetEnableHideGesture func(uintptr) bool
228
229// Gets whether @self can be closed with a swipe gesture.
230func (x *OverlaySplitView) GetEnableHideGesture() bool {
231
232 cret := xOverlaySplitViewGetEnableHideGesture(x.GoPointer())
233 return cret
234}
235
236var xOverlaySplitViewGetEnableShowGesture func(uintptr) bool
237
238// Gets whether @self can be opened with an edge swipe gesture.
239func (x *OverlaySplitView) GetEnableShowGesture() bool {
240
241 cret := xOverlaySplitViewGetEnableShowGesture(x.GoPointer())
242 return cret
243}
244
245var xOverlaySplitViewGetMaxSidebarWidth func(uintptr) float64
246
247// Gets the maximum sidebar width for @self.
248func (x *OverlaySplitView) GetMaxSidebarWidth() float64 {
249
250 cret := xOverlaySplitViewGetMaxSidebarWidth(x.GoPointer())
251 return cret
252}
253
254var xOverlaySplitViewGetMinSidebarWidth func(uintptr) float64
255
256// Gets the minimum sidebar width for @self.
257func (x *OverlaySplitView) GetMinSidebarWidth() float64 {
258
259 cret := xOverlaySplitViewGetMinSidebarWidth(x.GoPointer())
260 return cret
261}
262
263var xOverlaySplitViewGetPinSidebar func(uintptr) bool
264
265// Gets whether the sidebar widget is pinned for @self.
266func (x *OverlaySplitView) GetPinSidebar() bool {
267
268 cret := xOverlaySplitViewGetPinSidebar(x.GoPointer())
269 return cret
270}
271
272var xOverlaySplitViewGetShowSidebar func(uintptr) bool
273
274// Gets whether the sidebar widget is shown for @self.
275func (x *OverlaySplitView) GetShowSidebar() bool {
276
277 cret := xOverlaySplitViewGetShowSidebar(x.GoPointer())
278 return cret
279}
280
281var xOverlaySplitViewGetSidebar func(uintptr) uintptr
282
283// Gets the sidebar widget for @self.
284func (x *OverlaySplitView) GetSidebar() *gtk.Widget {
285 var cls *gtk.Widget
286
287 cret := xOverlaySplitViewGetSidebar(x.GoPointer())
288
289 if cret == 0 {
290 return nil
291 }
292 gobject.IncreaseRef(cret)
293 cls = >k.Widget{}
294 cls.Ptr = cret
295 return cls
296}
297
298var xOverlaySplitViewGetSidebarPosition func(uintptr) gtk.PackType
299
300// Gets the sidebar position for @self.
301func (x *OverlaySplitView) GetSidebarPosition() gtk.PackType {
302
303 cret := xOverlaySplitViewGetSidebarPosition(x.GoPointer())
304 return cret
305}
306
307var xOverlaySplitViewGetSidebarWidthFraction func(uintptr) float64
308
309// Gets the preferred sidebar width fraction for @self.
310func (x *OverlaySplitView) GetSidebarWidthFraction() float64 {
311
312 cret := xOverlaySplitViewGetSidebarWidthFraction(x.GoPointer())
313 return cret
314}
315
316var xOverlaySplitViewGetSidebarWidthUnit func(uintptr) LengthUnit
317
318// Gets the length unit for minimum and maximum sidebar widths.
319func (x *OverlaySplitView) GetSidebarWidthUnit() LengthUnit {
320
321 cret := xOverlaySplitViewGetSidebarWidthUnit(x.GoPointer())
322 return cret
323}
324
325var xOverlaySplitViewSetCollapsed func(uintptr, bool)
326
327// Sets whether @self view is collapsed.
328//
329// When collapsed, the sidebar widget is presented as an overlay above the
330// content widget, otherwise they are displayed side by side.
331func (x *OverlaySplitView) SetCollapsed(CollapsedVar bool) {
332
333 xOverlaySplitViewSetCollapsed(x.GoPointer(), CollapsedVar)
334
335}
336
337var xOverlaySplitViewSetContent func(uintptr, uintptr)
338
339// Sets the content widget for @self.
340func (x *OverlaySplitView) SetContent(ContentVar *gtk.Widget) {
341
342 xOverlaySplitViewSetContent(x.GoPointer(), ContentVar.GoPointer())
343
344}
345
346var xOverlaySplitViewSetEnableHideGesture func(uintptr, bool)
347
348// Sets whether @self can be closed with a swipe gesture.
349//
350// Only touchscreen swipes are supported.
351func (x *OverlaySplitView) SetEnableHideGesture(EnableHideGestureVar bool) {
352
353 xOverlaySplitViewSetEnableHideGesture(x.GoPointer(), EnableHideGestureVar)
354
355}
356
357var xOverlaySplitViewSetEnableShowGesture func(uintptr, bool)
358
359// Sets whether @self can be opened with an edge swipe gesture.
360//
361// Only touchscreen swipes are supported.
362func (x *OverlaySplitView) SetEnableShowGesture(EnableShowGestureVar bool) {
363
364 xOverlaySplitViewSetEnableShowGesture(x.GoPointer(), EnableShowGestureVar)
365
366}
367
368var xOverlaySplitViewSetMaxSidebarWidth func(uintptr, float64)
369
370// Sets the maximum sidebar width for @self.
371//
372// Maximum width is affected by [property@OverlaySplitView:sidebar-width-unit].
373//
374// The sidebar widget can still be allocated with larger width if its own
375// minimum width exceeds it.
376func (x *OverlaySplitView) SetMaxSidebarWidth(WidthVar float64) {
377
378 xOverlaySplitViewSetMaxSidebarWidth(x.GoPointer(), WidthVar)
379
380}
381
382var xOverlaySplitViewSetMinSidebarWidth func(uintptr, float64)
383
384// Sets the minimum sidebar width for @self.
385//
386// Minimum width is affected by [property@OverlaySplitView:sidebar-width-unit].
387//
388// The sidebar widget can still be allocated with larger width if its own
389// minimum width exceeds it.
390func (x *OverlaySplitView) SetMinSidebarWidth(WidthVar float64) {
391
392 xOverlaySplitViewSetMinSidebarWidth(x.GoPointer(), WidthVar)
393
394}
395
396var xOverlaySplitViewSetPinSidebar func(uintptr, bool)
397
398// Sets whether the sidebar widget is pinned for @self.
399//
400// By default, collapsing @self automatically hides the sidebar widget, and
401// uncollapsing it shows the sidebar. If set to `TRUE`, sidebar visibility never
402// changes on its own.
403func (x *OverlaySplitView) SetPinSidebar(PinSidebarVar bool) {
404
405 xOverlaySplitViewSetPinSidebar(x.GoPointer(), PinSidebarVar)
406
407}
408
409var xOverlaySplitViewSetShowSidebar func(uintptr, bool)
410
411// Sets whether the sidebar widget is shown for @self.
412func (x *OverlaySplitView) SetShowSidebar(ShowSidebarVar bool) {
413
414 xOverlaySplitViewSetShowSidebar(x.GoPointer(), ShowSidebarVar)
415
416}
417
418var xOverlaySplitViewSetSidebar func(uintptr, uintptr)
419
420// Sets the sidebar widget for @self.
421func (x *OverlaySplitView) SetSidebar(SidebarVar *gtk.Widget) {
422
423 xOverlaySplitViewSetSidebar(x.GoPointer(), SidebarVar.GoPointer())
424
425}
426
427var xOverlaySplitViewSetSidebarPosition func(uintptr, gtk.PackType)
428
429// Sets the sidebar position for @self.
430//
431// If it's set to `GTK_PACK_START`, the sidebar is displayed before the content,
432// if `GTK_PACK_END`, it's displayed after the content.
433func (x *OverlaySplitView) SetSidebarPosition(PositionVar gtk.PackType) {
434
435 xOverlaySplitViewSetSidebarPosition(x.GoPointer(), PositionVar)
436
437}
438
439var xOverlaySplitViewSetSidebarWidthFraction func(uintptr, float64)
440
441// Sets the preferred sidebar width as a fraction of the total width of @self.
442//
443// The preferred width is additionally limited by
444// [property@OverlaySplitView:min-sidebar-width] and
445// [property@OverlaySplitView:max-sidebar-width].
446//
447// The sidebar widget can be allocated with larger width if its own minimum
448// width exceeds the preferred width.
449func (x *OverlaySplitView) SetSidebarWidthFraction(FractionVar float64) {
450
451 xOverlaySplitViewSetSidebarWidthFraction(x.GoPointer(), FractionVar)
452
453}
454
455var xOverlaySplitViewSetSidebarWidthUnit func(uintptr, LengthUnit)
456
457// Sets the length unit for minimum and maximum sidebar widths.
458//
459// See [property@OverlaySplitView:min-sidebar-width] and
460// [property@OverlaySplitView:max-sidebar-width].
461func (x *OverlaySplitView) SetSidebarWidthUnit(UnitVar LengthUnit) {
462
463 xOverlaySplitViewSetSidebarWidthUnit(x.GoPointer(), UnitVar)
464
465}
466
467func (c *OverlaySplitView) GoPointer() uintptr {
468 if c == nil {
469 return 0
470 }
471 return c.Ptr
472}
473
474func (c *OverlaySplitView) SetGoPointer(ptr uintptr) {
475 c.Ptr = ptr
476}
477
478// SetPropertyCollapsed sets the "collapsed" property.
479// Whether the split view is collapsed.
480//
481// When collapsed, the sidebar widget is presented as an overlay above the
482// content widget, otherwise they are displayed side by side.
483func (x *OverlaySplitView) SetPropertyCollapsed(value bool) {
484 var v gobject.Value
485 v.Init(gobject.TypeBooleanVal)
486 v.SetBoolean(value)
487 x.SetProperty("collapsed", &v)
488}
489
490// GetPropertyCollapsed gets the "collapsed" property.
491// Whether the split view is collapsed.
492//
493// When collapsed, the sidebar widget is presented as an overlay above the
494// content widget, otherwise they are displayed side by side.
495func (x *OverlaySplitView) GetPropertyCollapsed() bool {
496 var v gobject.Value
497 x.GetProperty("collapsed", &v)
498 return v.GetBoolean()
499}
500
501// SetPropertyEnableHideGesture sets the "enable-hide-gesture" property.
502// Whether the sidebar can be closed with a swipe gesture.
503//
504// Only touchscreen swipes are supported.
505func (x *OverlaySplitView) SetPropertyEnableHideGesture(value bool) {
506 var v gobject.Value
507 v.Init(gobject.TypeBooleanVal)
508 v.SetBoolean(value)
509 x.SetProperty("enable-hide-gesture", &v)
510}
511
512// GetPropertyEnableHideGesture gets the "enable-hide-gesture" property.
513// Whether the sidebar can be closed with a swipe gesture.
514//
515// Only touchscreen swipes are supported.
516func (x *OverlaySplitView) GetPropertyEnableHideGesture() bool {
517 var v gobject.Value
518 x.GetProperty("enable-hide-gesture", &v)
519 return v.GetBoolean()
520}
521
522// SetPropertyEnableShowGesture sets the "enable-show-gesture" property.
523// Whether the sidebar can be opened with an edge swipe gesture.
524//
525// Only touchscreen swipes are supported.
526func (x *OverlaySplitView) SetPropertyEnableShowGesture(value bool) {
527 var v gobject.Value
528 v.Init(gobject.TypeBooleanVal)
529 v.SetBoolean(value)
530 x.SetProperty("enable-show-gesture", &v)
531}
532
533// GetPropertyEnableShowGesture gets the "enable-show-gesture" property.
534// Whether the sidebar can be opened with an edge swipe gesture.
535//
536// Only touchscreen swipes are supported.
537func (x *OverlaySplitView) GetPropertyEnableShowGesture() bool {
538 var v gobject.Value
539 x.GetProperty("enable-show-gesture", &v)
540 return v.GetBoolean()
541}
542
543// SetPropertyMaxSidebarWidth sets the "max-sidebar-width" property.
544// The maximum sidebar width.
545//
546// Maximum width is affected by
547// [property@OverlaySplitView:sidebar-width-unit].
548//
549// The sidebar widget can still be allocated with larger width if its own
550// minimum width exceeds it.
551func (x *OverlaySplitView) SetPropertyMaxSidebarWidth(value float64) {
552 var v gobject.Value
553 v.Init(gobject.TypeDoubleVal)
554 v.SetDouble(value)
555 x.SetProperty("max-sidebar-width", &v)
556}
557
558// GetPropertyMaxSidebarWidth gets the "max-sidebar-width" property.
559// The maximum sidebar width.
560//
561// Maximum width is affected by
562// [property@OverlaySplitView:sidebar-width-unit].
563//
564// The sidebar widget can still be allocated with larger width if its own
565// minimum width exceeds it.
566func (x *OverlaySplitView) GetPropertyMaxSidebarWidth() float64 {
567 var v gobject.Value
568 x.GetProperty("max-sidebar-width", &v)
569 return v.GetDouble()
570}
571
572// SetPropertyMinSidebarWidth sets the "min-sidebar-width" property.
573// The minimum sidebar width.
574//
575// Minimum width is affected by
576// [property@OverlaySplitView:sidebar-width-unit].
577//
578// The sidebar widget can still be allocated with larger width if its own
579// minimum width exceeds it.
580func (x *OverlaySplitView) SetPropertyMinSidebarWidth(value float64) {
581 var v gobject.Value
582 v.Init(gobject.TypeDoubleVal)
583 v.SetDouble(value)
584 x.SetProperty("min-sidebar-width", &v)
585}
586
587// GetPropertyMinSidebarWidth gets the "min-sidebar-width" property.
588// The minimum sidebar width.
589//
590// Minimum width is affected by
591// [property@OverlaySplitView:sidebar-width-unit].
592//
593// The sidebar widget can still be allocated with larger width if its own
594// minimum width exceeds it.
595func (x *OverlaySplitView) GetPropertyMinSidebarWidth() float64 {
596 var v gobject.Value
597 x.GetProperty("min-sidebar-width", &v)
598 return v.GetDouble()
599}
600
601// SetPropertyPinSidebar sets the "pin-sidebar" property.
602// Whether the sidebar widget is pinned.
603//
604// By default, collapsing @self automatically hides the sidebar widget, and
605// uncollapsing it shows the sidebar. If set to `TRUE`, sidebar visibility
606// never changes on its own.
607func (x *OverlaySplitView) SetPropertyPinSidebar(value bool) {
608 var v gobject.Value
609 v.Init(gobject.TypeBooleanVal)
610 v.SetBoolean(value)
611 x.SetProperty("pin-sidebar", &v)
612}
613
614// GetPropertyPinSidebar gets the "pin-sidebar" property.
615// Whether the sidebar widget is pinned.
616//
617// By default, collapsing @self automatically hides the sidebar widget, and
618// uncollapsing it shows the sidebar. If set to `TRUE`, sidebar visibility
619// never changes on its own.
620func (x *OverlaySplitView) GetPropertyPinSidebar() bool {
621 var v gobject.Value
622 x.GetProperty("pin-sidebar", &v)
623 return v.GetBoolean()
624}
625
626// SetPropertyShowSidebar sets the "show-sidebar" property.
627// Whether the sidebar widget is shown.
628func (x *OverlaySplitView) SetPropertyShowSidebar(value bool) {
629 var v gobject.Value
630 v.Init(gobject.TypeBooleanVal)
631 v.SetBoolean(value)
632 x.SetProperty("show-sidebar", &v)
633}
634
635// GetPropertyShowSidebar gets the "show-sidebar" property.
636// Whether the sidebar widget is shown.
637func (x *OverlaySplitView) GetPropertyShowSidebar() bool {
638 var v gobject.Value
639 x.GetProperty("show-sidebar", &v)
640 return v.GetBoolean()
641}
642
643// SetPropertySidebarWidthFraction sets the "sidebar-width-fraction" property.
644// The preferred sidebar width as a fraction of the total width.
645//
646// The preferred width is additionally limited by
647// [property@OverlaySplitView:min-sidebar-width] and
648// [property@OverlaySplitView:max-sidebar-width].
649//
650// The sidebar widget can be allocated with larger width if its own minimum
651// width exceeds the preferred width.
652func (x *OverlaySplitView) SetPropertySidebarWidthFraction(value float64) {
653 var v gobject.Value
654 v.Init(gobject.TypeDoubleVal)
655 v.SetDouble(value)
656 x.SetProperty("sidebar-width-fraction", &v)
657}
658
659// GetPropertySidebarWidthFraction gets the "sidebar-width-fraction" property.
660// The preferred sidebar width as a fraction of the total width.
661//
662// The preferred width is additionally limited by
663// [property@OverlaySplitView:min-sidebar-width] and
664// [property@OverlaySplitView:max-sidebar-width].
665//
666// The sidebar widget can be allocated with larger width if its own minimum
667// width exceeds the preferred width.
668func (x *OverlaySplitView) GetPropertySidebarWidthFraction() float64 {
669 var v gobject.Value
670 x.GetProperty("sidebar-width-fraction", &v)
671 return v.GetDouble()
672}
673
674// Gets the progress @self will snap back to after the gesture is canceled.
675func (x *OverlaySplitView) GetCancelProgress() float64 {
676
677 cret := XAdwSwipeableGetCancelProgress(x.GoPointer())
678 return cret
679}
680
681// Gets the swipe distance of @self.
682//
683// This corresponds to how many pixels 1 unit represents.
684func (x *OverlaySplitView) GetDistance() float64 {
685
686 cret := XAdwSwipeableGetDistance(x.GoPointer())
687 return cret
688}
689
690// Gets the current progress of @self.
691func (x *OverlaySplitView) GetProgress() float64 {
692
693 cret := XAdwSwipeableGetProgress(x.GoPointer())
694 return cret
695}
696
697// Gets the snap points of @self.
698//
699// Each snap point represents a progress value that is considered acceptable to
700// end the swipe on.
701func (x *OverlaySplitView) GetSnapPoints(NSnapPointsVar *int) uintptr {
702
703 cret := XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)
704 return cret
705}
706
707// Gets the area @self can start a swipe from for the given direction and
708// gesture type.
709//
710// This can be used to restrict swipes to only be possible from a certain area,
711// for example, to only allow edge swipes, or to have a draggable element and
712// ignore swipes elsewhere.
713//
714// If not implemented, the default implementation returns the allocation of
715// @self, allowing swipes from anywhere.
716func (x *OverlaySplitView) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDragVar bool, RectVar *gdk.Rectangle) {
717
718 XAdwSwipeableGetSwipeArea(x.GoPointer(), NavigationDirectionVar, IsDragVar, RectVar)
719
720}
721
722// Requests the user's screen reader to announce the given message.
723//
724// This kind of notification is useful for messages that
725// either have only a visual representation or that are not
726// exposed visually at all, e.g. a notification about a
727// successful operation.
728//
729// Also, by using this API, you can ensure that the message
730// does not interrupts the user's current screen reader output.
731func (x *OverlaySplitView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
732
733 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
734
735}
736
737// Retrieves the accessible parent for an accessible object.
738//
739// This function returns `NULL` for top level widgets.
740func (x *OverlaySplitView) GetAccessibleParent() *gtk.AccessibleBase {
741 var cls *gtk.AccessibleBase
742
743 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
744
745 if cret == 0 {
746 return nil
747 }
748 cls = >k.AccessibleBase{}
749 cls.Ptr = cret
750 return cls
751}
752
753// Retrieves the accessible role of an accessible object.
754func (x *OverlaySplitView) GetAccessibleRole() gtk.AccessibleRole {
755
756 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
757 return cret
758}
759
760// Retrieves the implementation for the given accessible object.
761func (x *OverlaySplitView) GetAtContext() *gtk.ATContext {
762 var cls *gtk.ATContext
763
764 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
765
766 if cret == 0 {
767 return nil
768 }
769 cls = >k.ATContext{}
770 cls.Ptr = cret
771 return cls
772}
773
774// Queries the coordinates and dimensions of this accessible
775//
776// This functionality can be overridden by `GtkAccessible`
777// implementations, e.g. to get the bounds from an ignored
778// child widget.
779func (x *OverlaySplitView) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
780
781 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
782 return cret
783}
784
785// Retrieves the first accessible child of an accessible object.
786func (x *OverlaySplitView) GetFirstAccessibleChild() *gtk.AccessibleBase {
787 var cls *gtk.AccessibleBase
788
789 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
790
791 if cret == 0 {
792 return nil
793 }
794 cls = >k.AccessibleBase{}
795 cls.Ptr = cret
796 return cls
797}
798
799// Retrieves the next accessible sibling of an accessible object
800func (x *OverlaySplitView) GetNextAccessibleSibling() *gtk.AccessibleBase {
801 var cls *gtk.AccessibleBase
802
803 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
804
805 if cret == 0 {
806 return nil
807 }
808 cls = >k.AccessibleBase{}
809 cls.Ptr = cret
810 return cls
811}
812
813// Queries a platform state, such as focus.
814//
815// This functionality can be overridden by `GtkAccessible`
816// implementations, e.g. to get platform state from an ignored
817// child widget, as is the case for `GtkText` wrappers.
818func (x *OverlaySplitView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
819
820 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
821 return cret
822}
823
824// Resets the accessible property to its default value.
825func (x *OverlaySplitView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
826
827 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
828
829}
830
831// Resets the accessible relation to its default value.
832func (x *OverlaySplitView) ResetRelation(RelationVar gtk.AccessibleRelation) {
833
834 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
835
836}
837
838// Resets the accessible state to its default value.
839func (x *OverlaySplitView) ResetState(StateVar gtk.AccessibleState) {
840
841 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
842
843}
844
845// Sets the parent and sibling of an accessible object.
846//
847// This function is meant to be used by accessible implementations that are
848// not part of the widget hierarchy, and but act as a logical bridge between
849// widgets. For instance, if a widget creates an object that holds metadata
850// for each child, and you want that object to implement the `GtkAccessible`
851// interface, you will use this function to ensure that the parent of each
852// child widget is the metadata object, and the parent of each metadata
853// object is the container widget.
854func (x *OverlaySplitView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
855
856 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
857
858}
859
860// Updates the next accessible sibling.
861//
862// That might be useful when a new child of a custom accessible
863// is created, and it needs to be linked to a previous child.
864func (x *OverlaySplitView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
865
866 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
867
868}
869
870// Informs ATs that the platform state has changed.
871//
872// This function should be used by `GtkAccessible` implementations that
873// have a platform state but are not widgets. Widgets handle platform
874// states automatically.
875func (x *OverlaySplitView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
876
877 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
878
879}
880
881// Updates a list of accessible properties.
882//
883// See the [enum@Gtk.AccessibleProperty] documentation for the
884// value types of accessible properties.
885//
886// This function should be called by `GtkWidget` types whenever
887// an accessible property change must be communicated to assistive
888// technologies.
889//
890// Example:
891// ```c
892// value = gtk_adjustment_get_value (adjustment);
893// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
894//
895// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
896// -1);
897//
898// ```
899func (x *OverlaySplitView) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
900
901 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
902
903}
904
905// Updates an array of accessible properties.
906//
907// This function should be called by `GtkWidget` types whenever an accessible
908// property change must be communicated to assistive technologies.
909//
910// This function is meant to be used by language bindings.
911func (x *OverlaySplitView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
912
913 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
914
915}
916
917// Updates a list of accessible relations.
918//
919// This function should be called by `GtkWidget` types whenever an accessible
920// relation change must be communicated to assistive technologies.
921//
922// If the [enum@Gtk.AccessibleRelation] requires a list of references,
923// you should pass each reference individually, followed by `NULL`, e.g.
924//
925// ```c
926// gtk_accessible_update_relation (accessible,
927//
928// GTK_ACCESSIBLE_RELATION_CONTROLS,
929// ref1, NULL,
930// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
931// ref1, ref2, ref3, NULL,
932// -1);
933//
934// ```
935func (x *OverlaySplitView) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
936
937 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
938
939}
940
941// Updates an array of accessible relations.
942//
943// This function should be called by `GtkWidget` types whenever an accessible
944// relation change must be communicated to assistive technologies.
945//
946// This function is meant to be used by language bindings.
947func (x *OverlaySplitView) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
948
949 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
950
951}
952
953// Updates a list of accessible states.
954//
955// See the [enum@Gtk.AccessibleState] documentation for the
956// value types of accessible states.
957//
958// This function should be called by `GtkWidget` types whenever
959// an accessible state change must be communicated to assistive
960// technologies.
961//
962// Example:
963//
964// ```c
965// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
966// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
967//
968// GTK_ACCESSIBLE_STATE_CHECKED, value,
969// -1);
970//
971// ```
972func (x *OverlaySplitView) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
973
974 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
975
976}
977
978// Updates an array of accessible states.
979//
980// This function should be called by `GtkWidget` types whenever an accessible
981// state change must be communicated to assistive technologies.
982//
983// This function is meant to be used by language bindings.
984func (x *OverlaySplitView) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
985
986 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
987
988}
989
990// Gets the ID of the @buildable object.
991//
992// `GtkBuilder` sets the name based on the ID attribute
993// of the `<object>` tag used to construct the @buildable.
994func (x *OverlaySplitView) GetBuildableId() string {
995
996 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
997 return cret
998}
999
1000func init() {
1001 core.SetPackageName("ADW", "libadwaita-1")
1002 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
1003 var libs []uintptr
1004 for _, libPath := range core.GetPaths("ADW") {
1005 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1006 if err != nil {
1007 panic(err)
1008 }
1009 libs = append(libs, lib)
1010 }
1011
1012 core.PuregoSafeRegister(&xOverlaySplitViewGLibType, libs, "adw_overlay_split_view_get_type")
1013
1014 core.PuregoSafeRegister(&xNewOverlaySplitView, libs, "adw_overlay_split_view_new")
1015
1016 core.PuregoSafeRegister(&xOverlaySplitViewGetCollapsed, libs, "adw_overlay_split_view_get_collapsed")
1017 core.PuregoSafeRegister(&xOverlaySplitViewGetContent, libs, "adw_overlay_split_view_get_content")
1018 core.PuregoSafeRegister(&xOverlaySplitViewGetEnableHideGesture, libs, "adw_overlay_split_view_get_enable_hide_gesture")
1019 core.PuregoSafeRegister(&xOverlaySplitViewGetEnableShowGesture, libs, "adw_overlay_split_view_get_enable_show_gesture")
1020 core.PuregoSafeRegister(&xOverlaySplitViewGetMaxSidebarWidth, libs, "adw_overlay_split_view_get_max_sidebar_width")
1021 core.PuregoSafeRegister(&xOverlaySplitViewGetMinSidebarWidth, libs, "adw_overlay_split_view_get_min_sidebar_width")
1022 core.PuregoSafeRegister(&xOverlaySplitViewGetPinSidebar, libs, "adw_overlay_split_view_get_pin_sidebar")
1023 core.PuregoSafeRegister(&xOverlaySplitViewGetShowSidebar, libs, "adw_overlay_split_view_get_show_sidebar")
1024 core.PuregoSafeRegister(&xOverlaySplitViewGetSidebar, libs, "adw_overlay_split_view_get_sidebar")
1025 core.PuregoSafeRegister(&xOverlaySplitViewGetSidebarPosition, libs, "adw_overlay_split_view_get_sidebar_position")
1026 core.PuregoSafeRegister(&xOverlaySplitViewGetSidebarWidthFraction, libs, "adw_overlay_split_view_get_sidebar_width_fraction")
1027 core.PuregoSafeRegister(&xOverlaySplitViewGetSidebarWidthUnit, libs, "adw_overlay_split_view_get_sidebar_width_unit")
1028 core.PuregoSafeRegister(&xOverlaySplitViewSetCollapsed, libs, "adw_overlay_split_view_set_collapsed")
1029 core.PuregoSafeRegister(&xOverlaySplitViewSetContent, libs, "adw_overlay_split_view_set_content")
1030 core.PuregoSafeRegister(&xOverlaySplitViewSetEnableHideGesture, libs, "adw_overlay_split_view_set_enable_hide_gesture")
1031 core.PuregoSafeRegister(&xOverlaySplitViewSetEnableShowGesture, libs, "adw_overlay_split_view_set_enable_show_gesture")
1032 core.PuregoSafeRegister(&xOverlaySplitViewSetMaxSidebarWidth, libs, "adw_overlay_split_view_set_max_sidebar_width")
1033 core.PuregoSafeRegister(&xOverlaySplitViewSetMinSidebarWidth, libs, "adw_overlay_split_view_set_min_sidebar_width")
1034 core.PuregoSafeRegister(&xOverlaySplitViewSetPinSidebar, libs, "adw_overlay_split_view_set_pin_sidebar")
1035 core.PuregoSafeRegister(&xOverlaySplitViewSetShowSidebar, libs, "adw_overlay_split_view_set_show_sidebar")
1036 core.PuregoSafeRegister(&xOverlaySplitViewSetSidebar, libs, "adw_overlay_split_view_set_sidebar")
1037 core.PuregoSafeRegister(&xOverlaySplitViewSetSidebarPosition, libs, "adw_overlay_split_view_set_sidebar_position")
1038 core.PuregoSafeRegister(&xOverlaySplitViewSetSidebarWidthFraction, libs, "adw_overlay_split_view_set_sidebar_width_fraction")
1039 core.PuregoSafeRegister(&xOverlaySplitViewSetSidebarWidthUnit, libs, "adw_overlay_split_view_set_sidebar_width_unit")
1040
1041}