Rename the backend-gl feature to backend-gl-all

This commit is contained in:
Simon Hausmann 2022-02-08 13:03:53 +01:00 committed by Simon Hausmann
parent 48f3f47401
commit be5b8c1c46
8 changed files with 35 additions and 27 deletions

View file

@ -24,8 +24,8 @@ as well as the [Rust migration guide for the `sixtyfps` crate](api/rs/slint/migr
- Replace `ModelHandle` with `ModelRc`
- `sixtyfps::interpreter::ComponentInstance` in Rust now implements `sixtyfps::ComponentHandle`. This removes `sixtyfps::interpreter::WeakComponentInstance` in favor
of `sixtyfps::Weak<sixtyfps::interpreter::ComponentInstance>`.
- For the Rust API crate, the Rust Interpreter API crate, the `x11` and `wayland` features were renamed to `backend-gl-x11` and `backend-gl-wayland`.
- For the C++ CMake interface, the `SIXTYFPS_FEATURE_X11` and `SIXTYFPS_FEATURE_WAYLAND` options were renamed to `SLINT_FEATURE_BACKEND_GL_X11` and `SLINT_FEATURE_BACKEND_GL_WAYLAND`.
- For the Rust API crate, the Rust Interpreter API crate, the `backend-gl`, `x11`, and `wayland` features were renamed to `backend-gl-all`, `backend-gl-x11`, and `backend-gl-wayland`.
- For the C++ CMake interface, the `SIXTYFPS_BACKEND_GL`, `SIXTYFPS_FEATURE_X11`, and `SIXTYFPS_FEATURE_WAYLAND` options were renamed to `SLINT_BACKEND_GL_ALL`, `SLINT_FEATURE_BACKEND_GL_X11`, and `SLINT_FEATURE_BACKEND_GL_WAYLAND`.
### Added

View file

@ -68,9 +68,9 @@ endfunction()
# defaults need to be kept in sync with the Rust bit.
define_cargo_feature(interpreter "Enable support for the Slint interpeter to load .slint files at run-time" ON)
define_cargo_feature(backend-gl "Enable OpenGL ES 2.0 based rendering backend" ON)
define_cargo_dependent_feature(backend-gl-x11 "Enable the OpenGL ES 2.0 backend with X11 support" ON SLINT_FEATURE_BACKEND_GL OFF)
define_cargo_dependent_feature(backend-gl-wayland "Enable the OpenGL ES 2.0 backend with wayland support" OFF SLINT_FEATURE_BACKEND_GL OFF)
define_cargo_feature(backend-gl-all "Enable OpenGL ES 2.0 based rendering backend with support for all windowing systems." ON)
define_cargo_feature(backend-gl-x11 "Enable the OpenGL ES 2.0 backend with only X11 support. Enable this option and turn off SLINT_FEATURE_BACKEND_GL_ALL for a smaller build with just X11 support." OFF)
define_cargo_feature(backend-gl-wayland "Enable the OpenGL ES 2.0 backend with wayland support. Enable this option and turn off SLINT_FEATURE_BACKEND_GL_ALL for a smaller build with just wayland support." OFF)
define_cargo_feature(backend-qt "Enable Qt based rendering backend" ON)

View file

@ -22,14 +22,14 @@ crate-type = ["lib", "cdylib"]
# Note, these features need to be kept in sync (along with their defaults) in
# the C++ crate's CMakeLists.txt
[features]
backend-gl = ["i-slint-backend-selector/i-slint-backend-gl"]
backend-qt = ["i-slint-backend-selector/i-slint-backend-qt"]
interpreter = ["slint-interpreter"]
testing = ["i-slint-backend-testing"] # Enable some function used by the integration tests
backend-gl-all = ["i-slint-backend-selector/backend-gl-all"]
backend-gl-wayland = ["i-slint-backend-selector/backend-gl-wayland"]
backend-gl-x11 = ["i-slint-backend-selector/backend-gl-x11"]
default = ["backend-gl", "backend-gl-x11", "backend-qt"]
default = ["backend-gl-all", "backend-qt"]
[dependencies]
i-slint-backend-selector = { version = "=0.2.0", path="../../internal/backends/selector" }

View file

@ -18,7 +18,7 @@ path = "lib.rs"
[features]
default = ["std", "backend-gl", "backend-gl-x11", "backend-qt", "compat-0-2-0"]
default = ["std", "backend-gl-all", "backend-qt", "compat-0-2-0"]
## Mandatory feature:
## This feature is required to keep the compatibility with Slint 0.2.0
@ -38,13 +38,16 @@ std = ["i-slint-core/std"]
backend-qt = ["i-slint-backend-selector/i-slint-backend-qt", "std"]
## The GL backend uses the `winit` crate for the windowing system integration,
## and the `femtovg` crate for the rendering.
## On unix, at least one of `x11` or `wayland` features must be enabled.
backend-gl = ["i-slint-backend-selector/i-slint-backend-gl", "std"]
## Same as the GL backend, with the `x11` feature of `winit` enabled
backend-gl-x11 = ["i-slint-backend-selector/backend-gl-x11", "backend-gl"]
## Same as the GL backend, with the `wayland` feature of `winit` enabled
backend-gl-wayland = ["i-slint-backend-selector/backend-gl-wayland", "backend-gl"]
## and the `femtovg` crate for the rendering. With this feature, all windowing
## systems are supported. For a smaller build, omit this feature and select
## one of the other specific `backend-gl-XX` features.
backend-gl-all = ["i-slint-backend-selector/backend-gl-all", "std"]
## Simliar to `backend-gl-all` this enables the GL backend but only with support for the
## X Window System.
backend-gl-x11 = ["i-slint-backend-selector/backend-gl-x11"]
## Simliar to `backend-gl-all` this enables the GL backend but only with support for the
## Wayland window system.
backend-gl-wayland = ["i-slint-backend-selector/backend-gl-wayland"]
[dependencies]

View file

@ -15,6 +15,7 @@ homepage = "https://slint-ui.com"
path = "lib.rs"
[features]
backend-gl-all = ["backend-gl-x11", "backend-gl-wayland"]
backend-gl-wayland = ["i-slint-backend-gl/wayland"]
backend-gl-x11 = ["i-slint-backend-gl/x11"]

View file

@ -18,7 +18,7 @@ path = "lib.rs"
[features]
default = ["std", "backend-gl", "backend-gl-x11", "backend-qt", "compat-0-2-0"]
default = ["std", "backend-gl-all", "backend-qt", "compat-0-2-0"]
## Mandatory feature:
## This feature is required to keep the compatibility with Slint 0.2.0
@ -44,13 +44,17 @@ std = ["i-slint-core/std"]
backend-qt = ["i-slint-backend-selector/i-slint-backend-qt", "std"]
## The GL backend uses the `winit` crate for the windowing system integration,
## and the `femtovg` crate for the rendering.
## On unix, at least one of `x11` or `wayland` features must be enabled.
backend-gl = ["i-slint-backend-selector/i-slint-backend-gl", "std"]
## Same as the GL backend, with the `x11` feature of `winit` enabled
backend-gl-x11 = ["i-slint-backend-selector/backend-gl-x11", "backend-gl"]
## Same as the GL backend, with the `wayland` feature of `winit` enabled
backend-gl-wayland = ["i-slint-backend-selector/backend-gl-wayland", "backend-gl"]
## and the `femtovg` crate for the rendering. With this feature, all windowing
## systems are supported. For a smaller build, omit this feature and select
## one of the other specific `backend-gl-XX` features.
backend-gl-all = ["i-slint-backend-selector/backend-gl-all", "std"]
## Simliar to `backend-gl-all` this enables the GL backend but only with support for the
## X Window System.
backend-gl-x11 = ["i-slint-backend-selector/backend-gl-x11"]
## Simliar to `backend-gl-all` this enables the GL backend but only with support for the
## Wayland window system.
backend-gl-wayland = ["i-slint-backend-selector/backend-gl-wayland"]
[dependencies]
i-slint-compiler = { version = "=0.2.0", path = "../compiler" }

View file

@ -22,12 +22,12 @@ name = "slint-lsp"
path = "main.rs"
[features]
backend-gl = ["slint-interpreter/backend-gl"]
backend-qt = ["slint-interpreter/backend-qt"]
backend-gl-all = ["slint-interpreter/backend-gl-all"]
backend-gl-wayland = ["slint-interpreter/backend-gl-wayland"]
backend-gl-x11 = ["slint-interpreter/backend-gl-x11"]
default = ["backend-qt", "backend-gl", "backend-gl-x11"]
default = ["backend-qt", "backend-gl-all"]
[dependencies]
i-slint-compiler = { version = "=0.2.0", path = "../../internal/compiler"}

View file

@ -14,12 +14,12 @@ categories = ["gui", "development-tools"]
keywords = ["viewer", "gui", "ui", "toolkit"]
[features]
backend-gl = ["slint-interpreter/backend-gl"]
backend-qt = ["slint-interpreter/backend-qt"]
backend-gl-all = ["slint-interpreter/backend-gl-all"]
backend-gl-wayland = ["slint-interpreter/backend-gl-wayland"]
backend-gl-x11 = ["slint-interpreter/backend-gl-x11"]
default = ["backend-qt", "backend-gl", "backend-gl-x11"]
default = ["backend-qt", "backend-gl-all"]
[dependencies]
i-slint-core = { version = "=0.2.0", path="../../internal/core" }