Remove ComponentVtable::input_event

And the custom handling of the mouse grabber
This commit is contained in:
Olivier Goffart 2020-11-24 16:23:37 +01:00
parent 845627c6b4
commit 8a64f10e84
69 changed files with 213 additions and 469 deletions

View file

@ -17,11 +17,11 @@ inline void mock_elapsed_time(int64_t time_in_ms)
cbindgen_private::sixtyfps_mock_elapsed_time(time_in_ms);
}
template<typename Component>
inline void send_mouse_click(const Component &component, float x, float y)
inline void send_mouse_click(const ComponentHandle<Component> *component, float x, float y)
{
cbindgen_private::sixtyfps_send_mouse_click(
{ &Component::component_type, const_cast<Component *>(&component) }, x, y,
&component.window);
reinterpret_cast<const vtable::VRc<private_api::ComponentVTable>*>(component),
x, y, &(*component)->window);
}
template<typename Component>