#pragma once #include #include #include #include #include #include "connection/dbus/messages.hpp" #include "widgets/notification/baseNotification.hpp" #include "gdkmm/monitor.h" class NotificationController { inline static std::shared_ptr instance = nullptr; public: static std::shared_ptr getInstance() { if (NotificationController::instance == nullptr) { NotificationController::instance = std::shared_ptr(new NotificationController()); } return NotificationController::instance; } void showSpotifyNotification(MprisPlayer2Message mpris); void showNotificationOnAllMonitors(NotifyMessage notify); void showCopyNotification(NotifyMessage notify); void addMonitor(std::shared_ptr monitor); void removeMonitor(std::shared_ptr monitor); private: uint64_t globalNotificationId = 1; std::map>> activeNotifications; std::map hoverCounts; NotificationController(); std::map> activeMonitors; void updateHoverState(uint64_t notificationId, bool isHovered); void closeNotification(uint64_t notificationId); };