11use kurbo:: { Point , Size } ;
2+ pub use winit:: window:: Fullscreen ;
23pub use winit:: window:: ResizeDirection ;
34pub use winit:: window:: Theme ;
5+ pub use winit:: window:: WindowButtons ;
46pub use winit:: window:: WindowId ;
7+ pub use winit:: window:: WindowLevel ;
58
69use crate :: {
710 app:: { add_app_update_event, AppUpdateEvent } ,
@@ -13,6 +16,13 @@ pub struct WindowConfig {
1316 pub ( crate ) size : Option < Size > ,
1417 pub ( crate ) position : Option < Point > ,
1518 pub ( crate ) show_titlebar : Option < bool > ,
19+ pub ( crate ) with_transparency : Option < bool > ,
20+ pub ( crate ) fullscreen : Option < Fullscreen > ,
21+ pub ( crate ) window_icon : Option < bool > ,
22+ pub ( crate ) title : Option < String > ,
23+ pub ( crate ) enabled_buttons : Option < WindowButtons > ,
24+ pub ( crate ) resizable : Option < bool > ,
25+ pub ( crate ) window_level : Option < WindowLevel > ,
1626}
1727
1828impl WindowConfig {
@@ -30,6 +40,41 @@ impl WindowConfig {
3040 self . show_titlebar = Some ( show_titlebar) ;
3141 self
3242 }
43+
44+ pub fn with_transparency ( mut self , with_transparency : bool ) -> Self {
45+ self . with_transparency = Some ( with_transparency) ;
46+ self
47+ }
48+
49+ pub fn fullscreen ( mut self , fullscreen : Fullscreen ) -> Self {
50+ self . fullscreen = Some ( fullscreen) ;
51+ self
52+ }
53+
54+ pub fn window_icon ( mut self , window_icon : bool ) -> Self {
55+ self . window_icon = Some ( window_icon) ;
56+ self
57+ }
58+
59+ pub fn title ( mut self , title : impl Into < String > ) -> Self {
60+ self . title = Some ( title. into ( ) ) ;
61+ self
62+ }
63+
64+ pub fn enabled_buttons ( mut self , enabled_buttons : WindowButtons ) -> Self {
65+ self . enabled_buttons = Some ( enabled_buttons) ;
66+ self
67+ }
68+
69+ pub fn resizable ( mut self , resizable : bool ) -> Self {
70+ self . resizable = Some ( resizable) ;
71+ self
72+ }
73+
74+ pub fn window_level ( mut self , window_level : WindowLevel ) -> Self {
75+ self . window_level = Some ( window_level) ;
76+ self
77+ }
3378}
3479
3580/// create a new window. You'll need to create Application first, otherwise it
0 commit comments