Commit graph

257 commits

Author SHA1 Message Date
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
ogoffart
7b50791db4 Bump version number to 0.2.2 2022-03-10 08:48:33 +00:00
Tobias Hunger
f3feab1267
Implement ptr_eq for VWeak and PartialEq for Items (#976)
* Implement ptr_eq for VWeaks

Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2022-02-21 17:45:18 +01:00
ogoffart
ecd0fb7ecd Bump version number to 0.2.1 2022-02-10 16:25:28 +01:00
Tobias Hunger
58e7caafb0
Fix LICENSES symlinks 2022-02-09 17:05:47 +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
Simon Hausmann
be5b8c1c46 Rename the backend-gl feature to backend-gl-all 2022-02-08 14:47:25 +01:00
Simon Hausmann
48f3f47401 Rename the x11 and wayland features to backend-gl-x11/wayland 2022-02-08 14:47:25 +01:00
Olivier Goffart
1425ef63de Change the Url from sixtyfps.io to slint-ui.com
Also, change the URL of the logo in the docs
2022-02-08 08:52:46 +01:00
Olivier Goffart
00ff5e21a7 Update git repository URL 2022-02-08 08:26:21 +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
1534f87e30
Change authors to Slint Developers 2022-02-02 16:21:34 +01:00
Olivier Goffart
62b269ae44 Replace sixtyfps- 2022-02-02 14:46:27 +01:00
Tobias Hunger
1a0a495bc5
Rename environment variables 2022-02-02 13:35:07 +01:00
Olivier Goffart
69908a32b6 Rename sixtyfps-viewer -> slint-viewer 2022-02-02 13:19:40 +01:00
Olivier Goffart
692171bf0c Change the 60 blocks to slint blocs in documentation comments 2022-02-02 10:51:42 +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
Olivier Goffart
38d7ac42eb Add compatibility feature to our public crates
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
2022-01-31 17:30:24 +01:00
Tobias Hunger
a3b86690ff [reorg]: Move the rendering backends into internal 2022-01-31 16:00:50 +01:00
Tobias Hunger
e6b24bceec [reorg]: Set up and populate the internal directory
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
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
Olivier Goffart
a45dcc1f9a Update to edition 2021
The ffi function wrapper need to be changed because in the 2021 edition, when
the capture is moved into the closure, it moves the individual field instead
of the whole wrapper. But we need to move the whole wrapper because the Drop
of the wrapper will delete the C++ closure, and we don't want to call the
closure after it is deleted.
2022-01-25 11:40:11 +01:00
ogoffart
42f1964e54 Bump version number to 0.2.0 2022-01-24 11:39:50 +01:00
Tobias Hunger
0063476aff Update license information
Use the reuse tool to get a better grip on licenses used in sixtyfps.
Fix a couple of licenses along the way.

* Uses creative commons for our own logo (commercial use!)
* Fixes some license information found in README files and documents
  them with proper .license files.
* Document Apache/MIT for helper_crates/const-field-offset which matches
  what its documentaion site says it uses.
* Add a list of licenses that apply to crates we publish and the tooling
  we have.

This patch only adds static information and does not contain any tooling
support.
2022-01-20 14:45:02 +01:00
Tobias Hunger
2f6be7b31f Mass-add copyright headers into Cargo.toml files 2022-01-19 11:25:21 +01:00
Tobias Hunger
d130f4421d
janitor: Add keywords/categories to more Cargo.toml files 2022-01-11 17:28:31 +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
Olivier Goffart
a751d000db Add a bunch of categories and keywords in some of our Cargo.toml 2022-01-07 17:14:07 +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
ogoffart
3278b39549 Bump version number to 0.1.6 2021-11-24 14:19:09 +00:00
ogoffart
b25ae6fbcd Bump version number to 0.1.5 2021-10-26 07:36:54 +00:00
Simon Hausmann
44c632dee1 Remove path to non-existent bin directory 2021-10-22 17:15:07 +02:00
Olivier Goffart
51fa9dc51b sixtyfps-viewer: re-enable the x11 feature by default
Some change in the feature handling caused it not to enable x11 nor wayland
2021-10-22 16:42:09 +02:00
Olivier Goffart
2f6ebfe38d Fix some docs warning 2021-10-22 14:32:17 +02:00
Simon Hausmann
34d28f4028 Minor sentence polish in the viewer README 2021-10-22 09:00:27 +02:00
Simon Hausmann
c7339afe75 Mention the viewer binaries 2021-10-22 08:55:20 +02:00
Olivier Goffart
f8c00b19b5 Add link to the examples from the sixtyfps-viewer README 2021-10-21 18:03:56 +02:00
Simon Hausmann
0d4c389e49 Add job for building viewer binaries with Qt 2021-10-21 14:38:19 +02:00
Olivier Goffart
82a1cc1e83 Viewer: Added way to execute commands on callbacks 2021-10-12 13:58:52 +02:00
ogoffart
77fcd5221b Bump version number to 0.1.4 2021-10-07 09:36:43 +00:00
Olivier Goffart
d058e4c10e Viewer: Make the "Close" button properly close 2021-10-07 11:26:09 +02:00