forked from xiaozhi/xiaozhi-esp32
feat: Add gif support (#1183)
* feat: Add gif support * fix: compiling errors * fix remove bg image
This commit is contained in:
@@ -13,28 +13,22 @@
|
||||
// Define interface for emoji collection
|
||||
class EmojiCollection {
|
||||
public:
|
||||
virtual const lv_img_dsc_t* GetEmojiImage(const char* name) const = 0;
|
||||
virtual ~EmojiCollection() = default;
|
||||
virtual void AddEmoji(const std::string& name, LvglImage* image);
|
||||
virtual const LvglImage* GetEmojiImage(const char* name);
|
||||
virtual ~EmojiCollection();
|
||||
|
||||
private:
|
||||
std::map<std::string, LvglImage*> emoji_collection_;
|
||||
};
|
||||
|
||||
class Twemoji32 : public EmojiCollection {
|
||||
public:
|
||||
virtual const lv_img_dsc_t* GetEmojiImage(const char* name) const override;
|
||||
Twemoji32();
|
||||
};
|
||||
|
||||
class Twemoji64 : public EmojiCollection {
|
||||
public:
|
||||
virtual const lv_img_dsc_t* GetEmojiImage(const char* name) const override;
|
||||
};
|
||||
|
||||
class CustomEmojiCollection : public EmojiCollection {
|
||||
private:
|
||||
std::map<std::string, LvglImage*> emoji_collection_;
|
||||
|
||||
public:
|
||||
void AddEmoji(const std::string& name, LvglImage* image);
|
||||
virtual const lv_img_dsc_t* GetEmojiImage(const char* name) const override;
|
||||
virtual ~CustomEmojiCollection();
|
||||
Twemoji64();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user