2022-12-05 17:05:15 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "../defines.hpp"
|
|
|
|
|
#include "../protocols/ToplevelExport.hpp"
|
2023-03-14 12:57:50 +00:00
|
|
|
#include "../protocols/TextInputV1.hpp"
|
2023-04-09 13:48:20 +01:00
|
|
|
#include "../protocols/GlobalShortcuts.hpp"
|
2023-04-03 17:01:05 +01:00
|
|
|
#include "../protocols/Screencopy.hpp"
|
2024-06-09 22:28:51 +02:00
|
|
|
#include "../helpers/memory/WeakPtr.hpp"
|
2024-06-10 10:15:25 +00:00
|
|
|
#include "../helpers/signal/Listener.hpp"
|
2024-06-09 22:28:51 +02:00
|
|
|
#include <unordered_map>
|
2022-12-05 17:05:15 +00:00
|
|
|
|
|
|
|
|
class CProtocolManager {
|
2022-12-16 17:17:31 +00:00
|
|
|
public:
|
2022-12-05 17:05:15 +00:00
|
|
|
CProtocolManager();
|
|
|
|
|
|
2023-07-18 15:30:28 +02:00
|
|
|
// TODO: rewrite to use the new protocol framework
|
2023-01-20 19:44:30 +01:00
|
|
|
std::unique_ptr<CToplevelExportProtocolManager> m_pToplevelExportProtocolManager;
|
2023-03-14 12:57:50 +00:00
|
|
|
std::unique_ptr<CTextInputV1ProtocolManager> m_pTextInputV1ProtocolManager;
|
2023-04-09 13:48:20 +01:00
|
|
|
std::unique_ptr<CGlobalShortcutsProtocolManager> m_pGlobalShortcutsProtocolManager;
|
2023-04-03 17:01:05 +01:00
|
|
|
std::unique_ptr<CScreencopyProtocolManager> m_pScreencopyProtocolManager;
|
2024-06-09 22:28:51 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::unordered_map<std::string, CHyprSignalListener> m_mModeChangeListeners;
|
|
|
|
|
|
|
|
|
|
void onMonitorModeChange(CMonitor* pMonitor);
|
2022-12-05 17:05:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
inline std::unique_ptr<CProtocolManager> g_pProtocolManager;
|