-
-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathIPC.hpp
More file actions
49 lines (35 loc) · 1.38 KB
/
Copy pathIPC.hpp
File metadata and controls
49 lines (35 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include "../helpers/Memory.hpp"
#include <hyprwire/hyprwire.hpp>
#include <hyprpaper_core-server.hpp>
namespace IPC {
class CWallpaperObject {
public:
CWallpaperObject(SP<CHyprpaperWallpaperObject>&& obj);
~CWallpaperObject() = default;
private:
void apply();
SP<CHyprpaperWallpaperObject> m_object;
std::string m_path;
hyprpaperCoreWallpaperFitMode m_fitMode = HYPRPAPER_CORE_WALLPAPER_FIT_MODE_COVER;
std::string m_monitor;
std::string m_shaderPath;
bool m_inert = false;
};
class CSocket {
public:
CSocket();
~CSocket() = default;
void onNewDisplay(const std::string& sv);
void onRemovedDisplay(const std::string& sv);
void onWallpaperChanged(const std::string& mon, const std::string& path);
private:
SP<Hyprwire::IServerSocket> m_socket;
std::string m_socketPath = "";
std::vector<SP<CHyprpaperCoreManagerObject>> m_managers;
std::vector<SP<CWallpaperObject>> m_wallpaperObjects;
std::vector<SP<CHyprpaperStatusObject>> m_statusObjects;
friend class CWallpaperObject;
};
inline UP<CSocket> g_IPCSocket;
};