objc2_ui_kit/generated/
UISceneDestructionCondition.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    /// Specifies when UIKit destroys the current scene.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscenedestructioncondition?language=objc)
13    #[unsafe(super(NSObject))]
14    #[thread_kind = MainThreadOnly]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct UISceneDestructionCondition;
17);
18
19extern_conformance!(
20    unsafe impl NSCopying for UISceneDestructionCondition {}
21);
22
23unsafe impl CopyingHelper for UISceneDestructionCondition {
24    type Result = Self;
25}
26
27extern_conformance!(
28    unsafe impl NSObjectProtocol for UISceneDestructionCondition {}
29);
30
31impl UISceneDestructionCondition {
32    extern_methods!(
33        /// The scene should be destroyed when dismissed by the user.
34        /// For example, swiping home on iOS, or tapping x on visionOS.
35        #[unsafe(method(userInitiatedDismissal))]
36        #[unsafe(method_family = none)]
37        pub fn userInitiatedDismissal(mtm: MainThreadMarker) -> Retained<Self>;
38
39        /// The scene should be destroyed when disconnected by the system.
40        /// For example, terminating the process, or rebooting the device.
41        #[unsafe(method(systemDisconnection))]
42        #[unsafe(method_family = none)]
43        pub fn systemDisconnection(mtm: MainThreadMarker) -> Retained<Self>;
44
45        #[unsafe(method(init))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49        #[unsafe(method(new))]
50        #[unsafe(method_family = new)]
51        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
52    );
53}