8000 General discussion for v6.0 (RELEASED) · Issue #785 · lvgl/lvgl · GitHub
[go: up one dir, main page]

Skip to content
General discussion for v6.0 (RELEASED) #785
@kisvegabor

Description

@kisvegabor

Schedule v6.0 has been released! Official release notes: https://github.com/littlevgl/lvgl/releases/tag/v6.0

Main new features

Migrating from v5.3 to v6.0

v6.0 won't be fully compatible with v5.3 because some API changes will happen.

Changes that are either difficult for a compiler to precisely report, or may not be reported by a compiler at all are highlighted in bold. If you are experiencing bugs after migration, check these changes first.

  • You must update lv_conf.h from lv_conf_template.h.
  • lv_obj_set_event_cb(obj, callback) 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). This has many advantages, one being that it allows you to detect click events on any object.
  • Objects now automatically detect if they've been deleted, no need for returning LV_RES_OK/LV_RES_INV in your lv_event_cb_t. For this reason, lv_event_cb_t functions return void.
  • Dynamically changeable display config. Instead of hardcoded in lv_conf.h.
  • Need to explicitly initialize your display buffer(s) and add it/them to your display driver.
  • LV_HOR_RES and LV_VER_RES are replaced with LV_HOR_RES_MAX and LV_VER_RES_MAX, which define the maximum horizontal and vertical resolution of your display, respectively. The old macros are still present, but will not work well with more than one display.
  • lv_obj_get_free_ptr and lv_obj_get_free_num are replaced lv_obj_get_user_data. The type of the user data can be changed in lv_conf.h
  • User data is now available for some other structures as well, like driver objects.
  • Driver function signatures now take an initial first parameter, the driver object itself. This allows your driver functions to work with more than one physical device without requiring two separate drivers to be written.
    • (i.e. indev callbacks now take an initial first parameter of lv_indev_t *)
  • disp_flush is now flush_cb. Instead of directly taking x/y coordinates, it takes in an lv_area_t which has fields x1, y1, x2, y2
  • Font system is updated and now supports kerning. You must generate your fonts again with the new converter.
  • Callbacks of lv_task now receive a pointer to the task itself instead of the user data. The user data can be accessed as task->user_data
  • lv_anim_set_...(&a) function are added to replace manual initialization of ```lv_anim_t`
  • Renames in lv_anim_t.
  • The ready_cb now receives the whole lv_anim_t * structure as an argument, not a void *.
  • lv_style_anim_t is removed. Use lv_anim_t a; and lv_style_anim_set_...(&a, ...) intstead.
  • All padding and fits are left, right, top, bottom instead of ver and hor.
  • lv_canvas: use lv_draw_... functions
  • All the macros like USE_LV_BTN now are like LV_USE_BTN.
  • Rename symbols: SYMBOL_HOME --> LV_SYMBOL_HOME
  • Rename LV_GROUP_KEY_... to LV_KEY_...
  • The GPU API has changed. You will need to update any GPU drivers you may have written.
  • minor function API changes...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0