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>>) -> LayoutInfo, pub apply_layout: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, _: Rect), pub drop_in_place: unsafe extern "C" fn(_: VRefMut<'_, ComponentVTable>) -> Layout, pub dealloc: unsafe extern "C" fn(_: &ComponentVTable, ptr: *mut u8, layout: Layout), }
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>>) -> LayoutInfo
Returns the layout info for this component
apply_layout: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, _: Rect)
Apply the layout to all the items in the component, and set the geometry of the root to the given rect
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
impl ComponentVTable
[src]
impl ComponentVTable
[src]Trait Implementations
impl VTableMeta for ComponentVTable
[src]
impl VTableMeta for ComponentVTable
[src]type VTable = ComponentVTable
That’s the VTable itself (so most likely Self)
type Target = ComponentTO
That’s the trait object that implements the functions Read more
Auto Trait Implementations
impl RefUnwindSafe for ComponentVTable
impl RefUnwindSafe for ComponentVTable
impl Send for ComponentVTable
impl Send for ComponentVTable
impl Sync for ComponentVTable
impl Sync for ComponentVTable
impl Unpin for ComponentVTable
impl Unpin for ComponentVTable
impl UnwindSafe for ComponentVTable
impl UnwindSafe for ComponentVTable