rusty_desktop_icons.AnimationHandle¶
- class rusty_desktop_icons.AnimationHandle¶
Handle returned by [DesktopController.animate].
Cloneable and thread-safe: hand it to another Python thread that waits on completion while your main thread polls progress.
- final_commit() FinalCommitOutcome | None¶
Outcome of the Shell-side final commit, once the animation has finished. None while it is still running, or if finalization itself failed (in which case finish_reason() carries the error).
- finish_reason() FinishReason | None¶
Read the finish reason if the animation has already ended.
- on_finish(cb: Callable[[FinishReason], None]) None¶
- on_start(cb: Callable[[StartContext], None]) None¶
- on_tick(cb: Callable[[TickContext], None]) None¶
- snapshot() list[IconAnimationState]¶
Copy of the current per-icon state.
- stop(mode: StopMode | None = None) None¶
Ask the engine to stop the animation.
mode defaults to [StopMode.LeaveInPlace]. This is the only way to alter a running animation — to change targets or the icon set, stop, read snapshot(), and call animate() again.
- wait() FinishReason¶
Block until the animation finishes. Releases the GIL while waiting.
- wait_timeout(timeout_seconds: float) FinishReason | None¶
Block for up to timeout_seconds. Returns None on timeout.