/* 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 "data/data_star_gift.h" namespace ChatHelpers { class Show; } // namespace ChatHelpers namespace Data { struct UniqueGift; struct GiftCode; struct CreditsHistoryEntry; } // namespace Data namespace Payments { enum class CheckoutResult; } // namespace Payments namespace Settings { struct GiftWearBoxStyleOverride; struct CreditsEntryBoxStyleOverrides; } // namespace Settings namespace Window { class SessionController; } // namespace Window namespace Ui::Text { class CustomEmoji; } // namespace Ui::Text namespace Ui { class PopupMenu; class GenericBox; class VerticalLayout; void ChooseStarGiftRecipient( not_null controller); void ShowStarGiftBox( not_null controller, not_null peer); void AddUniqueGiftCover( not_null container, rpl::producer data, rpl::producer subtitleOverride = nullptr); void AddWearGiftCover( not_null container, const Data::UniqueGift &data, not_null peer); void ShowUniqueGiftWearBox( std::shared_ptr show, not_null peer, const Data::UniqueGift &gift, Settings::GiftWearBoxStyleOverride st); struct PatternPoint { QPointF position; float64 scale = 1.; float64 opacity = 1.; }; [[nodiscard]] const std::vector &PatternPoints(); [[nodiscard]] const std::vector &PatternPointsSmall(); void PaintPoints( QPainter &p, const std::vector &points, base::flat_map &cache, not_null emoji, const Data::UniqueGift &gift, const QRect &rect, float64 shown = 1.); struct StarGiftUpgradeArgs { not_null controller; base::required stargiftId; Fn ready; not_null peer; Data::SavedStarGiftId savedId; int cost = 0; bool canAddSender = false; bool canAddComment = false; bool canAddMyComment = false; bool addDetailsDefault = false; }; void ShowStarGiftUpgradeBox(StarGiftUpgradeArgs &&args); void AddUniqueCloseButton( not_null box, Settings::CreditsEntryBoxStyleOverrides st, Fn)> fillMenu = nullptr); void RequestStarsFormAndSubmit( not_null window, MTPInputInvoice invoice, Fn done); void ShowGiftTransferredToast( base::weak_ptr weak, not_null to, const Data::UniqueGift &gift); } // namespace Ui