2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-24 11:17:10 +00:00
tdesktop/Telegram/SourceFiles/platform/win/notifications_manager_win.h

53 lines
1.5 KiB
C
Raw Normal View History

/*
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 "platform/platform_notifications_manager.h"
struct ToastActivation;
namespace Platform {
namespace Notifications {
class Manager : public Window::Notifications::NativeManager {
public:
Manager(Window::Notifications::System *system);
~Manager();
bool init();
void clearNotification(NotificationId id);
void handleActivation(const ToastActivation &activation);
protected:
void doShowNativeNotification(
NotificationInfo &&info,
Ui::PeerUserpicView &userpicView) override;
void doClearAllFast() override;
void doClearFromItem(not_null<HistoryItem*> item) override;
void doClearFromTopic(not_null<Data::ForumTopic*> topic) override;
void doClearFromSublist(not_null<Data::SavedSublist*> sublist) override;
void doClearFromHistory(not_null<History*> history) override;
void doClearFromSession(not_null<Main::Session*> session) override;
void onBeforeNotificationActivated(NotificationId id) override;
2021-02-25 19:12:51 +04:00
void onAfterNotificationActivated(
NotificationId id,
not_null<Window::SessionController*> window) override;
bool doSkipToast() const override;
2023-03-15 15:00:20 +04:00
void doMaybePlaySound(Fn<void()> playSound) override;
void doMaybeFlashBounce(Fn<void()> flashBounce) override;
private:
class Private;
const std::unique_ptr<Private> _private;
};
} // namespace Notifications
} // namespace Platform