objc2_ui_kit/generated/
UIPointerLockState.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[thread_kind = MainThreadOnly]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct UIPointerLockState;
15);
16
17extern_conformance!(
18 unsafe impl NSObjectProtocol for UIPointerLockState {}
19);
20
21impl UIPointerLockState {
22 extern_methods!(
23 #[unsafe(method(init))]
24 #[unsafe(method_family = init)]
25 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
26
27 #[unsafe(method(new))]
28 #[unsafe(method_family = new)]
29 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
30
31 #[unsafe(method(isLocked))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn isLocked(&self) -> bool;
37 );
38}
39
40#[cfg(all(feature = "UIResponder", feature = "UIScene"))]
42impl UIScene {
43 extern_methods!(
44 #[unsafe(method(pointerLockState))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn pointerLockState(&self) -> Option<Retained<UIPointerLockState>>;
47 );
48}
49
50extern "C" {
51 pub static UIPointerLockStateDidChangeNotification: &'static NSNotificationName;
56}
57
58extern "C" {
59 pub static UIPointerLockStateSceneUserInfoKey: &'static NSString;
61}