logo
#[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 get_subtree_range: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: usize) -> IndexRange, pub get_subtree_component: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: usize, subindex: usize, result: &mut VWeak<ComponentVTable, Dyn>), pub get_item_tree: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>) -> Slice<'_, ItemTreeNode>, pub parent_node: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, result: &mut ItemWeak), pub subtree_index: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>) -> usize, pub layout_info: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, _: Orientation) -> LayoutInfo, pub accessible_role: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, item_index: usize) -> AccessibleRole, pub accessible_string_property: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, item_index: usize, what: AccessibleStringProperty, result: &mut SharedString), 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

get_subtree_range: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: usize) -> IndexRange

Return the range of indices below the dynamic ItemTreeNode at index

get_subtree_component: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, index: usize, subindex: usize, result: &mut VWeak<ComponentVTable, Dyn>)

Return the ComponentRc at subindex below the dynamic ItemTreeNode at index

get_item_tree: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>) -> Slice<'_, ItemTreeNode>

Return the item tree that is defined by this Component. 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

parent_node: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, result: &mut ItemWeak)

Return the node this component is a part of in the parent component.

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 Note that the returned value will typically point to a repeater node, which is strictly speaking not an Item at all!

subtree_index: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>) -> usize

Return the index of the current subtree or usize::MAX if this is not a subtree

layout_info: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, _: Orientation) -> LayoutInfo

Returns the layout info for this component

accessible_role: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, item_index: usize) -> AccessibleRole

Returns the accessible role for a given item

accessible_string_property: unsafe extern "C" fn(_: Pin<VRef<'_, ComponentVTable>>, item_index: usize, what: AccessibleStringProperty, result: &mut SharedString)

Returns the accessible property

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

Create a vtable suitable for a given type implementing the trait.

Trait Implementations

That’s the VTable itself (so most likely Self)

That’s the trait object that implements the functions Read more

Safety Read more

Safety Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.