1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

feat(image_decoder): add image decoder list traversal method (#4577)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
_VIFEXTech 2023-09-21 15:26:01 +08:00 committed by GitHub
parent 733e11d86d
commit 206c89302a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -230,6 +230,19 @@ void lv_image_decoder_delete(lv_image_decoder_t * decoder)
lv_free(decoder);
}
/**
* Get the next image decoder in the linked list of image decoders
* @param decoder pointer to an image decoder
* @return the next image decoder or NULL if no more image decoder exists
*/
lv_image_decoder_t * lv_image_decoder_get_next(lv_image_decoder_t * decoder)
{
if(decoder == NULL)
return _lv_ll_get_head(img_decoder_ll_p);
else
return _lv_ll_get_next(img_decoder_ll_p, decoder);
}
/**
* Set a callback to get information about the image
* @param decoder pointer to an image decoder

View File

@ -202,6 +202,13 @@ lv_image_decoder_t * lv_image_decoder_create(void);
*/
void lv_image_decoder_delete(lv_image_decoder_t * decoder);
/**
* Get the next image decoder in the linked list of image decoders
* @param decoder pointer to an image decoder or NULL to get the first one
* @return the next image decoder or NULL if no more image decoder exists
*/
lv_image_decoder_t * lv_image_decoder_get_next(lv_image_decoder_t * decoder);
/**
* Set a callback to get information about the image
* @param decoder pointer to an image decoder