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")]
33extern_conformance!(
34 unsafe impl NSObjectProtocol for ARSkeleton {}
35);
36
37#[cfg(feature = "objc2")]
38impl ARSkeleton {
39 extern_methods!(
40 #[cfg(feature = "ARSkeletonDefinition")]
41 #[unsafe(method(definition))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn definition(&self) -> Retained<ARSkeletonDefinition>;
51
52 #[unsafe(method(jointCount))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn jointCount(&self) -> NSUInteger;
62
63 #[unsafe(method(isJointTracked:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn isJointTracked(&self, joint_index: NSInteger) -> bool;
72
73 #[unsafe(method(init))]
75 #[unsafe(method_family = init)]
76 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
77
78 #[unsafe(method(new))]
79 #[unsafe(method_family = new)]
80 pub unsafe fn new() -> Retained<Self>;
81 );
82}
83
84#[cfg(feature = "objc2")]
85extern_class!(
86 #[unsafe(super(ARSkeleton, NSObject))]
90 #[derive(Debug, PartialEq, Eq, Hash)]
91 #[cfg(feature = "objc2")]
92 pub struct ARSkeleton3D;
93);
94
95#[cfg(feature = "objc2")]
96unsafe impl Send for ARSkeleton3D {}
97
98#[cfg(feature = "objc2")]
99unsafe impl Sync for ARSkeleton3D {}
100
101#[cfg(feature = "objc2")]
102extern_conformance!(
103 unsafe impl NSObjectProtocol for ARSkeleton3D {}
104);
105
106#[cfg(feature = "objc2")]
107impl ARSkeleton3D {
108 extern_methods!(
109 #[unsafe(method(init))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113
114 #[unsafe(method(new))]
115 #[unsafe(method_family = new)]
116 pub unsafe fn new() -> Retained<Self>;
117 );
118}
119
120#[cfg(feature = "objc2")]
121extern_class!(
122 #[unsafe(super(ARSkeleton, NSObject))]
126 #[derive(Debug, PartialEq, Eq, Hash)]
127 #[cfg(feature = "objc2")]
128 pub struct ARSkeleton2D;
129);
130
131#[cfg(feature = "objc2")]
132unsafe impl Send for ARSkeleton2D {}
133
134#[cfg(feature = "objc2")]
135unsafe impl Sync for ARSkeleton2D {}
136
137#[cfg(feature = "objc2")]
138extern_conformance!(
139 unsafe impl NSObjectProtocol for ARSkeleton2D {}
140);
141
142#[cfg(feature = "objc2")]
143impl ARSkeleton2D {
144 extern_methods!(
145 #[unsafe(method(init))]
147 #[unsafe(method_family = init)]
148 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
149
150 #[unsafe(method(new))]
151 #[unsafe(method_family = new)]
152 pub unsafe fn new() -> Retained<Self>;
153 );
154}
155
156#[cfg(feature = "objc2")]
157impl ARSkeleton {
158 #[doc(alias = "ARSkeletonJointNameForRecognizedPointKey")]
169 #[cfg(all(
170 feature = "ARSkeletonDefinition",
171 feature = "objc2",
172 feature = "objc2-foundation",
173 feature = "objc2-vision"
174 ))]
175 #[inline]
176 pub unsafe fn joint_name_for_recognized_point_key(
177 recognized_point_key: &VNRecognizedPointKey,
178 ) -> Option<Retained<ARSkeletonJointName>> {
179 extern "C-unwind" {
180 fn ARSkeletonJointNameForRecognizedPointKey(
181 recognized_point_key: &VNRecognizedPointKey,
182 ) -> *mut ARSkeletonJointName;
183 }
184 let ret = unsafe { ARSkeletonJointNameForRecognizedPointKey(recognized_point_key) };
185 unsafe { Retained::retain_autoreleased(ret) }
186 }
187}
188
189#[cfg(all(
190 feature = "ARSkeletonDefinition",
191 feature = "objc2",
192 feature = "objc2-foundation",
193 feature = "objc2-vision"
194))]
195#[deprecated = "renamed to `ARSkeleton::joint_name_for_recognized_point_key`"]
196#[inline]
197pub unsafe extern "C-unwind" fn ARSkeletonJointNameForRecognizedPointKey(
198 recognized_point_key: &VNRecognizedPointKey,
199) -> Option<Retained<ARSkeletonJointName>> {
200 extern "C-unwind" {
201 fn ARSkeletonJointNameForRecognizedPointKey(
202 recognized_point_key: &VNRecognizedPointKey,
203 ) -> *mut ARSkeletonJointName;
204 }
205 let ret = unsafe { ARSkeletonJointNameForRecognizedPointKey(recognized_point_key) };
206 unsafe { Retained::retain_autoreleased(ret) }
207}