2022-12-05 18:05:15 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../defines.hpp"
|
|
|
|
#include "../protocols/ToplevelExport.hpp"
|
2023-03-14 13:57:50 +01:00
|
|
|
#include "../protocols/TextInputV1.hpp"
|
2023-04-09 14:48:20 +02:00
|
|
|
#include "../protocols/GlobalShortcuts.hpp"
|
2023-04-03 18:01:05 +02:00
|
|
|
#include "../protocols/Screencopy.hpp"
|
2024-06-09 22:28:51 +02:00
|
|
|
#include "../helpers/memory/WeakPtr.hpp"
|
2024-06-10 12:15:25 +02:00
|
|
|
#include "../helpers/signal/Listener.hpp"
|
2024-06-09 22:28:51 +02:00
|
|
|
#include <unordered_map>
|
2022-12-05 18:05:15 +01:00
|
|
|
|
|
|
|
class CProtocolManager {
|
2022-12-16 18:17:31 +01:00
|
|
|
public:
|
2022-12-05 18:05:15 +01: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 13:57:50 +01:00
|
|
|
std::unique_ptr<CTextInputV1ProtocolManager> m_pTextInputV1ProtocolManager;
|
2023-04-09 14:48:20 +02:00
|
|
|
std::unique_ptr<CGlobalShortcutsProtocolManager> m_pGlobalShortcutsProtocolManager;
|
2023-04-03 18:01:05 +02: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 18:05:15 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
inline std::unique_ptr<CProtocolManager> g_pProtocolManager;
|