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
//! `kozan-platform` — Abstract platform layer for Kozan.
//!
//! Like Chrome's `content/` — defines the contract between the engine
//! and the windowing system. **Zero windowing-backend dependency.**
//!
//! The windowing backend (e.g., `kozan-winit`) implements `PlatformHost`
//! and drives the event loop. This crate provides:
//! - Abstract types: `WindowId`, `ViewId`, `WindowConfig`
//! - `PlatformHost` trait: view→main-thread communication
//! - `ViewEvent` / `LifecycleEvent`: main→view-thread messages
//! - `ViewThreadHandle` / `ViewContext`: per-view threading model
//! - `WindowManager<R>`: the brain — routes events, owns pipelines
//! - `Renderer` / `RenderSurface` traits: GPU backend abstraction
//!
//! # Architecture
//!
//! ```text
//! kozan-winit (or any backend)
//! ├── implements PlatformHost
//! ├── creates OS windows
//! ├── passes raw window handles to WindowManager
//! └── converts OS events → WindowManager.on_*()
//!
//! kozan-platform (this crate — THE BRAIN)
//! ├── WindowManager<R: Renderer>: owns all windows + renderer
//! ├── WindowPipeline: spawns view + render threads per window
//! ├── RenderLoop: compositor + vsync loop
//! ├── ViewContext: user-facing API inside view thread
//! └── Renderer / RenderSurface traits
//!
//! kozan-vello (or any GPU backend)
//! ├── implements Renderer + RenderSurface
//! └── zero winit knowledge
//!
//! kozan-core (engine)
//! ├── input/ types (InputEvent, Modifiers, etc.)
//! ├── widget/ (FrameWidget, Viewport — future)
//! └── dom/, events/, style/
//! ```
pub
pub use ViewContext;
pub use ;
pub use PlatformHost;
pub use ;
pub use ViewportInfo;
pub use RenderEvent;
pub use ;
pub use WindowConfig;
pub use SpawnError;
pub use ;