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
60
61
//! 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!(
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipointerlockstate?language=objc)
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIPointerLockState;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIPointerLockState {}
);
impl UIPointerLockState {
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>;
/// The status of the pointer lock for this scene as determined by the system.
/// The preferred pointer lock value specified by a view controller is only a request, which may or may not be honored.
/// This property is key-value observable and UIPointerLockState.didChangeNotification is posted when it changes.
#[unsafe(method(isLocked))]
#[unsafe(method_family = none)]
pub fn isLocked(&self) -> bool;
);
}
/// PointerLockState.
#[cfg(all(feature = "UIResponder", feature = "UIScene"))]
impl UIScene {
extern_methods!(
#[unsafe(method(pointerLockState))]
#[unsafe(method_family = none)]
pub fn pointerLockState(&self) -> Option<Retained<UIPointerLockState>>;
);
}
extern "C" {
/// A notification that is posted when UIPointerLockState.locked changes values for a scene.
/// It contains the related UIScene in the user info dictionary of the notification.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uipointerlockstatedidchangenotification?language=objc)
pub static UIPointerLockStateDidChangeNotification: &'static NSNotificationName;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uipointerlockstatesceneuserinfokey?language=objc)
pub static UIPointerLockStateSceneUserInfoKey: &'static NSString;
}