You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -31,12 +31,11 @@ SwiftCrossUI has a variety of backends tailored to different operating systems.
31
31
If you use `DefaultBackend`, like the examples do, you can override the default when compiling your app by setting the `SCUI_DEFAULT_BACKEND` environment variable to the name of your desired backend. This can be quite useful when you e.g. want to test the Gtk version of your app while using a Mac.
32
32
33
33
-`DefaultBackend`: Adapts to your target operating system. On macOS it uses `AppKitBackend`, on Windows it uses `WinUIBackend`, on Linux it uses `GtkBackend`, and on iOS and tvOS it uses `UIKitBackend`.
34
-
-`GtkBackend`: Works on Linux, macOS, and Windows. Requires gtk 4 to be installed. Supports all SwiftCrossUI features.
35
34
-`AppKitBackend`: The native macOS backend. Supports all SwiftCrossUI features.
36
-
-`WinUIBackend`: The native Windows backend. Supports most SwiftCrossUI features.
37
35
-`UIKitBackend`: The native iOS & tvOS backend. Supports most SwiftCrossUI features.
38
-
-`QtBackend`: ***Experimental***, requires `qt5` to be installed, and currently supports a very limited subset of SwiftCrossUI features.
39
-
-`CursesBackend`: ***Experimental***, requires `curses` to be installed, and supports a *very very* limited subset of SwiftCrossUI features.
36
+
-`WinUIBackend`: The native Windows backend. Supports most SwiftCrossUI features.
37
+
-`GtkBackend`: Works on Linux, macOS, and Windows. Requires gtk 4 to be installed. Supports most SwiftCrossUI features.
38
+
-`Gtk3Backend`: Exists to target older Linux distributions. Requires gtk 3 to be installed. Supports most SwiftCrossUI features. Quite buggy on macOS because Gtk 3 itself doesn't support macOS very well.
40
39
41
40
## Example
42
41
@@ -49,9 +48,11 @@ import DefaultBackend
49
48
50
49
@main
51
50
structCounterApp: App {
52
-
// Optionally, you can explicitly select which imported backend to use (if you only
53
-
// import one backend then this is done automatically).
54
-
// typealias Backend = DefaultBackend
51
+
// You can explicitly provide your selected backend to SwiftCrossUI if you
52
+
// want extra control. This allows you to configure the backend if the
0 commit comments