separate Engine from RenderTarget

This commit is contained in:
🪞👃🪞 2024-09-15 15:44:11 +03:00
parent 60acb20a57
commit ff6751d393
4 changed files with 70 additions and 56 deletions

View file

@ -310,13 +310,13 @@ impl<E: Engine> Widget for JackDevice<E> {
fn layout (&self, to: E::Size) -> Perhaps<E::Size> {
self.state.read().unwrap().layout(to)
}
fn render (&self, to: &mut E) -> Perhaps<E::Area> {
fn render (&self, to: &mut E::Output) -> Perhaps<E::Area> {
self.state.read().unwrap().render(to)
}
}
impl<E: Engine> Handle<E> for JackDevice<E> {
fn handle (&mut self, from: &E::HandleInput) -> Perhaps<E::Handled> {
fn handle (&mut self, from: &E::Input) -> Perhaps<E::Handled> {
self.state.write().unwrap().handle(from)
}
}