objc2_cinematic/generated/
CNDetectionTrack.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-media")]
7use objc2_core_media::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct CNDetectionTrack;
19);
20
21extern_conformance!(
22 unsafe impl NSCopying for CNDetectionTrack {}
23);
24
25unsafe impl CopyingHelper for CNDetectionTrack {
26 type Result = Self;
27}
28
29extern_conformance!(
30 unsafe impl NSObjectProtocol for CNDetectionTrack {}
31);
32
33impl CNDetectionTrack {
34 extern_methods!(
35 #[cfg(feature = "CNDetection")]
36 #[unsafe(method(detectionType))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn detectionType(&self) -> CNDetectionType;
40
41 #[cfg(feature = "CNDetection")]
42 #[unsafe(method(detectionID))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn detectionID(&self) -> CNDetectionID;
46
47 #[cfg(feature = "CNDetection")]
48 #[unsafe(method(detectionGroupID))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn detectionGroupID(&self) -> CNDetectionGroupID;
54
55 #[unsafe(method(isUserCreated))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn isUserCreated(&self) -> bool;
59
60 #[unsafe(method(isDiscrete))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn isDiscrete(&self) -> bool;
67
68 #[cfg(all(feature = "CNDetection", feature = "objc2-core-media"))]
69 #[unsafe(method(detectionAtOrBeforeTime:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn detectionAtOrBeforeTime(&self, time: CMTime)
72 -> Option<Retained<CNDetection>>;
73
74 #[cfg(all(feature = "CNDetection", feature = "objc2-core-media"))]
75 #[unsafe(method(detectionNearestTime:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn detectionNearestTime(&self, time: CMTime) -> Option<Retained<CNDetection>>;
78
79 #[cfg(all(feature = "CNDetection", feature = "objc2-core-media"))]
80 #[unsafe(method(detectionsInTimeRange:))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn detectionsInTimeRange(
84 &self,
85 time_range: CMTimeRange,
86 ) -> Retained<NSArray<CNDetection>>;
87
88 #[unsafe(method(init))]
89 #[unsafe(method_family = init)]
90 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91
92 #[unsafe(method(new))]
93 #[unsafe(method_family = new)]
94 pub unsafe fn new() -> Retained<Self>;
95 );
96}
97
98extern_class!(
99 #[unsafe(super(CNDetectionTrack, NSObject))]
103 #[derive(Debug, PartialEq, Eq, Hash)]
104 pub struct CNFixedDetectionTrack;
105);
106
107extern_conformance!(
108 unsafe impl NSCopying for CNFixedDetectionTrack {}
109);
110
111unsafe impl CopyingHelper for CNFixedDetectionTrack {
112 type Result = Self;
113}
114
115extern_conformance!(
116 unsafe impl NSObjectProtocol for CNFixedDetectionTrack {}
117);
118
119impl CNFixedDetectionTrack {
120 extern_methods!(
121 #[unsafe(method(initWithFocusDisparity:))]
123 #[unsafe(method_family = init)]
124 pub unsafe fn initWithFocusDisparity(
125 this: Allocated<Self>,
126 focus_disparity: c_float,
127 ) -> Retained<Self>;
128
129 #[cfg(feature = "CNDetection")]
130 #[unsafe(method(initWithOriginalDetection:))]
132 #[unsafe(method_family = init)]
133 pub unsafe fn initWithOriginalDetection(
134 this: Allocated<Self>,
135 original_detection: &CNDetection,
136 ) -> Retained<Self>;
137
138 #[unsafe(method(focusDisparity))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn focusDisparity(&self) -> c_float;
141
142 #[cfg(feature = "CNDetection")]
143 #[unsafe(method(originalDetection))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn originalDetection(&self) -> Option<Retained<CNDetection>>;
152 );
153}
154
155impl CNFixedDetectionTrack {
157 extern_methods!(
158 #[unsafe(method(init))]
159 #[unsafe(method_family = init)]
160 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
161
162 #[unsafe(method(new))]
163 #[unsafe(method_family = new)]
164 pub unsafe fn new() -> Retained<Self>;
165 );
166}
167
168extern_class!(
169 #[unsafe(super(CNDetectionTrack, NSObject))]
173 #[derive(Debug, PartialEq, Eq, Hash)]
174 pub struct CNCustomDetectionTrack;
175);
176
177extern_conformance!(
178 unsafe impl NSCopying for CNCustomDetectionTrack {}
179);
180
181unsafe impl CopyingHelper for CNCustomDetectionTrack {
182 type Result = Self;
183}
184
185extern_conformance!(
186 unsafe impl NSObjectProtocol for CNCustomDetectionTrack {}
187);
188
189impl CNCustomDetectionTrack {
190 extern_methods!(
191 #[cfg(feature = "CNDetection")]
192 #[unsafe(method(initWithDetections:smooth:))]
197 #[unsafe(method_family = init)]
198 pub unsafe fn initWithDetections_smooth(
199 this: Allocated<Self>,
200 detections: &NSArray<CNDetection>,
201 apply_smoothing: bool,
202 ) -> Retained<Self>;
203
204 #[cfg(feature = "CNDetection")]
205 #[unsafe(method(allDetections))]
206 #[unsafe(method_family = none)]
207 pub unsafe fn allDetections(&self) -> Retained<NSArray<CNDetection>>;
208 );
209}
210
211impl CNCustomDetectionTrack {
213 extern_methods!(
214 #[unsafe(method(init))]
215 #[unsafe(method_family = init)]
216 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
217
218 #[unsafe(method(new))]
219 #[unsafe(method_family = new)]
220 pub unsafe fn new() -> Retained<Self>;
221 );
222}