2014-05-30 08:53:19 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2014-05-30 08:53:19 +00:00
|
|
|
*/
|
2017-02-15 08:50:11 +00:00
|
|
|
#pragma once
|
2014-05-30 08:53:19 +00:00
|
|
|
|
2017-02-15 08:50:11 +00:00
|
|
|
#include "codegen/common/logging.h"
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
2018-10-24 09:35:53 +00:00
|
|
|
#include <set>
|
2017-02-15 08:50:11 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <functional>
|
|
|
|
#include <QtCore/QString>
|
|
|
|
#include <QtCore/QSet>
|
|
|
|
#include <QtCore/QMap>
|
|
|
|
|
|
|
|
namespace codegen {
|
|
|
|
namespace emoji {
|
|
|
|
|
|
|
|
using Id = QString;
|
|
|
|
struct Emoji {
|
|
|
|
Id id;
|
|
|
|
bool postfixed = false;
|
|
|
|
bool variated = false;
|
|
|
|
bool colored = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Data {
|
|
|
|
std::vector<Emoji> list;
|
|
|
|
std::map<Id, int, std::greater<Id>> map;
|
2018-10-24 09:35:53 +00:00
|
|
|
std::set<int> postfixRequired;
|
2017-02-15 08:50:11 +00:00
|
|
|
std::vector<std::vector<int>> categories;
|
|
|
|
std::map<QString, int, std::greater<QString>> replaces;
|
|
|
|
};
|
|
|
|
Data PrepareData();
|
|
|
|
|
|
|
|
constexpr auto kPostfix = 0xFE0FU;
|
|
|
|
|
|
|
|
common::LogStream logDataError();
|
|
|
|
|
|
|
|
} // namespace emoji
|
|
|
|
} // namespace codegen
|