New release v6.0 - General events, better fonts, multi-display support, image rotation and more
In v5.3 you could add actions to only a few object types (like a button). In v6.0 you can do it for an object type using Events.
lv_obj_set_event_cb(obj, event_handler) to set an event callback for an object.
event_handler you will get the caller object and the event like
Learn more here.
A new font converter is created which supports kerning and some other features. It is written in Node.JS so it should be easy to use offline.
You can choose more fonts and ranges to include them in the final font file.
The new Online font converter: https://littlevgl.com/ttf-font-to-c-array The source code of the Font converter: https://github.com/littlevgl/lv_font_conv
v6.0 you can have multiple displays each with its own drivers and objects.
To learn more about multi-display support visit https://docs.littlevgl.com/en/html/overview/display.html
A lot of improvements happened to smoothly support MicroPython. Click here to learn more about it MicroPython with LittlevGL
Not really a LittlevGL feature but it happens along with v6.0. We have launched a new, more modern forum: https://forum.littlevgl.com/
You can easily log in with your GitHub or Google account.
The old forum will be moved to http://forumold.littlevgl.com
Migrating from v5.3 to v6.0
v6.0 is not fully compatible with v5.3 because some API and even conceptual changes have happened:
The most important things
- Update your
- Generate your fonts again with the new converter: https://littlevgl.com/ttf-font-to-c-array
- Read the new documentation: https://docs.littlevgl.com
Actions vs Events
lv_obj_set_event_cb(obj, callback)is used instead of
lv_btn_set_action(btn, LV_BTN_ACTION_..., callback). Event callbacks are used to handle all the former actions (i.e. long pressed, released are handled by a single function).
- Objects now automatically detect if they’ve been deleted, no need for returning
lv_event_cb_t. For this reason,
- Driver function signatures now take an initial first parameter, the driver objects itself. This allows your driver functions to work with more than one physical device without requiring two separate drivers to be written.
indevcallbacks now take an initial first parameter of
flush_cb. Instead of directly taking x/y coordinates, it takes an
lv_area_targument which has x1, y1, x2, y2 fields
gpu_fill_cbin v6.0) fills an area instead of a line
- Dynamically changeable display config. Instead of hardcoded in
- Need to explicitly initialize your display buffer and add it to your display driver. It replaces the VDB in v5.3. so there is no
LV_VDB_SIZEin v6.0 but you should use this display buffers.
LV_VER_RESare replaced with
LV_VER_RES_MAX, which define the maximum horizontal and vertical resolution of your display, respectively.
LV_VER_RESstill work but always reflects the resolution of the lastly created display. (No difference with only one display).
- All the macros like
USE_LV_BTNnow are like
- Rename symbols:
- Several minor function API changes. Nearly all features are still present so you should find every v5.3 function but maybe with a slightly different name or usage
- Renames in
lv_anim_t *as argument.
lv_anim_set_...(&a)function are added to replace manual initialization of ```lv_anim_t`
lv_style_anim_tis removed. Use
Objects and Styles
lv_obj_get_user_data. The type of the user data can be changed in
- All padding and fits are left, right, top, bottom instead of ver and hor.
- lv_canvas: use
- Font system is updated and now supports kerning. You can generate your fonts again with the new converter.
- Use the new Online font converter to generate new fonts
- Built-in fonts have changed
- User data is now available for some other structures as well, like driver objects.
- Callbacks of
lv_tasknow receive a pointer to the task itself instead of the user data. The user data can be accessed as
img_decoderis improved to cache the opened images. So e.g. PNG images are not decoded all the time but left open. Learn more here
@embeddedt for tirelessly supporting users and professional help in the development @amirgon for creating and maintaining the MicroPython binding @puzrin for creating the new font converter
And for every contributor who helped with pull requests, ideas and suggestion, testing and feedback,
Thank you very much for all of you!