GestureClick

class GestureClick(**properties: Any)

Superclasses: GestureSingle, Gesture, EventController, Object

Constructors:

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

Constructors

class GestureClick
classmethod new() Gesture

Returns a newly created GtkGesture that recognizes single and multiple presses.

Signals

class GestureClick.signals
pressed(n_press: int, x: float, y: float) None

Emitted whenever a button or touch press happens.

Parameters:
  • n_press – how many touch/button presses happened with this one

  • x – The X coordinate, in widget allocation coordinates

  • y – The Y coordinate, in widget allocation coordinates

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 stopped may have been emitted between the press and its release, n_press will only start over at the next press.

Parameters:
  • n_press – number of press that is paired with this release

  • x – The X coordinate, in widget allocation coordinates

  • y – The Y coordinate, in widget allocation coordinates

stopped() None

Emitted whenever any time/distance threshold has been exceeded.

unpaired_release(x: float, y: float, button: int, sequence: 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.

Parameters:
  • x – X coordinate of the event

  • y – Y coordinate of the event

  • button – Button being released

  • sequence – Sequence being released