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
60
61
62
63
//! Backend abstraction layer for window management operations.
//!
//! The [`WindowBackend`] trait decouples the animation engine from Win32 so
//! that tests can inject a [`mock::MockBackend`] without touching real windows.
//!
//! # Backends
//!
//! | Backend | When compiled |
//! |---------|---------------|
//! | [`mock`] | always (part of the public API; no feature gate required) |
//! | `win32` | `cfg(target_os = "windows")` |
/// Mock backend — always compiled so that both inline unit tests (`cfg(test)`)
/// **and** integration tests in `tests/` (which are separate compilation units
/// where `cfg(test)` is NOT set for the library) can import it freely.
///
/// The `testing` feature flag in `Cargo.toml` is retained for backward
/// compatibility but is now a no-op.
use crate;
/// Abstraction over all Win32 calls required by the animation engine.
///
/// Implementors must be `Send + 'static` so the backend can be moved into
/// the background worker thread.