support_common.h 706 B

12345678910111213141516171819202122232425262728
  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. namespace Shortcuts {
  9. enum class Command;
  10. } // namespace Shortcuts
  11. namespace Support {
  12. enum class SwitchSettings {
  13. None,
  14. Next,
  15. Previous,
  16. };
  17. [[nodiscard]] Qt::KeyboardModifiers SkipSwitchModifiers();
  18. [[nodiscard]] bool HandleSwitch(Qt::KeyboardModifiers modifiers);
  19. [[nodiscard]] std::optional<Shortcuts::Command> GetSwitchCommand(
  20. SwitchSettings value);
  21. [[nodiscard]] FnMut<bool()> GetSwitchMethod(SwitchSettings value);
  22. } // namespace Support