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 ToolbarViewClass struct {
17 _ structs.HostLayout
18
19 ParentClass gtk.WidgetClass
20}
21
22func (x *ToolbarViewClass) GoPointer() uintptr {
23 return uintptr(unsafe.Pointer(x))
24}
25
26// Describes the possible top or bottom bar styles in an [class@ToolbarView]
27// widget.
28//
29// `ADW_TOOLBAR_FLAT` is suitable for simple content, such as
30// [class@StatusPage] or [class@PreferencesPage], where the background at the
31// top and bottom parts of the page is uniform. Additionally, windows with
32// sidebars should always use this style.
33//
34// <picture style="min-width: 33%; display: inline-block;">
35//
36// <source srcset="toolbar-view-flat-1-dark.png" media="(prefers-color-scheme: dark)">
37// <img src="toolbar-view-flat-1.png" alt="toolbar-view-flat-1">
38//
39// </picture>
40// <picture style="min-width: 33%; display: inline-block;">
41//
42// <source srcset="toolbar-view-flat-2-dark.png" media="(prefers-color-scheme: dark)">
43// <img src="toolbar-view-flat-2.png" alt="toolbar-view-flat-2">
44//
45// </picture>
46//
47// `ADW_TOOLBAR_RAISED` style is suitable for content such as
48// [utility panes](https://developer.gnome.org/hig/patterns/containers/utility-panes.html),
49// where some elements are directly adjacent to the top/bottom bars, or
50// [class@TabView], where each page can have a different background.
51//
52// `ADW_TOOLBAR_RAISED_BORDER` style is similar to `ADW_TOOLBAR_RAISED`, but
53// with the shadow replaced with a more subtle border. It's intended to be used
54// in applications like image viewers, where a shadow over the content might be
55// undesired.
56//
57// <picture style="min-width: 33%; display: inline-block;">
58//
59// <source srcset="toolbar-view-raised-dark.png" media="(prefers-color-scheme: dark)">
60// <img src="toolbar-view-raised.png" alt="toolbar-view-raised">
61//
62// </picture>
63// <picture style="min-width: 33%; display: inline-block;">
64//
65// <source srcset="toolbar-view-raised-border-dark.png" media="(prefers-color-scheme: dark)">
66// <img src="toolbar-view-raised-border.png" alt="toolbar-view-raised-border">
67//
68// </picture>
69//
70// See [property@ToolbarView:top-bar-style] and
71// [property@ToolbarView:bottom-bar-style].
72//
73// New values may be added to this enumeration over time.
74type ToolbarStyle int
75
76var xToolbarStyleGLibType func() types.GType
77
78func ToolbarStyleGLibType() types.GType {
79 return xToolbarStyleGLibType()
80}
81
82const (
83
84 // No background, shadow only for scrolled content
85 ToolbarFlatValue ToolbarStyle = 0
86 // Opaque background with a persistent shadow
87 ToolbarRaisedValue ToolbarStyle = 1
88 // Opaque background with a persistent border
89 ToolbarRaisedBorderValue ToolbarStyle = 2
90)
91
92// A widget containing a page, as well as top and/or bottom bars.
93//
94// <picture>
95//
96// <source srcset="toolbar-view-dark.png" media="(prefers-color-scheme: dark)">
97// <img src="toolbar-view.png" alt="toolbar-view">
98//
99// </picture>
100//
101// `AdwToolbarView` has a single content widget and one or multiple top and
102// bottom bars, shown at the top and bottom sides respectively.
103//
104// Example of an `AdwToolbarView` UI definition:
105// ```xml
106// <object class="AdwToolbarView">
107//
108// <child type="top">
109// <object class="AdwHeaderBar"/>
110// </child>
111// <property name="content">
112// <object class="AdwPreferencesPage">
113// <!-- ... -->
114// </object>
115// </property>
116//
117// </object>
118// ```
119//
120// The following kinds of top and bottom bars are supported:
121//
122// - [class@HeaderBar]
123// - [class@TabBar]
124// - [class@ViewSwitcherBar]
125// - [class@Gtk.ActionBar]
126// - [class@Gtk.HeaderBar]
127// - [class@Gtk.PopoverMenuBar]
128// - [class@Gtk.SearchBar]
129// - Any [class@Gtk.Box] or a similar widget with the
130// [`.toolbar`](style-classes.html#toolbars) style class
131//
132// By default, top and bottom bars are flat and scrolling content has a subtle
133// undershoot shadow, same as when using the
134// [`.undershoot-top`](style-classes.html#undershoot-indicators) and
135// [`.undershoot-bottom`](style-classes.html#undershoot-indicators) style
136// classes. This works well in most cases, e.g. with [class@StatusPage] or
137// [class@PreferencesPage], where the background at the top and bottom parts of
138// the page is uniform. Additionally, windows with sidebars should always use
139// this style.
140//
141// [property@ToolbarView:top-bar-style] and
142// [property@ToolbarView:bottom-bar-style] properties can be used add an opaque
143// background and a persistent shadow to top and bottom bars, this can be useful
144// for content such as [utility panes](https://developer.gnome.org/hig/patterns/containers/utility-panes.html),
145// where some elements are adjacent to the top/bottom bars, or [class@TabView],
146// where each page can have a different background.
147//
148// <picture style="min-width: 33%; display: inline-block;">
149//
150// <source srcset="toolbar-view-flat-1-dark.png" media="(prefers-color-scheme: dark)">
151// <img src="toolbar-view-flat-1.png" alt="toolbar-view-flat-1">
152//
153// </picture>
154// <picture style="min-width: 33%; display: inline-block;">
155//
156// <source srcset="toolbar-view-flat-2-dark.png" media="(prefers-color-scheme: dark)">
157// <img src="toolbar-view-flat-2.png" alt="toolbar-view-flat-2">
158//
159// </picture>
160// <picture style="min-width: 33%; display: inline-block;">
161//
162// <source srcset="toolbar-view-raised-dark.png" media="(prefers-color-scheme: dark)">
163// <img src="toolbar-view-raised.png" alt="toolbar-view-raised">
164//
165// </picture>
166//
167// `AdwToolbarView` ensures the top and bottom bars have consistent backdrop
168// styles and vertical spacing. For comparison:
169//
170// <picture style="min-width: 40%; display: inline-block;">
171//
172// <source srcset="toolbar-view-spacing-dark.png" media="(prefers-color-scheme: dark)">
173// <img src="toolbar-view-spacing.png" alt="toolbar-view-spacing">
174//
175// </picture>
176// <picture style="min-width: 40%; display: inline-block;">
177//
178// <source srcset="toolbar-view-spacing-box-dark.png" media="(prefers-color-scheme: dark)">
179// <img src="toolbar-view-spacing-box.png" alt="toolbar-view-spacing-box">
180//
181// </picture>
182//
183// Any top and bottom bars can also be dragged to move the window, equivalent
184// to putting them into a [class@Gtk.WindowHandle].
185//
186// Content is typically place between top and bottom bars, but can also extend
187// behind them. This is controlled with the
188// [property@ToolbarView:extend-content-to-top-edge] and
189// [property@ToolbarView:extend-content-to-bottom-edge] properties.
190//
191// Top and bottom bars can be hidden and revealed with an animation using the
192// [property@ToolbarView:reveal-top-bars] and
193// [property@ToolbarView:reveal-bottom-bars] properties.
194//
195// ## `AdwToolbarView` as `GtkBuildable`
196//
197// The `AdwToolbarView` implementation of the [iface@Gtk.Buildable] interface
198// supports adding a top bar by specifying “top” as the “type” attribute of a
199// `<child>` element, or adding a bottom bar by specifying “bottom”.
200//
201// ## Accessibility
202//
203// `AdwToolbarView` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
204type ToolbarView struct {
205 gtk.Widget
206}
207
208var xToolbarViewGLibType func() types.GType
209
210func ToolbarViewGLibType() types.GType {
211 return xToolbarViewGLibType()
212}
213
214func ToolbarViewNewFromInternalPtr(ptr uintptr) *ToolbarView {
215 cls := &ToolbarView{}
216 cls.Ptr = ptr
217 return cls
218}
219
220var xNewToolbarView func() uintptr
221
222// Creates a new `AdwToolbarView`.
223func NewToolbarView() *ToolbarView {
224 var cls *ToolbarView
225
226 cret := xNewToolbarView()
227
228 if cret == 0 {
229 return nil
230 }
231 gobject.IncreaseRef(cret)
232 cls = &ToolbarView{}
233 cls.Ptr = cret
234 return cls
235}
236
237var xToolbarViewAddBottomBar func(uintptr, uintptr)
238
239// Adds a bottom bar to @self.
240func (x *ToolbarView) AddBottomBar(WidgetVar *gtk.Widget) {
241
242 xToolbarViewAddBottomBar(x.GoPointer(), WidgetVar.GoPointer())
243
244}
245
246var xToolbarViewAddTopBar func(uintptr, uintptr)
247
248// Adds a top bar to @self.
249func (x *ToolbarView) AddTopBar(WidgetVar *gtk.Widget) {
250
251 xToolbarViewAddTopBar(x.GoPointer(), WidgetVar.GoPointer())
252
253}
254
255var xToolbarViewGetBottomBarHeight func(uintptr) int
256
257// Gets the current bottom bar height for @self.
258//
259// Bottom bar height does change depending on
260// [property@ToolbarView:reveal-bottom-bars], including during the transition.
261//
262// See [method@ToolbarView.get_top_bar_height].
263func (x *ToolbarView) GetBottomBarHeight() int {
264
265 cret := xToolbarViewGetBottomBarHeight(x.GoPointer())
266 return cret
267}
268
269var xToolbarViewGetBottomBarStyle func(uintptr) ToolbarStyle
270
271// Gets appearance of the bottom bars for @self.
272func (x *ToolbarView) GetBottomBarStyle() ToolbarStyle {
273
274 cret := xToolbarViewGetBottomBarStyle(x.GoPointer())
275 return cret
276}
277
278var xToolbarViewGetContent func(uintptr) uintptr
279
280// Gets the content widget for @self.
281func (x *ToolbarView) GetContent() *gtk.Widget {
282 var cls *gtk.Widget
283
284 cret := xToolbarViewGetContent(x.GoPointer())
285
286 if cret == 0 {
287 return nil
288 }
289 gobject.IncreaseRef(cret)
290 cls = >k.Widget{}
291 cls.Ptr = cret
292 return cls
293}
294
295var xToolbarViewGetExtendContentToBottomEdge func(uintptr) bool
296
297// Gets whether the content widget can extend behind bottom bars.
298func (x *ToolbarView) GetExtendContentToBottomEdge() bool {
299
300 cret := xToolbarViewGetExtendContentToBottomEdge(x.GoPointer())
301 return cret
302}
303
304var xToolbarViewGetExtendContentToTopEdge func(uintptr) bool
305
306// Gets whether the content widget can extend behind top bars.
307func (x *ToolbarView) GetExtendContentToTopEdge() bool {
308
309 cret := xToolbarViewGetExtendContentToTopEdge(x.GoPointer())
310 return cret
311}
312
313var xToolbarViewGetRevealBottomBars func(uintptr) bool
314
315// Gets whether bottom bars are revealed for @self.
316func (x *ToolbarView) GetRevealBottomBars() bool {
317
318 cret := xToolbarViewGetRevealBottomBars(x.GoPointer())
319 return cret
320}
321
322var xToolbarViewGetRevealTopBars func(uintptr) bool
323
324// Gets whether top bars are revealed for @self.
325func (x *ToolbarView) GetRevealTopBars() bool {
326
327 cret := xToolbarViewGetRevealTopBars(x.GoPointer())
328 return cret
329}
330
331var xToolbarViewGetTopBarHeight func(uintptr) int
332
333// Gets the current top bar height for @self.
334//
335// Top bar height does change depending on
336// [property@ToolbarView:reveal-top-bars], including during the transition.
337//
338// See [method@ToolbarView.get_bottom_bar_height].
339func (x *ToolbarView) GetTopBarHeight() int {
340
341 cret := xToolbarViewGetTopBarHeight(x.GoPointer())
342 return cret
343}
344
345var xToolbarViewGetTopBarStyle func(uintptr) ToolbarStyle
346
347// Gets appearance of the top bars for @self.
348func (x *ToolbarView) GetTopBarStyle() ToolbarStyle {
349
350 cret := xToolbarViewGetTopBarStyle(x.GoPointer())
351 return cret
352}
353
354var xToolbarViewRemove func(uintptr, uintptr)
355
356// Removes a child from @self.
357func (x *ToolbarView) Remove(WidgetVar *gtk.Widget) {
358
359 xToolbarViewRemove(x.GoPointer(), WidgetVar.GoPointer())
360
361}
362
363var xToolbarViewSetBottomBarStyle func(uintptr, ToolbarStyle)
364
365// Sets appearance of the bottom bars for @self.
366//
367// If set to `ADW_TOOLBAR_FLAT`, bottom bars are flat and scrolling content has
368// a subtle undershoot shadow when touching them, same as the
369// [`.undershoot-bottom`](style-classes.html#undershoot-indicators)
370// style class. This works well for simple content, e.g. [class@StatusPage] or
371// [class@PreferencesPage], where the background at the bottom of the page is
372// uniform. Additionally, windows with sidebars should always use this style.
373//
374// Undershoot shadow is only present if a bottom bar is actually present and
375// visible. It is also never present if
376// [property@ToolbarView:extend-content-to-bottom-edge] is set to `TRUE`.
377//
378// If set to `ADW_TOOLBAR_RAISED`, bottom bars have an opaque background and a
379// persistent shadow, this is suitable for content such as
380// [utility panes](https://developer.gnome.org/hig/patterns/containers/utility-panes.html),
381// where some elements are directly adjacent to the bottom bars, or
382// [class@TabView], where each page can have a different background.
383//
384// `ADW_TOOLBAR_RAISED_BORDER` is similar to `ADW_TOOLBAR_RAISED`, but the
385// shadow is replaced with a more subtle border. This can be useful for
386// applications like image viewers.
387//
388// See also [method@ToolbarView.set_top_bar_style].
389func (x *ToolbarView) SetBottomBarStyle(StyleVar ToolbarStyle) {
390
391 xToolbarViewSetBottomBarStyle(x.GoPointer(), StyleVar)
392
393}
394
395var xToolbarViewSetContent func(uintptr, uintptr)
396
397// Sets the content widget for @self.
398func (x *ToolbarView) SetContent(ContentVar *gtk.Widget) {
399
400 xToolbarViewSetContent(x.GoPointer(), ContentVar.GoPointer())
401
402}
403
404var xToolbarViewSetExtendContentToBottomEdge func(uintptr, bool)
405
406// Sets whether the content widget can extend behind bottom bars.
407//
408// This can be used in combination with [property@ToolbarView:reveal-bottom-bars]
409// to show and hide toolbars in fullscreen.
410//
411// See [method@ToolbarView.set_extend_content_to_top_edge].
412func (x *ToolbarView) SetExtendContentToBottomEdge(ExtendVar bool) {
413
414 xToolbarViewSetExtendContentToBottomEdge(x.GoPointer(), ExtendVar)
415
416}
417
418var xToolbarViewSetExtendContentToTopEdge func(uintptr, bool)
419
420// Sets whether the content widget can extend behind top bars.
421//
422// This can be used in combination with [property@ToolbarView:reveal-top-bars]
423// to show and hide toolbars in fullscreen.
424//
425// See [method@ToolbarView.set_extend_content_to_bottom_edge].
426func (x *ToolbarView) SetExtendContentToTopEdge(ExtendVar bool) {
427
428 xToolbarViewSetExtendContentToTopEdge(x.GoPointer(), ExtendVar)
429
430}
431
432var xToolbarViewSetRevealBottomBars func(uintptr, bool)
433
434// Sets whether bottom bars are revealed for @self.
435//
436// The transition will be animated.
437//
438// This can be used in combination with
439// [property@ToolbarView:extend-content-to-bottom-edge] to show and hide
440// toolbars in fullscreen.
441//
442// See [method@ToolbarView.set_reveal_top_bars].
443func (x *ToolbarView) SetRevealBottomBars(RevealVar bool) {
444
445 xToolbarViewSetRevealBottomBars(x.GoPointer(), RevealVar)
446
447}
448
449var xToolbarViewSetRevealTopBars func(uintptr, bool)
450
451// Sets whether top bars are revealed for @self.
452//
453// The transition will be animated.
454//
455// This can be used in combination with
456// [property@ToolbarView:extend-content-to-top-edge] to show and hide toolbars
457// in fullscreen.
458//
459// See [method@ToolbarView.set_reveal_bottom_bars].
460func (x *ToolbarView) SetRevealTopBars(RevealVar bool) {
461
462 xToolbarViewSetRevealTopBars(x.GoPointer(), RevealVar)
463
464}
465
466var xToolbarViewSetTopBarStyle func(uintptr, ToolbarStyle)
467
468// Sets appearance of the top bars for @self.
469//
470// If set to `ADW_TOOLBAR_FLAT`, top bars are flat and scrolling content has a
471// subtle undershoot shadow when touching them, same as the
472// [`.undershoot-top`](style-classes.html#undershoot-indicators)
473// style class. This works well for simple content, e.g. [class@StatusPage] or
474// [class@PreferencesPage], where the background at the top of the page is
475// uniform. Additionally, windows with sidebars should always use this style.
476//
477// Undershoot shadow is only present if a top bar is actually present and
478// visible. It is also never present if
479// [property@ToolbarView:extend-content-to-top-edge] is set to `TRUE`.
480//
481// If set to `ADW_TOOLBAR_RAISED`, top bars have an opaque background and a
482// persistent shadow, this is suitable for content such as
483// [utility panes](https://developer.gnome.org/hig/patterns/containers/utility-panes.html),
484// where some elements are directly adjacent to the top bars, or
485// [class@TabView], where each page can have a different background.
486//
487// `ADW_TOOLBAR_RAISED_BORDER` is similar to `ADW_TOOLBAR_RAISED`, but the
488// shadow is replaced with a more subtle border. This can be useful for
489// applications like image viewers.
490//
491// See also [method@ToolbarView.set_bottom_bar_style].
492func (x *ToolbarView) SetTopBarStyle(StyleVar ToolbarStyle) {
493
494 xToolbarViewSetTopBarStyle(x.GoPointer(), StyleVar)
495
496}
497
498func (c *ToolbarView) GoPointer() uintptr {
499 if c == nil {
500 return 0
501 }
502 return c.Ptr
503}
504
505func (c *ToolbarView) SetGoPointer(ptr uintptr) {
506 c.Ptr = ptr
507}
508
509// GetPropertyBottomBarHeight gets the "bottom-bar-height" property.
510// The current bottom bar height.
511//
512// Bottom bar height does change depending on
513// [property@ToolbarView:reveal-bottom-bars], including during the transition.
514//
515// See [property@ToolbarView:top-bar-height].
516func (x *ToolbarView) GetPropertyBottomBarHeight() int {
517 var v gobject.Value
518 x.GetProperty("bottom-bar-height", &v)
519 return v.GetInt()
520}
521
522// SetPropertyExtendContentToBottomEdge sets the "extend-content-to-bottom-edge" property.
523// Whether the content widget can extend behind bottom bars.
524//
525// This can be used in combination with
526// [property@ToolbarView:reveal-bottom-bars] to show and hide toolbars in
527// fullscreen.
528//
529// See [property@ToolbarView:extend-content-to-top-edge].
530func (x *ToolbarView) SetPropertyExtendContentToBottomEdge(value bool) {
531 var v gobject.Value
532 v.Init(gobject.TypeBooleanVal)
533 v.SetBoolean(value)
534 x.SetProperty("extend-content-to-bottom-edge", &v)
535}
536
537// GetPropertyExtendContentToBottomEdge gets the "extend-content-to-bottom-edge" property.
538// Whether the content widget can extend behind bottom bars.
539//
540// This can be used in combination with
541// [property@ToolbarView:reveal-bottom-bars] to show and hide toolbars in
542// fullscreen.
543//
544// See [property@ToolbarView:extend-content-to-top-edge].
545func (x *ToolbarView) GetPropertyExtendContentToBottomEdge() bool {
546 var v gobject.Value
547 x.GetProperty("extend-content-to-bottom-edge", &v)
548 return v.GetBoolean()
549}
550
551// SetPropertyExtendContentToTopEdge sets the "extend-content-to-top-edge" property.
552// Whether the content widget can extend behind top bars.
553//
554// This can be used in combination with [property@ToolbarView:reveal-top-bars]
555// to show and hide toolbars in fullscreen.
556//
557// See [property@ToolbarView:extend-content-to-bottom-edge].
558func (x *ToolbarView) SetPropertyExtendContentToTopEdge(value bool) {
559 var v gobject.Value
560 v.Init(gobject.TypeBooleanVal)
561 v.SetBoolean(value)
562 x.SetProperty("extend-content-to-top-edge", &v)
563}
564
565// GetPropertyExtendContentToTopEdge gets the "extend-content-to-top-edge" property.
566// Whether the content widget can extend behind top bars.
567//
568// This can be used in combination with [property@ToolbarView:reveal-top-bars]
569// to show and hide toolbars in fullscreen.
570//
571// See [property@ToolbarView:extend-content-to-bottom-edge].
572func (x *ToolbarView) GetPropertyExtendContentToTopEdge() bool {
573 var v gobject.Value
574 x.GetProperty("extend-content-to-top-edge", &v)
575 return v.GetBoolean()
576}
577
578// SetPropertyRevealBottomBars sets the "reveal-bottom-bars" property.
579// Whether bottom bars are visible.
580//
581// The transition will be animated.
582//
583// This can be used in combination with
584// [property@ToolbarView:extend-content-to-bottom-edge] to show and hide
585// toolbars in fullscreen.
586//
587// See [property@ToolbarView:reveal-top-bars].
588func (x *ToolbarView) SetPropertyRevealBottomBars(value bool) {
589 var v gobject.Value
590 v.Init(gobject.TypeBooleanVal)
591 v.SetBoolean(value)
592 x.SetProperty("reveal-bottom-bars", &v)
593}
594
595// GetPropertyRevealBottomBars gets the "reveal-bottom-bars" property.
596// Whether bottom bars are visible.
597//
598// The transition will be animated.
599//
600// This can be used in combination with
601// [property@ToolbarView:extend-content-to-bottom-edge] to show and hide
602// toolbars in fullscreen.
603//
604// See [property@ToolbarView:reveal-top-bars].
605func (x *ToolbarView) GetPropertyRevealBottomBars() bool {
606 var v gobject.Value
607 x.GetProperty("reveal-bottom-bars", &v)
608 return v.GetBoolean()
609}
610
611// SetPropertyRevealTopBars sets the "reveal-top-bars" property.
612// Whether top bars are revealed.
613//
614// The transition will be animated.
615//
616// This can be used in combination with
617// [property@ToolbarView:extend-content-to-top-edge] to show and hide toolbars
618// in fullscreen.
619//
620// See [property@ToolbarView:reveal-bottom-bars].
621func (x *ToolbarView) SetPropertyRevealTopBars(value bool) {
622 var v gobject.Value
623 v.Init(gobject.TypeBooleanVal)
624 v.SetBoolean(value)
625 x.SetProperty("reveal-top-bars", &v)
626}
627
628// GetPropertyRevealTopBars gets the "reveal-top-bars" property.
629// Whether top bars are revealed.
630//
631// The transition will be animated.
632//
633// This can be used in combination with
634// [property@ToolbarView:extend-content-to-top-edge] to show and hide toolbars
635// in fullscreen.
636//
637// See [property@ToolbarView:reveal-bottom-bars].
638func (x *ToolbarView) GetPropertyRevealTopBars() bool {
639 var v gobject.Value
640 x.GetProperty("reveal-top-bars", &v)
641 return v.GetBoolean()
642}
643
644// GetPropertyTopBarHeight gets the "top-bar-height" property.
645// The current top bar height.
646//
647// Top bar height does change depending [property@ToolbarView:reveal-top-bars],
648// including during the transition.
649//
650// See [property@ToolbarView:bottom-bar-height].
651func (x *ToolbarView) GetPropertyTopBarHeight() int {
652 var v gobject.Value
653 x.GetProperty("top-bar-height", &v)
654 return v.GetInt()
655}
656
657// Requests the user's screen reader to announce the given message.
658//
659// This kind of notification is useful for messages that
660// either have only a visual representation or that are not
661// exposed visually at all, e.g. a notification about a
662// successful operation.
663//
664// Also, by using this API, you can ensure that the message
665// does not interrupts the user's current screen reader output.
666func (x *ToolbarView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
667
668 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
669
670}
671
672// Retrieves the accessible parent for an accessible object.
673//
674// This function returns `NULL` for top level widgets.
675func (x *ToolbarView) GetAccessibleParent() *gtk.AccessibleBase {
676 var cls *gtk.AccessibleBase
677
678 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
679
680 if cret == 0 {
681 return nil
682 }
683 cls = >k.AccessibleBase{}
684 cls.Ptr = cret
685 return cls
686}
687
688// Retrieves the accessible role of an accessible object.
689func (x *ToolbarView) GetAccessibleRole() gtk.AccessibleRole {
690
691 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
692 return cret
693}
694
695// Retrieves the implementation for the given accessible object.
696func (x *ToolbarView) GetAtContext() *gtk.ATContext {
697 var cls *gtk.ATContext
698
699 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
700
701 if cret == 0 {
702 return nil
703 }
704 cls = >k.ATContext{}
705 cls.Ptr = cret
706 return cls
707}
708
709// Queries the coordinates and dimensions of this accessible
710//
711// This functionality can be overridden by `GtkAccessible`
712// implementations, e.g. to get the bounds from an ignored
713// child widget.
714func (x *ToolbarView) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
715
716 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
717 return cret
718}
719
720// Retrieves the first accessible child of an accessible object.
721func (x *ToolbarView) GetFirstAccessibleChild() *gtk.AccessibleBase {
722 var cls *gtk.AccessibleBase
723
724 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
725
726 if cret == 0 {
727 return nil
728 }
729 cls = >k.AccessibleBase{}
730 cls.Ptr = cret
731 return cls
732}
733
734// Retrieves the next accessible sibling of an accessible object
735func (x *ToolbarView) GetNextAccessibleSibling() *gtk.AccessibleBase {
736 var cls *gtk.AccessibleBase
737
738 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
739
740 if cret == 0 {
741 return nil
742 }
743 cls = >k.AccessibleBase{}
744 cls.Ptr = cret
745 return cls
746}
747
748// Queries a platform state, such as focus.
749//
750// This functionality can be overridden by `GtkAccessible`
751// implementations, e.g. to get platform state from an ignored
752// child widget, as is the case for `GtkText` wrappers.
753func (x *ToolbarView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
754
755 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
756 return cret
757}
758
759// Resets the accessible property to its default value.
760func (x *ToolbarView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
761
762 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
763
764}
765
766// Resets the accessible relation to its default value.
767func (x *ToolbarView) ResetRelation(RelationVar gtk.AccessibleRelation) {
768
769 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
770
771}
772
773// Resets the accessible state to its default value.
774func (x *ToolbarView) ResetState(StateVar gtk.AccessibleState) {
775
776 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
777
778}
779
780// Sets the parent and sibling of an accessible object.
781//
782// This function is meant to be used by accessible implementations that are
783// not part of the widget hierarchy, and but act as a logical bridge between
784// widgets. For instance, if a widget creates an object that holds metadata
785// for each child, and you want that object to implement the `GtkAccessible`
786// interface, you will use this function to ensure that the parent of each
787// child widget is the metadata object, and the parent of each metadata
788// object is the container widget.
789func (x *ToolbarView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
790
791 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
792
793}
794
795// Updates the next accessible sibling.
796//
797// That might be useful when a new child of a custom accessible
798// is created, and it needs to be linked to a previous child.
799func (x *ToolbarView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
800
801 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
802
803}
804
805// Informs ATs that the platform state has changed.
806//
807// This function should be used by `GtkAccessible` implementations that
808// have a platform state but are not widgets. Widgets handle platform
809// states automatically.
810func (x *ToolbarView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
811
812 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
813
814}
815
816// Updates a list of accessible properties.
817//
818// See the [enum@Gtk.AccessibleProperty] documentation for the
819// value types of accessible properties.
820//
821// This function should be called by `GtkWidget` types whenever
822// an accessible property change must be communicated to assistive
823// technologies.
824//
825// Example:
826// ```c
827// value = gtk_adjustment_get_value (adjustment);
828// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
829//
830// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
831// -1);
832//
833// ```
834func (x *ToolbarView) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
835
836 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
837
838}
839
840// Updates an array of accessible properties.
841//
842// This function should be called by `GtkWidget` types whenever an accessible
843// property change must be communicated to assistive technologies.
844//
845// This function is meant to be used by language bindings.
846func (x *ToolbarView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
847
848 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
849
850}
851
852// Updates a list of accessible relations.
853//
854// This function should be called by `GtkWidget` types whenever an accessible
855// relation change must be communicated to assistive technologies.
856//
857// If the [enum@Gtk.AccessibleRelation] requires a list of references,
858// you should pass each reference individually, followed by `NULL`, e.g.
859//
860// ```c
861// gtk_accessible_update_relation (accessible,
862//
863// GTK_ACCESSIBLE_RELATION_CONTROLS,
864// ref1, NULL,
865// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
866// ref1, ref2, ref3, NULL,
867// -1);
868//
869// ```
870func (x *ToolbarView) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
871
872 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
873
874}
875
876// Updates an array of accessible relations.
877//
878// This function should be called by `GtkWidget` types whenever an accessible
879// relation change must be communicated to assistive technologies.
880//
881// This function is meant to be used by language bindings.
882func (x *ToolbarView) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
883
884 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
885
886}
887
888// Updates a list of accessible states.
889//
890// See the [enum@Gtk.AccessibleState] documentation for the
891// value types of accessible states.
892//
893// This function should be called by `GtkWidget` types whenever
894// an accessible state change must be communicated to assistive
895// technologies.
896//
897// Example:
898//
899// ```c
900// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
901// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
902//
903// GTK_ACCESSIBLE_STATE_CHECKED, value,
904// -1);
905//
906// ```
907func (x *ToolbarView) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
908
909 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
910
911}
912
913// Updates an array of accessible states.
914//
915// This function should be called by `GtkWidget` types whenever an accessible
916// state change must be communicated to assistive technologies.
917//
918// This function is meant to be used by language bindings.
919func (x *ToolbarView) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
920
921 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
922
923}
924
925// Gets the ID of the @buildable object.
926//
927// `GtkBuilder` sets the name based on the ID attribute
928// of the `<object>` tag used to construct the @buildable.
929func (x *ToolbarView) GetBuildableId() string {
930
931 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
932 return cret
933}
934
935func init() {
936 core.SetPackageName("ADW", "libadwaita-1")
937 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
938 var libs []uintptr
939 for _, libPath := range core.GetPaths("ADW") {
940 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
941 if err != nil {
942 panic(err)
943 }
944 libs = append(libs, lib)
945 }
946
947 core.PuregoSafeRegister(&xToolbarStyleGLibType, libs, "adw_toolbar_style_get_type")
948
949 core.PuregoSafeRegister(&xToolbarViewGLibType, libs, "adw_toolbar_view_get_type")
950
951 core.PuregoSafeRegister(&xNewToolbarView, libs, "adw_toolbar_view_new")
952
953 core.PuregoSafeRegister(&xToolbarViewAddBottomBar, libs, "adw_toolbar_view_add_bottom_bar")
954 core.PuregoSafeRegister(&xToolbarViewAddTopBar, libs, "adw_toolbar_view_add_top_bar")
955 core.PuregoSafeRegister(&xToolbarViewGetBottomBarHeight, libs, "adw_toolbar_view_get_bottom_bar_height")
956 core.PuregoSafeRegister(&xToolbarViewGetBottomBarStyle, libs, "adw_toolbar_view_get_bottom_bar_style")
957 core.PuregoSafeRegister(&xToolbarViewGetContent, libs, "adw_toolbar_view_get_content")
958 core.PuregoSafeRegister(&xToolbarViewGetExtendContentToBottomEdge, libs, "adw_toolbar_view_get_extend_content_to_bottom_edge")
959 core.PuregoSafeRegister(&xToolbarViewGetExtendContentToTopEdge, libs, "adw_toolbar_view_get_extend_content_to_top_edge")
960 core.PuregoSafeRegister(&xToolbarViewGetRevealBottomBars, libs, "adw_toolbar_view_get_reveal_bottom_bars")
961 core.PuregoSafeRegister(&xToolbarViewGetRevealTopBars, libs, "adw_toolbar_view_get_reveal_top_bars")
962 core.PuregoSafeRegister(&xToolbarViewGetTopBarHeight, libs, "adw_toolbar_view_get_top_bar_height")
963 core.PuregoSafeRegister(&xToolbarViewGetTopBarStyle, libs, "adw_toolbar_view_get_top_bar_style")
964 core.PuregoSafeRegister(&xToolbarViewRemove, libs, "adw_toolbar_view_remove")
965 core.PuregoSafeRegister(&xToolbarViewSetBottomBarStyle, libs, "adw_toolbar_view_set_bottom_bar_style")
966 core.PuregoSafeRegister(&xToolbarViewSetContent, libs, "adw_toolbar_view_set_content")
967 core.PuregoSafeRegister(&xToolbarViewSetExtendContentToBottomEdge, libs, "adw_toolbar_view_set_extend_content_to_bottom_edge")
968 core.PuregoSafeRegister(&xToolbarViewSetExtendContentToTopEdge, libs, "adw_toolbar_view_set_extend_content_to_top_edge")
969 core.PuregoSafeRegister(&xToolbarViewSetRevealBottomBars, libs, "adw_toolbar_view_set_reveal_bottom_bars")
970 core.PuregoSafeRegister(&xToolbarViewSetRevealTopBars, libs, "adw_toolbar_view_set_reveal_top_bars")
971 core.PuregoSafeRegister(&xToolbarViewSetTopBarStyle, libs, "adw_toolbar_view_set_top_bar_style")
972
973}