Skip to main content

run_native_surface_window_loop

Function run_native_surface_window_loop 

Source
pub fn run_native_surface_window_loop<W, F, E>(
    window: W,
    root_fn: Option<F>,
    runtime: AppRuntime,
    compositor: SwapchainCompositor,
    presenter: SoftwareSurfacePresenter,
    event_handler: E,
    hooks: Option<&mut AppLifecycleHooks>,
) -> Result<(), String>
where W: NativeSurfaceWindow, F: FnMut() -> View + 'static, E: FnMut(&PlatformEvent, &mut AppRuntime) -> bool,
Expand description

Runs an interactive native window event loop against any NativeSurfaceWindow implementation, pacing frames, evaluating reactive updates, and blitting pixel buffers.