1#ifndef NVIM_TUI_INPUT_H
2#define NVIM_TUI_INPUT_H
3
4#include <stdbool.h>
5
6#include <termkey.h>
7#include "nvim/event/stream.h"
8#include "nvim/event/time.h"
9
10typedef struct term_input {
11 int in_fd;
12 // Phases: -1=all 0=disabled 1=first-chunk 2=continue 3=last-chunk
13 int8_t paste;
14 bool waiting;
15 TermKey *tk;
16#if TERMKEY_VERSION_MAJOR > 0 || TERMKEY_VERSION_MINOR > 18
17 TermKey_Terminfo_Getstr_Hook *tk_ti_hook_fn; ///< libtermkey terminfo hook
18#endif
19 TimeWatcher timer_handle;
20 Loop *loop;
21 Stream read_stream;
22 RBuffer *key_buffer;
23 uv_mutex_t key_buffer_mutex;
24 uv_cond_t key_buffer_cond;
25} TermInput;
26
27#ifdef INCLUDE_GENERATED_DECLARATIONS
28# include "tui/input.h.generated.h"
29#endif
30
31#endif // NVIM_TUI_INPUT_H
32