// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT package adw import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gdk" "github.com/bnema/puregotk/v4/glib" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" "github.com/bnema/puregotk/v4/gtk" ) type CarouselClass struct { _ structs.HostLayout ParentClass gtk.WidgetClass } func (x *CarouselClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A paginated scrolling widget. // // <picture> // // <source srcset="carousel-dark.png" media="(prefers-color-scheme: dark)"> // <img src="carousel.png" alt="carousel"> // // </picture> // // The `AdwCarousel` widget can be used to display a set of pages with // swipe-based navigation between them. // // [class@CarouselIndicatorDots] and [class@CarouselIndicatorLines] can be used // to provide page indicators for `AdwCarousel`. // // ## CSS nodes // // `AdwCarousel` has a single CSS node with name `carousel`. type Carousel struct { gtk.Widget } var xCarouselGLibType func() types.GType func CarouselGLibType() types.GType { return xCarouselGLibType() } func CarouselNewFromInternalPtr(ptr uintptr) *Carousel { cls := &Carousel{} cls.Ptr = ptr return cls } var xNewCarousel func() uintptr // Creates a new `AdwCarousel`. func NewCarousel() *Carousel { var cls *Carousel cret := xNewCarousel() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Carousel{} cls.Ptr = cret return cls } var xCarouselAppend func(uintptr, uintptr) // Appends @child to @self. func (x *Carousel) Append(ChildVar *gtk.Widget) { xCarouselAppend(x.GoPointer(), ChildVar.GoPointer()) } var xCarouselGetAllowLongSwipes func(uintptr) bool // Gets whether to allow swiping for more than one page at a time. func (x *Carousel) GetAllowLongSwipes() bool { cret := xCarouselGetAllowLongSwipes(x.GoPointer()) return cret } var xCarouselGetAllowMouseDrag func(uintptr) bool // Sets whether @self can be dragged with mouse pointer. func (x *Carousel) GetAllowMouseDrag() bool { cret := xCarouselGetAllowMouseDrag(x.GoPointer()) return cret } var xCarouselGetAllowScrollWheel func(uintptr) bool // Gets whether @self will respond to scroll wheel events. func (x *Carousel) GetAllowScrollWheel() bool { cret := xCarouselGetAllowScrollWheel(x.GoPointer()) return cret } var xCarouselGetInteractive func(uintptr) bool // Gets whether @self can be navigated. func (x *Carousel) GetInteractive() bool { cret := xCarouselGetInteractive(x.GoPointer()) return cret } var xCarouselGetNPages func(uintptr) uint // Gets the number of pages in @self. func (x *Carousel) GetNPages() uint { cret := xCarouselGetNPages(x.GoPointer()) return cret } var xCarouselGetNthPage func(uintptr, uint) uintptr // Gets the page at position @n. func (x *Carousel) GetNthPage(NVar uint) *gtk.Widget { var cls *gtk.Widget cret := xCarouselGetNthPage(x.GoPointer(), NVar) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xCarouselGetPosition func(uintptr) float64 // Gets current scroll position in @self, unitless. // // 1 matches 1 page. Use [method@Carousel.scroll_to] for changing it. func (x *Carousel) GetPosition() float64 { cret := xCarouselGetPosition(x.GoPointer()) return cret } var xCarouselGetRevealDuration func(uintptr) uint // Gets the page reveal duration, in milliseconds. func (x *Carousel) GetRevealDuration() uint { cret := xCarouselGetRevealDuration(x.GoPointer()) return cret } var xCarouselGetScrollParams func(uintptr) *SpringParams // Gets the scroll animation spring parameters for @self. func (x *Carousel) GetScrollParams() *SpringParams { cret := xCarouselGetScrollParams(x.GoPointer()) return cret } var xCarouselGetSpacing func(uintptr) uint // Gets spacing between pages in pixels. func (x *Carousel) GetSpacing() uint { cret := xCarouselGetSpacing(x.GoPointer()) return cret } var xCarouselInsert func(uintptr, uintptr, int) // Inserts @child into @self at position @position. // // If position is -1, or larger than the number of pages, // @child will be appended to the end. func (x *Carousel) Insert(ChildVar *gtk.Widget, PositionVar int) { xCarouselInsert(x.GoPointer(), ChildVar.GoPointer(), PositionVar) } var xCarouselPrepend func(uintptr, uintptr) // Prepends @child to @self. func (x *Carousel) Prepend(ChildVar *gtk.Widget) { xCarouselPrepend(x.GoPointer(), ChildVar.GoPointer()) } var xCarouselRemove func(uintptr, uintptr) // Removes @child from @self. func (x *Carousel) Remove(ChildVar *gtk.Widget) { xCarouselRemove(x.GoPointer(), ChildVar.GoPointer()) } var xCarouselReorder func(uintptr, uintptr, int) // Moves @child into position @position. // // If position is -1, or larger than the number of pages, @child will be moved // at the end. func (x *Carousel) Reorder(ChildVar *gtk.Widget, PositionVar int) { xCarouselReorder(x.GoPointer(), ChildVar.GoPointer(), PositionVar) } var xCarouselScrollTo func(uintptr, uintptr, bool) // Scrolls to @widget. // // If @animate is `TRUE`, the transition will be animated. func (x *Carousel) ScrollTo(WidgetVar *gtk.Widget, AnimateVar bool) { xCarouselScrollTo(x.GoPointer(), WidgetVar.GoPointer(), AnimateVar) } var xCarouselSetAllowLongSwipes func(uintptr, bool) // Sets whether to allow swiping for more than one page at a time. // // If @allow_long_swipes is `FALSE`, each swipe can only move to the adjacent // pages. func (x *Carousel) SetAllowLongSwipes(AllowLongSwipesVar bool) { xCarouselSetAllowLongSwipes(x.GoPointer(), AllowLongSwipesVar) } var xCarouselSetAllowMouseDrag func(uintptr, bool) // Sets whether @self can be dragged with mouse pointer. // // If @allow_mouse_drag is `FALSE`, dragging is only available on touch. func (x *Carousel) SetAllowMouseDrag(AllowMouseDragVar bool) { xCarouselSetAllowMouseDrag(x.GoPointer(), AllowMouseDragVar) } var xCarouselSetAllowScrollWheel func(uintptr, bool) // Sets whether @self will respond to scroll wheel events. // // If @allow_scroll_wheel is `FALSE`, wheel events will be ignored. func (x *Carousel) SetAllowScrollWheel(AllowScrollWheelVar bool) { xCarouselSetAllowScrollWheel(x.GoPointer(), AllowScrollWheelVar) } var xCarouselSetInteractive func(uintptr, bool) // Sets whether @self can be navigated. // // This can be used to temporarily disable the carousel to only allow navigating // it in a certain state. func (x *Carousel) SetInteractive(InteractiveVar bool) { xCarouselSetInteractive(x.GoPointer(), InteractiveVar) } var xCarouselSetRevealDuration func(uintptr, uint) // Sets the page reveal duration, in milliseconds. // // Reveal duration is used when animating adding or removing pages. func (x *Carousel) SetRevealDuration(RevealDurationVar uint) { xCarouselSetRevealDuration(x.GoPointer(), RevealDurationVar) } var xCarouselSetScrollParams func(uintptr, *SpringParams) // Sets the scroll animation spring parameters for @self. // // The default value is equivalent to: // // ```c // adw_spring_params_new (1, 0.5, 500) // ``` func (x *Carousel) SetScrollParams(ParamsVar *SpringParams) { xCarouselSetScrollParams(x.GoPointer(), ParamsVar) } var xCarouselSetSpacing func(uintptr, uint) // Sets spacing between pages in pixels. func (x *Carousel) SetSpacing(SpacingVar uint) { xCarouselSetSpacing(x.GoPointer(), SpacingVar) } func (c *Carousel) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *Carousel) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyAllowLongSwipes sets the "allow-long-swipes" property. // Whether to allow swiping for more than one page at a time. // // If the value is `FALSE`, each swipe can only move to the adjacent pages. func (x *Carousel) SetPropertyAllowLongSwipes(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("allow-long-swipes", &v) } // GetPropertyAllowLongSwipes gets the "allow-long-swipes" property. // Whether to allow swiping for more than one page at a time. // // If the value is `FALSE`, each swipe can only move to the adjacent pages. func (x *Carousel) GetPropertyAllowLongSwipes() bool { var v gobject.Value x.GetProperty("allow-long-swipes", &v) return v.GetBoolean() } // SetPropertyAllowMouseDrag sets the "allow-mouse-drag" property. // Sets whether the `AdwCarousel` can be dragged with mouse pointer. // // If the value is `FALSE`, dragging is only available on touch. func (x *Carousel) SetPropertyAllowMouseDrag(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("allow-mouse-drag", &v) } // GetPropertyAllowMouseDrag gets the "allow-mouse-drag" property. // Sets whether the `AdwCarousel` can be dragged with mouse pointer. // // If the value is `FALSE`, dragging is only available on touch. func (x *Carousel) GetPropertyAllowMouseDrag() bool { var v gobject.Value x.GetProperty("allow-mouse-drag", &v) return v.GetBoolean() } // SetPropertyAllowScrollWheel sets the "allow-scroll-wheel" property. // Whether the widget will respond to scroll wheel events. // // If the value is `FALSE`, wheel events will be ignored. func (x *Carousel) SetPropertyAllowScrollWheel(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("allow-scroll-wheel", &v) } // GetPropertyAllowScrollWheel gets the "allow-scroll-wheel" property. // Whether the widget will respond to scroll wheel events. // // If the value is `FALSE`, wheel events will be ignored. func (x *Carousel) GetPropertyAllowScrollWheel() bool { var v gobject.Value x.GetProperty("allow-scroll-wheel", &v) return v.GetBoolean() } // SetPropertyInteractive sets the "interactive" property. // Whether the carousel can be navigated. // // This can be used to temporarily disable the carousel to only allow // navigating it in a certain state. func (x *Carousel) SetPropertyInteractive(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("interactive", &v) } // GetPropertyInteractive gets the "interactive" property. // Whether the carousel can be navigated. // // This can be used to temporarily disable the carousel to only allow // navigating it in a certain state. func (x *Carousel) GetPropertyInteractive() bool { var v gobject.Value x.GetProperty("interactive", &v) return v.GetBoolean() } // GetPropertyNPages gets the "n-pages" property. // The number of pages in a `AdwCarousel`. func (x *Carousel) GetPropertyNPages() uint { var v gobject.Value x.GetProperty("n-pages", &v) return v.GetUint() } // GetPropertyPosition gets the "position" property. // Current scrolling position, unitless. // // 1 matches 1 page. Use [method@Carousel.scroll_to] for changing it. func (x *Carousel) GetPropertyPosition() float64 { var v gobject.Value x.GetProperty("position", &v) return v.GetDouble() } // SetPropertyRevealDuration sets the "reveal-duration" property. // Page reveal duration, in milliseconds. // // Reveal duration is used when animating adding or removing pages. func (x *Carousel) SetPropertyRevealDuration(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("reveal-duration", &v) } // GetPropertyRevealDuration gets the "reveal-duration" property. // Page reveal duration, in milliseconds. // // Reveal duration is used when animating adding or removing pages. func (x *Carousel) GetPropertyRevealDuration() uint { var v gobject.Value x.GetProperty("reveal-duration", &v) return v.GetUint() } // SetPropertyScrollParams sets the "scroll-params" property. // Scroll animation spring parameters. // // The default value is equivalent to: // // ```c // adw_spring_params_new (1, 0.5, 500) // ``` func (x *Carousel) SetPropertyScrollParams(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("scroll-params", &v) } // GetPropertyScrollParams gets the "scroll-params" property. // Scroll animation spring parameters. // // The default value is equivalent to: // // ```c // adw_spring_params_new (1, 0.5, 500) // ``` func (x *Carousel) GetPropertyScrollParams() uintptr { var v gobject.Value x.GetProperty("scroll-params", &v) return v.GetPointer() } // SetPropertySpacing sets the "spacing" property. // Spacing between pages in pixels. func (x *Carousel) SetPropertySpacing(value uint) { var v gobject.Value v.Init(gobject.TypeUintVal) v.SetUint(value) x.SetProperty("spacing", &v) } // GetPropertySpacing gets the "spacing" property. // Spacing between pages in pixels. func (x *Carousel) GetPropertySpacing() uint { var v gobject.Value x.GetProperty("spacing", &v) return v.GetUint() } // This signal is emitted after a page has been changed. // // It can be used to implement "infinite scrolling" by amending the pages // after every scroll. // // ::: note // // An empty carousel is indicated by `(int)index == -1`. func (x *Carousel) ConnectPageChanged(cb *func(Carousel, uint)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "page-changed", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr, IndexVarp uint) { fa := Carousel{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa, IndexVarp) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "page-changed", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Gets the progress @self will snap back to after the gesture is canceled. func (x *Carousel) GetCancelProgress() float64 { cret := XAdwSwipeableGetCancelProgress(x.GoPointer()) return cret } // Gets the swipe distance of @self. // // This corresponds to how many pixels 1 unit represents. func (x *Carousel) GetDistance() float64 { cret := XAdwSwipeableGetDistance(x.GoPointer()) return cret } // Gets the current progress of @self. func (x *Carousel) GetProgress() float64 { cret := XAdwSwipeableGetProgress(x.GoPointer()) return cret } // Gets the snap points of @self. // // Each snap point represents a progress value that is considered acceptable to // end the swipe on. func (x *Carousel) GetSnapPoints(NSnapPointsVar *int) uintptr { cret := XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar) return cret } // Gets the area @self can start a swipe from for the given direction and // gesture type. // // This can be used to restrict swipes to only be possible from a certain area, // for example, to only allow edge swipes, or to have a draggable element and // ignore swipes elsewhere. // // If not implemented, the default implementation returns the allocation of // @self, allowing swipes from anywhere. func (x *Carousel) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDragVar bool, RectVar *gdk.Rectangle) { XAdwSwipeableGetSwipeArea(x.GoPointer(), NavigationDirectionVar, IsDragVar, RectVar) } // Requests the user's screen reader to announce the given message. // // This kind of notification is useful for messages that // either have only a visual representation or that are not // exposed visually at all, e.g. a notification about a // successful operation. // // Also, by using this API, you can ensure that the message // does not interrupts the user's current screen reader output. func (x *Carousel) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) { gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar) } // Retrieves the accessible parent for an accessible object. // // This function returns `NULL` for top level widgets. func (x *Carousel) GetAccessibleParent() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the accessible role of an accessible object. func (x *Carousel) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *Carousel) GetAtContext() *gtk.ATContext { var cls *gtk.ATContext cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer()) if cret == 0 { return nil } cls = >k.ATContext{} cls.Ptr = cret return cls } // Queries the coordinates and dimensions of this accessible // // This functionality can be overridden by `GtkAccessible` // implementations, e.g. to get the bounds from an ignored // child widget. func (x *Carousel) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool { cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar) return cret } // Retrieves the first accessible child of an accessible object. func (x *Carousel) GetFirstAccessibleChild() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the next accessible sibling of an accessible object func (x *Carousel) GetNextAccessibleSibling() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Queries a platform state, such as focus. // // This functionality can be overridden by `GtkAccessible` // implementations, e.g. to get platform state from an ignored // child widget, as is the case for `GtkText` wrappers. func (x *Carousel) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *Carousel) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *Carousel) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *Carousel) ResetState(StateVar gtk.AccessibleState) { gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar) } // Sets the parent and sibling of an accessible object. // // This function is meant to be used by accessible implementations that are // not part of the widget hierarchy, and but act as a logical bridge between // widgets. For instance, if a widget creates an object that holds metadata // for each child, and you want that object to implement the `GtkAccessible` // interface, you will use this function to ensure that the parent of each // child widget is the metadata object, and the parent of each metadata // object is the container widget. func (x *Carousel) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) { gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer()) } // Updates the next accessible sibling. // // That might be useful when a new child of a custom accessible // is created, and it needs to be linked to a previous child. func (x *Carousel) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) { gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer()) } // Informs ATs that the platform state has changed. // // This function should be used by `GtkAccessible` implementations that // have a platform state but are not widgets. Widgets handle platform // states automatically. func (x *Carousel) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) { gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar) } // Updates a list of accessible properties. // // See the [enum@Gtk.AccessibleProperty] documentation for the // value types of accessible properties. // // This function should be called by `GtkWidget` types whenever // an accessible property change must be communicated to assistive // technologies. // // Example: // ```c // value = gtk_adjustment_get_value (adjustment); // gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button), // // GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value, // -1); // // ``` func (x *Carousel) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) { gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...) } // Updates an array of accessible properties. // // This function should be called by `GtkWidget` types whenever an accessible // property change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Carousel) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar) } // Updates a list of accessible relations. // // This function should be called by `GtkWidget` types whenever an accessible // relation change must be communicated to assistive technologies. // // If the [enum@Gtk.AccessibleRelation] requires a list of references, // you should pass each reference individually, followed by `NULL`, e.g. // // ```c // gtk_accessible_update_relation (accessible, // // GTK_ACCESSIBLE_RELATION_CONTROLS, // ref1, NULL, // GTK_ACCESSIBLE_RELATION_LABELLED_BY, // ref1, ref2, ref3, NULL, // -1); // // ``` func (x *Carousel) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) { gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...) } // Updates an array of accessible relations. // // This function should be called by `GtkWidget` types whenever an accessible // relation change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Carousel) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar) } // Updates a list of accessible states. // // See the [enum@Gtk.AccessibleState] documentation for the // value types of accessible states. // // This function should be called by `GtkWidget` types whenever // an accessible state change must be communicated to assistive // technologies. // // Example: // // ```c // value = GTK_ACCESSIBLE_TRISTATE_MIXED; // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button), // // GTK_ACCESSIBLE_STATE_CHECKED, value, // -1); // // ``` func (x *Carousel) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) { gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...) } // Updates an array of accessible states. // // This function should be called by `GtkWidget` types whenever an accessible // state change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Carousel) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar) } // Gets the ID of the @buildable object. // // `GtkBuilder` sets the name based on the ID attribute // of the `<object>` tag used to construct the @buildable. func (x *Carousel) GetBuildableId() string { cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // Retrieves the orientation of the @orientable. func (x *Carousel) GetOrientation() gtk.Orientation { cret := gtk.XGtkOrientableGetOrientation(x.GoPointer()) return cret } // Sets the orientation of the @orientable. func (x *Carousel) SetOrientation(OrientationVar gtk.Orientation) { gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar) } func init() { core.SetPackageName("ADW", "libadwaita-1") core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("ADW") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xCarouselGLibType, libs, "adw_carousel_get_type") core.PuregoSafeRegister(&xNewCarousel, libs, "adw_carousel_new") core.PuregoSafeRegister(&xCarouselAppend, libs, "adw_carousel_append") core.PuregoSafeRegister(&xCarouselGetAllowLongSwipes, libs, "adw_carousel_get_allow_long_swipes") core.PuregoSafeRegister(&xCarouselGetAllowMouseDrag, libs, "adw_carousel_get_allow_mouse_drag") core.PuregoSafeRegister(&xCarouselGetAllowScrollWheel, libs, "adw_carousel_get_allow_scroll_wheel") core.PuregoSafeRegister(&xCarouselGetInteractive, libs, "adw_carousel_get_interactive") core.PuregoSafeRegister(&xCarouselGetNPages, libs, "adw_carousel_get_n_pages") core.PuregoSafeRegister(&xCarouselGetNthPage, libs, "adw_carousel_get_nth_page") core.PuregoSafeRegister(&xCarouselGetPosition, libs, "adw_carousel_get_position") core.PuregoSafeRegister(&xCarouselGetRevealDuration, libs, "adw_carousel_get_reveal_duration") core.PuregoSafeRegister(&xCarouselGetScrollParams, libs, "adw_carousel_get_scroll_params") core.PuregoSafeRegister(&xCarouselGetSpacing, libs, "adw_carousel_get_spacing") core.PuregoSafeRegister(&xCarouselInsert, libs, "adw_carousel_insert") core.PuregoSafeRegister(&xCarouselPrepend, libs, "adw_carousel_prepend") core.PuregoSafeRegister(&xCarouselRemove, libs, "adw_carousel_remove") core.PuregoSafeRegister(&xCarouselReorder, libs, "adw_carousel_reorder") core.PuregoSafeRegister(&xCarouselScrollTo, libs, "adw_carousel_scroll_to") core.PuregoSafeRegister(&xCarouselSetAllowLongSwipes, libs, "adw_carousel_set_allow_long_swipes") core.PuregoSafeRegister(&xCarouselSetAllowMouseDrag, libs, "adw_carousel_set_allow_mouse_drag") core.PuregoSafeRegister(&xCarouselSetAllowScrollWheel, libs, "adw_carousel_set_allow_scroll_wheel") core.PuregoSafeRegister(&xCarouselSetInteractive, libs, "adw_carousel_set_interactive") core.PuregoSafeRegister(&xCarouselSetRevealDuration, libs, "adw_carousel_set_reveal_duration") core.PuregoSafeRegister(&xCarouselSetScrollParams, libs, "adw_carousel_set_scroll_params") core.PuregoSafeRegister(&xCarouselSetSpacing, libs, "adw_carousel_set_spacing") }