aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/input.hpp
blob: 82ad57c99414d10cbe8b28c7e6bf9fe3d3317174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "interfaces/command.hpp"
#include "interfaces/observable.hpp"

#include <memory>

class IInputHandler : public IObservable<char>
{
public:
	~IInputHandler() noexcept override = default;

	void listen() const noexcept override = 0;

	void attach(const char &key,
				const std::shared_ptr<ICommand> &command) noexcept override = 0;

	void notify(const char &key) const noexcept override = 0;

	virtual void enter_raw_mode() noexcept = 0;

	virtual void leave_raw_mode() noexcept = 0;
};