input.h
Go to the documentation of this file.
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 
10 typedef 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;
16  TermKey *tk;
17 #if TERMKEY_VERSION_MAJOR > 0 || TERMKEY_VERSION_MINOR > 18
18  TermKey_Terminfo_Getstr_Hook *tk_ti_hook_fn;
19 #endif
24  uv_mutex_t key_buffer_mutex;
25  uv_cond_t key_buffer_cond;
26 } TermInput;
27 
28 #ifdef INCLUDE_GENERATED_DECLARATIONS
29 # include "tui/input.h.generated.h"
30 #endif
31 
32 #ifdef UNIT_TESTING
33 bool ut_handle_background_color(TermInput *input);
34 #endif
35 
36 #endif // NVIM_TUI_INPUT_H
TimeWatcher timer_handle
Definition: input.h:20
Loop * loop
Definition: input.h:21
Definition: query.c:15
RBuffer * key_buffer
Definition: input.h:23
Definition: rbuffer.h:77
struct term_input TermInput
TermKey * tk
Definition: input.h:16
Definition: input.h:10
uv_mutex_t key_buffer_mutex
Definition: input.h:24
Definition: time.h:11
int8_t paste
Definition: input.h:13
bool waiting
Definition: input.h:14
Definition: loop.h:17
uv_cond_t key_buffer_cond
Definition: input.h:25
int in_fd
Definition: input.h:11
int8_t waiting_for_bg_response
Definition: input.h:15
Stream read_stream
Definition: input.h:22