Struct sixtyfps_corelib::component::ComponentVTable [−][src]
#[repr(C)]pub struct ComponentVTable {
pub visit_children_item: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: isize, order: TraversalOrder, visitor: VRefMut<'_, ItemVisitorVTable>) -> VisitChildrenResult,
pub get_item_ref: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: usize) -> Pin<VRef<'_, ItemVTable>>,
pub parent_item: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: usize, result: &mut ItemWeak),
pub layout_info: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, _: Orientation) -> LayoutInfo,
pub drop_in_place: unsafe extern "C" fn(_: VRefMut<'_, ComponentVTable>) -> Layout,
pub dealloc: unsafe extern "C" fn(_: &ComponentVTable, ptr: *mut u8, layout: Layout),
}
Expand description
A Component is representing an unit that is allocated together
Fields
visit_children_item: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: isize, order: TraversalOrder, visitor: VRefMut<'_, ItemVisitorVTable>) -> VisitChildrenResult
Visit the children of the item at index index
.
Note that the root item is at index 0, so passing 0 would visit the item under root (the children of root).
If you want to visit the root item, you need to pass -1 as an index.
get_item_ref: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: usize) -> Pin<VRef<'_, ItemVTable>>
Return a reference to an item using the given index
parent_item: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: usize, result: &mut 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
layout_info: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, _: Orientation) -> LayoutInfo
Returns the layout info for this component
drop_in_place: unsafe extern "C" fn(_: VRefMut<'_, ComponentVTable>) -> Layout
in-place destructor (for VRc)
dealloc: unsafe extern "C" fn(_: &ComponentVTable, ptr: *mut u8, layout: Layout)
dealloc function (for VRc)
Implementations
Trait Implementations
type VTable = ComponentVTable
type VTable = ComponentVTable
That’s the VTable itself (so most likely Self)