GtkGesturePan — Pan gesture
GObject ╰── GtkEventController ╰── GtkGesture ╰── GtkGestureSingle ╰── GtkGestureDrag ╰── GtkGesturePan
GtkGesturePan is a GtkGesture implementation able to recognize pan gestures, those are drags that are locked to happen along one axis. The axis that a GtkGesturePan handles is defined at construct time, and can be changed through
When the gesture starts to be recognized, GtkGesturePan will attempt to determine as early as possible whether the sequence is moving in the expected direction, and denying the sequence if this does not happen.
Once a panning gesture along the expected axis is recognized, the “pan” signal will be emitted as input events are received, containing the offset in the given axis.
GtkGesture * gtk_gesture_pan_new (
Returns a newly created GtkGesture that recognizes pan gestures.
a newly created GtkGesturePan
GtkOrientation gtk_gesture_pan_get_orientation (
Returns the orientation of the pan gestures that this
the expected orientation for pan gestures
typedef struct _GtkGesturePan GtkGesturePan;
Describes the panning direction of a GtkGesturePan
panned towards the left
panned towards the right
The expected orientation of pan gestures.
Flags: Read / Write
Default value: GTK_ORIENTATION_HORIZONTAL
void user_function (GtkGesturePan *gesture, GtkPanDirection direction, double offset, gpointer user_data)
This signal is emitted once a panning gesture along the expected axis is detected.
The object which received the signal
current direction of the pan gesture
Offset along the gesture orientation
user data set when the signal handler was connected.
Flags: Run Last
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.