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
Implement `sixtyfps::ComponentHandle` for `ComponentInstance`, instead of providing a copy of the API.
This also removes `WeakComponentInstance` and enables the use of `sixtyfps::Weak` for weak handles. This has the advantage that `sixtyfps:Weak`'s `upgrade_in_event_loop` becomes available with the interpreter, and the
weak handle is Send.
This patch is mostly a rename now, but also contains a few small
cleanups.
SharedModel implements the Model trait itself and gracefully falls back
to an empty model is no Model was provided. This allows for some small
simplifications.
Also make sure to use the same comparision for SharedModels everywhere.
This fixes the last remaining clippy errors we had.
The options in sixtyfps-viewer --help used to look like this:
```
OPTIONS:
--backend <backend> The rendering backend [default: ]
-I <include path for other .60 files>...
--load-data <load data file> Load properties from a json file ('-' for stdin)
--save-data <save data file> Store properties values in a json file at exit ('-' for stdout)
--style <style name> The style name ('native', 'fluent', or 'ugly') [default: ]
```
This patch removes the useless "[default: ]" part. These are options,
so even without this text it should be very obvious that the `--style`
and the `--backend` parameters are indeed optional.
Remove the `application` infix from `register_application_font`, to
reduce the changes that it might be interpreted to be a function that
also changes the default font in all text elements.
This allows creating multiple windows for example, and it will allow for
showing windows in those tests that require a mapped window.
As a bonus, the run() function on generated components is not consuming
anymore.
We need to embed resources in wasm builds. Unfortunately we can't detect
that we're called by say wasm-pack and "TARGET"/"HOST" only works inside
build.rs. So instead, to keep things simple, this change always embeds
the image resources when targeting Rust.
The `SIXTYFPS_EMBED_RESOURCES` environment variable can be used to
override this anywhere for any language.
Fixes#130