Top |
void | begin-swipe | Run First |
void | end-swipe | Run First |
void | switch-child | Run First |
void | update-swipe | Run First |
The HdySwipeable interface is implemented by all swipeable widgets. They can be synced using HdySwipeGroup.
HdySwipeable is only meant to be used by libhandy widgets and is currently implemented by HdyLeaflet and HdyPaginator. It should not be implemented by applications.
struct HdySwipeableInterface { GTypeInterface parent; void (*switch_child) (HdySwipeable *self, guint index, gint64 duration); void (*begin_swipe) (HdySwipeable *self, gint direction, gboolean direct); void (*update_swipe) (HdySwipeable *self, gdouble value); void (*end_swipe) (HdySwipeable *self, gint64 duration, gdouble to); };
An interface for swipeable widgets.
GTypeInterface |
The parent interface. |
|
Switches visible child. |
||
Starts a swipe gesture. |
||
Updates swipe progress value. |
||
Ends a swipe gesture. |
Since: 0.0.12
“begin-swipe”
signalvoid user_function (HdySwipeable *self, gint direction, gpointer user_data)
This signal is emitted when a possible swipe is detected. This is used by
HdySwipeGroup, applications should not connect to it.
The direction
value can be used to restrict the swipe to a certain
direction.
self |
The HdySwipeable instance |
|
direction |
The direction of the swipe, can be 1 or -1 |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 0.0.12
“end-swipe”
signalvoid user_function (HdySwipeable *self, gint64 duration, gdouble to, gpointer user_data)
This signal is emitted as soon as the gesture has stopped. This is used by HdySwipeGroup, applications should not connect to it.
self |
The HdySwipeable instance |
|
duration |
Snap-back animation duration in milliseconds |
|
to |
The progress value to animate to |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 0.0.12
“switch-child”
signalvoid user_function (HdySwipeable *self, guint index, gint64 duration, gpointer user_data)
This signal should be emitted when the widget's visible child is changed.
duration
can be 0 if the child is switched without animation.
self |
The HdySwipeable instance |
|
index |
the index of the child to switch to |
|
duration |
Animation duration in milliseconds |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 0.0.12
“update-swipe”
signalvoid user_function (HdySwipeable *self, gdouble value, gpointer user_data)
This signal is emitted every time the progress value changes. This is used by HdySwipeGroup, applications should not connect to it.
self |
The HdySwipeable instance |
|
value |
The current animation progress value |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 0.0.12