/* 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 "api/api_common.h" #include "menu/menu_send.h" #include "data/data_poll.h" #include "ui/widgets/menu/menu_add_action_callback.h" class History; namespace Ui { class RpWidget; class BoxContent; class GenericBox; } // namespace Ui namespace Data { class Forum; class Folder; class Session; struct ForwardDraft; class ForumTopic; class Thread; } // namespace Data namespace Dialogs { class MainList; struct EntryState; } // namespace Dialogs namespace Window { class Controller; class SessionController; class SessionNavigation; extern const char kOptionViewProfileInChatsListContextMenu[]; using PeerMenuCallback = Ui::Menu::MenuCallback; void FillDialogsEntryMenu( not_null controller, Dialogs::EntryState request, const PeerMenuCallback &addAction); bool FillVideoChatMenu( not_null controller, Dialogs::EntryState request, const PeerMenuCallback &addAction); void MenuAddMarkAsReadAllChatsAction( not_null controller, const PeerMenuCallback &addAction); void MenuAddMarkAsReadChatListAction( not_null controller, Fn()> &&list, const PeerMenuCallback &addAction); void PeerMenuExportChat(not_null peer); void PeerMenuDeleteContact( not_null controller, not_null user); void PeerMenuShareContactBox( not_null navigation, not_null user); void PeerMenuAddChannelMembers( not_null navigation, not_null channel); void PeerMenuCreatePoll( not_null controller, not_null peer, MsgId replyToId = 0, MsgId topicRootId = 0, PollData::Flags chosen = PollData::Flags(), PollData::Flags disabled = PollData::Flags(), Api::SendType sendType = Api::SendType::Normal, SendMenu::Type sendMenuType = SendMenu::Type::Scheduled); void PeerMenuDeleteTopicWithConfirmation( not_null navigation, not_null topic); void PeerMenuDeleteTopic( not_null navigation, not_null topic); struct ClearChat { }; struct ClearReply { FullMsgId replyId; }; void PeerMenuBlockUserBox( not_null box, not_null window, not_null peer, std::variant suggestReport, std::variant suggestClear); void PeerMenuUnblockUserWithBotRestart(not_null user); void BlockSenderFromRepliesBox( not_null box, not_null controller, FullMsgId id); void ToggleHistoryArchived(not_null history, bool archived); Fn ClearHistoryHandler( not_null controller, not_null peer); Fn DeleteAndLeaveHandler( not_null controller, not_null peer); QPointer ShowChooseRecipientBox( not_null navigation, FnMut)> &&chosen, rpl::producer titleOverride = nullptr, FnMut &&successCallback = nullptr); QPointer ShowForwardMessagesBox( not_null navigation, Data::ForwardDraft &&draft, Fn &&successCallback = nullptr); QPointer ShowForwardMessagesBox( not_null navigation, MessageIdsList &&items, Fn &&successCallback = nullptr); QPointer ShowShareUrlBox( not_null navigation, const QString &url, const QString &text, FnMut &&successCallback = nullptr); QPointer ShowShareGameBox( not_null navigation, not_null bot, QString shortName); QPointer ShowDropMediaBox( not_null navigation, std::shared_ptr data, not_null forum, FnMut &&successCallback = nullptr); QPointer ShowSendNowMessagesBox( not_null navigation, not_null history, MessageIdsList &&items, Fn &&successCallback = nullptr); void ToggleMessagePinned( not_null navigation, FullMsgId itemId, bool pin); void HidePinnedBar( not_null navigation, not_null peer, MsgId topicRootId, Fn onHidden); void UnpinAllMessages( not_null navigation, not_null thread); [[nodiscard]] bool IsUnreadThread(not_null thread); void MarkAsReadThread(not_null thread); } // namespace Window