Gtk.GestureMultiPress¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.GestureSingle (8), Gtk.Gesture (19), Gtk.EventController (5), GObject.Object (37)
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Gtk.GestureSingle (3), Gtk.Gesture (2), Gtk.EventController (2)
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal is emitted whenever a button or touch press happens. |
|
This signal is emitted when a button or touch is released. |
|
This signal is emitted whenever any time/distance threshold has been exceeded. |
Fields¶
- Inherited:
Class Details¶
- class Gtk.GestureMultiPress(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gtk.GestureMultiPress
is aGtk.Gesture
implementation able to recognize multiple clicks on a nearby zone, which can be listened for through theGtk.GestureMultiPress
::pressed
signal. Whenever time or distance between clicks exceed the GTK+ defaults,Gtk.GestureMultiPress
::stopped
is emitted, and the click counter is reset.Callers may also restrict the area that is considered valid for a >1 touch/button press through
Gtk.GestureMultiPress.set_area
(), so any click happening outside that area is considered to be a first click of its own.- classmethod new(widget)[source]¶
- Parameters:
widget (
Gtk.Widget
) – aGtk.Widget
- Returns:
a newly created
Gtk.GestureMultiPress
- Return type:
Returns a newly created
Gtk.Gesture
that recognizes single and multiple presses.New in version 3.14.
- get_area()[source]¶
- Returns:
True
if rect was filled with the press area- rect:
return location for the press area
- Return type:
(
bool
, rect:Gdk.Rectangle
)
If an area was set through
Gtk.GestureMultiPress.set_area
(), this function will returnTrue
and fill in rect with the press area. SeeGtk.GestureMultiPress.set_area
() for more details on what the press area represents.New in version 3.14.
- set_area(rect)[source]¶
- Parameters:
rect (
Gdk.Rectangle
orNone
) – rectangle to receive coordinates on
If rect is non-
None
, the press area will be checked to be confined within the rectangle, otherwise the button count will be reset so the press is seen as being the first one. If rect isNone
, the area will be reset to an unrestricted state.Note: The rectangle is only used to determine whether any non-first click falls within the expected area. This is not akin to an input shape.
New in version 3.14.
Signal Details¶
- Gtk.GestureMultiPress.signals.pressed(gesture_multi_press, n_press, x, y)¶
- Signal Name:
pressed
- Flags:
- Parameters:
gesture_multi_press (
Gtk.GestureMultiPress
) – The object which received the signaln_press (
int
) – how many touch/button presses happened with this onex (
float
) – The X coordinate, in widget allocation coordinatesy (
float
) – The Y coordinate, in widget allocation coordinates
This signal is emitted whenever a button or touch press happens.
New in version 3.14.
- Gtk.GestureMultiPress.signals.released(gesture_multi_press, n_press, x, y)¶
- Signal Name:
released
- Flags:
- Parameters:
gesture_multi_press (
Gtk.GestureMultiPress
) – The object which received the signaln_press (
int
) – number of press that is paired with this releasex (
float
) – The X coordinate, in widget allocation coordinatesy (
float
) – The Y coordinate, in widget allocation coordinates
This signal is emitted when a button or touch is released. n_press will report the number of press that is paired to this event, note that
Gtk.GestureMultiPress
::stopped
may have been emitted between the press and its release, n_press will only start over at the next press.New in version 3.14.
- Gtk.GestureMultiPress.signals.stopped(gesture_multi_press)¶
- Signal Name:
stopped
- Flags:
- Parameters:
gesture_multi_press (
Gtk.GestureMultiPress
) – The object which received the signal
This signal is emitted whenever any time/distance threshold has been exceeded.
New in version 3.14.