objc2_ar_kit/generated/
ARDepthData.rs1use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-video")]
7use objc2_core_video::*;
8
9use crate::*;
10
11#[cfg(feature = "objc2")]
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct ARConfidenceLevel(pub NSInteger);
19#[cfg(feature = "objc2")]
20impl ARConfidenceLevel {
21 #[doc(alias = "ARConfidenceLevelLow")]
22 pub const Low: Self = Self(0);
23 #[doc(alias = "ARConfidenceLevelMedium")]
24 pub const Medium: Self = Self(1);
25 #[doc(alias = "ARConfidenceLevelHigh")]
26 pub const High: Self = Self(2);
27}
28
29#[cfg(feature = "objc2")]
30unsafe impl Encode for ARConfidenceLevel {
31 const ENCODING: Encoding = NSInteger::ENCODING;
32}
33
34#[cfg(feature = "objc2")]
35unsafe impl RefEncode for ARConfidenceLevel {
36 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39#[cfg(feature = "objc2")]
40extern_class!(
41 #[unsafe(super(NSObject))]
45 #[derive(Debug, PartialEq, Eq, Hash)]
46 #[cfg(feature = "objc2")]
47 pub struct ARDepthData;
48);
49
50#[cfg(feature = "objc2")]
51unsafe impl Send for ARDepthData {}
52
53#[cfg(feature = "objc2")]
54unsafe impl Sync for ARDepthData {}
55
56#[cfg(feature = "objc2")]
57extern_conformance!(
58 unsafe impl NSObjectProtocol for ARDepthData {}
59);
60
61#[cfg(feature = "objc2")]
62impl ARDepthData {
63 extern_methods!(
64 #[cfg(feature = "objc2-core-video")]
65 #[unsafe(method(depthMap))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn depthMap(&self) -> Retained<CVPixelBuffer>;
76
77 #[cfg(feature = "objc2-core-video")]
78 #[unsafe(method(confidenceMap))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn confidenceMap(&self) -> Option<Retained<CVPixelBuffer>>;
91 );
92}
93
94#[cfg(feature = "objc2")]
96impl ARDepthData {
97 extern_methods!(
98 #[unsafe(method(init))]
99 #[unsafe(method_family = init)]
100 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
101
102 #[unsafe(method(new))]
103 #[unsafe(method_family = new)]
104 pub unsafe fn new() -> Retained<Self>;
105 );
106}