tdesktop/Telegram/SourceFiles/boxes/premium_preview_box.h

87 lines
1.8 KiB
C
Raw Normal View History

/*
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 "base/object_ptr.h"
class DocumentData;
namespace ChatHelpers {
class Show;
} // namespace ChatHelpers
2022-08-16 11:28:17 +00:00
namespace Data {
struct ReactionId;
} // namespace Data
namespace Ui {
class BoxContent;
class GenericBox;
class GradientButton;
} // namespace Ui
namespace Window {
class SessionController;
} // namespace Window
namespace Main {
class Session;
} // namespace Main
void ShowStickerPreviewBox(
std::shared_ptr<ChatHelpers::Show> show,
not_null<DocumentData*> document);
void DoubledLimitsPreviewBox(
not_null<Ui::GenericBox*> box,
not_null<Main::Session*> session);
2023-08-04 06:07:37 +00:00
void UpgradedStoriesPreviewBox(
not_null<Ui::GenericBox*> box,
not_null<Main::Session*> session);
enum class PremiumPreview {
2023-08-04 06:07:37 +00:00
Stories,
DoubleLimits,
2022-06-10 08:03:47 +00:00
MoreUpload,
FasterDownload,
VoiceToText,
NoAds,
EmojiStatus,
InfiniteReactions,
Stickers,
2022-07-15 09:45:44 +00:00
AnimatedEmoji,
2022-06-10 08:03:47 +00:00
AdvancedChatManagement,
ProfileBadge,
AnimatedUserpics,
2023-01-30 10:10:42 +00:00
RealTimeTranslation,
2022-06-10 08:03:47 +00:00
kCount,
};
2022-08-16 11:28:17 +00:00
void ShowPremiumPreviewBox(
not_null<Window::SessionController*> controller,
PremiumPreview section,
Fn<void(not_null<Ui::BoxContent*>)> shown = nullptr);
void ShowPremiumPreviewBox(
std::shared_ptr<ChatHelpers::Show> show,
PremiumPreview section,
Fn<void(not_null<Ui::BoxContent*>)> shown = nullptr);
2022-06-14 09:42:43 +00:00
void ShowPremiumPreviewToBuy(
not_null<Window::SessionController*> controller,
PremiumPreview section,
Fn<void()> hiddenCallback = nullptr);
2022-06-14 09:42:43 +00:00
void PremiumUnavailableBox(not_null<Ui::GenericBox*> box);
[[nodiscard]] object_ptr<Ui::GradientButton> CreateUnlockButton(
QWidget *parent,
rpl::producer<QString> text);