GtkGestureMultiPress
GtkGestureMultiPress — Multipress gesture
|
|
Includes
#include <gtk/gtk.h>
Description
GtkGestureMultiPress 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_multi_press_set_area(), so any
click happening outside that area is considered to be a first click of
its own.
Functions
gtk_gesture_multi_press_new ()
GtkGesture *
gtk_gesture_multi_press_new (GtkWidget *widget);
Returns a newly created GtkGesture that recognizes single and multiple
presses.
Since: 3.14
gtk_gesture_multi_press_set_area ()
void
gtk_gesture_multi_press_set_area (GtkGestureMultiPress *gesture,
const GdkRectangle *rect);
If rect
is non-NULL, 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
is NULL, 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.
Since: 3.14
Types and Values
GtkGestureMultiPress
typedef struct _GtkGestureMultiPress GtkGestureMultiPress;
Signal Details
The “released” signal
void
user_function (GtkGestureMultiPress *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.
Flags: Run Last
Since: 3.14