objc2_core_motion/generated/
CMFallDetectionEvent.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
19#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
20pub struct CMFallDetectionEventUserResolution(pub NSInteger);
21impl CMFallDetectionEventUserResolution {
22 #[doc(alias = "CMFallDetectionEventUserResolutionConfirmed")]
24 pub const Confirmed: Self = Self(0);
25 #[doc(alias = "CMFallDetectionEventUserResolutionDismissed")]
27 pub const Dismissed: Self = Self(1);
28 #[doc(alias = "CMFallDetectionEventUserResolutionRejected")]
30 pub const Rejected: Self = Self(2);
31 #[doc(alias = "CMFallDetectionEventUserResolutionUnresponsive")]
33 pub const Unresponsive: Self = Self(3);
34}
35
36unsafe impl Encode for CMFallDetectionEventUserResolution {
37 const ENCODING: Encoding = NSInteger::ENCODING;
38}
39
40unsafe impl RefEncode for CMFallDetectionEventUserResolution {
41 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
42}
43
44extern_class!(
45 #[unsafe(super(NSObject))]
53 #[derive(Debug, PartialEq, Eq, Hash)]
54 pub struct CMFallDetectionEvent;
55);
56
57unsafe impl NSObjectProtocol for CMFallDetectionEvent {}
58
59impl CMFallDetectionEvent {
60 extern_methods!(
61 #[unsafe(method(init))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
64
65 #[unsafe(method(date))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn date(&self) -> Retained<NSDate>;
71
72 #[unsafe(method(resolution))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn resolution(&self) -> CMFallDetectionEventUserResolution;
80 );
81}
82
83impl CMFallDetectionEvent {
85 extern_methods!(
86 #[unsafe(method(new))]
87 #[unsafe(method_family = new)]
88 pub unsafe fn new() -> Retained<Self>;
89 );
90}