pub struct NativeShell {
pub backend: ShellBackend,
pub window_title: String,
pub width: u32,
pub height: u32,
}Expand description
Configuration and handle for a native shell instance.
Use NativeShell::new to create a default shell, then chain
builder methods to customize it before calling create_window.
Fields§
§backend: ShellBackendThe rendering backend to use.
window_title: StringThe initial window title.
width: u32The initial window width in pixels.
height: u32The initial window height in pixels.
Implementations§
Source§impl NativeShell
impl NativeShell
Sourcepub fn new(title: &str) -> Self
pub fn new(title: &str) -> Self
Create a new NativeShell with default dimensions (1280x720) and
the ShellBackend::Headless backend.
§Arguments
title— The initial window title.
§Examples
use cvkg_cli::native_shell::{NativeShell, ShellBackend};
let shell = NativeShell::new("My App");
assert_eq!(shell.window_title, "My App");
assert_eq!(shell.width, 1280);
assert_eq!(shell.height, 720);
assert_eq!(shell.backend, ShellBackend::Headless);Sourcepub fn backend(self, backend: ShellBackend) -> Self
pub fn backend(self, backend: ShellBackend) -> Self
Trait Implementations§
Source§impl Clone for NativeShell
impl Clone for NativeShell
Source§fn clone(&self) -> NativeShell
fn clone(&self) -> NativeShell
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NativeShell
impl RefUnwindSafe for NativeShell
impl Send for NativeShell
impl Sync for NativeShell
impl Unpin for NativeShell
impl UnsafeUnpin for NativeShell
impl UnwindSafe for NativeShell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more