WIP: Start on rendering scenes via presenter

This commit is contained in:
Nathan Sobo
2021-03-18 21:33:16 -06:00
parent e809d6119a
commit 605bdd62dd
12 changed files with 495 additions and 388 deletions
+10 -2
View File
@@ -6,7 +6,11 @@ pub mod current {
pub use super::mac::*;
}
use crate::{executor, geometry::rect::RectF};
use crate::{
executor,
geometry::{rect::RectF, vector::Vector2F},
Scene,
};
use anyhow::Result;
use async_task::Runnable;
pub use event::Event;
@@ -36,7 +40,11 @@ pub trait Dispatcher: Send + Sync {
fn run_on_main_thread(&self, task: Runnable);
}
pub trait Window {}
pub trait Window {
fn size(&self) -> Vector2F;
fn scale_factor(&self) -> f32;
fn render_scene(&self, scene: Scene);
}
pub struct WindowOptions<'a> {
pub bounds: RectF,