/** * @file shake_emotion.h * @brief Shaking animation controller * * Manages the shaking Lottie animation that plays when the device * is being continuously shaken, and the shake-stop transition animation. */ #ifndef SHAKE_EMOTION_H #define SHAKE_EMOTION_H #include #ifdef __cplusplus extern "C" { #endif /** * @brief Initialize the shake emotion module * * @return true on success, false on failure */ bool shakeEmotionInit(void); /** * @brief Start playing the shaking animation * * Animation will loop until shakeEmotionBeginStop() is called. */ void shakeEmotionPlay(void); /** * @brief Begin stopping the shake animation * * Finishes the current shaking loop, then plays the shake-stop transition. * Call shakeEmotionUpdate() to poll for completion. */ void shakeEmotionBeginStop(void); /** * @brief Update the shake stop transition * * Must be called periodically to complete the shake-stop transition. * * @return true if transition is complete and ready for idle, false if still * transitioning */ bool shakeEmotionUpdate(void); /** * @brief Stop the shaking animation immediately (for cleanup) */ void shakeEmotionStop(void); /** * @brief Check if shaking animation is currently playing * * @return true if playing, false otherwise */ bool shakeEmotionIsPlaying(void); #ifdef __cplusplus } #endif #endif // SHAKE_EMOTION_H