1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Embedded animation engine — rect-based HWND animation for Windows tiling
//! window managers.
//!
//! This module is an in-tree copy of the `window-animation` crate, providing
//! smooth, frame-paced window movement driven by a background worker thread.
//!
//! # Quick Start
//!
//! 1. Create a [`backend::win32::Win32Backend`] (or [`backend::mock::MockBackend`] for tests).
//! 2. Build an [`AnimatorConfig`] (or use [`AnimatorConfig::default`]).
//! 3. Create a [`WindowAnimator`] and call [`WindowAnimator::animate`] with a
//! list of [`WindowTarget`] values describing the desired final geometry for
//! each window.
//!
//! ```rust,ignore
//! use flow_wm::animation::{AnimatorConfig, WindowAnimator, WindowRef, WindowTarget, IVec2};
//! use flow_wm::animation::backend::win32::Win32Backend;
//!
//! let backend = Win32Backend::new();
//! let config = AnimatorConfig::default();
//! let mut animator = WindowAnimator::new(backend, config);
//!
//! let targets = vec![
//! WindowTarget::new(WindowRef(hwnd as isize), IVec2::new(0, 0), IVec2::new(800, 600)),
//! ];
//! animator.animate(targets).unwrap();
//! ```
pub
pub
pub
pub
pub
pub
pub
pub
/// Re-export of the background-threaded animator that drives all window moves.
pub use WindowAnimator;
/// Re-export of the full animator configuration struct.
pub use AnimatorConfig;
/// Re-export of the frame-timing metrics summary produced after an animation run.
pub use FrameMetrics;
/// Re-export of the metrics recorder used to collect per-frame timestamps.
pub use MetricsRecorder;
/// Re-export of the error enum produced by animation operations.
pub use AnimationError;
/// Re-export of the 2D integer vector type used for positions and sizes.
pub use IVec2;
/// Re-export of the animation engine's rectangle type.
///
/// This type uses `{x, y, w, h}` fields, distinct from flow's `common::Rect`
/// which uses `{x, y, width, height}`. The two types coexist in different
/// modules and are converted at integration boundaries.
pub use Rect as AnimRect;
/// Re-export of the opaque window reference type wrapping HWND as `isize`.
pub use WindowRef;
/// Re-export of the target geometry description for one animated window.
pub use WindowTarget;