/** * @file emotion_manager.h * @brief Central emotion coordination system * * This module manages all emotion-related animations and coordinates * transitions between emotional states. It provides a unified interface * for triggering emotions from various sources (shake, touch, etc.). */ #ifndef EMOTION_MANAGER_H #define EMOTION_MANAGER_H #include #include #ifdef __cplusplus extern "C" { #endif // ---------------------------------------------------------------------------- // Type Definitions // ---------------------------------------------------------------------------- /** * @brief Supported emotion types */ typedef enum { EMOTION_IDLE = 0, // Default idle state with blink EMOTION_BLINK, // Single blink animation EMOTION_SHAKING, // Currently being shaken EMOTION_SHAKE_STOPPING, // Transition from shaking to idle EMOTION_SURPRISED, // Surprised expression EMOTION_SAD, // Sad expression EMOTION_ANGRY, // Angry expression EMOTION_COUNT } EmotionType; // ---------------------------------------------------------------------------- // Public API // ---------------------------------------------------------------------------- /** * @brief Initialize the emotion engine * * Sets up all emotion animations and prepares the system. * Must be called after display driver initialization. * * @return true on success, false on failure */ bool emotionManagerInit(void); /** * @brief Start the emotion engine with default state * * Begins the idle animation with natural blinking. * Call this after splash screen is complete. */ void emotionManagerStart(void); /** * @brief Trigger a specific emotion * * Plays the specified emotion animation. The system will * automatically return to idle state after the animation completes. * * @param emotion The emotion to trigger */ void emotionManagerSetEmotion(EmotionType emotion); /** * @brief Get the currently active emotion * * @return The current emotion type */ EmotionType emotionManagerGetCurrent(void); /** * @brief Stop all emotions and cleanup */ void emotionManagerStop(void); #ifdef __cplusplus } #endif #endif // EMOTION_MANAGER_H