Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/OpenSwiftUICore/Data/Projection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public protocol Projection: Hashable {
func set(base: inout Base, newValue: Projected)
}

@_spi(ForSwiftUIOnly)
@_spi(ForOpenSwiftUIOnly)
extension Projection {
package func composed<Tail>(with tail: Tail) -> ComposedProjection<Self, Tail> where Tail: Projection, Projected == Tail.Base {
ComposedProjection(left: self, right: tail)
Expand Down
3 changes: 2 additions & 1 deletion Sources/OpenSwiftUICore/Extension/CGPoint+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

public import Foundation

@_spi(ForOpenSwiftUIOnly) public typealias PlatformPoint = CGPoint
@_spi(ForOpenSwiftUIOnly)
public typealias PlatformPoint = CGPoint

extension CGPoint {
@inlinable
Expand Down
8 changes: 4 additions & 4 deletions Sources/OpenSwiftUICore/View/Graph/ViewGraph.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ package final class ViewGraph: GraphHost {
inputs.preferences.add(DisplayList.Key.self)
}
if contains(.viewResponders) {
// inputs.preferences.add(ViewRespondersKey.self)
inputs.preferences.add(ViewRespondersKey.self)
}
}
}
Expand Down Expand Up @@ -77,7 +77,7 @@ package final class ViewGraph: GraphHost {
var eventSubgraph: Subgraph?

@Attribute package var defaultLayoutComputer: LayoutComputer
// @WeakAttribute var rootResponders: [ViewResponder]?
@WeakAttribute var rootResponders: [ViewResponder]?
@WeakAttribute var rootLayoutComputer: LayoutComputer?
@WeakAttribute var rootDisplayList: (DisplayList, DisplayList.Version)?

Expand Down Expand Up @@ -250,7 +250,7 @@ package final class ViewGraph: GraphHost {
}
}
if requestedOutputs.contains(.viewResponders) {
// _rootResponders = WeakAttribute(outputs.preferences[ViewRespondersKey.self])
_rootResponders = WeakAttribute(outputs.preferences[ViewRespondersKey.self])
}
if requestedOutputs.contains(.layout) {
_rootLayoutComputer = WeakAttribute(outputs.layoutComputer)
Expand All @@ -272,7 +272,7 @@ package final class ViewGraph: GraphHost {
rootGeometry.$layoutDirection = nil
}
$rootLayoutComputer = nil
// $rootResponders = nil
$rootResponders = nil
$rootDisplayList = nil
hostPreferenceValues = WeakAttribute()
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
// ContentResponder.swift
// OpenSwiftUI
//
// Audited for iOS 15.5
// Audited for iOS 18.0
// Status: WIP

package import Foundation
import OpenSwiftUI_SPI

package protocol ContentResponder {
func contains(points: [CGPoint], size: CGSize) -> BitVector64
func contains(points: [PlatformPoint], size: CGSize) -> BitVector64
func contentPath(size: CGSize) -> Path
func contentPath(size: CGSize, kind: ContentShapeKinds) -> Path
}
Expand Down
22 changes: 22 additions & 0 deletions Sources/OpenSwiftUICore/View/Responder/ViewRespondersKey.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// ViewRespondersKey.swift
// OpenSwiftUICore
//
// Audited for iOS 18.0
// Status: Empty

package struct ViewRespondersKey: PreferenceKey {
package static var defaultValue: [ViewResponder] { [] }

package static var _includesRemovedValues: Bool { true }

package static func reduce(value: inout Value, nextValue: () -> Value) {
value.append(contentsOf: nextValue())
}
}

// TODO

@_spi(ForOpenSwiftUIOnly)
open class ViewResponder/*: ResponderNode, CustomStringConvertible, CustomRecursiveStringConvertible*/ {
}
Loading