[][src]Struct sixtyfps_corelib::items::ItemVTable

#[repr(C)]pub struct ItemVTable {
    pub init: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow),
    pub geometry: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>) -> Rect,
    pub cached_rendering_data_offset: usize,
    pub rendering_primitive: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> HighLevelRenderingPrimitive,
    pub rendering_variables: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> SharedArray<RenderingVariable>,
    pub layouting_info: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> LayoutInfo,
    pub input_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: MouseEvent, window: &ComponentWindow, self_rc: &ItemRc) -> InputEventResult,
    pub focus_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: &FocusEvent, window: &ComponentWindow),
    pub key_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: &KeyEvent, window: &ComponentWindow) -> KeyEventResult,
}

Items are the nodes in the render tree.

Fields

init: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow)

This function is called by the run-time after the memory for the item has been allocated and initialized. It will be called before any user specified bindings are set.

geometry: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>) -> Rect

Returns the geometry of this item (relative to its parent item)

cached_rendering_data_offset: usize

offset in bytes fromthe *const ItemImpl. isize::MAX means None

rendering_primitive: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> HighLevelRenderingPrimitive

Return the rendering primitive used to display this item. This should depend on only rarely changed properties as it typically contains data uploaded to the GPU.

rendering_variables: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> SharedArray<RenderingVariable>

Return the variables needed to render the graphical primitives of this item. These are typically variables that do not require uploading any data sets to the GPU and can instead be represented using uniforms.

layouting_info: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> LayoutInfo

We would need max/min/preferred size, and all layout info

input_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: MouseEvent, window: &ComponentWindow, self_rc: &ItemRc) -> InputEventResult

input event

focus_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: &FocusEvent, window: &ComponentWindow)key_event: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: &KeyEvent, window: &ComponentWindow) -> KeyEventResult

Implementations

impl ItemVTable[src]

pub fn new<T: Item + ItemConsts>() -> Self[src]

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

Trait Implementations

impl HasStaticVTable<ItemVTable> for Rectangle[src]

impl HasStaticVTable<ItemVTable> for BorderRectangle[src]

impl HasStaticVTable<ItemVTable> for TextInput[src]

impl HasStaticVTable<ItemVTable> for Image[src]

impl HasStaticVTable<ItemVTable> for ClippedImage[src]

impl HasStaticVTable<ItemVTable> for TouchArea[src]

impl HasStaticVTable<ItemVTable> for Clip[src]

impl HasStaticVTable<ItemVTable> for Path[src]

impl HasStaticVTable<ItemVTable> for Flickable[src]

impl HasStaticVTable<ItemVTable> for Window[src]

impl HasStaticVTable<ItemVTable> for Text[src]

impl VTableMeta for ItemVTable[src]

type VTable = ItemVTable

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

type Target = ItemTO

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.