objc2_ui_kit/generated/
UIWindowScenePushPlacement.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 present the
11    /// activated scene in its place.
12    ///
13    /// The provided scene session will be backgrounded. The activated scene will
14    /// be center aligned with the backgrounded scene. Closing the activated window
15    /// will result in the backgrounded scene reappearing.
16    ///
17    /// Targeting a scene session that is currently pushed will result in an error
18    /// being delivered to the `errorHandler` of
19    /// ``-[UIApplication activateSceneSessionForRequest: errorHandler:]``.
20    ///
21    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwindowscenepushplacement?language=objc)
22    #[unsafe(super(UIWindowScenePlacement, NSObject))]
23    #[derive(Debug, PartialEq, Eq, Hash)]
24    #[cfg(feature = "UIWindowScenePlacement")]
25    pub struct UIWindowScenePushPlacement;
26);
27
28#[cfg(feature = "UIWindowScenePlacement")]
29unsafe impl NSCopying for UIWindowScenePushPlacement {}
30
31#[cfg(feature = "UIWindowScenePlacement")]
32unsafe impl CopyingHelper for UIWindowScenePushPlacement {
33    type Result = Self;
34}
35
36#[cfg(feature = "UIWindowScenePlacement")]
37unsafe impl NSObjectProtocol for UIWindowScenePushPlacement {}
38
39#[cfg(feature = "UIWindowScenePlacement")]
40impl UIWindowScenePushPlacement {
41    extern_methods!(
42        #[cfg(feature = "UISceneSession")]
43        /// Creates the placement that will target the given `sceneSession`.
44        /// - Parameter targetSceneSession: The scene session of the window scene that will be backgrounded.
45        #[unsafe(method(placementTargetingSceneSession:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn placementTargetingSceneSession(
48            target_scene_session: &UISceneSession,
49        ) -> Retained<Self>;
50    );
51}
52
53/// Methods declared on superclass `UIWindowScenePlacement`.
54#[cfg(feature = "UIWindowScenePlacement")]
55impl UIWindowScenePushPlacement {
56    extern_methods!(
57        #[unsafe(method(init))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60
61        #[unsafe(method(new))]
62        #[unsafe(method_family = new)]
63        pub unsafe fn new() -> Retained<Self>;
64    );
65}