1use dioxus_core::LaunchConfig;
2use winit::window::WindowAttributes;
3
4pub struct Config {
6 pub(crate) window_attributes: WindowAttributes,
7}
8
9impl LaunchConfig for Config {}
10
11impl Default for Config {
12 fn default() -> Self {
13 Self {
14 window_attributes: WindowAttributes::default().with_title(
15 dioxus_cli_config::app_title().unwrap_or_else(|| "Dioxus App".to_string()),
16 ),
17 }
18 }
19}
20
21impl Config {
22 pub fn new() -> Self {
23 Self::default()
24 }
25
26 pub fn with_window_attributes(mut self, attrs: WindowAttributes) -> Self {
28 self.window_attributes = attrs;
30 self
31 }
32}