|
7 | 7 |
|
8 | 8 | internal import OpenGraphShims
|
9 | 9 |
|
| 10 | +// MARK: - ViewRendererHostProperties |
| 11 | + |
| 12 | +package struct ViewRendererHostProperties: OptionSet { |
| 13 | + package let rawValue: UInt16 |
| 14 | + package init(rawValue: UInt16) { |
| 15 | + self.rawValue = rawValue |
| 16 | + } |
| 17 | + package static let rootView: ViewRendererHostProperties = .init(rawValue: 1 << 0) |
| 18 | + package static let environment: ViewRendererHostProperties = .init(rawValue: 1 << 1) |
| 19 | + package static let focusedValues: ViewRendererHostProperties = .init(rawValue: 1 << 2) |
| 20 | + package static let transform: ViewRendererHostProperties = .init(rawValue: 1 << 3) |
| 21 | + package static let size: ViewRendererHostProperties = .init(rawValue: 1 << 4) |
| 22 | + package static let safeArea: ViewRendererHostProperties = .init(rawValue: 1 << 5) |
| 23 | + package static let scrollableContainerSize: ViewRendererHostProperties = .init(rawValue: 1 << 6) |
| 24 | + package static let focusStore: ViewRendererHostProperties = .init(rawValue: 1 << 7) |
| 25 | + package static let accessibilityFocusStore: ViewRendererHostProperties = .init(rawValue: 1 << 8) |
| 26 | + package static let focusedItem: ViewRendererHostProperties = .init(rawValue: 1 << 9) |
| 27 | + package static let accessibilityFocus: ViewRendererHostProperties = .init(rawValue: 1 << 10) |
| 28 | + package static let all: ViewRendererHostProperties = [.rootView, .environment, .focusedValues, .transform, .size, .safeArea, .scrollableContainerSize, .focusStore, .accessibilityFocusStore, .focusedItem, .accessibilityFocus] |
| 29 | +} |
| 30 | + |
| 31 | +// MARK: - ViewRenderingPhase |
| 32 | + |
| 33 | +package enum ViewRenderingPhase { |
| 34 | + case none |
| 35 | + case rendering |
| 36 | + case renderingAsync |
| 37 | +} |
| 38 | + |
| 39 | +@available(*, unavailable) |
| 40 | +extension ViewRenderingPhase: Sendable {} |
| 41 | + |
10 | 42 | package protocol ViewRendererHost: ViewGraphDelegate {
|
11 | 43 | var viewGraph: ViewGraph { get }
|
12 | 44 | var currentTimestamp: Time { get set }
|
@@ -102,13 +134,3 @@ extension ViewRendererHost {
|
102 | 134 | // TODO: Signpost.viewHost
|
103 | 135 | }
|
104 | 136 | }
|
105 |
| - |
106 |
| -package struct ViewRendererHostProperties: OptionSet { |
107 |
| - package let rawValue: UInt16 |
108 |
| - |
109 |
| - package init(rawValue: UInt16) { |
110 |
| - self.rawValue = rawValue |
111 |
| - } |
112 |
| - |
113 |
| - package static var rootView: ViewRendererHostProperties { ViewRendererHostProperties(rawValue: 1 << 0) } |
114 |
| -} |
|
0 commit comments