mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
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:
parent
5fd63b63f1
commit
66891a299c
14 changed files with 200 additions and 50 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue