mirror of
https://github.com/78/xiaozhi-esp32.git
synced 2026-02-18 09:58:09 +00:00
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "display.h"
|
|
#include <memory>
|
|
#include <string>
|
|
#include <esp_lcd_panel_io.h>
|
|
#include <esp_lcd_panel_ops.h>
|
|
#include "expression_emote.h"
|
|
|
|
namespace emote {
|
|
|
|
class EmoteDisplay : public Display {
|
|
public:
|
|
EmoteDisplay(esp_lcd_panel_handle_t panel, esp_lcd_panel_io_handle_t panel_io, int width, int height);
|
|
virtual ~EmoteDisplay();
|
|
|
|
virtual void SetEmotion(const char* emotion) override;
|
|
virtual void SetStatus(const char* status) override;
|
|
virtual void SetChatMessage(const char* role, const char* content) override;
|
|
virtual void SetTheme(Theme* theme) override;
|
|
virtual void ShowNotification(const char* notification, int duration_ms = 3000) override;
|
|
virtual void UpdateStatusBar(bool update_all = false) override;
|
|
virtual void SetPowerSaveMode(bool on) override;
|
|
virtual void SetPreviewImage(const void* image);
|
|
|
|
bool StopAnimDialog();
|
|
bool InsertAnimDialog(const char* emoji_name, uint32_t duration_ms);
|
|
|
|
void RefreshAll();
|
|
|
|
// Get emote handle for internal use
|
|
emote_handle_t GetEmoteHandle() const { return emote_handle_; }
|
|
|
|
private:
|
|
virtual bool Lock(int timeout_ms = 0) override;
|
|
virtual void Unlock() override;
|
|
|
|
emote_handle_t emote_handle_ = nullptr;
|
|
|
|
};
|
|
|
|
} // namespace emote
|