#ifndef hook_manager_hh_INCLUDED #define hook_manager_hh_INCLUDED #include "utils.hh" #include namespace Kakoune { class Context; typedef std::function HookFunc; class HookManager { public: void add_hook(const String& hook_name, HookFunc hook); void run_hook(const String& hook_name, const String& param, const Context& context) const; private: std::unordered_map> m_hook; }; class GlobalHookManager : public HookManager, public Singleton { }; } #endif // hook_manager_hh_INCLUDED