From b629e93b124fcad6635a508e47c7776bb0891d1b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 20 Jan 2019 05:02:13 +0100 Subject: Start with custom emoji (binds) and tests --- include/MessageComposer.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 include/MessageComposer.hpp (limited to 'include/MessageComposer.hpp') diff --git a/include/MessageComposer.hpp b/include/MessageComposer.hpp new file mode 100644 index 0000000..5af065d --- /dev/null +++ b/include/MessageComposer.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include +#include + +namespace dchat +{ + struct Range + { + int start; + int end; + + int length() const + { + return end - start; + } + }; + + struct MessagePart + { + enum class Type + { + TEXT, + EMOJI + }; + + Type type; + Range textRange; + }; + + void compose(const Glib::ustring &text, std::function callbackFunc); +} \ No newline at end of file -- cgit v1.2.3