Interface

Gtk-4.0GtkGestureSwipeSignalSignatures

interface SignalSignatures {
    begin: (arg0: Gdk.EventSequence) => void;
    cancel: (arg0: Gdk.EventSequence) => void;
    end: (arg0: Gdk.EventSequence) => void;
    notify: (arg0: GObject.ParamSpec) => void;
    "notify::button": (pspec: GObject.ParamSpec) => void;
    "notify::exclusive": (pspec: GObject.ParamSpec) => void;
    "notify::n-points": (pspec: GObject.ParamSpec) => void;
    "notify::name": (pspec: GObject.ParamSpec) => void;
    "notify::propagation-limit": (pspec: GObject.ParamSpec) => void;
    "notify::propagation-phase": (pspec: GObject.ParamSpec) => void;
    "notify::touch-only": (pspec: GObject.ParamSpec) => void;
    "notify::widget": (pspec: GObject.ParamSpec) => void;
    "sequence-state-changed": (
        arg0: Gdk.EventSequence,
        arg1: Gtk.EventSequenceState,
    ) => void;
    swipe: (arg0: number, arg1: number) => void;
    update: (arg0: Gdk.EventSequence) => void;
}

Hierarchy (View Summary)

Index

Properties

"notify::button": (pspec: GObject.ParamSpec) => void
"notify::exclusive": (pspec: GObject.ParamSpec) => void
"notify::n-points": (pspec: GObject.ParamSpec) => void
"notify::name": (pspec: GObject.ParamSpec) => void
"notify::propagation-limit": (pspec: GObject.ParamSpec) => void
"notify::propagation-phase": (pspec: GObject.ParamSpec) => void
"notify::touch-only": (pspec: GObject.ParamSpec) => void
"notify::widget": (pspec: GObject.ParamSpec) => void
swipe: (arg0: number, arg1: number) => void

Emitted when the recognized gesture is finished.

Velocity and direction are a product of previously recorded events.

Properties - Inherited from Gtk.GestureSingle.SignalSignatures

begin: (arg0: Gdk.EventSequence) => void

Emitted when the gesture is recognized.

This means the number of touch sequences matches Gtk.Gesture.n_points.

Note: These conditions may also happen when an extra touch (eg. a third touch on a 2-touches gesture) is lifted, in that situation sequence won't pertain to the current set of active touches, so don't rely on this being true.

cancel: (arg0: Gdk.EventSequence) => void

Emitted whenever a sequence is cancelled.

This usually happens on active touches when Gtk.EventController.reset is called on gesture (manually, due to grabs...), or the individual sequence was claimed by parent widgets' controllers (see Gtk.Gesture.set_sequence_state).

gesture must forget everything about sequence as in response to this signal.

end: (arg0: Gdk.EventSequence) => void

Emitted when gesture either stopped recognizing the event sequences as something to be handled, or the number of touch sequences became higher or lower than Gtk.Gesture.n_points.

Note: sequence might not pertain to the group of sequences that were previously triggering recognition on gesture (ie. a just pressed touch sequence that exceeds Gtk.Gesture.n_points). This situation may be detected by checking through Gtk.Gesture.handles_sequence.

notify: (arg0: GObject.ParamSpec) => void

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with GObject.ParamFlags.EXPLICIT_NOTIFY, then any call to g_object_set_property() results in ::notify being emitted, even if the new value is the same as the old. If they did pass GObject.ParamFlags.EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

g_signal_connect (text_view->buffer, "notify::paste-target-list",
G_CALLBACK (gtk_text_view_target_list_notify),
text_view)

It is important to note that you must use [canonical parameter names][class@GObject.ParamSpec#parameter-names] as detail strings for the notify signal.

"sequence-state-changed": (
    arg0: Gdk.EventSequence,
    arg1: Gtk.EventSequenceState,
) => void

Emitted whenever a sequence state changes.

See Gtk.Gesture.set_sequence_state to know more about the expectable sequence lifetimes.

update: (arg0: Gdk.EventSequence) => void

Emitted whenever an event is handled while the gesture is recognized.

sequence is guaranteed to pertain to the set of active touches.