-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create DefaultBackend which adapts to match the current platform (wil…
…l use for examples once AppKitBackend is ready)
- Loading branch information
1 parent
f9cf4a9
commit bcdca63
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#if canImport(AppKitBackend) | ||
import AppKitBackend | ||
public typealias DefaultBackend = AppKitBackend | ||
#elseif canImport(GtkBackend) | ||
import GtkBackend | ||
public typealias DefaultBackend = GtkBackend | ||
#elseif canImport(QtBackend) | ||
import QtBackend | ||
public typealias DefaultBackend = QtBackend | ||
#elseif canImport(WinUIBackend) | ||
import WinUIBackend | ||
public typealias DefaultBackend = WinUIBackend | ||
#elseif canImport(CursesBackend) | ||
import CursesBackend | ||
public typealias DefaultBackend = CursesBackend | ||
#elseif canImport(LVGLBackend) | ||
import LVGLBackend | ||
public typealias DefaultBackend = LVGLBackend | ||
#else | ||
#error("Unknown backend selected") | ||
#endif |