:right-sidebar: True GestureClick =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: GestureClick(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.GestureSingle`, :class:`~gi.repository.Gtk.Gesture`, :class:`~gi.repository.Gtk.EventController`, :class:`~gi.repository.GObject.Object` ``GtkGestureClick`` is a ``GtkGesture`` implementation for clicks. It is able to recognize multiple clicks on a nearby zone, which can be listened for through the :obj:`~gi.repository.Gtk.GestureClick.signals.pressed` signal. Whenever time or distance between clicks exceed the GTK defaults, :obj:`~gi.repository.Gtk.GestureClick.signals.stopped` is emitted, and the click counter is reset. Constructors ------------ .. rst-class:: interim-class .. class:: GestureClick :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Gesture Returns a newly created ``GtkGesture`` that recognizes single and multiple presses. Signals ------- .. rst-class:: interim-class .. class:: GestureClick.signals :no-index: .. method:: pressed(n_press: int, x: float, y: float) -> None Emitted whenever a button or touch press happens. :param n_press: how many touch/button presses happened with this one :param x: The X coordinate, in widget allocation coordinates :param y: The Y coordinate, in widget allocation coordinates .. method:: released(n_press: int, x: float, y: float) -> None Emitted when a button or touch is released. ``n_press`` will report the number of press that is paired to this event, note that :obj:`~gi.repository.Gtk.GestureClick.signals.stopped` may have been emitted between the press and its release, ``n_press`` will only start over at the next press. :param n_press: number of press that is paired with this release :param x: The X coordinate, in widget allocation coordinates :param y: The Y coordinate, in widget allocation coordinates .. method:: stopped() -> None Emitted whenever any time/distance threshold has been exceeded. .. method:: unpaired_release(x: float, y: float, button: int, sequence: ~gi.repository.Gdk.EventSequence | None = None) -> None Emitted whenever the gesture receives a release event that had no previous corresponding press. Due to implicit grabs, this can only happen on situations where input is grabbed elsewhere mid-press or the pressed widget voluntarily relinquishes its implicit grab. :param x: X coordinate of the event :param y: Y coordinate of the event :param button: Button being released :param sequence: Sequence being released