From 78f5d8cf644383adf20933ad64c160c07c2c54fb Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 20 Mar 2022 13:17:16 +0100 Subject: refactor: improve input configuring structure --- src/interfaces/input.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/interfaces/input.hpp') 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 + class IInputHandler : public IObservable { 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 &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; -- cgit v1.2.3-18-g5258