Rename init_*_items to register_component

I want to track component structure changes in the window without
generating more code. So use a more generic name for the init_*_items
functions, so that I can add the functionality I need in there.

Also add a register_component to PlatformWindow and call that.
This commit is contained in:
Tobias Hunger 2022-06-29 15:12:50 +02:00 committed by Tobias Hunger
parent 581533f302
commit dd59d41ee6
13 changed files with 27 additions and 11 deletions

View file

@ -126,9 +126,9 @@ public:
}
template<typename Component, typename ItemArray>
void init_items(Component *c, ItemArray items) const
void register_component(Component *c, ItemArray items) const
{
cbindgen_private::slint_component_init_items(
cbindgen_private::slint_register_component(
vtable::VRef<ComponentVTable> { &Component::static_vtable, c }, items, &inner);
}