mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop()
This allows creating multiple windows for example, and it will allow for showing windows in those tests that require a mapped window. As a bonus, the run() function on generated components is not consuming anymore.
This commit is contained in:
parent
2b7a1eebcd
commit
5f265ffc09
23 changed files with 186 additions and 32 deletions
|
@ -89,7 +89,8 @@ public:
|
|||
ComponentWindow(ComponentWindow &&) = delete;
|
||||
ComponentWindow &operator=(const ComponentWindow &) = delete;
|
||||
|
||||
void run() const { sixtyfps_component_window_run(&inner); }
|
||||
void show() const { sixtyfps_component_window_show(&inner); }
|
||||
void hide() const { sixtyfps_component_window_hide(&inner); }
|
||||
|
||||
float scale_factor() const { return sixtyfps_component_window_get_scale_factor(&inner); }
|
||||
void set_scale_factor(float value) const
|
||||
|
@ -624,4 +625,9 @@ struct VersionCheckHelper
|
|||
};
|
||||
}
|
||||
|
||||
void run_event_loop()
|
||||
{
|
||||
cbindgen_private::sixtyfps_run_event_loop();
|
||||
}
|
||||
|
||||
} // namespace sixtyfps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue