actions: Integrate input_handler into module

Only modules can now be action handlers.
This also slightly simplifies the controller because we don't need to
keep track of input handlers, we can just use the module list.
This commit is contained in:
patrick96 2020-11-22 23:05:45 +01:00 committed by Patrick Ziegler
parent 0a1b58a2ed
commit 191fb2972c
10 changed files with 54 additions and 92 deletions
include/modules

View file

@ -9,7 +9,7 @@ namespace modules {
struct module_interface;
#define DEFINE_UNSUPPORTED_MODULE(MODULE_NAME, MODULE_TYPE) \
class MODULE_NAME : public module_interface, public input_handler { \
class MODULE_NAME : public module_interface { \
public: \
MODULE_NAME(const bar_settings, string) { \
throw application_error("No built-in support for '" + string{MODULE_TYPE} + "'"); \
@ -33,9 +33,6 @@ namespace modules {
string contents() { \
return ""; \
} \
string input_handler_name() const { \
return ""; \
} \
bool input(const string&, const string&) { \
return false; \
} \