mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
wip: 21 errors!
This commit is contained in:
parent
694970bf0d
commit
ea5bc2e3b1
30 changed files with 392 additions and 362 deletions
|
|
@ -6,12 +6,25 @@ pub trait App<T: Engine> {
|
|||
}
|
||||
|
||||
/// Platform backend.
|
||||
pub trait Engine {
|
||||
type Handled;
|
||||
type Rendered;
|
||||
fn setup (&mut self) -> Usually<()> { Ok(()) }
|
||||
pub trait Engine: Sized {
|
||||
fn setup (&mut self) -> Usually<()> { Ok(()) }
|
||||
fn exited (&self) -> bool;
|
||||
fn teardown (&mut self) -> Usually<()> { Ok(()) }
|
||||
fn handle (&self, _: &mut impl Handle<Self>) -> Usually<()> where Self: Sized;
|
||||
fn render (&mut self, _: &impl Render<Self>) -> Usually<()> where Self: Sized;
|
||||
fn exited (&self) -> bool;
|
||||
|
||||
type HandleInput;
|
||||
fn handle (&self, _: &mut impl Handle<Self>) -> Usually<()> where Self: Sized;
|
||||
type Handled;
|
||||
|
||||
type RenderInput;
|
||||
fn render (&mut self, _: &impl Render<Self>) -> Usually<()> where Self: Sized;
|
||||
type Rendered;
|
||||
}
|
||||
|
||||
pub trait HandleContext {}
|
||||
|
||||
pub trait RenderContext {}
|
||||
|
||||
submod! {
|
||||
render
|
||||
handle
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue