refactor(modules): Make all modules input handlers

By default they will return false for calls to `input`
This commit is contained in:
patrick96 2019-12-02 19:14:26 +01:00 committed by Patrick Ziegler
parent 457e37faaf
commit 4b5007294b
15 changed files with 41 additions and 28 deletions
include/modules

View file

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