Huang Qi 18838d23bf examples/rust: Add basic Slint example
Summary:
- Added a basic Slint example for NuttX, demonstrating how to integrate Slint UI framework with Rust on NuttX
- Includes a simple UI with a counter and touchscreen input handling
- Provides CMake, Kconfig, and Makefile configurations for building the example

Impact:
- Introduces a new example showcasing Slint UI framework usage on NuttX
- Enables developers to explore Rust-based UI development on embedded systems
- Demonstrates integration with NuttX framebuffer and touchscreen drivers

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-29 14:08:45 +08:00

26 lines
551 B
Plaintext

import { Button, VerticalBox, HorizontalBox , AboutSlint } from "std-widgets.slint";
export component AppWindow inherits Window {
property <int> counter: 0;
timer := Timer {
interval: 1s;
running: true;
triggered() => {
counter += 1;
}
}
VerticalBox {
Text {
horizontal-alignment: center;
vertical-alignment: center;
text: "Times since start on NuttX: \n\{root.counter}";
font-size: 24px;
}
AboutSlint { }
}
}