Olivier Goffart
9f5106eef1
Janitor: update notify dependency
2022-09-01 15:39:04 +02:00
Olivier Goffart
7417422e3c
Make the PlatformAbstraction not Send using a EventLoopProxy trait
...
This changes the way the platform abstraction is initialized
2022-08-24 11:32:21 +02:00
Simon Hausmann
3e40835ec2
Fix more clap deprecation warnings
2022-06-14 11:32:03 +02:00
Simon Hausmann
8866e85898
Enable the simple env logger on slint-viewer
...
This makes it possible to see the output from the log facade in any
crates that Slint uses, using the RUST_LOG environment variable..
2022-05-17 16:58:50 +02:00
Simon Hausmann
9a8c5fed9f
Remove the ugly style
...
It's ugly ;-)
The combo box for the style is commented out for now, so that we can
easily re-add it in the future once we add a new style.
2022-04-13 10:35:42 +02:00
Tobias Hunger
c68291b7f8
Janitor: Clap update + basic functionality addition to all binaries
...
Make clap generate `--version`, and make it add more informtaion from
Cargo.toml available in `--help`.
2022-03-10 12:34:36 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
de4e195280
Rename internal crates and add a README.md to them
...
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
2022-02-07 13:12:48 +01:00
Tobias Hunger
1a0a495bc5
Rename environment variables
2022-02-02 13:35:07 +01:00
Olivier Goffart
03534039d6
Replace more .60 by .slint
...
Mainly an automated change with
git grep -O"sed -i 's/\.60/.slint/g'" -w "\.60"
and some manual checks
2022-02-02 10:12:31 +01:00
Simon Hausmann
2f73a27635
Rename the sixtyfps-interpreter crate
2022-02-01 18:11:25 +01:00
Simon Hausmann
9494068201
Rename the sixtyfps-rendering-backend-selector crate
2022-02-01 18:06:49 +01:00
Simon Hausmann
ad0c020aa4
Rename the sixtyfps-corelib crate
2022-02-01 18:04:30 +01:00
Tobias Hunger
a3b86690ff
[reorg]: Move the rendering backends into internal
2022-01-31 16:00:50 +01:00
Olivier Goffart
929166f06c
Change what is accepted by ModelRc::new and ModelRc::from
...
- ModelRc::new constructs a ModelRc from a impl Model
- ModelRc::form constructs a ModelRc from a `Rc<dyn Model>` or `Rc<impl Model>`
2022-01-31 14:44:35 +01:00
Simon Hausmann
fb64e308b3
Align Rust interpreter instance handling API with the main Rust API crate
...
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.
2022-01-31 14:29:09 +01:00
Tobias Hunger
018c1a6666
Rename ModelHandle to SharedModel
...
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.
2022-01-30 01:26:35 +01:00
Olivier Goffart
02bfdda0e3
Use ModelHandle in Value::Model
...
As a drive by change, remove the special comparison
for the SharedVectorModel. Two different model that have the
same elements are still not equal
2022-01-27 18:37:36 +01:00
Simon Hausmann
de40e002c3
WIP: Remove sixtyfps_interpreter::Value::Array
...
This is never created
2022-01-27 18:37:36 +01:00
Tobias Hunger
c02da14dc8
Move from stuctopt to clap 3
...
* Do not explicitly enable color output: That is default anyway
* Consistently use from_os_str() for file pathes
* Fix wrong types used in some places
2022-01-10 16:53:08 +01:00
Tobias Hunger
11d46892e4
janitor: Remove some unnecessary lazy evaluation
2022-01-04 18:22:49 +01:00
Tobias Hunger
767704a88b
janitor: Remove some redundant closures
2022-01-04 18:21:07 +01:00
Tobias Hunger
bfca0e3573
Mass update copyright messages to be more REUSE compliant
2021-12-22 10:06:12 +01:00
Olivier Goffart
82a1cc1e83
Viewer: Added way to execute commands on callbacks
2021-10-12 13:58:52 +02:00
Olivier Goffart
d058e4c10e
Viewer: Make the "Close" button properly close
2021-10-07 11:26:09 +02:00
Tobias Hunger
d79894769b
viewer: Prettify help output
...
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.
2021-10-05 21:40:13 +02:00
Olivier Goffart
cf2e189245
Small fix to the viewer docs
2021-09-30 11:48:09 +02:00
Olivier Goffart
7db9f3dfa9
Dialog: automatically add clicked callback for the standard button
...
And make the viewer listen to them and set them to automatically close dialogs
2021-09-30 10:21:13 +02:00
Simon Hausmann
21f9850b43
Small spelling fix
2021-09-29 14:55:08 +02:00
Olivier Goffart
0eb223b2ca
Update tools/viewer/main.rs
...
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-09-24 09:23:48 +02:00
Olivier Goffart
321d985242
Viewer: add ability to load and save property values from/to json
...
issue #238
2021-09-24 09:23:48 +02:00
Olivier Goffart
fe015a8086
Allow the sixtyfps-compiler and sixtyfps-viewer to read from stdin
...
By specifing `-` as a path
2021-09-09 15:30:52 +02:00
Tobias Hunger
1d71a2beeb
Janitor: Fix clippy::collapsible_if
2021-08-09 13:19:34 +02:00
Tobias Hunger
24a2021226
Janitor: Fix clippy::needless_borrow
2021-08-04 22:50:35 +02:00
Simon Hausmann
29f5853332
Provide sixtyfps::Window
by reference in the Rust API
...
This also removes Clone from the Window again, to avoid having to face
the question: Does cloning a window duplicate it on the screen?
2021-08-03 10:32:04 +02:00
Tobias Hunger
4bd8920ac4
Janitor: Fix clippy::declare_interior_mutable_const
2021-07-21 19:44:57 +02:00
Tobias Hunger
dc51d4ccda
Use impl Default
instead of new()
constructors
2021-07-12 13:22:25 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Simon Hausmann
cec7dde6e6
Small typo fixes
2021-06-30 16:12:39 +02:00
Olivier Goffart
ffb0a9881b
Add command line arguments to the LSP
...
To set the include path, the style, or the backend
2021-06-09 17:15:49 +02:00
Olivier Goffart
1c505edd09
Revert the change to depends on the public crate from our tools
...
We should probablt re-ecport the function from the interpreter, but one
shouldn't depends both on sixtyfps and sixtyfps-interpreter at the same
time
2021-05-25 15:53:49 +02:00
Simon Hausmann
73f647c2e1
Add the Rust equivalent of sixtyfps::invoke_from_event_loop
...
The same API exists in C++.
2021-05-25 15:53:49 +02:00
Olivier Goffart
31a830e66d
viewer: when watching, we also need to watch the main file
2021-04-15 15:05:09 +02:00
Simon Hausmann
afe3df6381
Remove the public API for registering fonts by path or memory chunk
...
This is not needed anymore in the light of being able to write `import "blah.ttf"` in .60 markup
2021-04-14 10:01:33 +02:00
Olivier Goffart
15298f5626
Add the --auto-reload option to the viewer
2021-04-13 13:55:01 +02:00
Simon Hausmann
4a9cd954b8
Rework the Rust entry point API for the interpreter
...
Switch to the stateful `ComponentCompiler` concept that we discussed for the C++ API.
2021-03-18 18:20:50 +01:00
Olivier Goffart
48333370a6
Use the new interpreter API in things that depends on it
2021-03-15 17:29:27 +01:00
Simon Hausmann
409475aed2
Rename viewer --font=blah.ttf
to viewer --load-font=blah.ttf
2021-02-17 15:30:20 +01:00
Simon Hausmann
445ddd58d5
API cleanup
...
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.
2021-02-17 14:37:31 +01:00
Simon Hausmann
45fe6c3e8d
Add the ability to load application fonts by path
...
The viewer command line tool also gains the ability to specify them via `--app-font=/path/to/font.ttf` , which can be specified multiple times.
2021-02-17 14:16:52 +01:00