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))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn depthMap(&self) -> Retained<CVPixelBuffer>;
69
70 #[cfg(feature = "objc2-core-video")]
71 #[unsafe(method(confidenceMap))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn confidenceMap(&self) -> Option<Retained<CVPixelBuffer>>;
77 );
78}
79
80#[cfg(feature = "objc2")]
82impl ARDepthData {
83 extern_methods!(
84 #[unsafe(method(init))]
85 #[unsafe(method_family = init)]
86 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88 #[unsafe(method(new))]
89 #[unsafe(method_family = new)]
90 pub unsafe fn new() -> Retained<Self>;
91 );
92}