GestureSwipe

class GestureSwipe(**properties: Any)

Superclasses: GestureSingle, Gesture, EventController, Object

Constructors:

GestureSwipe(**properties)
new() -> Gtk.Gesture

Constructors

class GestureSwipe
classmethod new() Gesture

Returns a newly created GtkGesture that recognizes swipes.

Methods

class GestureSwipe
get_velocity() tuple[bool, float, float]

Gets the current velocity.

If the gesture is recognized, this function returns True and fills in velocity_x and velocity_y with the recorded velocity, as per the last events processed.

Signals

class GestureSwipe.signals
swipe(velocity_x: float, velocity_y: float) None

Emitted when the recognized gesture is finished.

Velocity and direction are a product of previously recorded events.

Parameters:
  • velocity_x – velocity in the X axis, in pixels/sec

  • velocity_y – velocity in the Y axis, in pixels/sec