|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
Fluent builder for LVGL animations (lv_anim_t).
More...
#include <lvgl.hpp>
Public Member Functions | |
| Animation & | target (void *var) |
Sets the target variable pointer (typically an lv_obj_t *). | |
| Animation & | target (ObjectView obj) |
| Sets the target as an LVGL object. | |
| Animation & | values (int32_t from, int32_t to) |
| Sets the start and end values. | |
| Animation & | duration (uint32_t ms) |
| Sets the animation duration in milliseconds. | |
| Animation & | delay (uint32_t ms) |
| Sets the delay before the animation starts, in milliseconds. | |
| Animation & | path (lv_anim_path_cb_t cb) |
Sets the easing curve. Use lv_anim_path_linear, _ease_out, etc. | |
| Animation & | repeat_count (uint32_t count) |
Sets the repeat count; use LV_ANIM_REPEAT_INFINITE for endless. | |
| Animation & | repeat_delay (uint32_t ms) |
| Sets the delay between repeats. | |
| Animation & | playback_duration (uint32_t ms) |
| Sets the duration of the playback (reverse) phase. | |
| Animation & | playback_delay (uint32_t ms) |
| Sets the delay before the playback phase. | |
| Animation & | exec_cb (lv_anim_exec_xcb_t cb) |
| Sets the exec callback invoked on every frame. | |
| Animation & | ready_cb (lv_anim_ready_cb_t cb) |
| Sets the ready callback invoked when the animation finishes. | |
| void | start () |
Starts the animation. LVGL copies the state into its internal list, so this Animation can be destructed after. | |
Static Public Member Functions | |
| static bool | stop (void *var, lv_anim_exec_xcb_t exec_cb) |
Stops any animations matching (var, exec_cb). | |
| static uint32_t | duration_for_speed (uint32_t speed) |
| Computes the duration (ms) needed to animate at the given speed. | |
Fluent builder for LVGL animations (lv_anim_t).
Configure an animation step by step, then call start() — LVGL copies the state into its internal animation list at that moment, so the Animation object can be destructed immediately after.
Stateless lambdas and plain function pointers work directly as exec and ready callbacks. For the most common cases see the animate_x, animate_y, animate_width, animate_opa helpers at namespace scope.
|
inline |
Sets the exec callback invoked on every frame.
| [in] | cb | Function taking (void *var, int32_t value). |