core: Add a double-click callback to the TouchArea (#4060)

Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
This commit is contained in:
Tobias Hunger 2023-12-08 12:12:41 +01:00 committed by GitHub
parent b54158cac4
commit 2bdcbc8e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 574 additions and 25 deletions

View file

@ -26,8 +26,13 @@ inline uint64_t get_mocked_time()
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::slint_send_mouse_click(&crc, x, y, &component->window().window_handle());
cbindgen_private::slint_send_mouse_click(x, y, &component->window().window_handle());
}
template<typename Component>
inline void send_mouse_double_click(const Component *component, float x, float y)
{
cbindgen_private::slint_send_mouse_double_click(x, y, &component->window().window_handle());
}
template<typename Component>