Hyprland/src/debug/HyprCtl.hpp

25 lines
737 B
C++
Raw Normal View History

2022-03-20 16:51:14 +01:00
#pragma once
#include "../Compositor.hpp"
#include <fstream>
2022-04-04 19:44:25 +02:00
#include "../helpers/MiscFunctions.hpp"
#include <functional>
2022-03-20 16:51:14 +01:00
class CHyprCtl {
public:
CHyprCtl();
std::string makeDynamicCall(const std::string& input);
std::shared_ptr<SHyprCtlCommand> registerCommand(SHyprCtlCommand cmd);
void unregisterCommand(const std::shared_ptr<SHyprCtlCommand>& cmd);
std::string getReply(std::string);
int m_iSocketFD = -1;
private:
void startHyprCtlSocket();
std::vector<std::shared_ptr<SHyprCtlCommand>> m_vCommands;
};
inline std::unique_ptr<CHyprCtl> g_pHyprCtl;