27 lines
753 B
C++
27 lines
753 B
C++
#include "ai_chat_display.h"
|
|
|
|
// 通过 extern "C" 调用纯 C 的 AI 界面函数(避免 display.h 的 lv_font_t 与 lvgl.h 冲突)
|
|
extern "C" {
|
|
void ai_chat_set_status(const char* status);
|
|
void ai_chat_set_emotion(const char* emotion);
|
|
void ai_chat_set_chat_message(const char* role, const char* content);
|
|
}
|
|
|
|
AiChatDisplay::AiChatDisplay() {
|
|
width_ = 360;
|
|
height_ = 360;
|
|
}
|
|
|
|
void AiChatDisplay::SetStatus(const char* status) {
|
|
// SimSun CJK 字体支持中文,直接显示
|
|
ai_chat_set_status(status);
|
|
}
|
|
|
|
void AiChatDisplay::SetEmotion(const char* emotion) {
|
|
ai_chat_set_emotion(emotion);
|
|
}
|
|
|
|
void AiChatDisplay::SetChatMessage(const char* role, const char* content) {
|
|
ai_chat_set_chat_message(role, content);
|
|
}
|