use crate::input::InputEvent;
use crate::ui::{PixelRect, Ui};
pub use crate::viewer::types::ViewerLiveCapabilities;
use crate::{Result, Runtime, Texture};
pub trait ViewerLiveSource {
fn capabilities(&self) -> ViewerLiveCapabilities;
fn open(&mut self, runtime: &Runtime) -> Result<()>;
fn update(&mut self, delta_ms: f32) -> Result<()>;
fn canvas_texture(&self) -> Option<&Texture> {
None
}
fn canvas_controls_rect(&self, _width: u32, _height: u32, _scale: f32) -> Option<PixelRect> {
None
}
fn render(&mut self, ui: &mut Ui<'_>, width: u32, height: u32) -> Result<()>;
fn on_event(&mut self, _event: &InputEvent) -> Result<()> {
Ok(())
}
fn close(&mut self) -> Result<()>;
}