#pragma once #include "WaylandProtocol.hpp" #include "core/Compositor.hpp" #include "content-type-v1.hpp" #include "types/ContentType.hpp" class CContentTypeManager { public: CContentTypeManager(SP resource); bool good(); private: SP m_resource; }; class CContentType { public: CContentType(SP resource); CContentType(WP surface); bool good(); wl_client* client(); NContentType::eContentType value = NContentType::CONTENT_TYPE_NONE; WP self; private: SP m_resource; wl_client* m_pClient = nullptr; CHyprSignalListener destroy; friend class CContentTypeProtocol; }; class CContentTypeProtocol : public IWaylandProtocol { public: CContentTypeProtocol(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); SP getContentType(WP surface); private: void destroyResource(CContentTypeManager* resource); void destroyResource(CContentType* resource); std::vector> m_vManagers; std::vector> m_vContentTypes; friend class CContentTypeManager; friend class CContentType; }; namespace PROTO { inline UP contentType; };