/* 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 "chat_helpers/send_context_menu.h" #include "data/data_poll.h" class History; namespace Ui { class RpWidget; class GenericBox; } // namespace Ui namespace Data { class Folder; class Session; } // namespace Data namespace Dialogs { class MainList; struct EntryState; } // namespace Dialogs namespace Window { class Controller; class SessionController; class SessionNavigation; using PeerMenuCallback = Fn handler)>; void FillDialogsEntryMenu( not_null controller, Dialogs::EntryState request, const PeerMenuCallback &addAction); void PeerMenuAddMuteAction( not_null peer, const PeerMenuCallback &addAction); void MenuAddMarkAsReadAllChatsAction( not_null data, const PeerMenuCallback &addAction); void MenuAddMarkAsReadChatListAction( Fn()> &&list, const PeerMenuCallback &addAction); void PeerMenuExportChat(not_null peer); void PeerMenuDeleteContact(not_null user); void PeerMenuShareContactBox( not_null navigation, not_null user); void PeerMenuAddChannelMembers( not_null navigation, not_null channel); //void PeerMenuUngroupFeed(not_null feed); // #feed void PeerMenuCreatePoll( not_null controller, not_null peer, MsgId replyToId = 0, PollData::Flags chosen = PollData::Flags(), PollData::Flags disabled = PollData::Flags(), Api::SendType sendType = Api::SendType::Normal, SendMenu::Type sendMenuType = SendMenu::Type::Scheduled); 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 ToggleHistoryArchived(not_null history, bool archived); Fn ClearHistoryHandler(not_null peer); Fn DeleteAndLeaveHandler(not_null peer); QPointer ShowForwardMessagesBox( not_null navigation, MessageIdsList &&items, FnMut &&successCallback = nullptr); QPointer ShowSendNowMessagesBox( not_null navigation, not_null history, MessageIdsList &&items, FnMut &&successCallback = nullptr); void ToggleMessagePinned( not_null navigation, FullMsgId itemId, bool pin); void HidePinnedBar( not_null navigation, not_null peer, Fn onHidden); void UnpinAllMessages( not_null navigation, not_null history); } // namespace Window