lvgl / lv_binding_rust

LVGL bindings for Rust. A powerful and easy-to-use embedded GUI with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash).
MIT License
668 stars 69 forks source link

..._get_text functions not available #162

Open Johennes opened 6 months ago

Johennes commented 6 months ago

The ..._get_text functions on Label and Textarea don't seem to be available currently. I can get text by calling the C function in an unsafe block like this:

let mut textarea = Textarea::new()?;
unsafe {
    let text = CStr::from_ptr(lv_textarea_get_text(textarea.raw().unwrap().as_ptr()));
}

However, it would be nice if I could do textarea.get_text().