#pragma once #include #include #include #include "WaylandProtocol.hpp" #include "xdg-activation-v1.hpp" class CXDGActivationToken { public: CXDGActivationToken(SP resource_); ~CXDGActivationToken(); bool good(); private: SP resource; uint32_t serial = 0; std::string appID = ""; bool committed = false; bool used = false; std::string token = ""; friend class CXDGActivationProtocol; }; class CXDGActivationProtocol : public IWaylandProtocol { public: CXDGActivationProtocol(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 onManagerResourceDestroy(wl_resource* res); void destroyToken(CXDGActivationToken* pointer); void onGetToken(CXdgActivationV1* pMgr, uint32_t id); // std::vector> m_vManagers; std::vector> m_vTokens; friend class CXDGActivationToken; }; namespace PROTO { inline UP activation; };