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
|
@ -13,7 +13,8 @@ LICENSE END */
|
|||
|
||||
namespace sixtyfps::testing {
|
||||
|
||||
inline void init() {
|
||||
inline void init()
|
||||
{
|
||||
cbindgen_private::sixtyfps_testing_init_backend();
|
||||
}
|
||||
|
||||
|
@ -25,7 +26,7 @@ template<typename Component>
|
|||
inline void send_mouse_click(const Component *component, float x, float y)
|
||||
{
|
||||
auto crc = *component->self_weak.into_dyn().lock();
|
||||
cbindgen_private::sixtyfps_send_mouse_click(&crc, x, y, &component->window);
|
||||
cbindgen_private::sixtyfps_send_mouse_click(&crc, x, y, &component->window_);
|
||||
}
|
||||
|
||||
template<typename Component>
|
||||
|
@ -33,7 +34,7 @@ inline void send_keyboard_string_sequence(const Component *component,
|
|||
const sixtyfps::SharedString &str,
|
||||
cbindgen_private::KeyboardModifiers modifiers = {})
|
||||
{
|
||||
cbindgen_private::send_keyboard_string_sequence(&str, modifiers, &component->window);
|
||||
cbindgen_private::send_keyboard_string_sequence(&str, modifiers, &component->window_);
|
||||
}
|
||||
|
||||
#define assert_eq(A, B) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue