From ede689d23e57c9b701ab19aa9112a0b2368865c9 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 28 Feb 2022 21:30:30 +0100 Subject: feat: add input handler & quitting with 'q' --- src/interfaces/input.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/interfaces/input.hpp (limited to 'src/interfaces/input.hpp') diff --git a/src/interfaces/input.hpp b/src/interfaces/input.hpp new file mode 100644 index 0000000..956ec4f --- /dev/null +++ b/src/interfaces/input.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include "interfaces/observable.hpp" + +class IInputHandler : public IObservable +{ +public: + void listen() const override = 0; + + void attach(const char &event, Callback callback) override = 0; + + void notify(const char &event) const override = 0; + + virtual void enter_raw_mode() = 0; + + virtual void leave_raw_mode() = 0; +}; -- cgit v1.2.3-18-g5258