We decided that the compatibility with people having enabled the extra
format in image 0.24 [1] is not worth it compared to the extra compilation
time most people gets by default when they don't need this feature.
(Which is less than 10% slower when the feature is enabled)
Since then there is no need for compat-1-10, remove it
[1] by depending directly on image 0.24 in their Cargo.toml and enabling
the features, which will not work with Slint 1.10 that now use image 0.25
Extract the `from_json` and `to_json` code from the viewer into the `interpreter`.
Extend the `from_json` and `to_json` a bit. Add some simple tests while at it.
Added image-default-formats with all the format supported by image by
default, and enable that feature by default.
Also put that feature in compat-1-2 for compatibility with user that
have used image 0.24 with enabled features.
Make a new compat-1-10 feature that does not enable default format by
default
ChangeLog: upgraded image crate to 0.25, added a new cargo feature
to enable all image formats. (that feature is enabled by default with
compat-1-2, added compat-1-10 to disable it
Fixes https://github.com/slint-ui/slint/issues/7251
Updated the version from 1.1 to 1.2
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
The preview can not leave it up to the interpreter to handle element selection
and highlighting. So add new functions to the interpreter (behind the
"highlight" feature-gate) to query positions of elements.
This exposes some of the code that is used by the existing highlighting code
and extends it where needed.
Two use-cases need to be covered:
1. Query the positions of a component (given by source file path and offset).
This is then used to highlight all occurences of a component as the
cursor position in a source file changes.
2. Query the position of an element (given as `ElementRc`).
This is used when selecting elements in the UI. We need to work at
the element level for this, not at the component level.
Also make the `highlight` module public but feature-gated, so that we
can put helper-types there.
This doesn't seem to be needed anymore with newer rust version.
As long as one symbol from the crate is used, all exported function
from the crate are available.
The reason why some symbols in some module were gone was a bug in rust
that has been fixed, it seems
crates.io won't let us upload a feature with dots in it:
```
Uploading slint-interpreter v0.3.0 (/home/olivier/slint/internal/interpreter)
error: failed to publish to registry at https://crates.io
Caused by:
the remote server responded with an error: invalid upload request: invalid value: string "compat-0.3.0", expected a valid feature name at line 1 column 2254
```
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename
We want to be able to put existing functionality behind a feature flag while keeping
the semver compatibility.
This is only possible if that new feature flag is enabled by default, but this is not
working if the users have done `default-features = false` in their Cargo.toml.
So we add new `compat-x-y-z` feature that is mandatory to have and which is
enforced with a `compile_error!`
Now, users that whishes to not have the default features must enable it explicitly.
Say we want only x11 but not qt and wayland, the user will do
```toml
sixtyfps = { version = "0.2", default-features = false, features = ["x11", "compat-0-2-0"] }
```
Now, imagine that in the version 0.2.3, we put the SVG support behind a feature flag.
we will do this in out Cargo.toml:
```toml
[features]
default = ["compat-0-2-0", "x11", "wayland"]
compat-0-2-0 = ["compat-0-2-3", "svg"]
compat-0-2-3 = []
svg = [...]
...
```
That way, the svg feature will be enabled by default for all the users who used previous version
of SixtyFPS, and people that want to disable "svg" can just change from compat-0-2-0 to
compat-0-2-3 in their Cargo.toml
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.
pre-commit applied some cleanups to the moved files:
- Consistent newline at end of file policy
- trimming trailing whitespace
- Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00
Renamed from sixtyfps_runtime/interpreter/lib.rs (Browse further)