set_sequence_state


Description:

[ Version ( deprecated = true , deprecated_since = "4.10." ) ]
public bool set_sequence_state (EventSequence sequence, EventSequenceState state)

Warning: set_sequence_state is deprecated since 4.10..

Sets the state of sequence in this.

Note:

Use [method@Gtk.Gesture.set_state]

Sequences start in state gtk_event_sequence_none, and whenever they change state, they can never go back to that state. Likewise, sequences in state gtk_event_sequence_denied cannot turn back to a not denied state. With these rules, the lifetime of an event sequence is constrained to the next four:

* None * None → Denied * None → Claimed * None → Claimed → Denied

Note: Due to event handling ordering, it may be unsafe to set the state on another gesture within a [signal@Gtk.Gesture:GtkGesture:begin ] signal handler, as the callback might be executed before the other gesture knows about the sequence. A safe way to perform this could be:

```c 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); }

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_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 sequence will be already be initialized to the group's global state when the second gesture processes the event.

Parameters:

this

a `GtkGesture`

sequence

a `GdkEventSequence`

state

the sequence state

Returns:

true if sequence is handled by this, and the state is changed successfully