objc2_ui_kit/generated/
UIWindowSceneReplacePlacement.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Background the scene of the provided scene session and replace it with the
11    /// activated scene. Closing the activated scene will result in the replaced
12    /// scene reappearing. The activated scene will be center aligned with the
13    /// replaced scene. There is no impact on the sizing of either scene.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwindowscenereplaceplacement?language=objc)
16    #[unsafe(super(UIWindowScenePlacement, NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    #[cfg(feature = "UIWindowScenePlacement")]
19    #[deprecated = "UIWindowSceneReplacePlacement has been replaced with UIWindowScenePushPlacement"]
20    pub struct UIWindowSceneReplacePlacement;
21);
22
23#[cfg(feature = "UIWindowScenePlacement")]
24unsafe impl NSCopying for UIWindowSceneReplacePlacement {}
25
26#[cfg(feature = "UIWindowScenePlacement")]
27unsafe impl CopyingHelper for UIWindowSceneReplacePlacement {
28    type Result = Self;
29}
30
31#[cfg(feature = "UIWindowScenePlacement")]
32unsafe impl NSObjectProtocol for UIWindowSceneReplacePlacement {}
33
34#[cfg(feature = "UIWindowScenePlacement")]
35impl UIWindowSceneReplacePlacement {
36    extern_methods!(
37        #[cfg(feature = "UISceneSession")]
38        /// Creates the placement that targets the given `sceneSession`
39        /// - Parameter sceneSession: The scene session of the window scene to replace.
40        #[deprecated = "UIWindowSceneReplacePlacement has been replaced with UIWindowScenePushPlacement"]
41        #[unsafe(method(placementToReplaceSceneSession:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn placementToReplaceSceneSession(
44            scene_session: &UISceneSession,
45        ) -> Retained<Self>;
46    );
47}
48
49/// Methods declared on superclass `UIWindowScenePlacement`.
50#[cfg(feature = "UIWindowScenePlacement")]
51impl UIWindowSceneReplacePlacement {
52    extern_methods!(
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57        #[unsafe(method(new))]
58        #[unsafe(method_family = new)]
59        pub unsafe fn new() -> Retained<Self>;
60    );
61}