peachsim 0.1.1684 → 0.1.1692

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/cli/commands/coverage-swift.ts +72 -5
  2. package/cli/commands/inspect/actions.ts +1 -0
  3. package/cli/commands/screenshot.ts +12 -0
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +2252 -1462
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +1 -1
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +1762 -995
  30. package/dist-lib/expo-swift-metadata.cjs +1 -1
  31. package/dist-lib/expo-swift-metadata.mjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +2184 -1417
  34. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +175 -69
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +174 -68
  50. package/dist-lib/native-app-identity-project.cjs +163 -51
  51. package/dist-lib/native-app-identity-project.mjs +206 -82
  52. package/dist-lib/native-app-identity.cjs +1 -1
  53. package/dist-lib/native-app-identity.mjs +1 -1
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +26 -23
  61. package/dist-lib/public-origins-lib.json +74 -61
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +2 -2
  67. package/dist-lib/sdk.mjs +2 -2
  68. package/dist-lib/skills.cjs +2633 -1840
  69. package/dist-lib/swift-compile.cjs +2478 -100
  70. package/dist-lib/swift-compile.mjs +2475 -100
  71. package/dist-lib/swift-package.cjs +108 -50
  72. package/dist-lib/swift-package.mjs +104 -50
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +3979 -985
  78. package/dist-lib/vite.cjs +12 -18
  79. package/dist-lib/worklet-executable.cjs +7 -4
  80. package/dist-lib/worklet-executable.mjs +7 -4
  81. package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +15 -1
  82. package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +6 -0
  83. package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
  84. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
  85. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  86. package/package.json +1 -1
  87. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +9 -0
  88. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
  89. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
  90. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
  91. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
  92. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
  93. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
  94. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
  95. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
  96. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
  97. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
  98. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
  99. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
  100. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
  101. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
  102. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
  103. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
  104. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
  105. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
  106. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
  107. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
  108. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
  109. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
  110. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
  111. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
  112. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
  113. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
  114. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
  115. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
  116. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
  117. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
  118. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +96 -2
  119. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
  120. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
  121. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
  122. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
  123. package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
  124. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
  125. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
  126. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
  127. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
  128. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
  129. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
  130. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
  131. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
  132. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
  133. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
  134. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
  135. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
  136. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
  137. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
  138. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
  139. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
  140. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
  141. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
  142. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
  143. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
  144. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
  145. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
  146. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
  147. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
  148. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
  149. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
  150. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
  151. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
  152. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
  153. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
  154. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
  155. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
  156. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
  157. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
  158. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
  159. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
  160. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
  161. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
  162. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
  163. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
  164. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
  165. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
  166. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
  167. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
  168. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
  169. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
  170. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
  171. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
  172. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
  173. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
  174. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
  175. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
  176. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
  177. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
  178. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
  179. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
  180. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
  181. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
  182. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
  183. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
  184. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
  185. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
  186. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
  187. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
  188. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
  189. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
  190. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
  191. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
  192. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
  193. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
  194. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
  195. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
  196. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
  197. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
  198. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
  199. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
  200. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
  201. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
  202. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
  203. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
  204. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
  205. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
  206. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
  207. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
  208. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
  209. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
  210. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
  211. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
  212. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
  213. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
  214. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
  215. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
  216. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
  217. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
  218. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
  219. package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
  220. package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
  221. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
  222. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
  223. package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
  224. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
  225. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
  226. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
  227. package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
  228. package/sdk/ios/usr/include/complex.h +167 -0
  229. package/sdk/ios/usr/include/dispatch/dispatch.h +5 -0
  230. package/sdk/ios/usr/include/mach/mach_types.h +1 -0
  231. package/sdk/ios/usr/include/math.h +835 -2
  232. package/sdk/ios/usr/include/sys/cdefs.h +0 -1
  233. package/src/generated/swift-c-predefines.json +1988 -0
  234. package/src/nitro-bundle.ts +1 -0
  235. package/src/nitro-compile.ts +4 -0
  236. package/src/nitroContract.ts +18 -2
  237. package/src/swift-compile.ts +446 -49
  238. package/src/swift-coverage/package.ts +3 -1
  239. package/src/swift-coverage/xcode-assets.ts +62 -2
  240. package/src/swift-coverage/xcode-packages.ts +11 -6
  241. package/src/swift-host.ts +333 -57
  242. package/src/swift-objc-compile.ts +20 -5
  243. package/src/swift-objc-standin.ts +21 -11
  244. package/src/swift-package-manifest.ts +151 -28
  245. package/src/swift-package.ts +134 -58
  246. package/src/swift-packages.ts +141 -44
  247. package/src/swift-source-file.ts +10 -15
  248. package/src/swift-standins.ts +87 -13
  249. package/src/swift-submit.ts +5 -0
  250. package/src/swiftContract.ts +160 -75
  251. package/src/target-matcher.ts +15 -2
  252. package/src/worklet-executable.ts +7 -3
  253. package/src/xcode-json-project.ts +14 -2
  254. package/src/xcode-project.ts +154 -59
@@ -0,0 +1,474 @@
1
+ /*
2
+ * IOSurfaceRef.h
3
+ * IOSurface
4
+ *
5
+ * Copyright 2006-2017 Apple Inc. All rights reserved.
6
+ *
7
+ */
8
+
9
+ #ifndef IOSURFACE_REF_H
10
+ #define IOSURFACE_REF_H 1
11
+
12
+ #include <IOSurface/IOSurfaceBase.h>
13
+ #include <IOSurface/IOSurfaceTypes.h>
14
+
15
+ typedef struct CF_BRIDGED_TYPE(id) CF_BRIDGED_MUTABLE_TYPE(IOSurface) __IOSurface *IOSurfaceRef IOSFC_SWIFT_NAME(IOSurfaceRef);
16
+
17
+ __BEGIN_DECLS
18
+
19
+ CF_IMPLICIT_BRIDGING_ENABLED
20
+ CF_ASSUME_NONNULL_BEGIN
21
+
22
+ /* The following list of properties are used with the CFDictionary passed to IOSurfaceCreate(). */
23
+
24
+ /* kIOSurfaceAllocSize - CFNumber of the total allocation size of the buffer including all planes.
25
+ Defaults to BufferHeight * BytesPerRow if not specified. Must be specified for
26
+ dimensionless buffers. */
27
+ extern const CFStringRef kIOSurfaceAllocSize API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
28
+
29
+ /* kIOSurfaceWidth - CFNumber for the width of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
30
+ extern const CFStringRef kIOSurfaceWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
31
+
32
+ /* kIOSurfaceHeight - CFNumber for the height of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
33
+ extern const CFStringRef kIOSurfaceHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
34
+
35
+ /* kIOSurfaceBytesPerRow - CFNumber for the bytes per row of the buffer. If not specified, IOSurface will first calculate
36
+ the number full elements required on each row (by rounding up), multiplied by the bytes per element
37
+ for this buffer. That value will then be appropriately aligned. */
38
+ extern const CFStringRef kIOSurfaceBytesPerRow API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
39
+
40
+ /* Optional properties for non-planar two dimensional images */
41
+
42
+ /* kIOSurfaceBytesPerElement - CFNumber for the total number of bytes in an element. Default to 1. */
43
+ extern const CFStringRef kIOSurfaceBytesPerElement API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
44
+
45
+ /* kIOSurfaceElementWidth - CFNumber for how many pixels wide each element is. Defaults to 1. */
46
+ extern const CFStringRef kIOSurfaceElementWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
47
+
48
+ /* kIOSurfaceElementHeight - CFNumber for how many pixels high each element is. Defaults to 1. */
49
+ extern const CFStringRef kIOSurfaceElementHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
50
+
51
+ /* kIOSurfaceOffset - CFNumber for the starting offset into the buffer. Defaults to 0. */
52
+ extern const CFStringRef kIOSurfaceOffset API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
53
+
54
+ /* Properties for planar surface buffers */
55
+
56
+ /* kIOSurfacePlaneInfo - CFArray describing each image plane in the buffer as a CFDictionary. The CFArray must have at least one entry. */
57
+ extern const CFStringRef kIOSurfacePlaneInfo API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
58
+
59
+ /* kIOSurfacePlaneWidth - CFNumber for the width of this plane in pixels. Required for image planes. */
60
+ extern const CFStringRef kIOSurfacePlaneWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
61
+
62
+ /* kIOSurfacePlaneHeight - CFNumber for the height of this plane in pixels. Required for image planes. */
63
+ extern const CFStringRef kIOSurfacePlaneHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
64
+
65
+ /* kIOSurfacePlaneBytesPerRow - CFNumber for the bytes per row of this plane. If not specified, IOSurface will first calculate
66
+ the number full elements required on each row (by rounding up), multiplied by the bytes per element
67
+ for this plane. That value will then be appropriately aligned. */
68
+ extern const CFStringRef kIOSurfacePlaneBytesPerRow API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
69
+
70
+ /* kIOSurfacePlaneOffset - CFNumber for the offset into the buffer for this plane. If not specified then IOSurface
71
+ will lay out each plane sequentially based on the previous plane's allocation size. */
72
+ extern const CFStringRef kIOSurfacePlaneOffset API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
73
+
74
+ /* kIOSurfacePlaneSize - CFNumber for the total data size of this plane. Defaults to plane height * plane bytes per row if not specified. */
75
+ extern const CFStringRef kIOSurfacePlaneSize API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
76
+
77
+ /* Optional properties for planar surface buffers */
78
+
79
+ /* kIOSurfacePlaneBase - CFNumber for the base offset into the buffer for this plane. Optional, defaults to the plane offset */
80
+ extern const CFStringRef kIOSurfacePlaneBase API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
81
+
82
+ /* kIOSurfacePlaneBitsPerElement - CFNumber for the bits per element of this plane. Optional, default is 1.
83
+ For use in cases where kIOSurfacePlaneBytesPerElement doesn't allow sufficient precision. */
84
+ extern const CFStringRef kIOSurfacePlaneBitsPerElement API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
85
+
86
+ /* kIOSurfacePlaneBytesPerElement - CFNumber for the bytes per element of this plane. Optional, default is 1. */
87
+ extern const CFStringRef kIOSurfacePlaneBytesPerElement API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
88
+
89
+ /* kIOSurfacePlaneElementWidth - CFNumber for the element width of this plane. Optional, default is 1. */
90
+ extern const CFStringRef kIOSurfacePlaneElementWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
91
+
92
+ /* kIOSurfacePlaneElementHeight - CFNumber for the element height of this plane. Optional, default is 1. */
93
+ extern const CFStringRef kIOSurfacePlaneElementHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
94
+
95
+ /* Optional properties global to the entire IOSurface */
96
+
97
+ /* kIOSurfaceCacheMode - CFNumber for the CPU cache mode to be used for the allocation. Default is kIOMapDefaultCache. */
98
+ extern const CFStringRef kIOSurfaceCacheMode API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
99
+
100
+ /* kIOSurfaceIsGlobal - CFBoolean If true, the IOSurface may be looked up by any task in the system by its ID. */
101
+ extern const CFStringRef kIOSurfaceIsGlobal API_DEPRECATED("Global surfaces are insecure",macos(10.6,10.11), ios(11.0,11.0), watchos(4.0,4.0), tvos(11.0,11.0));
102
+
103
+ /* kIOSurfacePixelFormat - CFNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format */
104
+ extern const CFStringRef kIOSurfacePixelFormat API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
105
+
106
+ /* kIOSurfacePixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU. Default is true. */
107
+ extern const CFStringRef kIOSurfacePixelSizeCastingAllowed API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
108
+
109
+ /* kIOSurfacePlaneComponentBitDepths - CFArray[CFNumber] for bit depth of each component in this plane. */
110
+ extern const CFStringRef kIOSurfacePlaneComponentBitDepths API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
111
+
112
+ /* kIOSurfacePlaneComponentBitOffsets - CFArray[CFNumber] for bit offset of each component in this plane, (low bit zero, high bit 7). For example 'BGRA' would be {0, 8, 16, 24} */
113
+ extern const CFStringRef kIOSurfacePlaneComponentBitOffsets API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
114
+
115
+ // This key may be used to specify a name for the IOSurface either at creation time, or may be used with IOSurfaceSetValue() to
116
+ // set it dynamically. If not provided, the name will be set based on the binary containing the address calling into IOSurface.framework
117
+ // to create it.
118
+ extern const CFStringRef kIOSurfaceName API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
119
+
120
+ typedef CF_ENUM(int32_t, IOSurfaceComponentName) {
121
+ kIOSurfaceComponentNameUnknown = 0,
122
+ kIOSurfaceComponentNameAlpha = 1,
123
+ kIOSurfaceComponentNameRed = 2,
124
+ kIOSurfaceComponentNameGreen = 3,
125
+ kIOSurfaceComponentNameBlue = 4,
126
+ kIOSurfaceComponentNameLuma = 5,
127
+ kIOSurfaceComponentNameChromaRed = 6,
128
+ kIOSurfaceComponentNameChromaBlue = 7,
129
+ } IOSFC_SWIFT_SENDABLE;
130
+
131
+ /* kIOSurfacePlaneComponentNames - CFArray[CFNumber] for IOSurfaceComponentName of each component in this plane.
132
+ For example 'BGRA' would be {4, 3, 2, 1} */
133
+ extern const CFStringRef kIOSurfacePlaneComponentNames API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
134
+
135
+ typedef CF_ENUM(int32_t, IOSurfaceComponentType) {
136
+ kIOSurfaceComponentTypeUnknown = 0,
137
+ kIOSurfaceComponentTypeUnsignedInteger = 1,
138
+ kIOSurfaceComponentTypeSignedInteger = 2,
139
+ kIOSurfaceComponentTypeFloat = 3,
140
+ kIOSurfaceComponentTypeSignedNormalized = 4,
141
+ } IOSFC_SWIFT_SENDABLE;
142
+
143
+ /* kIOSurfacePlaneComponentTypes - CFArray[CFNumber] for IOSurfaceComponentType of each component in this plane. */
144
+ extern const CFStringRef kIOSurfacePlaneComponentTypes API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
145
+
146
+ typedef CF_ENUM(int32_t, IOSurfaceComponentRange) {
147
+ kIOSurfaceComponentRangeUnknown = 0,
148
+ kIOSurfaceComponentRangeFullRange = 1,
149
+ kIOSurfaceComponentRangeVideoRange = 2,
150
+ kIOSurfaceComponentRangeWideRange = 3,
151
+ } IOSFC_SWIFT_SENDABLE;
152
+
153
+ /* kIOSurfacePlaneComponentRanges - CFArray[CFNumber] for IOSurfaceComponentRange of each component in this plane. */
154
+ extern const CFStringRef kIOSurfacePlaneComponentRanges API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
155
+
156
+ typedef CF_ENUM(int32_t, IOSurfaceSubsampling) {
157
+ kIOSurfaceSubsamplingUnknown = 0,
158
+ kIOSurfaceSubsamplingNone = 1, // Includes "4:4:4"
159
+ kIOSurfaceSubsampling422 = 2, // Chroma downsampled by 2x1
160
+ kIOSurfaceSubsampling420 = 3, // Chroma downsampled by 2x2
161
+ kIOSurfaceSubsampling411 = 4, // Chroma downsampled by 4x1
162
+ } IOSFC_SWIFT_SENDABLE;
163
+
164
+ /* kIOSurfaceSubsampling - CFNumber(IOSurfaceSubsampling) describing the chroma subsampling. */
165
+ extern const CFStringRef kIOSurfaceSubsampling API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
166
+
167
+ CFTypeID IOSurfaceGetTypeID(void)
168
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
169
+
170
+ /* Create a brand new IOSurface object */
171
+ IOSurfaceRef _Nullable IOSurfaceCreate(CFDictionaryRef properties)
172
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
173
+
174
+ /* Perform an atomic lookup and retain of a IOSurface by its IOSurfaceID.
175
+ Note: Performing multiple lookups of the same IOSurface will *NOT* return
176
+ the same IOSurfaceRef. If you need to compare two IOSurface objects
177
+ for equality, you must either do so by comparing their IOSurfaceIDs, or by
178
+ using CFEqual(). */
179
+ IOSurfaceRef _Nullable IOSurfaceLookup(IOSurfaceID csid) CF_RETURNS_RETAINED
180
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
181
+
182
+ /* Retrieve the unique IOSurfaceID value for a IOSurface */
183
+ IOSurfaceID IOSurfaceGetID(IOSurfaceRef buffer)
184
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
185
+
186
+ /* "Lock" or "Unlock" a IOSurface for reading or writing.
187
+
188
+ The term "lock" is used loosely in this context, and is simply used along with the
189
+ "unlock" information to put a bound on CPU access to the raw IOSurface data.
190
+
191
+ If the seed parameter is non-NULL, IOSurfaceLock() will store the buffer's
192
+ internal modification seed value at the time you made the lock call. You can compare
193
+ this value to a value returned previously to determine of the contents of the buffer
194
+ has been changed since the last lock.
195
+
196
+ In the case of IOSurfaceUnlock(), the seed value returned will be the internal
197
+ seed value at the time of the unlock. If you locked the buffer for writing, this value
198
+ will be incremented as the unlock is performed and the new value will be returned.
199
+
200
+ See the kIOSurfaceLock enums for more information.
201
+
202
+ Note: Locking and unlocking a IOSurface is not a particularly cheap operation,
203
+ so care should be taken to avoid the calls whenever possible. The seed values are
204
+ particularly useful for keeping a cache of the buffer contents.
205
+ */
206
+ kern_return_t IOSurfaceLock(IOSurfaceRef buffer, IOSurfaceLockOptions options, uint32_t * _Nullable seed)
207
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
208
+ kern_return_t IOSurfaceUnlock(IOSurfaceRef buffer, IOSurfaceLockOptions options, uint32_t * _Nullable seed)
209
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
210
+
211
+ /* These routines are all fairly self explanatory. 0 is returned if buffer is invalid or NULL */
212
+ size_t IOSurfaceGetAllocSize(IOSurfaceRef buffer)
213
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
214
+
215
+ size_t IOSurfaceGetWidth(IOSurfaceRef buffer)
216
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
217
+
218
+ size_t IOSurfaceGetHeight(IOSurfaceRef buffer)
219
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
220
+
221
+ size_t IOSurfaceGetBytesPerElement(IOSurfaceRef buffer)
222
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
223
+
224
+ size_t IOSurfaceGetBytesPerRow(IOSurfaceRef buffer)
225
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
226
+
227
+ void *IOSurfaceGetBaseAddress(IOSurfaceRef buffer)
228
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
229
+
230
+ size_t IOSurfaceGetElementWidth(IOSurfaceRef buffer)
231
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
232
+
233
+ size_t IOSurfaceGetElementHeight(IOSurfaceRef buffer)
234
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
235
+
236
+ OSType IOSurfaceGetPixelFormat(IOSurfaceRef buffer)
237
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
238
+
239
+ /* This will return the current seed value of the buffer and is a cheap call to make to see
240
+ if the contents of the buffer have changed since the last lock/unlock. */
241
+ uint32_t IOSurfaceGetSeed(IOSurfaceRef buffer)
242
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
243
+
244
+ /* Return the number of planes in this buffer. May be 0. Returns 0 for an invalid or NULL buffer pointer. */
245
+ size_t IOSurfaceGetPlaneCount(IOSurfaceRef buffer)
246
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
247
+
248
+ /* These routines return information about a particular plane of a IOSurface.
249
+
250
+ If the planeIndex is greater than or equal to the plane count of the IOSurface, zero
251
+ is returned.... with one exception. If this IOSurface has zero planes and a planeIndex
252
+ of zero is passed in, the routines function just like the non-planar APIs. This is to allow
253
+ higher level code to treat planar and non-planar buffers is a more uniform fashion. */
254
+
255
+ size_t IOSurfaceGetWidthOfPlane(IOSurfaceRef buffer, size_t planeIndex)
256
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
257
+
258
+ size_t IOSurfaceGetHeightOfPlane(IOSurfaceRef buffer, size_t planeIndex)
259
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
260
+
261
+ size_t IOSurfaceGetBytesPerElementOfPlane(IOSurfaceRef buffer, size_t planeIndex)
262
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
263
+
264
+ size_t IOSurfaceGetBytesPerRowOfPlane(IOSurfaceRef buffer, size_t planeIndex)
265
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
266
+
267
+ void *IOSurfaceGetBaseAddressOfPlane(IOSurfaceRef buffer, size_t planeIndex)
268
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
269
+
270
+ size_t IOSurfaceGetElementWidthOfPlane(IOSurfaceRef buffer, size_t planeIndex)
271
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
272
+
273
+ size_t IOSurfaceGetElementHeightOfPlane(IOSurfaceRef buffer, size_t planeIndex)
274
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
275
+
276
+ /* These routines return information about a particular component of a particular plane of a IOSurface.
277
+ For non-planar IOSurfaces, pass zero for planeIndex. */
278
+
279
+ size_t IOSurfaceGetNumberOfComponentsOfPlane(IOSurfaceRef buffer, size_t planeIndex)
280
+ API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
281
+
282
+ IOSurfaceComponentName IOSurfaceGetNameOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
283
+ API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
284
+
285
+ IOSurfaceComponentType IOSurfaceGetTypeOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
286
+ API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
287
+
288
+ IOSurfaceComponentRange IOSurfaceGetRangeOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
289
+ API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
290
+
291
+ size_t IOSurfaceGetBitDepthOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
292
+ API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
293
+
294
+ size_t IOSurfaceGetBitOffsetOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
295
+ API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
296
+
297
+ IOSurfaceSubsampling IOSurfaceGetSubsampling(IOSurfaceRef buffer)
298
+ API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
299
+
300
+ /* Common IOSurface keys for well-known IOSurface Values */
301
+
302
+ /* kIOSurfaceColorSpace defines the RGB (or other) color space for the data stored in the IOSurface. It
303
+ is expected that this is a serialized CGColorSpaceRef, provided by the CoreGraphics CGColorSpaceRef
304
+ serialization APIs (CGColorSpaceCopyPropertyList). */
305
+ extern const CFStringRef kIOSurfaceColorSpace API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
306
+
307
+ /* CFData representation of the ICC Profile, generally via CGColorSpaceCopyICCData */
308
+ extern const CFStringRef kIOSurfaceICCProfile API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
309
+
310
+ /* CFNumber representation of the content headroom, which is defined as the ratio of nominal peak luminance
311
+ ("peak white") to nominal diffuse luminance ("reference white" or "diffuse white"). */
312
+ extern const CFStringRef kIOSurfaceContentHeadroom API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0));
313
+
314
+ /* These calls let you attach CF property list types to a IOSurface buffer. These calls are
315
+ expensive (they essentially must serialize the data into the kernel) and thus should be avoided whenever
316
+ possible. Note: These functions can not be used to change the underlying surface properties. */
317
+ void IOSurfaceSetValue(IOSurfaceRef buffer, CFStringRef key, CFTypeRef value)
318
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
319
+
320
+ CFTypeRef _Nullable IOSurfaceCopyValue(IOSurfaceRef buffer, CFStringRef key)
321
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
322
+
323
+ void IOSurfaceRemoveValue(IOSurfaceRef buffer, CFStringRef key)
324
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
325
+
326
+ /* Bulk setters and getters for setting, retrieving or removing the entire
327
+ set of values at once .*/
328
+ void IOSurfaceSetValues(IOSurfaceRef buffer, CFDictionaryRef keysAndValues)
329
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
330
+
331
+ CFDictionaryRef _Nullable IOSurfaceCopyAllValues(IOSurfaceRef buffer)
332
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
333
+
334
+ void IOSurfaceRemoveAllValues(IOSurfaceRef buffer)
335
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
336
+
337
+ /* This call lets you get a mach_port_t that holds a reference to the IOSurface. This is useful
338
+ if you need to atomically or securely pass an IOSurface to another task without making the surface global to
339
+ the entire system. The returned port must be deallocated with mach_port_deallocate or the equivalent.
340
+ Note: Any live mach ports created from an IOSurfaceRef implicity increase the IOSurface's global use
341
+ count by one until the port is deleted. */
342
+ mach_port_t IOSurfaceCreateMachPort(IOSurfaceRef buffer)
343
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
344
+
345
+ /* This call lets you take a mach_port_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it.
346
+ Note: This call does NOT destroy the port. */
347
+ IOSurfaceRef _Nullable IOSurfaceLookupFromMachPort(mach_port_t port) CF_RETURNS_RETAINED
348
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
349
+
350
+ /*
351
+ IOSurfaceGetPropertyMaximum() will return the maximum of a given property that is guaranteed to be
352
+ compatible with all of the current devices (GPUs, etc.) in the system. The most important ones being:
353
+
354
+ kIOSurfaceBytesPerRow
355
+ kIOSurfaceWidth
356
+ kIOSurfaceHeight
357
+ kIOSurfacePlaneBytesPerRow
358
+ kIOSurfacePlaneWidth
359
+ kIOSurfacePlaneHeight
360
+
361
+ For the width and height properties, the maximum values are the largest that are guaranteed to work
362
+ for both reading and writing. In OpenGL terms this translates into the largest size that will work
363
+ for both textures and render targets.
364
+
365
+ This function returns 0 for properties that have no predefined limit or where the concept of a limit
366
+ would be considered invalid (such as kIOSurfacePixelFormat).
367
+
368
+ */
369
+ size_t IOSurfaceGetPropertyMaximum(CFStringRef property)
370
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
371
+
372
+ /*
373
+ If a property has a particular alignment requirement, then IOSurfaceGetPropertyAlignment() will return it.
374
+ If the property has no alignment requirement then 1 will be returned. The following properties
375
+ should always be aligned if you choose calculate them yourself:
376
+
377
+ kIOSurfaceBytesPerRow
378
+ kIOSurfaceOffset
379
+
380
+ kIOSurfacePlaneBase
381
+ kIOSurfacePlaneOffset
382
+ kIOSurfacePlaneBytesPerRow
383
+
384
+ */
385
+ size_t IOSurfaceGetPropertyAlignment(CFStringRef property)
386
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
387
+
388
+ /* This is a convenience function to automatically align property values. For properties with no alignment
389
+ requirements, the original value will be returned. */
390
+ size_t IOSurfaceAlignProperty(CFStringRef property, size_t value)
391
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
392
+
393
+
394
+ /* There are cases where it is useful to know whether or not an IOSurface buffer is considered to be "in use"
395
+ by other users of the same IOSurface. In particular, CoreVideo and other APIs make use of the IOSurface
396
+ use count facility to know when it is safe to recycle an IOSurface backed CVPixelBuffer object. This is
397
+ particularly important when IOSurface objects are being shared across process boundaries and the normal
398
+ mechanisms one might use would not be viable.
399
+
400
+ The IOSurface use count is similar in concept to any other reference counting scheme. When the global use
401
+ count of an IOSurface goes to zero, it is no longer considered "in use". When it is anything other than
402
+ zero, then the IOSurface is still "in use" by someone and therefore anyone attempting to maintain a pool
403
+ of IOSurfaces to be recycled should not reclaim that IOSurface.
404
+
405
+ Note that IOSurface maintains both a per-process and an internal system wide usage count. In the current
406
+ implementation, when the per-process usage count goes from zero to one, the system wide usage count is
407
+ incremented by one. When the per-process usage count drops back to zero (either via explicit decrement
408
+ calls or the process terminates), the global usage count is decremented by one.
409
+
410
+ IOSurfaceGetUseCount() returns the local per-process usage count for an IOSurface. This call is only
411
+ provided for logging/debugging purposes and should never be used to determine whether an IOSurface is
412
+ considered to be "in use". IOSurfaceIsInUse() is the only call that should be used for that purpose. */
413
+
414
+ /* Increment the per-process usage count for an IOSurface */
415
+ void IOSurfaceIncrementUseCount(IOSurfaceRef buffer)
416
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
417
+
418
+ /* Decrement the per-process usage count for an IOSurface */
419
+ void IOSurfaceDecrementUseCount(IOSurfaceRef buffer)
420
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
421
+
422
+ /* Return the per-process usage count for an IOSurface */
423
+ int32_t IOSurfaceGetUseCount(IOSurfaceRef buffer)
424
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
425
+
426
+ /* Returns true if an IOSurface is in use by any process in the system, otherwise false. */
427
+ Boolean IOSurfaceIsInUse(IOSurfaceRef buffer)
428
+ API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
429
+
430
+ /* Returns true if this IOSurface allows pixel size casting */
431
+ Boolean IOSurfaceAllowsPixelSizeCasting(IOSurfaceRef buffer)
432
+ API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
433
+
434
+ // This acts pretty much exactly like the Mach vm_purgeable object stuff does.
435
+ // Note: Higher level OpenGL and/or Metal based purgeability APIs should not be used for
436
+ // texture objects backed by IOSurfaces since they will essentially be ignored.
437
+
438
+ // You should assume that if you mark an IOSurface as Purgeable/Empty and mark it
439
+ // NonVolatile and it comes back with the old state being Empty that any texture
440
+ // objects bound to the IOSurface now have undefined content in them.
441
+ //
442
+ // If oldState is non-NULL, it will return the previous state of the IOSurface.
443
+ //
444
+ // kIOSurfacePurgeableNonVolatile - The IOSurface was not volatile and the contents are still valid
445
+ // kIOSurfacePurgeableVolatile - The IOSurface was volatile, but the contents were not discarded
446
+ // kIOSurfacePurgeableEmpty - The IOSurface was empty and the contents have been discarded.
447
+ // kIOSurfacePurgeableKeepCurrent - Don't change the current status, just return what the state is now.
448
+ kern_return_t IOSurfaceSetPurgeable(IOSurfaceRef buffer, uint32_t newState, uint32_t * __nullable oldState)
449
+ API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
450
+
451
+ // Memory ledger tags.
452
+ typedef CF_ENUM(int, IOSurfaceMemoryLedgerTags) {
453
+ kIOSurfaceMemoryLedgerTagDefault = 0x00000001,
454
+ kIOSurfaceMemoryLedgerTagNetwork = 0x00000002,
455
+ kIOSurfaceMemoryLedgerTagMedia = 0x00000003,
456
+ kIOSurfaceMemoryLedgerTagGraphics = 0x00000004,
457
+ kIOSurfaceMemoryLedgerTagNeural = 0x00000005,
458
+ } IOSFC_SWIFT_SENDABLE;
459
+
460
+ // Memory ledger flags.
461
+ typedef CF_OPTIONS(uint32_t, IOSurfaceMemoryLedgerFlags) {
462
+ kIOSurfaceMemoryLedgerFlagNoFootprint = (1 << 0),
463
+ } IOSFC_SWIFT_SENDABLE;
464
+
465
+
466
+ kern_return_t IOSurfaceSetOwnershipIdentity(IOSurfaceRef buffer, task_id_token_t task_id_token, int newLedgerTag, uint32_t newLedgerOptions) API_AVAILABLE(ios(17.4), watchos(10.4), tvos(17.4), macos(14.4));
467
+
468
+
469
+ __END_DECLS
470
+
471
+ CF_ASSUME_NONNULL_END
472
+ CF_IMPLICIT_BRIDGING_DISABLED
473
+
474
+ #endif
@@ -0,0 +1,66 @@
1
+ /*
2
+ * IOSurfaceTypes.h
3
+ * IOSurface
4
+ *
5
+ * Copyright 2006-2017 Apple Inc. All rights reserved.
6
+ *
7
+ */
8
+
9
+ #ifndef IOSURFACE_TYPES_H
10
+ #define IOSURFACE_TYPES_H
11
+
12
+ #include <IOSurface/IOSurfaceBase.h>
13
+
14
+ typedef uint32_t IOSurfaceID;
15
+
16
+ typedef CF_OPTIONS(uint32_t, IOSurfaceLockOptions)
17
+ {
18
+ // If you are not going to modify the data while you hold the lock, you should set this flag to avoid invalidating
19
+ // any existing caches of the buffer contents. This flag should be passed both to the lock and unlock functions.
20
+ // Non-symmetrical usage of this flag will result in undefined behavior.
21
+ kIOSurfaceLockReadOnly = 0x00000001,
22
+
23
+ // If you want to detect/avoid a potentially expensive paging operation (such as readback from a GPU to system memory)
24
+ // when you lock the buffer, you may include this flag. If locking the buffer requires a readback, the lock will
25
+ // fail with an error return of kIOReturnCannotLock.
26
+ kIOSurfaceLockAvoidSync = 0x00000002,
27
+ } IOSFC_SWIFT_SENDABLE;
28
+
29
+ typedef CF_OPTIONS(uint32_t, IOSurfacePurgeabilityState)
30
+ {
31
+ kIOSurfacePurgeableNonVolatile = 0, // Mark the IOSurface as non-volatile
32
+ kIOSurfacePurgeableVolatile = 1, // Mark the IOSurface as volatile (contents may be thrown away)
33
+ kIOSurfacePurgeableEmpty = 2, // Throw away the contents of the IOSurface immediately
34
+ kIOSurfacePurgeableKeepCurrent = 3, // Keep the current setting (useful for returning current status info)
35
+ } IOSFC_SWIFT_SENDABLE;
36
+
37
+ /*
38
+ ** Note: Write-combined memory is optimized for resources that the CPU writes into, but never reads.
39
+ ** On some implementations, writes may bypass caches, which avoids cache pollution. Read actions may perform very poorly.
40
+ ** Applications should investigate changing the cache mode only if writing to normally cached buffers is known to cause
41
+ ** performance issues due to cache pollution, as write-combined memory can have surprising performance pitfalls.
42
+ */
43
+ enum {
44
+ kIOSurfaceDefaultCache = 0,
45
+ kIOSurfaceInhibitCache = 1,
46
+ kIOSurfaceWriteThruCache = 2,
47
+ kIOSurfaceCopybackCache = 3,
48
+ kIOSurfaceWriteCombineCache = 4,
49
+ kIOSurfaceCopybackInnerCache = 5
50
+ };
51
+
52
+ // IOSurface Memory mapping options (used with kIOSurfaceCacheMode or IOSurfacePropertyKeyCacheMode)
53
+ enum {
54
+ kIOSurfaceMapCacheShift = 8,
55
+ kIOSurfaceMapDefaultCache = kIOSurfaceDefaultCache << kIOSurfaceMapCacheShift,
56
+ kIOSurfaceMapInhibitCache = kIOSurfaceInhibitCache << kIOSurfaceMapCacheShift,
57
+ kIOSurfaceMapWriteThruCache = kIOSurfaceWriteThruCache << kIOSurfaceMapCacheShift,
58
+ kIOSurfaceMapCopybackCache = kIOSurfaceCopybackCache << kIOSurfaceMapCacheShift,
59
+ kIOSurfaceMapWriteCombineCache = kIOSurfaceWriteCombineCache << kIOSurfaceMapCacheShift,
60
+ kIOSurfaceMapCopybackInnerCache = kIOSurfaceCopybackInnerCache << kIOSurfaceMapCacheShift,
61
+ };
62
+
63
+ /* IOSurface APIs that return a kern_return_t will return either kIOSurfaceSuccess or an internal error code for failures */
64
+ #define kIOSurfaceSuccess KERN_SUCCESS // OK
65
+
66
+ #endif
@@ -0,0 +1,10 @@
1
+ framework module IOSurface [system] {
2
+ umbrella "Headers"
3
+ module * { export * }
4
+
5
+ module ObjC {
6
+ requires objc
7
+ header "IOSurfaceObjC.h"
8
+ export *
9
+ }
10
+ }
@@ -0,0 +1,9 @@
1
+ //
2
+ // MTL4AccelerationStructure.h
3
+ // Metal
4
+ //
5
+ // Copyright (c) 2024 Apple Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Metal/MTLAccelerationStructure.h>
9
+
@@ -0,0 +1,16 @@
1
+ //
2
+ // MTL4Archive.h
3
+ // Metal
4
+ //
5
+ // Copyright © 2024 Apple, Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef MTL4Archive_h
9
+ #define MTL4Archive_h
10
+
11
+ #import <Metal/MTLDefines.h>
12
+ #import <Metal/MTLDevice.h>
13
+ #import <Metal/MTL4ComputePipeline.h>
14
+ #import <Metal/MTL4RenderPipeline.h>
15
+
16
+ #endif // MTL4Archive_h
@@ -0,0 +1,17 @@
1
+ //
2
+ // MTL4ArgumentTable.h
3
+ // Metal
4
+ //
5
+ // Copyright © 2024 Apple, Inc. All rights reserved.
6
+ //
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import <Metal/MTLDevice.h>
11
+ #import <Metal/MTLDefines.h>
12
+ #import <Metal/MTLTypes.h>
13
+
14
+ NS_ASSUME_NONNULL_BEGIN
15
+
16
+
17
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,13 @@
1
+ //
2
+ // MTL4BinaryFunction.h
3
+ // Metal
4
+ //
5
+ // Copyright © 2024 Apple, Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef MTL4BinaryFunction_h
9
+ #define MTL4BinaryFunction_h
10
+
11
+ #import <Metal/MTLDefines.h>
12
+
13
+ #endif // MTL4BinaryFunction_h
@@ -0,0 +1,14 @@
1
+ //
2
+ // MTL4BinaryFunctionDescriptor.h
3
+ // Metal
4
+ //
5
+ // Copyright © 2024 Apple, Inc. All rights reserved.
6
+ //
7
+
8
+ #ifndef MTL4BinaryFunctionDescriptor_h
9
+ #define MTL4BinaryFunctionDescriptor_h
10
+
11
+ #import <Metal/MTLDefines.h>
12
+
13
+
14
+ #endif // MTLBinary4FunctionDescriptor_h