Skip to content

Commit

Permalink
Move Event and Control types after multi_window::run
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Nov 29, 2023
1 parent d34bc4e commit 9f29aec
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions winit/src/multi_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,6 @@ use crate::{Clipboard, Error, Proxy, Settings};
use std::mem::ManuallyDrop;
use std::time::Instant;

enum Event<Message: 'static> {
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<winit::monitor::MonitorHandle>,
},
}

/// An interactive, native, cross-platform, multi-windowed application.
///
/// This trait is the main entrypoint of multi-window Iced. Once implemented, you can run
Expand Down Expand Up @@ -299,6 +280,25 @@ where
})
}

enum Event<Message: 'static> {
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<winit::monitor::MonitorHandle>,
},
}

async fn run_instance<A, E, C>(
mut application: A,
mut compositor: C,
Expand Down

0 comments on commit 9f29aec

Please sign in to comment.