lv_gif.h

Functions

lv_obj_t *lv_gif_create(lv_obj_t *parent)

Create a gif object

Parameters:

parent – pointer to an object, it will be the parent of the new gif.

Returns:

pointer to the gif obj

void lv_gif_set_src(lv_obj_t *obj, const void *src)

Set the gif data to display on the object

Parameters:
  • obj – pointer to a gif object

  • src – 1) pointer to an lv_image_dsc_t descriptor (which contains gif raw data) or 2) path to a gif file (e.g. "S:/dir/anim.gif")

void lv_gif_restart(lv_obj_t *obj)

Restart a gif animation.

Parameters:

obj – pointer to a gif obj

void lv_gif_pause(lv_obj_t *obj)

Pause a gif animation.

Parameters:

obj – pointer to a gif obj

void lv_gif_resume(lv_obj_t *obj)

Resume a gif animation.

Parameters:

obj – pointer to a gif obj

bool lv_gif_is_loaded(lv_obj_t *obj)

Checks if the GIF was loaded correctly.

Parameters:

obj – pointer to a gif obj

int32_t lv_gif_get_loop_count(lv_obj_t *obj)

Get the loop count for the GIF.

Parameters:

obj – pointer to a gif obj

void lv_gif_set_loop_count(lv_obj_t *obj, int32_t count)

Set the loop count for the GIF.

Parameters:
  • obj – pointer to a gif obj

  • count – the loop count to set

Variables

const lv_obj_class_t lv_gif_class