iced_core/window/
settings.rs1#[cfg(target_os = "windows")]
3#[path = "settings/windows.rs"]
4mod platform;
5
6#[cfg(target_os = "macos")]
7#[path = "settings/macos.rs"]
8mod platform;
9
10#[cfg(target_os = "linux")]
11#[path = "settings/linux.rs"]
12mod platform;
13
14#[cfg(target_arch = "wasm32")]
15#[path = "settings/wasm.rs"]
16mod platform;
17
18#[cfg(not(any(
19 target_os = "windows",
20 target_os = "macos",
21 target_os = "linux",
22 target_arch = "wasm32"
23)))]
24#[path = "settings/other.rs"]
25mod platform;
26
27use crate::window::{Icon, Level, Position};
28use crate::Size;
29
30pub use platform::PlatformSpecific;
31#[derive(Debug, Clone)]
33pub struct Settings {
34 pub size: Size,
36
37 pub resize_border: u32,
39
40 pub position: Position,
42
43 pub min_size: Option<Size>,
45
46 pub max_size: Option<Size>,
48
49 pub visible: bool,
51
52 pub resizable: bool,
54
55 pub decorations: bool,
57
58 pub transparent: bool,
60
61 pub level: Level,
63
64 pub icon: Option<Icon>,
66
67 pub platform_specific: PlatformSpecific,
69
70 pub exit_on_close_request: bool,
79}
80
81impl Default for Settings {
82 fn default() -> Settings {
83 Settings {
84 size: Size::new(1024.0, 768.0),
85 resize_border: 8,
86 position: Position::default(),
87 min_size: None,
88 max_size: None,
89 visible: true,
90 resizable: true,
91 decorations: true,
92 transparent: false,
93 level: Level::default(),
94 icon: None,
95 exit_on_close_request: true,
96 platform_specific: PlatformSpecific::default(),
97 }
98 }
99}