Implement rgb::Pod/rgb::Zeroable for PremultipliedRgbaColor and Rgb565
Pixel. This allows for bytemuck::cast_slice(), making it easier to copy
software renderer output into another buffer that's the same format but
Vec<u8> for example.
* Startup with napi.
* Added interpreter api for napi.
* Initial implementation of set_property/get_property on ComponentInstance
Co-authored-by: Florian Blasius <FloVanGH@users.noreply.github.com>
* fixup! minimal napi setup
* Type conversion for napi.
* Work on napi callbacks.
* Fix life-time of JsFunction kept in closures for callbacks
The life-time of napi values is limited to the method invocation from napi itself.
In order to keep a value beyond that, it's necessary to use persistent references:
https://nodejs.org/api/n-api.html#references-to-values-with-a-lifespan-longer-than-that-of-the-native-method
* Added callback tests for napi.
* Fix licenses for napi stuff.
* Update api/napi/src/interpreter/component_instance.rs
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
* Update api/napi/src/interpreter/component_instance.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Code review stuff
* Update api/napi/src/interpreter/component_definition.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update api/napi/src/interpreter/component_instance.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Update api/napi/src/interpreter/component_instance.rs
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* code review fixes
* ci fix
* code review fixes.
* up
* Revert "up"
This reverts commit 06412f1acf.
* ci fix
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
Co-authored-by: Florian Blasius <FloVanGH@users.noreply.github.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint-ui.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Fix the viewbox so that cursor isn't squashed but appears in the
correct ratio.
- Add a ~2 pixel wide white stroke around it, so that it's easier to see
on dark background.
Generally, disable the fullscreen rendering. This selection mechanism
needs reworking, as one might want to use the live-preview in a setup
where weston, etc. are running side-by-side.
This could be made configurable in the future, i.e. choosing a backend
like linuxkms, or having the window state as property in Slint.
Unfortunately, this is currently not mapped to the right keyboard layout
Also keep the mouse clamped in the visible area.
And make it start in the middle of the screen.
- Use WinitSkiaRenderer for the adapter in the winit backend (similar to WinitSoftwareRenderer)
- Use SkiaItemRenderer for the impl of the ItemRenderer trait
Adding a framebuffer with the given modifiers fails for some reason. Forcing
the gbm surface to linear is one workaround, but instead
let's use the old API without modifiers but still planar support.
This also removes the dependency to drm-ffi again, which was missing from renderer-femtovg.
The cursor is loaded by the window adapter from the cache. When it's
loaded the first time, its format will be Svg, so we convert it to a
pixel buffer. That way the skia backend can convert it on first draw
into a skia_safe::Image and replace the cache entry with the backend
storage variant.
- Fix pre-processor include search path setup so that pre-processing
slint.h finds slint_internal.h and (most importantly)
slint_generated_public.h for the feature defines.
- Add missing documentation that caused doxygen errors.
This doesn't require a windowing system, just Linux and Vulkan drivers
that supports the display extensions.
It's called linuxkms as soon this will go beyond Vulkan and also support
EGL and perhaps dumb buffers for software rendering.