get notifications from dbus

This commit is contained in:
2025-12-20 18:53:19 +01:00
parent c245fa7277
commit 3558fd3ebc
6 changed files with 322 additions and 14 deletions

View File

@@ -6,6 +6,7 @@
#include "glibmm/refptr.h"
#include "gtkmm/application.h"
#include "services/hyprland.hpp"
#include "services/notifications.hpp"
#include "services/tray.hpp"
class App {
@@ -18,6 +19,7 @@ class App {
Glib::RefPtr<Gtk::Application> app;
std::vector<Bar *> bars;
HyprlandService hyprlandService;
NotificationService notificationService;
TrayService trayService;
void setupServices();

View File

@@ -0,0 +1,20 @@
#pragma once
#include <gio/gio.h>
class NotificationService {
public:
void intialize();
NotificationService() = default;
~NotificationService();
guint32 allocateNotificationId(guint32 replacesId);
GDBusConnection* getConnection() const { return connection; }
private:
GDBusConnection* connection = nullptr;
guint registrationId = 0;
GDBusNodeInfo* nodeInfo = nullptr;
guint32 nextNotificationId = 1;
};