mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-28 10:23:48 -07:00
Major IPC Rework + Added Socket2
IPC is now done with UNIX sockets instead of TCP ones (security!), and added Socket2, see Wiki.
This commit is contained in:
30
src/managers/EventManager.hpp
Normal file
30
src/managers/EventManager.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
|
||||
#include "../defines.hpp"
|
||||
#include "../helpers/MiscFunctions.hpp"
|
||||
|
||||
struct SHyprIPCEvent {
|
||||
std::string event;
|
||||
std::string data;
|
||||
};
|
||||
|
||||
class CEventManager {
|
||||
public:
|
||||
CEventManager();
|
||||
|
||||
void postEvent(const SHyprIPCEvent event);
|
||||
|
||||
void startThread();
|
||||
|
||||
private:
|
||||
|
||||
bool m_bCanReadEventQueue = true;
|
||||
bool m_bCanWriteEventQueue = true;
|
||||
std::deque<SHyprIPCEvent> m_dQueuedEvents;
|
||||
|
||||
std::deque<int> m_dAcceptedSocketFDs;
|
||||
};
|
||||
|
||||
inline std::unique_ptr<CEventManager> g_pEventManager;
|
Reference in New Issue
Block a user