Skip to content

Commit d7c15c6

Browse files
authored
Implement makeDynamicView (#564)
1 parent 5084387 commit d7c15c6

17 files changed

+1563
-15
lines changed

Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// AccessibilityCore.swift
3+
// OpenSwiftUICore
4+
//
5+
// Audited for 6.5.4
6+
// Status: TODO
7+
8+
package enum AccessibilityCore {}
9+
10+
extension _GraphInputs {
11+
package var needsAccessibility: Bool {
12+
get { options.contains(.needsAccessibility) }
13+
set { options.setValue(newValue, for: .needsAccessibility) }
14+
}
15+
}
16+
17+
extension _ViewInputs {
18+
package var needsAccessibility: Bool {
19+
get { base.needsAccessibility }
20+
set { base.needsAccessibility = newValue }
21+
}
22+
}
23+
24+
package struct WithinAccessibilityRotor: ViewInputBoolFlag {
25+
package init() {}
26+
}
27+
28+
extension _ViewInputs {
29+
@inline(__always)
30+
package var withinAccessibilityRotor: Bool {
31+
needsAccessibility && self[WithinAccessibilityRotor.self]
32+
}
33+
}

Sources/OpenSwiftUICore/Data/Util/StrongHash.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import CommonCrypto
1212
#endif
1313

1414
import Foundation
15+
import OpenAttributeGraphShims
1516
import OpenRenderBoxShims
1617

1718
package protocol StronglyHashable {
@@ -149,9 +150,15 @@ package struct StrongHasher {
149150
}
150151

151152
package mutating func combineType(_ type: any Any.Type) {
152-
// let signature = OAGTypeGetSignature
153-
// CC_SHA1_Update(&state, signature, 20)
154-
preconditionFailure("Blocked by latest OAGTypeGetSignature")
153+
let signature = Metadata(type).signature
154+
_ = withUnsafePointer(to: signature.bytes) { ptr in
155+
#if OPENSWIFTUI_SWIFT_CRYPTO
156+
// TODO: Auditd signature API design
157+
_openSwiftUIUnimplementedFailure()
158+
#else
159+
CC_SHA1_Update(&state, ptr, 20)
160+
#endif
161+
}
155162
}
156163
}
157164

0 commit comments

Comments
 (0)