It derives from <GtkWidget>.
A paginated scrolling widget.
The <AdwCarousel> widget can be used to display a
set of pages with swipe-based navigation between them.
CarouselIndicatorDots and CarouselIndicatorLines can be
used to provide page indicators for
<AdwCarousel>.
<AdwCarousel> has a single CSS node with name
carousel.
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.
Its value is a boolean.
Set it with (set! (carousel:allow-long-swipes self) value).
Sets whether the <AdwCarousel> can be dragged
with mouse pointer.
If the value is FALSE, dragging is only available on touch.
Its value is a boolean.
Set it with (set! (carousel:allow-mouse-drag self) value).
Whether the widget will respond to scroll wheel events.
If the value is FALSE, wheel events will be ignored.
Its value is a boolean.
Set it with (set! (carousel:allow-scroll-wheel self) value).
Whether the carousel can be navigated.
This can be used to temporarily disable the carousel to only allow navigating it in a certain state.
Its value is a boolean.
Set it with (set! (carousel:interactive self) value).
The number of pages in a <AdwCarousel>.
Its value is an unsigned 32-bit integer.
It is read only.
Current scrolling position, unitless.
1 matches 1 page. Use Carousel.scroll_to for changing it.
Its value is a real number.
It is read only.
Page reveal duration, in milliseconds.
Reveal duration is used when animating adding or removing pages.
Its value is an unsigned 32-bit integer.
Set it with (set! (carousel:reveal-duration self) value).
Scroll animation spring parameters.
The default value is equivalent to:
adw_spring_params_new (1, 0.5, 500)
Its value is a <AdwSpringParams>, or
#f.
Set it with (set! (carousel:scroll-params self) value).
Spacing between pages in pixels.
Its value is an unsigned 32-bit integer.
Set it with (set! (carousel:spacing self) value).
Appends child to self.
Passed: a <AdwCarousel>.
a carousel
Passed: a <GtkWidget>.
a widget to add
Gets whether to allow swiping for more than one page at a time.
Passed: a <AdwCarousel>.
a carousel
Returned: a boolean.
TRUE if long swipes are allowed
Sets whether self can be dragged with mouse pointer.
Passed: a <AdwCarousel>.
a carousel
Returned: a boolean.
whether self can be dragged with mouse pointer
Gets whether self will respond to scroll wheel events.
Passed: a <AdwCarousel>.
a carousel
Returned: a boolean.
TRUE if self will respond to scroll wheel events
Gets whether self can be navigated.
Passed: a <AdwCarousel>.
a carousel
Returned: a boolean.
whether self can be navigated
Gets the number of pages in self.
Passed: a <AdwCarousel>.
a carousel
Returned: an unsigned 32-bit integer.
the number of pages in self
Gets the page at position n.
Passed: a <AdwCarousel>.
a carousel
Passed: an unsigned 32-bit integer.
index of the page
Returned: a <GtkWidget>.
the page
Gets current scroll position in self, unitless.
1 matches 1 page. Use Carousel.scroll_to for changing it.
Passed: a <AdwCarousel>.
a carousel
Returned: a real number.
the scroll position
Gets the page reveal duration, in milliseconds.
Passed: a <AdwCarousel>.
a carousel
Returned: an unsigned 32-bit integer.
the duration
Gets the scroll animation spring parameters for self.
Passed: a <AdwCarousel>.
a carousel
Returned: a <AdwSpringParams>.
the animation parameters
Gets spacing between pages in pixels.
Passed: a <AdwCarousel>.
a carousel
Returned: an unsigned 32-bit integer.
spacing between pages
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.
Passed: a <AdwCarousel>.
a carousel
Passed: a <GtkWidget>.
a widget to add
Passed: a 32-bit integer.
the position to insert child at
Creates a new <AdwCarousel>.
Returned: a <GtkWidget>.
the newly created <AdwCarousel>
Prepends child to self.
Passed: a <AdwCarousel>.
a carousel
Passed: a <GtkWidget>.
a widget to add
Removes child from self.
Passed: a <AdwCarousel>.
a carousel
Passed: a <GtkWidget>.
a widget to remove
Moves child into position position.
If position is -1, or larger than the number of pages, child will be moved at the end.
Passed: a <AdwCarousel>.
a carousel
Passed: a <GtkWidget>.
a widget to add
Passed: a 32-bit integer.
the position to move child to
Scrolls to widget.
If animate is TRUE, the transition will be animated.
Passed: a <AdwCarousel>.
a carousel
Passed: a <GtkWidget>.
a child of self
Passed: a boolean.
whether to animate the transition
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.
Passed: a <AdwCarousel>.
a carousel
Passed: a boolean.
whether to allow long swipes
Sets whether self can be dragged with mouse pointer.
If allow-mouse-drag is FALSE, dragging is only available on
touch.
Passed: a <AdwCarousel>.
a carousel
Passed: a boolean.
whether self can be dragged with mouse pointer
Sets whether self will respond to scroll wheel events.
If allow-scroll-wheel is FALSE, wheel events will be
ignored.
Passed: a <AdwCarousel>.
a carousel
Passed: a boolean.
whether self will respond to scroll wheel events
Sets whether self can be navigated.
This can be used to temporarily disable the carousel to only allow navigating it in a certain state.
Passed: a <AdwCarousel>.
a carousel
Passed: a boolean.
whether self can be navigated
Sets the page reveal duration, in milliseconds.
Reveal duration is used when animating adding or removing pages.
Passed: a <AdwCarousel>.
a carousel
Passed: an unsigned 32-bit integer.
the new reveal duration value
Sets the scroll animation spring parameters for self.
The default value is equivalent to:
adw_spring_params_new (1, 0.5, 500)
Passed: a <AdwCarousel>.
a carousel
Passed: a <AdwSpringParams>.
the new parameters
Sets spacing between pages in pixels.
Passed: a <AdwCarousel>.
a carousel
Passed: an unsigned 32-bit integer.
the new spacing value
Connect a handler with (connect object carousel:page-changed
handler). It is called as (handler self index).
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.
Passed: a <AdwCarousel>.
Passed: an unsigned 32-bit integer.
current page