Simon Hausmann
599d86e4e1
Simplify Skia renderer API
...
Remove the size argument from render().
2023-05-26 10:46:59 +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
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
f9e5559eeb
C++ test with an example of using the Windows API directly to create a slint platform
2023-05-05 19:53:37 +02:00