platform_notifications_manager.h 1.0 KB

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 "window/notifications_manager.h"
  9. namespace Platform {
  10. namespace Notifications {
  11. [[nodiscard]] bool SkipToastForCustom();
  12. void MaybePlaySoundForCustom(Fn<void()> playSound);
  13. void MaybeFlashBounceForCustom(Fn<void()> flashBounce);
  14. [[nodiscard]] bool WaitForInputForCustom();
  15. [[nodiscard]] bool Supported();
  16. [[nodiscard]] bool Enforced();
  17. [[nodiscard]] bool ByDefault();
  18. void Create(Window::Notifications::System *system);
  19. } // namespace Notifications
  20. } // namespace Platform
  21. // Platform dependent implementations.
  22. #ifdef Q_OS_WIN
  23. #include "platform/win/notifications_manager_win.h"
  24. #elif defined Q_OS_MAC // Q_OS_MAC
  25. #include "platform/mac/notifications_manager_mac.h"
  26. #else // Q_OS_WIN || Q_OS_MAC
  27. #include "platform/linux/notifications_manager_linux.h"
  28. #endif // else for Q_OS_WIN || Q_OS_MAC