27 lines
920 B
C++
27 lines
920 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <vector>
|
|
#include "services/dbus/mpris.hpp"
|
|
|
|
#include "gdkmm/monitor.h"
|
|
#include "gtkmm/window.h"
|
|
class NotificationController {
|
|
static std::shared_ptr<NotificationController> instance;
|
|
|
|
public:
|
|
static std::shared_ptr<NotificationController> getInstance() {
|
|
if (!NotificationController::instance) {
|
|
NotificationController::instance = std::shared_ptr<NotificationController>(new NotificationController());
|
|
}
|
|
return NotificationController::instance;
|
|
}
|
|
|
|
void showSpotifyNotification(MprisController::MprisPlayer2Message mpris);
|
|
void showNotificationOnAllMonitors(const std::string &title, const std::string &message);
|
|
private:
|
|
NotificationController();
|
|
std::vector<std::shared_ptr<Gdk::Monitor>> activeMonitors;
|
|
|
|
void baseWindowSetup(std::shared_ptr<Gtk::Window> win, std::shared_ptr<Gdk::Monitor> monitor);
|
|
}; |