Skip to main content

lv_array_init_from_buf

Function lv_array_init_from_buf 

Source
pub unsafe extern "C" fn lv_array_init_from_buf(
    array: *mut lv_array_t,
    buf: *mut c_void,
    capacity: u32,
    element_size: u32,
)
Expand description

Init an array from a buffer. @note The buffer must be large enough to store capacity elements. The array will not release the buffer and reallocate it. The user must ensure that the buffer is valid during the lifetime of the array. And release the buffer when the array is no longer needed. @param array pointer to an lv_array_t variable to initialize @param buf pointer to a buffer to use as the array’s data @param capacity the initial capacity of the array @param element_size the size of an element in bytes