objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// Background the scene of the provided scene session and replace it with the
    /// activated scene. Closing the activated scene will result in the replaced
    /// scene reappearing. The activated scene will be center aligned with the
    /// replaced scene. There is no impact on the sizing of either scene.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiwindowscenereplaceplacement?language=objc)
    #[unsafe(super(UIWindowScenePlacement, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UIWindowScenePlacement")]
    #[deprecated = "UIWindowSceneReplacePlacement has been replaced with UIWindowScenePushPlacement"]
    pub struct UIWindowSceneReplacePlacement;
);

#[cfg(feature = "UIWindowScenePlacement")]
extern_conformance!(
    unsafe impl NSCopying for UIWindowSceneReplacePlacement {}
);

#[cfg(feature = "UIWindowScenePlacement")]
unsafe impl CopyingHelper for UIWindowSceneReplacePlacement {
    type Result = Self;
}

#[cfg(feature = "UIWindowScenePlacement")]
extern_conformance!(
    unsafe impl NSObjectProtocol for UIWindowSceneReplacePlacement {}
);

#[cfg(feature = "UIWindowScenePlacement")]
impl UIWindowSceneReplacePlacement {
    extern_methods!(
        #[cfg(feature = "UISceneSession")]
        /// Creates the placement that targets the given `sceneSession`
        /// - Parameter sceneSession: The scene session of the window scene to replace.
        #[deprecated = "UIWindowSceneReplacePlacement has been replaced with UIWindowScenePushPlacement"]
        #[unsafe(method(placementToReplaceSceneSession:))]
        #[unsafe(method_family = none)]
        pub fn placementToReplaceSceneSession(scene_session: &UISceneSession) -> Retained<Self>;
    );
}

/// Methods declared on superclass `UIWindowScenePlacement`.
#[cfg(feature = "UIWindowScenePlacement")]
impl UIWindowSceneReplacePlacement {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}