Skip to content

zwp_pointer_gesture_hold_v1¤

wayland.zwp_pointer_gesture_hold_v1 ¤

A hold gesture object

A hold gesture object notifies a client about a single- or multi-finger hold gesture detected on an indirect input device such as a touchpad. The gesture is usually initiated by one or more fingers being held down without significant movement. The precise conditions of when such a gesture is detected are implementation-dependent.

In particular, this gesture may be used to cancel kinetic scrolling.

A hold gesture consists of two stages: begin and end. Unlike pinch and swipe there is no update stage. There cannot be multiple simultaneous hold, pinch or swipe gestures on a same pointer/seat, how compositors prevent these situations is implementation-dependent.

A gesture may be cancelled by the compositor or the hardware. Clients should not consider performing permanent or irreversible actions until the end of a gesture has been received.

Methods:

  • destroy

    Destroy the hold gesture object

  • on_begin

    Multi-finger hold begin.

  • on_end

    Multi-finger hold end.

events

begin ¤

begin(serial: int, time: int, surface: wl_surface, fingers: int) -> None

Multi-finger hold begin

This event is sent when a hold gesture is detected on the device.

Parameters:

  • time ¤

    (int) –

    Timestamp with millisecond granularity

  • fingers ¤

    (int) –

    Number of fingers

end ¤

end(serial: int, time: int, cancelled: int) -> None

Multi-finger hold end

This event is sent when a hold gesture ceases to be valid. This may happen when the holding fingers are lifted or the gesture is cancelled, for example if the fingers move past an implementation-defined threshold, the finger count changes or the hold gesture changes into a different type of gesture.

When a gesture is cancelled, the client may need to undo state changes caused by this gesture. What causes a gesture to be cancelled is implementation-dependent.

Parameters:

  • time ¤

    (int) –

    Timestamp with millisecond granularity

  • cancelled ¤

    (int) –

    1 if the gesture was cancelled, 0 otherwise

destroy ¤

destroy() -> None

Destroy the hold gesture object

on_begin ¤

on_begin(serial: int, time: int, surface: wl_surface, fingers: int) -> None

Multi-finger hold begin.

Override to handle wayland.zwp_pointer_gesture_hold_v1.events.begin.

on_end ¤

on_end(serial: int, time: int, cancelled: int) -> None

Multi-finger hold end.

Override to handle wayland.zwp_pointer_gesture_hold_v1.events.end.