arch(rlottie): deprecate in favor of the lv_lottie widget

Deprecate the rlottie player. The ThorVG-based lv_lottie widget is part of LVGL
and needs no external library.

Following the deprecation guidelines:
- @deprecated Doxygen tags and LV_DEPRECATED on the rlottie create functions
- LV_LOG_DEPRECATED runtime warning in both create functions
- migration-v10.mdx entry pointing to lv_lottie

The rlottie docs page already carries a deprecation callout. Live call sites in
the kept examples are wrapped with LV_DEPRECATIONS_IGNORE_BEGIN/END so the
-Wdeprecated -Werror build stays clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Gabor Kiss-Vamosi
2026-08-03 10:30:58 +02:00
committed by André Costa
co-authored by Claude Opus 4.8
parent 8ba75cad25
commit fbb5007d83
5 changed files with 44 additions and 0 deletions
+9
View File
@@ -473,3 +473,12 @@ if you need finer control.
so build it directly instead. See the
[`lv_example_table_file_browser`](widgets/table#building-a-file-explorer) example
for a starting point.
---
## Libraries
### rlottie
- The rlottie player is deprecated. Use the [`lv_lottie`](widgets/lottie) widget
instead.
@@ -6,6 +6,8 @@
* @title Rlottie animation from array
* @brief Play a Lottie animation decoded from a JSON byte array in flash.
*
* @deprecated rlottie is deprecated. Use the `lv_lottie` widget instead.
*
* `lv_rlottie_create_from_raw` builds a 100x100 Lottie widget from the
* externally declared `lv_example_rlottie_approve` JSON data, and the
* widget is centered on the active screen.
@@ -13,7 +15,9 @@
void lv_example_rlottie_1(void)
{
extern const uint8_t lv_example_rlottie_approve[];
LV_DEPRECATIONS_IGNORE_BEGIN
lv_obj_t * lottie = lv_rlottie_create_from_raw(lv_screen_active(), 100, 100, (const char *)lv_example_rlottie_approve);
LV_DEPRECATIONS_IGNORE_END
lv_obj_center(lottie);
}
@@ -6,6 +6,8 @@
* @title Rlottie animation from file
* @brief Play a Lottie JSON file loaded directly through the rlottie stdio path.
*
* @deprecated rlottie is deprecated. Use the `lv_lottie` widget instead.
*
* `lv_rlottie_create_from_file` opens
* `lvgl/examples/libs/rlottie/lv_example_rlottie_approve.json` as a 100x100
* widget centered on the active screen. The path has no LVGL drive letter
@@ -15,8 +17,10 @@
void lv_example_rlottie_2(void)
{
/*The rlottie library uses STDIO file API, so there is no driver letter for LVGL*/
LV_DEPRECATIONS_IGNORE_BEGIN
lv_obj_t * lottie = lv_rlottie_create_from_file(lv_screen_active(), 100, 100,
"lvgl/examples/libs/rlottie/lv_example_rlottie_approve.json");
LV_DEPRECATIONS_IGNORE_END
lv_obj_center(lottie);
}
+23
View File
@@ -14,12 +14,20 @@ extern "C" {
* INCLUDES
*********************/
#include "../config/lv_conf_internal.h"
#include "../lv_types.h"
#if LV_USE_RLOTTIE
/*********************
* DEFINES
*********************/
/**
* @deprecated The rlottie player is deprecated and kept only for backward
* compatibility. Use the `lv_lottie` widget instead. See the Lottie widget docs.
*/
#define LV_RLOTTIE_DEPRECATED_MSG \
"rlottie is deprecated; use the lv_lottie widget instead."
/**********************
* TYPEDEFS
**********************/
@@ -37,12 +45,27 @@ LV_ATTRIBUTE_EXTERN_DATA extern const lv_obj_class_t lv_rlottie_class;
* GLOBAL PROTOTYPES
**********************/
/**
* Create an rlottie animation from a JSON file.
* @deprecated rlottie is deprecated. Use the `lv_lottie` widget instead.
*/
LV_DEPRECATED(LV_RLOTTIE_DEPRECATED_MSG)
lv_obj_t * lv_rlottie_create_from_file(lv_obj_t * parent, int32_t width, int32_t height, const char * path);
/**
* Create an rlottie animation from a raw JSON description.
* @deprecated rlottie is deprecated. Use the `lv_lottie` widget instead.
*/
LV_DEPRECATED(LV_RLOTTIE_DEPRECATED_MSG)
lv_obj_t * lv_rlottie_create_from_raw(lv_obj_t * parent, int32_t width, int32_t height,
const char * rlottie_desc);
/** @deprecated rlottie is deprecated. Use the `lv_lottie` widget instead. */
LV_DEPRECATED(LV_RLOTTIE_DEPRECATED_MSG)
void lv_rlottie_set_play_mode(lv_obj_t * rlottie, const lv_rlottie_ctrl_t ctrl);
/** @deprecated rlottie is deprecated. Use the `lv_lottie` widget instead. */
LV_DEPRECATED(LV_RLOTTIE_DEPRECATED_MSG)
void lv_rlottie_set_current_frame(lv_obj_t * rlottie, const size_t goto_frame);
/**********************
+4
View File
@@ -64,6 +64,7 @@ static lv_rlottie_create_info_t create_info;
lv_obj_t * lv_rlottie_create_from_file(lv_obj_t * parent, int32_t width, int32_t height, const char * path)
{
LV_LOG_DEPRECATED(LV_RLOTTIE_DEPRECATED_MSG);
create_info.width = width;
create_info.height = height;
create_info.path = path;
@@ -78,6 +79,7 @@ lv_obj_t * lv_rlottie_create_from_file(lv_obj_t * parent, int32_t width, int32_t
lv_obj_t * lv_rlottie_create_from_raw(lv_obj_t * parent, int32_t width, int32_t height, const char * rlottie_desc)
{
LV_LOG_DEPRECATED(LV_RLOTTIE_DEPRECATED_MSG);
create_info.width = width;
create_info.height = height;
create_info.rlottie_desc = rlottie_desc;
@@ -92,6 +94,7 @@ lv_obj_t * lv_rlottie_create_from_raw(lv_obj_t * parent, int32_t width, int32_t
void lv_rlottie_set_play_mode(lv_obj_t * obj, const lv_rlottie_ctrl_t ctrl)
{
LV_LOG_DEPRECATED(LV_RLOTTIE_DEPRECATED_MSG);
lv_rlottie_t * rlottie = (lv_rlottie_t *) obj;
rlottie->play_ctrl = ctrl;
@@ -103,6 +106,7 @@ void lv_rlottie_set_play_mode(lv_obj_t * obj, const lv_rlottie_ctrl_t ctrl)
void lv_rlottie_set_current_frame(lv_obj_t * obj, const size_t goto_frame)
{
LV_LOG_DEPRECATED(LV_RLOTTIE_DEPRECATED_MSG);
lv_rlottie_t * rlottie = (lv_rlottie_t *) obj;
rlottie->current_frame = goto_frame < rlottie->total_frames ? goto_frame : rlottie->total_frames - 1;
}