| Top |
| GtkWidget * | adw_carousel_new () |
| void | adw_carousel_prepend () |
| void | adw_carousel_append () |
| void | adw_carousel_insert () |
| void | adw_carousel_reorder () |
| void | adw_carousel_remove () |
| void | adw_carousel_scroll_to () |
| void | adw_carousel_scroll_to_full () |
| GtkWidget * | adw_carousel_get_nth_page () |
| guint | adw_carousel_get_n_pages () |
| double | adw_carousel_get_position () |
| gboolean | adw_carousel_get_interactive () |
| void | adw_carousel_set_interactive () |
| guint | adw_carousel_get_spacing () |
| void | adw_carousel_set_spacing () |
| guint | adw_carousel_get_animation_duration () |
| void | adw_carousel_set_animation_duration () |
| gboolean | adw_carousel_get_allow_mouse_drag () |
| void | adw_carousel_set_allow_mouse_drag () |
| gboolean | adw_carousel_get_allow_scroll_wheel () |
| void | adw_carousel_set_allow_scroll_wheel () |
| gboolean | adw_carousel_get_allow_long_swipes () |
| void | adw_carousel_set_allow_long_swipes () |
| guint | adw_carousel_get_reveal_duration () |
| void | adw_carousel_set_reveal_duration () |
| gboolean | allow-long-swipes | Read / Write |
| gboolean | allow-mouse-drag | Read / Write |
| gboolean | allow-scroll-wheel | Read / Write |
| guint | animation-duration | Read / Write |
| gboolean | interactive | Read / Write |
| guint | n-pages | Read |
| double | position | Read |
| guint | reveal-duration | Read / Write |
| guint | spacing | Read / Write |
AdwCarousel implements GtkAccessible, GtkBuildable, GtkConstraintTarget, GtkOrientable and AdwSwipeable.
The AdwCarousel widget can be used to display a set of pages with swipe-based navigation between them.
GtkWidget *
adw_carousel_new (void);
Create a new AdwCarousel widget.
Since: 1.0
void adw_carousel_prepend (AdwCarousel *self,GtkWidget *child);
Prepends child
to self
Since: 1.0
void adw_carousel_append (AdwCarousel *self,GtkWidget *child);
Appends child
to self
Since: 1.0
void adw_carousel_insert (AdwCarousel *self,GtkWidget *child,int position);
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.
Since: 1.0
void adw_carousel_reorder (AdwCarousel *self,GtkWidget *child,int position);
Moves child
into position position
.
If position is -1, or larger than the number of pages, child
will be moved
to the end.
Since: 1.0
void adw_carousel_remove (AdwCarousel *self,GtkWidget *child);
Removes child
from self
Since: 1.0
void adw_carousel_scroll_to (AdwCarousel *self,GtkWidget *widget);
Scrolls to widget
position with an animation.
“animation-duration” property can be used for controlling the
duration.
Since: 1.0
void adw_carousel_scroll_to_full (AdwCarousel *self,GtkWidget *widget,gint64 duration);
Scrolls to widget
position with an animation.
Since: 1.0
GtkWidget * adw_carousel_get_nth_page (AdwCarousel *self,guint n);
Gets the page at position n
.
Since: 1.0
guint
adw_carousel_get_n_pages (AdwCarousel *self);
Gets the number of pages in self
.
Since: 1.0
double
adw_carousel_get_position (AdwCarousel *self);
Gets current scroll position in self
. It's unitless, 1 matches 1 page.
Since: 1.0
gboolean
adw_carousel_get_interactive (AdwCarousel *self);
Gets whether self
can be navigated.
Since: 1.0
void adw_carousel_set_interactive (AdwCarousel *self,gboolean interactive);
Sets whether self
can be navigated. This can be used to temporarily disable
a AdwCarousel to only allow swiping in a certain state.
Since: 1.0
guint
adw_carousel_get_spacing (AdwCarousel *self);
Gets spacing between pages in pixels.
Since: 1.0
void adw_carousel_set_spacing (AdwCarousel *self,guint spacing);
Sets spacing between pages in pixels.
Since: 1.0
guint
adw_carousel_get_animation_duration (AdwCarousel *self);
Gets animation duration used by adw_carousel_scroll_to().
Since: 1.0
void adw_carousel_set_animation_duration (AdwCarousel *self,guint duration);
Sets animation duration used by adw_carousel_scroll_to().
Since: 1.0
gboolean
adw_carousel_get_allow_mouse_drag (AdwCarousel *self);
Sets whether self
can be dragged with mouse pointer
Since: 1.0
void adw_carousel_set_allow_mouse_drag (AdwCarousel *self,gboolean allow_mouse_drag);
Sets whether self
can be dragged with mouse pointer. If allow_mouse_drag
is FALSE, dragging is only available on touch.
Since: 1.0
gboolean
adw_carousel_get_allow_scroll_wheel (AdwCarousel *self);
Gets whether self
will respond to scroll wheel events.
Since: 1.0
void adw_carousel_set_allow_scroll_wheel (AdwCarousel *self,gboolean allow_scroll_wheel);
Sets whether self
will respond to scroll wheel events. If the value is
FALSE, wheel events will be ignored.
Since: 1.0
gboolean
adw_carousel_get_allow_long_swipes (AdwCarousel *self);
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.
Since: 1.0
void adw_carousel_set_allow_long_swipes (AdwCarousel *self,gboolean allow_long_swipes);
Sets 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.
Since: 1.0
guint
adw_carousel_get_reveal_duration (AdwCarousel *self);
Gets duration of the animation used when adding or removing pages in milliseconds.
Since: 1.0
void adw_carousel_set_reveal_duration (AdwCarousel *self,guint reveal_duration);
Sets duration of the animation used when adding or removing pages in milliseconds.
Since: 1.0
“allow-long-swipes” property “allow-long-swipes” gboolean
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.
Owner: AdwCarousel
Flags: Read / Write
Default value: FALSE
Since: 1.0
“allow-mouse-drag” property “allow-mouse-drag” gboolean
Sets whether the AdwCarousel can be dragged with mouse pointer. If the
value is FALSE, dragging is only available on touch.
Owner: AdwCarousel
Flags: Read / Write
Default value: TRUE
Since: 1.0
“allow-scroll-wheel” property “allow-scroll-wheel” gboolean
Whether the widget will respond to scroll wheel events. If the value is
FALSE, wheel events will be ignored.
Owner: AdwCarousel
Flags: Read / Write
Default value: TRUE
Since: 1.0
“animation-duration” property “animation-duration” guint
Animation duration in milliseconds, used by adw_carousel_scroll_to().
Owner: AdwCarousel
Flags: Read / Write
Default value: 250
Since: 1.0
“interactive” property “interactive” gboolean
Whether the carousel can be navigated. This can be used to temporarily disable a AdwCarousel to only allow navigating it in a certain state.
Owner: AdwCarousel
Flags: Read / Write
Default value: TRUE
Since: 1.0
“n-pages” property “n-pages” guint
The number of pages in a AdwCarousel
Owner: AdwCarousel
Flags: Read
Default value: 0
Since: 1.0
“position” property “position” double
Current scrolling position, unitless. 1 matches 1 page. Use
adw_carousel_scroll_to() for changing it.
Owner: AdwCarousel
Flags: Read
Allowed values: >= 0
Default value: 0
Since: 1.0
“reveal-duration” property “reveal-duration” guint
Page reveal duration in milliseconds.
Owner: AdwCarousel
Flags: Read / Write
Default value: 0
Since: 1.0
“spacing” property “spacing” guint
Spacing between pages in pixels.
Owner: AdwCarousel
Flags: Read / Write
Default value: 0
Since: 1.0
“page-changed” signalvoid user_function (AdwCarousel *self, guint index, gpointer user_data)
This signal is emitted after a page has been changed. This can be used to implement "infinite scrolling" by connecting to this signal and amending the pages.
self |
The AdwCarousel instance |
|
index |
Current page |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.0