use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-vision")]
use objc2_vision::*;
use crate::*;
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct ARSkeleton;
);
#[cfg(feature = "objc2")]
unsafe impl Send for ARSkeleton {}
#[cfg(feature = "objc2")]
unsafe impl Sync for ARSkeleton {}
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for ARSkeleton {}
);
#[cfg(feature = "objc2")]
impl ARSkeleton {
extern_methods!(
#[cfg(feature = "ARSkeletonDefinition")]
#[unsafe(method(definition))]
#[unsafe(method_family = none)]
pub unsafe fn definition(&self) -> Retained<ARSkeletonDefinition>;
#[unsafe(method(jointCount))]
#[unsafe(method_family = none)]
pub unsafe fn jointCount(&self) -> NSUInteger;
#[unsafe(method(isJointTracked:))]
#[unsafe(method_family = none)]
pub unsafe fn isJointTracked(&self, joint_index: NSInteger) -> bool;
#[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>;
);
}
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(ARSkeleton, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct ARSkeleton3D;
);
#[cfg(feature = "objc2")]
unsafe impl Send for ARSkeleton3D {}
#[cfg(feature = "objc2")]
unsafe impl Sync for ARSkeleton3D {}
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for ARSkeleton3D {}
);
#[cfg(feature = "objc2")]
impl ARSkeleton3D {
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>;
);
}
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(ARSkeleton, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct ARSkeleton2D;
);
#[cfg(feature = "objc2")]
unsafe impl Send for ARSkeleton2D {}
#[cfg(feature = "objc2")]
unsafe impl Sync for ARSkeleton2D {}
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for ARSkeleton2D {}
);
#[cfg(feature = "objc2")]
impl ARSkeleton2D {
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>;
);
}
#[cfg(feature = "objc2")]
impl ARSkeleton {
#[doc(alias = "ARSkeletonJointNameForRecognizedPointKey")]
#[cfg(all(
feature = "ARSkeletonDefinition",
feature = "objc2",
feature = "objc2-foundation",
feature = "objc2-vision"
))]
#[inline]
pub unsafe fn joint_name_for_recognized_point_key(
recognized_point_key: &VNRecognizedPointKey,
) -> Option<Retained<ARSkeletonJointName>> {
extern "C-unwind" {
fn ARSkeletonJointNameForRecognizedPointKey(
recognized_point_key: &VNRecognizedPointKey,
) -> *mut ARSkeletonJointName;
}
let ret = unsafe { ARSkeletonJointNameForRecognizedPointKey(recognized_point_key) };
unsafe { Retained::retain_autoreleased(ret) }
}
}
#[cfg(all(
feature = "ARSkeletonDefinition",
feature = "objc2",
feature = "objc2-foundation",
feature = "objc2-vision"
))]
#[deprecated = "renamed to `ARSkeleton::joint_name_for_recognized_point_key`"]
#[inline]
pub unsafe extern "C-unwind" fn ARSkeletonJointNameForRecognizedPointKey(
recognized_point_key: &VNRecognizedPointKey,
) -> Option<Retained<ARSkeletonJointName>> {
extern "C-unwind" {
fn ARSkeletonJointNameForRecognizedPointKey(
recognized_point_key: &VNRecognizedPointKey,
) -> *mut ARSkeletonJointName;
}
let ret = unsafe { ARSkeletonJointNameForRecognizedPointKey(recognized_point_key) };
unsafe { Retained::retain_autoreleased(ret) }
}