Package: gtk
Function gtk:gesture-set-state
Lambda Listgtk:gesture-set-state (gesture state) ArgumentsReturn Value True if the state of at least one event sequence was changed
successfully. Details
Sets the state of all event sequences that the gesture is currently
interacting with. Event sequences start in :none state, and
whenever they change state, they can never go back to that state. Likewise, event sequences in :denied state cannot turn
back to a not denied state. With these rules, the lifetime of an event
sequence is constrained to the next four:
static void
first_gesture_begin_cb (GtkGesture *first_gesture,
GdkEventSequence *sequence,
gpointer user_data)
{
gtk_gesture_set_sequence_state (first_gesture,
sequence, GTK_EVENT_SEQUENCE_CLAIMED);
gtk_gesture_set_sequence_state (second_gesture,
sequence, GTK_EVENT_SEQUENCE_DENIED);
}
If both gestures are in the same group, just set the state on the gesture
emitting the event, the event sequence will be already be initialized to the
global state of the group when the second gesture processes the event. | See also |
#2026-09-21