Function i_slint_backend_winit::with_event_loop_window_target
source ยท pub fn with_event_loop_window_target<R>(
callback: impl FnOnce(&EventLoopWindowTarget<SlintUserEvent>) -> Result<R, Box<dyn Error + Send + Sync>>
) -> Result<R, Box<dyn Error + Send + Sync>>
Expand description
Invokes the specified callback with a reference to the winit::event_loop::EventLoopWindowTarget
.
Use this to get access to the display connection or create new windows with winit::window::WindowBuilder
.
Note: This function can only be called from within the Slint main thread.