@@ -443,6 +443,17 @@ pub struct Window {
443443 ///
444444 /// [`WindowAttributesExtIOS::with_prefers_status_bar_hidden`]: https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/ios/trait.WindowAttributesExtIOS.html#tymethod.with_prefers_status_bar_hidden
445445 pub prefers_status_bar_hidden : bool ,
446+ /// Sets screen edges for which you want your gestures to take precedence
447+ /// over the system gestures.
448+ ///
449+ /// Corresponds to [`WindowAttributesExtIOS::with_preferred_screen_edges_deferring_system_gestures`].
450+ ///
451+ /// # Platform-specific
452+ ///
453+ /// - Only used on iOS.
454+ ///
455+ /// [`WindowAttributesExtIOS::with_preferred_screen_edges_deferring_system_gestures`]: https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/ios/trait.WindowAttributesExtIOS.html#tymethod.with_preferred_screen_edges_deferring_system_gestures
456+ pub preferred_screen_edges_deferring_system_gestures : ScreenEdge ,
446457}
447458
448459impl Default for Window {
@@ -487,6 +498,7 @@ impl Default for Window {
487498 titlebar_show_buttons : true ,
488499 prefers_home_indicator_hidden : false ,
489500 prefers_status_bar_hidden : false ,
501+ preferred_screen_edges_deferring_system_gestures : Default :: default ( ) ,
490502 }
491503 }
492504}
@@ -1444,6 +1456,31 @@ impl Default for EnabledButtons {
14441456#[ derive( Component , Default ) ]
14451457pub struct ClosingWindow ;
14461458
1459+ /// The edges of a screen. Corresponds to [`winit::platform::ios::ScreenEdge`].
1460+ ///
1461+ /// # Platform-specific
1462+ ///
1463+ /// - Only used on iOS.
1464+ ///
1465+ /// [`winit::platform::ios::ScreenEdge`]: https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/ios/struct.ScreenEdge.html
1466+ #[ derive( Default , Debug , Clone , Copy , PartialEq , Eq , Hash , Reflect ) ]
1467+ #[ cfg_attr( feature = "serialize" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
1468+ pub enum ScreenEdge {
1469+ #[ default]
1470+ /// No edge.
1471+ None ,
1472+ /// The top edge of the screen.
1473+ Top ,
1474+ /// The left edge of the screen.
1475+ Left ,
1476+ /// The bottom edge of the screen.
1477+ Bottom ,
1478+ /// The right edge of the screen.
1479+ Right ,
1480+ /// All edges of the screen.
1481+ All ,
1482+ }
1483+
14471484#[ cfg( test) ]
14481485mod tests {
14491486 use super :: * ;
0 commit comments