winit: Cleanup, move the winit window out of the individual renderers

This commit is contained in:
Simon Hausmann 2023-05-09 17:59:42 +02:00 committed by Simon Hausmann
parent d0cdc462c7
commit a3a13c727a
5 changed files with 36 additions and 49 deletions

View file

@ -37,12 +37,10 @@ mod renderer {
window_adapter_weak: &Weak<dyn WindowAdapter>,
window_builder: winit::window::WindowBuilder,
#[cfg(target_arch = "wasm32")] canvas_id: &str,
) -> Result<Self, PlatformError>
) -> Result<(Self, Rc<winit::window::Window>), PlatformError>
where
Self: Sized;
fn window(&self) -> Rc<winit::window::Window>;
fn show(&self) -> Result<(), PlatformError>;
fn hide(&self) -> Result<(), PlatformError>;