Top |
Object Hierarchy
GObject ╰── GtkEventController ╰── GtkGesture ╰── GtkGestureSingle ╰── GtkGestureLongPress
Description
GtkGestureLongPress is a GtkGesture implementation able to recognize long presses, triggering the “pressed” after the timeout is exceeded.
If the touchpoint is lifted before the timeout passes, or if it drifts too far of the initial press point, the “cancelled” signal will be emitted.
Functions
gtk_gesture_long_press_new ()
GtkGesture *
gtk_gesture_long_press_new (GtkWidget *widget
);
Returns a newly created GtkGesture that recognizes long presses.
Since 3.14
Signal Details
The “cancelled”
signal
void user_function (GtkGestureLongPress *gesture, gpointer user_data)
This signal is emitted whenever a press moved too far, or was released before “pressed” happened.
Parameters
gesture |
the object which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 3.14
The “pressed”
signal
void user_function (GtkGestureLongPress *gesture, gdouble x, gdouble y, gpointer user_data)
This signal is emitted whenever a press goes unmoved/unreleased longer than what the GTK+ defaults tell.
Parameters
gesture |
the object which received the signal |
|
x |
the X coordinate where the press happened, relative to the widget allocation |
|
y |
the Y coordinate where the press happened, relative to the widget allocation |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since 3.14