1use std::sync::Arc;
4
5use crate::core::{Element, RenderCx};
6
7mod command;
8mod id;
9mod manager;
10mod options;
11
12#[doc(hidden)]
13pub use command::WindowCommand;
14pub use id::WindowId;
15
16#[derive(Clone, Debug, PartialEq, Eq)]
17pub struct WindowFocusChanged {
18 pub window_id: WindowId,
19 pub focused: bool,
20}
21
22impl crate::events::Event for WindowFocusChanged {
23 const NAME: &'static str = "window.focus_changed";
24}
25pub use manager::{WindowHandle, WindowManager};
26pub use options::{
27 ClosePolicy, WindowCloseHandler, WindowDragExclusion, WindowMode, WindowOptions, WindowPosition,
28};
29
30#[doc(hidden)]
31pub type WindowView = Arc<
32 dyn for<'scope, 'context> Fn(&mut RenderCx<'scope, 'context>) -> Element
33 + Send
34 + Sync
35 + 'static,
36>;
37
38#[path = "window_test.rs"]
39#[cfg(test)]
40mod tests;