docs: update

This commit is contained in:
drendog 2025-12-11 17:25:51 +01:00
parent eed8098ede
commit d38ae99833
Signed by: dwenya
GPG key ID: 8DD77074645332D0

View file

@ -1,6 +1,6 @@
//! layer-shika: A Wayland layer shell library with Slint UI integration //! layer-shika: A Wayland layer shell library with Slint UI integration
//! //!
//! This crate provides a high-level API for creating Wayland layer shell surfaces //! 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 //! 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 //! internal layers (domain, adapters, composition), but users should only depend on
//! this root crate. //! this root crate.
@ -45,6 +45,8 @@
//! # Ok::<(), layer_shika::Error>(()) //! # 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 //! # Declarative Configuration
//! //!
//! For reusable, programmatically generated, or externally sourced configurations: //! For reusable, programmatically generated, or externally sourced configurations:
@ -53,7 +55,7 @@
//! use layer_shika::prelude::*; //! use layer_shika::prelude::*;
//! //!
//! let config = ShellConfig { //! let config = ShellConfig {
//! ui_source: UiSource::file("ui/bar.slint"), //! ui_source: CompiledUiSource::file("ui/bar.slint"),
//! surfaces: vec![ //! surfaces: vec![
//! SurfaceComponentConfig::with_config("Bar", SurfaceConfig { //! SurfaceComponentConfig::with_config("Bar", SurfaceConfig {
//! dimensions: SurfaceDimension::new(0, 42), //! dimensions: SurfaceDimension::new(0, 42),
@ -68,6 +70,8 @@
//! # Ok::<(), layer_shika::Error>(()) //! # 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 //! # Multi-Surface Shell
//! //!
//! Same API naturally extends to multiple surfaces: //! Same API naturally extends to multiple surfaces:
@ -87,6 +91,8 @@
//! # Ok::<(), layer_shika::Error>(()) //! # 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 //! # Pre-compiled Slint
//! //!
//! For explicit compilation control: //! For explicit compilation control:
@ -107,6 +113,13 @@
//! .run()?; //! .run()?;
//! # Ok::<(), layer_shika::Error>(()) //! # 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>`
#![allow(clippy::pub_use)] #![allow(clippy::pub_use)]
@ -121,10 +134,10 @@ pub mod window;
pub use layer_shika_composition::{Error, Handle, Result, SurfaceHandle}; pub use layer_shika_composition::{Error, Handle, Result, SurfaceHandle};
pub use shell::{ pub use shell::{
CompiledUiSource, Output, Selection, Selector, Surface, SurfaceInfo, DEFAULT_COMPONENT_NAME, CompiledUiSource, DEFAULT_COMPONENT_NAME, DEFAULT_SURFACE_NAME, LayerSurfaceHandle, Output,
DEFAULT_SURFACE_NAME, LayerSurfaceHandle, Shell, ShellBuilder, ShellConfig, ShellControl, Selection, Selector, Shell, ShellBuilder, ShellConfig, ShellControl, ShellEventContext,
ShellEventContext, ShellRuntime, ShellSurfaceConfigHandler, SurfaceComponentConfig, ShellRuntime, ShellSurfaceConfigHandler, Surface, SurfaceComponentConfig, SurfaceConfigBuilder,
SurfaceConfigBuilder, SurfaceDefinition, SurfaceDefinition, SurfaceInfo,
}; };
pub use window::{ pub use window::{