Skip to main content

ferroui_base/rendering/composition/interactions/
mod.rs

1//! `Microsoft.UI.Composition.Interactions`: interaction trackers and the
2//! visual interaction sources that drive them with input.
3//!
4//! An [`InteractionTracker`] holds a position and a scale. Input redirected
5//! by a [`VisualInteractionSource`] moves them while interacting, inertia
6//! (with its decay rates and inertia modifiers) carries them to rest after a
7//! release, and requests (`try_update_*`) move them from code. Expression
8//! animations reference the tracker to move visuals with it.
9//!
10//! The tracker runs on the UI thread and ticks with the animation frames of
11//! the media context; see the deviations of `docs/porting/winui-composition.md`.
12
13mod interaction_tracker;
14mod interaction_tracker_inertia_modifier;
15mod visual_interaction_source;
16
17pub use interaction_tracker::{
18    CompositionInteractionSourceCollection, IInteractionTrackerOwner, InteractionTracker, InteractionTrackerAnimation,
19    InteractionTrackerClampingOption, InteractionTrackerCustomAnimationStateEnteredArgs,
20    InteractionTrackerIdleStateEnteredArgs, InteractionTrackerInertiaStateEnteredArgs,
21    InteractionTrackerInteractingStateEnteredArgs, InteractionTrackerRequestIgnoredArgs, InteractionTrackerState,
22    InteractionTrackerValuesChangedArgs, DEFAULT_INERTIA_DECAY_RATE,
23};
24pub use interaction_tracker_inertia_modifier::{
25    InteractionTrackerInertiaModifier, InteractionTrackerInertiaMotion, InteractionTrackerInertiaRestingValue,
26};
27pub use visual_interaction_source::{
28    InteractionChainingMode, InteractionSourceConfiguration, InteractionSourceMode, InteractionSourceRedirectionMode,
29    VisualInteractionSource, VisualInteractionSourceRedirectionMode,
30};
31
32#[cfg(test)]
33mod interaction_tracker_tests;