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 SqueezerClass struct {
17 _ structs.HostLayout
18
19 ParentClass gtk.WidgetClass
20}
21
22func (x *SqueezerClass) GoPointer() uintptr {
23 return uintptr(unsafe.Pointer(x))
24}
25
26type SqueezerPageClass struct {
27 _ structs.HostLayout
28
29 ParentClass gobject.ObjectClass
30}
31
32func (x *SqueezerPageClass) GoPointer() uintptr {
33 return uintptr(unsafe.Pointer(x))
34}
35
36// Describes the possible transitions in a [class@Squeezer] widget.
37type SqueezerTransitionType int
38
39var xSqueezerTransitionTypeGLibType func() types.GType
40
41func SqueezerTransitionTypeGLibType() types.GType {
42 return xSqueezerTransitionTypeGLibType()
43}
44
45const (
46
47 // No transition
48 SqueezerTransitionTypeNoneValue SqueezerTransitionType = 0
49 // A cross-fade
50 SqueezerTransitionTypeCrossfadeValue SqueezerTransitionType = 1
51)
52
53// A best fit container.
54//
55// <picture>
56//
57// <source srcset="squeezer-wide-dark.png" media="(prefers-color-scheme: dark)">
58// <img src="squeezer-wide.png" alt="squeezer-wide">
59//
60// </picture>
61// <picture>
62//
63// <source srcset="squeezer-narrow-dark.png" media="(prefers-color-scheme: dark)">
64// <img src="squeezer-narrow.png" alt="squeezer-narrow">
65//
66// </picture>
67//
68// The `AdwSqueezer` widget is a container which only shows the first of its
69// children that fits in the available size. It is convenient to offer different
70// widgets to represent the same data with different levels of detail, making
71// the widget seem to squeeze itself to fit in the available space.
72//
73// Transitions between children can be animated as fades. This can be controlled
74// with [property@Squeezer:transition-type].
75//
76// ## CSS nodes
77//
78// `AdwSqueezer` has a single CSS node with name `squeezer`.
79type Squeezer struct {
80 gtk.Widget
81}
82
83var xSqueezerGLibType func() types.GType
84
85func SqueezerGLibType() types.GType {
86 return xSqueezerGLibType()
87}
88
89func SqueezerNewFromInternalPtr(ptr uintptr) *Squeezer {
90 cls := &Squeezer{}
91 cls.Ptr = ptr
92 return cls
93}
94
95var xNewSqueezer func() uintptr
96
97// Creates a new `AdwSqueezer`.
98func NewSqueezer() *Squeezer {
99 var cls *Squeezer
100
101 cret := xNewSqueezer()
102
103 if cret == 0 {
104 return nil
105 }
106 gobject.IncreaseRef(cret)
107 cls = &Squeezer{}
108 cls.Ptr = cret
109 return cls
110}
111
112var xSqueezerAdd func(uintptr, uintptr) uintptr
113
114// Adds a child to @self.
115func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage {
116 var cls *SqueezerPage
117
118 cret := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer())
119
120 if cret == 0 {
121 return nil
122 }
123 gobject.IncreaseRef(cret)
124 cls = &SqueezerPage{}
125 cls.Ptr = cret
126 return cls
127}
128
129var xSqueezerGetAllowNone func(uintptr) bool
130
131// Gets whether to allow squeezing beyond the last child's minimum size.
132func (x *Squeezer) GetAllowNone() bool {
133
134 cret := xSqueezerGetAllowNone(x.GoPointer())
135 return cret
136}
137
138var xSqueezerGetHomogeneous func(uintptr) bool
139
140// Gets whether all children have the same size for the opposite orientation.
141func (x *Squeezer) GetHomogeneous() bool {
142
143 cret := xSqueezerGetHomogeneous(x.GoPointer())
144 return cret
145}
146
147var xSqueezerGetInterpolateSize func(uintptr) bool
148
149// Gets whether @self interpolates its size when changing the visible child.
150func (x *Squeezer) GetInterpolateSize() bool {
151
152 cret := xSqueezerGetInterpolateSize(x.GoPointer())
153 return cret
154}
155
156var xSqueezerGetPage func(uintptr, uintptr) uintptr
157
158// Returns the [class@SqueezerPage] object for @child.
159func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage {
160 var cls *SqueezerPage
161
162 cret := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer())
163
164 if cret == 0 {
165 return nil
166 }
167 gobject.IncreaseRef(cret)
168 cls = &SqueezerPage{}
169 cls.Ptr = cret
170 return cls
171}
172
173var xSqueezerGetPages func(uintptr) uintptr
174
175// Returns a [iface@Gio.ListModel] that contains the pages of @self.
176//
177// This can be used to keep an up-to-date view. The model also implements
178// [iface@Gtk.SelectionModel] and can be used to track the visible page.
179func (x *Squeezer) GetPages() *gtk.SelectionModelBase {
180 var cls *gtk.SelectionModelBase
181
182 cret := xSqueezerGetPages(x.GoPointer())
183
184 if cret == 0 {
185 return nil
186 }
187 cls = >k.SelectionModelBase{}
188 cls.Ptr = cret
189 return cls
190}
191
192var xSqueezerGetSwitchThresholdPolicy func(uintptr) FoldThresholdPolicy
193
194// Gets the switch threshold policy for @self.
195func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy {
196
197 cret := xSqueezerGetSwitchThresholdPolicy(x.GoPointer())
198 return cret
199}
200
201var xSqueezerGetTransitionDuration func(uintptr) uint
202
203// Gets the transition animation duration for @self.
204func (x *Squeezer) GetTransitionDuration() uint {
205
206 cret := xSqueezerGetTransitionDuration(x.GoPointer())
207 return cret
208}
209
210var xSqueezerGetTransitionRunning func(uintptr) bool
211
212// Gets whether a transition is currently running for @self.
213//
214// If a transition is impossible, the property value will be set to `TRUE` and
215// then immediately to `FALSE`, so it's possible to rely on its notifications
216// to know that a transition has happened.
217func (x *Squeezer) GetTransitionRunning() bool {
218
219 cret := xSqueezerGetTransitionRunning(x.GoPointer())
220 return cret
221}
222
223var xSqueezerGetTransitionType func(uintptr) SqueezerTransitionType
224
225// Gets the type of animation used for transitions between children in @self.
226func (x *Squeezer) GetTransitionType() SqueezerTransitionType {
227
228 cret := xSqueezerGetTransitionType(x.GoPointer())
229 return cret
230}
231
232var xSqueezerGetVisibleChild func(uintptr) uintptr
233
234// Gets the currently visible child of @self.
235func (x *Squeezer) GetVisibleChild() *gtk.Widget {
236 var cls *gtk.Widget
237
238 cret := xSqueezerGetVisibleChild(x.GoPointer())
239
240 if cret == 0 {
241 return nil
242 }
243 gobject.IncreaseRef(cret)
244 cls = >k.Widget{}
245 cls.Ptr = cret
246 return cls
247}
248
249var xSqueezerGetXalign func(uintptr) float32
250
251// Gets the horizontal alignment, from 0 (start) to 1 (end).
252func (x *Squeezer) GetXalign() float32 {
253
254 cret := xSqueezerGetXalign(x.GoPointer())
255 return cret
256}
257
258var xSqueezerGetYalign func(uintptr) float32
259
260// Gets the vertical alignment, from 0 (top) to 1 (bottom).
261func (x *Squeezer) GetYalign() float32 {
262
263 cret := xSqueezerGetYalign(x.GoPointer())
264 return cret
265}
266
267var xSqueezerRemove func(uintptr, uintptr)
268
269// Removes a child widget from @self.
270func (x *Squeezer) Remove(ChildVar *gtk.Widget) {
271
272 xSqueezerRemove(x.GoPointer(), ChildVar.GoPointer())
273
274}
275
276var xSqueezerSetAllowNone func(uintptr, bool)
277
278// Sets whether to allow squeezing beyond the last child's minimum size.
279//
280// If set to `TRUE`, the squeezer can shrink to the point where no child can be
281// shown. This is functionally equivalent to appending a widget with 0×0 minimum
282// size.
283func (x *Squeezer) SetAllowNone(AllowNoneVar bool) {
284
285 xSqueezerSetAllowNone(x.GoPointer(), AllowNoneVar)
286
287}
288
289var xSqueezerSetHomogeneous func(uintptr, bool)
290
291// Sets whether all children have the same size for the opposite orientation.
292//
293// For example, if a squeezer is horizontal and is homogeneous, it will request
294// the same height for all its children. If it isn't, the squeezer may change
295// size when a different child becomes visible.
296func (x *Squeezer) SetHomogeneous(HomogeneousVar bool) {
297
298 xSqueezerSetHomogeneous(x.GoPointer(), HomogeneousVar)
299
300}
301
302var xSqueezerSetInterpolateSize func(uintptr, bool)
303
304// Sets whether @self interpolates its size when changing the visible child.
305//
306// If `TRUE`, the squeezer will interpolate its size between the one of the
307// previous visible child and the one of the new visible child, according to the
308// set transition duration and the orientation, e.g. if the squeezer is
309// horizontal, it will interpolate the its height.
310func (x *Squeezer) SetInterpolateSize(InterpolateSizeVar bool) {
311
312 xSqueezerSetInterpolateSize(x.GoPointer(), InterpolateSizeVar)
313
314}
315
316var xSqueezerSetSwitchThresholdPolicy func(uintptr, FoldThresholdPolicy)
317
318// Sets the switch threshold policy for @self.
319//
320// Determines when the squeezer will switch children.
321//
322// If set to `ADW_FOLD_THRESHOLD_POLICY_MINIMUM`, it will only switch when the
323// visible child cannot fit anymore. With `ADW_FOLD_THRESHOLD_POLICY_NATURAL`,
324// it will switch as soon as the visible child doesn't get their natural size.
325//
326// This can be useful if you have a long ellipsizing label and want to let it
327// ellipsize instead of immediately switching.
328func (x *Squeezer) SetSwitchThresholdPolicy(PolicyVar FoldThresholdPolicy) {
329
330 xSqueezerSetSwitchThresholdPolicy(x.GoPointer(), PolicyVar)
331
332}
333
334var xSqueezerSetTransitionDuration func(uintptr, uint)
335
336// Sets the transition animation duration for @self.
337func (x *Squeezer) SetTransitionDuration(DurationVar uint) {
338
339 xSqueezerSetTransitionDuration(x.GoPointer(), DurationVar)
340
341}
342
343var xSqueezerSetTransitionType func(uintptr, SqueezerTransitionType)
344
345// Sets the type of animation used for transitions between children in @self.
346func (x *Squeezer) SetTransitionType(TransitionVar SqueezerTransitionType) {
347
348 xSqueezerSetTransitionType(x.GoPointer(), TransitionVar)
349
350}
351
352var xSqueezerSetXalign func(uintptr, float32)
353
354// Sets the horizontal alignment, from 0 (start) to 1 (end).
355//
356// This affects the children allocation during transitions, when they exceed the
357// size of the squeezer.
358//
359// For example, 0.5 means the child will be centered, 0 means it will keep the
360// start side aligned and overflow the end side, and 1 means the opposite.
361func (x *Squeezer) SetXalign(XalignVar float32) {
362
363 xSqueezerSetXalign(x.GoPointer(), XalignVar)
364
365}
366
367var xSqueezerSetYalign func(uintptr, float32)
368
369// Sets the vertical alignment, from 0 (top) to 1 (bottom).
370//
371// This affects the children allocation during transitions, when they exceed the
372// size of the squeezer.
373//
374// For example, 0.5 means the child will be centered, 0 means it will keep the
375// top side aligned and overflow the bottom side, and 1 means the opposite.
376func (x *Squeezer) SetYalign(YalignVar float32) {
377
378 xSqueezerSetYalign(x.GoPointer(), YalignVar)
379
380}
381
382func (c *Squeezer) GoPointer() uintptr {
383 if c == nil {
384 return 0
385 }
386 return c.Ptr
387}
388
389func (c *Squeezer) SetGoPointer(ptr uintptr) {
390 c.Ptr = ptr
391}
392
393// SetPropertyAllowNone sets the "allow-none" property.
394// Whether to allow squeezing beyond the last child's minimum size.
395//
396// If set to `TRUE`, the squeezer can shrink to the point where no child can
397// be shown. This is functionally equivalent to appending a widget with 0×0
398// minimum size.
399func (x *Squeezer) SetPropertyAllowNone(value bool) {
400 var v gobject.Value
401 v.Init(gobject.TypeBooleanVal)
402 v.SetBoolean(value)
403 x.SetProperty("allow-none", &v)
404}
405
406// GetPropertyAllowNone gets the "allow-none" property.
407// Whether to allow squeezing beyond the last child's minimum size.
408//
409// If set to `TRUE`, the squeezer can shrink to the point where no child can
410// be shown. This is functionally equivalent to appending a widget with 0×0
411// minimum size.
412func (x *Squeezer) GetPropertyAllowNone() bool {
413 var v gobject.Value
414 x.GetProperty("allow-none", &v)
415 return v.GetBoolean()
416}
417
418// SetPropertyHomogeneous sets the "homogeneous" property.
419// Whether all children have the same size for the opposite orientation.
420//
421// For example, if a squeezer is horizontal and is homogeneous, it will
422// request the same height for all its children. If it isn't, the squeezer may
423// change size when a different child becomes visible.
424func (x *Squeezer) SetPropertyHomogeneous(value bool) {
425 var v gobject.Value
426 v.Init(gobject.TypeBooleanVal)
427 v.SetBoolean(value)
428 x.SetProperty("homogeneous", &v)
429}
430
431// GetPropertyHomogeneous gets the "homogeneous" property.
432// Whether all children have the same size for the opposite orientation.
433//
434// For example, if a squeezer is horizontal and is homogeneous, it will
435// request the same height for all its children. If it isn't, the squeezer may
436// change size when a different child becomes visible.
437func (x *Squeezer) GetPropertyHomogeneous() bool {
438 var v gobject.Value
439 x.GetProperty("homogeneous", &v)
440 return v.GetBoolean()
441}
442
443// SetPropertyInterpolateSize sets the "interpolate-size" property.
444// Whether the squeezer interpolates its size when changing the visible child.
445//
446// If `TRUE`, the squeezer will interpolate its size between the one of the
447// previous visible child and the one of the new visible child, according to
448// the set transition duration and the orientation, e.g. if the squeezer is
449// horizontal, it will interpolate the its height.
450func (x *Squeezer) SetPropertyInterpolateSize(value bool) {
451 var v gobject.Value
452 v.Init(gobject.TypeBooleanVal)
453 v.SetBoolean(value)
454 x.SetProperty("interpolate-size", &v)
455}
456
457// GetPropertyInterpolateSize gets the "interpolate-size" property.
458// Whether the squeezer interpolates its size when changing the visible child.
459//
460// If `TRUE`, the squeezer will interpolate its size between the one of the
461// previous visible child and the one of the new visible child, according to
462// the set transition duration and the orientation, e.g. if the squeezer is
463// horizontal, it will interpolate the its height.
464func (x *Squeezer) GetPropertyInterpolateSize() bool {
465 var v gobject.Value
466 x.GetProperty("interpolate-size", &v)
467 return v.GetBoolean()
468}
469
470// SetPropertyTransitionDuration sets the "transition-duration" property.
471// The transition animation duration, in milliseconds.
472func (x *Squeezer) SetPropertyTransitionDuration(value uint) {
473 var v gobject.Value
474 v.Init(gobject.TypeUintVal)
475 v.SetUint(value)
476 x.SetProperty("transition-duration", &v)
477}
478
479// GetPropertyTransitionDuration gets the "transition-duration" property.
480// The transition animation duration, in milliseconds.
481func (x *Squeezer) GetPropertyTransitionDuration() uint {
482 var v gobject.Value
483 x.GetProperty("transition-duration", &v)
484 return v.GetUint()
485}
486
487// GetPropertyTransitionRunning gets the "transition-running" property.
488// Whether a transition is currently running.
489//
490// If a transition is impossible, the property value will be set to `TRUE` and
491// then immediately to `FALSE`, so it's possible to rely on its notifications
492// to know that a transition has happened.
493func (x *Squeezer) GetPropertyTransitionRunning() bool {
494 var v gobject.Value
495 x.GetProperty("transition-running", &v)
496 return v.GetBoolean()
497}
498
499// SetPropertyXalign sets the "xalign" property.
500// The horizontal alignment, from 0 (start) to 1 (end).
501//
502// This affects the children allocation during transitions, when they exceed
503// the size of the squeezer.
504//
505// For example, 0.5 means the child will be centered, 0 means it will keep the
506// start side aligned and overflow the end side, and 1 means the opposite.
507func (x *Squeezer) SetPropertyXalign(value float32) {
508 var v gobject.Value
509 v.Init(gobject.TypeFloatVal)
510 v.SetFloat(value)
511 x.SetProperty("xalign", &v)
512}
513
514// GetPropertyXalign gets the "xalign" property.
515// The horizontal alignment, from 0 (start) to 1 (end).
516//
517// This affects the children allocation during transitions, when they exceed
518// the size of the squeezer.
519//
520// For example, 0.5 means the child will be centered, 0 means it will keep the
521// start side aligned and overflow the end side, and 1 means the opposite.
522func (x *Squeezer) GetPropertyXalign() float32 {
523 var v gobject.Value
524 x.GetProperty("xalign", &v)
525 return v.GetFloat()
526}
527
528// SetPropertyYalign sets the "yalign" property.
529// The vertical alignment, from 0 (top) to 1 (bottom).
530//
531// This affects the children allocation during transitions, when they exceed
532// the size of the squeezer.
533//
534// For example, 0.5 means the child will be centered, 0 means it will keep the
535// top side aligned and overflow the bottom side, and 1 means the opposite.
536func (x *Squeezer) SetPropertyYalign(value float32) {
537 var v gobject.Value
538 v.Init(gobject.TypeFloatVal)
539 v.SetFloat(value)
540 x.SetProperty("yalign", &v)
541}
542
543// GetPropertyYalign gets the "yalign" property.
544// The vertical alignment, from 0 (top) to 1 (bottom).
545//
546// This affects the children allocation during transitions, when they exceed
547// the size of the squeezer.
548//
549// For example, 0.5 means the child will be centered, 0 means it will keep the
550// top side aligned and overflow the bottom side, and 1 means the opposite.
551func (x *Squeezer) GetPropertyYalign() float32 {
552 var v gobject.Value
553 x.GetProperty("yalign", &v)
554 return v.GetFloat()
555}
556
557// Requests the user's screen reader to announce the given message.
558//
559// This kind of notification is useful for messages that
560// either have only a visual representation or that are not
561// exposed visually at all, e.g. a notification about a
562// successful operation.
563//
564// Also, by using this API, you can ensure that the message
565// does not interrupts the user's current screen reader output.
566func (x *Squeezer) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
567
568 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
569
570}
571
572// Retrieves the accessible parent for an accessible object.
573//
574// This function returns `NULL` for top level widgets.
575func (x *Squeezer) GetAccessibleParent() *gtk.AccessibleBase {
576 var cls *gtk.AccessibleBase
577
578 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
579
580 if cret == 0 {
581 return nil
582 }
583 cls = >k.AccessibleBase{}
584 cls.Ptr = cret
585 return cls
586}
587
588// Retrieves the accessible role of an accessible object.
589func (x *Squeezer) GetAccessibleRole() gtk.AccessibleRole {
590
591 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
592 return cret
593}
594
595// Retrieves the implementation for the given accessible object.
596func (x *Squeezer) GetAtContext() *gtk.ATContext {
597 var cls *gtk.ATContext
598
599 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
600
601 if cret == 0 {
602 return nil
603 }
604 cls = >k.ATContext{}
605 cls.Ptr = cret
606 return cls
607}
608
609// Queries the coordinates and dimensions of this accessible
610//
611// This functionality can be overridden by `GtkAccessible`
612// implementations, e.g. to get the bounds from an ignored
613// child widget.
614func (x *Squeezer) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
615
616 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
617 return cret
618}
619
620// Retrieves the first accessible child of an accessible object.
621func (x *Squeezer) GetFirstAccessibleChild() *gtk.AccessibleBase {
622 var cls *gtk.AccessibleBase
623
624 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
625
626 if cret == 0 {
627 return nil
628 }
629 cls = >k.AccessibleBase{}
630 cls.Ptr = cret
631 return cls
632}
633
634// Retrieves the next accessible sibling of an accessible object
635func (x *Squeezer) GetNextAccessibleSibling() *gtk.AccessibleBase {
636 var cls *gtk.AccessibleBase
637
638 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
639
640 if cret == 0 {
641 return nil
642 }
643 cls = >k.AccessibleBase{}
644 cls.Ptr = cret
645 return cls
646}
647
648// Queries a platform state, such as focus.
649//
650// This functionality can be overridden by `GtkAccessible`
651// implementations, e.g. to get platform state from an ignored
652// child widget, as is the case for `GtkText` wrappers.
653func (x *Squeezer) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
654
655 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
656 return cret
657}
658
659// Resets the accessible property to its default value.
660func (x *Squeezer) ResetProperty(PropertyVar gtk.AccessibleProperty) {
661
662 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
663
664}
665
666// Resets the accessible relation to its default value.
667func (x *Squeezer) ResetRelation(RelationVar gtk.AccessibleRelation) {
668
669 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
670
671}
672
673// Resets the accessible state to its default value.
674func (x *Squeezer) ResetState(StateVar gtk.AccessibleState) {
675
676 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
677
678}
679
680// Sets the parent and sibling of an accessible object.
681//
682// This function is meant to be used by accessible implementations that are
683// not part of the widget hierarchy, and but act as a logical bridge between
684// widgets. For instance, if a widget creates an object that holds metadata
685// for each child, and you want that object to implement the `GtkAccessible`
686// interface, you will use this function to ensure that the parent of each
687// child widget is the metadata object, and the parent of each metadata
688// object is the container widget.
689func (x *Squeezer) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
690
691 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
692
693}
694
695// Updates the next accessible sibling.
696//
697// That might be useful when a new child of a custom accessible
698// is created, and it needs to be linked to a previous child.
699func (x *Squeezer) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
700
701 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
702
703}
704
705// Informs ATs that the platform state has changed.
706//
707// This function should be used by `GtkAccessible` implementations that
708// have a platform state but are not widgets. Widgets handle platform
709// states automatically.
710func (x *Squeezer) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
711
712 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
713
714}
715
716// Updates a list of accessible properties.
717//
718// See the [enum@Gtk.AccessibleProperty] documentation for the
719// value types of accessible properties.
720//
721// This function should be called by `GtkWidget` types whenever
722// an accessible property change must be communicated to assistive
723// technologies.
724//
725// Example:
726// ```c
727// value = gtk_adjustment_get_value (adjustment);
728// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
729//
730// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
731// -1);
732//
733// ```
734func (x *Squeezer) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
735
736 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
737
738}
739
740// Updates an array of accessible properties.
741//
742// This function should be called by `GtkWidget` types whenever an accessible
743// property change must be communicated to assistive technologies.
744//
745// This function is meant to be used by language bindings.
746func (x *Squeezer) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
747
748 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
749
750}
751
752// Updates a list of accessible relations.
753//
754// This function should be called by `GtkWidget` types whenever an accessible
755// relation change must be communicated to assistive technologies.
756//
757// If the [enum@Gtk.AccessibleRelation] requires a list of references,
758// you should pass each reference individually, followed by `NULL`, e.g.
759//
760// ```c
761// gtk_accessible_update_relation (accessible,
762//
763// GTK_ACCESSIBLE_RELATION_CONTROLS,
764// ref1, NULL,
765// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
766// ref1, ref2, ref3, NULL,
767// -1);
768//
769// ```
770func (x *Squeezer) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
771
772 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
773
774}
775
776// Updates an array 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// This function is meant to be used by language bindings.
782func (x *Squeezer) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
783
784 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
785
786}
787
788// Updates a list of accessible states.
789//
790// See the [enum@Gtk.AccessibleState] documentation for the
791// value types of accessible states.
792//
793// This function should be called by `GtkWidget` types whenever
794// an accessible state change must be communicated to assistive
795// technologies.
796//
797// Example:
798//
799// ```c
800// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
801// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
802//
803// GTK_ACCESSIBLE_STATE_CHECKED, value,
804// -1);
805//
806// ```
807func (x *Squeezer) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
808
809 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
810
811}
812
813// Updates an array of accessible states.
814//
815// This function should be called by `GtkWidget` types whenever an accessible
816// state change must be communicated to assistive technologies.
817//
818// This function is meant to be used by language bindings.
819func (x *Squeezer) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
820
821 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
822
823}
824
825// Gets the ID of the @buildable object.
826//
827// `GtkBuilder` sets the name based on the ID attribute
828// of the `<object>` tag used to construct the @buildable.
829func (x *Squeezer) GetBuildableId() string {
830
831 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
832 return cret
833}
834
835// Retrieves the orientation of the @orientable.
836func (x *Squeezer) GetOrientation() gtk.Orientation {
837
838 cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
839 return cret
840}
841
842// Sets the orientation of the @orientable.
843func (x *Squeezer) SetOrientation(OrientationVar gtk.Orientation) {
844
845 gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
846
847}
848
849// An auxiliary class used by [class@Squeezer].
850type SqueezerPage struct {
851 gobject.Object
852}
853
854var xSqueezerPageGLibType func() types.GType
855
856func SqueezerPageGLibType() types.GType {
857 return xSqueezerPageGLibType()
858}
859
860func SqueezerPageNewFromInternalPtr(ptr uintptr) *SqueezerPage {
861 cls := &SqueezerPage{}
862 cls.Ptr = ptr
863 return cls
864}
865
866var xSqueezerPageGetChild func(uintptr) uintptr
867
868// Returns the squeezer child to which @self belongs.
869func (x *SqueezerPage) GetChild() *gtk.Widget {
870 var cls *gtk.Widget
871
872 cret := xSqueezerPageGetChild(x.GoPointer())
873
874 if cret == 0 {
875 return nil
876 }
877 gobject.IncreaseRef(cret)
878 cls = >k.Widget{}
879 cls.Ptr = cret
880 return cls
881}
882
883var xSqueezerPageGetEnabled func(uintptr) bool
884
885// Gets whether @self is enabled.
886func (x *SqueezerPage) GetEnabled() bool {
887
888 cret := xSqueezerPageGetEnabled(x.GoPointer())
889 return cret
890}
891
892var xSqueezerPageSetEnabled func(uintptr, bool)
893
894// Sets whether @self is enabled.
895//
896// If a child is disabled, it will be ignored when looking for the child
897// fitting the available size best.
898//
899// This allows to programmatically and prematurely hide a child even if it fits
900// in the available space.
901//
902// This can be used e.g. to ensure a certain child is hidden below a certain
903// window width, or any other constraint you find suitable.
904func (x *SqueezerPage) SetEnabled(EnabledVar bool) {
905
906 xSqueezerPageSetEnabled(x.GoPointer(), EnabledVar)
907
908}
909
910func (c *SqueezerPage) GoPointer() uintptr {
911 if c == nil {
912 return 0
913 }
914 return c.Ptr
915}
916
917func (c *SqueezerPage) SetGoPointer(ptr uintptr) {
918 c.Ptr = ptr
919}
920
921// SetPropertyEnabled sets the "enabled" property.
922// Whether the child is enabled.
923//
924// If a child is disabled, it will be ignored when looking for the child
925// fitting the available size best.
926//
927// This allows to programmatically and prematurely hide a child even if it
928// fits in the available space.
929//
930// This can be used e.g. to ensure a certain child is hidden below a certain
931// window width, or any other constraint you find suitable.
932func (x *SqueezerPage) SetPropertyEnabled(value bool) {
933 var v gobject.Value
934 v.Init(gobject.TypeBooleanVal)
935 v.SetBoolean(value)
936 x.SetProperty("enabled", &v)
937}
938
939// GetPropertyEnabled gets the "enabled" property.
940// Whether the child is enabled.
941//
942// If a child is disabled, it will be ignored when looking for the child
943// fitting the available size best.
944//
945// This allows to programmatically and prematurely hide a child even if it
946// fits in the available space.
947//
948// This can be used e.g. to ensure a certain child is hidden below a certain
949// window width, or any other constraint you find suitable.
950func (x *SqueezerPage) GetPropertyEnabled() bool {
951 var v gobject.Value
952 x.GetProperty("enabled", &v)
953 return v.GetBoolean()
954}
955
956func init() {
957 core.SetPackageName("ADW", "libadwaita-1")
958 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
959 var libs []uintptr
960 for _, libPath := range core.GetPaths("ADW") {
961 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
962 if err != nil {
963 panic(err)
964 }
965 libs = append(libs, lib)
966 }
967
968 core.PuregoSafeRegister(&xSqueezerTransitionTypeGLibType, libs, "adw_squeezer_transition_type_get_type")
969
970 core.PuregoSafeRegister(&xSqueezerGLibType, libs, "adw_squeezer_get_type")
971
972 core.PuregoSafeRegister(&xNewSqueezer, libs, "adw_squeezer_new")
973
974 core.PuregoSafeRegister(&xSqueezerAdd, libs, "adw_squeezer_add")
975 core.PuregoSafeRegister(&xSqueezerGetAllowNone, libs, "adw_squeezer_get_allow_none")
976 core.PuregoSafeRegister(&xSqueezerGetHomogeneous, libs, "adw_squeezer_get_homogeneous")
977 core.PuregoSafeRegister(&xSqueezerGetInterpolateSize, libs, "adw_squeezer_get_interpolate_size")
978 core.PuregoSafeRegister(&xSqueezerGetPage, libs, "adw_squeezer_get_page")
979 core.PuregoSafeRegister(&xSqueezerGetPages, libs, "adw_squeezer_get_pages")
980 core.PuregoSafeRegister(&xSqueezerGetSwitchThresholdPolicy, libs, "adw_squeezer_get_switch_threshold_policy")
981 core.PuregoSafeRegister(&xSqueezerGetTransitionDuration, libs, "adw_squeezer_get_transition_duration")
982 core.PuregoSafeRegister(&xSqueezerGetTransitionRunning, libs, "adw_squeezer_get_transition_running")
983 core.PuregoSafeRegister(&xSqueezerGetTransitionType, libs, "adw_squeezer_get_transition_type")
984 core.PuregoSafeRegister(&xSqueezerGetVisibleChild, libs, "adw_squeezer_get_visible_child")
985 core.PuregoSafeRegister(&xSqueezerGetXalign, libs, "adw_squeezer_get_xalign")
986 core.PuregoSafeRegister(&xSqueezerGetYalign, libs, "adw_squeezer_get_yalign")
987 core.PuregoSafeRegister(&xSqueezerRemove, libs, "adw_squeezer_remove")
988 core.PuregoSafeRegister(&xSqueezerSetAllowNone, libs, "adw_squeezer_set_allow_none")
989 core.PuregoSafeRegister(&xSqueezerSetHomogeneous, libs, "adw_squeezer_set_homogeneous")
990 core.PuregoSafeRegister(&xSqueezerSetInterpolateSize, libs, "adw_squeezer_set_interpolate_size")
991 core.PuregoSafeRegister(&xSqueezerSetSwitchThresholdPolicy, libs, "adw_squeezer_set_switch_threshold_policy")
992 core.PuregoSafeRegister(&xSqueezerSetTransitionDuration, libs, "adw_squeezer_set_transition_duration")
993 core.PuregoSafeRegister(&xSqueezerSetTransitionType, libs, "adw_squeezer_set_transition_type")
994 core.PuregoSafeRegister(&xSqueezerSetXalign, libs, "adw_squeezer_set_xalign")
995 core.PuregoSafeRegister(&xSqueezerSetYalign, libs, "adw_squeezer_set_yalign")
996
997 core.PuregoSafeRegister(&xSqueezerPageGLibType, libs, "adw_squeezer_page_get_type")
998
999 core.PuregoSafeRegister(&xSqueezerPageGetChild, libs, "adw_squeezer_page_get_child")
1000 core.PuregoSafeRegister(&xSqueezerPageGetEnabled, libs, "adw_squeezer_page_get_enabled")
1001 core.PuregoSafeRegister(&xSqueezerPageSetEnabled, libs, "adw_squeezer_page_set_enabled")
1002
1003}