ui_client.h (1278B)
1 #pragma once 2 3 #include <stdbool.h> 4 #include <stddef.h> 5 #include <stdint.h> 6 7 #include "nvim/grid_defs.h" // IWYU pragma: keep 8 #include "nvim/macros_defs.h" 9 #include "nvim/types_defs.h" 10 #include "nvim/ui_defs.h" // IWYU pragma: keep 11 12 // Temporary buffer for converting a single grid_line event 13 EXTERN size_t grid_line_buf_size INIT( = 0); 14 EXTERN schar_T *grid_line_buf_char INIT( = NULL); 15 EXTERN sattr_T *grid_line_buf_attr INIT( = NULL); 16 17 // Client-side UI channel. Zero during early startup or if not a (--remote-ui) UI client. 18 EXTERN uint64_t ui_client_channel_id INIT( = 0); 19 20 /// `status` argument of the last "error_exit" UI event, or -1 if none has been seen. 21 /// NOTE: This assumes "error_exit" never has a negative `status` argument. 22 EXTERN int ui_client_error_exit INIT( = -1); 23 24 /// Server exit code. 25 EXTERN int ui_client_exit_status INIT( = 0); 26 27 /// Whether ui client has sent nvim_ui_attach yet 28 EXTERN bool ui_client_attached INIT( = false); 29 30 /// The ui client should forward its stdin to the nvim process 31 /// by convention, this uses fd=3 (next free number after stdio) 32 EXTERN bool ui_client_forward_stdin INIT( = false); 33 34 #define UI_CLIENT_STDIN_FD 3 35 // uncrustify:off 36 # include "ui_client.h.generated.h" 37 # include "ui_events_client.h.generated.h" 38 // uncrustify:on