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 NavigationSplitViewClass struct {
17 _ structs.HostLayout
18
19 ParentClass gtk.WidgetClass
20}
21
22func (x *NavigationSplitViewClass) GoPointer() uintptr {
23 return uintptr(unsafe.Pointer(x))
24}
25
26// A widget presenting sidebar and content side by side or as a navigation view.
27//
28// <picture>
29//
30// <source srcset="navigation-split-view-dark.png" media="(prefers-color-scheme: dark)">
31// <img src="navigation-split-view.png" alt="navigation-split-view">
32//
33// </picture>
34// <picture>
35//
36// <source srcset="navigation-split-view-collapsed-dark.png" media="(prefers-color-scheme: dark)">
37// <img src="navigation-split-view-collapsed.png" alt="navigation-split-view-collapsed">
38//
39// </picture>
40//
41// `AdwNavigationSplitView` has two [class@NavigationPage] children: sidebar and
42// content, and displays them side by side.
43//
44// When [property@NavigationSplitView:collapsed] is set to `TRUE`, it instead
45// puts both children inside an [class@NavigationView]. The
46// [property@NavigationSplitView:show-content] controls which child is visible
47// while collapsed.
48//
49// See also [class@OverlaySplitView].
50//
51// `AdwNavigationSplitView` is typically used together with an [class@Breakpoint]
52// setting the `collapsed` property to `TRUE` on small widths, as follows:
53//
54// ```xml
55// <object class="AdwWindow">
56//
57// <property name="width-request">280</property>
58// <property name="height-request">200</property>
59// <property name="default-width">800</property>
60// <property name="default-height">800</property>
61// <child>
62// <object class="AdwBreakpoint">
63// <condition>max-width: 400sp</condition>
64// <setter object="split_view" property="collapsed">True</setter>
65// </object>
66// </child>
67// <property name="content">
68// <object class="AdwNavigationSplitView" id="split_view">
69// <property name="sidebar">
70// <object class="AdwNavigationPage">
71// <property name="title" translatable="yes">Sidebar</property>
72// <property name="child">
73// <!-- ... -->
74// </property>
75// </object>
76// </property>
77// <property name="content">
78// <object class="AdwNavigationPage">
79// <property name="title" translatable="yes">Content</property>
80// <property name="child">
81// <!-- ... -->
82// </property>
83// </object>
84// </property>
85// </object>
86// </property>
87//
88// </object>
89// ```
90//
91// ## Sizing
92//
93// When not collapsed, `AdwNavigationSplitView` changes the sidebar width
94// depending on its own width.
95//
96// If possible, it tries to allocate a fraction of the total width, controlled
97// with the [property@NavigationSplitView:sidebar-width-fraction] property.
98//
99// The sidebar also has minimum and maximum sizes, controlled with the
100// [property@NavigationSplitView:min-sidebar-width] and
101// [property@NavigationSplitView:max-sidebar-width] properties.
102//
103// The minimum and maximum sizes are using the length unit specified with the
104// [property@NavigationSplitView:sidebar-width-unit].
105//
106// By default, sidebar is using 25% of the total width, with 180sp as the
107// minimum size and 280sp as the maximum size.
108//
109// ## Header Bar Integration
110//
111// When used inside `AdwNavigationSplitView`, [class@HeaderBar] will
112// automatically hide the window buttons in the middle.
113//
114// When collapsed, it also displays a back button for the content widget, as
115// well as the page titles. See [class@NavigationView] documentation for details.
116//
117// ## Actions
118//
119// `AdwNavigationSplitView` defines the same actions as `AdwNavigationView`, but
120// they can be used even when the split view is not collapsed:
121//
122// - `navigation.push` takes a string parameter specifying the tag of the page
123// to push. If it matches the tag of the content widget, it sets
124// [property@NavigationSplitView:show-content] to `TRUE`.
125//
126// - `navigation.pop` doesn't take any parameters and sets
127// [property@NavigationSplitView:show-content] to `FALSE`.
128//
129// ## `AdwNavigationSplitView` as `GtkBuildable`
130//
131// The `AdwNavigationSplitView` implementation of the [iface@Gtk.Buildable]
132// interface supports setting the sidebar widget by specifying “sidebar” as the
133// “type” attribute of a `<child>` element, Specifying “content” child type or
134// omitting it results in setting the content widget.
135//
136// ## CSS nodes
137//
138// `AdwNavigationSplitView` has a single CSS node with the name
139// `navigation-split-view`.
140//
141// When collapsed, it contains a child node with the name `navigation-view`
142// containing both children.
143//
144// ```
145// navigation-split-view
146// ╰── navigation-view
147//
148// ├── [sidebar child]
149// ╰── [content child]
150//
151// ```
152//
153// When not collapsed, it contains two nodes with the name `widget`, one with
154// the `.sidebar-pane` style class, the other one with `.content-view` style
155// class, containing the sidebar and content children respectively.
156//
157// ```
158// navigation-split-view
159// ├── widget.sidebar-pane
160// │ ╰── [sidebar child]
161// ╰── widget.content-pane
162//
163// ╰── [content child]
164//
165// ```
166//
167// ## Accessibility
168//
169// `AdwNavigationSplitView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
170type NavigationSplitView struct {
171 gtk.Widget
172}
173
174var xNavigationSplitViewGLibType func() types.GType
175
176func NavigationSplitViewGLibType() types.GType {
177 return xNavigationSplitViewGLibType()
178}
179
180func NavigationSplitViewNewFromInternalPtr(ptr uintptr) *NavigationSplitView {
181 cls := &NavigationSplitView{}
182 cls.Ptr = ptr
183 return cls
184}
185
186var xNewNavigationSplitView func() uintptr
187
188// Creates a new `AdwNavigationSplitView`.
189func NewNavigationSplitView() *NavigationSplitView {
190 var cls *NavigationSplitView
191
192 cret := xNewNavigationSplitView()
193
194 if cret == 0 {
195 return nil
196 }
197 gobject.IncreaseRef(cret)
198 cls = &NavigationSplitView{}
199 cls.Ptr = cret
200 return cls
201}
202
203var xNavigationSplitViewGetCollapsed func(uintptr) bool
204
205// Gets whether @self is collapsed.
206func (x *NavigationSplitView) GetCollapsed() bool {
207
208 cret := xNavigationSplitViewGetCollapsed(x.GoPointer())
209 return cret
210}
211
212var xNavigationSplitViewGetContent func(uintptr) uintptr
213
214// Sets the content widget for @self.
215func (x *NavigationSplitView) GetContent() *NavigationPage {
216 var cls *NavigationPage
217
218 cret := xNavigationSplitViewGetContent(x.GoPointer())
219
220 if cret == 0 {
221 return nil
222 }
223 gobject.IncreaseRef(cret)
224 cls = &NavigationPage{}
225 cls.Ptr = cret
226 return cls
227}
228
229var xNavigationSplitViewGetMaxSidebarWidth func(uintptr) float64
230
231// Gets the maximum sidebar width for @self.
232func (x *NavigationSplitView) GetMaxSidebarWidth() float64 {
233
234 cret := xNavigationSplitViewGetMaxSidebarWidth(x.GoPointer())
235 return cret
236}
237
238var xNavigationSplitViewGetMinSidebarWidth func(uintptr) float64
239
240// Gets the minimum sidebar width for @self.
241func (x *NavigationSplitView) GetMinSidebarWidth() float64 {
242
243 cret := xNavigationSplitViewGetMinSidebarWidth(x.GoPointer())
244 return cret
245}
246
247var xNavigationSplitViewGetShowContent func(uintptr) bool
248
249// Gets which page is visible when @self is collapsed.
250func (x *NavigationSplitView) GetShowContent() bool {
251
252 cret := xNavigationSplitViewGetShowContent(x.GoPointer())
253 return cret
254}
255
256var xNavigationSplitViewGetSidebar func(uintptr) uintptr
257
258// Gets the sidebar widget for @self.
259func (x *NavigationSplitView) GetSidebar() *NavigationPage {
260 var cls *NavigationPage
261
262 cret := xNavigationSplitViewGetSidebar(x.GoPointer())
263
264 if cret == 0 {
265 return nil
266 }
267 gobject.IncreaseRef(cret)
268 cls = &NavigationPage{}
269 cls.Ptr = cret
270 return cls
271}
272
273var xNavigationSplitViewGetSidebarPosition func(uintptr) gtk.PackType
274
275// Gets the sidebar position for @self.
276func (x *NavigationSplitView) GetSidebarPosition() gtk.PackType {
277
278 cret := xNavigationSplitViewGetSidebarPosition(x.GoPointer())
279 return cret
280}
281
282var xNavigationSplitViewGetSidebarWidthFraction func(uintptr) float64
283
284// Gets the preferred sidebar width fraction for @self.
285func (x *NavigationSplitView) GetSidebarWidthFraction() float64 {
286
287 cret := xNavigationSplitViewGetSidebarWidthFraction(x.GoPointer())
288 return cret
289}
290
291var xNavigationSplitViewGetSidebarWidthUnit func(uintptr) LengthUnit
292
293// Gets the length unit for minimum and maximum sidebar widths.
294func (x *NavigationSplitView) GetSidebarWidthUnit() LengthUnit {
295
296 cret := xNavigationSplitViewGetSidebarWidthUnit(x.GoPointer())
297 return cret
298}
299
300var xNavigationSplitViewSetCollapsed func(uintptr, bool)
301
302// Sets whether @self is collapsed.
303//
304// When collapsed, the children are put inside an [class@NavigationView],
305// otherwise they are displayed side by side.
306//
307// The [property@NavigationSplitView:show-content] controls which child is
308// visible while collapsed.
309func (x *NavigationSplitView) SetCollapsed(CollapsedVar bool) {
310
311 xNavigationSplitViewSetCollapsed(x.GoPointer(), CollapsedVar)
312
313}
314
315var xNavigationSplitViewSetContent func(uintptr, uintptr)
316
317// Sets the content widget for @self.
318func (x *NavigationSplitView) SetContent(ContentVar *NavigationPage) {
319
320 xNavigationSplitViewSetContent(x.GoPointer(), ContentVar.GoPointer())
321
322}
323
324var xNavigationSplitViewSetMaxSidebarWidth func(uintptr, float64)
325
326// Sets the maximum sidebar width for @self.
327//
328// Maximum width is affected by
329// [property@NavigationSplitView:sidebar-width-unit].
330//
331// The sidebar widget can still be allocated with larger width if its own
332// minimum width exceeds it.
333func (x *NavigationSplitView) SetMaxSidebarWidth(WidthVar float64) {
334
335 xNavigationSplitViewSetMaxSidebarWidth(x.GoPointer(), WidthVar)
336
337}
338
339var xNavigationSplitViewSetMinSidebarWidth func(uintptr, float64)
340
341// Sets the minimum sidebar width for @self.
342//
343// Minimum width is affected by
344// [property@NavigationSplitView:sidebar-width-unit].
345//
346// The sidebar widget can still be allocated with larger width if its own
347// minimum width exceeds it.
348func (x *NavigationSplitView) SetMinSidebarWidth(WidthVar float64) {
349
350 xNavigationSplitViewSetMinSidebarWidth(x.GoPointer(), WidthVar)
351
352}
353
354var xNavigationSplitViewSetShowContent func(uintptr, bool)
355
356// Sets which page is visible when @self is collapsed.
357//
358// If set to `TRUE`, the content widget will be the visible page when
359// [property@NavigationSplitView:collapsed] is `TRUE`; otherwise the sidebar
360// widget will be visible.
361//
362// If the split view is already collapsed, the visible page changes immediately.
363func (x *NavigationSplitView) SetShowContent(ShowContentVar bool) {
364
365 xNavigationSplitViewSetShowContent(x.GoPointer(), ShowContentVar)
366
367}
368
369var xNavigationSplitViewSetSidebar func(uintptr, uintptr)
370
371// Sets the sidebar widget for @self.
372func (x *NavigationSplitView) SetSidebar(SidebarVar *NavigationPage) {
373
374 xNavigationSplitViewSetSidebar(x.GoPointer(), SidebarVar.GoPointer())
375
376}
377
378var xNavigationSplitViewSetSidebarPosition func(uintptr, gtk.PackType)
379
380// Sets the sidebar position for @self.
381//
382// If set to `GTK_PACK_START`, the sidebar is displayed before the content,
383// and the sidebar will be the root page when collapsed.
384//
385// If set to `GTK_PACK_END`, the sidebar is displayed after the content,
386// and the content will be the root page.
387func (x *NavigationSplitView) SetSidebarPosition(PositionVar gtk.PackType) {
388
389 xNavigationSplitViewSetSidebarPosition(x.GoPointer(), PositionVar)
390
391}
392
393var xNavigationSplitViewSetSidebarWidthFraction func(uintptr, float64)
394
395// Sets the preferred sidebar width as a fraction of the total width of @self.
396//
397// The preferred width is additionally limited by
398// [property@NavigationSplitView:min-sidebar-width] and
399// [property@NavigationSplitView:max-sidebar-width].
400//
401// The sidebar widget can be allocated with larger width if its own minimum
402// width exceeds the preferred width.
403func (x *NavigationSplitView) SetSidebarWidthFraction(FractionVar float64) {
404
405 xNavigationSplitViewSetSidebarWidthFraction(x.GoPointer(), FractionVar)
406
407}
408
409var xNavigationSplitViewSetSidebarWidthUnit func(uintptr, LengthUnit)
410
411// Sets the length unit for minimum and maximum sidebar widths.
412//
413// See [property@NavigationSplitView:min-sidebar-width] and
414// [property@NavigationSplitView:max-sidebar-width].
415func (x *NavigationSplitView) SetSidebarWidthUnit(UnitVar LengthUnit) {
416
417 xNavigationSplitViewSetSidebarWidthUnit(x.GoPointer(), UnitVar)
418
419}
420
421func (c *NavigationSplitView) GoPointer() uintptr {
422 if c == nil {
423 return 0
424 }
425 return c.Ptr
426}
427
428func (c *NavigationSplitView) SetGoPointer(ptr uintptr) {
429 c.Ptr = ptr
430}
431
432// SetPropertyCollapsed sets the "collapsed" property.
433// Whether the split view is collapsed.
434//
435// When collapsed, the children are put inside an [class@NavigationView],
436// otherwise they are displayed side by side.
437//
438// The [property@NavigationSplitView:show-content] controls which child is
439// visible while collapsed.
440func (x *NavigationSplitView) SetPropertyCollapsed(value bool) {
441 var v gobject.Value
442 v.Init(gobject.TypeBooleanVal)
443 v.SetBoolean(value)
444 x.SetProperty("collapsed", &v)
445}
446
447// GetPropertyCollapsed gets the "collapsed" property.
448// Whether the split view is collapsed.
449//
450// When collapsed, the children are put inside an [class@NavigationView],
451// otherwise they are displayed side by side.
452//
453// The [property@NavigationSplitView:show-content] controls which child is
454// visible while collapsed.
455func (x *NavigationSplitView) GetPropertyCollapsed() bool {
456 var v gobject.Value
457 x.GetProperty("collapsed", &v)
458 return v.GetBoolean()
459}
460
461// SetPropertyMaxSidebarWidth sets the "max-sidebar-width" property.
462// The maximum sidebar width.
463//
464// Maximum width is affected by
465// [property@NavigationSplitView:sidebar-width-unit].
466//
467// The sidebar widget can still be allocated with larger width if its own
468// minimum width exceeds it.
469func (x *NavigationSplitView) SetPropertyMaxSidebarWidth(value float64) {
470 var v gobject.Value
471 v.Init(gobject.TypeDoubleVal)
472 v.SetDouble(value)
473 x.SetProperty("max-sidebar-width", &v)
474}
475
476// GetPropertyMaxSidebarWidth gets the "max-sidebar-width" property.
477// The maximum sidebar width.
478//
479// Maximum width is affected by
480// [property@NavigationSplitView:sidebar-width-unit].
481//
482// The sidebar widget can still be allocated with larger width if its own
483// minimum width exceeds it.
484func (x *NavigationSplitView) GetPropertyMaxSidebarWidth() float64 {
485 var v gobject.Value
486 x.GetProperty("max-sidebar-width", &v)
487 return v.GetDouble()
488}
489
490// SetPropertyMinSidebarWidth sets the "min-sidebar-width" property.
491// The minimum sidebar width.
492//
493// Minimum width is affected by
494// [property@NavigationSplitView:sidebar-width-unit].
495//
496// The sidebar widget can still be allocated with larger width if its own
497// minimum width exceeds it.
498func (x *NavigationSplitView) SetPropertyMinSidebarWidth(value float64) {
499 var v gobject.Value
500 v.Init(gobject.TypeDoubleVal)
501 v.SetDouble(value)
502 x.SetProperty("min-sidebar-width", &v)
503}
504
505// GetPropertyMinSidebarWidth gets the "min-sidebar-width" property.
506// The minimum sidebar width.
507//
508// Minimum width is affected by
509// [property@NavigationSplitView:sidebar-width-unit].
510//
511// The sidebar widget can still be allocated with larger width if its own
512// minimum width exceeds it.
513func (x *NavigationSplitView) GetPropertyMinSidebarWidth() float64 {
514 var v gobject.Value
515 x.GetProperty("min-sidebar-width", &v)
516 return v.GetDouble()
517}
518
519// SetPropertyShowContent sets the "show-content" property.
520// Determines the visible page when collapsed.
521//
522// If set to `TRUE`, the content widget will be the visible page when
523// [property@NavigationSplitView:collapsed] is `TRUE`; otherwise the sidebar
524// widget will be visible.
525//
526// If the split view is already collapsed, the visible page changes
527// immediately.
528func (x *NavigationSplitView) SetPropertyShowContent(value bool) {
529 var v gobject.Value
530 v.Init(gobject.TypeBooleanVal)
531 v.SetBoolean(value)
532 x.SetProperty("show-content", &v)
533}
534
535// GetPropertyShowContent gets the "show-content" property.
536// Determines the visible page when collapsed.
537//
538// If set to `TRUE`, the content widget will be the visible page when
539// [property@NavigationSplitView:collapsed] is `TRUE`; otherwise the sidebar
540// widget will be visible.
541//
542// If the split view is already collapsed, the visible page changes
543// immediately.
544func (x *NavigationSplitView) GetPropertyShowContent() bool {
545 var v gobject.Value
546 x.GetProperty("show-content", &v)
547 return v.GetBoolean()
548}
549
550// SetPropertySidebarWidthFraction sets the "sidebar-width-fraction" property.
551// The preferred sidebar width as a fraction of the total width.
552//
553// The preferred width is additionally limited by
554// [property@NavigationSplitView:min-sidebar-width] and
555// [property@NavigationSplitView:max-sidebar-width].
556//
557// The sidebar widget can be allocated with larger width if its own minimum
558// width exceeds the preferred width.
559func (x *NavigationSplitView) SetPropertySidebarWidthFraction(value float64) {
560 var v gobject.Value
561 v.Init(gobject.TypeDoubleVal)
562 v.SetDouble(value)
563 x.SetProperty("sidebar-width-fraction", &v)
564}
565
566// GetPropertySidebarWidthFraction gets the "sidebar-width-fraction" property.
567// The preferred sidebar width as a fraction of the total width.
568//
569// The preferred width is additionally limited by
570// [property@NavigationSplitView:min-sidebar-width] and
571// [property@NavigationSplitView:max-sidebar-width].
572//
573// The sidebar widget can be allocated with larger width if its own minimum
574// width exceeds the preferred width.
575func (x *NavigationSplitView) GetPropertySidebarWidthFraction() float64 {
576 var v gobject.Value
577 x.GetProperty("sidebar-width-fraction", &v)
578 return v.GetDouble()
579}
580
581// Requests the user's screen reader to announce the given message.
582//
583// This kind of notification is useful for messages that
584// either have only a visual representation or that are not
585// exposed visually at all, e.g. a notification about a
586// successful operation.
587//
588// Also, by using this API, you can ensure that the message
589// does not interrupts the user's current screen reader output.
590func (x *NavigationSplitView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
591
592 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
593
594}
595
596// Retrieves the accessible parent for an accessible object.
597//
598// This function returns `NULL` for top level widgets.
599func (x *NavigationSplitView) GetAccessibleParent() *gtk.AccessibleBase {
600 var cls *gtk.AccessibleBase
601
602 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
603
604 if cret == 0 {
605 return nil
606 }
607 cls = >k.AccessibleBase{}
608 cls.Ptr = cret
609 return cls
610}
611
612// Retrieves the accessible role of an accessible object.
613func (x *NavigationSplitView) GetAccessibleRole() gtk.AccessibleRole {
614
615 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
616 return cret
617}
618
619// Retrieves the implementation for the given accessible object.
620func (x *NavigationSplitView) GetAtContext() *gtk.ATContext {
621 var cls *gtk.ATContext
622
623 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
624
625 if cret == 0 {
626 return nil
627 }
628 cls = >k.ATContext{}
629 cls.Ptr = cret
630 return cls
631}
632
633// Queries the coordinates and dimensions of this accessible
634//
635// This functionality can be overridden by `GtkAccessible`
636// implementations, e.g. to get the bounds from an ignored
637// child widget.
638func (x *NavigationSplitView) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
639
640 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
641 return cret
642}
643
644// Retrieves the first accessible child of an accessible object.
645func (x *NavigationSplitView) GetFirstAccessibleChild() *gtk.AccessibleBase {
646 var cls *gtk.AccessibleBase
647
648 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
649
650 if cret == 0 {
651 return nil
652 }
653 cls = >k.AccessibleBase{}
654 cls.Ptr = cret
655 return cls
656}
657
658// Retrieves the next accessible sibling of an accessible object
659func (x *NavigationSplitView) GetNextAccessibleSibling() *gtk.AccessibleBase {
660 var cls *gtk.AccessibleBase
661
662 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
663
664 if cret == 0 {
665 return nil
666 }
667 cls = >k.AccessibleBase{}
668 cls.Ptr = cret
669 return cls
670}
671
672// Queries a platform state, such as focus.
673//
674// This functionality can be overridden by `GtkAccessible`
675// implementations, e.g. to get platform state from an ignored
676// child widget, as is the case for `GtkText` wrappers.
677func (x *NavigationSplitView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
678
679 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
680 return cret
681}
682
683// Resets the accessible property to its default value.
684func (x *NavigationSplitView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
685
686 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
687
688}
689
690// Resets the accessible relation to its default value.
691func (x *NavigationSplitView) ResetRelation(RelationVar gtk.AccessibleRelation) {
692
693 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
694
695}
696
697// Resets the accessible state to its default value.
698func (x *NavigationSplitView) ResetState(StateVar gtk.AccessibleState) {
699
700 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
701
702}
703
704// Sets the parent and sibling of an accessible object.
705//
706// This function is meant to be used by accessible implementations that are
707// not part of the widget hierarchy, and but act as a logical bridge between
708// widgets. For instance, if a widget creates an object that holds metadata
709// for each child, and you want that object to implement the `GtkAccessible`
710// interface, you will use this function to ensure that the parent of each
711// child widget is the metadata object, and the parent of each metadata
712// object is the container widget.
713func (x *NavigationSplitView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
714
715 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
716
717}
718
719// Updates the next accessible sibling.
720//
721// That might be useful when a new child of a custom accessible
722// is created, and it needs to be linked to a previous child.
723func (x *NavigationSplitView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
724
725 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
726
727}
728
729// Informs ATs that the platform state has changed.
730//
731// This function should be used by `GtkAccessible` implementations that
732// have a platform state but are not widgets. Widgets handle platform
733// states automatically.
734func (x *NavigationSplitView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
735
736 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
737
738}
739
740// Updates a list of accessible properties.
741//
742// See the [enum@Gtk.AccessibleProperty] documentation for the
743// value types of accessible properties.
744//
745// This function should be called by `GtkWidget` types whenever
746// an accessible property change must be communicated to assistive
747// technologies.
748//
749// Example:
750// ```c
751// value = gtk_adjustment_get_value (adjustment);
752// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
753//
754// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
755// -1);
756//
757// ```
758func (x *NavigationSplitView) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
759
760 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
761
762}
763
764// Updates an array of accessible properties.
765//
766// This function should be called by `GtkWidget` types whenever an accessible
767// property change must be communicated to assistive technologies.
768//
769// This function is meant to be used by language bindings.
770func (x *NavigationSplitView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
771
772 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
773
774}
775
776// Updates a list of accessible relations.
777//
778// This function should be called by `GtkWidget` types whenever an accessible
779// relation change must be communicated to assistive technologies.
780//
781// If the [enum@Gtk.AccessibleRelation] requires a list of references,
782// you should pass each reference individually, followed by `NULL`, e.g.
783//
784// ```c
785// gtk_accessible_update_relation (accessible,
786//
787// GTK_ACCESSIBLE_RELATION_CONTROLS,
788// ref1, NULL,
789// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
790// ref1, ref2, ref3, NULL,
791// -1);
792//
793// ```
794func (x *NavigationSplitView) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
795
796 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
797
798}
799
800// Updates an array of accessible relations.
801//
802// This function should be called by `GtkWidget` types whenever an accessible
803// relation change must be communicated to assistive technologies.
804//
805// This function is meant to be used by language bindings.
806func (x *NavigationSplitView) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
807
808 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
809
810}
811
812// Updates a list of accessible states.
813//
814// See the [enum@Gtk.AccessibleState] documentation for the
815// value types of accessible states.
816//
817// This function should be called by `GtkWidget` types whenever
818// an accessible state change must be communicated to assistive
819// technologies.
820//
821// Example:
822//
823// ```c
824// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
825// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
826//
827// GTK_ACCESSIBLE_STATE_CHECKED, value,
828// -1);
829//
830// ```
831func (x *NavigationSplitView) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
832
833 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
834
835}
836
837// Updates an array of accessible states.
838//
839// This function should be called by `GtkWidget` types whenever an accessible
840// state change must be communicated to assistive technologies.
841//
842// This function is meant to be used by language bindings.
843func (x *NavigationSplitView) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
844
845 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
846
847}
848
849// Gets the ID of the @buildable object.
850//
851// `GtkBuilder` sets the name based on the ID attribute
852// of the `<object>` tag used to construct the @buildable.
853func (x *NavigationSplitView) GetBuildableId() string {
854
855 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
856 return cret
857}
858
859func init() {
860 core.SetPackageName("ADW", "libadwaita-1")
861 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
862 var libs []uintptr
863 for _, libPath := range core.GetPaths("ADW") {
864 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
865 if err != nil {
866 panic(err)
867 }
868 libs = append(libs, lib)
869 }
870
871 core.PuregoSafeRegister(&xNavigationSplitViewGLibType, libs, "adw_navigation_split_view_get_type")
872
873 core.PuregoSafeRegister(&xNewNavigationSplitView, libs, "adw_navigation_split_view_new")
874
875 core.PuregoSafeRegister(&xNavigationSplitViewGetCollapsed, libs, "adw_navigation_split_view_get_collapsed")
876 core.PuregoSafeRegister(&xNavigationSplitViewGetContent, libs, "adw_navigation_split_view_get_content")
877 core.PuregoSafeRegister(&xNavigationSplitViewGetMaxSidebarWidth, libs, "adw_navigation_split_view_get_max_sidebar_width")
878 core.PuregoSafeRegister(&xNavigationSplitViewGetMinSidebarWidth, libs, "adw_navigation_split_view_get_min_sidebar_width")
879 core.PuregoSafeRegister(&xNavigationSplitViewGetShowContent, libs, "adw_navigation_split_view_get_show_content")
880 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebar, libs, "adw_navigation_split_view_get_sidebar")
881 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebarPosition, libs, "adw_navigation_split_view_get_sidebar_position")
882 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebarWidthFraction, libs, "adw_navigation_split_view_get_sidebar_width_fraction")
883 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebarWidthUnit, libs, "adw_navigation_split_view_get_sidebar_width_unit")
884 core.PuregoSafeRegister(&xNavigationSplitViewSetCollapsed, libs, "adw_navigation_split_view_set_collapsed")
885 core.PuregoSafeRegister(&xNavigationSplitViewSetContent, libs, "adw_navigation_split_view_set_content")
886 core.PuregoSafeRegister(&xNavigationSplitViewSetMaxSidebarWidth, libs, "adw_navigation_split_view_set_max_sidebar_width")
887 core.PuregoSafeRegister(&xNavigationSplitViewSetMinSidebarWidth, libs, "adw_navigation_split_view_set_min_sidebar_width")
888 core.PuregoSafeRegister(&xNavigationSplitViewSetShowContent, libs, "adw_navigation_split_view_set_show_content")
889 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebar, libs, "adw_navigation_split_view_set_sidebar")
890 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebarPosition, libs, "adw_navigation_split_view_set_sidebar_position")
891 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebarWidthFraction, libs, "adw_navigation_split_view_set_sidebar_width_fraction")
892 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebarWidthUnit, libs, "adw_navigation_split_view_set_sidebar_width_unit")
893
894}