App and Service improvements (#106)

This commit is contained in:
Ken Van Hoeylandt
2024-12-05 22:46:27 +01:00
committed by GitHub
parent e86a11b7e2
commit 50ee77d572
69 changed files with 692 additions and 596 deletions
+3 -3
View File
@@ -38,9 +38,9 @@ UI is created with [lvgl](https://github.com/lvgl/lvgl) which has lots of [widge
Creating a touch-capable UI is [easy](https://docs.lvgl.io/9.0/get-started/quick-overview.html) and doesn't require your own render loop!
```C++
static void onShow(tt::app::App app, lv_obj_t* parent) {
static void onShow(tt::app::AppContext context, lv_obj_t* parent) {
// Default toolbar with app name and close button
lv_obj_t* toolbar = tt::lvgl::toolbar_create(parent, app);
lv_obj_t* toolbar = tt::lvgl::toolbar_create(parent, context);
lv_obj_align(toolbar, LV_ALIGN_TOP_MID, 0, 0);
// Label widget
@@ -50,7 +50,7 @@ static void onShow(tt::app::App app, lv_obj_t* parent) {
// Widgets are auto-removed from the parent when the app is closed
}
extern const tt::app::Manifest manifest = {
extern const tt::app::AppManifest manifest = {
.id = "HelloWorld", // Used to identify and start an app
.name = "Hello World", // Shown on the desktop and app's toolbar
.onShow = onShow // A minimal setup sets the onShow() function