Hyprland/src/debug/HyprCtl.hpp

29 lines
704 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);
SP<SHyprCtlCommand> registerCommand(SHyprCtlCommand cmd);
void unregisterCommand(const SP<SHyprCtlCommand>& cmd);
std::string getReply(std::string);
int m_iSocketFD = -1;
struct {
2024-03-09 04:09:25 +01:00
bool all = false;
} m_sCurrentRequestParams;
private:
void startHyprCtlSocket();
std::vector<SP<SHyprCtlCommand>> m_vCommands;
};
inline std::unique_ptr<CHyprCtl> g_pHyprCtl;