Gtk.GestureClick

g GObject.Object GObject.Object Gtk.EventController Gtk.EventController GObject.Object->Gtk.EventController Gtk.Gesture Gtk.Gesture Gtk.EventController->Gtk.Gesture Gtk.GestureSingle Gtk.GestureSingle Gtk.Gesture->Gtk.GestureSingle Gtk.GestureClick Gtk.GestureClick Gtk.GestureSingle->Gtk.GestureClick

Subclasses:

None

Methods

Inherited:

Gtk.GestureSingle (8), Gtk.Gesture (17), Gtk.EventController (13), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gtk.GestureSingle (3), Gtk.Gesture (1), Gtk.EventController (4)

Signals

Inherited:

Gtk.Gesture (5), GObject.Object (1)

Name

Short Description

pressed

Emitted whenever a button or touch press happens.

released

Emitted when a button or touch is released.

stopped

Emitted whenever any time/distance threshold has been exceeded.

unpaired-release

Emitted whenever the gesture receives a release event that had no previous corresponding press.

Fields

Inherited:

Gtk.Gesture (5), GObject.Object (1)

Class Details

class Gtk.GestureClick(**kwargs)
Bases:

Gtk.GestureSingle

Abstract:

No

Structure:

Gtk.GestureClickClass

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 [signal`Gtk`.GestureClick::pressed] signal. Whenever time or distance between clicks exceed the GTK defaults, [signal`Gtk`.GestureClick::stopped] is emitted, and the click counter is reset.

classmethod new()[source]
Returns:

a newly created GtkGestureClick

Return type:

Gtk.Gesture

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

Signal Details

Gtk.GestureClick.signals.pressed(gesture_click, n_press, x, y)
Signal Name:

pressed

Flags:

RUN_LAST

Parameters:
  • gesture_click (Gtk.GestureClick) – The object which received the signal

  • n_press (int) – how many touch/button presses happened with this one

  • x (float) – The X coordinate, in widget allocation coordinates

  • y (float) – The Y coordinate, in widget allocation coordinates

Emitted whenever a button or touch press happens.

Gtk.GestureClick.signals.released(gesture_click, n_press, x, y)
Signal Name:

released

Flags:

RUN_LAST

Parameters:
  • gesture_click (Gtk.GestureClick) – The object which received the signal

  • n_press (int) – number of press that is paired with this release

  • x (float) – The X coordinate, in widget allocation coordinates

  • y (float) – The Y coordinate, in widget allocation coordinates

Emitted when a button or touch is released.

n_press will report the number of press that is paired to this event, note that [signal`Gtk`.GestureClick::stopped] may have been emitted between the press and its release, n_press will only start over at the next press.

Gtk.GestureClick.signals.stopped(gesture_click)
Signal Name:

stopped

Flags:

RUN_LAST

Parameters:

gesture_click (Gtk.GestureClick) – The object which received the signal

Emitted whenever any time/distance threshold has been exceeded.

Gtk.GestureClick.signals.unpaired_release(gesture_click, x, y, button, sequence)
Signal Name:

unpaired-release

Flags:

RUN_LAST

Parameters:
  • gesture_click (Gtk.GestureClick) – The object which received the signal

  • x (float) – X coordinate of the event

  • y (float) – Y coordinate of the event

  • button (int) – Button being released

  • sequence (Gdk.EventSequence or None) – Sequence being released

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.