Module lvgl

Module lvgl 

Source
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 -> Self on Copy types
  • Trait compositionLayout, Styleable, EventTarget blanket-impl on anything implementing Widget, replacing C++ CRTP mixins
  • RAIILvglGuard for lock/unlock, Style with Drop
  • no_std compatible — 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.
LvglGuard
RAII guard for the LVGL mutex. Drop calls ove_lvgl_unlock().
Obj
Non-owning handle to an LVGL object (lv_obj_t *).
Style
RAII wrapper around lv_style_t. Calls lv_style_reset on 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) where LV_COORD_TYPE_SHIFT = 29, giving ((1<<29)-1) | (1<<29).

Traits§

EventTarget
Event callback registration. Uses fn pointers for no_std compatibility. Blanket-implemented for all Widget types.
Layout
Fluent positioning, sizing, and flag manipulation. Blanket-implemented for all Widget types.
Styleable
Fluent inline style setters. Applied to LV_PART_MAIN by default. Blanket-implemented for all Widget types.
Widget
Core trait for all LVGL widget wrappers. Provides access to the raw lv_obj_t pointer. All higher-level traits (Layout, Styleable, EventTarget) are blanket-implemented for any type implementing Widget.

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.