use super::Runtime;
use crate::app::model::App;
use crate::backend::CaptureBackend;
use crate::input::Event;
impl<A: App> Runtime<A, CaptureBackend> {
pub fn send(&mut self, event: Event) {
self.core.events.push(event);
}
pub fn display(&self) -> String {
self.core.terminal.backend().to_string()
}
pub fn display_ansi(&self) -> String {
self.core.terminal.backend().to_ansi()
}
}
impl<A: App> Runtime<A, CaptureBackend> {
pub fn cell_at(&self, x: u16, y: u16) -> Option<&crate::backend::EnhancedCell> {
self.core.terminal.backend().cell(x, y)
}
pub fn contains_text(&self, needle: &str) -> bool {
self.core.terminal.backend().contains_text(needle)
}
pub fn find_text(&self, needle: &str) -> Vec<ratatui::layout::Position> {
self.core.terminal.backend().find_text(needle)
}
}