| | |
| | | case activation |
| | | case spaceFilter |
| | | case splitView |
| | | case multiPageIdentity |
| | | } |
| | | |
| | | final class LiveQuickSwitchSnapshotLoader: QuickSwitchSnapshotLoading { |
| | |
| | | } |
| | | if mode == .splitView { |
| | | return splitViewSnapshot() |
| | | } |
| | | if mode == .multiPageIdentity { |
| | | return multiPageIdentitySnapshot() |
| | | } |
| | | |
| | | return layoutSnapshot() |
| | |
| | | currentSpaceIDs: [1] |
| | | ) |
| | | } |
| | | |
| | | private func multiPageIdentitySnapshot() -> QuickSwitchSnapshotLoad { |
| | | let displayUUID = "fixture-display-a" |
| | | let displays = [ |
| | | AlignerDisplay( |
| | | uuid: displayUUID, |
| | | physical: true, |
| | | spaces: [ |
| | | AlignerSpace(id: 1, type: .user, displayUUID: displayUUID, index: 1) |
| | | ] |
| | | ) |
| | | ] |
| | | |
| | | let app = AlignerApp( |
| | | bundleIdentifier: "com.example.multipage.identity", |
| | | name: "Multi Page App", |
| | | category: .generic, |
| | | processIdentifier: 70_001 |
| | | ) |
| | | |
| | | let windows = [ |
| | | AlignerWindow( |
| | | id: 70_101, |
| | | app: app, |
| | | title: "Shared Page", |
| | | frame: CGRect(x: 120, y: 120, width: 920, height: 640), |
| | | spaceIDs: [1] |
| | | ), |
| | | AlignerWindow( |
| | | id: 70_102, |
| | | app: app, |
| | | title: "Shared Page", |
| | | frame: CGRect(x: 160, y: 140, width: 920, height: 640), |
| | | spaceIDs: [1] |
| | | ), |
| | | AlignerWindow( |
| | | id: 70_103, |
| | | app: app, |
| | | title: "Shared Page", |
| | | frame: CGRect(x: 200, y: 160, width: 920, height: 640), |
| | | spaceIDs: [1] |
| | | ) |
| | | ] |
| | | |
| | | return QuickSwitchSnapshotLoad( |
| | | snapshot: QuickSwitchSnapshotBuilder.snapshot(displays: displays, windows: windows), |
| | | currentSpaceIDs: [1] |
| | | ) |
| | | } |
| | | } |