diff --git a/include/components/controller.hpp b/include/components/controller.hpp index 94c67888..d3e63cd0 100644 --- a/include/components/controller.hpp +++ b/include/components/controller.hpp @@ -26,6 +26,7 @@ class signal_emitter; namespace modules { struct module_interface; + class input_handler; } using module_t = unique_ptr; @@ -42,7 +43,7 @@ namespace sig_ui = signals::ui; namespace sig_ipc = signals::ipc; class controller : public signal_receiver { public: using make_type = unique_ptr; @@ -55,7 +56,7 @@ class controller : public signal_receiver m_inputhandlers; + vector m_inputhandlers; /** * @brief Maximum number of subsequent events to swallow diff --git a/include/events/signal.hpp b/include/events/signal.hpp index 3f3e758f..abe25af0 100644 --- a/include/events/signal.hpp +++ b/include/events/signal.hpp @@ -94,9 +94,8 @@ namespace signals { namespace eventqueue { DEFINE_VALUE_SIGNAL(1, process_quit, event); DEFINE_VALUE_SIGNAL(2, process_update, event); - DEFINE_VALUE_SIGNAL(3, process_input, string); - DEFINE_SIGNAL(4, process_check); - DEFINE_SIGNAL(5, process_broadcast); + DEFINE_SIGNAL(3, process_check); + DEFINE_SIGNAL(4, process_broadcast); } namespace ipc { diff --git a/include/events/signal_fwd.hpp b/include/events/signal_fwd.hpp index c438501b..98f71b63 100644 --- a/include/events/signal_fwd.hpp +++ b/include/events/signal_fwd.hpp @@ -8,7 +8,6 @@ namespace signals { namespace eventqueue { struct process_quit; struct process_update; - struct process_input; struct process_check; struct process_broadcast; } diff --git a/include/modules/bspwm.hpp b/include/modules/bspwm.hpp index b0177b9b..80710524 100644 --- a/include/modules/bspwm.hpp +++ b/include/modules/bspwm.hpp @@ -47,7 +47,7 @@ namespace modules { bool build(builder* builder, const string& tag) const; protected: - bool on(const input_event_t& evt); + bool input(string&& cmd); private: static constexpr auto DEFAULT_ICON = "ws-icon-default"; diff --git a/include/modules/date.hpp b/include/modules/date.hpp index 1dcf62a0..f20c076f 100644 --- a/include/modules/date.hpp +++ b/include/modules/date.hpp @@ -14,7 +14,7 @@ namespace modules { bool build(builder* builder, const string& tag) const; protected: - bool on(const input_event_t& evt); + bool input(string&& cmd); private: static constexpr auto TAG_LABEL = "