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")]
24extern_conformance!(
25    unsafe impl NSCopying for UIWindowSceneReplacePlacement {}
26);
27
28#[cfg(feature = "UIWindowScenePlacement")]
29unsafe impl CopyingHelper for UIWindowSceneReplacePlacement {
30    type Result = Self;
31}
32
33#[cfg(feature = "UIWindowScenePlacement")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for UIWindowSceneReplacePlacement {}
36);
37
38#[cfg(feature = "UIWindowScenePlacement")]
39impl UIWindowSceneReplacePlacement {
40    extern_methods!(
41        #[cfg(feature = "UISceneSession")]
42        /// Creates the placement that targets the given `sceneSession`
43        /// - Parameter sceneSession: The scene session of the window scene to replace.
44        #[deprecated = "UIWindowSceneReplacePlacement has been replaced with UIWindowScenePushPlacement"]
45        #[unsafe(method(placementToReplaceSceneSession:))]
46        #[unsafe(method_family = none)]
47        pub fn placementToReplaceSceneSession(scene_session: &UISceneSession) -> Retained<Self>;
48    );
49}
50
51/// Methods declared on superclass `UIWindowScenePlacement`.
52#[cfg(feature = "UIWindowScenePlacement")]
53impl UIWindowSceneReplacePlacement {
54    extern_methods!(
55        #[unsafe(method(init))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62    );
63}