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
64
65
66
67
68
69
70
71
//! Window border overlay engine — komorebi/Hyprland-style colored borders.
//!
//! Each managed window can own a [`Border`] — a click-through, layered
//! overlay window that draws a thin colored ring around the window's visible
//! content edge. The border lives directly on the registry's [`Window`]
//! struct as `Option<Border>`, so its Win32 lifecycle is coupled to the
//! window's own (the overlay `HWND` is destroyed when the `Window` is
//! dropped).
//!
//! # Positioning model
//!
//! Unlike the previous design (which ran a private `EVENT_OBJECT_LOCATIONCHANGE`
//! hook to follow the target HWND), the daemon now **commands** the border's
//! position:
//!
//! - **Tiled windows** — the border is flattened into the animator's target
//! list alongside the window itself, so it moves in lockstep during
//! animations. No extra hook traffic.
//! - **Floating windows** — the existing `EVENT_OBJECT_LOCATIONCHANGE` path
//! (shared with float-rect tracking) calls `Border::set_geometry` after
//! updating the registry.
//!
//! This eliminates the duplicate location-change hook and the process-global
//! `OnceLock` indirection. See `docs/src/dev-guide/borders.md`.
//!
//! [`Window`]: crate::registry::types::Window
pub
pub
pub use Border;
pub use ;
use crateBorderConfig;
/// Convert a config-layer [`BorderConfig`] into a per-window [`BorderStyle`]
/// for the given semantic state.
///
/// The daemon knows the window's state (focused / unfocused / floating) and
/// calls this helper to resolve the user-configured color before passing the
/// resulting [`BorderStyle`] to [`Border::set_style`].
///
/// (Phase 4 will wire this into the daemon; for now this is the contract.)
/// Semantic per-window state used to resolve a [`BorderStyle`] from
/// [`BorderConfig`].
///
/// The daemon maps its internal `WindowState` enum onto this much smaller
/// enum — the border crate only cares about which color bucket applies.