Improve EventLoop encapsulation

Hide the winit loop and extract it only in the GL renderer
This commit is contained in:
Simon Hausmann 2020-06-17 14:37:47 +02:00
parent 096fd7bbb4
commit 85bf8a195a
4 changed files with 16 additions and 10 deletions

View file

@ -45,12 +45,12 @@ pub use abi::properties::{EvaluationContext, Property};
#[doc(inline)]
pub use abi::signals::Signal;
mod eventloop;
pub mod eventloop;
mod item_rendering;
pub fn run_component<GraphicsBackend: graphics::GraphicsBackend + 'static>(
component: vtable::VRef<crate::abi::datastructures::ComponentVTable>,
graphics_backend_factory: impl Fn(&winit::event_loop::EventLoop<()>, winit::window::WindowBuilder) -> GraphicsBackend
graphics_backend_factory: impl Fn(&eventloop::EventLoop, winit::window::WindowBuilder) -> GraphicsBackend
+ 'static,
) {
use eventloop::GenericWindow;