summaryrefslogtreecommitdiff
path: root/src/emojis.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2024-04-13 22:34:50 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2024-04-13 22:34:50 -0400
commit02fd49b0736f74cc22dc3c9b16d904334d017dce (patch)
tree4257dba34b011163fb0abb0af096c3982958aa8c /src/emojis.hpp
parent565213450a891d728b3b46102e3c485cdfa86844 (diff)
parent5e382b11dce3892a3b6d2ea42bc3be0db79c2ef5 (diff)
downloadabaddon-portaudio-02fd49b0736f74cc22dc3c9b16d904334d017dce.tar.gz
abaddon-portaudio-02fd49b0736f74cc22dc3c9b16d904334d017dce.zip
Merge branch 'master' into stages
Diffstat (limited to 'src/emojis.hpp')
-rw-r--r--src/emojis.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/emojis.hpp b/src/emojis.hpp
index a41b8ac..c0de316 100644
--- a/src/emojis.hpp
+++ b/src/emojis.hpp
@@ -8,11 +8,13 @@
#include <gdkmm/pixbuf.h>
#include <gtkmm/textbuffer.h>
-// shoutout to gtk for only supporting .svg's sometimes
+#include <sqlite3.h>
class EmojiResource {
public:
EmojiResource(std::string filepath);
+ ~EmojiResource();
+
bool Load();
Glib::RefPtr<Gdk::Pixbuf> GetPixBuf(const Glib::ustring &pattern);
const std::map<std::string, std::string> &GetShortCodes() const;
@@ -21,9 +23,10 @@ public:
private:
std::unordered_map<std::string, std::vector<std::string>> m_pattern_shortcode_index;
- std::map<std::string, std::string> m_shortcode_index; // shortcode -> pattern
- std::unordered_map<std::string, std::pair<int, int>> m_index; // pattern -> [pos, len]
- FILE *m_fp = nullptr;
+ std::map<std::string, std::string> m_shortcode_index; // shortcode -> pattern
std::string m_filepath;
std::vector<Glib::ustring> m_patterns;
+
+ sqlite3 *m_db = nullptr;
+ sqlite3_stmt *m_get_emoji_stmt = nullptr;
};