Gtk.GestureSwipe¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.GestureSingle (8), Gtk.Gesture (19), Gtk.EventController (5), GObject.Object (37)
- Structs:
class |
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Gtk.GestureSingle (3), Gtk.Gesture (2), Gtk.EventController (2)
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted when the recognized gesture is finished, velocity and direction are a product of previously recorded events. |
Fields¶
- Inherited:
Class Details¶
- class Gtk.GestureSwipe(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gtk.GestureSwipe
is aGtk.Gesture
implementation able to recognize swipes, after a press/move/…/move/release sequence happens, theGtk.GestureSwipe
::swipe
signal will be emitted, providing the velocity and directionality of the sequence at the time it was lifted.If the velocity is desired in intermediate points,
Gtk.GestureSwipe.get_velocity
() can be called on eg. aGtk.Gesture
::update
handler.All velocities are reported in pixels/sec units.
- classmethod new(widget)[source]¶
- Parameters:
widget (
Gtk.Widget
) – aGtk.Widget
- Returns:
a newly created
Gtk.GestureSwipe
- Return type:
Returns a newly created
Gtk.Gesture
that recognizes swipes.New in version 3.14.
- get_velocity()[source]¶
- Returns:
whether velocity could be calculated
- velocity_x:
return value for the velocity in the X axis, in pixels/sec
- velocity_y:
return value for the velocity in the Y axis, in pixels/sec
- Return type:
If the gesture is recognized, this function returns
True
and fill in velocity_x and velocity_y with the recorded velocity, as per the last event(s) processed.New in version 3.14.
Signal Details¶
- Gtk.GestureSwipe.signals.swipe(gesture_swipe, velocity_x, velocity_y)¶
- Signal Name:
swipe
- Flags:
- Parameters:
gesture_swipe (
Gtk.GestureSwipe
) – The object which received the signalvelocity_x (
float
) – velocity in the X axis, in pixels/secvelocity_y (
float
) – velocity in the Y axis, in pixels/sec
This signal is emitted when the recognized gesture is finished, velocity and direction are a product of previously recorded events.
New in version 3.14.