pub fn create_window(shell: &NativeShell) -> Result<ShellWindow, ShellError>Expand description
Create a native window from the given NativeShell configuration.
The actual backend used depends on the backend field:
ShellBackend::Wry— creates a Wry webview window.ShellBackend::Headless— creates an in-memory window handle suitable for testing.
§Errors
Returns a ShellError if the window could not be created (e.g. the
requested backend is not available on the current platform).
§Examples
use cvkg_cli::native_shell::{NativeShell, ShellBackend, create_window};
let shell = NativeShell::new("Test").backend(ShellBackend::Headless);
let window = create_window(&shell).expect("Failed to create window");
assert_eq!(window.title, "Test");