Adw.Carousel
Description: Reference for Adw.Carousel

### Class

# AdwCarousel

#### Description [src]

    final class Adw.Carousel : Gtk.Widget {
      /* No available fields */
    }

A paginated scrolling widget.

The `AdwCarousel` widget can be used to display a set of pages with swipe-based navigation between them.

`AdwCarouselIndicatorDots` and `AdwCarouselIndicatorLines` can be used to provide page indicators for `AdwCarousel`.

## CSS nodes

`AdwCarousel` has a single CSS node with name `carousel`.

Available since: | 1.0

#### Hierarchy

#### Ancestors

- GtkWidget
- GInitiallyUnowned
- GObject

#### Implements

- AdwSwipeable
- GtkAccessible
- GtkBuildable
- GtkConstraintTarget
- GtkOrientable

#### Constructors

###### adw_carousel_new

Creates a new `AdwCarousel`.

Available since: 1.0

#### Instance methods

###### adw_carousel_append

Appends `child` to `self`.

Available since: 1.0

###### adw_carousel_get_allow_long_swipes

Gets whether to allow swiping for more than one page at a time.

Available since: 1.0

###### adw_carousel_get_allow_mouse_drag

Sets whether `self` can be dragged with mouse pointer.

Available since: 1.0

###### adw_carousel_get_allow_scroll_wheel

Gets whether `self` will respond to scroll wheel events.

Available since: 1.0

###### adw_carousel_get_animation_duration

Gets the animation duration used by adw_carousel_scroll_to().

Available since: 1.0

###### adw_carousel_get_interactive

Gets whether `self` can be navigated.

Available since: 1.0

###### adw_carousel_get_n_pages

Gets the number of pages in `self`.

Available since: 1.0

###### adw_carousel_get_nth_page

Gets the page at position `n`.

Available since: 1.0

###### adw_carousel_get_position

Gets current scroll position in `self`.

Available since: 1.0

###### adw_carousel_get_reveal_duration

Gets duration of the animation used when adding or removing pages.

Available since: 1.0

###### adw_carousel_get_spacing

Gets spacing between pages in pixels.

Available since: 1.0

###### adw_carousel_insert

Inserts `child` into `self` at position `position`.

Available since: 1.0

###### adw_carousel_prepend

Prepends `child` to `self`.

Available since: 1.0

###### adw_carousel_remove

Removes `child` from `self`.

Available since: 1.0

###### adw_carousel_reorder

Moves `child` into position `position`.

Available since: 1.0

###### adw_carousel_scroll_to

Scrolls to `widget` with an animation.

Available since: 1.0

###### adw_carousel_scroll_to_full

Scrolls to `widget` with an animation.

Available since: 1.0

###### adw_carousel_set_allow_long_swipes

Sets whether to allow swiping for more than one page at a time.

Available since: 1.0

###### adw_carousel_set_allow_mouse_drag

Sets whether `self` can be dragged with mouse pointer.

Available since: 1.0

###### adw_carousel_set_allow_scroll_wheel

Sets whether `self` will respond to scroll wheel events.

Available since: 1.0

###### adw_carousel_set_animation_duration

Sets the animation duration used by adw_carousel_scroll_to().

Available since: 1.0

###### adw_carousel_set_interactive

Sets whether `self` can be navigated.

Available since: 1.0

###### adw_carousel_set_reveal_duration

Sets duration of the animation used when adding or removing pages.

Available since: 1.0

###### adw_carousel_set_spacing

Sets spacing between pages in pixels.

Available since: 1.0

##### Methods inherited from AdwSwipeable (5)

###### adw_swipeable_get_cancel_progress

Gets the progress `self` will snap back to after the gesture is canceled.

Available since: 1.0

###### adw_swipeable_get_distance

Gets the swipe distance of `self`.

Available since: 1.0

###### adw_swipeable_get_progress

Gets the current progress of `self`.

Available since: 1.0

###### adw_swipeable_get_snap_points

Gets the snap points of `self`.

Available since: 1.0

###### adw_swipeable_get_swipe_area

Gets the area `self` can start a swipe from for the given direction and gesture type.

Available since: 1.0

#### Properties

###### Adw.Carousel:allow-long-swipes

Whether to allow swiping for more than one page at a time.

Available since: 1.0

###### Adw.Carousel:allow-mouse-drag

Sets whether the `AdwCarousel` can be dragged with mouse pointer.

Available since: 1.0

###### Adw.Carousel:allow-scroll-wheel

Whether the widget will respond to scroll wheel events.

Available since: 1.0

###### Adw.Carousel:animation-duration

Animation duration in milliseconds, used by adw_carousel_scroll_to().

Available since: 1.0

###### Adw.Carousel:interactive

Whether the carousel can be navigated.

Available since: 1.0

###### Adw.Carousel:n-pages

The number of pages in a `AdwCarousel`.

Available since: 1.0

###### Adw.Carousel:position

Current scrolling position, unitless.

Available since: 1.0

###### Adw.Carousel:reveal-duration

Page reveal duration in milliseconds.

Available since: 1.0

###### Adw.Carousel:spacing

Spacing between pages in pixels.

Available since: 1.0

#### Signals

###### Adw.Carousel::page-changed

This signal is emitted after a page has been changed.

Available since: 1.0

#### Class structure

    struct AdwCarouselClass {
      GtkWidgetClass parent_class;

    }

###### Class members

`parent_class` |
    GtkWidgetClass
| No description available.