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")]
29extern_conformance!(
30    unsafe impl NSCopying for UIWindowScenePushPlacement {}
31);
32
33#[cfg(feature = "UIWindowScenePlacement")]
34unsafe impl CopyingHelper for UIWindowScenePushPlacement {
35    type Result = Self;
36}
37
38#[cfg(feature = "UIWindowScenePlacement")]
39extern_conformance!(
40    unsafe impl NSObjectProtocol for UIWindowScenePushPlacement {}
41);
42
43#[cfg(feature = "UIWindowScenePlacement")]
44impl UIWindowScenePushPlacement {
45    extern_methods!(
46        #[cfg(feature = "UISceneSession")]
47        /// Creates the placement that will target the given `sceneSession`.
48        /// - Parameter targetSceneSession: The scene session of the window scene that will be backgrounded.
49        #[unsafe(method(placementTargetingSceneSession:))]
50        #[unsafe(method_family = none)]
51        pub fn placementTargetingSceneSession(
52            target_scene_session: &UISceneSession,
53        ) -> Retained<Self>;
54    );
55}
56
57/// Methods declared on superclass `UIWindowScenePlacement`.
58#[cfg(feature = "UIWindowScenePlacement")]
59impl UIWindowScenePushPlacement {
60    extern_methods!(
61        #[unsafe(method(init))]
62        #[unsafe(method_family = init)]
63        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
64
65        #[unsafe(method(new))]
66        #[unsafe(method_family = new)]
67        pub unsafe fn new() -> Retained<Self>;
68    );
69}