Changelog
v9.0.0
Migration guide
As v9 is a major version it contains API breaking changes too. Most of the conceptual changes in v9 were internal, however the API was affected some widgets reword and refactoring as well.
IMPORTANT
If you are updating a v8 project to v9, special care must be taken as some parts
will not result in compiler error, but LVGL might not work due to related issues
will result in hard to understand compiler errors
So pay extra attention to these:
lv_display_set_buffers(display, buf1, buf2, buf_size_byte, mode)()is more or less the equivalent oflv_disp_draw_buf_init(&draw_buf_dsc, buf1, buf2, buf_size_px)from v8, however in v9 the buffer size is set in bytes.In v9
lv_color_tis always RGB888 regardless ofLV_COLOR_DEPTH.lv_conf.hhas been changed a lot, so don't forget to update it fromlv_conf_template.hBe sure
<stdint.h>is not included inlv_conf.h. In v9 we have some assembly parts for even better performance and a random include there would mess up the assembly part.The online image converter in not updated yet. Until that use LVGLImage.py .
Main new features
Run time display color format adjustment with RGB888 support
Built-in support
pthread,FreeRTOSand other (RT)OSes which are used during renderingBuilt-in support LVGL's, C library, and other ``stdlib``s
Better parallel rendering architecture. See the details here
Built in display and touch driver: SDL, Linux Frame buffer, NuttX LCD and touch drivers, ST7789 and ILI9341 driver are available and more will come soon
Observer allows to bind data to UI elements and create a uniform and easy to maintain API
GitHub CodeSpace integration makes possible to run LVGL in an Online VSCode editor with 3 click. See more here
Add vector graphics support via ThorVG. It can be used to draw vector graphics to a Canvas
lv_image.h supports aligning, stretching or tiling the image source if the widget is larger or smaller.
General API changes
Although lv_api_map.h address most of the refactoring we encourage you to use the latest API directly.
lv_disp_...is renamed tolv_display_...btn_...is renamed tobutton_...btnmatrix_...is renamed tobuttonmatrix_...img_...is renamed toimage_...zoomis renamed toscaleangleis renamed torotationscris renamed toscreenactis renamed toactivedelis renamed todeletecolis renamed tocolumnlv_obj_clear_flagis renamed tolv_obj_remove_flaglv_obj_clear_stateis renamed tolv_obj_remove_statelv_coord_twas removed and replaced byint32_t
New color format management
LV_IMG_CF_...was replaced byLV_COLOR_FORMAT_...LV_COLOR_DEPTH 24is supported for RGB888 renderinglv_color_talways means RGB888
Display API
lv_disp_drv_tandlv_disp_draw_buf_twas removedTo create a display and set it up:
lv_display_t * disp = lv_display_create(hor_res, ver_res)
lv_display_set_flush_cb(disp, flush_cb);
lv_display_set_buffers(disp, buf1, buf2, buf_size_in_bytes, mode);
Note that now buf size is in bytes and not pixels
modecan be:LV_DISPLAY_RENDER_MODE_PARTIALThis way the buffers can be smaller then the display to save RAM. At least 1/10 screen sized buffer(s) are recommended.LV_DISPLAY_RENDER_MODE_DIRECTThe buffer(s) has to be screen sized and LVGL will render into the correct location of the buffer. This way the buffer always contain the whole image. With 2 buffers the buffers’ content are kept in sync automatically. (Old v7 behavior)LV_DISPLAY_RENDER_MODE_FULLJust always redraw the whole screen. With 2 buffers is a standard double buffering.
Similarly to the widgets, now you can attach events to the display too, using
lv_display_add_event()monitor_cbis removed andLV_EVENT_RENDER_READYevent is fired insteadInstead of having display background color and image,
lv_layer_bottom()is added where any color can be set or any widget can be created.The target color format can be adjusted in the display in runtime by calling
lv_display_set_color_format(disp, LV_COLOR_FORMAT_...)LV_COLOR_16_SWAPis removed andlv_draw_sw_rgb565_swap()can be called manually in theflush_cbif needed to swap the in-place.disp_drv.scr_transpwas removed andlv_display_set_color_format(disp, LV_COLOR_FORMAT_NATIVE_ALPHA)can be used insteadset_px_cbis removed. You can can convert the rendered image in theflush_cb.For more details check out the docs `here /porting/display>`__ and `here /overview/display>`__.
Indev API
Similarly to the display
lv_indev_drv_twas removed and an input device can be created like this:Similarly to the widgets, now you can attach events to the indevs too, using
lv_indev_add_event()The
feedback_cbwas removed, insteadLV_EVENT_PRESSED/CLICKED/etcevents are sent to the input device
lv_indev_t * indev = lv_indev_create();
lv_indev_set_type(indev, LV_INDEV_TYPE_...);
lv_indev_set_read_cb(indev, read_cb);
Others
lv_msgis removed and replaced by lv_observerlv_chartticks support was removed, lv_scale can be used insteadlv_msgboxis update to be more flexible. It uses normal button instead of button matrixlv_tabviewwas updated to user real button instead of a button matrix
v8.3
For Other v8.3.x releases visit the Changelog in the release/v8.3 branch .