1 | #ifndef NVIM_OS_PTY_PROCESS_WIN_H |
2 | #define NVIM_OS_PTY_PROCESS_WIN_H |
3 | |
4 | #include <uv.h> |
5 | #include <winpty.h> |
6 | |
7 | #include "nvim/event/process.h" |
8 | #include "nvim/lib/queue.h" |
9 | |
10 | typedef struct pty_process { |
11 | Process process; |
12 | char *term_name; |
13 | uint16_t width, height; |
14 | winpty_t *winpty_object; |
15 | HANDLE finish_wait; |
16 | HANDLE process_handle; |
17 | uv_timer_t wait_eof_timer; |
18 | } PtyProcess; |
19 | |
20 | // Structure used by build_cmd_line() |
21 | typedef struct arg_node { |
22 | char *arg; // pointer to argument. |
23 | QUEUE node; // QUEUE structure. |
24 | } ArgNode; |
25 | |
26 | static inline PtyProcess pty_process_init(Loop *loop, void *data) |
27 | { |
28 | PtyProcess rv; |
29 | rv.process = process_init(loop, kProcessTypePty, data); |
30 | rv.term_name = NULL; |
31 | rv.width = 80; |
32 | rv.height = 24; |
33 | rv.winpty_object = NULL; |
34 | rv.finish_wait = NULL; |
35 | rv.process_handle = NULL; |
36 | return rv; |
37 | } |
38 | |
39 | #ifdef INCLUDE_GENERATED_DECLARATIONS |
40 | # include "os/pty_process_win.h.generated.h" |
41 | #endif |
42 | |
43 | #endif // NVIM_OS_PTY_PROCESS_WIN_H |
44 | |