david-swift 05dd06af0a
All checks were successful
Deploy Docs / publish (push) Successful in 2m20s
SwiftLint / SwiftLint (push) Successful in 4s
Migrate to Aparoksha Gitea instance
2024-10-14 11:25:51 +02:00

38 lines
810 B
Swift

//
// TermKitApp.swift
// TermKitBackend
//
// Created by david-swift on 01.07.2024.
//
@_exported import Meta
import TermKit
/// The Meta app storage for the TermKit backend.
public class TermKitApp: AppStorage {
/// The scene element type of the TermKit backend.
public typealias SceneElementType = TermKitSceneElement
/// The app storage.
public var storage: StandardAppStorage = .init()
/// Initialize the app storage.
/// - Parameter id: The identifier.
public init() { }
/// Execute the app.
/// - Parameter setup: Set the scene elements up.
public func run(setup: @escaping () -> Void) {
Application.prepare()
setup()
Application.run()
}
/// Quit the app.
public func quit() {
Application.shutdown()
}
}