-
Notifications
You must be signed in to change notification settings - Fork 6
/
adw-overlay-split-view_1_4.go
820 lines (690 loc) · 22.6 KB
/
adw-overlay-split-view_1_4.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
// Code generated by girgen. DO NOT EDIT.
package adw
import (
"runtime"
"unsafe"
"github.com/diamondburned/gotk4/pkg/core/gextras"
coreglib "github.com/diamondburned/gotk4/pkg/core/glib"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
)
// #include <stdlib.h>
// #include <adwaita.h>
// #include <glib-object.h>
import "C"
// GType values.
var (
GTypeOverlaySplitView = coreglib.Type(C.adw_overlay_split_view_get_type())
)
func init() {
coreglib.RegisterGValueMarshalers([]coreglib.TypeMarshaler{
coreglib.TypeMarshaler{T: GTypeOverlaySplitView, F: marshalOverlaySplitView},
})
}
// OverlaySplitViewOverrides contains methods that are overridable.
type OverlaySplitViewOverrides struct {
}
func defaultOverlaySplitViewOverrides(v *OverlaySplitView) OverlaySplitViewOverrides {
return OverlaySplitViewOverrides{}
}
// OverlaySplitView: widget presenting sidebar and content side by side or as an
// overlay.
//
// <picture> <source srcset="overlay-split-view-dark.png"
// media="(prefers-color-scheme: dark)"> <img src="overlay-split-view.png"
// alt="overlay-split-view"> </picture> <picture> <source
// srcset="overlay-split-view-collapsed-dark.png" media="(prefers-color-scheme:
// dark)"> <img src="overlay-split-view-collapsed.png"
// alt="overlay-split-view-collapsed"> </picture>
//
// AdwOverlaySplitView has two children: sidebar and content, and displays them
// side by side.
//
// When overlaysplitview:collapsed is set to TRUE, the sidebar is instead shown
// as an overlay above the content widget.
//
// The sidebar can be hidden or shown using the overlaysplitview:show-sidebar
// property.
//
// Sidebar can be displayed before or after the content, this can be controlled
// with the overlaysplitview:sidebar-position property.
//
// Collapsing the split view automatically hides the sidebar widget,
// and uncollapsing it shows the sidebar. If this behavior is not desired,
// the overlaysplitview:pin-sidebar property can be used to override it.
//
// AdwOverlaySplitView supports an edge swipe gesture for showing the sidebar,
// and a swipe from the sidebar for hiding it. Gestures are only supported
// on touchscreen, but not touchpad. Gestures can be controlled with the
// overlaysplitview:enable-show-gesture and overlaysplitview:enable-hide-gesture
// properties.
//
// See also navigationsplitview.
//
// AdwOverlaySplitView is typically used together with an breakpoint setting the
// collapsed property to TRUE on small widths, as follows:
//
// <object class="AdwWindow">
// <property name="width-request">360</property>
// <property name="height-request">200</property>
// <property name="default-width">800</property>
// <property name="default-height">800</property>
// <child>
// <object class="AdwBreakpoint">
// <condition>max-width: 400sp</condition>
// <setter object="split_view" property="collapsed">True</setter>
// </object>
// </child>
// <property name="content">
// <object class="AdwOverlaySplitView" id="split_view">
// <property name="sidebar">
// <!-- ... -->
// </property>
// <property name="content">
// <!-- ... -->
// </property>
// </object>
// </property>
// </object>
//
// AdwOverlaySplitView is often used for implementing the utility pane
// (https://developer.gnome.org/hig/patterns/containers/utility-panes.html)
// pattern.
//
// # Sizing
//
// When not collapsed, AdwOverlaySplitView changes the sidebar width depending
// on its own width.
//
// If possible, it tries to allocate a fraction of the total width, controlled
// with the overlaysplitview:sidebar-width-fraction property.
//
// The sidebar also has minimum and maximum sizes, controlled with the
// overlaysplitview:min-sidebar-width and overlaysplitview:max-sidebar-width
// properties.
//
// The minimum and maximum sizes are using the length unit specified with the
// overlaysplitview:sidebar-width-unit.
//
// By default, sidebar is using 25% of the total width, with 180sp as the
// minimum size and 280sp as the maximum size.
//
// When collapsed, the preferred width fraction is ignored and the sidebar uses
// overlaysplitview:max-sidebar-width when possible.
//
// # Header Bar Integration
//
// When used inside AdwOverlaySplitView, headerbar will automatically hide the
// window buttons in the middle.
//
// # AdwOverlaySplitView as GtkBuildable
//
// The AdwOverlaySplitView implementation of the gtk.Buildable interface
// supports setting the sidebar widget by specifying “sidebar” as the “type”
// attribute of a <child> element, Specifying “content” child type or omitting
// it results in setting the content widget.
//
// # CSS nodes
//
// AdwOverlaySplitView has a single CSS node with the name overlay-split-view.
//
// It contains two nodes with the name widget, containing the sidebar and
// content children.
//
// When not collapsed, they have the .sidebar-view and .content-view style
// classes respectively.
//
// overlay-split-view
// ├── widget.sidebar-pane
// │ ╰── [sidebar child]
// ╰── widget.content-pane
// ╰── [content child]
//
// When collapsed, the one containing the sidebar child has the .background
// style class and the other one has no style classes.
//
// overlay-split-view
// ├── widget.background
// │ ╰── [sidebar child]
// ╰── widget
// ╰── [content child]
//
// # Accessibility
//
// AdwOverlaySplitView uses the GTK_ACCESSIBLE_ROLE_GROUP role.
type OverlaySplitView struct {
_ [0]func() // equal guard
gtk.Widget
*coreglib.Object
Swipeable
}
var (
_ gtk.Widgetter = (*OverlaySplitView)(nil)
_ coreglib.Objector = (*OverlaySplitView)(nil)
)
func init() {
coreglib.RegisterClassInfo[*OverlaySplitView, *OverlaySplitViewClass, OverlaySplitViewOverrides](
GTypeOverlaySplitView,
initOverlaySplitViewClass,
wrapOverlaySplitView,
defaultOverlaySplitViewOverrides,
)
}
func initOverlaySplitViewClass(gclass unsafe.Pointer, overrides OverlaySplitViewOverrides, classInitFunc func(*OverlaySplitViewClass)) {
if classInitFunc != nil {
class := (*OverlaySplitViewClass)(gextras.NewStructNative(gclass))
classInitFunc(class)
}
}
func wrapOverlaySplitView(obj *coreglib.Object) *OverlaySplitView {
return &OverlaySplitView{
Widget: gtk.Widget{
InitiallyUnowned: coreglib.InitiallyUnowned{
Object: obj,
},
Object: obj,
Accessible: gtk.Accessible{
Object: obj,
},
Buildable: gtk.Buildable{
Object: obj,
},
ConstraintTarget: gtk.ConstraintTarget{
Object: obj,
},
},
Object: obj,
Swipeable: Swipeable{
Widget: gtk.Widget{
InitiallyUnowned: coreglib.InitiallyUnowned{
Object: obj,
},
Object: obj,
Accessible: gtk.Accessible{
Object: obj,
},
Buildable: gtk.Buildable{
Object: obj,
},
ConstraintTarget: gtk.ConstraintTarget{
Object: obj,
},
},
},
}
}
func marshalOverlaySplitView(p uintptr) (interface{}, error) {
return wrapOverlaySplitView(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}
// NewOverlaySplitView creates a new AdwOverlaySplitView.
//
// The function returns the following values:
//
// - overlaySplitView: newly created AdwOverlaySplitView.
//
func NewOverlaySplitView() *OverlaySplitView {
var _cret *C.GtkWidget // in
_cret = C.adw_overlay_split_view_new()
var _overlaySplitView *OverlaySplitView // out
_overlaySplitView = wrapOverlaySplitView(coreglib.Take(unsafe.Pointer(_cret)))
return _overlaySplitView
}
// Collapsed gets whether self is collapsed.
//
// The function returns the following values:
//
// - ok: whether self is collapsed.
//
func (self *OverlaySplitView) Collapsed() bool {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.gboolean // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_collapsed(_arg0)
runtime.KeepAlive(self)
var _ok bool // out
if _cret != 0 {
_ok = true
}
return _ok
}
// Content gets the content widget for self.
//
// The function returns the following values:
//
// - widget (optional): content widget for self.
//
func (self *OverlaySplitView) Content() gtk.Widgetter {
var _arg0 *C.AdwOverlaySplitView // out
var _cret *C.GtkWidget // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_content(_arg0)
runtime.KeepAlive(self)
var _widget gtk.Widgetter // out
if _cret != nil {
{
objptr := unsafe.Pointer(_cret)
object := coreglib.Take(objptr)
casted := object.WalkCast(func(obj coreglib.Objector) bool {
_, ok := obj.(gtk.Widgetter)
return ok
})
rv, ok := casted.(gtk.Widgetter)
if !ok {
panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
}
_widget = rv
}
}
return _widget
}
// EnableHideGesture gets whether self can be closed with a swipe gesture.
//
// The function returns the following values:
//
// - ok: TRUE if self can be closed with a swipe gesture.
//
func (self *OverlaySplitView) EnableHideGesture() bool {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.gboolean // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_enable_hide_gesture(_arg0)
runtime.KeepAlive(self)
var _ok bool // out
if _cret != 0 {
_ok = true
}
return _ok
}
// EnableShowGesture gets whether self can be opened with an edge swipe gesture.
//
// The function returns the following values:
//
// - ok: TRUE if self can be opened with a swipe gesture.
//
func (self *OverlaySplitView) EnableShowGesture() bool {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.gboolean // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_enable_show_gesture(_arg0)
runtime.KeepAlive(self)
var _ok bool // out
if _cret != 0 {
_ok = true
}
return _ok
}
// MaxSidebarWidth gets the maximum sidebar width for self.
//
// The function returns the following values:
//
// - gdouble: maximum width.
//
func (self *OverlaySplitView) MaxSidebarWidth() float64 {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.double // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_max_sidebar_width(_arg0)
runtime.KeepAlive(self)
var _gdouble float64 // out
_gdouble = float64(_cret)
return _gdouble
}
// MinSidebarWidth gets the minimum sidebar width for self.
//
// The function returns the following values:
//
// - gdouble: minimum width.
//
func (self *OverlaySplitView) MinSidebarWidth() float64 {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.double // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_min_sidebar_width(_arg0)
runtime.KeepAlive(self)
var _gdouble float64 // out
_gdouble = float64(_cret)
return _gdouble
}
// PINSidebar gets whether the sidebar widget is pinned for self.
//
// The function returns the following values:
//
// - ok: whether if the sidebar widget is pinned.
//
func (self *OverlaySplitView) PINSidebar() bool {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.gboolean // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_pin_sidebar(_arg0)
runtime.KeepAlive(self)
var _ok bool // out
if _cret != 0 {
_ok = true
}
return _ok
}
// ShowSidebar gets whether the sidebar widget is shown for self.
//
// The function returns the following values:
//
// - ok: TRUE if the sidebar widget is shown.
//
func (self *OverlaySplitView) ShowSidebar() bool {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.gboolean // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_show_sidebar(_arg0)
runtime.KeepAlive(self)
var _ok bool // out
if _cret != 0 {
_ok = true
}
return _ok
}
// Sidebar gets the sidebar widget for self.
//
// The function returns the following values:
//
// - widget (optional): sidebar widget for self.
//
func (self *OverlaySplitView) Sidebar() gtk.Widgetter {
var _arg0 *C.AdwOverlaySplitView // out
var _cret *C.GtkWidget // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_sidebar(_arg0)
runtime.KeepAlive(self)
var _widget gtk.Widgetter // out
if _cret != nil {
{
objptr := unsafe.Pointer(_cret)
object := coreglib.Take(objptr)
casted := object.WalkCast(func(obj coreglib.Objector) bool {
_, ok := obj.(gtk.Widgetter)
return ok
})
rv, ok := casted.(gtk.Widgetter)
if !ok {
panic("no marshaler for " + object.TypeFromInstance().String() + " matching gtk.Widgetter")
}
_widget = rv
}
}
return _widget
}
// SidebarPosition gets the sidebar position for self.
//
// The function returns the following values:
//
// - packType: sidebar position for self.
//
func (self *OverlaySplitView) SidebarPosition() gtk.PackType {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.GtkPackType // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_sidebar_position(_arg0)
runtime.KeepAlive(self)
var _packType gtk.PackType // out
_packType = gtk.PackType(_cret)
return _packType
}
// SidebarWidthFraction gets the preferred sidebar width fraction for self.
//
// The function returns the following values:
//
// - gdouble: preferred width fraction.
//
func (self *OverlaySplitView) SidebarWidthFraction() float64 {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.double // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_sidebar_width_fraction(_arg0)
runtime.KeepAlive(self)
var _gdouble float64 // out
_gdouble = float64(_cret)
return _gdouble
}
// SidebarWidthUnit gets the length unit for minimum and maximum sidebar widths.
//
// The function returns the following values:
//
// - lengthUnit: length unit.
//
func (self *OverlaySplitView) SidebarWidthUnit() LengthUnit {
var _arg0 *C.AdwOverlaySplitView // out
var _cret C.AdwLengthUnit // in
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_cret = C.adw_overlay_split_view_get_sidebar_width_unit(_arg0)
runtime.KeepAlive(self)
var _lengthUnit LengthUnit // out
_lengthUnit = LengthUnit(_cret)
return _lengthUnit
}
// SetCollapsed sets whether self view is collapsed.
//
// When collapsed, the sidebar widget is presented as an overlay above the
// content widget, otherwise they are displayed side by side.
//
// The function takes the following parameters:
//
// - collapsed: whether self is collapsed.
//
func (self *OverlaySplitView) SetCollapsed(collapsed bool) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.gboolean // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
if collapsed {
_arg1 = C.TRUE
}
C.adw_overlay_split_view_set_collapsed(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(collapsed)
}
// SetContent sets the content widget for self.
//
// The function takes the following parameters:
//
// - content (optional) widget.
//
func (self *OverlaySplitView) SetContent(content gtk.Widgetter) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 *C.GtkWidget // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
if content != nil {
_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(content).Native()))
}
C.adw_overlay_split_view_set_content(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(content)
}
// SetEnableHideGesture sets whether self can be closed with a swipe gesture.
//
// Only touchscreen swipes are supported.
//
// The function takes the following parameters:
//
// - enableHideGesture: whether self can be closed with a swipe gesture.
//
func (self *OverlaySplitView) SetEnableHideGesture(enableHideGesture bool) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.gboolean // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
if enableHideGesture {
_arg1 = C.TRUE
}
C.adw_overlay_split_view_set_enable_hide_gesture(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(enableHideGesture)
}
// SetEnableShowGesture sets whether self can be opened with an edge swipe
// gesture.
//
// Only touchscreen swipes are supported.
//
// The function takes the following parameters:
//
// - enableShowGesture: whether self can be opened with a swipe gesture.
//
func (self *OverlaySplitView) SetEnableShowGesture(enableShowGesture bool) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.gboolean // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
if enableShowGesture {
_arg1 = C.TRUE
}
C.adw_overlay_split_view_set_enable_show_gesture(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(enableShowGesture)
}
// SetMaxSidebarWidth sets the maximum sidebar width for self.
//
// Maximum width is affected by overlaysplitview:sidebar-width-unit.
//
// The sidebar widget can still be allocated with larger width if its own
// minimum width exceeds it.
//
// The function takes the following parameters:
//
// - width: maximum width.
//
func (self *OverlaySplitView) SetMaxSidebarWidth(width float64) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.double // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_arg1 = C.double(width)
C.adw_overlay_split_view_set_max_sidebar_width(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(width)
}
// SetMinSidebarWidth sets the minimum sidebar width for self.
//
// Minimum width is affected by overlaysplitview:sidebar-width-unit.
//
// The sidebar widget can still be allocated with larger width if its own
// minimum width exceeds it.
//
// The function takes the following parameters:
//
// - width: minimum width.
//
func (self *OverlaySplitView) SetMinSidebarWidth(width float64) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.double // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_arg1 = C.double(width)
C.adw_overlay_split_view_set_min_sidebar_width(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(width)
}
// SetPINSidebar sets whether the sidebar widget is pinned for self.
//
// By default, collapsing self automatically hides the sidebar widget, and
// uncollapsing it shows the sidebar. If set to TRUE, sidebar visibility never
// changes on its own.
//
// The function takes the following parameters:
//
// - pinSidebar: whether to pin the sidebar widget.
//
func (self *OverlaySplitView) SetPINSidebar(pinSidebar bool) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.gboolean // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
if pinSidebar {
_arg1 = C.TRUE
}
C.adw_overlay_split_view_set_pin_sidebar(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(pinSidebar)
}
// SetShowSidebar sets whether the sidebar widget is shown for self.
//
// The function takes the following parameters:
//
// - showSidebar: whether to show the sidebar widget.
//
func (self *OverlaySplitView) SetShowSidebar(showSidebar bool) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.gboolean // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
if showSidebar {
_arg1 = C.TRUE
}
C.adw_overlay_split_view_set_show_sidebar(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(showSidebar)
}
// SetSidebar sets the sidebar widget for self.
//
// The function takes the following parameters:
//
// - sidebar (optional) widget.
//
func (self *OverlaySplitView) SetSidebar(sidebar gtk.Widgetter) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 *C.GtkWidget // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
if sidebar != nil {
_arg1 = (*C.GtkWidget)(unsafe.Pointer(coreglib.InternObject(sidebar).Native()))
}
C.adw_overlay_split_view_set_sidebar(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(sidebar)
}
// SetSidebarPosition sets the sidebar position for self.
//
// If it's set to GTK_PACK_START, the sidebar is displayed before the content,
// if GTK_PACK_END, it's displayed after the content.
//
// The function takes the following parameters:
//
// - position: new position.
//
func (self *OverlaySplitView) SetSidebarPosition(position gtk.PackType) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.GtkPackType // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_arg1 = C.GtkPackType(position)
C.adw_overlay_split_view_set_sidebar_position(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(position)
}
// SetSidebarWidthFraction sets the preferred sidebar width as a fraction of the
// total width of self.
//
// The preferred width is additionally limited by
// overlaysplitview:min-sidebar-width and overlaysplitview:max-sidebar-width.
//
// The sidebar widget can be allocated with larger width if its own minimum
// width exceeds the preferred width.
//
// The function takes the following parameters:
//
// - fraction: preferred width fraction.
//
func (self *OverlaySplitView) SetSidebarWidthFraction(fraction float64) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.double // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_arg1 = C.double(fraction)
C.adw_overlay_split_view_set_sidebar_width_fraction(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(fraction)
}
// SetSidebarWidthUnit sets the length unit for minimum and maximum sidebar
// widths.
//
// See overlaysplitview:min-sidebar-width and
// overlaysplitview:max-sidebar-width.
//
// The function takes the following parameters:
//
// - unit: length unit.
//
func (self *OverlaySplitView) SetSidebarWidthUnit(unit LengthUnit) {
var _arg0 *C.AdwOverlaySplitView // out
var _arg1 C.AdwLengthUnit // out
_arg0 = (*C.AdwOverlaySplitView)(unsafe.Pointer(coreglib.InternObject(self).Native()))
_arg1 = C.AdwLengthUnit(unit)
C.adw_overlay_split_view_set_sidebar_width_unit(_arg0, _arg1)
runtime.KeepAlive(self)
runtime.KeepAlive(unit)
}