### Run ESP32 Example Source: https://docs.rs/oxivgl/0.1.0 Flash and run an LVGL example on the ESP32 target using the fire27 board. ```bash ./run_fire27.sh event_trickle ``` -------------------------------- ### Run Host Examples Source: https://docs.rs/oxivgl/0.1.0 Execute LVGL examples on the host SDL2 window for interactive testing or headless screenshots. ```bash ./run_host.sh getting_started1 ``` ```bash ./run_host.sh -s getting_started1 ``` ```bash ./run_host.sh -s ``` -------------------------------- ### Run Visual Tests (Screenshots) Source: https://docs.rs/oxivgl/0.1.0 Capture screenshots for all examples to perform visual regression testing. Requires a display server. ```bash ./run_host.sh -s ``` -------------------------------- ### Run Integration Tests Source: https://docs.rs/oxivgl/0.1.0 Execute integration tests using a headless LVGL instance on the host. ```bash ./run_tests.sh int ``` -------------------------------- ### Application Framework Source: https://docs.rs/oxivgl/0.1.0 Core traits and drivers for initializing and running the LVGL render loop. ```APIDOC ## Application Framework ### Description Defines the core structure for building screens and driving the render loop. ### Components - **View** (Trait) - Implement to build a screen. Methods: `create()` (builds UI), `update()` (refreshes per tick), `on_event()` (handles input). - **LvglDriver** - Zero-sized init token proving `lv_init()` was called. - **SdlBuilder** - Builder for SDL-backed driver: `.sdl(w,h).title().mouse().build()`. ``` -------------------------------- ### Run Unit and Doctests Source: https://docs.rs/oxivgl/0.1.0 Execute unit tests and doctests embedded within the documentation. ```bash ./run_tests.sh unit ``` -------------------------------- ### Run All Tests Source: https://docs.rs/oxivgl/0.1.0 Execute unit, integration, and memory leak detection tests. This command runs quickly. ```bash ./run_tests.sh all ``` -------------------------------- ### Style System Source: https://docs.rs/oxivgl/0.1.0 Two-phase style management using mutable builders and frozen handles. ```APIDOC ## Style System ### Description Manages UI appearance through a mutable builder pattern that results in frozen, clonable handles. ### Components - **StyleBuilder** - Mutable builder: chain setters, call `.build()`. - **Style** - Frozen, cheaply clonable `Rc` handle. - **Palette** - Material Design color palette (18 colors). - **Selector** - Part + state combination for style targeting. ``` -------------------------------- ### Test Host Code Source: https://docs.rs/oxivgl/0.1.0 Run tests for the host target (x86_64-unknown-linux-gnu). Requires libclang. ```bash LIBCLANG_PATH=/usr/lib64 cargo +nightly test --target x86_64-unknown-linux-gnu ``` -------------------------------- ### Check Host Code Source: https://docs.rs/oxivgl/0.1.0 Compile and check Rust code for the host target (x86_64-unknown-linux-gnu). Requires libclang. ```bash LIBCLANG_PATH=/usr/lib64 cargo +nightly check --target x86_64-unknown-linux-gnu ``` -------------------------------- ### Add oxivgl as a Git Dependency Source: https://docs.rs/oxivgl/0.1.0 Include the library in your Cargo.toml file using the git repository source. ```toml [dependencies] oxivgl = { git = "https://github.com/emobotics-dev/oxivgl" } ``` -------------------------------- ### Implement a View with oxivgl Source: https://docs.rs/oxivgl/0.1.0 Define a custom UI view by implementing the View trait, which manages widget creation and updates within a container. ```rust use oxivgl::{ view::{NavAction, View}, widgets::{Align, Label, Obj, WidgetError}, }; #[derive(Default)] struct MyView { _label: Option>, } impl View for MyView { fn create(&mut self, container: &Obj<'static>) -> Result<(), WidgetError> { container.bg_color(0x003a57).bg_opa(255); let label = Label::new(container)?; label.text("Hello world").align(Align::Center, 0, 0); self._label = Some(label); Ok(()) } fn update(&mut self) -> Result { Ok(NavAction::None) } } oxivgl_examples_common::example_main!(MyView::default()); ``` -------------------------------- ### Run Memory Leak Detection Source: https://docs.rs/oxivgl/0.1.0 Execute memory leak detection tests using mallinfo2() to track heap usage. ```bash ./run_tests.sh leak ``` -------------------------------- ### Reactive Subjects Source: https://docs.rs/oxivgl/0.1.0 Observer pattern implementation to connect state to widgets automatically. ```APIDOC ## Reactive Subjects ### Description Subjects connect shared state to widgets, notifying observers on change. ### Methods - **Subject::new_int(val)** - Create with initial integer value. - **Subject::new_group()** - Group multiple subjects into a single observable. - **Subject::on_change(callback)** - Register a `fn(i32)` callback. - **Slider::bind_value / Arc::bind_value** - Two-way bind widget value to a `Subject`. - **Label::bind_text** - Bind label text to subject via printf-style format. ``` -------------------------------- ### Check Embedded Code Source: https://docs.rs/oxivgl/0.1.0 Compile and check Rust code for the embedded target (ESP32), enabling specific features. Requires the ESP toolchain. ```bash cargo +esp -Zbuild-std=alloc,core check --features esp-hal,log-04 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.