1
1
#if 0
2
2
#elif defined(__arm64__) && __arm64__
3
- // Generated by Apple Swift version 5.7.2 (swiftlang-5.7.2.135 .5 clang-1400 .0.29.51 )
3
+ // Generated by Apple Swift version 5.8.1 (swiftlang-5.8.0.124 .5 clang-1403 .0.22.11.100 )
4
4
#ifndef QUICKPOSECORE_SWIFT_H
5
5
#define QUICKPOSECORE_SWIFT_H
6
6
#pragma clang diagnostic push
23
23
# include <swift/objc-prologue.h>
24
24
#endif
25
25
26
- #pragma clang diagnostic ignored "-Wduplicate-method-match"
27
26
#pragma clang diagnostic ignored "-Wauto-import"
28
27
#if defined(__OBJC__)
29
28
#include <Foundation/Foundation.h>
32
31
#include <cstdint>
33
32
#include <cstddef>
34
33
#include <cstdbool>
34
+ #include <cstring>
35
+ #include <stdlib.h>
36
+ #include <new>
37
+ #include <type_traits>
35
38
#else
36
39
#include <stdint.h>
37
40
#include <stddef.h>
38
41
#include <stdbool.h>
42
+ #include <string.h>
43
+ #endif
44
+ #if defined(__cplusplus)
45
+ #if __has_include(<ptrauth.h>)
46
+ # include <ptrauth.h>
47
+ #else
48
+ # ifndef __ptrauth_swift_value_witness_function_pointer
49
+ # define __ptrauth_swift_value_witness_function_pointer(x)
50
+ # endif
51
+ #endif
39
52
#endif
40
53
41
54
#if !defined(SWIFT_TYPEDEFS)
@@ -71,53 +84,66 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
71
84
# if __has_feature(objc_class_property)
72
85
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
73
86
# else
74
- # define SWIFT_CLASS_PROPERTY(...)
87
+ # define SWIFT_CLASS_PROPERTY(...)
75
88
# endif
76
89
#endif
77
-
78
- #if __has_attribute(objc_runtime_name)
79
- # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
80
- #else
81
- # define SWIFT_RUNTIME_NAME(X)
90
+ #if !defined(SWIFT_RUNTIME_NAME)
91
+ # if __has_attribute(objc_runtime_name)
92
+ # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
93
+ # else
94
+ # define SWIFT_RUNTIME_NAME(X)
95
+ # endif
82
96
#endif
83
- #if __has_attribute(swift_name)
84
- # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
85
- #else
86
- # define SWIFT_COMPILE_NAME(X)
97
+ #if !defined(SWIFT_COMPILE_NAME)
98
+ # if __has_attribute(swift_name)
99
+ # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
100
+ # else
101
+ # define SWIFT_COMPILE_NAME(X)
102
+ # endif
87
103
#endif
88
- #if __has_attribute(objc_method_family)
89
- # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
90
- #else
91
- # define SWIFT_METHOD_FAMILY(X)
104
+ #if !defined(SWIFT_METHOD_FAMILY)
105
+ # if __has_attribute(objc_method_family)
106
+ # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
107
+ # else
108
+ # define SWIFT_METHOD_FAMILY(X)
109
+ # endif
92
110
#endif
93
- #if __has_attribute(noescape)
94
- # define SWIFT_NOESCAPE __attribute__((noescape))
95
- #else
96
- # define SWIFT_NOESCAPE
111
+ #if !defined(SWIFT_NOESCAPE)
112
+ # if __has_attribute(noescape)
113
+ # define SWIFT_NOESCAPE __attribute__((noescape))
114
+ # else
115
+ # define SWIFT_NOESCAPE
116
+ # endif
97
117
#endif
98
- #if __has_attribute(ns_consumed)
99
- # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
100
- #else
101
- # define SWIFT_RELEASES_ARGUMENT
118
+ #if !defined(SWIFT_RELEASES_ARGUMENT)
119
+ # if __has_attribute(ns_consumed)
120
+ # define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
121
+ # else
122
+ # define SWIFT_RELEASES_ARGUMENT
123
+ # endif
102
124
#endif
103
- #if __has_attribute(warn_unused_result)
104
- # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
105
- #else
106
- # define SWIFT_WARN_UNUSED_RESULT
125
+ #if !defined(SWIFT_WARN_UNUSED_RESULT)
126
+ # if __has_attribute(warn_unused_result)
127
+ # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
128
+ # else
129
+ # define SWIFT_WARN_UNUSED_RESULT
130
+ # endif
107
131
#endif
108
- #if __has_attribute(noreturn)
109
- # define SWIFT_NORETURN __attribute__((noreturn))
110
- #else
111
- # define SWIFT_NORETURN
132
+ #if !defined(SWIFT_NORETURN)
133
+ # if __has_attribute(noreturn)
134
+ # define SWIFT_NORETURN __attribute__((noreturn))
135
+ # else
136
+ # define SWIFT_NORETURN
137
+ # endif
112
138
#endif
113
139
#if !defined(SWIFT_CLASS_EXTRA)
114
- # define SWIFT_CLASS_EXTRA
140
+ # define SWIFT_CLASS_EXTRA
115
141
#endif
116
142
#if !defined(SWIFT_PROTOCOL_EXTRA)
117
- # define SWIFT_PROTOCOL_EXTRA
143
+ # define SWIFT_PROTOCOL_EXTRA
118
144
#endif
119
145
#if !defined(SWIFT_ENUM_EXTRA)
120
- # define SWIFT_ENUM_EXTRA
146
+ # define SWIFT_ENUM_EXTRA
121
147
#endif
122
148
#if !defined(SWIFT_CLASS)
123
149
# if __has_attribute(objc_subclassing_restricted)
@@ -137,28 +163,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
137
163
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
138
164
# endif
139
165
#endif
140
-
141
166
#if !defined(SWIFT_PROTOCOL)
142
167
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
143
168
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
144
169
#endif
145
-
146
170
#if !defined(SWIFT_EXTENSION)
147
171
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
148
172
#endif
149
-
150
173
#if !defined(OBJC_DESIGNATED_INITIALIZER)
151
174
# if __has_attribute(objc_designated_initializer)
152
175
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
153
176
# else
154
- # define OBJC_DESIGNATED_INITIALIZER
177
+ # define OBJC_DESIGNATED_INITIALIZER
155
178
# endif
156
179
#endif
157
180
#if !defined(SWIFT_ENUM_ATTR)
158
- # if defined(__has_attribute) && __has_attribute(enum_extensibility)
181
+ # if __has_attribute(enum_extensibility)
159
182
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
160
183
# else
161
- # define SWIFT_ENUM_ATTR(_extensibility)
184
+ # define SWIFT_ENUM_ATTR(_extensibility)
162
185
# endif
163
186
#endif
164
187
#if !defined(SWIFT_ENUM)
@@ -187,14 +210,16 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
187
210
#if !defined(SWIFT_DEPRECATED_MSG)
188
211
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
189
212
#endif
190
- #if __has_feature(attribute_diagnose_if_objc)
191
- # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
192
- #else
193
- # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
213
+ #if !defined(SWIFT_DEPRECATED_OBJC)
214
+ # if __has_feature(attribute_diagnose_if_objc)
215
+ # define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
216
+ # else
217
+ # define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
218
+ # endif
194
219
#endif
195
220
#if defined(__OBJC__)
196
221
#if !defined(IBSegueAction)
197
- # define IBSegueAction
222
+ # define IBSegueAction
198
223
#endif
199
224
#endif
200
225
#if !defined(SWIFT_EXTERN)
@@ -207,26 +232,31 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
207
232
#if !defined(SWIFT_CALL)
208
233
# define SWIFT_CALL __attribute__((swiftcall))
209
234
#endif
235
+ #if !defined(SWIFT_INDIRECT_RESULT)
236
+ # define SWIFT_INDIRECT_RESULT __attribute__((swift_indirect_result))
237
+ #endif
238
+ #if !defined(SWIFT_CONTEXT)
239
+ # define SWIFT_CONTEXT __attribute__((swift_context))
240
+ #endif
241
+ #if !defined(SWIFT_ERROR_RESULT)
242
+ # define SWIFT_ERROR_RESULT __attribute__((swift_error_result))
243
+ #endif
210
244
#if defined(__cplusplus)
211
- #if !defined(SWIFT_NOEXCEPT)
212
245
# define SWIFT_NOEXCEPT noexcept
213
- #endif
214
246
#else
215
- #if !defined(SWIFT_NOEXCEPT)
216
247
# define SWIFT_NOEXCEPT
217
248
#endif
249
+ #if defined(_WIN32)
250
+ #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
251
+ # define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
218
252
#endif
219
- #if defined(__cplusplus)
220
- #if !defined(SWIFT_CXX_INT_DEFINED)
221
- #define SWIFT_CXX_INT_DEFINED
222
- namespace swift {
223
- using Int = ptrdiff_t;
224
- using UInt = size_t;
225
- }
253
+ #else
254
+ #if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
255
+ # define SWIFT_IMPORT_STDLIB_SYMBOL
226
256
#endif
227
257
#endif
228
258
#if defined(__OBJC__)
229
- #if __has_feature(modules )
259
+ #if __has_feature(objc_modules )
230
260
#if __has_warning("-Watimport-in-framework-header")
231
261
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
232
262
#endif
@@ -309,7 +339,7 @@ using UInt = size_t;
309
339
/// QuickPoseOverlayView(overlayImage: $overlayImage)
310
340
/// }
311
341
/// .onAppear {
312
- /// quickPose.start(features: [.overlay(.userLeftArm )], onFrame: { status, image, features, feedback, landmarks in
342
+ /// quickPose.start(features: [.overlay(.arm(side: .left) )], onFrame: { status, image, features, feedback, landmarks in
313
343
/// overlayImage = image
314
344
/// })
315
345
/// }
@@ -325,13 +355,13 @@ using UInt = size_t;
325
355
/// Applying AI to camera feed is memory intensive and requires releasing for production use.
326
356
/// The <code>start(features:onStart:onFrame:)</code> accepts a <code>Feature</code> array, and two closures one to asynchronously return when the camera has started, and second for each processed frame. Here only the onFrame image is read and applied the the view’s state, which triggers a SwiftUI refresh of the <code>QuickPoseOverlayView</code>.
327
357
/// \code
328
- /// quickPose.start(features: [.overlay(.userLeftArm )], onFrame: { _, image, _, _, _ in
358
+ /// quickPose.start(features: [.overlay(.arm(side: .left) )], onFrame: { _, image, _, _, _ in
329
359
/// overlayImage = image
330
360
/// })
331
361
///
332
362
/// \endcodeFor a more advanced example we can reference the <code>Status</code> state to log if the user is found and current performance via the returned frames-per-second.
333
363
/// \code
334
- /// quickPose.start(features: [.overlay(.userLeftArm )], onFrame: { status, image, _, _, _ in
364
+ /// quickPose.start(features: [.overlay(.arm(side: .left) )], onFrame: { status, image, _, _, _ in
335
365
/// if case let .success(fps) = status {
336
366
/// print("fps: \(fps)")
337
367
/// overlayImage = image
@@ -349,6 +379,7 @@ using UInt = size_t;
349
379
/// quickPose.start(features: [selectedFeature], onStart: {
350
380
/// withAnimation { cameraViewOpacity = 1.0 } // unhide the camera when loaded
351
381
/// }, onFrame: { status, image, features, _, _ in
382
+ /// overlayImage = image
352
383
/// if case let .success(fps) = status {
353
384
/// if case let .reading(_, displayString) = features[selectedFeature] {
354
385
/// lastResult = displayString
@@ -358,7 +389,6 @@ using UInt = size_t;
358
389
/// } else if captureButtonOpacity == 1 {
359
390
/// withAnimation { captureButtonOpacity = 0 }
360
391
/// }
361
- /// overlayImage = image
362
392
/// }
363
393
/// })
364
394
///
@@ -368,14 +398,14 @@ using UInt = size_t;
368
398
/// \endcodeFor an example with changed formatting such as font size, color and line width we can specify a <code>Style</code> class
369
399
/// \code
370
400
/// let smallerStyle = QuickPose.Style(relativeLineWidth: 0.33)
371
- /// quickPose.start(features: [.overlay(.userLeftArm , style: smallerStyle)], onFrame: { status, image, _, _, _ in
401
+ /// quickPose.start(features: [.overlay(.arm(side: .left) , style: smallerStyle)], onFrame: { status, image, _, _, _ in
372
402
/// ....
373
403
/// })
374
404
///
375
405
/// \endcodeAnd for conditional formatting when the angle goes above 120 degrees use:
376
406
/// \code
377
407
/// let conditionalStyle = QuickPose.Style(conditionalColors: [QuickPose.Style.ConditionalColor(min: 120, max: nil, color: UIColor.red)])
378
- /// quickPose.start(features: [.overlay(.userLeftArm , style: conditionalStyle)], onFrame: { status, image, _, _, _ in
408
+ /// quickPose.start(features: [.overlay(.arm(side: .left) , style: conditionalStyle)], onFrame: { status, image, _, _, _ in
379
409
/// ....
380
410
/// })
381
411
///
0 commit comments