use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-video")]
use objc2_core_video::*;
use crate::*;
#[cfg(feature = "objc2")]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ARConfidenceLevel(pub NSInteger);
#[cfg(feature = "objc2")]
impl ARConfidenceLevel {
#[doc(alias = "ARConfidenceLevelLow")]
pub const Low: Self = Self(0);
#[doc(alias = "ARConfidenceLevelMedium")]
pub const Medium: Self = Self(1);
#[doc(alias = "ARConfidenceLevelHigh")]
pub const High: Self = Self(2);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for ARConfidenceLevel {
const ENCODING: Encoding = NSInteger::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for ARConfidenceLevel {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct ARDepthData;
);
#[cfg(feature = "objc2")]
unsafe impl Send for ARDepthData {}
#[cfg(feature = "objc2")]
unsafe impl Sync for ARDepthData {}
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for ARDepthData {}
);
#[cfg(feature = "objc2")]
impl ARDepthData {
extern_methods!(
#[cfg(feature = "objc2-core-video")]
#[unsafe(method(depthMap))]
#[unsafe(method_family = none)]
pub unsafe fn depthMap(&self) -> Retained<CVPixelBuffer>;
#[cfg(feature = "objc2-core-video")]
#[unsafe(method(confidenceMap))]
#[unsafe(method_family = none)]
pub unsafe fn confidenceMap(&self) -> Option<Retained<CVPixelBuffer>>;
);
}
#[cfg(feature = "objc2")]
impl ARDepthData {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}