Gtk.GestureMultiPress


Gtk.GestureMultiPress — Multipress gesture

Object Hierarchy:

    GObject
    ╰── Gtk.EventController
        ╰── Gtk.Gesture
            ╰── Gtk.GestureSingle
                ╰── Gtk.GestureMultiPress

Functions:

  • new (widget:Gtk.Widget) -> Gtk.Gesture
  • set_area (self, rect:Gdk.Rectangle=None)
  • get_area (self) -> bool, rect:Gdk.Rectangle

Signals:

  • “pressed” (gesture, n_press, x, y, user_data)
  • “released” (gesture, n_press, x, y, user_data)
  • “stopped” (gesture, user_data)

Description:

Gtk.GestureMultiPress is a GtkGesture implementation able to recognize multiple clicks on a nearby zone, which can be listened for through the Gtk.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.


Function Details:

new()

new (widget:Gtk.Widget) -> Gtk.Gesture

Returns a newly created Gtk.Gesture that recognizes single and multiplepresses.

  • Returns: a newly created Gtk.GestureMultiPress

  • Since: 3.14


set_area()

set_area (self, rect:Gdk.Rectangle=None)

If rect is non-None, the press area will be checked to beconfined within the rectangle, otherwise the button countwill be reset so the press is seen as being the first one.If rect is None, the area will be reset to an unrestrictedstate. Note: The rectangle is only used to determine whether anynon-first click falls within the expected area. This is notakin to an input shape.

  • Since: 3.14

get_area()

get_area (self) -> bool, rect:Gdk.Rectangle

If an area was set through Gtk.GestureMultiPress:set_area(),this function will return True and fill in rect with thepress area. See Gtk.GestureMultiPress:set_area() for moredetails on what the press area represents.

  • Returns: True if rectwas filled with the press area

  • Since: 3.14


results matching ""

    No results matching ""