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

#[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 layouting_info: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> LayoutInfo, pub implicit_size: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, window: &ComponentWindow) -> Size, pub input_event_filter_before_children: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, _: MouseEvent, window: &ComponentWindow, self_rc: &ItemRc) -> InputEventFilterResult, 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, pub render: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, backend: &mut &'_ mut dyn ItemRenderer), }

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

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

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

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

Event handler for mouse and touch event. This function is called before being called on children. Then, depending on the return value, it is called for the children, and their children, then Self::input_event is called on the children, and finaly Self::input_event is called on this item again.

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

Handle input event for mouse and touch 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) -> KeyEventResultrender: unsafe extern "C" fn(_: Pin<VRef<'_, ItemVTable>>, backend: &mut &'_ mut dyn ItemRenderer)

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 Flickable[src]

impl HasStaticVTable<ItemVTable> for Window[src]

impl HasStaticVTable<ItemVTable> for BoxShadow[src]

impl HasStaticVTable<ItemVTable> for Text[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 FocusScope[src]

impl HasStaticVTable<ItemVTable> for Clip[src]

impl HasStaticVTable<ItemVTable> for Opacity[src]

impl HasStaticVTable<ItemVTable> for Rotate[src]

impl HasStaticVTable<ItemVTable> for Path[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.