refactor(modules): Make all modules input handlers
By default they will return false for calls to `input`
This commit is contained in:
parent
457e37faaf
commit
4b5007294b
15 changed files with 41 additions and 28 deletions
include/modules
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue