#pragma once #include "../defines.hpp" #include "hyprland-global-shortcuts-v1.hpp" #include "../protocols/WaylandProtocol.hpp" #include struct SShortcut { SP resource; std::string id, description, appid; uint32_t shortcut = 0; }; class CShortcutClient { public: CShortcutClient(SP resource); bool good(); private: SP resource; std::vector> shortcuts; friend class CGlobalShortcutsProtocol; }; class CGlobalShortcutsProtocol : IWaylandProtocol { public: CGlobalShortcutsProtocol(const wl_interface* iface, const int& ver, const std::string& name); void bindManager(wl_client* client, void* data, uint32_t version, uint32_t id); void destroyResource(CShortcutClient* client); void sendGlobalShortcutEvent(std::string appid, std::string trigger, bool pressed); bool isTaken(std::string id, std::string app_id); std::vector getAllShortcuts(); private: std::vector> m_vClients; }; namespace PROTO { inline UP globalShortcuts; };