### Basic GStreamer Setup Example Source: https://lvgl.io/docs/open/libs/video_support/gstreamer Initializes LVGL and runs a GStreamer application within the main loop. ```c int main(void) { /* Initialize LVGL */ lv_init(); /* Setup display driver */ lv_display_t *display = lv_display_create(800, 480); /* ... configure display driver ... */ /* Create and run your GStreamer application */ lv_example_gstreamer_1(); while (1) { lv_timer_handler(); } return 0; } ``` -------------------------------- ### Initialize LVGL with esp_bsp Source: https://lvgl.io/docs/open/integration/chip_vendors/espressif/add_lvgl_to_esp32_idf_project Example of starting the LVGL subsystem and running a demo when using the esp_bsp component. ```c void app_main(void) { bsp_display_start(); bsp_display_backlight_on(); bsp_display_lock(0); lv_demo_benchmark(); bsp_display_unlock(); } ``` -------------------------------- ### Initialize LVGL with PPA support Source: https://lvgl.io/docs/open/integration/chip_vendors/espressif/hardware_accelerator_ppa Example setup for the LVGL subsystem on ESP-IDF, utilizing double buffering to maximize PPA performance. ```c #include "lvgl.h" #include "bsp/esp-bsp.h" void app_main(void) { bsp_display_cfg_t cfg = { .lvgl_port_cfg = ESP_LVGL_PORT_INIT_CONFIG(), /* Use buffers with the same size of the screen in pixels */ .buffer_size = BSP_LCD_H_RES * BSP_LCD_V_RES, /* Use double buffer (possible with SPIRAM) */ .double_buffer = 1, .hw_cfg = { #if CONFIG_BSP_LCD_TYPE_HDMI #if CONFIG_BSP_LCD_HDMI_800x600_60HZ .hdmi_resolution = BSP_HDMI_RES_800x600, #elif CONFIG_BSP_LCD_HDMI_1280x720_60HZ .hdmi_resolution = BSP_HDMI_RES_1280x720, #elif CONFIG_BSP_LCD_HDMI_1280x800_60HZ .hdmi_resolution = BSP_HDMI_RES_1280x800, #elif CONFIG_BSP_LCD_HDMI_1920x1080_30HZ .hdmi_resolution = BSP_HDMI_RES_1920x1080, #endif #else .hdmi_resolution = BSP_HDMI_RES_NONE, #endif .dsi_bus = { .phy_clk_src = MIPI_DSI_PHY_CLK_SRC_DEFAULT, .lane_bit_rate_mbps = BSP_LCD_MIPI_DSI_LANE_BITRATE_MBPS, } }, .flags = { #if CONFIG_BSP_LCD_COLOR_FORMAT_RGB888 .buff_dma = false, #else .buff_dma = true, #endif /* Use SPIRAM when available */ .buff_spiram = true, .sw_rotate = true, } }; bsp_display_start_with_config(&cfg); bsp_display_backlight_on(); bsp_display_lock(0); lv_demo_widgets(); bsp_display_unlock(); } ``` -------------------------------- ### Minimal UEFI application example Source: https://lvgl.io/docs/open/integration/pc/uefi A complete example showing initialization of the UEFI driver, display, input devices, and the main loop. ```c #include "lvgl/lvgl.h" #include "lvgl/examples/lv_examples.h" #include "lvgl/demos/lv_demos.h" EFI_STATUS EFIAPI EfiMain(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { lv_uefi_init(ImageHandle, SystemTable); lv_init(); if (!lv_is_initialized()) return EFI_NOT_READY; EFI_HANDLE handle = lv_uefi_display_get_active(); if (!handle) handle = lv_uefi_display_get_any(); if (!handle) { lv_deinit(); return EFI_UNSUPPORTED; } lv_display_t *display = lv_uefi_display_create(handle); lv_display_set_default(display); lv_group_t *group = lv_group_create(); lv_group_set_default(group); lv_obj_t *cursor = lv_image_create(lv_layer_top()); lv_image_set_src(cursor, "E:cursor.png"); lv_indev_t *indev; indev = lv_uefi_simple_text_input_indev_create(); lv_indev_set_group(indev, group); lv_uefi_simple_text_input_indev_add_all(indev); indev = lv_uefi_simple_pointer_indev_create(NULL); lv_uefi_simple_pointer_indev_add_all(indev); lv_indev_set_cursor(indev, cursor); indev = lv_uefi_absolute_pointer_indev_create(NULL); lv_uefi_absolute_pointer_indev_add_all(indev); lv_demo_widgets(); size_t counter = 0; while (counter < 10000) { counter++; gBS->Stall(1000); lv_tick_inc(1); lv_timer_handler(); } return EFI_SUCCESS; } ``` -------------------------------- ### Example WORKDIR path Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/terms_and_variables A concrete example of a resolved WORKDIR path for a specific recipe. ```bash poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0 ``` -------------------------------- ### Arduino NV3007 Integration Example Source: https://lvgl.io/docs/open/integration/external_display_controllers/nv3007 Complete example demonstrating SPI configuration, callback implementation, and LVGL initialization for the NV3007. ```cpp #include /* Platform-specific includes */ #include #define LCD_DC 21 #define LCD_CS 5 #define LCD_RST 4 #define LCD_SCK 18 #define LCD_MOSI 23 #define LCD_MISO -1 #define LCD_BL 15 #define SPI_CLK 40000000 #define BUFFER_SIZE 142 * 50 uint8_t buf[BUFFER_SIZE]; /* Tell LVGL how much time has elapsed */ static uint32_t my_tick(void) { return millis(); } /* Define your platform-specific functions to send commands and data */ void my_lcd_send_cmd(lv_display_t *disp, const uint8_t *cmd, size_t cmd_size, const uint8_t *param, size_t param_size) { SPI.beginTransaction(SPISettings(SPI_CLK, MSBFIRST, SPI_MODE0)); /* Send command */ digitalWrite(LCD_DC, LOW); /* command mode */ digitalWrite(LCD_CS, LOW); /* CS low */ SPI.transferBytes(cmd, NULL, cmd_size); /* Send parameters (if any) */ if (param != NULL && param_size > 0) { digitalWrite(LCD_DC, HIGH); /* data mode */ SPI.transferBytes(param, NULL, param_size); } digitalWrite(LCD_CS, HIGH); /* CS high */ SPI.endTransaction(); } void my_lcd_send_color(lv_display_t *disp, const uint8_t *cmd, size_t cmd_size, uint8_t *param, size_t param_size) { SPI.beginTransaction(SPISettings(SPI_CLK, MSBFIRST, SPI_MODE0)); digitalWrite(LCD_CS, LOW); /* Send the command first */ digitalWrite(LCD_DC, LOW); SPI.transferBytes(cmd, NULL, cmd_size); /* Then send the pixel data */ if (param && param_size > 0) { digitalWrite(LCD_DC, HIGH); SPI.transferBytes(param, NULL, param_size); } digitalWrite(LCD_CS, HIGH); SPI.endTransaction(); /* Important: signal LVGL that we're done */ lv_display_flush_ready(disp); } void setup() { pinMode(LCD_BL, OUTPUT); digitalWrite(LCD_BL, HIGH); /* turn on backlight */ pinMode(LCD_DC, OUTPUT); pinMode(LCD_CS, OUTPUT); pinMode(LCD_RST, OUTPUT); /* reset sequence */ digitalWrite(LCD_RST, HIGH); delay(100); digitalWrite(LCD_RST, LOW); delay(120); digitalWrite(LCD_RST, HIGH); delay(120); SPI.begin(LCD_SCK, LCD_MISO, LCD_MOSI, LCD_CS); /* SCK, MISO, MOSI, SS */ digitalWrite(LCD_CS, HIGH); /* disable device */ delay(100); /* wait for device to stabilize */ lv_init(); lv_tick_set_cb(my_tick); /* Create NV3007 display */ lv_display_t *disp = lv_nv3007_create(142, 428, LV_LCD_FLAG_NONE, my_lcd_send_cmd, my_lcd_send_color); lv_nv3007_set_gap(disp, 0, 14); lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270); lv_display_set_color_format(disp, LV_COLOR_FORMAT_RGB565_SWAPPED); lv_display_set_buffers(disp, buf, NULL, BUFFER_SIZE, LV_DISPLAY_RENDER_MODE_PARTIAL); /* Create a simple label on the display */ lv_obj_t *label = lv_label_create(lv_screen_active()); lv_label_set_text(label, "Hello NV3007!"); lv_obj_align(label, LV_ALIGN_CENTER, 0, 0); } void loop() { lv_task_handler(); delay(5); } ``` -------------------------------- ### Install NuttX Prerequisites Source: https://lvgl.io/docs/open/integration/rtos/nuttx Install necessary build tools and dependencies on a Linux-based system. ```bash $ sudo apt-get install automake bison build-essential flex gcc-arm-none-eabi gperf git libncurses5-dev libtool libusb-dev libusb-1.0.0-dev pkg-config kconfig-frontends openocd ``` -------------------------------- ### Execute SDK Installer Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/lvgl_recipe Run the generated shell script to install the SDK into a target directory. ```bash $ ./sdk/poky-glibc-x86_64-core-image-base-cortexa53-raspberrypi3-64-toolchain-5.0.4.sh Poky (Yocto Project Reference Distro) SDK installer version 5.0.4 ================================================================= Enter target directory for SDK (default: /opt/poky/5.0.4): /opt/poky/sdk-with-lvgl You are about to install the SDK to "/opt/poky/sdk-with-lvgl". Proceed [Y/n]? y ``` -------------------------------- ### Install Build Host Packages Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/lvgl_recipe Installs essential dependencies on an Ubuntu-based build host. ```bash sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential \ chrpath socat cpio python3 python3-pip python3-pexpect xz-utils \ debianutils iputils-ping python3-git python3-jinja2 python3-subunit zstd \ liblz4-tool file locales libacl1 ``` -------------------------------- ### Get Text Selection Start Source: https://lvgl.io/docs/open/api/public/widgets/lv_label_h Retrieves the starting index of the current text selection. ```c uint32_t lv_label_get_text_selection_start(const lv_obj_t *obj) ``` -------------------------------- ### Install libpng via APT Source: https://lvgl.io/docs/open/libs/image_support/libpng Use this command to install the libpng development headers on Debian-based systems. ```bash sudo apt install libpng-dev ``` -------------------------------- ### Get Arc Label Start Angle Source: https://lvgl.io/docs/open/api/public/widgets/lv_arclabel_h Retrieves the start angle of the arc label, which may be fractional if LV_USE_FLOAT is enabled. ```c lv_value_precise_t lv_arclabel_get_angle_start(lv_obj_t *obj) ``` -------------------------------- ### Initialize and Run LVGL Source: https://lvgl.io/docs/open/getting_started/porting This example demonstrates the core integration flow, including driver initialization, display buffer configuration, and the main timer handler loop. ```c void main(void) { your_driver_init(); lv_init(); lv_tick_set_cb(my_get_millis); lv_display_t * display = lv_display_create(320, 240); /* LVGL will render to this 1/10 screen sized buffer for 2 bytes/pixel */ static uint8_t buf[320 * 240 / 10 * 2]; lv_display_set_buffers(display, buf, NULL, sizeof(buf), LV_DISPLAY_RENDER_MODE_PARTIAL); /* This callback will display the rendered image */ lv_display_set_flush_cb(display, my_flush_cb); /* Create widgets */ lv_obj_t * label = lv_label_create(lv_screen_active()); lv_label_set_text(label, "Hello LVGL!"); /* Make LVGL periodically execute its tasks */ while(1) { /* Provide updates to currently-displayed Widgets here. */ lv_timer_handler(); my_sleep(5); /*Wait 5 milliseconds before processing LVGL timer again*/ } } /* Return the elapsed milliseconds since startup. * It needs to be implemented by the user */ uint32_t my_get_millis(void) { return my_tick_ms; } /* Copy rendered image to screen. * This needs to be implemented by the user. */ void my_flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * px_buf) { /* Show the rendered image on the display */ my_display_update(area, px_buf); /* Indicate that the buffer is available. * If DMA were used, call in the DMA complete interrupt. */ lv_display_flush_ready(disp); } ``` -------------------------------- ### lv_label_get_text_selection_start Source: https://lvgl.io/docs/open/api/public/widgets/lv_label_h Get the start index of the selected text. ```APIDOC ## lv_label_get_text_selection_start ### Description Gets the selection start index. ### Signature `uint32_t lv_label_get_text_selection_start(const lv_obj_t *obj)` ### Parameters - **obj** (const lv_obj_t *) - Required - Pointer to a label object. ### Returns - **uint32_t** - Selection start index. ``` -------------------------------- ### Create a QNX LVGL Application Source: https://lvgl.io/docs/open/integration/rtos/qnx Example of initializing LVGL, creating a window, adding input devices, and running the event loop on QNX. ```c #include int main(int argc, char **argv) { /* Initialize the library. */ lv_init(); /* Create a 800x480 window. */ lv_display_t *disp = lv_qnx_window_create(800, 480); lv_qnx_window_set_title(disp, "LVGL Example"); /* Add keyboard and mouse devices. */ lv_qnx_add_keyboard_device(disp); lv_qnx_add_pointer_device(disp); /* Generate the UI. */ lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x003a57), LV_PART_MAIN); lv_obj_t * label = lv_label_create(lv_screen_active()); lv_label_set_text(label, "Hello world"); lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_PART_MAIN); lv_obj_align(label, LV_ALIGN_CENTER, 0, 0); /* Run the event loop until it exits. */ return lv_qnx_event_loop(disp); } ``` -------------------------------- ### Install Buildroot system dependencies Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/buildroot/custom_image Installs the required host packages on Ubuntu to support the Buildroot compilation process. ```bash sudo apt install sed make binutils gcc g++ bash patch gzip bzip2 perl tar \ cpio python3 unzip rsync wget libncurses-dev ``` -------------------------------- ### lv_arclabel_get_angle_start Source: https://lvgl.io/docs/open/api/public/widgets/lv_arclabel_h Get the start angle of an arc label. ```APIDOC ## lv_value_precise_t lv_arclabel_get_angle_start(lv_obj_t *obj) ### Description Get the start angle of an arc label. ### Parameters - **obj** (lv_obj_t *) - Pointer to an arc label object ### Returns - **lv_value_precise_t** - The start angle [0..360] ``` -------------------------------- ### Install Dependencies for mkttf Source: https://lvgl.io/docs/open/main-modules/fonts/bdf_fonts Installs necessary tools like imagemagick, python3-fontforge, and potrace on Ubuntu systems. ```bash sudo apt install imagemagick python3-fontforge potrace ``` -------------------------------- ### Get Arc Angles Source: https://lvgl.io/docs/open/api/public/widgets/lv_arc_h Retrieves the start or end angles for the arc or its background. ```c lv_value_precise_t lv_arc_get_angle_start(lv_obj_t *obj) ``` ```c lv_value_precise_t lv_arc_get_angle_end(lv_obj_t *obj) ``` ```c lv_value_precise_t lv_arc_get_bg_angle_start(lv_obj_t *obj) ``` ```c lv_value_precise_t lv_arc_get_bg_angle_end(lv_obj_t *obj) ``` -------------------------------- ### Initialize GLFW and LVGL Source: https://lvgl.io/docs/open/integration/embedded_linux/drivers/glfw A complete example demonstrating how to initialize LVGL, create a GLFW window, set up a texture display, and run the main event loop. ```c #include "lvgl/lvgl.h" #include "lvgl/examples/lv_examples.h" #include "lvgl/demos/lv_demos.h" #define WIDTH 640 #define HEIGHT 480 int main() { /* initialize lvgl */ lv_init(); /* create a window and initialize OpenGL */ lv_opengles_window_t * window = lv_opengles_glfw_window_create(WIDTH, HEIGHT, true); /* create a display that flushes to a texture */ lv_display_t * texture = lv_opengles_texture_create(WIDTH, HEIGHT); lv_display_set_default(texture); /* add the texture to the window */ unsigned int texture_id = lv_opengles_texture_get_texture_id(texture); lv_opengles_window_texture_t * window_texture = lv_opengles_window_add_texture(window, texture_id, WIDTH, HEIGHT); /* get the mouse indev of the window texture */ lv_indev_t * mouse = lv_opengles_window_texture_get_mouse_indev(window_texture); /* add a cursor to the mouse indev */ LV_IMAGE_DECLARE(mouse_cursor_icon); lv_obj_t * cursor_obj = lv_image_create(lv_screen_active()); lv_image_set_src(cursor_obj, &mouse_cursor_icon); lv_indev_set_cursor(mouse, cursor_obj); /* create Widgets on the screen */ lv_demo_widgets(); while (1) { uint32_t time_until_next = lv_timer_handler(); if(time_until_next == LV_NO_TIMER_READY) time_until_next = LV_DEF_REFR_PERIOD; /*handle LV_NO_TIMER_READY. Another option is to `sleep` for longer*/ lv_delay_ms(time_until_next); } return 0; } ``` -------------------------------- ### Get Animation Delay Source: https://lvgl.io/docs/open/api/public/core/lv_anim_h Retrieves the configured start delay of an animation in milliseconds. ```c uint32_t lv_anim_get_delay(const lv_anim_t *a) ``` -------------------------------- ### Configure Media Sources Source: https://lvgl.io/docs/open/libs/video_support/gstreamer Demonstrates setting up various media sources using URI, File, and WebRTC factories. ```c /* Load from web URL */ lv_gstreamer_set_src(streamer, LV_GSTREAMER_FACTORY_URI_DECODE, LV_GSTREAMER_PROPERTY_URI_DECODE, "https://example.com/stream.webm"); /* Load from local file */ lv_gstreamer_set_src(streamer, LV_GSTREAMER_FACTORY_URI_DECODE, LV_GSTREAMER_PROPERTY_URI_DECODE, "file:///path/to/video.mp4"); /* RTSP stream */ lv_gstreamer_set_src(streamer, LV_GSTREAMER_FACTORY_URI_DECODE, LV_GSTREAMER_PROPERTY_URI_DECODE, "rtsp://camera.local/stream"); ``` ```c /* Direct file access */ lv_gstreamer_set_src(streamer, LV_GSTREAMER_FACTORY_FILE, LV_GSTREAMER_PROPERTY_FILE, "/path/to/video.mp4"); ``` ```c /* WebRTC stream */ lv_gstreamer_set_src(streamer, LV_GSTREAMER_FACTORY_WEBRTCSRC, LV_GSTREAMER_PROPERTY_WEBRTCSRC, "ws://signalserver:port/"); ``` -------------------------------- ### Include LVGL Demos and Examples Source: https://lvgl.io/docs/open/integration/frameworks/platformio Modify build_src_filter in platformio.ini to force the compilation of library demos and examples. ```ini build_src_filter = +<*> ; Force compile LVGL demos and examples, remove when working on your own project +<../.pio/libdeps/${PIOENV}/lvgl/demos> +<../.pio/libdeps/${PIOENV}/lvgl/examples> ``` -------------------------------- ### Get elapsed milliseconds Source: https://lvgl.io/docs/open/api/public/tick/lv_tick_h Retrieves the total elapsed milliseconds since the system started. ```c uint32_t lv_tick_get(void) ``` -------------------------------- ### Build and install the SDK Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/buildroot/quick_start Compiles the SDK and extracts it to the user's home directory. ```bash cd output make sdk mkdir -p ~/sdk tar -xzf images/aarch64-buildroot-linux-gnu_sdk-buildroot.tar.gz -C ~/sdk ``` -------------------------------- ### Initialize Display with Flags Source: https://lvgl.io/docs/open/integration/external_display_controllers/gen_mipi Example of creating a display instance using multiple configuration flags combined with bitwise OR. ```c lv_display_t * disp; disp = lv_lcd_generic_mipi_create(MY_DISPLAY_PIXEL_WIDTH, MY_DISPLAY_PIXEL_HEIGHT, LV_LCD_FLAG_MIRROR_X | LV_LCD_FLAG_BGR, my_lcd_send_cmd, my_lcd_send_color); ``` -------------------------------- ### Get Background Gradient Stops Source: https://lvgl.io/docs/open/api/public/core/lv_obj_style_gen_h Retrieves the start and end stop points for the background gradient. ```c static int32_t lv_obj_get_style_bg_main_stop(const lv_obj_t *obj, lv_part_t part) ``` ```c static int32_t lv_obj_get_style_bg_grad_stop(const lv_obj_t *obj, lv_part_t part) ``` -------------------------------- ### Initialize SDL Driver and LVGL Source: https://lvgl.io/docs/open/integration/pc/sdl Basic setup for initializing LVGL, creating an SDL window, and setting up input devices. ```c #define SDL_MAIN_HANDLED /* To fix SDL's "undefined reference to WinMain" issue */ #include "lvgl/lvgl.h" static lv_display_t *display; static lv_indev_t *mouse; static lv_indev_t *mouse_wheel; static lv_indev_t *keyboard; int main() { /* Initialize LVGL */ lv_init(); display = lv_sdl_window_create(SDL_HOR_RES, SDL_VER_RES); mouse = lv_sdl_mouse_create(); mouse_wheel = lv_sdl_mousewheel_create(); keyboard = lv_sdl_keyboard_create(); /* Create widgets on the screen */ lv_demo_widgets(); while (1) { lv_timer_handler(); lv_delay_ms(5); } return 0; } ``` -------------------------------- ### Initialize X11 Display and Inputs Source: https://lvgl.io/docs/open/integration/embedded_linux/drivers/X11 Minimal setup for opening an X11 window and enabling input support. ```c int main(int argc, char ** argv) { ... /* initialize X11 display driver */ lv_display_t * disp = lv_x11_window_create("LVGL X11 Simulation", monitor_hor_res, monitor_ver_res); /* initialize X11 input drivers (for keyboard, mouse & mousewheel) */ lv_x11_inputs_create(disp, NULL); ... while(true) { ... /* Periodically call the lv_timer handler */ lv_timer_handler(); } } ``` -------------------------------- ### Get next input device Source: https://lvgl.io/docs/open/api/public/indev/lv_indev_h Iterates through registered input devices. Pass NULL to start from the first device. ```c lv_indev_t * lv_indev_get_next(lv_indev_t *indev) ``` -------------------------------- ### Configure and build FFmpeg from source Source: https://lvgl.io/docs/open/libs/video_support/ffmpeg Manual configuration and build steps for FFmpeg when installing from source. ```bash ./configure --disable-all --disable-autodetect --disable-podpages --disable-asm --enable-avcodec --enable-avformat --enable-decoders --enable-encoders --enable-demuxers --enable-parsers --enable-protocol='file' --enable-swscale --enable-zlib make sudo make install ``` -------------------------------- ### Get two fingers swipe distance Source: https://lvgl.io/docs/open/api/public/indev/lv_indev_gesture_h Retrieves the distance in pixels from the starting center for a two-finger swipe gesture. ```c float lv_event_get_two_fingers_swipe_distance(lv_event_t *gesture_event) ``` -------------------------------- ### Get next line index Source: https://lvgl.io/docs/open/api/private/misc/lv_text_private_h Determines the byte index of the start of the next line, considering line breaks. ```c uint32_t lv_text_get_next_line(const char *txt, uint32_t len, const lv_font_t *font, int32_t *used_width, lv_text_attributes_t *attributes) ``` -------------------------------- ### Initialize SDK Environment Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/lvgl_recipe Source the environment setup script to configure the shell for cross-compilation. ```bash source /opt/poky/sdk-with-lvgl/environment-setup-cortexa53-poky-linux ``` -------------------------------- ### Set animation get value callback Source: https://lvgl.io/docs/open/api/public/core/lv_anim_h Sets a callback to retrieve the current value, allowing start and end values to be relative to the current state. ```c void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) ``` -------------------------------- ### lv_obj_is_click_focusable Source: https://lvgl.io/docs/open/api/public/core/lv_obj_h Get whether the object gets focused when clicked. ```APIDOC ## bool lv_obj_is_click_focusable(const lv_obj_t *obj) ### Description Get whether the object gets focused when clicked. ### Parameters - **obj** (const lv_obj_t *) - Required - Pointer to a widget ### Returns - **bool** - true if click focusable is enabled ``` -------------------------------- ### Create X11 window and inputs Source: https://lvgl.io/docs/open/api/public/drivers/x11/lv_x11_h Demonstrates initializing an X11 display driver with input support, either with or without a custom mouse cursor. ```c lv_display_t* disp = lv_x11_window_create("My Window Title", window_width, window_width); lv_x11_inputs_create(disp, NULL); ``` ```c lv_image_dsc_t mouse_symbol = {.....}; lv_display_t* disp = lv_x11_window_create("My Window Title", window_width, window_width); lv_x11_inputs_create(disp, &mouse_symbol); ``` -------------------------------- ### Configure LV_USE_DEMO_BENCHMARK Source: https://lvgl.io/docs/open/api/public/config/lv_conf_internal_h Enable the system benchmarking demo. ```c #define LV_USE_DEMO_BENCHMARK 0 ``` -------------------------------- ### Video Start Command Source: https://lvgl.io/docs/open/api/private/drivers/display/ft81x/lv_ft81x_defines_h Definition for the video start command. ```c #define CMD_VIDEOSTART 0xFFFFFF40 ``` -------------------------------- ### Start animation Source: https://lvgl.io/docs/open/api/public/core/lv_anim_h Starts an animation based on an initialized lv_anim_t structure. ```c lv_anim_t * lv_anim_start(const lv_anim_t *a) ``` -------------------------------- ### Execute the build process Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/lvgl_recipe Run the bitbake command to start building the core-image-base image. ```bash bitbake core-image-base ``` -------------------------------- ### Install libjpeg-turbo Source: https://lvgl.io/docs/open/libs/image_support/libjpeg_turbo Install the development headers for libjpeg-turbo on Debian-based systems. ```bash sudo apt install libjpeg-turbo8-dev ``` -------------------------------- ### Start animation timeline Source: https://lvgl.io/docs/open/api/public/core/lv_anim_timeline_h Starts the animation timeline and returns the total duration. ```c uint32_t lv_anim_timeline_start(lv_anim_timeline_t *at) ``` -------------------------------- ### Full X11 Initialization with Custom Exit Handling Source: https://lvgl.io/docs/open/integration/embedded_linux/drivers/X11 Advanced setup including a custom mouse cursor and manual application exit handling. ```c bool terminated = false; #if !LV_X11_DIRECT_EXIT static void on_close_cb(lv_event_t * e) { ... terminated = true; } #endif int main(int argc, char ** argv) { ... /* initialize X11 display driver */ lv_display_t * disp = lv_x11_window_create("LVGL X11 Simulation", monitor_hor_res, monitor_ver_res); lv_display_add_event_cb(disp, on_close_cb, LV_EVENT_DELETE, disp); /* initialize X11 input drivers (for keyboard, mouse & mousewheel) */ LV_IMAGE_DECLARE(my_mouse_cursor_icon); lv_x11_inputs_create(disp, &my_mouse_cursor_icon); #if !LV_X11_DIRECT_EXIT /* set optional window close callback to enable application cleanup and exit */ lv_x11_window_set_close_cb(disp, on_close_cb, disp); #endif ... while(!terminated) { ... /* Periodically call the lv_timer handler */ lv_timer_handler(); } } ``` -------------------------------- ### Configure LV_USE_DEMO_FLEX_LAYOUT Source: https://lvgl.io/docs/open/api/public/config/lv_conf_internal_h Enable the flex layout demo. ```c #define LV_USE_DEMO_FLEX_LAYOUT 0 ``` -------------------------------- ### Set Arc Background Start Angle Source: https://lvgl.io/docs/open/api/public/widgets/lv_arc_h Sets the starting angle for the arc background. ```c void lv_arc_set_bg_start_angle(lv_obj_t *obj, lv_value_precise_t start) ``` -------------------------------- ### Implement OpenGL Display Flush and Initialization Source: https://lvgl.io/docs/open/integration/embedded_linux/drivers/opengl_driver Example showing the flush callback implementation and display initialization for an OpenGL-backed LVGL display. ```c #include "lvgl/lvgl.h" #define WIDTH 640 #define HEIGHT 480 /* This flush callback works with both FULL and DIRECT render modes*/ static void flush_cb(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) { if (lv_display_flush_is_last(disp)) { const int32_t disp_width = lv_display_get_horizontal_resolution(disp); const int32_t disp_height = lv_display_get_horizontal_resolution(disp); /* The texture occupies the full screen even if `area` is not the full screen which happens with RENDER_MODE_DIRECT */ lv_area_t full_area; lv_area_set(&full_area, 0, 0, disp_width, disp_height); /* Get the texture id containing LVGL generated UI */ unsigned int texture_id = lv_opengles_texture_get_texture_id(disp); /* This function will render to the current context */ lv_opengles_render_texture(texture_id, &full_area, LV_OPA_COVER, disp_width, disp_height, &full_area, false, true); } lv_display_flush_ready(disp); } int main() { /* initialize lvgl */ lv_init(); /* Don't forget the tick callback */ /* NOTE: OpenGL context must be created before this point */ /* Create a display that flushes to a texture. The OpenGL texture will be created for you */ lv_display_t * texture = lv_opengles_texture_create(WIDTH, HEIGHT); /* If you already have an OpenGL texture ready, you can use it instead: * lv_display_t * texture = lv_opengles_texture_create_from_texture_id(WIDTH, HEIGHT, my_texture_id); */ /* Set the display render mode and flush callback * lv_display_set_render_mode(texture, LV_DISPLAY_RENDER_MODE_FULL); * lv_display_set_flush_cb(texture, flush_cb); */ /* get the texture ID for use in your application */ unsigned int texture_id = lv_opengles_texture_get_texture_id(texture); /* create Widgets on the screen */ lv_demo_widgets(); while (1) { uint32_t time_until_next = lv_timer_handler(); if(time_until_next == LV_NO_TIMER_READY) time_until_next = LV_DEF_REFR_PERIOD; lv_delay_ms(time_until_next); } return 0; } ``` -------------------------------- ### Configure Calendar Week Start Source: https://lvgl.io/docs/open/api/public/config/lv_conf_internal_h Set whether the calendar week starts on Monday. ```c #define LV_CALENDAR_WEEK_STARTS_MONDAY 0 ``` -------------------------------- ### Create QNX window Source: https://lvgl.io/docs/open/api/public/drivers/qnx/lv_qnx_h Initializes a new window to serve as an LVGL display with the specified resolution. ```c lv_display_t * lv_qnx_window_create(int32_t hor_res, int32_t ver_res) ``` -------------------------------- ### Configure and Build NuttX Simulator Source: https://lvgl.io/docs/open/integration/rtos/nuttx Set up the simulator board configuration and compile the project. ```bash $ ./tools/configure.sh sim:lvgl_fb $ make ``` -------------------------------- ### Test UEFI protocol installation Source: https://lvgl.io/docs/open/api/private/drivers/uefi/lv_uefi_private_h Checks if a specific protocol is installed on a given handle. ```c bool lv_uefi_protocol_test(EFI_HANDLE handle, EFI_GUID *protocol) ``` -------------------------------- ### Initialize Project Directory Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/torizon Commands to create the project workspace and clone the necessary LVGL repositories. ```sh mkdir -p ~/lvgl_torizon_os/ cd ~/lvgl_torizon_os/ touch Dockerfile git clone --depth 1 https://github.com/lvgl/lv_port_linux git -C lv_port_linux submodule update --init ``` -------------------------------- ### Initialize and configure hardware button input Source: https://lvgl.io/docs/open/main-modules/indev/button Complete setup including input device creation, type assignment, coordinate mapping, and read callback registration, followed by the implementation of the read callback. ```c static const lv_point_t points_array[] = { {12,30}, /* First button is assigned to x=12; y=30 */ {60,90} /* Second button is assigned to x=60; y=90 */ }; lv_indev_t * indev = lv_indev_create(); lv_indev_set_type(indev, LV_INDEV_TYPE_BUTTON); lv_indev_set_button_points(indev, points_array); lv_indev_set_read_cb(indev, button_read); ... void button_read(lv_indev_t * indev, lv_indev_data_t * data) { /* Get the ID (0,1,2...) of the pressed button. * Let's say it returns -1 if no button was pressed */ int btn_pr = my_btn_read(); /* Is there a button press? */ if(btn_pr >= 0) { data->btn_id = btn_pr; /* Save the ID of the pressed button */ data->state = LV_INDEV_STATE_PRESSED; /* Set the pressed state */ } else { data->state = LV_INDEV_STATE_RELEASED; /* Set the released state */ } } ``` -------------------------------- ### Set x-axis start point Source: https://lvgl.io/docs/open/api/public/widgets/lv_chart_h Sets the index of the starting point in the data array for the x-axis. ```c void lv_chart_set_x_start_point(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id) ``` -------------------------------- ### Launch LVGL Demo on Hardware Source: https://lvgl.io/docs/open/integration/rtos/nuttx Start the LVGL demo using the NSH terminal after resetting the board. ```bash nsh> lvgldemo ``` -------------------------------- ### Initialize SD Card for LVGL Source: https://lvgl.io/docs/open/libs/fs_support/arduino_sd Example of the initialization command required before LVGL can access the SD card file system. ```cpp SD.begin(0, SPI, 40000000) ``` -------------------------------- ### Commit Message Examples Source: https://lvgl.io/docs/open/contributing/pull_requests Various examples of valid commit messages for different types of changes. ```text fix(image): update size when a new source is set ``` ```text fix(bar): fix memory leak The animations weren't deleted in the destructor. Fixes: #1234 ``` ```text feat(span): add span widget The span widget allows mixing different font sizes, colors and styles. It's similar to HTML ``` ```text docs(porting): fix typo ``` ```text chore: bump version to release candidate tag ``` ```text feat(drm)!: replace lv_drm_init() arguments BREAKING CHANGE: lv_drm_init(card, connector) is now lv_drm_init(device). Replace calls like lv_drm_init(0, 1) with lv_drm_init("/dev/dri/card0"). ``` -------------------------------- ### Compile the application Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/buildroot/quick_start Sets up the environment and compiles the benchmark application using CMake. ```bash cd ../application/lv_benchmark source ../setup-build-env.sh cmake -B build -S . make -j $(nproc) -C build cd ../.. ``` -------------------------------- ### Set animation start callback Source: https://lvgl.io/docs/open/api/public/core/lv_anim_h Registers a callback to be triggered when the animation actually starts, accounting for any delay. ```c void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) ``` -------------------------------- ### Launch Kconfig Menu Source: https://lvgl.io/docs/open/integration/overview Commands to navigate to the repository and open the menuconfig interface. ```bash cd menuconfig ``` -------------------------------- ### Initialize and Run LVGL in main.cpp Source: https://lvgl.io/docs/open/integration/frameworks/platformio Standard setup for initializing LVGL, setting the tick callback, and running the timer handler in the main loop. ```cpp #include #include #define BUF_SIZE 320 * 50 uint8_t lv_buffer[BUF_SIZE]; /* Tick source, tell LVGL how much time (milliseconds) has passed */ static uint32_t my_tick(void) { return millis(); } void setup() { /* Initialize LVGL */ lv_init(); /* Set the tick callback */ lv_tick_set_cb(my_tick); /* Initialize the display driver */ lv_lovyan_gfx_create(320, 480, lv_buffer, BUF_SIZE, true); lv_obj_t *label = lv_label_create(lv_screen_active()); lv_label_set_text(label, "Hello PlatformIO, I'm LVGL!"); lv_obj_align(label, LV_ALIGN_CENTER, 0, 0 ); } void loop() { lv_timer_handler(); // Update the UI- delay(5); } ``` -------------------------------- ### Install FFmpeg dependencies Source: https://lvgl.io/docs/open/libs/video_support/ffmpeg Use this command on Linux systems to install the necessary FFmpeg development libraries. ```bash sudo apt install libavformat-dev libavcodec-dev libswscale-dev libavutil-dev ``` -------------------------------- ### Configure LV_USE_DEMO_MUSIC Source: https://lvgl.io/docs/open/api/public/config/lv_conf_internal_h Enable the music player demo. ```c #define LV_USE_DEMO_MUSIC 0 ``` -------------------------------- ### LGFX::init Source: https://lvgl.io/docs/open/api/private/drivers/display/lovyan_gfx/lv_lgfx_user_hpp Initializes the display driver. ```APIDOC ## bool LGFX::init(void) ### Description Initializes the display hardware. ### Returns - **bool** - Returns true if initialization was successful, false otherwise. ``` -------------------------------- ### Run RZ/G2L and RZ/G2UL Project Source: https://lvgl.io/docs/open/integration/chip_vendors/renesas/rzg_family Execute the benchmark demo on the RZ/G2L or RZ/G2UL board. ```bash ./lvgl_demo_benchmark ``` -------------------------------- ### Install Wayland Dependencies Source: https://lvgl.io/docs/open/integration/embedded_linux/drivers/wayland Commands to install required Wayland development packages on Ubuntu and Fedora systems. ```bash sudo apt-get install libwayland-dev libxkbcommon-dev libwayland-bin wayland-protocols ``` ```bash sudo dnf install wayland-devel libxkbcommon-devel wayland-utils wayland-protocols-devel ``` -------------------------------- ### Install DRM Development Headers Source: https://lvgl.io/docs/open/integration/embedded_linux/drivers/drm Install the required libdrm development files on Debian or Ubuntu systems. ```bash sudo apt-get install libdrm-dev ``` -------------------------------- ### void lv_grid_init(void) Source: https://lvgl.io/docs/open/api/public/layouts/lv_grid_h Initializes the grid layout module. ```APIDOC ## void lv_grid_init(void) ### Description Initializes the grid layout module. ``` -------------------------------- ### lv_nanovg_utils_init Source: https://lvgl.io/docs/open/api/private/draw/nanovg/lv_nanovg_utils_h Initializes the NanoVG utility system. ```APIDOC ## lv_nanovg_utils_init ### Description Initializes the NanoVG utility system using the provided draw unit. ### Signature `void lv_nanovg_utils_init(struct _lv_draw_nanovg_unit_t *u)` ### Parameters - **u** (struct _lv_draw_nanovg_unit_t *) - Pointer to the nanovg unit. ``` -------------------------------- ### Verify Library Installation Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/buildroot/app_deployment Locate installed libraries within the target sysroot to ensure dependencies are met. ```bash find build/ -name "*libdrm*" ``` -------------------------------- ### Display BitBake help options Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/core_components Use these commands to list available command-line options for the BitBake tool. ```bash $ bitbake -h $ bitbake --help ``` -------------------------------- ### Set animation timeline delay Source: https://lvgl.io/docs/open/api/public/core/lv_anim_timeline_h Sets the delay before the animation starts, applicable when playing from the start or reversing from the end. ```c void lv_anim_timeline_set_delay(lv_anim_timeline_t *at, uint32_t delay) ``` -------------------------------- ### Configure LV_USE_DEMO_WIDGETS Source: https://lvgl.io/docs/open/api/public/config/lv_conf_internal_h Enable the widget demo. May require increasing LV_MEM_SIZE. ```c #define LV_USE_DEMO_WIDGETS 0 ``` -------------------------------- ### Verify LVGL Installation Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/lvgl_recipe Locate LVGL files within the installed SDK sysroot to confirm successful inclusion. ```bash cd /opt/poky/sdk-with-lvgl/sysroots/cortexa53-poky-linux find . -name "*lvgl*" ``` -------------------------------- ### Generic MIPI Display Controller Implementation Source: https://lvgl.io/docs/open/integration/external_display_controllers/gen_mipi Example implementation showing the required I/O initialization, command transmission, and color flushing functions for a generic MIPI display. ```c #include "src/drivers/display/st7789/lv_st7789.h" #define LCD_H_RES 240 #define LCD_V_RES 320 #define LCD_BUF_LINES 60 lv_display_t * my_disp; ... /* Initialize LCD I/O bus, reset LCD */ static int32_t my_lcd_io_init(void) { ... return HAL_OK; } /* Send command to the LCD controller */ static void my_lcd_send_cmd(lv_display_t * disp, const uint8_t * cmd, size_t cmd_size, const uint8_t *param, size_t param_size) { MY_PIN_PREP_TO_SEND_CMD(); MY_PIN_LCD_CONTROLLER_CHIP_SELECT(); /* Any delay here needed to meet LCD controller requirements. */ /* Send command to LCD controller here. */ MY_PIN_PREP_TO_SEND_DATA(); /* Any delay here needed to meet LCD controller requirements. */ /* Send data to LCD controller here. */ MY_PIN_LCD_CONTROLLER_CHIP_DESELECT(); /* Any delay here needed to meet LCD controller requirements. */ } /* Send pixel data to the LCD controller */ static void my_lcd_send_color(lv_display_t * disp, const uint8_t * cmd, size_t cmd_size, uint8_t * param, size_t param_size) { MY_PIN_PREP_TO_SEND_CMD(); MY_PIN_LCD_CONTROLLER_CHIP_SELECT(); /* Any delay here needed to meet LCD controller requirements. */ /* Send command to LCD controller here. */ MY_PIN_PREP_TO_SEND_DATA(); /* Any delay here needed to meet LCD controller requirements. */ /* Send data to LCD controller here in a manner efficient for large blocks of data. */ /* If data transfer is done with DMA, these 2 steps are not made here, but * are instead made immediately after the DMA transfer completes. */ MY_PIN_LCD_CONTROLLER_CHIP_DESELECT(); lv_display_flush_ready(disp); } int main(int argc, char ** argv) { ... /* Initialize LVGL */ lv_init(); /* Initialize LCD bus I/O */ if (my_lcd_io_init() != 0) return; /* Create the LVGL display object and the LCD display driver */ my_disp = lv_lcd_generic_mipi_create(LCD_H_RES, LCD_V_RES, LV_LCD_FLAG_NONE, my_lcd_send_cmd, my_lcd_send_color); /* Set display orientation to landscape */ lv_display_set_rotation(my_disp, LV_DISPLAY_ROTATION_90); /* Configure draw buffers, etc. */ uint8_t * buf1 = NULL; uint8_t * buf2 = NULL; uint32_t buf_size = LCD_H_RES * LCD_BUF_LINES * lv_color_format_get_size(lv_display_get_color_format(my_disp)); buf1 = lv_malloc(buf_size); if(buf1 == NULL) { LV_LOG_ERROR("display draw buffer malloc failed"); return; } /* Allocate secondary buffer if needed */ ... lv_display_set_buffers(my_disp, buf1, buf2, buf_size, LV_DISPLAY_RENDER_MODE_PARTIAL); ui_init(my_disp); while(true) { ... /* Periodically call the lv_timer handler */ lv_timer_handler(); } } ``` -------------------------------- ### Configure Image Installation Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/lvgl_recipe Add these lines to local.conf to include the LVGL library in the generated image and host SDK. ```bash IMAGE_INSTALL:append = " lvgl" TOOLCHAIN_HOST_TASK:append = " lvgl" ``` -------------------------------- ### Breaking Change Commit Examples Source: https://lvgl.io/docs/open/contributing/pull_requests Examples of how to flag breaking changes using the '!' syntax and the 'BREAKING CHANGE' footer. ```text feat(drm)!: replace lv_drm_init() arguments ``` ```text feat(drm)!: replace lv_drm_init() arguments The card and connector arguments have been merged into a single device path string for consistency with other driver APIs. BREAKING CHANGE: lv_drm_init(card, connector) is now lv_drm_init(device). Replace calls like lv_drm_init(0, 1) with lv_drm_init("/dev/dri/card0"). ``` -------------------------------- ### Execute build script Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/buildroot/custom_image Set permissions and run the build script to initialize the output directory. ```bash chmod +x build.sh ./build.sh ``` -------------------------------- ### Set Arc Start Angle Source: https://lvgl.io/docs/open/api/public/widgets/lv_arc_h Sets the starting angle of the arc. 0 degrees is at the right, 90 degrees is at the bottom. ```c void lv_arc_set_start_angle(lv_obj_t *obj, lv_value_precise_t start) ``` -------------------------------- ### Partial Render Mode Example Source: https://lvgl.io/docs/open/main-modules/display/setup Example of setting up draw buffers for partial rendering. This configuration is suitable when draw buffers are smaller than the display resolution, recommended to be at least 1/10th of the display size. Ensure BYTES_PER_PIXEL is correctly defined for your color format. ```c /* Declare buffer for 1/10 screen size; BYTES_PER_PIXEL will be 2 for RGB565. */ #define BYTES_PER_PIXEL (LV_COLOR_FORMAT_GET_SIZE(LV_COLOR_FORMAT_RGB565)) static uint8_t buf1[MY_DISP_HOR_RES * MY_DISP_VER_RES / 10 * BYTES_PER_PIXEL]; /* Set display buffer for display `display1`. */ lv_display_set_buffers(display1, buf1, NULL, sizeof(buf1), LV_DISPLAY_RENDER_MODE_PARTIAL); ``` -------------------------------- ### Install libwebp dependencies Source: https://lvgl.io/docs/open/libs/image_support/libwebp Use system package managers to install the necessary development files for libwebp on Linux or macOS. ```bash # Linux sudo apt install libwebp-dev # macOS brew install webp ``` -------------------------------- ### Example path for unpacked source code Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/terms_and_variables Shows the default directory structure for unpacked source code within the build directory. ```bash poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19 ``` -------------------------------- ### Initialize Recipe Directory Source: https://lvgl.io/docs/open/integration/embedded_linux/distros/yocto/lvgl_recipe Commands to create the necessary directory structure for a new LVGL application recipe. ```bash cd ../sources/meta-mylvgl mkdir -p recipes-lvglapp/lvgl-fbdev-benchmark/files touch recipes-lvglapp/lvgl-fbdev-benchmark/lvglbenchmarkfbdev_2.4.bb ``` -------------------------------- ### Initialize XKB descriptor Source: https://lvgl.io/docs/open/api/public/drivers/indev/lv_xkb_h Initializes an XKB descriptor with the provided rule names. ```c bool lv_xkb_init(lv_xkb_t *dsc, struct xkb_rule_names names) ``` -------------------------------- ### Systrace Log Format Example Source: https://lvgl.io/docs/open/debugging/profiler This is an example of the processed trace log output in the Android systrace format, which can be imported into Perfetto for visualization. ```text # tracer: nop # LVGL-1 [0] 2892.002993: tracing_mark_write: B|1|lv_timer_handler LVGL-1 [0] 2892.002993: tracing_mark_write: B|1|_lv_display_refr_timer LVGL-1 [0] 2892.003459: tracing_mark_write: B|1|refr_invalid_areas LVGL-1 [0] 2892.003461: tracing_mark_write: B|1|lv_draw_rect LVGL-1 [0] 2892.003550: tracing_mark_write: E|1|lv_draw_rect LVGL-1 [0] 2892.003552: tracing_mark_write: B|1|lv_draw_rect LVGL-1 [0] 2892.003556: tracing_mark_write: E|1|lv_draw_rect LVGL-1 [0] 2892.003560: tracing_mark_write: B|1|lv_draw_rect LVGL-1 [0] 2892.003573: tracing_mark_write: E|1|lv_draw_rect ... ``` -------------------------------- ### Create NuttX Workspace Source: https://lvgl.io/docs/open/integration/rtos/nuttx Initialize a directory for NuttX development. ```bash $ mkdir ~/nuttxspace $ cd ~/nuttxspace ``` -------------------------------- ### Example of Built-in Stringified IDs Source: https://lvgl.io/docs/open/debugging/obj_id When `LV_USE_OBJ_ID_BUILTIN` is enabled, `lv_obj_stringify_id` generates unique string identifiers for widgets. The example shows the sequence of generated IDs for common widgets. ```text Screen obj1 Label label1 Button btn1 Label label2 Label label3 Image image1 ``` -------------------------------- ### Configure LV_USE_DEMO_GLTF Source: https://lvgl.io/docs/open/api/public/config/lv_conf_internal_h Enable the GLTF demo. ```c #define LV_USE_DEMO_GLTF 0 ```