cpp-terminal
1.0.0
Small C++ library for writing multiplatform terminal applications
Loading...
Searching...
No Matches
input.hpp
Go to the documentation of this file.
1
/*
2
* cpp-terminal
3
* C++ library for writing multi-platform terminal applications.
4
*
5
* SPDX-FileCopyrightText: 2019-2024 cpp-terminal
6
*
7
* SPDX-License-Identifier: MIT
8
*/
9
10
#pragma once
11
12
#include "
cpp-terminal/event.hpp
"
13
14
#include <cstdint>
15
#include <thread>
16
17
namespace
Term
18
{
19
20
namespace
Private
21
{
22
23
class
BlockingQueue;
24
25
class
Input
final
26
{
27
public
:
28
Input
();
29
~Input
();
30
static
void
startReading
();
31
static
Term::Event
getEvent
();
32
static
Term::Event
getEventBlocking
();
33
34
private
:
35
static
void
read_event
();
36
static
void
read_raw
();
37
#if defined(_WIN32)
38
static
void
read_windows_key
(
const
std::uint16_t& virtual_key_code,
const
std::uint32_t& control_key_state,
const
std::size_t& occurrence);
39
#endif
40
static
void
init_thread
();
41
static
std::thread
m_thread
;
42
static
Term::Private::BlockingQueue
m_events
;
43
static
int
m_poll
;
// for linux
44
};
45
46
}
// namespace Private
47
48
}
// namespace Term
Term::Event
Definition
event.hpp:25
Term::Private::BlockingQueue
Definition
blocking_queue.hpp:25
Term::Private::Input
Definition
input.hpp:26
Term::Private::Input::m_poll
static int m_poll
Definition
input.hpp:89
Term::Private::Input::init_thread
static void init_thread()
Definition
input.cpp:91
Term::Private::Input::m_thread
static std::thread m_thread
Definition
input.hpp:85
Term::Private::Input::read_raw
static void read_raw()
Definition
input.cpp:211
Term::Private::Input::getEventBlocking
static Term::Event getEventBlocking()
Definition
input.cpp:328
Term::Private::Input::Input
Input()
Definition
input.cpp:313
Term::Private::Input::getEvent
static Term::Event getEvent()
Definition
input.cpp:326
Term::Private::Input::startReading
static void startReading()
Definition
input.cpp:315
Term::Private::Input::~Input
~Input()
Definition
input.cpp:80
Term::Private::Input::read_windows_key
static void read_windows_key(const std::uint16_t &virtual_key_code, const std::uint32_t &control_key_state, const std::size_t &occurrence)
Definition
input.cpp:132
Term::Private::Input::m_events
static Term::Private::BlockingQueue m_events
Definition
input.hpp:42
Term::Private::Input::read_event
static void read_event()
Definition
input.cpp:109
event.hpp
Term
Definition
args.cpp:13
cpp-terminal
private
input.hpp
Generated by
1.11.0