quadraui 0.6.0

Cross-platform Rust UI toolkit: write one AppLogic and run it unmodified on TUI, GTK4 (Linux), macOS, and Windows backends
Documentation
//! Win-GUI shell runner: `run_with_shell()` wraps a [`ShellApp`] in an
//! AppShell and drives it through the standard Win32 message loop.
//!
//! The shared [`crate::shell_adapter::ShellAdapter`] owns all runtime logic
//! (bottom-panel init, panel routing, resize recalc, click dispatch), and
//! [`crate::shell_adapter::build_shell_adapter`] owns assembling one from a
//! [`ShellConfig`]. This module wires the adapter into the Win32 message
//! loop, mirroring `tui::shell_runner` / `gtk::shell_runner` /
//! `macos::shell_runner`.
//!
//! `config.title` reaches the real Win32 window via [`RunConfig`], the
//! same way `gtk::shell_runner::run_with_shell` threads `config.title`
//! through `gtk::run::RunConfig` — see that module's doc for why a bare
//! `win::run` isn't enough for a shell consumer (the window title is
//! otherwise hardcoded to `"quadraui"`).
//!
//! `WinBackend` carries many `todo!()` rasteriser stubs (see
//! `win::backend`'s module docs) — this module composes purely over the
//! `Backend` trait, so it compiles and runs against those stubs; each stub
//! retired afterwards lights up more of the shell with no further change
//! needed here.

use super::run::RunConfig;
use crate::shell::{ShellApp, ShellConfig};
use crate::shell_adapter::build_shell_adapter;

/// Run a [`ShellApp`] with AppShell chrome on the Win-GUI backend.
///
/// `config.app_icon` (set via [`ShellConfig::with_app_icon`])
/// reaches [`RunConfig::app_icon`] the same way `config.title` does —
/// cloned out before `config` moves into [`build_shell_adapter`], since
/// `RunConfig` (not `ShellConfig`) is what [`super::run::run_with`]'s
/// window-creation call site actually consults.
pub fn run_with_shell<A: ShellApp + 'static>(
    app: A,
    config: ShellConfig,
) -> std::process::ExitCode {
    let mut run_config = RunConfig::new(config.title.clone());
    if let Some(app_icon) = config.app_icon.clone() {
        run_config = run_config.with_app_icon(app_icon);
    }
    let adapter = build_shell_adapter(app, config);
    super::run::run_with(adapter, run_config)
}