AdwSwipeGroup

AdwSwipeGroup — An object for syncing swipeable widgets.

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── AdwSwipeGroup

Implemented Interfaces

AdwSwipeGroup implements GtkBuildable.

Description

The AdwSwipeGroup object can be used to sync multiple swipeable widgets that implement the AdwSwipeable interface, such as AdwCarousel, so that animating one of them also animates all the other widgets in the group.

This can be useful for syncing widgets between a window's titlebar and content area.

AdwSwipeGroup as GtkBuildable

AdwSwipeGroup can be created in an UI definition. The list of swipeable widgets is specified with a <swipeables> element containing multiple <swipeable> elements with their ”name” attribute specifying the id of the widgets.

1
2
3
4
5
6
<object class="AdwSwipeGroup">
  <swipeables>
    <swipeable name="carousel1"/>
    <swipeable name="carousel2"/>
  </swipeables>
</object>

Functions

adw_swipe_group_new ()

AdwSwipeGroup *
adw_swipe_group_new (void);

Create a new AdwSwipeGroup object.

Returns

The newly created AdwSwipeGroup object

Since: 1.0


adw_swipe_group_add_swipeable ()

void
adw_swipe_group_add_swipeable (AdwSwipeGroup *self,
                               AdwSwipeable *swipeable);

When the widget is destroyed or no longer referenced elsewhere, it will be removed from the swipe group.

Parameters

self

a AdwSwipeGroup

 

swipeable

the AdwSwipeable to add

 

Since: 1.0


adw_swipe_group_get_swipeables ()

GSList *
adw_swipe_group_get_swipeables (AdwSwipeGroup *self);

Returns the list of swipeables associated with self .

Parameters

self

a AdwSwipeGroup

 

Returns

a GSList of swipeables. The list is owned by libadwaita and should not be modified.

[element-type AdwSwipeable][transfer none]

Since: 1.0


adw_swipe_group_remove_swipeable ()

void
adw_swipe_group_remove_swipeable (AdwSwipeGroup *self,
                                  AdwSwipeable *swipeable);

Removes a widget from a AdwSwipeGroup.

Parameters

self

a AdwSwipeGroup

 

swipeable

the AdwSwipeable to remove

 

Since: 1.0

Types and Values

ADW_TYPE_SWIPE_GROUP

#define ADW_TYPE_SWIPE_GROUP (adw_swipe_group_get_type())

AdwSwipeGroup

typedef struct _AdwSwipeGroup AdwSwipeGroup;

See Also

AdwCarousel, AdwLeaflet, AdwSwipeable