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

#include <cstddef>
#include <memory>

// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IUserInputObserver
{
public:
	using Key = char;

	virtual ~IUserInputObserver() noexcept = default;

	virtual void listen() noexcept = 0;

	virtual bool is_key_pressed(Key key) noexcept = 0;

	virtual Key get_currently_pressed_key() const noexcept = 0;

	virtual void clear_currently_pressed() noexcept = 0;
};