The Zephyr VERSION file is excluded as this simply specifies the version
of the Zephyr applicaiton, and the documentation doesn't say how
comments should be specified or if they are supported.
The software renderer now provides a list of regions which have
changed. Convert the regions to big-endian and render them
individually to prevent the non-dirty regions from being converted
away from big-endian. Unfortunately, this still means we convert any
intersection between region more than once but this will be tackled as
a follow-up commit, as in principle this affects more than just the
Zephyr demo.
The native simulator uses the SDL display driver. In Zephyr v3.6.0 this
driver incorrectly mixes pitch and width in asserts, causing the
application to assert when run. This revision fixes the assert. Ideally
we would use a tagged release, but there is not one available yet.
For the native sim and the NXP MIMXRT1170-EVKB:
- checkout the code;
- install the linux dependencies, including Zephyr dependencies;
- setup rust with the correct target for the board;
- setup the Zephyr project, using the printerdemo_mcu manifest;
- export the Zephyr CMake package;
- build for the board specified in the matrix.
Zephyr reports that the RK055HDMIPI4MA0 MIPI display is using
PIXEL_FORMAT_BGR_565.
The buffer we provide to Slint uses `slint::platform::Rgb565Pixel`.
Somewhere, the pixel data ends up in the correct format to display on
the test hardware.
Setup the printerdemo_mcu example to build and run on the NXP
MIMXRT1170-EVKB.
There is an issue with the supported pixel formats, which will be
resolved in a future commit
Make sure we sleep, even if there are animations. Previously we would
spin the event loop forever once an animation started.
Ideally we need some slint API to get the duration until the next
animation tick.
Define a simple callback to handle touch events from Zephyr. We expect
an input_sdl_touch device to exist in the device tree. This is a fairly
simple implementation as a proof of concept.
The default behaviour of Zephyr (as configured) is to handle inputs in a
separate thread. Each `input_event` describes a specific change, with the
`sync` member specifying when the event has reached a stable state. We
use slint::invoke_from_event_loop to dispatch the slint event in the
main thread.
Add a variant of the printerdemo_mcu that works with Zephyr. For now
we only target the native_sim, and only have rendering set up. Future
commits will add touch support, and investigate synchronization
issues.
This could've been `set_opengl_context` taking an `Option`, but it turns
out that makes for an awkward interface when wanting to pass None,
because that also then requires a dummy type for the OpenGL context even
though none is wanted.
Deriving strum::EnumIter on a publicly exposed enum (like PointerEventButton) implies visibility into types that strum declares. This was added just for testing
in systest and can be solved differently.
Amends a1857e6154
* Add winit window event filter (#3066)
* Winit window event filter changelog entry
* Format fixes
* More format fixes
* Make requested changes
- Callback gets a ref to the Slint window
- Callback returns an enum
- Callback is no longer `Send`
* Format fixes
* More format fixes
* Merge conflict fixes
* Rename members of `WinitWindowEventResult`
Closes#3066
While we haven't settled on the debug info feature and are
merely controlling it via environment variable, setting that can be very hard - especially when using Yocto.
To make life easier, let's do in C++ what we can't easily do for Rust but would like to:
When enabling system testing, automatically emit the necessary debug info, by setting the environment variable when calling the compiler.
This is done by adding SLINT_ENABLED_FEATURES and SLINT_DISABLED_FEATURES properties
on the Slint::Slint target that - as lists - export the list of features and their status.
This way we can compile Slint in once place and safely in the CMake code running in application
scope check about the available features.