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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
//! layer-shika: A Wayland layer shell library with Slint UI integration
//!
//! This crate provides a high-level API for creating Wayland widget components
//! with Slint-based user interfaces. It's built on a clean architecture with three
//! internal layers (domain, adapters, composition), but users should only depend on
//! this root crate.
//!
//! # Architecture Note
//!
//! layer-shika is internally organized as a Cargo workspace with three implementation
//! crates:
//! - `layer-shika-domain`: Core domain models and business logic
//! - `layer-shika-adapters`: Wayland and rendering implementations
//! - `layer-shika-composition`: Public API composition layer
//!
//! **Users should never import from these internal crates directly.** This allows
//! the internal architecture to evolve without breaking semver guarantees on the
//! public API.
//!
//! # Module Organization
//!
//! The API is organized into conceptual facets:
//!
//! - [`shell`] – Main runtime and shell composition types
//! - [`window`] – Surface configuration, layers, anchors, and popup types
//! - [`output`] – Output (monitor) info, geometry, and policies
//! - [`event`] – Event loop handles and contexts
//! - [`slint_integration`] – Slint framework re-exports and wrappers
//! - [`calloop`] – Event loop types for custom event sources
//!
//! # Quick Start (Fluent Builder)
//!
//! Single-surface use case with the fluent builder API:
//!
//! ```rust,no_run
//! use layer_shika::prelude::*;
//!
//! Shell::from_file("ui/bar.slint")
//! .surface("Main")
//! .height(42)
//! .anchor(AnchorEdges::top_bar())
//! .exclusive_zone(42)
//! .build()?
//! .run()?;
//! # Ok::<(), layer_shika::Error>(())
//! ```
//!
//! **See the [simple-bar example](https://codeberg.org/waydeer/layer-shika/src/examples/simple-bar) for a complete working implementation.**
//!
//! # Declarative Configuration
//!
//! For reusable, programmatically generated, or externally sourced configurations:
//!
//! ```rust,no_run
//! use layer_shika::prelude::*;
//!
//! let config = ShellConfig {
//! ui_source: CompiledUiSource::file("ui/bar.slint"),
//! surfaces: vec![
//! SurfaceComponentConfig::with_config("Bar", SurfaceConfig {
//! dimensions: SurfaceDimension::new(0, 42),
//! anchor: AnchorEdges::top_bar(),
//! exclusive_zone: 42,
//! ..Default::default()
//! }),
//! ],
//! };
//!
//! Shell::from_config(config)?.run()?;
//! # Ok::<(), layer_shika::Error>(())
//! ```
//!
//! **See the [declarative-config example](https://codeberg.org/waydeer/layer-shika/src/examples/declarative-config) for a complete working implementation.**
//!
//! # Multi-Surface Shell
//!
//! Same API naturally extends to multiple surfaces:
//!
//! ```rust,no_run
//! use layer_shika::prelude::*;
//!
//! Shell::from_file("ui/shell.slint")
//! .surface("TopBar")
//! .height(42)
//! .anchor(AnchorEdges::top_bar())
//! .surface("Dock")
//! .height(64)
//! .anchor(AnchorEdges::bottom_bar())
//! .build()?
//! .run()?;
//! # Ok::<(), layer_shika::Error>(())
//! ```
//!
//! **See the [multi-surface example](https://codeberg.org/waydeer/layer-shika/src/examples/multi-surface) for a complete working implementation.**
//!
//! # Pre-compiled Slint
//!
//! For explicit compilation control:
//!
//! ```rust,no_run
//! use layer_shika::prelude::*;
//!
//! let compilation = Shell::compile_file("ui/shell.slint")?;
//!
//! Shell::from_compilation(compilation)
//! .surface("TopBar")
//! .output_policy(OutputPolicy::AllOutputs)
//! .height(42)
//! .surface("Dock")
//! .output_policy(OutputPolicy::PrimaryOnly)
//! .height(64)
//! .build()?
//! .run()?;
//! # Ok::<(), layer_shika::Error>(())
//! ```
//!
//! # Examples
//!
//! Comprehensive examples demonstrating all features are available in the
//! [examples directory](https://codeberg.org/waydeer/layer-shika/src/examples).
//!
//! Run any example with: `cargo run -p <example-name>`
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;