objc2_ar_kit/generated/
ARSkeleton.rs1use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-vision")]
7use objc2_vision::*;
8
9use crate::*;
10
11#[cfg(feature = "objc2")]
12extern_class!(
13 #[unsafe(super(NSObject))]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 #[cfg(feature = "objc2")]
23 pub struct ARSkeleton;
24);
25
26#[cfg(feature = "objc2")]
27unsafe impl Send for ARSkeleton {}
28
29#[cfg(feature = "objc2")]
30unsafe impl Sync for ARSkeleton {}
31
32#[cfg(feature = "objc2")]
33unsafe impl NSObjectProtocol for ARSkeleton {}
34
35#[cfg(feature = "objc2")]
36impl ARSkeleton {
37 extern_methods!(
38 #[cfg(feature = "ARSkeletonDefinition")]
39 #[unsafe(method(definition))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn definition(&self) -> Retained<ARSkeletonDefinition>;
43
44 #[unsafe(method(jointCount))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn jointCount(&self) -> NSUInteger;
48
49 #[unsafe(method(isJointTracked:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn isJointTracked(&self, joint_index: NSInteger) -> bool;
58
59 #[unsafe(method(init))]
61 #[unsafe(method_family = init)]
62 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
63
64 #[unsafe(method(new))]
65 #[unsafe(method_family = new)]
66 pub unsafe fn new() -> Retained<Self>;
67 );
68}
69
70#[cfg(feature = "objc2")]
71extern_class!(
72 #[unsafe(super(ARSkeleton, NSObject))]
76 #[derive(Debug, PartialEq, Eq, Hash)]
77 #[cfg(feature = "objc2")]
78 pub struct ARSkeleton3D;
79);
80
81#[cfg(feature = "objc2")]
82unsafe impl Send for ARSkeleton3D {}
83
84#[cfg(feature = "objc2")]
85unsafe impl Sync for ARSkeleton3D {}
86
87#[cfg(feature = "objc2")]
88unsafe impl NSObjectProtocol for ARSkeleton3D {}
89
90#[cfg(feature = "objc2")]
91impl ARSkeleton3D {
92 extern_methods!(
93 #[unsafe(method(init))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97
98 #[unsafe(method(new))]
99 #[unsafe(method_family = new)]
100 pub unsafe fn new() -> Retained<Self>;
101 );
102}
103
104#[cfg(feature = "objc2")]
105extern_class!(
106 #[unsafe(super(ARSkeleton, NSObject))]
110 #[derive(Debug, PartialEq, Eq, Hash)]
111 #[cfg(feature = "objc2")]
112 pub struct ARSkeleton2D;
113);
114
115#[cfg(feature = "objc2")]
116unsafe impl Send for ARSkeleton2D {}
117
118#[cfg(feature = "objc2")]
119unsafe impl Sync for ARSkeleton2D {}
120
121#[cfg(feature = "objc2")]
122unsafe impl NSObjectProtocol for ARSkeleton2D {}
123
124#[cfg(feature = "objc2")]
125impl ARSkeleton2D {
126 extern_methods!(
127 #[unsafe(method(init))]
129 #[unsafe(method_family = init)]
130 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
131
132 #[unsafe(method(new))]
133 #[unsafe(method_family = new)]
134 pub unsafe fn new() -> Retained<Self>;
135 );
136}
137
138#[cfg(all(
149 feature = "ARSkeletonDefinition",
150 feature = "objc2",
151 feature = "objc2-foundation",
152 feature = "objc2-vision"
153))]
154#[inline]
155pub unsafe extern "C-unwind" fn ARSkeletonJointNameForRecognizedPointKey(
156 recognized_point_key: &VNRecognizedPointKey,
157) -> Option<Retained<ARSkeletonJointName>> {
158 extern "C-unwind" {
159 fn ARSkeletonJointNameForRecognizedPointKey(
160 recognized_point_key: &VNRecognizedPointKey,
161 ) -> *mut ARSkeletonJointName;
162 }
163 let ret = unsafe { ARSkeletonJointNameForRecognizedPointKey(recognized_point_key) };
164 unsafe { Retained::retain_autoreleased(ret) }
165}