1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! 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 "C" {
/// A notification posted when the system protection attributes of a scene change. The object of
/// the notification is the scene whose protection attributes changed.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscenesystemprotectiondidchangenotification?language=objc)
pub static UISceneSystemProtectionDidChangeNotification: &'static NSNotificationName;
}
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscenesystemprotectionmanager?language=objc)
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UISceneSystemProtectionManager;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UISceneSystemProtectionManager {}
);
impl UISceneSystemProtectionManager {
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(mtm: MainThreadMarker) -> Retained<Self>;
/// `YES`if the system requires requires device owner authentication challenges to reveal the
/// content of the scene associated with this manager, else
/// `NO`. Note in particular that this
/// is
/// _not_the instantaneous state of whether any system-provided shield is covering the UI at
/// the moment, but whether protection is enabled in general.
#[unsafe(method(isUserAuthenticationEnabled))]
#[unsafe(method_family = none)]
pub fn isUserAuthenticationEnabled(&self) -> bool;
);
}
/// SystemProtection.
#[cfg(all(feature = "UIResponder", feature = "UIScene"))]
impl UIScene {
extern_methods!(
#[unsafe(method(systemProtectionManager))]
#[unsafe(method_family = none)]
pub fn systemProtectionManager(&self) -> Option<Retained<UISceneSystemProtectionManager>>;
);
}