Skip to content

Commit 9f29aec

Browse files
committed
Move Event and Control types after multi_window::run
1 parent d34bc4e commit 9f29aec

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

winit/src/multi_window.rs

+19-19
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,6 @@ use crate::{Clipboard, Error, Proxy, Settings};
2222
use std::mem::ManuallyDrop;
2323
use std::time::Instant;
2424

25-
enum Event<Message: 'static> {
26-
WindowCreated {
27-
id: window::Id,
28-
window: winit::window::Window,
29-
exit_on_close_request: bool,
30-
},
31-
EventLoopAwakened(winit::event::Event<'static, Message>),
32-
}
33-
34-
enum Control {
35-
ChangeFlow(winit::event_loop::ControlFlow),
36-
CreateWindow {
37-
id: window::Id,
38-
settings: window::Settings,
39-
title: String,
40-
monitor: Option<winit::monitor::MonitorHandle>,
41-
},
42-
}
43-
4425
/// An interactive, native, cross-platform, multi-windowed application.
4526
///
4627
/// This trait is the main entrypoint of multi-window Iced. Once implemented, you can run
@@ -299,6 +280,25 @@ where
299280
})
300281
}
301282

283+
enum Event<Message: 'static> {
284+
WindowCreated {
285+
id: window::Id,
286+
window: winit::window::Window,
287+
exit_on_close_request: bool,
288+
},
289+
EventLoopAwakened(winit::event::Event<'static, Message>),
290+
}
291+
292+
enum Control {
293+
ChangeFlow(winit::event_loop::ControlFlow),
294+
CreateWindow {
295+
id: window::Id,
296+
settings: window::Settings,
297+
title: String,
298+
monitor: Option<winit::monitor::MonitorHandle>,
299+
},
300+
}
301+
302302
async fn run_instance<A, E, C>(
303303
mut application: A,
304304
mut compositor: C,

0 commit comments

Comments
 (0)