Simon Hausmann
6eea074aac
Upgrade CI to Ubuntu 22.04
...
Stay with 20.04 for the tool/lsp/vsix binaries. Otherwise use the latest, which is also needed for libseat.
2023-07-28 13:40:37 +02:00
Simon Hausmann
36eaad96ad
Add support for terminating the app via ctrl+alt+backspace and ctrl+alt+delete
2023-07-28 13:40:37 +02:00
Simon Hausmann
bf57b32898
Clean up the order of function calls in the event loop
...
Use the common order of timer update, render, sleep.
This should be equivalent to the previous code.
2023-07-28 13:40:37 +02:00
Simon Hausmann
797de6c6d6
Fix rendering of animations without user input
...
Update timers before rendering, so that the state is correct.
2023-07-28 13:40:37 +02:00
Simon Hausmann
4991278a2b
Improve error propagation when opening DRM devices fails
...
Print the last error
2023-07-28 13:40:37 +02:00
Luke D. Jones
b907b8f904
linuxkms: iterate over DRI files to find correct device
2023-07-28 13:40:37 +02:00
Simon Hausmann
e40f6c253e
linuxkms: Add support for FemtoVG as renderer
2023-07-28 13:40:37 +02:00
Simon Hausmann
236d6ec183
Initial EGL implementation using gbm surfaces
2023-07-28 13:40:37 +02:00
Simon Hausmann
5c9eed62f1
Add a new backend that supports rendering fullscreen with Vulkan
...
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.
2023-07-28 13:40:37 +02:00
Simon Hausmann
de75892841
Vulkan: Add API to create the Skia rendering surface from vulkano surfaces
2023-07-28 13:40:37 +02:00
Simon Hausmann
9d73a05c35
Add a constructor that accepts a surface impl
2023-07-28 13:40:37 +02:00
Simon Hausmann
a71e73b549
Make the surfaces part of the Skia renderer API
2023-07-28 13:40:37 +02:00
Simon Hausmann
49fe2b1bb4
Skia: Make the surface type a dyn
...
This will allow falling back to different surfaces/renderers.
2023-07-28 13:40:37 +02:00
Olivier Goffart
f3b2b5d457
Improve documentation of AbstractRenderer
2023-07-28 12:18:34 +02:00
Olivier Goffart
ecf3937518
C++: use a macro to define the EnabledFeatures
struct
...
So that there shouldn't be more copy-paste mistakes
2023-07-28 12:18:12 +02:00
Olivier Goffart
fd7fc5ab9b
C++, remove the experimental flag
...
The platform namespace is now always enabled.
2023-07-28 10:36:08 +02:00
Olivier Goffart
3a807e46c1
Renderer feature refactor
2023-07-27 19:11:24 +02:00
Simon Hausmann
f2af8317a2
doc: Give visibility to slint::Window::new()
2023-07-27 16:50:29 +02:00
Simon Hausmann
bd6cec0f10
Some doc fixes for FemtoVG
2023-07-27 16:48:57 +02:00
Simon Hausmann
f60b2ebde9
Add slint::platform::OpenGLInterface
...
This allows for the use of the FemtoVG renderer but delegate the GL implementation to the user.
2023-07-27 16:48:57 +02:00
Simon Hausmann
3b29bfe2f6
Change OpenGLContextWrapper to return a generic Error
...
This is in preparation for making the trait public.
2023-07-27 16:48:57 +02:00
Simon Hausmann
581085a953
Added PlatformError::OtherError that stores a boxed error
...
This allows our public traits to return a boxed error.
2023-07-27 16:48:57 +02:00
Simon Hausmann
4e7ebdceba
Improve zero-size OpenGL surface handling
...
- Use NonZeroU32 in the OpenGLContextWrapper interface (correct API for the future)
- Don't render zero sized windows with the software renderer and FemtoVG
2023-07-27 16:48:57 +02:00
Olivier Goffart
c3bec089fe
C++: Rename slint_platform.h -> slint-platform.h
2023-07-27 15:42:11 +02:00
Olivier Goffart
643512f60a
C++: rename slint_intepreter.h to slint-interpreter.h
2023-07-27 15:42:11 +02:00
Olivier Goffart
a9fa51469c
swrenderer: use interior mutability for the repaint_buffer_type
2023-07-27 14:44:28 +02:00
Olivier Goffart
d43d24ec7e
Un-hide the renderer()
function from the WindowAdapter
...
Now that the SoftwareRenderer can be constructed, it is
finally possible to have your own WindowAdapter
Revert "Hide the `renderer()` function from the public API"
This reverts commit ff6653c77e
.
2023-07-27 14:44:28 +02:00
Olivier Goffart
49485dbf7d
SoftwareRenderer: add API to construct and change the buffer type
2023-07-27 14:44:28 +02:00
Olivier Goffart
116648ffcf
C++ Platform: remove the experimental namespace
2023-07-27 13:22:22 +02:00
Olivier Goffart
a29123a498
Remove invalid comments seen in the code review
2023-07-27 12:04:16 +02:00
Olivier Goffart
627deb1e9f
interpreter: Hide the ComponentFactory from the public API
...
(also re-order the types in the docs of api/rs/slint/lib.rs to make the
non-literal types appart)
2023-07-27 12:04:16 +02:00
Tobias Hunger
b55cdb9cf4
Make ComponentContainer a compiler configuration feature
...
Require `SLINT_EXPERIMENTAL_FEATURES` to be set in the environment to
enable `ComponentContainer` and `component-factory`.
2023-07-27 12:04:16 +02:00
Tobias Hunger
baa4eb1ea3
Get rid of the window when building an embedded component
...
... now that we can get the WindowAdapter from the parent component when
we embed it.
2023-07-27 12:04:16 +02:00
Tobias Hunger
a362b7a1ae
Add window_adapter
to ComponentVTable
...
Make it duplicate as `maybe_window_adapter` with a boolean `do_create`
parameter.
2023-07-27 12:04:16 +02:00
Tobias Hunger
de96455dda
No more panic when the interpreter runs into an ComponentContainer
...
... in one of the components it manages.
2023-07-27 12:04:16 +02:00
Tobias Hunger
9de515b768
Implement embedding in rust
2023-07-27 12:04:16 +02:00
Tobias Hunger
5db78b6dd2
Implement LLR code lowering for ComponentContainer
2023-07-27 12:04:16 +02:00
Tobias Hunger
d47d52bf52
ItemVTable::init(...): Take an ItemRc so that the itan can know where in the Item Tree it is located
2023-07-27 12:04:16 +02:00
Tobias Hunger
a866c6cf57
Implement embed_component
in the interpreter
2023-07-27 12:04:16 +02:00
Tobias Hunger
74ef877f70
Add embed_component to ComponentVTable
2023-07-27 12:04:16 +02:00
Tobias Hunger
689238a3af
Lower ComponentContainer
into two objects
...
... so that we have one that controls the embedding operation and one
that we can turn into a dynamic tree node where the actual embedding
happens.
Mark the placeholder Element as `is_component_placeholder` and make sure to not
optimize out that object in a later pass.
Adapt Element creation to account for the new
`is_component_placeholder`.
2023-07-27 12:04:16 +02:00
Tobias Hunger
eb84994e7a
Add lower_component_container pass
...
Do some diagnostics in that pass.
2023-07-27 12:04:16 +02:00
Tobias Hunger
05e9ce078a
Add a simplistic ComponentContainer
element
...
It just registers the type, nothing more.
2023-07-27 12:04:16 +02:00
Tobias Hunger
1fb9b6de41
docs: Sort type tables
2023-07-27 12:04:16 +02:00
Tobias Hunger
2840886d28
Add component-factory type to Slint language
...
Add a type "component-factory" to the Slint language.
2023-07-27 12:04:16 +02:00
Tobias Hunger
ad2c98937f
Disable embed test in C++
2023-07-27 12:04:16 +02:00
Tobias Hunger
df069bf6ed
component_factory: Add documentation ( #2868 )
...
* component_factory: Add documentation
What was there was not useful, this is a bit better I think:-)
Co-authored-by: Olivier Goffart <olivier@woboq.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-07-27 12:04:16 +02:00
Tobias Hunger
23564cc32d
Add a embed.slint test case
...
... currently only testing the Rust ComponentFactory
2023-07-27 12:04:16 +02:00
Tobias Hunger
731c422329
Add a ComponentFactory (Rust)
...
Add a ComponentFactory type which will eventually be used as a property
value in Slint. The idea is to copy around this type and to create
components from it that we can embed.
We do not want to hand raw components around as those are reference counted
and might end up being embedded into several places, which would break out
tree of components.
2023-07-27 12:04:16 +02:00
Olivier Goffart
136130781c
Update corrosion
2023-07-27 10:39:51 +02:00