Public declaration syntax from harness-sdk/src/screens/custom.rs Original source SHA-256: dfb868086c5576f658cda2ddfa7e98ad76658c6cc822e6d68feda9f301f459d0 Function bodies and constant values are omitted. This is not the complete implementation. Source line 14 #[derive(Debug, Clone)] pub enum ScreenResult { /// Event was consumed by the screen. Consumed, /// Event was not handled — pass to default handler. Ignored, /// Screen requests navigation to another screen. Navigate(String), /// Screen requests closing itself. Close, } Source line 27 #[derive(Debug, Clone)] pub enum ScreenEvent { /// A terminal event (keyboard, mouse, resize). Terminal(CrosstermEvent), /// A tick for animations. Tick, } Source line 61 pub trait CustomScreen: Send + Sync { /// The screen's display name (shown in tab bar). fn name(&self) -> &str; /// Render the screen into the given area. fn render(&self, frame: &mut Frame, area: Rect, theme: &Theme); /// Handle an event. Return `ScreenResult::Consumed` if the event /// was handled, `ScreenResult::Ignored` to pass it through. fn handle_event(&mut self, event: ScreenEvent) -> ScreenResult; /// Called when the screen becomes the active tab. fn on_focus(&mut self) ; /// Called when the screen loses focus. fn on_blur(&mut self) ; }