mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Don't return the ItemWeak by value
It is not working in C++ because ItemWeak has a destructor
This commit is contained in:
parent
802383cd6b
commit
a4abb86782
5 changed files with 25 additions and 18 deletions
|
@ -38,9 +38,11 @@ pub struct ComponentVTable {
|
|||
index: usize,
|
||||
) -> core::pin::Pin<VRef<ItemVTable>>,
|
||||
|
||||
/// Return the parent item. The return value is an item weak because it can be null if
|
||||
/// there is no parent
|
||||
pub parent_item: extern "C" fn(core::pin::Pin<VRef<ComponentVTable>>, index: usize) -> ItemWeak,
|
||||
/// Return the parent item.
|
||||
/// The return value is an item weak because it can be null if there is no parent.
|
||||
/// And the return value is passed by &mut because ItemWeak has a destructor
|
||||
pub parent_item:
|
||||
extern "C" fn(core::pin::Pin<VRef<ComponentVTable>>, index: usize, result: &mut ItemWeak),
|
||||
|
||||
/// Returns the layout info for this component
|
||||
pub layout_info: extern "C" fn(core::pin::Pin<VRef<ComponentVTable>>) -> LayoutInfo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue