## GtkGestureClick GtkGestureClick — Multipress gesture |

## Functions

GtkGesture * | gtk_gesture_click_new ()

## Signals

void | pressed | Run Last
void | released | Run Last
void | stopped | Run Last
void | unpaired-release | Run Last

## Types and Values

| GtkGestureClick

## Object Hierarchy

        GObject
        ╰── GtkEventController
            ╰── GtkGesture
                ╰── GtkGestureSingle
                    ╰── GtkGestureClick

## Includes

    #include <gtk/gtk.h>

## Description

GtkGestureClick is a GtkGesture implementation able to recognize multiple clicks on a nearby zone, which can be listened for through the “pressed” signal. Whenever time or distance between clicks exceed the GTK+ defaults, “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_gesture_click_set_area()`, so any click happening outside that area is considered to be a first click of its own.

## Functions

### gtk_gesture_click_new ()

    GtkGesture *
    gtk_gesture_click_new (void);

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

#### Returns

a newly created GtkGestureClick

## Types and Values

### GtkGestureClick

    typedef struct _GtkGestureClick GtkGestureClick;

## Signal Details

### The `“pressed”` signal

    void
    user_function (GtkGestureClick *gesture,
                   gint             n_press,
                   gdouble          x,
                   gdouble          y,
                   gpointer         user_data)

This signal is emitted whenever a button or touch press happens.

#### Parameters

gesture | the object which received the signal |
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 |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“released”` signal

    void
    user_function (GtkGestureClick *gesture,
                   gint             n_press,
                   gdouble          x,
                   gdouble          y,
                   gpointer         user_data)

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

#### Parameters

gesture | the object which received the signal |
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 |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“stopped”` signal

    void
    user_function (GtkGestureClick *gesture,
                   gpointer         user_data)

This signal is emitted whenever any time/distance threshold has been exceeded.

#### Parameters

gesture | the object which received the signal |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“unpaired-release”` signal

    void
    user_function (GtkGestureClick  *gesture,
                   gdouble           x,
                   gdouble           y,
                   guint             button,
                   GdkEventSequence *sequence,
                   gpointer          user_data)

This signal is 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

gesture | the object which received the signal |
x | X coordinate of the event |
y | Y coordinate of the event |
button | Button being released |
sequence | Sequence being released |
user_data | user data set when the signal handler was connected. |

Flags: Run Last