From 9f29aec128ccf51c620a8b69a9fbd64186ab8c65 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 30 Nov 2023 00:01:32 +0100 Subject: Move `Event` and `Control` types after `multi_window::run` --- winit/src/multi_window.rs | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/winit/src/multi_window.rs b/winit/src/multi_window.rs index f4ebbe09..f8cedcb8 100644 --- a/winit/src/multi_window.rs +++ b/winit/src/multi_window.rs @@ -22,25 +22,6 @@ use crate::{Clipboard, Error, Proxy, Settings}; use std::mem::ManuallyDrop; use std::time::Instant; -enum Event { - WindowCreated { - id: window::Id, - window: winit::window::Window, - exit_on_close_request: bool, - }, - EventLoopAwakened(winit::event::Event<'static, Message>), -} - -enum Control { - ChangeFlow(winit::event_loop::ControlFlow), - CreateWindow { - id: window::Id, - settings: window::Settings, - title: String, - monitor: Option, - }, -} - /// An interactive, native, cross-platform, multi-windowed application. /// /// This trait is the main entrypoint of multi-window Iced. Once implemented, you can run @@ -299,6 +280,25 @@ where }) } +enum Event { + WindowCreated { + id: window::Id, + window: winit::window::Window, + exit_on_close_request: bool, + }, + EventLoopAwakened(winit::event::Event<'static, Message>), +} + +enum Control { + ChangeFlow(winit::event_loop::ControlFlow), + CreateWindow { + id: window::Id, + settings: window::Settings, + title: String, + monitor: Option, + }, +} + async fn run_instance( mut application: A, mut compositor: C, -- cgit