peachsim 0.1.1692 → 0.1.1700
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.
- package/cli/bridge-flow-runner.ts +61 -39
- package/cli/commands/agent-wrapper.ts +21 -10
- package/cli/commands/control.ts +27 -7
- package/cli/commands/coverage.ts +1 -1
- package/cli/commands/detect.ts +17 -4
- package/cli/commands/maestro-compare.ts +25 -99
- package/cli/help-core.ts +3 -4
- package/cli/maestro-compare.ts +172 -4
- package/cli/outbound-endpoints.ts +2 -10
- package/detox/index.ts +15 -0
- package/detox/launch-permissions.ts +169 -0
- package/dist-lib/agent-daemon-client.cjs +2 -2
- package/dist-lib/agent-events.cjs +2 -2
- package/dist-lib/attached-projects.cjs +2 -2
- package/dist-lib/auth/shared-session.cjs +2 -2
- package/dist-lib/backend-origin.cjs +2 -2
- package/dist-lib/beta.cjs +2 -2
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +2 -2
- package/dist-lib/bridge-contract-input.cjs +2 -2
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +18273 -15925
- package/dist-lib/capture-contract.cjs +2 -2
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +2 -2
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +2 -2
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +104 -3
- package/dist-lib/dev-bundle-resolution.cjs +208 -44
- package/dist-lib/expo-swift-bundle.cjs +2349 -1778
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +2 -2
- package/dist-lib/host/bridge-host.cjs +7885 -3334
- package/dist-lib/host/fetch-proxy-handler.cjs +331 -39
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +2 -2
- package/dist-lib/host/websocket-proxy.cjs +2 -2
- package/dist-lib/index.cjs +297 -77
- package/dist-lib/jump-to-source-babel.cjs +2 -2
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +2 -2
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +2 -2
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +294 -74
- package/dist-lib/native-app-identity-project.cjs +48 -37
- package/dist-lib/native-app-identity-project.mjs +47 -36
- package/dist-lib/native-app-identity.cjs +2 -2
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +2 -2
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +2 -2
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib.json +199 -79
- package/dist-lib/react-native-host-modules.cjs +2 -2
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +19600 -15992
- package/dist-lib/swift-compile.cjs +640 -402
- package/dist-lib/swift-compile.mjs +595 -357
- package/dist-lib/swift-package.cjs +24 -20
- package/dist-lib/swift-package.mjs +23 -19
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +31 -4
- package/dist-lib/swift.cjs +2 -2
- package/dist-lib/vite-swift.cjs +1559 -1208
- package/dist-lib/vite.cjs +251 -42
- package/dist-lib/worklet-executable.cjs +2 -2
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
- package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -229
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
- package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
- package/sdk/ios/usr/include/copyfile.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
- package/sdk/ios/usr/include/malloc/_platform.h +80 -0
- package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
- package/sdk/ios/usr/include/malloc/malloc.h +768 -0
- package/sdk/ios/usr/include/os/availability.h +168 -6
- package/sdk/ios/usr/include/os/base.h +351 -0
- package/sdk/ios/usr/include/os/clock.h +18 -0
- package/sdk/ios/usr/include/os/lock.h +232 -10
- package/sdk/ios/usr/include/os/log.h +521 -38
- package/sdk/ios/usr/include/os/object.h +320 -3
- package/sdk/ios/usr/include/os/trace.h +492 -0
- package/sdk/ios/usr/include/os/trace_base.h +167 -0
- package/sdk/ios/usr/include/os/workgroup.h +37 -0
- package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
- package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
- package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
- package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
- package/sdk/ios/usr/include/sys/cdefs.h +38 -0
- package/sdk/ios/wasm/include/unistd.h +3 -0
- package/skills/contrast/SKILL.md +3 -0
- package/src/codex-client.ts +11 -6
- package/src/dev-bundle-resolution.ts +124 -48
- package/src/expo-native-workspace.ts +176 -0
- package/src/expo-swift-host.ts +161 -26
- package/src/expo-swift-ready.ts +14 -28
- package/src/expoSwiftContract.ts +4 -1
- package/src/generated/swift-c-predefines.json +68 -12
- package/src/host/bridge-host.ts +5 -0
- package/src/installed-package-versions.ts +14 -1
- package/src/metro-project-root.ts +44 -33
- package/src/native-app-identity-project.ts +1 -0
- package/src/nitro-adapter.lock.json +916 -10
- package/src/nitro-adapter.ts +33 -24
- package/src/nitro-bundle.ts +108 -22
- package/src/nitro-compile.ts +32 -5
- package/src/nitro-source.ts +13 -3
- package/src/nitroAdapterContract.ts +100 -20
- package/src/node-http-fetch.ts +116 -0
- package/src/packageVersionsContract.ts +46 -0
- package/src/serverDiscoveryContract.ts +1 -0
- package/src/settingsContract.ts +0 -30
- package/src/swift-binary-modules.ts +20 -5
- package/src/swift-compile.ts +168 -48
- package/src/swift-coverage/xcode-assets.ts +4 -3
- package/src/swift-host.ts +14 -3
- package/src/swift-objc-compile.ts +32 -5
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-platform.ts +2 -2
- package/src/swift-objc-standin.ts +43 -13
- package/src/swift-package.ts +33 -26
- package/src/swift-source-pods.ts +126 -41
- package/src/swift-standin-digest.ts +77 -0
- package/src/swift-standin-emit.ts +40 -4
- package/src/swift-standins.ts +68 -19
- package/src/swift-toolchain.ts +38 -0
- package/src/swiftContract.ts +8 -0
- package/src/vite-plugin.ts +0 -10
- package/src/xcode-project.ts +62 -42
- package/src/settings-flags.ts +0 -107
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* CFCalendar.h
|
|
2
|
+
Copyright (c) 2004-2019, Apple Inc. and the Swift project authors
|
|
3
|
+
|
|
4
|
+
Portions Copyright (c) 2014-2019, Apple Inc. and the Swift project authors
|
|
5
|
+
Licensed under Apache License v2.0 with Runtime Library Exception
|
|
6
|
+
See http://swift.org/LICENSE.txt for license information
|
|
7
|
+
See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#if !defined(__COREFOUNDATION_CFCALENDAR__)
|
|
11
|
+
#define __COREFOUNDATION_CFCALENDAR__ 1
|
|
12
|
+
|
|
13
|
+
#include <CoreFoundation/CFBase.h>
|
|
14
|
+
#include <CoreFoundation/CFLocale.h>
|
|
15
|
+
#include <CoreFoundation/CFDate.h>
|
|
16
|
+
#include <CoreFoundation/CFTimeZone.h>
|
|
17
|
+
|
|
18
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
19
|
+
CF_EXTERN_C_BEGIN
|
|
20
|
+
|
|
21
|
+
typedef struct CF_BRIDGED_MUTABLE_TYPE(NSCalendar) __CFCalendar * CFCalendarRef;
|
|
22
|
+
|
|
23
|
+
CF_EXPORT
|
|
24
|
+
CFTypeID CFCalendarGetTypeID(void);
|
|
25
|
+
|
|
26
|
+
CF_EXPORT
|
|
27
|
+
CFCalendarRef CFCalendarCopyCurrent(void);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
Creates a calendar. The identifiers are the `kCF*Calendar` constants in CFLocale.h.
|
|
31
|
+
**/
|
|
32
|
+
CF_EXPORT
|
|
33
|
+
CFCalendarRef CFCalendarCreateWithIdentifier(CFAllocatorRef allocator, CFCalendarIdentifier identifier);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
Returns the calendar's identifier.
|
|
37
|
+
*/
|
|
38
|
+
CF_EXPORT
|
|
39
|
+
CFCalendarIdentifier CFCalendarGetIdentifier(CFCalendarRef calendar);
|
|
40
|
+
|
|
41
|
+
CF_EXPORT
|
|
42
|
+
CFLocaleRef CFCalendarCopyLocale(CFCalendarRef calendar);
|
|
43
|
+
|
|
44
|
+
CF_EXPORT
|
|
45
|
+
void CFCalendarSetLocale(CFCalendarRef calendar, CFLocaleRef locale);
|
|
46
|
+
|
|
47
|
+
CF_EXPORT
|
|
48
|
+
CFTimeZoneRef CFCalendarCopyTimeZone(CFCalendarRef calendar);
|
|
49
|
+
|
|
50
|
+
CF_EXPORT
|
|
51
|
+
void CFCalendarSetTimeZone(CFCalendarRef calendar, CFTimeZoneRef tz);
|
|
52
|
+
|
|
53
|
+
CF_EXPORT
|
|
54
|
+
CFIndex CFCalendarGetFirstWeekday(CFCalendarRef calendar);
|
|
55
|
+
|
|
56
|
+
CF_EXPORT
|
|
57
|
+
void CFCalendarSetFirstWeekday(CFCalendarRef calendar, CFIndex wkdy);
|
|
58
|
+
|
|
59
|
+
CF_EXPORT
|
|
60
|
+
CFIndex CFCalendarGetMinimumDaysInFirstWeek(CFCalendarRef calendar);
|
|
61
|
+
|
|
62
|
+
CF_EXPORT
|
|
63
|
+
void CFCalendarSetMinimumDaysInFirstWeek(CFCalendarRef calendar, CFIndex mwd);
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
typedef CF_OPTIONS(CFOptionFlags, CFCalendarUnit) {
|
|
67
|
+
kCFCalendarUnitEra = (1UL << 1),
|
|
68
|
+
kCFCalendarUnitYear = (1UL << 2),
|
|
69
|
+
kCFCalendarUnitMonth = (1UL << 3),
|
|
70
|
+
kCFCalendarUnitDay = (1UL << 4),
|
|
71
|
+
kCFCalendarUnitHour = (1UL << 5),
|
|
72
|
+
kCFCalendarUnitMinute = (1UL << 6),
|
|
73
|
+
kCFCalendarUnitSecond = (1UL << 7),
|
|
74
|
+
kCFCalendarUnitWeek API_DEPRECATED("Use kCFCalendarUnitWeekOfYear or kCFCalendarUnitWeekOfMonth instead", macos(10.4,10.10), ios(2.0,8.0), watchos(2.0,2.0), tvos(9.0,9.0)) = (1UL << 8),
|
|
75
|
+
kCFCalendarUnitWeekday = (1UL << 9),
|
|
76
|
+
kCFCalendarUnitWeekdayOrdinal = (1UL << 10),
|
|
77
|
+
kCFCalendarUnitQuarter API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) = (1UL << 11),
|
|
78
|
+
kCFCalendarUnitWeekOfMonth API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = (1UL << 12),
|
|
79
|
+
kCFCalendarUnitWeekOfYear API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = (1UL << 13),
|
|
80
|
+
kCFCalendarUnitYearForWeekOfYear API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = (1UL << 14),
|
|
81
|
+
kCFCalendarUnitDayOfYear API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0)) = (1UL << 16),
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
CF_EXPORT
|
|
85
|
+
CFRange CFCalendarGetMinimumRangeOfUnit(CFCalendarRef calendar, CFCalendarUnit unit);
|
|
86
|
+
|
|
87
|
+
CF_EXPORT
|
|
88
|
+
CFRange CFCalendarGetMaximumRangeOfUnit(CFCalendarRef calendar, CFCalendarUnit unit);
|
|
89
|
+
|
|
90
|
+
CF_EXPORT
|
|
91
|
+
CFRange CFCalendarGetRangeOfUnit(CFCalendarRef calendar, CFCalendarUnit smallerUnit, CFCalendarUnit biggerUnit, CFAbsoluteTime at);
|
|
92
|
+
|
|
93
|
+
CF_EXPORT
|
|
94
|
+
CFIndex CFCalendarGetOrdinalityOfUnit(CFCalendarRef calendar, CFCalendarUnit smallerUnit, CFCalendarUnit biggerUnit, CFAbsoluteTime at);
|
|
95
|
+
|
|
96
|
+
CF_EXPORT
|
|
97
|
+
Boolean CFCalendarGetTimeRangeOfUnit(CFCalendarRef calendar, CFCalendarUnit unit, CFAbsoluteTime at, CFAbsoluteTime *startp, CFTimeInterval *tip) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
|
|
98
|
+
|
|
99
|
+
CF_EXPORT
|
|
100
|
+
Boolean CFCalendarComposeAbsoluteTime(CFCalendarRef calendar, /* out */ CFAbsoluteTime *at, const char *componentDesc, ...);
|
|
101
|
+
|
|
102
|
+
CF_EXPORT
|
|
103
|
+
Boolean CFCalendarDecomposeAbsoluteTime(CFCalendarRef calendar, CFAbsoluteTime at, const char *componentDesc, ...);
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
CF_ENUM(CFOptionFlags) {
|
|
107
|
+
kCFCalendarComponentsWrap = (1UL << 0) // option for adding
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
CF_EXPORT
|
|
111
|
+
Boolean CFCalendarAddComponents(CFCalendarRef calendar, /* inout */ CFAbsoluteTime *at, CFOptionFlags options, const char *componentDesc, ...);
|
|
112
|
+
|
|
113
|
+
CF_EXPORT
|
|
114
|
+
Boolean CFCalendarGetComponentDifference(CFCalendarRef calendar, CFAbsoluteTime startingAT, CFAbsoluteTime resultAT, CFOptionFlags options, const char *componentDesc, ...);
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
CF_EXTERN_C_END
|
|
118
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
119
|
+
|
|
120
|
+
#endif /* ! __COREFOUNDATION_CFCALENDAR__ */
|
|
121
|
+
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/* CFCharacterSet.h
|
|
2
|
+
Copyright (c) 1999-2019, Apple Inc. and the Swift project authors
|
|
3
|
+
|
|
4
|
+
Portions Copyright (c) 2014-2019, Apple Inc. and the Swift project authors
|
|
5
|
+
Licensed under Apache License v2.0 with Runtime Library Exception
|
|
6
|
+
See http://swift.org/LICENSE.txt for license information
|
|
7
|
+
See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/*!
|
|
11
|
+
@header CFCharacterSet
|
|
12
|
+
CFCharacterSet represents a set, or a bag, of Unicode characters.
|
|
13
|
+
The API consists of 3 groups:
|
|
14
|
+
1) creation/manipulation of CFCharacterSet instances,
|
|
15
|
+
2) query of a single Unicode character membership,
|
|
16
|
+
and 3) bitmap representation related (reading/writing).
|
|
17
|
+
Conceptually, CFCharacterSet is a 136K byte bitmap array of
|
|
18
|
+
which each bit represents a Unicode code point. It could
|
|
19
|
+
contain the Unicode characters in ISO 10646 Basic Multilingual
|
|
20
|
+
Plane (BMP) and characters in Plane 1 through Plane 16
|
|
21
|
+
accessible via surrogate paris in the Unicode Transformation
|
|
22
|
+
Format, 16-bit encoding form (UTF-16). In other words, it can
|
|
23
|
+
store values from 0x00000 to 0x10FFFF in the Unicode
|
|
24
|
+
Transformation Format, 32-bit encoding form (UTF-32). However,
|
|
25
|
+
in general, how CFCharacterSet stores the information is an
|
|
26
|
+
implementation detail. Note even CFData used for the external
|
|
27
|
+
bitmap representation rarely has 136K byte. For detailed
|
|
28
|
+
discussion of the external bitmap representation, refer to the
|
|
29
|
+
comments for CFCharacterSetCreateWithBitmapRepresentation below.
|
|
30
|
+
Note that the existance of non-BMP characters in a character set
|
|
31
|
+
does not imply the membership of the corresponding surrogate
|
|
32
|
+
characters. For example, a character set with U+10000 does not
|
|
33
|
+
match with U+D800.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
#if !defined(__COREFOUNDATION_CFCHARACTERSET__)
|
|
37
|
+
#define __COREFOUNDATION_CFCHARACTERSET__ 1
|
|
38
|
+
|
|
39
|
+
#include <CoreFoundation/CFBase.h>
|
|
40
|
+
#include <CoreFoundation/CFData.h>
|
|
41
|
+
|
|
42
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
43
|
+
CF_EXTERN_C_BEGIN
|
|
44
|
+
|
|
45
|
+
/*!
|
|
46
|
+
@typedef CFCharacterSetRef
|
|
47
|
+
This is the type of a reference to immutable CFCharacterSets.
|
|
48
|
+
*/
|
|
49
|
+
typedef const struct CF_BRIDGED_TYPE(NSCharacterSet) __CFCharacterSet * CFCharacterSetRef;
|
|
50
|
+
|
|
51
|
+
/*!
|
|
52
|
+
@typedef CFMutableCharacterSetRef
|
|
53
|
+
This is the type of a reference to mutable CFMutableCharacterSets.
|
|
54
|
+
*/
|
|
55
|
+
typedef struct CF_BRIDGED_MUTABLE_TYPE(NSMutableCharacterSet) __CFCharacterSet * CFMutableCharacterSetRef;
|
|
56
|
+
|
|
57
|
+
/*!
|
|
58
|
+
@typedef CFCharacterSetPredefinedSet
|
|
59
|
+
Type of the predefined CFCharacterSet selector values.
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
typedef CF_ENUM(CFIndex, CFCharacterSetPredefinedSet) {
|
|
63
|
+
kCFCharacterSetControl = 1, /* Control character set (Unicode General Category Cc and Cf) */
|
|
64
|
+
kCFCharacterSetWhitespace, /* Whitespace character set (Unicode General Category Zs and U0009 CHARACTER TABULATION) */
|
|
65
|
+
kCFCharacterSetWhitespaceAndNewline, /* Whitespace and Newline character set (Unicode General Category Z*, U000A ~ U000D, and U0085) */
|
|
66
|
+
kCFCharacterSetDecimalDigit, /* Decimal digit character set */
|
|
67
|
+
kCFCharacterSetLetter, /* Letter character set (Unicode General Category L* & M*) */
|
|
68
|
+
kCFCharacterSetLowercaseLetter, /* Lowercase character set (Unicode General Category Ll) */
|
|
69
|
+
kCFCharacterSetUppercaseLetter, /* Uppercase character set (Unicode General Category Lu and Lt) */
|
|
70
|
+
kCFCharacterSetNonBase, /* Non-base character set (Unicode General Category M*) */
|
|
71
|
+
kCFCharacterSetDecomposable, /* Canonically decomposable character set */
|
|
72
|
+
kCFCharacterSetAlphaNumeric, /* Alpha Numeric character set (Unicode General Category L*, M*, & N*) */
|
|
73
|
+
kCFCharacterSetPunctuation, /* Punctuation character set (Unicode General Category P*) */
|
|
74
|
+
kCFCharacterSetCapitalizedLetter = 13, /* Titlecase character set (Unicode General Category Lt) */
|
|
75
|
+
kCFCharacterSetSymbol = 14, /* Symbol character set (Unicode General Category S*) */
|
|
76
|
+
kCFCharacterSetNewline API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 15, /* Newline character set (U000A ~ U000D, U0085, U2028, and U2029) */
|
|
77
|
+
kCFCharacterSetIllegal = 12/* Illegal character set */
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/*!
|
|
81
|
+
@function CFCharacterSetGetTypeID
|
|
82
|
+
Returns the type identifier of all CFCharacterSet instances.
|
|
83
|
+
*/
|
|
84
|
+
CF_EXPORT
|
|
85
|
+
CFTypeID CFCharacterSetGetTypeID(void);
|
|
86
|
+
|
|
87
|
+
/*!
|
|
88
|
+
@function CFCharacterSetGetPredefined
|
|
89
|
+
Returns a predefined CFCharacterSet instance.
|
|
90
|
+
@param theSetIdentifier The CFCharacterSetPredefinedSet selector
|
|
91
|
+
which specifies the predefined character set. If the
|
|
92
|
+
value is not in CFCharacterSetPredefinedSet, the behavior
|
|
93
|
+
is undefined.
|
|
94
|
+
@result A reference to the predefined immutable CFCharacterSet.
|
|
95
|
+
This instance is owned by CF.
|
|
96
|
+
*/
|
|
97
|
+
CF_EXPORT
|
|
98
|
+
CFCharacterSetRef CFCharacterSetGetPredefined(CFCharacterSetPredefinedSet theSetIdentifier);
|
|
99
|
+
|
|
100
|
+
/*!
|
|
101
|
+
@function CFCharacterSetCreateWithCharactersInRange
|
|
102
|
+
Creates a new immutable character set with the values from the given range.
|
|
103
|
+
@param alloc The CFAllocator which should be used to allocate
|
|
104
|
+
memory for the array and its storage for values. This
|
|
105
|
+
parameter may be NULL in which case the current default
|
|
106
|
+
CFAllocator is used. If this reference is not a valid
|
|
107
|
+
CFAllocator, the behavior is undefined.
|
|
108
|
+
@param theRange The CFRange which should be used to specify the
|
|
109
|
+
Unicode range the character set is filled with. It
|
|
110
|
+
accepts the range in 32-bit in the UTF-32 format. The
|
|
111
|
+
valid character point range is from 0x00000 to 0x10FFFF.
|
|
112
|
+
If the range is outside of the valid Unicode character
|
|
113
|
+
point, the behavior is undefined.
|
|
114
|
+
@result A reference to the new immutable CFCharacterSet.
|
|
115
|
+
*/
|
|
116
|
+
CF_EXPORT
|
|
117
|
+
CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange(CFAllocatorRef alloc, CFRange theRange);
|
|
118
|
+
|
|
119
|
+
/*!
|
|
120
|
+
@function CFCharacterSetCreateWithCharactersInString
|
|
121
|
+
Creates a new immutable character set with the values in the given string.
|
|
122
|
+
@param alloc The CFAllocator which should be used to allocate
|
|
123
|
+
memory for the array and its storage for values. This
|
|
124
|
+
parameter may be NULL in which case the current default
|
|
125
|
+
CFAllocator is used. If this reference is not a valid
|
|
126
|
+
CFAllocator, the behavior is undefined.
|
|
127
|
+
@param theString The CFString which should be used to specify
|
|
128
|
+
the Unicode characters the character set is filled with.
|
|
129
|
+
If this parameter is not a valid CFString, the behavior
|
|
130
|
+
is undefined.
|
|
131
|
+
@result A reference to the new immutable CFCharacterSet.
|
|
132
|
+
*/
|
|
133
|
+
CF_EXPORT
|
|
134
|
+
CFCharacterSetRef CFCharacterSetCreateWithCharactersInString(CFAllocatorRef alloc, CFStringRef theString);
|
|
135
|
+
|
|
136
|
+
/*!
|
|
137
|
+
@function CFCharacterSetCreateWithBitmapRepresentation
|
|
138
|
+
Creates a new immutable character set with the bitmap representtion in the given data.
|
|
139
|
+
@param alloc The CFAllocator which should be used to allocate
|
|
140
|
+
memory for the array and its storage for values. This
|
|
141
|
+
parameter may be NULL in which case the current default
|
|
142
|
+
CFAllocator is used. If this reference is not a valid
|
|
143
|
+
CFAllocator, the behavior is undefined.
|
|
144
|
+
@param theData The CFData which should be used to specify the
|
|
145
|
+
bitmap representation of the Unicode character points
|
|
146
|
+
the character set is filled with. The bitmap
|
|
147
|
+
representation could contain all the Unicode character
|
|
148
|
+
range starting from BMP to Plane 16. The first 8192 bytes
|
|
149
|
+
of the data represent the BMP range. The BMP range 8192
|
|
150
|
+
bytes can be followed by zero to sixteen 8192 byte
|
|
151
|
+
bitmaps, each one with the plane index byte prepended.
|
|
152
|
+
For example, the bitmap representing the BMP and Plane 2
|
|
153
|
+
has the size of 16385 bytes (8192 bytes for BMP, 1 byte
|
|
154
|
+
index + 8192 bytes bitmap for Plane 2). The plane index
|
|
155
|
+
byte, in this case, contains the integer value two. If
|
|
156
|
+
this parameter is not a valid CFData or it contains a
|
|
157
|
+
Plane index byte outside of the valid Plane range
|
|
158
|
+
(1 to 16), the behavior is undefined.
|
|
159
|
+
@result A reference to the new immutable CFCharacterSet.
|
|
160
|
+
*/
|
|
161
|
+
CF_EXPORT
|
|
162
|
+
CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation(CFAllocatorRef alloc, CFDataRef theData);
|
|
163
|
+
|
|
164
|
+
/*!
|
|
165
|
+
@function CFCharacterSetCreateInvertedSet
|
|
166
|
+
Creates a new immutable character set that is the invert of the specified character set.
|
|
167
|
+
@param alloc The CFAllocator which should be used to allocate
|
|
168
|
+
memory for the array and its storage for values. This
|
|
169
|
+
parameter may be NULL in which case the current default
|
|
170
|
+
CFAllocator is used. If this reference is not a valid
|
|
171
|
+
CFAllocator, the behavior is undefined.
|
|
172
|
+
@param theSet The CFCharacterSet which is to be inverted. If this
|
|
173
|
+
parameter is not a valid CFCharacterSet, the behavior is
|
|
174
|
+
undefined.
|
|
175
|
+
@result A reference to the new immutable CFCharacterSet.
|
|
176
|
+
*/
|
|
177
|
+
CF_EXPORT CFCharacterSetRef CFCharacterSetCreateInvertedSet(CFAllocatorRef alloc, CFCharacterSetRef theSet);
|
|
178
|
+
|
|
179
|
+
/*!
|
|
180
|
+
@function CFCharacterSetIsSupersetOfSet
|
|
181
|
+
Reports whether or not the character set is a superset of the character set specified as the second parameter.
|
|
182
|
+
@param theSet The character set to be checked for the membership of theOtherSet.
|
|
183
|
+
If this parameter is not a valid CFCharacterSet, the behavior is undefined.
|
|
184
|
+
@param theOtherset The character set to be checked whether or not it is a subset of theSet.
|
|
185
|
+
If this parameter is not a valid CFCharacterSet, the behavior is undefined.
|
|
186
|
+
*/
|
|
187
|
+
CF_EXPORT Boolean CFCharacterSetIsSupersetOfSet(CFCharacterSetRef theSet, CFCharacterSetRef theOtherset);
|
|
188
|
+
|
|
189
|
+
/*!
|
|
190
|
+
@function CFCharacterSetHasMemberInPlane
|
|
191
|
+
Reports whether or not the character set contains at least one member character in the specified plane.
|
|
192
|
+
@param theSet The character set to be checked for the membership. If this
|
|
193
|
+
parameter is not a valid CFCharacterSet, the behavior is undefined.
|
|
194
|
+
@param thePlane The plane number to be checked for the membership.
|
|
195
|
+
The valid value range is from 0 to 16. If the value is outside of the valid
|
|
196
|
+
plane number range, the behavior is undefined.
|
|
197
|
+
*/
|
|
198
|
+
CF_EXPORT Boolean CFCharacterSetHasMemberInPlane(CFCharacterSetRef theSet, CFIndex thePlane);
|
|
199
|
+
|
|
200
|
+
/*!
|
|
201
|
+
@function CFCharacterSetCreateMutable
|
|
202
|
+
Creates a new empty mutable character set.
|
|
203
|
+
@param alloc The CFAllocator which should be used to allocate
|
|
204
|
+
memory for the array and its storage for values. This
|
|
205
|
+
parameter may be NULL in which case the current default
|
|
206
|
+
CFAllocator is used. If this reference is not a valid
|
|
207
|
+
CFAllocator, the behavior is undefined.
|
|
208
|
+
@result A reference to the new mutable CFCharacterSet.
|
|
209
|
+
*/
|
|
210
|
+
CF_EXPORT
|
|
211
|
+
CFMutableCharacterSetRef CFCharacterSetCreateMutable(CFAllocatorRef alloc);
|
|
212
|
+
|
|
213
|
+
/*!
|
|
214
|
+
@function CFCharacterSetCreateCopy
|
|
215
|
+
Creates a new character set with the values from the given character set. This function tries to compact the backing store where applicable.
|
|
216
|
+
@param alloc The CFAllocator which should be used to allocate
|
|
217
|
+
memory for the array and its storage for values. This
|
|
218
|
+
parameter may be NULL in which case the current default
|
|
219
|
+
CFAllocator is used. If this reference is not a valid
|
|
220
|
+
CFAllocator, the behavior is undefined.
|
|
221
|
+
@param theSet The CFCharacterSet which is to be copied. If this
|
|
222
|
+
parameter is not a valid CFCharacterSet, the behavior is
|
|
223
|
+
undefined.
|
|
224
|
+
@result A reference to the new CFCharacterSet.
|
|
225
|
+
*/
|
|
226
|
+
CF_EXPORT
|
|
227
|
+
CFCharacterSetRef CFCharacterSetCreateCopy(CFAllocatorRef alloc, CFCharacterSetRef theSet);
|
|
228
|
+
|
|
229
|
+
/*!
|
|
230
|
+
@function CFCharacterSetCreateMutableCopy
|
|
231
|
+
Creates a new mutable character set with the values from the given character set.
|
|
232
|
+
@param alloc The CFAllocator which should be used to allocate
|
|
233
|
+
memory for the array and its storage for values. This
|
|
234
|
+
parameter may be NULL in which case the current default
|
|
235
|
+
CFAllocator is used. If this reference is not a valid
|
|
236
|
+
CFAllocator, the behavior is undefined.
|
|
237
|
+
@param theSet The CFCharacterSet which is to be copied. If this
|
|
238
|
+
parameter is not a valid CFCharacterSet, the behavior is
|
|
239
|
+
undefined.
|
|
240
|
+
@result A reference to the new mutable CFCharacterSet.
|
|
241
|
+
*/
|
|
242
|
+
CF_EXPORT
|
|
243
|
+
CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy(CFAllocatorRef alloc, CFCharacterSetRef theSet);
|
|
244
|
+
|
|
245
|
+
/*!
|
|
246
|
+
@function CFCharacterSetIsCharacterMember
|
|
247
|
+
Reports whether or not the Unicode character is in the character set.
|
|
248
|
+
@param theSet The character set to be searched. If this parameter
|
|
249
|
+
is not a valid CFCharacterSet, the behavior is undefined.
|
|
250
|
+
@param theChar The Unicode character for which to test against the
|
|
251
|
+
character set. Note that this function takes 16-bit Unicode
|
|
252
|
+
character value; hence, it does not support access to the
|
|
253
|
+
non-BMP planes.
|
|
254
|
+
@result true, if the value is in the character set, otherwise false.
|
|
255
|
+
*/
|
|
256
|
+
CF_EXPORT
|
|
257
|
+
Boolean CFCharacterSetIsCharacterMember(CFCharacterSetRef theSet, UniChar theChar);
|
|
258
|
+
|
|
259
|
+
/*!
|
|
260
|
+
@function CFCharacterSetIsLongCharacterMember
|
|
261
|
+
Reports whether or not the UTF-32 character is in the character set.
|
|
262
|
+
@param theSet The character set to be searched. If this parameter
|
|
263
|
+
is not a valid CFCharacterSet, the behavior is undefined.
|
|
264
|
+
@param theChar The UTF-32 character for which to test against the
|
|
265
|
+
character set.
|
|
266
|
+
@result true, if the value is in the character set, otherwise false.
|
|
267
|
+
*/
|
|
268
|
+
CF_EXPORT Boolean CFCharacterSetIsLongCharacterMember(CFCharacterSetRef theSet, UTF32Char theChar);
|
|
269
|
+
|
|
270
|
+
/*!
|
|
271
|
+
@function CFCharacterSetCreateBitmapRepresentation
|
|
272
|
+
Creates a new immutable data with the bitmap representation from the given character set.
|
|
273
|
+
@param alloc The CFAllocator which should be used to allocate
|
|
274
|
+
memory for the array and its storage for values. This
|
|
275
|
+
parameter may be NULL in which case the current default
|
|
276
|
+
CFAllocator is used. If this reference is not a valid
|
|
277
|
+
CFAllocator, the behavior is undefined.
|
|
278
|
+
@param theSet The CFCharacterSet which is to be used create the
|
|
279
|
+
bitmap representation from. Refer to the comments for
|
|
280
|
+
CFCharacterSetCreateWithBitmapRepresentation for the
|
|
281
|
+
detailed discussion of the bitmap representation format.
|
|
282
|
+
If this parameter is not a valid CFCharacterSet, the
|
|
283
|
+
behavior is undefined.
|
|
284
|
+
@result A reference to the new immutable CFData.
|
|
285
|
+
*/
|
|
286
|
+
CF_EXPORT
|
|
287
|
+
CFDataRef CFCharacterSetCreateBitmapRepresentation(CFAllocatorRef alloc, CFCharacterSetRef theSet);
|
|
288
|
+
|
|
289
|
+
/*!
|
|
290
|
+
@function CFCharacterSetAddCharactersInRange
|
|
291
|
+
Adds the given range to the charaacter set.
|
|
292
|
+
@param theSet The character set to which the range is to be added.
|
|
293
|
+
If this parameter is not a valid mutable CFCharacterSet,
|
|
294
|
+
the behavior is undefined.
|
|
295
|
+
@param theRange The range to add to the character set. It accepts
|
|
296
|
+
the range in 32-bit in the UTF-32 format. The valid
|
|
297
|
+
character point range is from 0x00000 to 0x10FFFF. If the
|
|
298
|
+
range is outside of the valid Unicode character point,
|
|
299
|
+
the behavior is undefined.
|
|
300
|
+
*/
|
|
301
|
+
CF_EXPORT
|
|
302
|
+
void CFCharacterSetAddCharactersInRange(CFMutableCharacterSetRef theSet, CFRange theRange);
|
|
303
|
+
|
|
304
|
+
/*!
|
|
305
|
+
@function CFCharacterSetRemoveCharactersInRange
|
|
306
|
+
Removes the given range from the charaacter set.
|
|
307
|
+
@param theSet The character set from which the range is to be
|
|
308
|
+
removed. If this parameter is not a valid mutable
|
|
309
|
+
CFCharacterSet, the behavior is undefined.
|
|
310
|
+
@param theRange The range to remove from the character set.
|
|
311
|
+
It accepts the range in 32-bit in the UTF-32 format.
|
|
312
|
+
The valid character point range is from 0x00000 to 0x10FFFF.
|
|
313
|
+
If the range is outside of the valid Unicode character point,
|
|
314
|
+
the behavior is undefined.
|
|
315
|
+
*/
|
|
316
|
+
CF_EXPORT
|
|
317
|
+
void CFCharacterSetRemoveCharactersInRange(CFMutableCharacterSetRef theSet, CFRange theRange);
|
|
318
|
+
|
|
319
|
+
/*!
|
|
320
|
+
@function CFCharacterSetAddCharactersInString
|
|
321
|
+
Adds the characters in the given string to the charaacter set.
|
|
322
|
+
@param theSet The character set to which the characters in the
|
|
323
|
+
string are to be added. If this parameter is not a
|
|
324
|
+
valid mutable CFCharacterSet, the behavior is undefined.
|
|
325
|
+
@param theString The string to add to the character set.
|
|
326
|
+
If this parameter is not a valid CFString, the behavior
|
|
327
|
+
is undefined.
|
|
328
|
+
*/
|
|
329
|
+
CF_EXPORT
|
|
330
|
+
void CFCharacterSetAddCharactersInString(CFMutableCharacterSetRef theSet, CFStringRef theString);
|
|
331
|
+
|
|
332
|
+
/*!
|
|
333
|
+
@function CFCharacterSetRemoveCharactersInString
|
|
334
|
+
Removes the characters in the given string from the charaacter set.
|
|
335
|
+
@param theSet The character set from which the characters in the
|
|
336
|
+
string are to be remove. If this parameter is not a
|
|
337
|
+
valid mutable CFCharacterSet, the behavior is undefined.
|
|
338
|
+
@param theString The string to remove from the character set.
|
|
339
|
+
If this parameter is not a valid CFString, the behavior
|
|
340
|
+
is undefined.
|
|
341
|
+
*/
|
|
342
|
+
CF_EXPORT
|
|
343
|
+
void CFCharacterSetRemoveCharactersInString(CFMutableCharacterSetRef theSet, CFStringRef theString);
|
|
344
|
+
|
|
345
|
+
/*!
|
|
346
|
+
@function CFCharacterSetUnion
|
|
347
|
+
Forms the union with the given character set.
|
|
348
|
+
@param theSet The destination character set into which the
|
|
349
|
+
union of the two character sets is stored. If this
|
|
350
|
+
parameter is not a valid mutable CFCharacterSet, the
|
|
351
|
+
behavior is undefined.
|
|
352
|
+
@param theOtherSet The character set with which the union is
|
|
353
|
+
formed. If this parameter is not a valid CFCharacterSet,
|
|
354
|
+
the behavior is undefined.
|
|
355
|
+
*/
|
|
356
|
+
CF_EXPORT
|
|
357
|
+
void CFCharacterSetUnion(CFMutableCharacterSetRef theSet, CFCharacterSetRef theOtherSet);
|
|
358
|
+
|
|
359
|
+
/*!
|
|
360
|
+
@function CFCharacterSetIntersect
|
|
361
|
+
Forms the intersection with the given character set.
|
|
362
|
+
@param theSet The destination character set into which the
|
|
363
|
+
intersection of the two character sets is stored.
|
|
364
|
+
If this parameter is not a valid mutable CFCharacterSet,
|
|
365
|
+
the behavior is undefined.
|
|
366
|
+
@param theOtherSet The character set with which the intersection
|
|
367
|
+
is formed. If this parameter is not a valid CFCharacterSet,
|
|
368
|
+
the behavior is undefined.
|
|
369
|
+
*/
|
|
370
|
+
CF_EXPORT
|
|
371
|
+
void CFCharacterSetIntersect(CFMutableCharacterSetRef theSet, CFCharacterSetRef theOtherSet);
|
|
372
|
+
|
|
373
|
+
/*!
|
|
374
|
+
@function CFCharacterSetInvert
|
|
375
|
+
Inverts the content of the given character set.
|
|
376
|
+
@param theSet The character set to be inverted.
|
|
377
|
+
If this parameter is not a valid mutable CFCharacterSet,
|
|
378
|
+
the behavior is undefined.
|
|
379
|
+
*/
|
|
380
|
+
CF_EXPORT
|
|
381
|
+
void CFCharacterSetInvert(CFMutableCharacterSetRef theSet);
|
|
382
|
+
|
|
383
|
+
CF_EXTERN_C_END
|
|
384
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
385
|
+
|
|
386
|
+
#endif /* ! __COREFOUNDATION_CFCHARACTERSET__ */
|
|
387
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* CFData.h
|
|
2
|
+
Copyright (c) 1998-2019, Apple Inc. and the Swift project authors
|
|
3
|
+
|
|
4
|
+
Portions Copyright (c) 2014-2019, Apple Inc. and the Swift project authors
|
|
5
|
+
Licensed under Apache License v2.0 with Runtime Library Exception
|
|
6
|
+
See http://swift.org/LICENSE.txt for license information
|
|
7
|
+
See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#if !defined(__COREFOUNDATION_CFDATA__)
|
|
11
|
+
#define __COREFOUNDATION_CFDATA__ 1
|
|
12
|
+
|
|
13
|
+
#include <CoreFoundation/CFBase.h>
|
|
14
|
+
|
|
15
|
+
CF_IMPLICIT_BRIDGING_ENABLED
|
|
16
|
+
CF_EXTERN_C_BEGIN
|
|
17
|
+
|
|
18
|
+
typedef const struct CF_BRIDGED_TYPE(NSData) __CFData * CFDataRef;
|
|
19
|
+
typedef struct CF_BRIDGED_MUTABLE_TYPE(NSMutableData) __CFData * CFMutableDataRef;
|
|
20
|
+
|
|
21
|
+
CF_EXPORT
|
|
22
|
+
CFTypeID CFDataGetTypeID(void);
|
|
23
|
+
|
|
24
|
+
CF_EXPORT
|
|
25
|
+
CFDataRef CFDataCreate(CFAllocatorRef allocator, const UInt8 *bytes, CFIndex length);
|
|
26
|
+
|
|
27
|
+
CF_EXPORT
|
|
28
|
+
CFDataRef CFDataCreateWithBytesNoCopy(CFAllocatorRef allocator, const UInt8 *bytes, CFIndex length, CFAllocatorRef bytesDeallocator);
|
|
29
|
+
/* Pass kCFAllocatorNull as bytesDeallocator to assure the bytes aren't freed */
|
|
30
|
+
|
|
31
|
+
CF_EXPORT
|
|
32
|
+
CFDataRef CFDataCreateCopy(CFAllocatorRef allocator, CFDataRef theData);
|
|
33
|
+
|
|
34
|
+
CF_EXPORT
|
|
35
|
+
CFMutableDataRef CFDataCreateMutable(CFAllocatorRef allocator, CFIndex capacity);
|
|
36
|
+
|
|
37
|
+
CF_EXPORT
|
|
38
|
+
CFMutableDataRef CFDataCreateMutableCopy(CFAllocatorRef allocator, CFIndex capacity, CFDataRef theData);
|
|
39
|
+
|
|
40
|
+
CF_EXPORT
|
|
41
|
+
CFIndex CFDataGetLength(CFDataRef theData);
|
|
42
|
+
|
|
43
|
+
CF_EXPORT
|
|
44
|
+
const UInt8 *CFDataGetBytePtr(CFDataRef theData);
|
|
45
|
+
|
|
46
|
+
CF_EXPORT
|
|
47
|
+
UInt8 *CFDataGetMutableBytePtr(CFMutableDataRef theData);
|
|
48
|
+
|
|
49
|
+
CF_EXPORT
|
|
50
|
+
void CFDataGetBytes(CFDataRef theData, CFRange range, UInt8 *buffer);
|
|
51
|
+
|
|
52
|
+
CF_EXPORT
|
|
53
|
+
void CFDataSetLength(CFMutableDataRef theData, CFIndex length);
|
|
54
|
+
|
|
55
|
+
CF_EXPORT
|
|
56
|
+
void CFDataIncreaseLength(CFMutableDataRef theData, CFIndex extraLength);
|
|
57
|
+
|
|
58
|
+
CF_EXPORT
|
|
59
|
+
void CFDataAppendBytes(CFMutableDataRef theData, const UInt8 *bytes, CFIndex length);
|
|
60
|
+
|
|
61
|
+
CF_EXPORT
|
|
62
|
+
void CFDataReplaceBytes(CFMutableDataRef theData, CFRange range, const UInt8 *newBytes, CFIndex newLength);
|
|
63
|
+
|
|
64
|
+
CF_EXPORT
|
|
65
|
+
void CFDataDeleteBytes(CFMutableDataRef theData, CFRange range);
|
|
66
|
+
|
|
67
|
+
typedef CF_OPTIONS(CFOptionFlags, CFDataSearchFlags) {
|
|
68
|
+
kCFDataSearchBackwards = 1UL << 0,
|
|
69
|
+
kCFDataSearchAnchored = 1UL << 1
|
|
70
|
+
} API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
71
|
+
|
|
72
|
+
CF_EXPORT
|
|
73
|
+
CFRange CFDataFind(CFDataRef theData, CFDataRef dataToFind, CFRange searchRange, CFDataSearchFlags compareOptions) API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
|
|
74
|
+
|
|
75
|
+
CF_EXTERN_C_END
|
|
76
|
+
CF_IMPLICIT_BRIDGING_DISABLED
|
|
77
|
+
|
|
78
|
+
#endif /* ! __COREFOUNDATION_CFDATA__ */
|
|
79
|
+
|