Expand description
Safe LVGL v9 wrappers for the oveRTOS Rust SDK.
Provides idiomatic Rust bindings matching the C++ ove::lvgl wrapper:
- Zero-cost abstractions — every widget is
Copy+ pointer-sized - Fluent API — method chaining via
self -> SelfonCopytypes - Trait composition —
Layout,Styleable,EventTargetblanket-impl on anything implementingWidget, replacing C++ CRTP mixins - RAII —
LvglGuardfor lock/unlock,StylewithDrop no_stdcompatible — no allocator needed
Structs§
- Bar
- LVGL bar widget.
- Box
- Plain container object with scrolling disabled.
- Color
- RGB888 color matching
lv_color_t { blue, green, red }layout. - Label
- LVGL label widget.
- Lvgl
Guard - RAII guard for the LVGL mutex.
Dropcallsove_lvgl_unlock(). - Obj
- Non-owning handle to an LVGL object (
lv_obj_t *). - Style
- RAII wrapper around
lv_style_t. Callslv_style_reseton drop.
Constants§
- ALIGN_
CENTER - LVGL alignment constant: center the widget relative to its parent.
- ALIGN_
TOP_ LEFT - LVGL alignment constant: align to the top-left of the parent.
- ALIGN_
TOP_ MID - LVGL alignment constant: align to the top-center of the parent.
- PALETTE_
BLUE - LVGL palette index for the blue palette family (
LV_PALETTE_BLUE). - PART_
INDICATOR - LVGL style selector for the indicator part (e.g. bar fill, checkbox mark).
- PART_
MAIN - LVGL style selector for the main (background) part of a widget.
- SIZE_
CONTENT - LVGL v9
LV_SIZE_CONTENT— sets widget to size-to-content mode. Computed from:LV_COORD_SET_SPEC(LV_COORD_MAX)whereLV_COORD_TYPE_SHIFT = 29, giving((1<<29)-1) | (1<<29).
Traits§
- Event
Target - Event callback registration. Uses
fnpointers forno_stdcompatibility. Blanket-implemented for allWidgettypes. - Layout
- Fluent positioning, sizing, and flag manipulation.
Blanket-implemented for all
Widgettypes. - Styleable
- Fluent inline style setters. Applied to
LV_PART_MAINby default. Blanket-implemented for allWidgettypes. - Widget
- Core trait for all LVGL widget wrappers. Provides access to the raw
lv_obj_tpointer. All higher-level traits (Layout,Styleable,EventTarget) are blanket-implemented for any type implementingWidget.
Functions§
- font_
montserrat_ 14 - Safe pointer to
lv_font_montserrat_14. - font_
montserrat_ 32 - Safe pointer to
lv_font_montserrat_32. - handler
- Run the LVGL task handler.
- hbox
- Create a horizontal flex container.
- init
- Initialize LVGL via
ove_lvgl_init(). - lock
- Acquire the LVGL mutex and return an RAII guard.
- screen_
active - Get the currently active screen.
- tick
- Feed LVGL tick counter.
- vbox
- Create a vertical flex container.