Simon Hausmann
599d86e4e1
Simplify Skia renderer API
...
Remove the size argument from render().
2023-05-26 10:46:59 +02:00
Simon Hausmann
dd61890e23
Fix rendering of the Qt platform example with high-dpi
...
- Provide a C++ platform event for the scale factor change and send it
- Report the correct logical and physical sizes to Slint
2023-05-25 05:29:52 +02:00
Simon Hausmann
ef4074b041
Further simplify renderer storage in C++ platform API
...
Using an std::optional is even simpler and avoids a malloc.
2023-05-21 14:40:43 +02:00
Simon Hausmann
baba30370a
Simplify C++ WindowAdapter <> Renderer interface further
...
Instead of the WindowAdapter being a template for a concept, let's just
use an abstract base class for the renderer. Since we provide the
renderers, this simplifies two things:
- Ownership becomes clear to the user by creating the renderer instance
in a field of theirs.
- All template use goes away on the user side.
2023-05-21 14:40:43 +02:00
Simon Hausmann
fe4a434ce4
Remove the WindowAdapter from the renderer constructor
...
This allows disentangling the native window creation from the renderer
creation, which is rather ugly and complicated on the C++ side.
2023-05-21 14:40:43 +02:00
Olivier Goffart
dd5ef9993f
Platform: Add a Resized event and use that to convey the changes in size ( #2759 )
2023-05-21 12:12:30 +02:00
Simon Hausmann
3db5b97790
Fix the Qt native platform example
...
Fix regression introduced with commit d0cdc462c7
:
The window surface must exists before querying for the window handles.
2023-05-17 14:59:16 +02:00
Simon Hausmann
b27163954a
Fix build of experimental C++ platform API on Linux
2023-05-17 12:41:37 +02:00
Simon Hausmann
3340c31249
Clean up C++ experimental native window handle API
...
- Use explicit constructor functions
- Box the implementation
2023-05-11 10:42:09 +02:00
Simon Hausmann
d0cdc462c7
Simplify Skia Renderer
...
Allocate the renderer's surface type in the constructor.
This also changes the C++ API to match this, which complicates some code
a little bit.
2023-05-11 10:42:09 +02:00
Olivier Goffart
ae20ec59c8
Rename PointerEventButton::None to PointerEventButton::Other
...
And mark the enum non_exhaustive
closes #1903
2023-01-26 13:36:54 +01:00
Olivier Goffart
8967deef56
C++: add a manual test to test the platform API using Qt
2023-01-17 10:21:11 +01:00