tdesktop/Telegram/SourceFiles/core/ui_integration.h

71 lines
2.0 KiB
C
Raw Normal View History

2019-09-16 11:14:06 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "ui/integration.h"
2019-09-16 11:14:06 +00:00
namespace Main {
class Session;
} // namespace Main
2019-09-16 11:14:06 +00:00
namespace Core {
class UiIntegration : public Ui::Integration {
public:
2020-06-16 15:10:39 +00:00
enum class HashtagMentionType : uchar {
Telegram,
Twitter,
Instagram,
};
struct Context {
Main::Session *session = nullptr;
2020-06-16 15:10:39 +00:00
HashtagMentionType type = HashtagMentionType::Telegram;
};
2019-09-16 11:14:06 +00:00
void postponeCall(FnMut<void()> &&callable) override;
void registerLeaveSubscription(not_null<QWidget*> widget) override;
void unregisterLeaveSubscription(not_null<QWidget*> widget) override;
void writeLogEntry(const QString &entry) override;
QString emojiCacheFolder() override;
void textActionsUpdated() override;
void activationFromTopPanel() override;
void startFontsBegin() override;
void startFontsEnd() override;
2019-09-16 11:14:06 +00:00
std::shared_ptr<ClickHandler> createLinkHandler(
2020-06-16 15:10:39 +00:00
const EntityLinkData &data,
const std::any &context) override;
2019-09-16 11:14:06 +00:00
bool handleUrlClick(
const QString &url,
const QVariant &context) override;
rpl::producer<> forcePopupMenuHideRequests() override;
QString convertTagToMimeTag(const QString &tagId) override;
const Ui::Emoji::One *defaultEmojiVariant(
const Ui::Emoji::One *emoji) override;
QString phraseContextCopyText() override;
QString phraseContextCopyEmail() override;
QString phraseContextCopyLink() override;
QString phraseContextCopySelected() override;
QString phraseFormattingTitle() override;
QString phraseFormattingLinkCreate() override;
QString phraseFormattingLinkEdit() override;
QString phraseFormattingClear() override;
QString phraseFormattingBold() override;
QString phraseFormattingItalic() override;
QString phraseFormattingUnderline() override;
QString phraseFormattingStrikeOut() override;
QString phraseFormattingMonospace() override;
};
} // namespace Core