Struct i_slint_core::graphics::OpaqueImageVTable
source · #[repr(C)]pub struct OpaqueImageVTable {
pub drop_in_place: unsafe extern "C" fn(_: VRefMut<'_, OpaqueImageVTable>) -> Layout,
pub dealloc: unsafe extern "C" fn(_: &OpaqueImageVTable, ptr: *mut u8, layout: Layout),
pub size: unsafe extern "C" fn(_: VRef<'_, OpaqueImageVTable>) -> IntSize,
pub cache_key: unsafe extern "C" fn(_: VRef<'_, OpaqueImageVTable>) -> ImageCacheKey,
}Fields§
§drop_in_place: unsafe extern "C" fn(_: VRefMut<'_, OpaqueImageVTable>) -> Layout§dealloc: unsafe extern "C" fn(_: &OpaqueImageVTable, ptr: *mut u8, layout: Layout)§size: unsafe extern "C" fn(_: VRef<'_, OpaqueImageVTable>) -> IntSizeReturns the image size
cache_key: unsafe extern "C" fn(_: VRef<'_, OpaqueImageVTable>) -> ImageCacheKeyReturns a cache key
Implementations§
source§impl OpaqueImageVTable
impl OpaqueImageVTable
sourcepub fn new<T: OpaqueImage>() -> Self
pub fn new<T: OpaqueImage>() -> Self
Create a vtable suitable for a given type implementing the trait.