diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-20 13:17:16 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:56 +0200 |
commit | 78f5d8cf644383adf20933ad64c160c07c2c54fb (patch) | |
tree | 2a348d90f8f150665c379bf2f3741731999dd679 /src/interfaces/input.hpp | |
parent | b6061eff99907495de282f611e8389e6468a1fb0 (diff) |
refactor: improve input configuring structure
Diffstat (limited to 'src/interfaces/input.hpp')
-rw-r--r-- | src/interfaces/input.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/interfaces/input.hpp b/src/interfaces/input.hpp index b243a16..82ad57c 100644 --- a/src/interfaces/input.hpp +++ b/src/interfaces/input.hpp @@ -1,7 +1,10 @@ #pragma once +#include "interfaces/command.hpp" #include "interfaces/observable.hpp" +#include <memory> + class IInputHandler : public IObservable<char> { public: @@ -9,9 +12,10 @@ public: void listen() const noexcept override = 0; - void attach(const char &event, Callback callback) noexcept override = 0; + void attach(const char &key, + const std::shared_ptr<ICommand> &command) noexcept override = 0; - void notify(const char &event) const noexcept override = 0; + void notify(const char &key) const noexcept override = 0; virtual void enter_raw_mode() noexcept = 0; |