- 1月 31, 2022
-
-
由 Tobias Hunger 创作于
-
由 Olivier Goffart 创作于
-
由 Olivier Goffart 创作于
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
-
由 Olivier Goffart 创作于
git can create Cargo.toml.orig if there was a conflict. That file might then prevent the compilation as it contains merge conflict and this crate cannot parse it. So only use the .orig if the Cargo.toml file don't contains docs comments
-
由 Simon Hausmann 创作于
Remove the duplicated definition of the IntSize struct and instead generate it via cbindgen into the public API.
-
由 Olivier Goffart 创作于
-
由 Olivier Goffart 创作于
-
由 Olivier Goffart 创作于
-
由 Olivier Goffart 创作于
-
由 Tobias Hunger 创作于
-
由 Tobias Hunger 创作于
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.
-
由 Olivier Goffart 创作于
-
由 Olivier Goffart 创作于
- ModelRc::new constructs a ModelRc from a impl Model - ModelRc::form constructs a ModelRc from a `Rc<dyn Model>` or `Rc<impl Model>`
-
由 Simon Hausmann 创作于
-
由 Simon Hausmann 创作于
This helps detect call sites. One of them is in the timer doctests though, which we flag as no_run as a consequence.
-
由 Simon Hausmann 创作于
Due to run_event_loop() not being in corelib, we can't link to it. Fall back to a HTML link.
-
由 Simon Hausmann 创作于
Remove version for dev-dependency in order to be able to publish to crates.io Co-authored-by:
Olivier Goffart <ogoffart@sixtyfps.io>
-
由 Simon Hausmann 创作于
Bite the bullet and introduce the public API and testing backend as dev-dependencies, so that we can properly at least compile-test the doctests, some of which were previously in the public API crate and require the compiler macro.
-
由 Simon Hausmann 创作于
-
由 Simon Hausmann 创作于
This allows re-use of these types from node and the interpreter without depending on the public Rust API crate, which is a heavy dependency.
-
由 Simon Hausmann 创作于
Move it from corelib::window::api to corelib::api, where we're going to collect more types in the future that are meant to be re-exported as public API in the sixtyfps-rs and the interpreter crate.
-
由 Simon Hausmann 创作于
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.
-
由 Simon Hausmann 创作于
Also provide some words of documentation.
-
由 Simon Hausmann 创作于
... to further encourage the use of the `_` pattern when matching.
-
由 Simon Hausmann 创作于
This allows adding new variants in minor releases without breaking source compatibility. cc #431
-
由 Tobias Hunger 创作于
The contents is not longer accessible, so there is no need for deref and deref_mut.
-
- 1月 30, 2022
-
-
由 Tobias Hunger 创作于
Co-authored-by:
Olivier Goffart <olivier@woboq.com>
-
由 Tobias Hunger 创作于
Co-authored-by:
Olivier Goffart <olivier@woboq.com>
-
由 Tobias Hunger 创作于
-
由 Tobias Hunger 创作于
-
由 Tobias Hunger 创作于
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.
-
- 1月 29, 2022
-
-
由 Tobias Hunger 创作于
-
由 Tobias Hunger 创作于
-
由 Tobias Hunger 创作于
Add configuration for the [reuse-tool](https://github.com/fsfe/reuse-tool) and mark up license information.
-
由 Matej Zajo Kralik 创作于
-
- 1月 28, 2022
-
-
由 Olivier Goffart 创作于
The C++ code did not compile because it couldn't deduce the template parameter properly. Since the lambda became a bit big to be placed in one small string, I moved it into a real function in the header Example of error: (sorry for the long lines :-)) ``` tmp/.tmpE42a4c.cpp: In member function 'void TestCase::init(const TestCase*, sixtyfps::cbindgen_private::ComponentWeak, uintptr_t, uintptr_t)': /tmp/.tmpE42a4c.cpp:67:238: error: no match for call to '(TestCase::init(const TestCase*, sixtyfps::cbindgen_private::ComponentWeak, uintptr_t, uintptr_t)::<lambda(const std::shared_ptr<sixtyfps::Model<ModelData> >&, const auto:24&)>) (std::shared_ptr<sixtyfps::private_api::ArrayModel<2, sixtyfps::SharedString> >, int)' 67 | self->root_window_1_hello_world.set([&]<typename D>(const std::shared_ptr<sixtyfps::Model<D>> &model, const auto &index) -> D { model->track_row_data_changes(index); if (const auto v = model->row_data(index)) return *v; return D(); }(std::make_shared<sixtyfps::private_api::ArrayModel<2,sixtyfps::SharedString>>(sixtyfps::SharedString ( sixtyfps::SharedString(u8"hello") ), sixtyfps::SharedString ( sixtyfps::SharedString(u8"world") )), 1)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/.tmpE42a4c.cpp:67:41: note: candidate: 'template<class D, class auto:24> TestCase::init(const TestCase*, sixtyfps::cbindgen_private::ComponentWeak, uintptr_t, uintptr_t)::<lambda(const std::shared_ptr<sixtyfps::Model<ModelData> >&, const auto:24&)>' 67 | self->root_window_1_hello_world.set([&]<typename D>(const std::shared_ptr<sixtyfps::Model<D>> &model, const auto &index) -> D { model->track_row_data_changes(index); if (const auto v = model->row_data(index)) return *v; return D(); }(std::make_shared<sixtyfps::private_api::ArrayModel<2,sixtyfps::SharedString>>(sixtyfps::SharedString ( sixtyfps::SharedString(u8"hello") ), sixtyfps::SharedString ( sixtyfps::SharedString(u8"world") )), 1)); | ^ /tmp/.tmpE42a4c.cpp:67:41: note: template argument deduction/substitution failed: /tmp/.tmpE42a4c.cpp:67:238: note: mismatched types 'sixtyfps::Model<ModelData>' and 'sixtyfps::private_api::ArrayModel<2, sixtyfps::SharedString>' 67 | self->root_window_1_hello_world.set([&]<typename D>(const std::shared_ptr<sixtyfps::Model<D>> &model, const auto &index) -> D { model->track_row_data_changes(index); if (const auto v = model->row_data(index)) return *v; return D(); }(std::make_shared<sixtyfps::private_api::ArrayModel<2,sixtyfps::SharedString>>(sixtyfps::SharedString ( sixtyfps::SharedString(u8"hello") ), sixtyfps::SharedString ( sixtyfps::SharedString(u8"world") )), 1)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
-
由 Olivier Goffart 创作于
-
由 Olivier Goffart 创作于
Fixes #888
-
由 Simon Hausmann 创作于
A brown paper bag for me :-)
-
由 Olivier Goffart 创作于
-