This avoid repeating the enums both in the compiler and in
the runtime library, and register them in a bunch of other places.
So it should be easier to add enums and enum values
Since cbindgen doesn't see through the macro, generate the enum
manually
When resetting the binding, we need to mark dependent property as dirty.
It just hapenned that the current implementation always set all bindings
before starting to query the properties, so this problem was not seen
before. But there is an exception when setting the two_way bindings,
then we may set the binding after the property was querried because
setting a two way binding actually queries the property
Move the explanation of using two-way bindings to expose globals further
down.
Before that, provide inline examples with Rust and C++ how to access the
globals directly.
Commit c85e1b6d25 added a workaround for a
winit issue, which has been fixed upstream. Until a new release is
available, let's patch in winit from a branch that has the fix
cherry-picked.
This way we don't have to remember to remove the workaround with the
next update and this has been verified on the device.
For some reason, The cargo test for the cpp driver test puts the
libslint_cpp.so library in the `deps` foilder, in addition to the
cdynlib which is generated in the normal target folder. So we end
up with two .so.
We need to have the cpp lib as a dependency because its metadata give us the
metadata on where to find the headers.
Ideally it should be an artifact dependency but this is not yet existing
Since cargo sets the LD_LIBRARY_PATH or the PATH env variable when
running the test, running the runtime built binaries work by taking
the library that is in the deps folder.
Sometimes, BorderRectangle clips can get negative if the intersection
of two rectangle leads to a rectangle that is smaller than the previous
rectangle, but because of floating point error while computing the max
position, the resulting clip may still be negative.
Add a small value to compensate that error
When closing a popup, notify the platform window, so that the mcu
backend can remember that region and start the dirty region with it.
Also, free all the rendering cache items of deleted items, to avoid accidental re-use
when re-opening a popup.
Continue to support specififying logical font sizes in the compile step
via SLINT_FONT_SIZES, but additionally look for Text/TextInput/Window elements
and extract any constant font sizes
found.
This makes it work out of the box with the printer demo.
This reverts commit faf07ea237 as it
breaks dependency tracking with the partial renderer. The effect is that
the mcu printer demo (in release?) doesn't react to input events
anymore. They are delivered by the redraw tracker doesn't get notified.
If the global opacity is zero, we don't need to paint rectangles, etc.
This shortcut is a compromise between opting out much later on femtovg
level and too early before querying properties of the rectangle. We
still want to do the latter as somebody might depend on that.