2016-10-02 09:30:28 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2016-10-02 09:30:28 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2016-10-02 09:30:28 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2017-02-28 10:51:00 +00:00
|
|
|
#include "window/notifications_manager.h"
|
2016-11-04 08:23:50 +00:00
|
|
|
|
|
|
|
namespace Platform {
|
|
|
|
namespace Notifications {
|
|
|
|
|
2021-04-28 07:20:39 +00:00
|
|
|
[[nodiscard]] bool SkipToastForCustom();
|
2023-03-15 11:00:20 +00:00
|
|
|
void MaybePlaySoundForCustom(Fn<void()> playSound);
|
|
|
|
void MaybeFlashBounceForCustom(Fn<void()> flashBounce);
|
2022-12-16 09:53:19 +00:00
|
|
|
[[nodiscard]] bool WaitForInputForCustom();
|
2016-11-04 08:23:50 +00:00
|
|
|
|
2020-05-12 10:04:53 +00:00
|
|
|
[[nodiscard]] bool Supported();
|
2021-01-13 09:56:49 +00:00
|
|
|
[[nodiscard]] bool Enforced();
|
2021-01-24 23:16:32 +00:00
|
|
|
[[nodiscard]] bool ByDefault();
|
2021-01-21 10:18:40 +00:00
|
|
|
void Create(Window::Notifications::System *system);
|
2016-11-04 08:23:50 +00:00
|
|
|
|
|
|
|
} // namespace Notifications
|
|
|
|
} // namespace Platform
|
2017-02-28 10:51:00 +00:00
|
|
|
|
|
|
|
// Platform dependent implementations.
|
|
|
|
|
|
|
|
#ifdef Q_OS_MAC
|
|
|
|
#include "platform/mac/notifications_manager_mac.h"
|
2020-06-13 01:03:23 +00:00
|
|
|
#elif defined Q_OS_UNIX // Q_OS_MAC
|
2017-02-28 10:51:00 +00:00
|
|
|
#include "platform/linux/notifications_manager_linux.h"
|
2020-06-13 01:03:23 +00:00
|
|
|
#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_UNIX
|
2017-02-28 10:51:00 +00:00
|
|
|
#include "platform/win/notifications_manager_win.h"
|
2020-06-13 01:03:23 +00:00
|
|
|
#endif // Q_OS_MAC || Q_OS_UNIX || Q_OS_WIN
|