break down engine modules

This commit is contained in:
🪞👃🪞 2025-01-05 08:16:15 +01:00
parent f6c603bf73
commit 905486edbd
16 changed files with 376 additions and 352 deletions

View file

@ -0,0 +1,12 @@
use crate::*;
/// Custom layout and rendering.
pub trait Render<E: Engine>: Send + Sync {
fn layout (&self, area: E::Area) -> E::Area;
fn render (&self, output: &mut E::Output);
}
impl<E: Engine, C: Content<E>> Render<E> for C {
fn layout (&self, area: E::Area) -> E::Area { Content::layout(self, area) }
fn render (&self, output: &mut E::Output) { Content::render(self, output) }
}