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 #include "nvim/os/pty_conpty_win.h" 10 11 typedef enum { 12 kWinpty, 13 kConpty, 14 } PtyType; 15 16 typedef struct pty_process { 17 Process process; 18 uint16_t width, height; 19 union { 20 winpty_t *winpty; 21 conpty_t *conpty; 22 } object; 23 PtyType type; 24 HANDLE finish_wait; 25 HANDLE process_handle; 26 uv_timer_t wait_eof_timer; 27 } PtyProcess; 28 29 // Structure used by build_cmd_line() 30 typedef struct arg_node { 31 char *arg; // pointer to argument. 32 QUEUE node; // QUEUE structure. 33 } ArgNode; 34 pty_process_init(Loop * loop,void * data)35static inline PtyProcess pty_process_init(Loop *loop, void *data) 36 { 37 PtyProcess rv; 38 rv.process = process_init(loop, kProcessTypePty, data); 39 rv.width = 80; 40 rv.height = 24; 41 rv.object.winpty = NULL; 42 rv.type = kWinpty; 43 rv.finish_wait = NULL; 44 rv.process_handle = NULL; 45 return rv; 46 } 47 48 #ifdef INCLUDE_GENERATED_DECLARATIONS 49 # include "os/pty_process_win.h.generated.h" 50 #endif 51 52 #endif // NVIM_OS_PTY_PROCESS_WIN_H 53