LVGL V8 To V9 migration guide

,

Hello
I had a code based on V8.4. How can I migrate code to V9.3? loads of functions has been omitted and it seems there no documentation on migration.

For example this was a working function on v8.4, however it doesnt work on v9.3, generate errors.

static void chartGrid_event_cb(lv_event_t *e)
{
    lv_obj_draw_part_dsc_t *dsc = lv_event_get_draw_part_dsc(e);
    if (dsc->part == LV_PART_MAIN)
    {
        if (dsc->line_dsc == NULL || dsc->p1 == NULL || dsc->p2 == NULL)
            return;

        dsc->line_dsc->color = lv_color_mix(lv_color_hex(0x003366), lv_color_hex(0x808080), 127);
        dsc->line_dsc->width = 1;
        dsc->line_dsc->dash_gap = 3;
        dsc->line_dsc->dash_width = 3;
    }
}

It would be appreciated if some one give me some help on it.

Hello, can you share the warnings and errors too?

@Tinus
Here Are the errors for example

error: request for member 'part' in something not a structure or union
  379 |     if (dsc->part == LV_PART_MAIN)
      |            ^~
 error: request for member 'line_dsc' in something not a structure or union
  381 |         if (dsc->line_dsc == NULL || dsc->p1 == NULL || dsc->p2 == NULL)
      |                ^~
error: request for member 'p1' in something not a structure or union
  381 |         if (dsc->line_dsc == NULL || dsc->p1 == NULL || dsc->p2 == NULL)
      |                                         ^~
 error: request for member 'p2' in something not a structure or union
  381 |         if (dsc->line_dsc == NULL || dsc->p1 == NULL || dsc->p2 == NULL)
      |                                                            ^~
error: request for member 'line_dsc' in something not a structure or union
  384 |         dsc->line_dsc->color = lv_color_mix(lv_color_hex(0x003366), lv_color_hex(0x808080), 127);
      |            ^~
error: request for member 'line_dsc' in something not a structure or union
  385 |         dsc->line_dsc->width = 1;
      |            ^~
error: request for member 'line_dsc' in something not a structure or union
  386 |         dsc->line_dsc->dash_gap = 3;
      |            ^~
error: request for member 'line_dsc' in something not a structure or union
  387 |         dsc->line_dsc->dash_width = 3;
      |            ^~

They changed the way draw tasks work.

lv_obj_draw_part_dsc_t *dsc = lv_event_get_draw_part_dsc(e);

This is already no longer functioning.

Try

    lv_draw_task_t * draw_task = lv_event_get_draw_task(event);
    lv_draw_dsc_base_t * base_dsc = draw_task->draw_dsc;

instead.

@Tinus
How about other parts?
This function is used for making charts grids to be dashed

Same idea applies. lv_obj_draw_part_dsc_t simply no longer exists. You will have to change the drawing functions accordingly.