peachsim 0.1.1728 → 0.1.1744

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 (374) hide show
  1. package/README.md +4 -0
  2. package/cli/app-catalog.ts +47 -23
  3. package/cli/app-fonts.ts +19 -1
  4. package/cli/command-registry.ts +3 -0
  5. package/cli/commands/control.ts +68 -16
  6. package/cli/commands/coverage-swift.ts +112 -4
  7. package/cli/commands/device.ts +3 -1
  8. package/cli/commands/doctor.ts +1 -4
  9. package/cli/commands/inspect/settling.ts +6 -1
  10. package/cli/commands/inspect/wait-ready.ts +22 -2
  11. package/cli/commands/package.ts +33 -21
  12. package/cli/commands/push.ts +56 -0
  13. package/cli/commands/serve.ts +9 -0
  14. package/cli/commands/shell-url.ts +41 -9
  15. package/cli/commands/swift.ts +1 -1
  16. package/cli/current-sim.ts +27 -0
  17. package/cli/drivers/linux-browser-libs.lock.json +323 -1
  18. package/cli/drivers/linux-browser-libs.ts +8 -6
  19. package/cli/drivers/playwright.ts +5 -1
  20. package/cli/internal-child.ts +11 -1
  21. package/cli/main.ts +6 -0
  22. package/cli/native-input.ts +1 -7
  23. package/cli/outbound-endpoints.ts +9 -1
  24. package/cli/packaged-app-launcher.ts +3 -1
  25. package/cli/scene-video.ts +28 -7
  26. package/cli/ws-bridge.ts +3 -1
  27. package/detox/index.ts +18 -5
  28. package/dist-lib/agent-daemon-client.cjs +1 -1
  29. package/dist-lib/agent-events.cjs +1 -1
  30. package/dist-lib/attached-projects.cjs +5 -2
  31. package/dist-lib/auth/shared-session.cjs +5 -2
  32. package/dist-lib/backend-origin.cjs +1 -1
  33. package/dist-lib/beta.cjs +1 -1
  34. package/dist-lib/beta.mjs +1 -1
  35. package/dist-lib/bridge-constants.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.cjs +1 -1
  37. package/dist-lib/bridge-contract-input.mjs +1 -1
  38. package/dist-lib/bridge-contract.cjs +1 -1
  39. package/dist-lib/bridge-contract.mjs +1 -1
  40. package/dist-lib/bundle-channel.cjs +9932 -4561
  41. package/dist-lib/capture-contract.cjs +1 -1
  42. package/dist-lib/capture-contract.mjs +1 -1
  43. package/dist-lib/cloud-contract.cjs +1 -1
  44. package/dist-lib/cloud-contract.mjs +1 -1
  45. package/dist-lib/cloud-test-args.cjs +1 -1
  46. package/dist-lib/cloud-test-args.mjs +1 -1
  47. package/dist-lib/cloud.cjs +1 -1
  48. package/dist-lib/cloud.mjs +1 -1
  49. package/dist-lib/config.cjs +1 -1
  50. package/dist-lib/config.mjs +1 -1
  51. package/dist-lib/detox/index.cjs +30 -8
  52. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  53. package/dist-lib/expo-swift-bundle.cjs +6886 -3303
  54. package/dist-lib/expo-swift-metadata.cjs +14 -2
  55. package/dist-lib/expo-swift-metadata.mjs +14 -2
  56. package/dist-lib/home-paths.cjs +7 -2
  57. package/dist-lib/host/bridge-host.cjs +8513 -3085
  58. package/dist-lib/host/fetch-proxy-handler.cjs +19 -7
  59. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  60. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  61. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  62. package/dist-lib/host/websocket-proxy.cjs +6 -3
  63. package/dist-lib/index.cjs +175 -80
  64. package/dist-lib/jump-to-source-babel.cjs +1 -1
  65. package/dist-lib/jump-to-source-native.cjs +1 -1
  66. package/dist-lib/kotlin-host.cjs +209 -32
  67. package/dist-lib/menu.cjs +7 -1
  68. package/dist-lib/menu.mjs +7 -1
  69. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  70. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  71. package/dist-lib/metro-production-bundle.cjs +1 -1
  72. package/dist-lib/metro-production-bundle.mjs +1 -1
  73. package/dist-lib/metro.cjs +146 -76
  74. package/dist-lib/native-app-identity-project.cjs +76 -39
  75. package/dist-lib/native-app-identity-project.mjs +76 -39
  76. package/dist-lib/native-app-identity.cjs +10 -3
  77. package/dist-lib/native-app-identity.mjs +10 -3
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +1 -1
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +1 -1
  82. package/dist-lib/profiles.cjs +5 -2
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +25 -23
  85. package/dist-lib/public-origins-lib.json +138 -80
  86. package/dist-lib/react-native-host-modules.cjs +5 -2
  87. package/dist-lib/react-native-host-modules.mjs +5 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +4 -1
  91. package/dist-lib/sdk.mjs +4 -1
  92. package/dist-lib/skills.cjs +41126 -36493
  93. package/dist-lib/swift-compile.cjs +2103 -444
  94. package/dist-lib/swift-compile.mjs +2025 -369
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +1 -1
  97. package/dist-lib/swift-submit.cjs +2 -2
  98. package/dist-lib/swift-submit.mjs +2 -2
  99. package/dist-lib/swift-toolchain.cjs +84 -24
  100. package/dist-lib/swift.cjs +1 -1
  101. package/dist-lib/vite-swift.cjs +6094 -2687
  102. package/dist-lib/vite.cjs +32 -10
  103. package/dist-lib/worklet-executable.cjs +1 -1
  104. package/dist-lib/worklet-executable.mjs +1 -1
  105. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  107. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
  108. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
  109. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
  110. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
  111. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
  112. package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
  113. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  114. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
  115. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
  116. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
  117. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
  118. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +6 -0
  119. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
  120. package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
  121. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
  122. package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
  123. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
  124. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
  125. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
  127. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
  128. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
  129. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
  130. package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
  131. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -2
  132. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  133. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +6 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
  135. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
  136. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
  137. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +14 -1
  138. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
  139. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
  140. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
  141. package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
  142. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
  143. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  144. package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
  145. package/dist-types/packages/peach-kit/src/capabilities.d.ts +8 -0
  146. package/kotlin/README.md +3 -0
  147. package/kotlin/sdk.tar.gz +0 -0
  148. package/package.json +2 -1
  149. package/runtime-companion.json +1 -1
  150. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
  151. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
  152. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
  153. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
  154. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
  155. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
  156. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
  157. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
  158. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  159. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
  181. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
  182. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
  183. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
  184. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
  185. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
  186. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
  187. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
  188. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
  189. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
  198. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
  199. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
  200. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -9
  201. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
  202. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
  203. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
  204. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
  205. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
  206. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
  207. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
  208. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
  209. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
  210. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
  211. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
  212. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
  213. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
  214. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
  215. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
  216. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
  217. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
  218. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
  219. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
  220. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
  221. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
  222. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
  223. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
  224. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
  225. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
  226. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
  227. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
  228. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
  229. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
  230. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
  231. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
  232. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
  233. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
  234. package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
  235. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
  236. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
  237. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
  238. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
  239. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
  240. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
  241. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
  242. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
  243. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
  244. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
  245. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
  246. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
  247. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
  248. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
  249. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
  250. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
  251. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
  252. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
  253. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
  254. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
  255. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
  256. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
  257. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
  258. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
  259. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
  260. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
  261. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
  262. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
  263. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
  264. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
  265. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
  266. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
  267. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
  268. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
  269. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
  270. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
  271. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
  272. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
  273. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
  274. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
  275. package/sdk/ios/usr/include/dns_sd.h +3616 -0
  276. package/sdk/ios/usr/include/dnssd.modulemap +4 -0
  277. package/sdk/ios/usr/include/module.modulemap +1 -0
  278. package/sdk/ios/usr/include/os/signpost.h +414 -0
  279. package/sdk/ios/usr/include/os.modulemap +5 -0
  280. package/sdk/ios/usr/include/sys/socketvar.h +191 -0
  281. package/sdk/ios/usr/include/sys/vsock.h +84 -0
  282. package/sdk/ios/wasm/include/errno.h +4 -20
  283. package/sdk/ios/wasm/include/pthread.h +3 -0
  284. package/sdk/ios/wasm/include/setjmp.h +57 -0
  285. package/sdk/ios/wasm/include/sys/resource.h +2 -2
  286. package/sdk/native-hashes.json +3 -3
  287. package/skills/contrast/SKILL.md +6 -5
  288. package/skills/peach-debug/SKILL.md +68 -265
  289. package/skills/peach-debug/references/accessibility.md +37 -73
  290. package/skills/peach-debug/references/commands.md +2 -2
  291. package/skills/peach-debug/references/events.md +74 -0
  292. package/skills/peach-perf/SKILL.md +64 -402
  293. package/skills/peach-perf/references/presentation.md +46 -0
  294. package/skills/peach-perf/references/profiling.md +93 -0
  295. package/skills/peach-perf/references/render-counters.md +57 -0
  296. package/skills/peach-setup/SKILL.md +66 -217
  297. package/skills/peach-setup/references/native-config.md +35 -0
  298. package/skills/peach-setup/references/reporting.md +28 -0
  299. package/skills/peach-test/SKILL.md +68 -285
  300. package/skills/peach-test/references/detox.md +69 -0
  301. package/skills/peach-test/references/maestro.md +95 -0
  302. package/skills/peach-visual/SKILL.md +53 -106
  303. package/src/android-autolinking.ts +1 -0
  304. package/src/android-bridge-packages.ts +279 -0
  305. package/src/appPackageContract.ts +14 -1
  306. package/src/assetCatalogContract.ts +8 -1
  307. package/src/bridge-contract.ts +6 -0
  308. package/src/bundle-channel.mjs +152 -60
  309. package/src/cli-runtime.ts +3 -0
  310. package/src/configured-bundle-producer.ts +10 -0
  311. package/src/device-catalog.ts +68 -4
  312. package/src/expo-discovery-cache.ts +10 -3
  313. package/src/expo-kotlin-host.ts +97 -26
  314. package/src/expo-native-workspace.ts +211 -52
  315. package/src/expo-swift-host.ts +149 -123
  316. package/src/expo-swift-ready.ts +5 -1
  317. package/src/expo-widget-assets.ts +76 -0
  318. package/src/expoKotlinContract.ts +12 -2
  319. package/src/expoSwiftContract.ts +21 -2
  320. package/src/generated/swift-c-predefines.json +1 -1
  321. package/src/home-paths.ts +6 -1
  322. package/src/host/bridge-host.ts +5 -0
  323. package/src/host/fetch-proxy-handler.ts +10 -0
  324. package/src/host/websocket-proxy.ts +7 -2
  325. package/src/kotlin-host.ts +204 -30
  326. package/src/kotlinSdkContract.ts +2 -1
  327. package/src/menu.ts +7 -0
  328. package/src/native-prebuilt.ts +154 -0
  329. package/src/nitro-adapter.lock.json +261 -261
  330. package/src/nitro-adapter.ts +118 -50
  331. package/src/nitro-bundle.ts +134 -96
  332. package/src/nitro-compile.ts +16 -6
  333. package/src/nitro-dependencies.ts +43 -28
  334. package/src/nitro-source.ts +142 -30
  335. package/src/nitro-superset.lock.json +103 -0
  336. package/src/nitro-superset.ts +137 -0
  337. package/src/nitroAdapterContract.ts +146 -98
  338. package/src/nitroContract.ts +68 -21
  339. package/src/react-bridge-importers.ts +1 -0
  340. package/src/react-native-bridge-modules.ts +2 -0
  341. package/src/react-native-host-modules.ts +4 -1
  342. package/src/settingsContract.ts +37 -1
  343. package/src/storageSnapshotContract.ts +29 -81
  344. package/src/swift-compile.ts +315 -117
  345. package/src/swift-compiler-digest.ts +2 -0
  346. package/src/swift-coverage/indexdump.ts +22 -6
  347. package/src/swift-coverage/indexing.ts +4 -4
  348. package/src/swift-coverage/sdk.ts +104 -20
  349. package/src/swift-coverage/types.ts +34 -0
  350. package/src/swift-coverage/xcode-packages.ts +61 -1
  351. package/src/swift-coverage/xcode.ts +19 -13
  352. package/src/swift-cxx-reachable.ts +1 -1
  353. package/src/swift-distribution.lock.json +18 -13
  354. package/src/swift-distribution.ts +57 -26
  355. package/src/swift-host.ts +51 -35
  356. package/src/swift-link-roots.ts +45 -18
  357. package/src/swift-objc-compile.ts +78 -2
  358. package/src/swift-objc-standin.ts +3 -0
  359. package/src/swift-shared-sdk.ts +85 -1
  360. package/src/swift-standin-emit.ts +6 -1
  361. package/src/swift-standins.ts +403 -19
  362. package/src/swift-submit.ts +17 -1
  363. package/src/swift-toolchain.ts +98 -23
  364. package/src/swift-wasm-prune.ts +1629 -0
  365. package/src/turbo-bundle.ts +82 -0
  366. package/src/turbo-compile.ts +120 -0
  367. package/src/turbo-runtime.lock.json +69 -0
  368. package/src/turbo-source.ts +754 -0
  369. package/src/vite-plugin-one.ts +15 -3
  370. package/src/vite-plugin.ts +82 -23
  371. package/src/wasm-optimize.ts +34 -0
  372. package/src/worker-system-chunks.ts +3 -3
  373. package/src/xcode-project.ts +52 -0
  374. package/src/xcode-target-members.ts +12 -1
@@ -0,0 +1,1132 @@
1
+ /* CoreGraphics - CGContext.h
2
+ Copyright (c) 2000-2012 Apple Inc.
3
+ All rights reserved. */
4
+
5
+ #ifndef CGCONTEXT_H_
6
+ #define CGCONTEXT_H_
7
+
8
+ #include <CoreFoundation/CFBase.h>
9
+ #include <CoreFoundation/CFAvailability.h>
10
+ #include <stdint.h>
11
+
12
+ typedef struct CF_BRIDGED_TYPE(id) CGContext *CGContextRef;
13
+
14
+ #include <CoreGraphics/CGBase.h>
15
+ #include <CoreGraphics/CGAffineTransform.h>
16
+ #include <CoreGraphics/CGColor.h>
17
+ #include <CoreGraphics/CGColorSpace.h>
18
+ #include <CoreGraphics/CGFont.h>
19
+ #include <CoreGraphics/CGGradient.h>
20
+ #include <CoreGraphics/CGImage.h>
21
+ #include <CoreGraphics/CGPath.h>
22
+ #include <CoreGraphics/CGPattern.h>
23
+ #include <CoreGraphics/CGPDFDocument.h>
24
+ #include <CoreGraphics/CGShading.h>
25
+ #include <CoreGraphics/CGToneMapping.h>
26
+
27
+ CF_IMPLICIT_BRIDGING_ENABLED
28
+
29
+ CF_ASSUME_NONNULL_BEGIN
30
+
31
+ /* Drawing modes for paths. */
32
+
33
+ typedef CF_ENUM (int32_t, CGPathDrawingMode) {
34
+ kCGPathFill,
35
+ kCGPathEOFill,
36
+ kCGPathStroke,
37
+ kCGPathFillStroke,
38
+ kCGPathEOFillStroke
39
+ };
40
+
41
+ /* Drawing modes for text. */
42
+
43
+ typedef CF_ENUM (int32_t, CGTextDrawingMode) {
44
+ kCGTextFill,
45
+ kCGTextStroke,
46
+ kCGTextFillStroke,
47
+ kCGTextInvisible,
48
+ kCGTextFillClip,
49
+ kCGTextStrokeClip,
50
+ kCGTextFillStrokeClip,
51
+ kCGTextClip
52
+ };
53
+
54
+ /* Text encodings. */
55
+
56
+ typedef CF_ENUM (int32_t, CGTextEncoding) {
57
+ kCGEncodingFontSpecific,
58
+ kCGEncodingMacRoman
59
+ } API_DEPRECATED("No longer supported", macos(10.0,10.9), ios(2.0,7.0));
60
+
61
+ /* Interpolation quality. */
62
+
63
+ typedef CF_ENUM (int32_t, CGInterpolationQuality) {
64
+ kCGInterpolationDefault = 0, /* Let the context decide. */
65
+ kCGInterpolationNone = 1, /* Never interpolate. */
66
+ kCGInterpolationLow = 2, /* Low quality, fast interpolation. */
67
+ kCGInterpolationMedium = 4, /* Medium quality, slower than kCGInterpolationLow. */
68
+ kCGInterpolationHigh = 3 /* Highest quality, slower than kCGInterpolationMedium. */
69
+ };
70
+
71
+ /* Blend modes.
72
+
73
+ The blend modes from kCGBlendModeNormal to kCGBlendModeLuminosity are
74
+ supported in Mac OS X 10.4 and later. The Porter-Duff blend modes (from
75
+ kCGBlendModeClear to kCGBlendModePlusLighter) are supported in Mac OS X
76
+ 10.5 and later. The names of the Porter-Duff blend modes are historical.
77
+
78
+ Note that the Porter-Duff blend modes are not necessarily supported in
79
+ every context. In particular, they are only guaranteed to work in
80
+ bitmap-based contexts, such as those created by CGBitmapContextCreate. It
81
+ is your responsibility to make sure that they do what you want when you
82
+ use them in a CGContext. */
83
+
84
+ typedef CF_ENUM (int32_t, CGBlendMode) {
85
+ /* Available in Mac OS X 10.4 & later. */
86
+ kCGBlendModeNormal,
87
+ kCGBlendModeMultiply,
88
+ kCGBlendModeScreen,
89
+ kCGBlendModeOverlay,
90
+ kCGBlendModeDarken,
91
+ kCGBlendModeLighten,
92
+ kCGBlendModeColorDodge,
93
+ kCGBlendModeColorBurn,
94
+ kCGBlendModeSoftLight,
95
+ kCGBlendModeHardLight,
96
+ kCGBlendModeDifference,
97
+ kCGBlendModeExclusion,
98
+ kCGBlendModeHue,
99
+ kCGBlendModeSaturation,
100
+ kCGBlendModeColor,
101
+ kCGBlendModeLuminosity,
102
+
103
+ /* Available in Mac OS X 10.5 & later. R, S, and D are, respectively,
104
+ premultiplied result, source, and destination colors with alpha; Ra,
105
+ Sa, and Da are the alpha components of these colors.
106
+
107
+ The Porter-Duff "source over" mode is called `kCGBlendModeNormal':
108
+ R = S + D*(1 - Sa)
109
+
110
+ Note that the Porter-Duff "XOR" mode is only titularly related to the
111
+ classical bitmap XOR operation (which is unsupported by
112
+ CoreGraphics). */
113
+
114
+ kCGBlendModeClear, /* R = 0 */
115
+ kCGBlendModeCopy, /* R = S */
116
+ kCGBlendModeSourceIn, /* R = S*Da */
117
+ kCGBlendModeSourceOut, /* R = S*(1 - Da) */
118
+ kCGBlendModeSourceAtop, /* R = S*Da + D*(1 - Sa) */
119
+ kCGBlendModeDestinationOver, /* R = S*(1 - Da) + D */
120
+ kCGBlendModeDestinationIn, /* R = D*Sa */
121
+ kCGBlendModeDestinationOut, /* R = D*(1 - Sa) */
122
+ kCGBlendModeDestinationAtop, /* R = S*(1 - Da) + D*Sa */
123
+ kCGBlendModeXOR, /* R = S*(1 - Da) + D*(1 - Sa) */
124
+ kCGBlendModePlusDarker, /* R = MAX(0, (1 - D) + (1 - S)) */
125
+ kCGBlendModePlusLighter /* R = MIN(1, S + D) */
126
+ };
127
+
128
+ /* Return the CFTypeID for CGContextRefs. */
129
+
130
+ CG_EXTERN CFTypeID CGContextGetTypeID(void)
131
+ API_AVAILABLE(macos(10.2), ios(2.0));
132
+
133
+ /** Graphics state functions. **/
134
+
135
+ /* Push a copy of the current graphics state onto the graphics state stack.
136
+ Note that the path is not considered part of the graphics state, and is
137
+ not saved. */
138
+
139
+ CG_EXTERN void CGContextSaveGState(CGContextRef cg_nullable c)
140
+ API_AVAILABLE(macos(10.0), ios(2.0));
141
+
142
+ /* Restore the current graphics state from the one on the top of the
143
+ graphics state stack, popping the graphics state stack in the process. */
144
+
145
+ CG_EXTERN void CGContextRestoreGState(CGContextRef cg_nullable c)
146
+ API_AVAILABLE(macos(10.0), ios(2.0));
147
+
148
+ /** Coordinate space transformations. **/
149
+
150
+ /* Scale the current graphics state's transformation matrix (the CTM) by
151
+ `(sx, sy)'. */
152
+
153
+ CG_EXTERN void CGContextScaleCTM(CGContextRef cg_nullable c,
154
+ CGFloat sx, CGFloat sy)
155
+ API_AVAILABLE(macos(10.0), ios(2.0));
156
+
157
+ /* Translate the current graphics state's transformation matrix (the CTM) by
158
+ `(tx, ty)'. */
159
+
160
+ CG_EXTERN void CGContextTranslateCTM(CGContextRef cg_nullable c,
161
+ CGFloat tx, CGFloat ty)
162
+ API_AVAILABLE(macos(10.0), ios(2.0));
163
+
164
+ /* Rotate the current graphics state's transformation matrix (the CTM) by
165
+ `angle' radians. */
166
+
167
+ CG_EXTERN void CGContextRotateCTM(CGContextRef cg_nullable c, CGFloat angle)
168
+ API_AVAILABLE(macos(10.0), ios(2.0));
169
+
170
+ /* Concatenate the current graphics state's transformation matrix (the CTM)
171
+ with the affine transform `transform'. */
172
+
173
+ CG_EXTERN void CGContextConcatCTM(CGContextRef cg_nullable c,
174
+ CGAffineTransform transform)
175
+ API_AVAILABLE(macos(10.0), ios(2.0));
176
+
177
+ /* Return the current graphics state's transformation matrix. Returns
178
+ CGAffineTransformIdentity in case of inavlid context. */
179
+
180
+ CG_EXTERN CGAffineTransform CGContextGetCTM(CGContextRef cg_nullable c)
181
+ API_AVAILABLE(macos(10.0), ios(2.0));
182
+
183
+ /** Drawing attribute functions. **/
184
+
185
+ /* Set the line width in the current graphics state to `width'. */
186
+
187
+ CG_EXTERN void CGContextSetLineWidth(CGContextRef cg_nullable c, CGFloat width)
188
+ API_AVAILABLE(macos(10.0), ios(2.0));
189
+
190
+ /* Set the line cap in the current graphics state to `cap'. */
191
+
192
+ CG_EXTERN void CGContextSetLineCap(CGContextRef cg_nullable c, CGLineCap cap)
193
+ API_AVAILABLE(macos(10.0), ios(2.0));
194
+
195
+ /* Set the line join in the current graphics state to `join'. */
196
+
197
+ CG_EXTERN void CGContextSetLineJoin(CGContextRef cg_nullable c, CGLineJoin join)
198
+ API_AVAILABLE(macos(10.0), ios(2.0));
199
+
200
+ /* Set the miter limit in the current graphics state to `limit'. */
201
+
202
+ CG_EXTERN void CGContextSetMiterLimit(CGContextRef cg_nullable c, CGFloat limit)
203
+ API_AVAILABLE(macos(10.0), ios(2.0));
204
+
205
+ /* Set the line dash patttern in the current graphics state of `c'. */
206
+
207
+ CG_EXTERN void CGContextSetLineDash(CGContextRef cg_nullable c, CGFloat phase,
208
+ const CGFloat * __nullable lengths, size_t count)
209
+ API_AVAILABLE(macos(10.0), ios(2.0));
210
+
211
+ /* Set the path flatness parameter in the current graphics state of `c' to
212
+ `flatness'. */
213
+
214
+ CG_EXTERN void CGContextSetFlatness(CGContextRef cg_nullable c, CGFloat flatness)
215
+ API_AVAILABLE(macos(10.0), ios(2.0));
216
+
217
+ /* Set the alpha value in the current graphics state of `c' to `alpha'. */
218
+
219
+ CG_EXTERN void CGContextSetAlpha(CGContextRef cg_nullable c, CGFloat alpha)
220
+ API_AVAILABLE(macos(10.0), ios(2.0));
221
+
222
+ /* Set the blend mode of `context' to `mode'. */
223
+
224
+ CG_EXTERN void CGContextSetBlendMode(CGContextRef cg_nullable c, CGBlendMode mode)
225
+ API_AVAILABLE(macos(10.4), ios(2.0));
226
+
227
+ /** Path construction functions. **/
228
+
229
+ /* Note that a context has a single path in use at any time: a path is not
230
+ part of the graphics state. */
231
+
232
+ /* Begin a new path. The old path is discarded. */
233
+
234
+ CG_EXTERN void CGContextBeginPath(CGContextRef cg_nullable c)
235
+ API_AVAILABLE(macos(10.0), ios(2.0));
236
+
237
+ /* Start a new subpath at point `(x, y)' in the context's path. */
238
+
239
+ CG_EXTERN void CGContextMoveToPoint(CGContextRef cg_nullable c,
240
+ CGFloat x, CGFloat y)
241
+ API_AVAILABLE(macos(10.0), ios(2.0));
242
+
243
+ /* Append a straight line segment from the current point to `(x, y)'. */
244
+
245
+ CG_EXTERN void CGContextAddLineToPoint(CGContextRef cg_nullable c,
246
+ CGFloat x, CGFloat y)
247
+ API_AVAILABLE(macos(10.0), ios(2.0));
248
+
249
+ /* Append a cubic Bezier curve from the current point to `(x,y)', with
250
+ control points `(cp1x, cp1y)' and `(cp2x, cp2y)'. */
251
+
252
+ CG_EXTERN void CGContextAddCurveToPoint(CGContextRef cg_nullable c, CGFloat cp1x,
253
+ CGFloat cp1y, CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y)
254
+ API_AVAILABLE(macos(10.0), ios(2.0));
255
+
256
+ /* Append a quadratic curve from the current point to `(x, y)', with control
257
+ point `(cpx, cpy)'. */
258
+
259
+ CG_EXTERN void CGContextAddQuadCurveToPoint(CGContextRef cg_nullable c,
260
+ CGFloat cpx, CGFloat cpy, CGFloat x, CGFloat y)
261
+ API_AVAILABLE(macos(10.0), ios(2.0));
262
+
263
+ /* Close the current subpath of the context's path. */
264
+
265
+ CG_EXTERN void CGContextClosePath(CGContextRef cg_nullable c)
266
+ API_AVAILABLE(macos(10.0), ios(2.0));
267
+
268
+ /** Path construction convenience functions. **/
269
+
270
+ /* Add a single rect to the context's path. */
271
+
272
+ CG_EXTERN void CGContextAddRect(CGContextRef cg_nullable c, CGRect rect)
273
+ API_AVAILABLE(macos(10.0), ios(2.0));
274
+
275
+ /* Add a set of rects to the context's path. */
276
+
277
+ CG_EXTERN void CGContextAddRects(CGContextRef cg_nullable c,
278
+ const CGRect * __nullable rects, size_t count)
279
+ API_AVAILABLE(macos(10.0), ios(2.0));
280
+
281
+ /* Add a set of lines to the context's path. */
282
+
283
+ CG_EXTERN void CGContextAddLines(CGContextRef cg_nullable c,
284
+ const CGPoint * __nullable points, size_t count)
285
+ API_AVAILABLE(macos(10.0), ios(2.0));
286
+
287
+ /* Add an ellipse inside `rect' to the current path of `context'. See the
288
+ function `CGPathAddEllipseInRect' for more information on how the path
289
+ for the ellipse is constructed. */
290
+
291
+ CG_EXTERN void CGContextAddEllipseInRect(CGContextRef cg_nullable c, CGRect rect)
292
+ API_AVAILABLE(macos(10.4), ios(2.0));
293
+
294
+ /* Add an arc of a circle to the context's path, possibly preceded by a
295
+ straight line segment. `(x, y)' is the center of the arc; `radius' is its
296
+ radius; `startAngle' is the angle to the first endpoint of the arc;
297
+ `endAngle' is the angle to the second endpoint of the arc; and
298
+ `clockwise' is 1 if the arc is to be drawn clockwise, 0 otherwise.
299
+ `startAngle' and `endAngle' are measured in radians. */
300
+
301
+ CG_EXTERN void CGContextAddArc(CGContextRef cg_nullable c, CGFloat x, CGFloat y,
302
+ CGFloat radius, CGFloat startAngle, CGFloat endAngle, int clockwise)
303
+ API_AVAILABLE(macos(10.0), ios(2.0));
304
+
305
+ /* Add an arc of a circle to the context's path, possibly preceded by a
306
+ straight line segment. `radius' is the radius of the arc. The arc is
307
+ tangent to the line from the current point to `(x1, y1)', and the line
308
+ from `(x1, y1)' to `(x2, y2)'. */
309
+
310
+ CG_EXTERN void CGContextAddArcToPoint(CGContextRef cg_nullable c,
311
+ CGFloat x1, CGFloat y1, CGFloat x2, CGFloat y2, CGFloat radius)
312
+ API_AVAILABLE(macos(10.0), ios(2.0));
313
+
314
+ /* Add `path' to the path of context. The points in `path' are transformed
315
+ by the CTM of context before they are added. */
316
+
317
+ CG_EXTERN void CGContextAddPath(CGContextRef cg_nullable c,
318
+ CGPathRef cg_nullable path)
319
+ API_AVAILABLE(macos(10.2), ios(2.0));
320
+
321
+ /** Path stroking. **/
322
+
323
+ /* Replace the path in `context' with the stroked version of the path, using
324
+ the parameters of `context' to calculate the stroked path. The resulting
325
+ path is created such that filling it with the appropriate color will
326
+ produce the same results as stroking the original path. You can use this
327
+ path in the same way you can use the path of any context; for example,
328
+ you can clip to the stroked version of a path by calling this function
329
+ followed by a call to "CGContextClip". */
330
+
331
+ CG_EXTERN void CGContextReplacePathWithStrokedPath(CGContextRef cg_nullable c)
332
+ API_AVAILABLE(macos(10.4), ios(2.0));
333
+
334
+ /** Path information functions. **/
335
+
336
+ /* Return true if the path of `context' contains no elements, false
337
+ otherwise. */
338
+
339
+ CG_EXTERN bool CGContextIsPathEmpty(CGContextRef cg_nullable c)
340
+ API_AVAILABLE(macos(10.0), ios(2.0));
341
+
342
+ /* Return the current point of the current subpath of the path of
343
+ `context'. */
344
+
345
+ CG_EXTERN CGPoint CGContextGetPathCurrentPoint(CGContextRef cg_nullable c)
346
+ API_AVAILABLE(macos(10.0), ios(2.0));
347
+
348
+ /* Return the bounding box of the path of `context'. The bounding box is the
349
+ smallest rectangle completely enclosing all points in the path, including
350
+ control points for Bezier and quadratic curves. */
351
+
352
+ CG_EXTERN CGRect CGContextGetPathBoundingBox(CGContextRef cg_nullable c)
353
+ API_AVAILABLE(macos(10.0), ios(2.0));
354
+
355
+ /* Return a copy of the path of `context'. The returned path is specified in
356
+ the current user space of `context'. */
357
+
358
+ CG_EXTERN CGPathRef __nullable CGContextCopyPath(CGContextRef cg_nullable c)
359
+ API_AVAILABLE(macos(10.2), ios(2.0));
360
+
361
+ /* Return true if `point' is contained in the current path of `context'. A
362
+ point is contained within a context's path if it is inside the painted
363
+ region when the path is stroked or filled with opaque colors using the
364
+ path drawing mode `mode'. `point' is specified is user space. */
365
+
366
+ CG_EXTERN bool CGContextPathContainsPoint(CGContextRef cg_nullable c,
367
+ CGPoint point, CGPathDrawingMode mode)
368
+ API_AVAILABLE(macos(10.4), ios(2.0));
369
+
370
+ /** Path drawing functions. **/
371
+
372
+ /* Draw the context's path using drawing mode `mode'. */
373
+
374
+ CG_EXTERN void CGContextDrawPath(CGContextRef cg_nullable c,
375
+ CGPathDrawingMode mode)
376
+ API_AVAILABLE(macos(10.0), ios(2.0));
377
+
378
+ /** Path drawing convenience functions. **/
379
+
380
+ /* Fill the context's path using the winding-number fill rule. Any open
381
+ subpath of the path is implicitly closed. */
382
+
383
+ CG_EXTERN void CGContextFillPath(CGContextRef cg_nullable c)
384
+ API_AVAILABLE(macos(10.0), ios(2.0));
385
+
386
+ /* Fill the context's path using the even-odd fill rule. Any open subpath of
387
+ the path is implicitly closed. */
388
+
389
+ CG_EXTERN void CGContextEOFillPath(CGContextRef cg_nullable c)
390
+ API_AVAILABLE(macos(10.0), ios(2.0));
391
+
392
+ /* Stroke the context's path. */
393
+
394
+ CG_EXTERN void CGContextStrokePath(CGContextRef cg_nullable c)
395
+ API_AVAILABLE(macos(10.0), ios(2.0));
396
+
397
+ /* Fill `rect' with the current fill color. */
398
+
399
+ CG_EXTERN void CGContextFillRect(CGContextRef cg_nullable c, CGRect rect)
400
+ API_AVAILABLE(macos(10.0), ios(2.0));
401
+
402
+ /* Fill `rects', an array of `count' CGRects, with the current fill
403
+ color. */
404
+
405
+ CG_EXTERN void CGContextFillRects(CGContextRef cg_nullable c,
406
+ const CGRect * __nullable rects, size_t count)
407
+ API_AVAILABLE(macos(10.0), ios(2.0));
408
+
409
+ /* Stroke `rect' with the current stroke color and the current linewidth. */
410
+
411
+ CG_EXTERN void CGContextStrokeRect(CGContextRef cg_nullable c, CGRect rect)
412
+ API_AVAILABLE(macos(10.0), ios(2.0));
413
+
414
+ /* Stroke `rect' with the current stroke color, using `width' as the the
415
+ line width. */
416
+
417
+ CG_EXTERN void CGContextStrokeRectWithWidth(CGContextRef cg_nullable c,
418
+ CGRect rect, CGFloat width)
419
+ API_AVAILABLE(macos(10.0), ios(2.0));
420
+
421
+ /* Clear `rect' (that is, set the region within the rect to transparent). */
422
+
423
+ CG_EXTERN void CGContextClearRect(CGContextRef cg_nullable c, CGRect rect)
424
+ API_AVAILABLE(macos(10.0), ios(2.0));
425
+
426
+ /* Fill an ellipse (an oval) inside `rect'. */
427
+
428
+ CG_EXTERN void CGContextFillEllipseInRect(CGContextRef cg_nullable c,
429
+ CGRect rect)
430
+ API_AVAILABLE(macos(10.4), ios(2.0));
431
+
432
+ /* Stroke an ellipse (an oval) inside `rect'. */
433
+
434
+ CG_EXTERN void CGContextStrokeEllipseInRect(CGContextRef cg_nullable c,
435
+ CGRect rect)
436
+ API_AVAILABLE(macos(10.4), ios(2.0));
437
+
438
+ /* Stroke a sequence of line segments one after another in `context'. The
439
+ line segments are specified by `points', an array of `count' CGPoints.
440
+ This function is equivalent to
441
+
442
+ CGContextBeginPath(context);
443
+ for (k = 0; k < count; k += 2) {
444
+ CGContextMoveToPoint(context, s[k].x, s[k].y);
445
+ CGContextAddLineToPoint(context, s[k+1].x, s[k+1].y);
446
+ }
447
+ CGContextStrokePath(context); */
448
+
449
+ CG_EXTERN void CGContextStrokeLineSegments(CGContextRef cg_nullable c,
450
+ const CGPoint * __nullable points, size_t count)
451
+ API_AVAILABLE(macos(10.4), ios(2.0));
452
+
453
+ /** Clipping functions. **/
454
+
455
+ /* Intersect the context's path with the current clip path and use the
456
+ resulting path as the clip path for subsequent rendering operations. Use
457
+ the winding-number fill rule for deciding what's inside the path. */
458
+
459
+ CG_EXTERN void CGContextClip(CGContextRef cg_nullable c)
460
+ API_AVAILABLE(macos(10.0), ios(2.0));
461
+
462
+ /* Intersect the context's path with the current clip path and use the
463
+ resulting path as the clip path for subsequent rendering operations. Use
464
+ the even-odd fill rule for deciding what's inside the path. */
465
+
466
+ CG_EXTERN void CGContextEOClip(CGContextRef cg_nullable c)
467
+ API_AVAILABLE(macos(10.0), ios(2.0));
468
+
469
+ /* Reset the current clip of `c' to the default value. */
470
+
471
+ CG_EXTERN void CGContextResetClip(CGContextRef c);
472
+
473
+ /* Add `mask' transformed to `rect' to the clipping area of `context'. The
474
+ mask, which may be either an image mask or an image, is mapped into the
475
+ specified rectangle and intersected with the current clipping area of the
476
+ context.
477
+
478
+ If `mask' is an image mask, then it clips in a manner identical to the
479
+ behavior if it were used with "CGContextDrawImage": it indicates an area
480
+ to be masked out (left unchanged) when drawing. The source samples of the
481
+ image mask determine which points of the clipping area are changed,
482
+ acting as an "inverse alpha": if the value of a source sample in the
483
+ image mask is S, then the corresponding point in the current clipping
484
+ area will be multiplied by an alpha of (1-S). (For example, if S is 1,
485
+ then the point in the clipping area becomes clear, while if S is 0, the
486
+ point in the clipping area is unchanged.
487
+
488
+ If `mask' is an image, then it serves as alpha mask and is blended with
489
+ the current clipping area. The source samples of mask determine which
490
+ points of the clipping area are changed: if the value of the source
491
+ sample in mask is S, then the corresponding point in the current clipping
492
+ area will be multiplied by an alpha of S. (For example, if S is 0, then
493
+ the point in the clipping area becomes clear, while if S is 1, the point
494
+ in the clipping area is unchanged.
495
+
496
+ If `mask' is an image, then its color space must be of kCGColorSpaceModelMonochrome
497
+ model, may not have alpha, and may not be masked by an image mask or masking
498
+ color. */
499
+
500
+ CG_EXTERN void CGContextClipToMask(CGContextRef cg_nullable c, CGRect rect,
501
+ CGImageRef cg_nullable mask)
502
+ API_AVAILABLE(macos(10.4), ios(2.0));
503
+
504
+ /* Return the bounding box of the clip path of `c' in user space. The
505
+ bounding box is the smallest rectangle completely enclosing all points in
506
+ the clip. */
507
+
508
+ CG_EXTERN CGRect CGContextGetClipBoundingBox(CGContextRef cg_nullable c)
509
+ API_AVAILABLE(macos(10.3), ios(2.0));
510
+
511
+ /** Clipping convenience functions. **/
512
+
513
+ /* Intersect the current clipping path with `rect'. Note that this function
514
+ resets the context's path to the empty path. */
515
+
516
+ CG_EXTERN void CGContextClipToRect(CGContextRef cg_nullable c, CGRect rect)
517
+ API_AVAILABLE(macos(10.0), ios(2.0));
518
+
519
+ /* Intersect the current clipping path with the clipping region formed by
520
+ creating a path consisting of all rects in `rects'. Note that this
521
+ function resets the context's path to the empty path. */
522
+
523
+ CG_EXTERN void CGContextClipToRects(CGContextRef cg_nullable c,
524
+ const CGRect * rects, size_t count)
525
+ API_AVAILABLE(macos(10.0), ios(2.0));
526
+
527
+ /** Primitive color functions. **/
528
+
529
+ /* Set the current fill color in the context `c' to `color'. */
530
+
531
+ CG_EXTERN void CGContextSetFillColorWithColor(CGContextRef cg_nullable c,
532
+ CGColorRef cg_nullable color)
533
+ API_AVAILABLE(macos(10.3), ios(2.0));
534
+
535
+ /* Set the current stroke color in the context `c' to `color'. */
536
+
537
+ CG_EXTERN void CGContextSetStrokeColorWithColor(CGContextRef cg_nullable c,
538
+ CGColorRef cg_nullable color)
539
+ API_AVAILABLE(macos(10.3), ios(2.0));
540
+
541
+ /** Color space functions. **/
542
+
543
+ /* Set the current fill color space in `context' to `space'. As a
544
+ side-effect, set the fill color to a default value appropriate for the
545
+ color space. */
546
+
547
+ CG_EXTERN void CGContextSetFillColorSpace(CGContextRef cg_nullable c,
548
+ CGColorSpaceRef cg_nullable space)
549
+ API_AVAILABLE(macos(10.0), ios(2.0));
550
+
551
+ /* Set the current stroke color space in `context' to `space'. As a
552
+ side-effect, set the stroke color to a default value appropriate for the
553
+ color space. */
554
+
555
+ CG_EXTERN void CGContextSetStrokeColorSpace(CGContextRef cg_nullable c,
556
+ CGColorSpaceRef cg_nullable space)
557
+ API_AVAILABLE(macos(10.0), ios(2.0));
558
+
559
+ /** Color functions. **/
560
+
561
+ /* Set the components of the current fill color in `context' to the values
562
+ specifed by `components'. The number of elements in `components' must be
563
+ one greater than the number of components in the current fill color space
564
+ (N color components + 1 alpha component). The current fill color space
565
+ must not be a pattern color space. */
566
+
567
+ CG_EXTERN void CGContextSetFillColor(CGContextRef cg_nullable c,
568
+ const CGFloat * cg_nullable components)
569
+ API_AVAILABLE(macos(10.0), ios(2.0));
570
+
571
+ /* Set the components of the current stroke color in `context' to the values
572
+ specifed by `components'. The number of elements in `components' must be
573
+ one greater than the number of components in the current stroke color
574
+ space (N color components + 1 alpha component). The current stroke color
575
+ space must not be a pattern color space. */
576
+
577
+ CG_EXTERN void CGContextSetStrokeColor(CGContextRef cg_nullable c,
578
+ const CGFloat * cg_nullable components)
579
+ API_AVAILABLE(macos(10.0), ios(2.0));
580
+
581
+ /** Pattern functions. **/
582
+
583
+ /* Set the components of the current fill color in `context' to the values
584
+ specifed by `components', and set the current fill pattern to `pattern'.
585
+ The number of elements in `components' must be one greater than the
586
+ number of components in the current fill color space (N color components
587
+ + 1 alpha component). The current fill color space must be a pattern
588
+ color space. */
589
+
590
+ CG_EXTERN void CGContextSetFillPattern(CGContextRef cg_nullable c,
591
+ CGPatternRef cg_nullable pattern, const CGFloat * cg_nullable components)
592
+ API_AVAILABLE(macos(10.0), ios(2.0));
593
+
594
+ /* Set the components of the current stroke color in `context' to the values
595
+ specifed by `components', and set the current stroke pattern to
596
+ `pattern'. The number of elements in `components' must be one greater
597
+ than the number of components in the current stroke color space (N color
598
+ components + 1 alpha component). The current stroke color space must be a
599
+ pattern color space. */
600
+
601
+ CG_EXTERN void CGContextSetStrokePattern(CGContextRef cg_nullable c,
602
+ CGPatternRef cg_nullable pattern, const CGFloat * cg_nullable components)
603
+ API_AVAILABLE(macos(10.0), ios(2.0));
604
+
605
+ /* Set the pattern phase in the current graphics state of `context' to
606
+ `phase'. */
607
+
608
+ CG_EXTERN void CGContextSetPatternPhase(CGContextRef cg_nullable c, CGSize phase)
609
+ API_AVAILABLE(macos(10.0), ios(2.0));
610
+
611
+ /** Color convenience functions. **/
612
+
613
+ /* Set the current fill color space in `context' to `DeviceGray' and set the
614
+ components of the current fill color to `(gray, alpha)'. */
615
+
616
+ CG_EXTERN void CGContextSetGrayFillColor(CGContextRef cg_nullable c,
617
+ CGFloat gray, CGFloat alpha)
618
+ API_AVAILABLE(macos(10.0), ios(2.0));
619
+
620
+ /* Set the current stroke color space in `context' to `DeviceGray' and set
621
+ the components of the current stroke color to `(gray, alpha)'. */
622
+
623
+ CG_EXTERN void CGContextSetGrayStrokeColor(CGContextRef cg_nullable c,
624
+ CGFloat gray, CGFloat alpha)
625
+ API_AVAILABLE(macos(10.0), ios(2.0));
626
+
627
+ /* Set the current fill color space in `context' to `DeviceRGB' and set the
628
+ components of the current fill color to `(red, green, blue, alpha)'. */
629
+
630
+ CG_EXTERN void CGContextSetRGBFillColor(CGContextRef cg_nullable c, CGFloat red,
631
+ CGFloat green, CGFloat blue, CGFloat alpha)
632
+ API_AVAILABLE(macos(10.0), ios(2.0));
633
+
634
+ /* Set the current stroke color space in `context' to `DeviceRGB' and set
635
+ the components of the current stroke color to `(red, green, blue,
636
+ alpha)'. */
637
+
638
+ CG_EXTERN void CGContextSetRGBStrokeColor(CGContextRef cg_nullable c,
639
+ CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha)
640
+ API_AVAILABLE(macos(10.0), ios(2.0));
641
+
642
+ /* Set the current fill color space in `context' to `DeviceCMYK' and set the
643
+ components of the current fill color to `(cyan, magenta, yellow, black,
644
+ alpha)'. */
645
+
646
+ CG_EXTERN void CGContextSetCMYKFillColor(CGContextRef cg_nullable c,
647
+ CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha)
648
+ API_AVAILABLE(macos(10.0), ios(2.0));
649
+
650
+ /* Set the current stroke color space in `context' to `DeviceCMYK' and set
651
+ the components of the current stroke color to `(cyan, magenta, yellow,
652
+ black, alpha)'. */
653
+
654
+ CG_EXTERN void CGContextSetCMYKStrokeColor(CGContextRef cg_nullable c,
655
+ CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha)
656
+ API_AVAILABLE(macos(10.0), ios(2.0));
657
+
658
+ /** Rendering intent. **/
659
+
660
+ /* Set the rendering intent in the current graphics state of `context' to
661
+ `intent'. */
662
+
663
+ CG_EXTERN void CGContextSetRenderingIntent(CGContextRef cg_nullable c,
664
+ CGColorRenderingIntent intent)
665
+ API_AVAILABLE(macos(10.0), ios(2.0));
666
+
667
+ /* Set target EDR headroom on a context to be used when rendering HDR content to the context.
668
+ The value of the 'headroom' will be adjusted as follows: (headroom < 0.0f) ? 0.0f : (headroom > 0.0f && headroom < 1.0f) ? 1.0f : headroom.
669
+ Please note that the headroom value of 0.0f means "headroom unknown" which prevents tone mapping.
670
+ Context 'c' needs to be a valid context. Return true on success and false on failure */
671
+
672
+ CG_EXTERN bool CGContextSetEDRTargetHeadroom(CGContextRef __nonnull c, float headroom) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
673
+
674
+ /* Return the EDR target headroom of the context `c'. */
675
+
676
+ CG_EXTERN float CGContextGetEDRTargetHeadroom(CGContextRef c) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
677
+
678
+ /** Image functions. **/
679
+
680
+ /* Draw `image' in the rectangular area specified by `rect' in the context
681
+ `c'. The image is scaled, if necessary, to fit into `rect'. */
682
+
683
+ CG_EXTERN void CGContextDrawImage(CGContextRef cg_nullable c, CGRect rect,
684
+ CGImageRef cg_nullable image)
685
+ API_AVAILABLE(macos(10.0), ios(2.0));
686
+
687
+ /* Draw `image' tiled in the context `c'. The image is scaled to the size
688
+ specified by `rect' in user space, positioned at the origin of `rect' in
689
+ user space, then replicated, stepping the width of `rect' horizontally
690
+ and the height of `rect' vertically, to fill the current clip region.
691
+ Unlike patterns, the image is tiled in user space, so transformations
692
+ applied to the CTM affect the final result. */
693
+
694
+ CG_EXTERN void CGContextDrawTiledImage(CGContextRef cg_nullable c, CGRect rect,
695
+ CGImageRef cg_nullable image)
696
+ API_AVAILABLE(macos(10.5), ios(2.0));
697
+
698
+ /* Draw `image' in the rectangular area specified by `rect' in the context
699
+ `c' applying the specified tone mapping method and options. See CGToneMapping.h for more info. Same as in CGContextDrawImage, the image is scaled, if necessary, to fit into `rect'. */
700
+
701
+ CG_EXTERN bool CGContextDrawImageApplyingToneMapping(CGContextRef __nonnull c, CGRect r, CGImageRef image, CGToneMapping method, CFDictionaryRef __nullable options) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
702
+
703
+ /* Return the CGContentToneMappingInfo for rendering HDR content in `context'. The
704
+ content tone mapping info is a gstate parameter which defines the method and method's
705
+ options performed when rendering HDR CGColors and CGImages.
706
+ Note that CGContextDrawImageApplyingToneMapping (described above) will override the
707
+ context's content tone mapping info. */
708
+
709
+ CG_EXTERN CGContentToneMappingInfo CGContextGetContentToneMappingInfo(CGContextRef __nonnull c)
710
+ CF_REFINED_FOR_SWIFT
711
+ API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0), visionos(26.0));
712
+
713
+ /* Set the content tone mapping info of `context' to `info'. */
714
+
715
+ CG_EXTERN void CGContextSetContentToneMappingInfo(CGContextRef __nonnull c, CGContentToneMappingInfo info)
716
+ CF_REFINED_FOR_SWIFT
717
+ API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), watchos(26.0), visionos(26.0));
718
+
719
+ /* Return the interpolation quality for image rendering of `context'. The
720
+ interpolation quality is a gstate parameter which controls the level of
721
+ interpolation performed when an image is interpolated (for example, when
722
+ scaling the image). Note that it is merely a hint to the context: not all
723
+ contexts support all interpolation quality levels. */
724
+
725
+ CG_EXTERN CGInterpolationQuality
726
+ CGContextGetInterpolationQuality(CGContextRef cg_nullable c)
727
+ API_AVAILABLE(macos(10.0), ios(2.0));
728
+
729
+ /* Set the interpolation quality of `context' to `quality'. */
730
+
731
+ CG_EXTERN void CGContextSetInterpolationQuality(CGContextRef cg_nullable c,
732
+ CGInterpolationQuality quality)
733
+ API_AVAILABLE(macos(10.0), ios(2.0));
734
+
735
+ /** Shadow support. **/
736
+
737
+ /* Set the shadow parameters in `context'. `offset' specifies a translation
738
+ in base-space; `blur' is a non-negative number specifying the amount of
739
+ blur; `color' specifies the color of the shadow, which may contain a
740
+ non-opaque alpha value. If `color' is NULL, it's equivalent to specifying
741
+ a fully transparent color. The shadow is a gstate parameter. After a
742
+ shadow is specified, all objects drawn subsequently will be shadowed. To
743
+ turn off shadowing, set the shadow color to a fully transparent color (or
744
+ pass NULL as the color), or use the standard gsave/grestore mechanism. */
745
+
746
+ CG_EXTERN void CGContextSetShadowWithColor(CGContextRef cg_nullable c,
747
+ CGSize offset, CGFloat blur, CGColorRef __nullable color)
748
+ API_AVAILABLE(macos(10.3), ios(2.0));
749
+
750
+ /* Equivalent to calling
751
+ CGContextSetShadowWithColor(context, offset, blur, color)
752
+ where color is black with 1/3 alpha (i.e., RGBA = {0, 0, 0, 1.0/3.0}) in
753
+ the DeviceRGB color space. */
754
+
755
+ CG_EXTERN void CGContextSetShadow(CGContextRef cg_nullable c, CGSize offset,
756
+ CGFloat blur)
757
+ API_AVAILABLE(macos(10.3), ios(2.0));
758
+
759
+ /** Gradient and shading functions. **/
760
+
761
+ /* Fill the current clipping region of `context' with a linear gradient from
762
+ `startPoint' to `endPoint'. The location 0 of `gradient' corresponds to
763
+ `startPoint'; the location 1 of `gradient' corresponds to `endPoint';
764
+ colors are linearly interpolated between these two points based on the
765
+ values of the gradient's locations. The option flags control whether the
766
+ gradient is drawn before the start point or after the end point. */
767
+
768
+ CG_EXTERN void CGContextDrawLinearGradient(CGContextRef cg_nullable c,
769
+ CGGradientRef cg_nullable gradient, CGPoint startPoint, CGPoint endPoint,
770
+ CGGradientDrawingOptions options)
771
+ API_AVAILABLE(macos(10.5), ios(2.0));
772
+
773
+ /* Fill the current clipping region of `context' with a radial gradient
774
+ between two circles defined by the center point and radius of each
775
+ circle. The location 0 of `gradient' corresponds to a circle centered at
776
+ `startCenter' with radius `startRadius'; the location 1 of `gradient'
777
+ corresponds to a circle centered at `endCenter' with radius `endRadius';
778
+ colors are linearly interpolated between these two circles based on the
779
+ values of the gradient's locations. The option flags control whether the
780
+ gradient is drawn before the start circle or after the end circle. */
781
+
782
+ CG_EXTERN void CGContextDrawRadialGradient(CGContextRef cg_nullable c,
783
+ CGGradientRef cg_nullable gradient, CGPoint startCenter, CGFloat startRadius,
784
+ CGPoint endCenter, CGFloat endRadius, CGGradientDrawingOptions options)
785
+ API_AVAILABLE(macos(10.5), ios(2.0));
786
+
787
+ /* Fill the current clipping region of `context' with a conic gradient
788
+ defined by the center point and rotation angle. The location 0 of `gradient'
789
+ corresponds to a initial rotation angle; the location 1 of `gradient'
790
+ corresponds to 360 degrees rotation from rotation angle; colors are linearly
791
+ interpolated over the full angle based on the values of the gradient's
792
+ locations. The 0 angle corresponds to positive x axis. The angle increases
793
+ towards positive y axis. */
794
+
795
+ CG_EXTERN void CGContextDrawConicGradient(CGContextRef _Nonnull c,
796
+ CGGradientRef _Nullable gradient, CGPoint center, CGFloat angle)
797
+ API_AVAILABLE(macos(14.0), ios(17.0));
798
+
799
+
800
+ /* Fill the current clipping region of `context' with `shading'. */
801
+
802
+ CG_EXTERN void CGContextDrawShading(CGContextRef cg_nullable c,
803
+ cg_nullable CGShadingRef shading)
804
+ API_AVAILABLE(macos(10.2), ios(2.0));
805
+
806
+ /** Text functions. **/
807
+
808
+ /* Set the current character spacing in `context' to `spacing'. The
809
+ character spacing is added to the displacement between the origin of one
810
+ character and the origin of the next. */
811
+
812
+ CG_EXTERN void CGContextSetCharacterSpacing(CGContextRef cg_nullable c,
813
+ CGFloat spacing)
814
+ API_AVAILABLE(macos(10.0), ios(2.0));
815
+
816
+ /* Set the user-space point at which text will be drawn in the context `c'
817
+ to `(x, y)'. */
818
+
819
+ CG_EXTERN void CGContextSetTextPosition(CGContextRef cg_nullable c,
820
+ CGFloat x, CGFloat y)
821
+ API_AVAILABLE(macos(10.0), ios(2.0));
822
+
823
+ /* Return the user-space point at which text will be drawn in `context'. */
824
+
825
+ CG_EXTERN CGPoint CGContextGetTextPosition(CGContextRef cg_nullable c)
826
+ API_AVAILABLE(macos(10.0), ios(2.0));
827
+
828
+ /* Set the text matrix in the context `c' to `t'. */
829
+
830
+ CG_EXTERN void CGContextSetTextMatrix(CGContextRef cg_nullable c,
831
+ CGAffineTransform t)
832
+ API_AVAILABLE(macos(10.0), ios(2.0));
833
+
834
+ /* Return the text matrix in the context `c'. Returns CGAffineTransformIdentity
835
+ if `c' is not a valid context. */
836
+
837
+ CG_EXTERN CGAffineTransform CGContextGetTextMatrix(CGContextRef cg_nullable c)
838
+ API_AVAILABLE(macos(10.0), ios(2.0));
839
+
840
+ /* Set the text drawing mode in the current graphics state of the context
841
+ `c' to `mode'. */
842
+
843
+ CG_EXTERN void CGContextSetTextDrawingMode(CGContextRef cg_nullable c,
844
+ CGTextDrawingMode mode)
845
+ API_AVAILABLE(macos(10.0), ios(2.0));
846
+
847
+ /* Set the font in the current graphics state of the context `c' to
848
+ `font'. */
849
+
850
+ CG_EXTERN void CGContextSetFont(CGContextRef cg_nullable c,
851
+ CGFontRef cg_nullable font)
852
+ API_AVAILABLE(macos(10.0), ios(2.0));
853
+
854
+ /* Set the font size in the current graphics state of the context `c' to
855
+ `size'. */
856
+
857
+ CG_EXTERN void CGContextSetFontSize(CGContextRef cg_nullable c, CGFloat size)
858
+ API_AVAILABLE(macos(10.0), ios(2.0));
859
+
860
+ /* Draw `glyphs', an array of `count' CGGlyphs, at the points specified by
861
+ `positions'. Each element of `positions' specifies the position from the
862
+ associated glyph; the positions are specified in user space. */
863
+
864
+ CG_EXTERN void CGContextShowGlyphsAtPositions(CGContextRef cg_nullable c,
865
+ const CGGlyph * cg_nullable glyphs, const CGPoint * cg_nullable Lpositions,
866
+ size_t count)
867
+ API_AVAILABLE(macos(10.5), ios(2.0));
868
+
869
+ /** PDF functions. **/
870
+
871
+ /* Draw `page' in the current user space of the context `c'. */
872
+
873
+ CG_EXTERN void CGContextDrawPDFPage(CGContextRef cg_nullable c,
874
+ CGPDFPageRef cg_nullable page)
875
+ API_AVAILABLE(macos(10.3), ios(2.0));
876
+
877
+ /** Output page functions. **/
878
+
879
+ /* Begin a new page. */
880
+
881
+ CG_EXTERN void CGContextBeginPage(CGContextRef cg_nullable c,
882
+ const CGRect * __nullable mediaBox)
883
+ API_AVAILABLE(macos(10.0), ios(2.0));
884
+
885
+ /* End the current page. */
886
+
887
+ CG_EXTERN void CGContextEndPage(CGContextRef cg_nullable c)
888
+ API_AVAILABLE(macos(10.0), ios(2.0));
889
+
890
+ /** Context functions. **/
891
+
892
+ /* Equivalent to `CFRetain(c)'. */
893
+
894
+ CG_EXTERN CGContextRef cg_nullable CGContextRetain(CGContextRef cg_nullable c)
895
+ API_AVAILABLE(macos(10.0), ios(2.0));
896
+
897
+ /* Equivalent to `CFRelease(c)'. */
898
+
899
+ CG_EXTERN void CGContextRelease(CGContextRef cg_nullable c)
900
+ API_AVAILABLE(macos(10.0), ios(2.0));
901
+
902
+ /* Flush all drawings to the destination. */
903
+
904
+ CG_EXTERN void CGContextFlush(CGContextRef cg_nullable c)
905
+ API_AVAILABLE(macos(10.0), ios(2.0));
906
+
907
+ /* Synchronize drawing. */
908
+
909
+ CG_EXTERN void CGContextSynchronize(CGContextRef cg_nullable c)
910
+ API_AVAILABLE(macos(10.0), ios(2.0));
911
+
912
+ /* Synchronize destination attributes with the context. */
913
+
914
+ CG_EXTERN void CGContextSynchronizeAttributes(CGContextRef c)
915
+ CF_SWIFT_NAME(CGContext.synchronizeAttributes(self:))
916
+ API_AVAILABLE(macos(26.0), ios(26.0));
917
+
918
+ /** Antialiasing functions. **/
919
+
920
+ /* Turn on antialiasing if `shouldAntialias' is true; turn it off otherwise.
921
+ This parameter is part of the graphics state. */
922
+
923
+ CG_EXTERN void CGContextSetShouldAntialias(CGContextRef cg_nullable c,
924
+ bool shouldAntialias)
925
+ API_AVAILABLE(macos(10.0), ios(2.0));
926
+
927
+ /* Allow antialiasing in `context' if `allowsAntialiasing' is true; don't
928
+ allow it otherwise. This parameter is not part of the graphics state. A
929
+ context will perform antialiasing if both `allowsAntialiasing' and the
930
+ graphics state parameter `shouldAntialias' are true. */
931
+
932
+ CG_EXTERN void CGContextSetAllowsAntialiasing(CGContextRef cg_nullable c,
933
+ bool allowsAntialiasing)
934
+ API_AVAILABLE(macos(10.4), ios(2.0));
935
+
936
+ /** Font display functions. **/
937
+
938
+ /* Turn on font smoothing if `shouldSmoothFonts' is true; turn it off
939
+ otherwise. This parameter is part of the graphics state. Note that this
940
+ doesn't guarantee that font smoothing will occur: not all destination
941
+ contexts support font smoothing. */
942
+
943
+ CG_EXTERN void CGContextSetShouldSmoothFonts(CGContextRef cg_nullable c,
944
+ bool shouldSmoothFonts)
945
+ API_AVAILABLE(macos(10.2), ios(2.0));
946
+
947
+ /* If `allowsFontSmoothing' is true, then allow font smoothing when
948
+ displaying text in `context'; otherwise, don't allow font smoothing. This
949
+ parameter is not part of the graphics state. Fonts will be smoothed if
950
+ they are antialiased when drawn and if both `allowsFontSmoothing' and the
951
+ graphics state parameter `shouldSmoothFonts' are true. */
952
+
953
+ CG_EXTERN void CGContextSetAllowsFontSmoothing(CGContextRef cg_nullable c,
954
+ bool allowsFontSmoothing)
955
+ API_AVAILABLE(macos(10.2), ios(2.0));
956
+
957
+ /* If `shouldSubpixelPositionFonts' is true, then glyphs may be placed at
958
+ subpixel positions (if allowed) when displaying text in `context';
959
+ otherwise, glyphs will be forced to integer pixel boundaries. This
960
+ parameter is part of the graphics state. */
961
+
962
+ CG_EXTERN void CGContextSetShouldSubpixelPositionFonts(
963
+ CGContextRef cg_nullable c, bool shouldSubpixelPositionFonts)
964
+ API_AVAILABLE(macos(10.5), ios(2.0));
965
+
966
+ /* If `allowsFontSubpixelPositioning' is true, then allow font subpixel
967
+ positioning when displaying text in `context'; otherwise, don't allow
968
+ subpixel positioning. This parameter is not part of the graphics state. A
969
+ context will place glyphs at subpixel positions if fonts will be
970
+ antialiased when drawn and if both `allowsFontSubpixelPositioning' and
971
+ the graphics state parameter `shouldSubpixelPositionFonts' are true. */
972
+
973
+ CG_EXTERN void CGContextSetAllowsFontSubpixelPositioning(
974
+ CGContextRef cg_nullable c, bool allowsFontSubpixelPositioning)
975
+ API_AVAILABLE(macos(10.5), ios(2.0));
976
+
977
+ /* If `shouldSubpixelQuantizeFonts' is true, then quantize the subpixel
978
+ positions of glyphs when displaying text in `context'; otherwise, don't
979
+ quantize the subpixel positions. This parameter is part of the graphics
980
+ state. */
981
+
982
+ CG_EXTERN void CGContextSetShouldSubpixelQuantizeFonts(
983
+ CGContextRef cg_nullable c, bool shouldSubpixelQuantizeFonts)
984
+ API_AVAILABLE(macos(10.5), ios(2.0));
985
+
986
+ /* If `allowsFontSubpixelQuantization' is true, then allow font subpixel
987
+ quantization when displaying text in `context'; otherwise, don't allow
988
+ subpixel quantization. This parameter is not part of the graphics state.
989
+ A context quantizes subpixel positions if glyphs will be drawn at
990
+ subpixel positions and `allowsFontSubpixelQuantization' and the graphics
991
+ state parameter `shouldSubpixelQuantizeFonts' are both true. */
992
+
993
+ CG_EXTERN void CGContextSetAllowsFontSubpixelQuantization(
994
+ CGContextRef cg_nullable c, bool allowsFontSubpixelQuantization)
995
+ API_AVAILABLE(macos(10.5), ios(2.0));
996
+
997
+ /** Transparency layer support. **/
998
+
999
+ /* Begin a transparency layer in `context'. All subsequent drawing
1000
+ operations until a corresponding `CGContextEndTransparencyLayer' are
1001
+ composited into a fully transparent backdrop (which is treated as a
1002
+ separate destination buffer from the context). After the transparency
1003
+ layer is ended, the result is composited into the context using the
1004
+ global alpha and shadow state of the context. This operation respects the
1005
+ clipping region of the context. After a call to this function, all of the
1006
+ parameters in the graphics state remain unchanged with the exception of
1007
+ the following:
1008
+ - The global alpha is set to 1.
1009
+ - The shadow is turned off.
1010
+ - The blend mode is set to `kCGBlendModeNormal'.
1011
+ Ending the transparency layer restores these parameters to the values
1012
+ they had before `CGContextBeginTransparencyLayer' was called.
1013
+ Transparency layers may be nested. */
1014
+
1015
+ CG_EXTERN void CGContextBeginTransparencyLayer(CGContextRef cg_nullable c,
1016
+ CFDictionaryRef __nullable auxiliaryInfo)
1017
+ API_AVAILABLE(macos(10.3), ios(2.0));
1018
+
1019
+ /* Begin a transparency layer in `context'. This function is identical to
1020
+ `CGContextBeginTransparencyLayer' except that the content of the
1021
+ transparency layer will be bounded by `rect' (specified in user space). */
1022
+
1023
+ CG_EXTERN void CGContextBeginTransparencyLayerWithRect(
1024
+ CGContextRef cg_nullable c, CGRect rect, CFDictionaryRef __nullable auxInfo)
1025
+ API_AVAILABLE(macos(10.5), ios(2.0));
1026
+
1027
+ /* End a tranparency layer. */
1028
+
1029
+ CG_EXTERN void CGContextEndTransparencyLayer(CGContextRef cg_nullable c)
1030
+ API_AVAILABLE(macos(10.3), ios(2.0));
1031
+
1032
+ /** User space to device space tranformations. **/
1033
+
1034
+ /* Return the affine transform mapping the user space (abstract coordinates)
1035
+ of `context' to device space (pixels). */
1036
+
1037
+ CG_EXTERN CGAffineTransform
1038
+ CGContextGetUserSpaceToDeviceSpaceTransform(CGContextRef cg_nullable c)
1039
+ API_AVAILABLE(macos(10.4), ios(2.0));
1040
+
1041
+ /* Transform `point' from the user space of `context' to device space. */
1042
+
1043
+ CG_EXTERN CGPoint CGContextConvertPointToDeviceSpace(CGContextRef cg_nullable c,
1044
+ CGPoint point)
1045
+ API_AVAILABLE(macos(10.4), ios(2.0));
1046
+
1047
+ /* Transform `point' from device space to the user space of `context'. */
1048
+
1049
+ CG_EXTERN CGPoint CGContextConvertPointToUserSpace(CGContextRef cg_nullable c,
1050
+ CGPoint point)
1051
+ API_AVAILABLE(macos(10.4), ios(2.0));
1052
+
1053
+ /* Transform `size' from the user space of `context' to device space. */
1054
+
1055
+ CG_EXTERN CGSize CGContextConvertSizeToDeviceSpace(CGContextRef cg_nullable c,
1056
+ CGSize size)
1057
+ API_AVAILABLE(macos(10.4), ios(2.0));
1058
+
1059
+ /* Transform `size' from device space to the user space of `context'. */
1060
+
1061
+ CG_EXTERN CGSize CGContextConvertSizeToUserSpace(CGContextRef cg_nullable c,
1062
+ CGSize size)
1063
+ API_AVAILABLE(macos(10.4), ios(2.0));
1064
+
1065
+ /* Transform `rect' from the user space of `context' to device space. Since
1066
+ affine transforms do not preserve rectangles in general, this function
1067
+ returns the smallest rectangle which contains the transformed corner
1068
+ points of `rect'. */
1069
+
1070
+ CG_EXTERN CGRect CGContextConvertRectToDeviceSpace(CGContextRef cg_nullable c,
1071
+ CGRect rect)
1072
+ API_AVAILABLE(macos(10.4), ios(2.0));
1073
+
1074
+ /* Transform `rect' from device space to the user space of `context'. Since
1075
+ affine transforms do not preserve rectangles in general, this function
1076
+ returns the smallest rectangle which contains the transformed corner
1077
+ points of `rect'. */
1078
+
1079
+ CG_EXTERN CGRect CGContextConvertRectToUserSpace(CGContextRef cg_nullable c,
1080
+ CGRect rect)
1081
+ API_AVAILABLE(macos(10.4), ios(2.0));
1082
+
1083
+ /** Deprecated functions. **/
1084
+
1085
+ /* DEPRECATED; use the CoreText API instead. */
1086
+
1087
+ CG_EXTERN void CGContextSelectFont(CGContextRef cg_nullable c,
1088
+ const char * cg_nullable name, CGFloat size, CGTextEncoding textEncoding)
1089
+ API_DEPRECATED("No longer supported", macos(10.0,10.9), ios(2.0,7.0));
1090
+
1091
+ /* DEPRECATED; use the CoreText API instead. */
1092
+
1093
+ CG_EXTERN void CGContextShowText(CGContextRef cg_nullable c,
1094
+ const char * cg_nullable string, size_t length)
1095
+ API_DEPRECATED("No longer supported", macos(10.0,10.9), ios(2.0,7.0));
1096
+
1097
+ /* DEPRECATED; use the CoreText API instead. */
1098
+
1099
+ CG_EXTERN void CGContextShowTextAtPoint(CGContextRef cg_nullable c,
1100
+ CGFloat x, CGFloat y, const char * cg_nullable string, size_t length)
1101
+ API_DEPRECATED("No longer supported", macos(10.0,10.9), ios(2.0,7.0));
1102
+
1103
+ /* DEPRECATED; use the CoreText API instead. */
1104
+
1105
+ CG_EXTERN void CGContextShowGlyphs(CGContextRef cg_nullable c,
1106
+ const CGGlyph * __nullable g, size_t count)
1107
+ API_DEPRECATED("No longer supported", macos(10.0,10.9), ios(2.0,7.0));
1108
+
1109
+ /* DEPRECATED; use the CoreText API instead. */
1110
+
1111
+ CG_EXTERN void CGContextShowGlyphsAtPoint(CGContextRef cg_nullable c, CGFloat x,
1112
+ CGFloat y, const CGGlyph * __nullable glyphs, size_t count)
1113
+ API_DEPRECATED("No longer supported", macos(10.0,10.9), ios(2.0,7.0));
1114
+
1115
+ /* DEPRECATED; use the CoreText API instead. */
1116
+
1117
+ CG_EXTERN void CGContextShowGlyphsWithAdvances(CGContextRef cg_nullable c,
1118
+ const CGGlyph * __nullable glyphs, const CGSize * __nullable advances,
1119
+ size_t count)
1120
+ API_DEPRECATED("No longer supported", macos(10.3,10.9), ios(2.0,7.0));
1121
+
1122
+ /* DEPRECATED; use the CGPDFPage API instead. */
1123
+
1124
+ CG_EXTERN void CGContextDrawPDFDocument(CGContextRef cg_nullable c, CGRect rect,
1125
+ CGPDFDocumentRef cg_nullable document, int page)
1126
+ API_DEPRECATED("No longer supported", macos(10.0,10.5)) API_UNAVAILABLE(ios, tvos, watchos);
1127
+
1128
+ CF_ASSUME_NONNULL_END
1129
+
1130
+ CF_IMPLICIT_BRIDGING_DISABLED
1131
+
1132
+ #endif /* CGCONTEXT_H_ */