This sample runs the widgets demo that comes with LVGL: tabs with a profile form, charts and a shop, built with most of the widgets of the library and driven by the touchscreen.
Unlike most samples it does not end.
pbl samples samples/third_party/lvgl/widgets
every board
#include <stdio.h>
#include <pbl/kernel/delay.h>
#include <demos/lv_demos.h>
#include <pbl_lvgl.h>
int main(void) {
int ret;
ret = pbl_lvgl_init();
if (ret != 0) {
fprintf(stderr, "lvgl: init failed (%d)\n", ret);
return ret;
}
/* The demos come with LVGL, each enabled by its CONFIG_LV_USE_DEMO_* option. */
lv_demo_widgets();
printf("lvgl: widgets on %dx%d\n",
(int)lv_display_get_horizontal_resolution(pbl_lvgl_get_display()),
(int)lv_display_get_vertical_resolution(pbl_lvgl_get_display()));
while (true) {
pbl_sleep_ms(lv_timer_handler());
}
}
lvgl: widgets on \d+x\d+
Generated from PebbleOS 4bbc630fa. This page is maintained in the pebbleos repository: docs/samples/third_party/lvgl/widgets.md.