1// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package adw
3
4import (
5 "structs"
6 "unsafe"
7
8 "github.com/ebitengine/purego"
9
10 "github.com/bnema/puregotk/pkg/core"
11 "github.com/bnema/puregotk/v4/gdk"
12 "github.com/bnema/puregotk/v4/glib"
13 "github.com/bnema/puregotk/v4/gobject"
14 "github.com/bnema/puregotk/v4/gobject/types"
15 "github.com/bnema/puregotk/v4/gtk"
16)
17
18type CarouselClass struct {
19 _ structs.HostLayout
20
21 ParentClass gtk.WidgetClass
22}
23
24func (x *CarouselClass) GoPointer() uintptr {
25 return uintptr(unsafe.Pointer(x))
26}
27
28// A paginated scrolling widget.
29//
30// <picture>
31//
32// <source srcset="carousel-dark.png" media="(prefers-color-scheme: dark)">
33// <img src="carousel.png" alt="carousel">
34//
35// </picture>
36//
37// The `AdwCarousel` widget can be used to display a set of pages with
38// swipe-based navigation between them.
39//
40// [class@CarouselIndicatorDots] and [class@CarouselIndicatorLines] can be used
41// to provide page indicators for `AdwCarousel`.
42//
43// ## CSS nodes
44//
45// `AdwCarousel` has a single CSS node with name `carousel`.
46type Carousel struct {
47 gtk.Widget
48}
49
50var xCarouselGLibType func() types.GType
51
52func CarouselGLibType() types.GType {
53 return xCarouselGLibType()
54}
55
56func CarouselNewFromInternalPtr(ptr uintptr) *Carousel {
57 cls := &Carousel{}
58 cls.Ptr = ptr
59 return cls
60}
61
62var xNewCarousel func() uintptr
63
64// Creates a new `AdwCarousel`.
65func NewCarousel() *Carousel {
66 var cls *Carousel
67
68 cret := xNewCarousel()
69
70 if cret == 0 {
71 return nil
72 }
73 gobject.IncreaseRef(cret)
74 cls = &Carousel{}
75 cls.Ptr = cret
76 return cls
77}
78
79var xCarouselAppend func(uintptr, uintptr)
80
81// Appends @child to @self.
82func (x *Carousel) Append(ChildVar *gtk.Widget) {
83
84 xCarouselAppend(x.GoPointer(), ChildVar.GoPointer())
85
86}
87
88var xCarouselGetAllowLongSwipes func(uintptr) bool
89
90// Gets whether to allow swiping for more than one page at a time.
91func (x *Carousel) GetAllowLongSwipes() bool {
92
93 cret := xCarouselGetAllowLongSwipes(x.GoPointer())
94 return cret
95}
96
97var xCarouselGetAllowMouseDrag func(uintptr) bool
98
99// Sets whether @self can be dragged with mouse pointer.
100func (x *Carousel) GetAllowMouseDrag() bool {
101
102 cret := xCarouselGetAllowMouseDrag(x.GoPointer())
103 return cret
104}
105
106var xCarouselGetAllowScrollWheel func(uintptr) bool
107
108// Gets whether @self will respond to scroll wheel events.
109func (x *Carousel) GetAllowScrollWheel() bool {
110
111 cret := xCarouselGetAllowScrollWheel(x.GoPointer())
112 return cret
113}
114
115var xCarouselGetInteractive func(uintptr) bool
116
117// Gets whether @self can be navigated.
118func (x *Carousel) GetInteractive() bool {
119
120 cret := xCarouselGetInteractive(x.GoPointer())
121 return cret
122}
123
124var xCarouselGetNPages func(uintptr) uint
125
126// Gets the number of pages in @self.
127func (x *Carousel) GetNPages() uint {
128
129 cret := xCarouselGetNPages(x.GoPointer())
130 return cret
131}
132
133var xCarouselGetNthPage func(uintptr, uint) uintptr
134
135// Gets the page at position @n.
136func (x *Carousel) GetNthPage(NVar uint) *gtk.Widget {
137 var cls *gtk.Widget
138
139 cret := xCarouselGetNthPage(x.GoPointer(), NVar)
140
141 if cret == 0 {
142 return nil
143 }
144 gobject.IncreaseRef(cret)
145 cls = >k.Widget{}
146 cls.Ptr = cret
147 return cls
148}
149
150var xCarouselGetPosition func(uintptr) float64
151
152// Gets current scroll position in @self, unitless.
153//
154// 1 matches 1 page. Use [method@Carousel.scroll_to] for changing it.
155func (x *Carousel) GetPosition() float64 {
156
157 cret := xCarouselGetPosition(x.GoPointer())
158 return cret
159}
160
161var xCarouselGetRevealDuration func(uintptr) uint
162
163// Gets the page reveal duration, in milliseconds.
164func (x *Carousel) GetRevealDuration() uint {
165
166 cret := xCarouselGetRevealDuration(x.GoPointer())
167 return cret
168}
169
170var xCarouselGetScrollParams func(uintptr) *SpringParams
171
172// Gets the scroll animation spring parameters for @self.
173func (x *Carousel) GetScrollParams() *SpringParams {
174
175 cret := xCarouselGetScrollParams(x.GoPointer())
176 return cret
177}
178
179var xCarouselGetSpacing func(uintptr) uint
180
181// Gets spacing between pages in pixels.
182func (x *Carousel) GetSpacing() uint {
183
184 cret := xCarouselGetSpacing(x.GoPointer())
185 return cret
186}
187
188var xCarouselInsert func(uintptr, uintptr, int)
189
190// Inserts @child into @self at position @position.
191//
192// If position is -1, or larger than the number of pages,
193// @child will be appended to the end.
194func (x *Carousel) Insert(ChildVar *gtk.Widget, PositionVar int) {
195
196 xCarouselInsert(x.GoPointer(), ChildVar.GoPointer(), PositionVar)
197
198}
199
200var xCarouselPrepend func(uintptr, uintptr)
201
202// Prepends @child to @self.
203func (x *Carousel) Prepend(ChildVar *gtk.Widget) {
204
205 xCarouselPrepend(x.GoPointer(), ChildVar.GoPointer())
206
207}
208
209var xCarouselRemove func(uintptr, uintptr)
210
211// Removes @child from @self.
212func (x *Carousel) Remove(ChildVar *gtk.Widget) {
213
214 xCarouselRemove(x.GoPointer(), ChildVar.GoPointer())
215
216}
217
218var xCarouselReorder func(uintptr, uintptr, int)
219
220// Moves @child into position @position.
221//
222// If position is -1, or larger than the number of pages, @child will be moved
223// at the end.
224func (x *Carousel) Reorder(ChildVar *gtk.Widget, PositionVar int) {
225
226 xCarouselReorder(x.GoPointer(), ChildVar.GoPointer(), PositionVar)
227
228}
229
230var xCarouselScrollTo func(uintptr, uintptr, bool)
231
232// Scrolls to @widget.
233//
234// If @animate is `TRUE`, the transition will be animated.
235func (x *Carousel) ScrollTo(WidgetVar *gtk.Widget, AnimateVar bool) {
236
237 xCarouselScrollTo(x.GoPointer(), WidgetVar.GoPointer(), AnimateVar)
238
239}
240
241var xCarouselSetAllowLongSwipes func(uintptr, bool)
242
243// Sets whether to allow swiping for more than one page at a time.
244//
245// If @allow_long_swipes is `FALSE`, each swipe can only move to the adjacent
246// pages.
247func (x *Carousel) SetAllowLongSwipes(AllowLongSwipesVar bool) {
248
249 xCarouselSetAllowLongSwipes(x.GoPointer(), AllowLongSwipesVar)
250
251}
252
253var xCarouselSetAllowMouseDrag func(uintptr, bool)
254
255// Sets whether @self can be dragged with mouse pointer.
256//
257// If @allow_mouse_drag is `FALSE`, dragging is only available on touch.
258func (x *Carousel) SetAllowMouseDrag(AllowMouseDragVar bool) {
259
260 xCarouselSetAllowMouseDrag(x.GoPointer(), AllowMouseDragVar)
261
262}
263
264var xCarouselSetAllowScrollWheel func(uintptr, bool)
265
266// Sets whether @self will respond to scroll wheel events.
267//
268// If @allow_scroll_wheel is `FALSE`, wheel events will be ignored.
269func (x *Carousel) SetAllowScrollWheel(AllowScrollWheelVar bool) {
270
271 xCarouselSetAllowScrollWheel(x.GoPointer(), AllowScrollWheelVar)
272
273}
274
275var xCarouselSetInteractive func(uintptr, bool)
276
277// Sets whether @self can be navigated.
278//
279// This can be used to temporarily disable the carousel to only allow navigating
280// it in a certain state.
281func (x *Carousel) SetInteractive(InteractiveVar bool) {
282
283 xCarouselSetInteractive(x.GoPointer(), InteractiveVar)
284
285}
286
287var xCarouselSetRevealDuration func(uintptr, uint)
288
289// Sets the page reveal duration, in milliseconds.
290//
291// Reveal duration is used when animating adding or removing pages.
292func (x *Carousel) SetRevealDuration(RevealDurationVar uint) {
293
294 xCarouselSetRevealDuration(x.GoPointer(), RevealDurationVar)
295
296}
297
298var xCarouselSetScrollParams func(uintptr, *SpringParams)
299
300// Sets the scroll animation spring parameters for @self.
301//
302// The default value is equivalent to:
303//
304// ```c
305// adw_spring_params_new (1, 0.5, 500)
306// ```
307func (x *Carousel) SetScrollParams(ParamsVar *SpringParams) {
308
309 xCarouselSetScrollParams(x.GoPointer(), ParamsVar)
310
311}
312
313var xCarouselSetSpacing func(uintptr, uint)
314
315// Sets spacing between pages in pixels.
316func (x *Carousel) SetSpacing(SpacingVar uint) {
317
318 xCarouselSetSpacing(x.GoPointer(), SpacingVar)
319
320}
321
322func (c *Carousel) GoPointer() uintptr {
323 if c == nil {
324 return 0
325 }
326 return c.Ptr
327}
328
329func (c *Carousel) SetGoPointer(ptr uintptr) {
330 c.Ptr = ptr
331}
332
333// SetPropertyAllowLongSwipes sets the "allow-long-swipes" property.
334// Whether to allow swiping for more than one page at a time.
335//
336// If the value is `FALSE`, each swipe can only move to the adjacent pages.
337func (x *Carousel) SetPropertyAllowLongSwipes(value bool) {
338 var v gobject.Value
339 v.Init(gobject.TypeBooleanVal)
340 v.SetBoolean(value)
341 x.SetProperty("allow-long-swipes", &v)
342}
343
344// GetPropertyAllowLongSwipes gets the "allow-long-swipes" property.
345// Whether to allow swiping for more than one page at a time.
346//
347// If the value is `FALSE`, each swipe can only move to the adjacent pages.
348func (x *Carousel) GetPropertyAllowLongSwipes() bool {
349 var v gobject.Value
350 x.GetProperty("allow-long-swipes", &v)
351 return v.GetBoolean()
352}
353
354// SetPropertyAllowMouseDrag sets the "allow-mouse-drag" property.
355// Sets whether the `AdwCarousel` can be dragged with mouse pointer.
356//
357// If the value is `FALSE`, dragging is only available on touch.
358func (x *Carousel) SetPropertyAllowMouseDrag(value bool) {
359 var v gobject.Value
360 v.Init(gobject.TypeBooleanVal)
361 v.SetBoolean(value)
362 x.SetProperty("allow-mouse-drag", &v)
363}
364
365// GetPropertyAllowMouseDrag gets the "allow-mouse-drag" property.
366// Sets whether the `AdwCarousel` can be dragged with mouse pointer.
367//
368// If the value is `FALSE`, dragging is only available on touch.
369func (x *Carousel) GetPropertyAllowMouseDrag() bool {
370 var v gobject.Value
371 x.GetProperty("allow-mouse-drag", &v)
372 return v.GetBoolean()
373}
374
375// SetPropertyAllowScrollWheel sets the "allow-scroll-wheel" property.
376// Whether the widget will respond to scroll wheel events.
377//
378// If the value is `FALSE`, wheel events will be ignored.
379func (x *Carousel) SetPropertyAllowScrollWheel(value bool) {
380 var v gobject.Value
381 v.Init(gobject.TypeBooleanVal)
382 v.SetBoolean(value)
383 x.SetProperty("allow-scroll-wheel", &v)
384}
385
386// GetPropertyAllowScrollWheel gets the "allow-scroll-wheel" property.
387// Whether the widget will respond to scroll wheel events.
388//
389// If the value is `FALSE`, wheel events will be ignored.
390func (x *Carousel) GetPropertyAllowScrollWheel() bool {
391 var v gobject.Value
392 x.GetProperty("allow-scroll-wheel", &v)
393 return v.GetBoolean()
394}
395
396// SetPropertyInteractive sets the "interactive" property.
397// Whether the carousel can be navigated.
398//
399// This can be used to temporarily disable the carousel to only allow
400// navigating it in a certain state.
401func (x *Carousel) SetPropertyInteractive(value bool) {
402 var v gobject.Value
403 v.Init(gobject.TypeBooleanVal)
404 v.SetBoolean(value)
405 x.SetProperty("interactive", &v)
406}
407
408// GetPropertyInteractive gets the "interactive" property.
409// Whether the carousel can be navigated.
410//
411// This can be used to temporarily disable the carousel to only allow
412// navigating it in a certain state.
413func (x *Carousel) GetPropertyInteractive() bool {
414 var v gobject.Value
415 x.GetProperty("interactive", &v)
416 return v.GetBoolean()
417}
418
419// GetPropertyNPages gets the "n-pages" property.
420// The number of pages in a `AdwCarousel`.
421func (x *Carousel) GetPropertyNPages() uint {
422 var v gobject.Value
423 x.GetProperty("n-pages", &v)
424 return v.GetUint()
425}
426
427// GetPropertyPosition gets the "position" property.
428// Current scrolling position, unitless.
429//
430// 1 matches 1 page. Use [method@Carousel.scroll_to] for changing it.
431func (x *Carousel) GetPropertyPosition() float64 {
432 var v gobject.Value
433 x.GetProperty("position", &v)
434 return v.GetDouble()
435}
436
437// SetPropertyRevealDuration sets the "reveal-duration" property.
438// Page reveal duration, in milliseconds.
439//
440// Reveal duration is used when animating adding or removing pages.
441func (x *Carousel) SetPropertyRevealDuration(value uint) {
442 var v gobject.Value
443 v.Init(gobject.TypeUintVal)
444 v.SetUint(value)
445 x.SetProperty("reveal-duration", &v)
446}
447
448// GetPropertyRevealDuration gets the "reveal-duration" property.
449// Page reveal duration, in milliseconds.
450//
451// Reveal duration is used when animating adding or removing pages.
452func (x *Carousel) GetPropertyRevealDuration() uint {
453 var v gobject.Value
454 x.GetProperty("reveal-duration", &v)
455 return v.GetUint()
456}
457
458// SetPropertyScrollParams sets the "scroll-params" property.
459// Scroll animation spring parameters.
460//
461// The default value is equivalent to:
462//
463// ```c
464// adw_spring_params_new (1, 0.5, 500)
465// ```
466func (x *Carousel) SetPropertyScrollParams(value uintptr) {
467 var v gobject.Value
468 v.Init(gobject.TypePointerVal)
469 v.SetPointer(value)
470 x.SetProperty("scroll-params", &v)
471}
472
473// GetPropertyScrollParams gets the "scroll-params" property.
474// Scroll animation spring parameters.
475//
476// The default value is equivalent to:
477//
478// ```c
479// adw_spring_params_new (1, 0.5, 500)
480// ```
481func (x *Carousel) GetPropertyScrollParams() uintptr {
482 var v gobject.Value
483 x.GetProperty("scroll-params", &v)
484 return v.GetPointer()
485}
486
487// SetPropertySpacing sets the "spacing" property.
488// Spacing between pages in pixels.
489func (x *Carousel) SetPropertySpacing(value uint) {
490 var v gobject.Value
491 v.Init(gobject.TypeUintVal)
492 v.SetUint(value)
493 x.SetProperty("spacing", &v)
494}
495
496// GetPropertySpacing gets the "spacing" property.
497// Spacing between pages in pixels.
498func (x *Carousel) GetPropertySpacing() uint {
499 var v gobject.Value
500 x.GetProperty("spacing", &v)
501 return v.GetUint()
502}
503
504// This signal is emitted after a page has been changed.
505//
506// It can be used to implement "infinite scrolling" by amending the pages
507// after every scroll.
508//
509// ::: note
510//
511// An empty carousel is indicated by `(int)index == -1`.
512func (x *Carousel) ConnectPageChanged(cb *func(Carousel, uint)) uint {
513 cbPtr := uintptr(unsafe.Pointer(cb))
514 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
515 handlerID := gobject.SignalConnect(x.GoPointer(), "page-changed", cbRefPtr)
516 glib.SaveHandlerMapping(handlerID, cbPtr)
517 return handlerID
518 }
519
520 fcb := func(clsPtr uintptr, IndexVarp uint) {
521 fa := Carousel{}
522 fa.Ptr = clsPtr
523 cbFn := *cb
524
525 cbFn(fa, IndexVarp)
526
527 }
528 cbRefPtr := purego.NewCallback(fcb)
529 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
530 handlerID := gobject.SignalConnect(x.GoPointer(), "page-changed", cbRefPtr)
531 glib.SaveHandlerMapping(handlerID, cbPtr)
532 return handlerID
533}
534
535// Gets the progress @self will snap back to after the gesture is canceled.
536func (x *Carousel) GetCancelProgress() float64 {
537
538 cret := XAdwSwipeableGetCancelProgress(x.GoPointer())
539 return cret
540}
541
542// Gets the swipe distance of @self.
543//
544// This corresponds to how many pixels 1 unit represents.
545func (x *Carousel) GetDistance() float64 {
546
547 cret := XAdwSwipeableGetDistance(x.GoPointer())
548 return cret
549}
550
551// Gets the current progress of @self.
552func (x *Carousel) GetProgress() float64 {
553
554 cret := XAdwSwipeableGetProgress(x.GoPointer())
555 return cret
556}
557
558// Gets the snap points of @self.
559//
560// Each snap point represents a progress value that is considered acceptable to
561// end the swipe on.
562func (x *Carousel) GetSnapPoints(NSnapPointsVar *int) uintptr {
563
564 cret := XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)
565 return cret
566}
567
568// Gets the area @self can start a swipe from for the given direction and
569// gesture type.
570//
571// This can be used to restrict swipes to only be possible from a certain area,
572// for example, to only allow edge swipes, or to have a draggable element and
573// ignore swipes elsewhere.
574//
575// If not implemented, the default implementation returns the allocation of
576// @self, allowing swipes from anywhere.
577func (x *Carousel) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDragVar bool, RectVar *gdk.Rectangle) {
578
579 XAdwSwipeableGetSwipeArea(x.GoPointer(), NavigationDirectionVar, IsDragVar, RectVar)
580
581}
582
583// Requests the user's screen reader to announce the given message.
584//
585// This kind of notification is useful for messages that
586// either have only a visual representation or that are not
587// exposed visually at all, e.g. a notification about a
588// successful operation.
589//
590// Also, by using this API, you can ensure that the message
591// does not interrupts the user's current screen reader output.
592func (x *Carousel) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
593
594 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
595
596}
597
598// Retrieves the accessible parent for an accessible object.
599//
600// This function returns `NULL` for top level widgets.
601func (x *Carousel) GetAccessibleParent() *gtk.AccessibleBase {
602 var cls *gtk.AccessibleBase
603
604 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
605
606 if cret == 0 {
607 return nil
608 }
609 cls = >k.AccessibleBase{}
610 cls.Ptr = cret
611 return cls
612}
613
614// Retrieves the accessible role of an accessible object.
615func (x *Carousel) GetAccessibleRole() gtk.AccessibleRole {
616
617 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
618 return cret
619}
620
621// Retrieves the implementation for the given accessible object.
622func (x *Carousel) GetAtContext() *gtk.ATContext {
623 var cls *gtk.ATContext
624
625 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
626
627 if cret == 0 {
628 return nil
629 }
630 cls = >k.ATContext{}
631 cls.Ptr = cret
632 return cls
633}
634
635// Queries the coordinates and dimensions of this accessible
636//
637// This functionality can be overridden by `GtkAccessible`
638// implementations, e.g. to get the bounds from an ignored
639// child widget.
640func (x *Carousel) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
641
642 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
643 return cret
644}
645
646// Retrieves the first accessible child of an accessible object.
647func (x *Carousel) GetFirstAccessibleChild() *gtk.AccessibleBase {
648 var cls *gtk.AccessibleBase
649
650 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
651
652 if cret == 0 {
653 return nil
654 }
655 cls = >k.AccessibleBase{}
656 cls.Ptr = cret
657 return cls
658}
659
660// Retrieves the next accessible sibling of an accessible object
661func (x *Carousel) GetNextAccessibleSibling() *gtk.AccessibleBase {
662 var cls *gtk.AccessibleBase
663
664 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
665
666 if cret == 0 {
667 return nil
668 }
669 cls = >k.AccessibleBase{}
670 cls.Ptr = cret
671 return cls
672}
673
674// Queries a platform state, such as focus.
675//
676// This functionality can be overridden by `GtkAccessible`
677// implementations, e.g. to get platform state from an ignored
678// child widget, as is the case for `GtkText` wrappers.
679func (x *Carousel) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
680
681 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
682 return cret
683}
684
685// Resets the accessible property to its default value.
686func (x *Carousel) ResetProperty(PropertyVar gtk.AccessibleProperty) {
687
688 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
689
690}
691
692// Resets the accessible relation to its default value.
693func (x *Carousel) ResetRelation(RelationVar gtk.AccessibleRelation) {
694
695 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
696
697}
698
699// Resets the accessible state to its default value.
700func (x *Carousel) ResetState(StateVar gtk.AccessibleState) {
701
702 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
703
704}
705
706// Sets the parent and sibling of an accessible object.
707//
708// This function is meant to be used by accessible implementations that are
709// not part of the widget hierarchy, and but act as a logical bridge between
710// widgets. For instance, if a widget creates an object that holds metadata
711// for each child, and you want that object to implement the `GtkAccessible`
712// interface, you will use this function to ensure that the parent of each
713// child widget is the metadata object, and the parent of each metadata
714// object is the container widget.
715func (x *Carousel) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
716
717 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
718
719}
720
721// Updates the next accessible sibling.
722//
723// That might be useful when a new child of a custom accessible
724// is created, and it needs to be linked to a previous child.
725func (x *Carousel) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
726
727 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
728
729}
730
731// Informs ATs that the platform state has changed.
732//
733// This function should be used by `GtkAccessible` implementations that
734// have a platform state but are not widgets. Widgets handle platform
735// states automatically.
736func (x *Carousel) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
737
738 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
739
740}
741
742// Updates a list of accessible properties.
743//
744// See the [enum@Gtk.AccessibleProperty] documentation for the
745// value types of accessible properties.
746//
747// This function should be called by `GtkWidget` types whenever
748// an accessible property change must be communicated to assistive
749// technologies.
750//
751// Example:
752// ```c
753// value = gtk_adjustment_get_value (adjustment);
754// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
755//
756// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
757// -1);
758//
759// ```
760func (x *Carousel) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
761
762 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
763
764}
765
766// Updates an array of accessible properties.
767//
768// This function should be called by `GtkWidget` types whenever an accessible
769// property change must be communicated to assistive technologies.
770//
771// This function is meant to be used by language bindings.
772func (x *Carousel) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
773
774 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
775
776}
777
778// Updates a list of accessible relations.
779//
780// This function should be called by `GtkWidget` types whenever an accessible
781// relation change must be communicated to assistive technologies.
782//
783// If the [enum@Gtk.AccessibleRelation] requires a list of references,
784// you should pass each reference individually, followed by `NULL`, e.g.
785//
786// ```c
787// gtk_accessible_update_relation (accessible,
788//
789// GTK_ACCESSIBLE_RELATION_CONTROLS,
790// ref1, NULL,
791// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
792// ref1, ref2, ref3, NULL,
793// -1);
794//
795// ```
796func (x *Carousel) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
797
798 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
799
800}
801
802// Updates an array of accessible relations.
803//
804// This function should be called by `GtkWidget` types whenever an accessible
805// relation change must be communicated to assistive technologies.
806//
807// This function is meant to be used by language bindings.
808func (x *Carousel) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
809
810 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
811
812}
813
814// Updates a list of accessible states.
815//
816// See the [enum@Gtk.AccessibleState] documentation for the
817// value types of accessible states.
818//
819// This function should be called by `GtkWidget` types whenever
820// an accessible state change must be communicated to assistive
821// technologies.
822//
823// Example:
824//
825// ```c
826// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
827// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
828//
829// GTK_ACCESSIBLE_STATE_CHECKED, value,
830// -1);
831//
832// ```
833func (x *Carousel) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
834
835 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
836
837}
838
839// Updates an array of accessible states.
840//
841// This function should be called by `GtkWidget` types whenever an accessible
842// state change must be communicated to assistive technologies.
843//
844// This function is meant to be used by language bindings.
845func (x *Carousel) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
846
847 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
848
849}
850
851// Gets the ID of the @buildable object.
852//
853// `GtkBuilder` sets the name based on the ID attribute
854// of the `<object>` tag used to construct the @buildable.
855func (x *Carousel) GetBuildableId() string {
856
857 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
858 return cret
859}
860
861// Retrieves the orientation of the @orientable.
862func (x *Carousel) GetOrientation() gtk.Orientation {
863
864 cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
865 return cret
866}
867
868// Sets the orientation of the @orientable.
869func (x *Carousel) SetOrientation(OrientationVar gtk.Orientation) {
870
871 gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
872
873}
874
875func init() {
876 core.SetPackageName("ADW", "libadwaita-1")
877 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
878 var libs []uintptr
879 for _, libPath := range core.GetPaths("ADW") {
880 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
881 if err != nil {
882 panic(err)
883 }
884 libs = append(libs, lib)
885 }
886
887 core.PuregoSafeRegister(&xCarouselGLibType, libs, "adw_carousel_get_type")
888
889 core.PuregoSafeRegister(&xNewCarousel, libs, "adw_carousel_new")
890
891 core.PuregoSafeRegister(&xCarouselAppend, libs, "adw_carousel_append")
892 core.PuregoSafeRegister(&xCarouselGetAllowLongSwipes, libs, "adw_carousel_get_allow_long_swipes")
893 core.PuregoSafeRegister(&xCarouselGetAllowMouseDrag, libs, "adw_carousel_get_allow_mouse_drag")
894 core.PuregoSafeRegister(&xCarouselGetAllowScrollWheel, libs, "adw_carousel_get_allow_scroll_wheel")
895 core.PuregoSafeRegister(&xCarouselGetInteractive, libs, "adw_carousel_get_interactive")
896 core.PuregoSafeRegister(&xCarouselGetNPages, libs, "adw_carousel_get_n_pages")
897 core.PuregoSafeRegister(&xCarouselGetNthPage, libs, "adw_carousel_get_nth_page")
898 core.PuregoSafeRegister(&xCarouselGetPosition, libs, "adw_carousel_get_position")
899 core.PuregoSafeRegister(&xCarouselGetRevealDuration, libs, "adw_carousel_get_reveal_duration")
900 core.PuregoSafeRegister(&xCarouselGetScrollParams, libs, "adw_carousel_get_scroll_params")
901 core.PuregoSafeRegister(&xCarouselGetSpacing, libs, "adw_carousel_get_spacing")
902 core.PuregoSafeRegister(&xCarouselInsert, libs, "adw_carousel_insert")
903 core.PuregoSafeRegister(&xCarouselPrepend, libs, "adw_carousel_prepend")
904 core.PuregoSafeRegister(&xCarouselRemove, libs, "adw_carousel_remove")
905 core.PuregoSafeRegister(&xCarouselReorder, libs, "adw_carousel_reorder")
906 core.PuregoSafeRegister(&xCarouselScrollTo, libs, "adw_carousel_scroll_to")
907 core.PuregoSafeRegister(&xCarouselSetAllowLongSwipes, libs, "adw_carousel_set_allow_long_swipes")
908 core.PuregoSafeRegister(&xCarouselSetAllowMouseDrag, libs, "adw_carousel_set_allow_mouse_drag")
909 core.PuregoSafeRegister(&xCarouselSetAllowScrollWheel, libs, "adw_carousel_set_allow_scroll_wheel")
910 core.PuregoSafeRegister(&xCarouselSetInteractive, libs, "adw_carousel_set_interactive")
911 core.PuregoSafeRegister(&xCarouselSetRevealDuration, libs, "adw_carousel_set_reveal_duration")
912 core.PuregoSafeRegister(&xCarouselSetScrollParams, libs, "adw_carousel_set_scroll_params")
913 core.PuregoSafeRegister(&xCarouselSetSpacing, libs, "adw_carousel_set_spacing")
914
915}