mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Improve EventLoop encapsulation
Hide the winit loop and extract it only in the GL renderer
This commit is contained in:
parent
096fd7bbb4
commit
85bf8a195a
4 changed files with 16 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue