calls_device_menu.h 849 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "base/unique_qptr.h"
  9. namespace Webrtc {
  10. class Environment;
  11. struct DeviceResolvedId;
  12. enum class DeviceType : uchar;
  13. } // namespace Webrtc
  14. namespace Ui {
  15. class RpWidget;
  16. class PopupMenu;
  17. } // namespace Ui
  18. namespace Calls {
  19. struct DeviceSelection {
  20. Webrtc::DeviceType type;
  21. rpl::producer<Webrtc::DeviceResolvedId> chosen;
  22. };
  23. [[nodiscard]] base::unique_qptr<Ui::PopupMenu> MakeDeviceSelectionMenu(
  24. not_null<Ui::RpWidget*> parent,
  25. not_null<Webrtc::Environment*> environment,
  26. std::vector<DeviceSelection> types,
  27. Fn<void(Webrtc::DeviceType, QString)> choose);
  28. } // namespace Calls