static void
first_gesture_begin_cb (GtkGesture *first_gesture,
GdkEventSequence *sequence,
gpointer user_data)
{
gtk_gesture_set_state (first_gesture, GTK_EVENT_SEQUENCE_CLAIMED);
gtk_gesture_set_state (second_gesture, GTK_EVENT_SEQUENCE_DENIED);
}
static void
second_gesture_begin_cb (GtkGesture *second_gesture,
GdkEventSequence *sequence,
gpointer user_data)
{
if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
gtk_gesture_set_state (second_gesture, GTK_EVENT_SEQUENCE_DENIED);
}If both gestures are in the same group, just set the state on the gesture emitting the event, the sequence will be already be initialized to the group's global state when the second gesture processes the event.
Parameters
state | the sequence state |
Returns
true if the state of at least one sequence
was changed successfully