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
57extern_conformance!(
58 unsafe impl NSObjectProtocol for CMFallDetectionEvent {}
59);
60
61impl CMFallDetectionEvent {
62 extern_methods!(
63 #[unsafe(method(init))]
64 #[unsafe(method_family = init)]
65 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67 #[unsafe(method(date))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn date(&self) -> Retained<NSDate>;
73
74 #[unsafe(method(resolution))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn resolution(&self) -> CMFallDetectionEventUserResolution;
82 );
83}
84
85impl CMFallDetectionEvent {
87 extern_methods!(
88 #[unsafe(method(new))]
89 #[unsafe(method_family = new)]
90 pub unsafe fn new() -> Retained<Self>;
91 );
92}