Start a new sixtyfps::Window API for Rust, C++, the interpreters and JS

The generated component now provides access to a Window type
via the window() accessor function.

This is part of #333
This commit is contained in:
Simon Hausmann 2021-07-21 18:38:05 +02:00 committed by Simon Hausmann
parent 5fd63b63f1
commit 66891a299c
14 changed files with 200 additions and 50 deletions

View file

@ -585,6 +585,15 @@ public:
{
cbindgen_private::sixtyfps_interpreter_component_instance_show(inner(), false);
}
/// Returns the Window associated with this component. The window API can be used
/// to control different aspects of the integration into the windowing system,
/// such as the position on the screen.
sixtyfps::Window window() const
{
cbindgen_private::WindowRcOpaque win;
cbindgen_private::sixtyfps_interpreter_component_instance_window(inner(), &win);
return sixtyfps::Window(sixtyfps::private_api::WindowRc(win));
}
/// This is a convenience function that first calls show(), followed by
/// sixtyfps::run_event_loop() and hide().
void run() const