mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
API: Change WindowRc::free_graphics_resources and init_items on C++
Use the ItemArray in both cases.
This commit is contained in:
parent
1fd14272cf
commit
5d3f296af9
2 changed files with 8 additions and 8 deletions
|
@ -110,10 +110,10 @@ public:
|
|||
float scale_factor() const { return slint_windowrc_get_scale_factor(&inner); }
|
||||
void set_scale_factor(float value) const { slint_windowrc_set_scale_factor(&inner, value); }
|
||||
|
||||
template<typename Component, typename ItemTree>
|
||||
void free_graphics_resources(Component *c, ItemTree items) const
|
||||
template<typename Component, typename ItemArray>
|
||||
void free_graphics_resources(Component *c, ItemArray items) const
|
||||
{
|
||||
cbindgen_private::slint_component_free_item_graphics_resources(
|
||||
cbindgen_private::slint_component_free_item_array_graphics_resources(
|
||||
vtable::VRef<ComponentVTable> { &Component::static_vtable, c }, items, &inner);
|
||||
}
|
||||
|
||||
|
@ -123,10 +123,10 @@ public:
|
|||
cbindgen_private::slint_windowrc_set_focus_item(&inner, &item_rc);
|
||||
}
|
||||
|
||||
template<typename Component, typename ItemTree>
|
||||
void init_items(Component *c, ItemTree items) const
|
||||
template<typename Component, typename ItemArray>
|
||||
void init_items(Component *c, ItemArray items) const
|
||||
{
|
||||
cbindgen_private::slint_component_init_items(
|
||||
cbindgen_private::slint_component_init_items_array(
|
||||
vtable::VRef<ComponentVTable> { &Component::static_vtable, c }, items, &inner);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue