Since 1.2continue_Attempts to continue from the current transition to target immediately.
The continuation runs while the state machine still holds its internal
serialization slot, so queued Dex.StateMachine.transition requests
are not processed first. If context has not explicitly set the state with
Dex.StateTransitionContext.set_state, the current edge target is
committed before the next edge is executed.
The next transition callback is called before this function returns. If that
callback uses dex_await(), the same transition fiber suspends and resumes,
while the state machine still holds the serialization slot. Chained
continuations therefore use the normal C call stack and should be reserved
for short, bounded chains rather than unbounded graph traversal.
The next edge is looked up from the real current state to target. If no
such edge exists, false is returned and error is set to
Dex.Error.INVALID_TRANSITION. If the next edge callback fails, its
error is propagated.
the target state for the next edge
true if the continuation succeeded; otherwise false
Since 1.2get_Gets the source state for the transition edge being executed.
This value is fixed for the lifetime of context and does not change if
Dex.StateTransitionContext.set_state is called.
the source state for the transition edge
Since 1.2get_Since 1.2get_Gets the target state for the transition edge being executed.
This value is fixed for the lifetime of context and does not change if
Dex.StateTransitionContext.set_state is called.
the target state for the transition edge
Since 1.2set_Sets the real current state in the Dex.StateMachine.
This may be used by transition callbacks to expose intermediate states while
doing asynchronous work. state must be a valid value in the state machine's
enum type. This method may only be used while the transition callback is
active.
the new state
Since 1.2wait_Creates a future that resolves when the active transition context is interrupted.
This is a cooperative mechanism for long-running transition callbacks. The
returned future resolves to true when Dex.StateMachine.interrupt
is called while context is active. If the context was already interrupted
before this function is called, the returned future is already resolved.
If context completes before it is interrupted, the returned future is
rejected with Gio.IOErrorEnum.CANCELLED.
a future resolving to true when interrupted
Dex.StateTransitionContext is an opaque per-callback structure with information and state access for a Dex.StateTransition callback.
It is only valid for the duration of the callback and must not be stored.
Dex.StateTransitionContext.get_from and Dex.StateTransitionContext.get_to return the declared edge that caused the callback to run. Dex.StateTransitionContext.get_state and Dex.StateTransitionContext.set_state access the real state in the Dex.StateMachine. Use Dex.StateTransitionContext.continue_to to follow another declared edge before queued transition requests are processed.
Since
1.2