pub fn poll_events(_window: &ShellWindow) -> Vec<WindowEvent>Expand description
Poll for pending window events in a non-blocking fashion.
Returns an empty Vec if no events are currently pending or if the window is operating in headless mode.
§Arguments
window— TheShellWindowto poll events for.
§Examples
use cvkg_cli::native_shell::{NativeShell, ShellBackend, create_window, poll_events};
let shell = NativeShell::new("Test").backend(ShellBackend::Headless);
let window = create_window(&shell).unwrap();
let events = poll_events(&window);
// Headless mode always returns an empty event list
assert!(events.is_empty());