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
```
* Add `RequestedSize` and `RequestedPosition` enum to enable asking for
logical or physical size/position.
* Rename `Window::size()` to `Window::physical_size()`
* Make `Window::set_size(...)` take an `Into<RequestedSize>`
* Rename `Window::position()` to `Window::physical_position()`
* Make `Window::set_position(...)` take an `Into<RequestedPosition>`
* Change `WindowAdapter` and related classes to be able to handle
requests being made in the either physical or logical units.
Implement this for C++, Rust and node.
When opting into the Skia renderer, we default to metal on macOS and D3D on Windows.
However if you want to develop a cross-platform application with Skia and
for example rely on OpenGL to be able to implement an OpenGL underlay or overlay,
then we need the ability to explicitly opt into skia's GL renderer.
cc #1445
We used to have SLINT_FEATURE_BACKEND_GL_ALL, but when we introduced the
renderer and event loop distinction in the features, we removed the "all" suffix from
the event loop that includes x11 and wayland support.
When building against a Yocto SDK, CFLAGS isn't set, only CC. When
building inside Yocto, CC is set to just the target compiler and CFLAGS
contains the target specific options. Just like with commit
5bc56a3924 we need to cover also
HOST_CFLAGS by making them empty.
and use Rc<dyn PlatformWindow> instead. The alias has to stay with the ffi
functions though and the item vtable definitions,
because we don't have an Rc<> template in C++.
One key difference to the Rust way is what `slint::Window` means. In
Rust that holds the `WindowInner` and `slint::Window` is only exposed as
`&slint::Window`. This is possible because the component owns the
`Rc<dyn PlatformWindow>`, which has a function to return the
`&slint::Window`.
In C++ `slint::Window` is also exposed as `slint::Window&` in the
`window()` getter, but there's no way to get a reference to a C++
wrapper for the Rust `&slint::Window` that the `PlatformWindow` trait
returns. Therefore in C++ `slint::Window` wraps `Rc<dyn
PlatformWindow>`.
Previously: Window is an Rc<WindowInner>, which has an Rc<dyn
PLatformWindow> - and weak references the other way around.
Now: Rc<dyn PlatformWindow> is the root of window ownership. The impl
PlatformWindow has a slint::api::Window, which just holds a WindowInner.
This change is incomplete on a few levels, mainly that neither of the
code generators nor the interpreter is ported.
Split backend-gl-* into eventloop-winit-* and renderer-femtovg.
The old feature names are still available.
For consistency eventloop-qt and renderer-qt are aliases for backend-qt.
For embedded images the path is empty but we unconditionally used it to create a TextureCacheKey,
which clashes.
Instead, preserve and store the ImageCacheKey in the ImageInner variants.
This includes the cache of decoded images, the HTMLImage element support
and the SVG rendering adapter.
The objective is that Image holds an ImageInner, which is not a path
anymore that the backend has to process, but instead always either
decoded image data, a pointer to a static texture or an SVG tree that
can be rendered to the desired size.
There was an api change, so pin to the previous version for now.
Prospective fix for nightly build failure.
We should probably pin all dependencies (at least semver style) - it’s a miracle this hasn’t broken earlier :)
I want to track component structure changes in the window without
generating more code. So use a more generic name for the init_*_items
functions, so that I can add the functionality I need in there.
Also add a register_component to PlatformWindow and call that.
I want a more generic name as I want to do to track component structure
changes in addition to resource freeing and I do not want to add another
call into the generated code.