#pragma once #include #include #include #include "WaylandProtocol.hpp" #include "hyprland-ctm-control-v1.hpp" #include class CMonitor; class CHyprlandCTMControlResource { public: CHyprlandCTMControlResource(SP resource_); ~CHyprlandCTMControlResource(); bool good(); private: SP resource; std::unordered_map ctms; }; class CHyprlandCTMControlProtocol : public IWaylandProtocol { public: CHyprlandCTMControlProtocol(const wl_interface* iface, const int& ver, const std::string& name); virtual void bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id); private: void destroyResource(CHyprlandCTMControlResource* resource); void setCTM(SP monitor, const Mat3x3& ctm); // std::vector> m_vManagers; friend class CHyprlandCTMControlResource; }; namespace PROTO { inline UP ctm; };