diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-03-15 20:19:54 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-03-15 20:19:54 -0400 |
commit | 358f68d2679640d502d0a13b1d09ee2b3490b4e1 (patch) | |
tree | 685b851243092e1345e70da4e7794f1d282e055c /src/misc/chatutil.hpp | |
parent | 823ba090f05a3b464f93721fc8ce2a6969e3bb67 (diff) | |
download | abaddon-portaudio-358f68d2679640d502d0a13b1d09ee2b3490b4e1.tar.gz abaddon-portaudio-358f68d2679640d502d0a13b1d09ee2b3490b4e1.zip |
cleanup and escape notification bodies
Diffstat (limited to 'src/misc/chatutil.hpp')
-rw-r--r-- | src/misc/chatutil.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/misc/chatutil.hpp b/src/misc/chatutil.hpp new file mode 100644 index 0000000..f0520fe --- /dev/null +++ b/src/misc/chatutil.hpp @@ -0,0 +1,19 @@ +#pragma once +#include <glibmm/refptr.h> +#include <glibmm/ustring.h> +#include "discord/snowflake.hpp" + +namespace Gtk { +class TextBuffer; +class TextView; +} // namespace Gtk + +namespace ChatUtil { +Glib::ustring GetText(const Glib::RefPtr<Gtk::TextBuffer> &buf); +void HandleRoleMentions(const Glib::RefPtr<Gtk::TextBuffer> &buf); +void HandleUserMentions(const Glib::RefPtr<Gtk::TextBuffer> &buf, Snowflake channel_id, bool plain); +void HandleStockEmojis(Gtk::TextView &tv); +void HandleCustomEmojis(Gtk::TextView &tv); +void HandleEmojis(Gtk::TextView &tv); +void CleanupEmojis(const Glib::RefPtr<Gtk::TextBuffer> &buf); +} // namespace ChatUtil |