diff --git a/src/event.rs b/src/event.rs new file mode 100644 index 0000000..00585ea --- /dev/null +++ b/src/event.rs @@ -0,0 +1 @@ +pub use layer_shika_composition::{EventContext, EventLoopHandle, ShellEventLoopHandle}; diff --git a/src/lib.rs b/src/lib.rs index 5f9450c..581e8d4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,6 +17,17 @@ //! 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`] – Window 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 //! //! ```rust,no_run @@ -50,36 +61,36 @@ //! shell.run()?; //! # Ok::<(), layer_shika::Error>(()) //! ``` -//! -//! # Re-exports -//! -//! This crate re-exports commonly needed types from its dependencies: -//! - [`slint`]: The Slint UI framework (compiled API) -//! - [`slint_interpreter`]: Runtime Slint component loading -//! - [`calloop`]: Event loop types for custom event sources #![allow(clippy::pub_use)] pub mod prelude; -pub use layer_shika_composition::{ - AnchorEdges, AnchorStrategy, DEFAULT_WINDOW_NAME, Error, EventContext, EventLoopHandle, - KeyboardInteractivity, Layer, LayerShika, OutputGeometry, OutputHandle, OutputInfo, - OutputPolicy, OutputRegistry, PopupHandle, PopupPlacement, PopupPositioningMode, PopupRequest, - PopupSize, PopupWindow, Result, ShellControl, ShellRuntime, SingleWindowShell, +pub mod event; +pub mod output; +pub mod shell; +pub mod slint_integration; +pub mod window; + +pub use layer_shika_composition::{Error, Result}; + +pub use shell::{ + DEFAULT_WINDOW_NAME, LayerShika, LayerSurfaceHandle, Shell, ShellComposition, ShellControl, + ShellEventContext, ShellRuntime, ShellWindowConfigHandler, ShellWindowDefinition, + ShellWindowHandle, SingleWindowShell, }; -pub use layer_shika_composition::{ - LayerSurfaceHandle, Shell, ShellComposition, ShellEventContext, ShellEventLoopHandle, - ShellWindowConfigHandler, ShellWindowDefinition, ShellWindowHandle, +pub use window::{ + AnchorEdges, AnchorStrategy, KeyboardInteractivity, Layer, PopupHandle, PopupPlacement, + PopupPositioningMode, PopupRequest, PopupSize, }; -pub use layer_shika_composition::{slint, slint_interpreter}; +pub use output::{OutputGeometry, OutputHandle, OutputInfo, OutputPolicy, OutputRegistry}; + +pub use event::{EventContext, EventLoopHandle, ShellEventLoopHandle}; + +pub use slint_integration::{PopupWindow, slint, slint_interpreter}; -/// Re-exported calloop types for event loop integration -/// -/// These types allow users to register custom event sources on the -/// layer-shika event loop via [`EventLoopHandle`]. pub mod calloop { pub use layer_shika_composition::calloop::*; } diff --git a/src/output.rs b/src/output.rs new file mode 100644 index 0000000..e2b79b2 --- /dev/null +++ b/src/output.rs @@ -0,0 +1,3 @@ +pub use layer_shika_composition::{ + OutputGeometry, OutputHandle, OutputInfo, OutputPolicy, OutputRegistry, +}; diff --git a/src/prelude.rs b/src/prelude.rs index da1be21..d8372f4 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -8,26 +8,27 @@ #![allow(clippy::pub_use)] -pub use crate::{ - DEFAULT_WINDOW_NAME, Error, EventContext, EventLoopHandle, LayerShika, PopupWindow, Result, - ShellControl, ShellRuntime, SingleWindowShell, +pub use crate::shell::{ + DEFAULT_WINDOW_NAME, LayerShika, LayerSurfaceHandle, Shell, ShellComposition, ShellControl, + ShellEventContext, ShellEventLoopHandle, ShellRuntime, ShellWindowConfigHandler, + ShellWindowDefinition, ShellWindowHandle, SingleWindowShell, }; -pub use crate::{ - LayerSurfaceHandle, Shell, ShellComposition, ShellEventContext, ShellEventLoopHandle, - ShellWindowConfigHandler, ShellWindowDefinition, ShellWindowHandle, +pub use crate::window::{ + AnchorEdges, AnchorStrategy, KeyboardInteractivity, Layer, PopupHandle, PopupPlacement, + PopupPositioningMode, PopupRequest, PopupSize, }; -pub use crate::{ - AnchorEdges, KeyboardInteractivity, Layer, OutputGeometry, OutputHandle, OutputInfo, - OutputPolicy, OutputRegistry, PopupHandle, PopupPlacement, PopupPositioningMode, PopupRequest, - PopupSize, -}; +pub use crate::output::{OutputGeometry, OutputHandle, OutputInfo, OutputPolicy, OutputRegistry}; + +pub use crate::event::{EventContext, EventLoopHandle}; + +pub use crate::slint_integration::{PopupWindow, slint, slint_interpreter}; + +pub use crate::{Error, Result}; pub use layer_shika_composition::prelude::{ Anchor, LogicalSize, Margins, PhysicalSize, ScaleFactor, WindowConfig, WindowDimension, }; pub use crate::calloop; - -pub use crate::{slint, slint_interpreter}; diff --git a/src/shell.rs b/src/shell.rs new file mode 100644 index 0000000..3797b36 --- /dev/null +++ b/src/shell.rs @@ -0,0 +1,5 @@ +pub use layer_shika_composition::{ + DEFAULT_WINDOW_NAME, LayerShika, LayerSurfaceHandle, Shell, ShellComposition, ShellControl, + ShellEventContext, ShellEventLoopHandle, ShellRuntime, ShellWindowConfigHandler, + ShellWindowDefinition, ShellWindowHandle, SingleWindowShell, +}; diff --git a/src/slint_integration.rs b/src/slint_integration.rs new file mode 100644 index 0000000..d9a8193 --- /dev/null +++ b/src/slint_integration.rs @@ -0,0 +1,3 @@ +pub use layer_shika_composition::{slint, slint_interpreter}; + +pub use layer_shika_composition::PopupWindow; diff --git a/src/window.rs b/src/window.rs new file mode 100644 index 0000000..8ddb858 --- /dev/null +++ b/src/window.rs @@ -0,0 +1,6 @@ +pub use layer_shika_composition::{ + AnchorEdges, AnchorStrategy, KeyboardInteractivity, Layer, PopupHandle, PopupPlacement, + PopupPositioningMode, PopupRequest, PopupSize, +}; + +pub use layer_shika_composition::DEFAULT_WINDOW_NAME;