2021-03-10 12:29:09 +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 "base/object_ptr.h"
|
2021-03-19 16:13:29 +00:00
|
|
|
#include "base/unique_qptr.h"
|
2022-02-28 04:53:18 +00:00
|
|
|
#include "ui/boxes/confirm_box.h"
|
2021-04-07 07:21:59 +00:00
|
|
|
|
|
|
|
namespace style {
|
|
|
|
struct FlatLabel;
|
|
|
|
} // namespace style
|
2021-03-10 12:29:09 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class DropdownMenu;
|
|
|
|
class GenericBox;
|
|
|
|
class BoxContent;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2021-03-19 16:13:29 +00:00
|
|
|
namespace Ui::Menu {
|
|
|
|
class ItemBase;
|
|
|
|
class Menu;
|
|
|
|
} // namespace Ui::Menu
|
|
|
|
|
2021-03-10 12:29:09 +00:00
|
|
|
namespace Calls {
|
|
|
|
class GroupCall;
|
|
|
|
} // namespace Calls
|
|
|
|
|
|
|
|
namespace Calls::Group {
|
|
|
|
|
|
|
|
enum class BoxContext {
|
|
|
|
GroupCallPanel,
|
|
|
|
MainWindow,
|
|
|
|
};
|
|
|
|
|
|
|
|
void LeaveBox(
|
|
|
|
not_null<Ui::GenericBox*> box,
|
|
|
|
not_null<GroupCall*> call,
|
|
|
|
bool discardChecked,
|
|
|
|
BoxContext context);
|
|
|
|
|
2022-02-28 04:53:18 +00:00
|
|
|
[[nodiscard]] object_ptr<Ui::GenericBox> ConfirmBox(
|
|
|
|
Ui::ConfirmBoxArgs &&args);
|
2021-03-10 12:29:09 +00:00
|
|
|
|
|
|
|
void FillMenu(
|
|
|
|
not_null<Ui::DropdownMenu*> menu,
|
|
|
|
not_null<PeerData*> peer,
|
|
|
|
not_null<GroupCall*> call,
|
2021-05-26 14:21:50 +00:00
|
|
|
bool wide,
|
2021-03-10 12:29:09 +00:00
|
|
|
Fn<void()> chooseJoinAs,
|
2021-05-26 14:21:50 +00:00
|
|
|
Fn<void()> chooseShareScreenSource,
|
2021-03-10 12:29:09 +00:00
|
|
|
Fn<void(object_ptr<Ui::BoxContent>)> showBox);
|
|
|
|
|
2021-03-19 16:13:29 +00:00
|
|
|
[[nodiscard]] base::unique_qptr<Ui::Menu::ItemBase> MakeAttentionAction(
|
|
|
|
not_null<Ui::Menu::Menu*> menu,
|
|
|
|
const QString &text,
|
|
|
|
Fn<void()> callback);
|
|
|
|
|
2021-03-10 12:29:09 +00:00
|
|
|
} // namespace Calls::Group
|