-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathORBShims.swift
More file actions
44 lines (35 loc) · 1.42 KB
/
ORBShims.swift
File metadata and controls
44 lines (35 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// ORBShims.swift
// OpenRenderBoxShims
/// A type that identifies the underlying RenderBox implementation vendor.
///
/// Use ``renderBoxVendor`` to check which vendor is active at runtime.
public struct RenderBoxVendor: RawRepresentable, CaseIterable {
public let rawValue: String
public init(rawValue: String) {
self.rawValue = rawValue
}
/// OpenRenderBox — the open source implementation by OpenSwiftUIProject.
public static let orb = RenderBoxVendor(rawValue: "org.OpenSwiftUIProject.OpenRenderBox")
/// Apple's private RenderBox framework.
public static let rb = RenderBoxVendor(rawValue: "com.apple.RenderBox")
public static var allCases: [RenderBoxVendor] { [.orb, .rb] }
}
#if OPENRENDERBOX_RENDERBOX
@_exported public import RenderBox
public typealias ORBAnimation = RBAnimation
public typealias ORBColor = RBColor
public typealias ORBDevice = RBDevice
public typealias ORBDisplayList = RBDisplayList
public typealias ORBLayer = RBLayer
public typealias ORBLayerDelegate = RBLayerDelegate
public typealias ORBPath = RBPath
public typealias ORBPathApplyCallback = RBPathApplyCallback
public typealias ORBUUID = RBUUID
public typealias ORBSymbolAnimator = RBSymbolAnimator
public typealias ORBSymbolAnimatorObserver = RBSymbolAnimatorObserver
public let renderBoxVendor = RenderBoxVendor.rb
#else
@_exported import OpenRenderBox
public let renderBoxVendor = RenderBoxVendor.orb
#endif