1 | #ifndef NVIM_UI_H |
2 | #define NVIM_UI_H |
3 | |
4 | #include <stddef.h> |
5 | #include <stdbool.h> |
6 | #include <stdint.h> |
7 | |
8 | #include "nvim/globals.h" |
9 | #include "nvim/api/private/defs.h" |
10 | #include "nvim/highlight_defs.h" |
11 | |
12 | typedef enum { |
13 | kUICmdline = 0, |
14 | , |
15 | kUITabline, |
16 | , |
17 | kUIMessages, |
18 | #define kUIGlobalCount kUILinegrid |
19 | kUILinegrid, |
20 | kUIMultigrid, |
21 | kUIHlState, |
22 | kUITermColors, |
23 | kUIFloatDebug, |
24 | kUIExtCount, |
25 | } UIExtension; |
26 | |
27 | EXTERN const char *ui_ext_names[] INIT(= { |
28 | "ext_cmdline" , |
29 | "ext_popupmenu" , |
30 | "ext_tabline" , |
31 | "ext_wildmenu" , |
32 | "ext_messages" , |
33 | "ext_linegrid" , |
34 | "ext_multigrid" , |
35 | "ext_hlstate" , |
36 | "ext_termcolors" , |
37 | "_debug_float" , |
38 | }); |
39 | |
40 | typedef struct ui_t UI; |
41 | |
42 | enum { |
43 | kLineFlagWrap = 1, |
44 | kLineFlagInvalid = 2, |
45 | }; |
46 | |
47 | typedef int LineFlags; |
48 | |
49 | struct ui_t { |
50 | bool rgb; |
51 | bool override; ///< Force highest-requested UI capabilities. |
52 | bool composed; |
53 | bool ui_ext[kUIExtCount]; ///< Externalized UI capabilities. |
54 | int width; |
55 | int height; |
56 | int pum_height; |
57 | void *data; |
58 | |
59 | #ifdef INCLUDE_GENERATED_DECLARATIONS |
60 | # include "ui_events.generated.h" |
61 | #endif |
62 | |
63 | void (*inspect)(UI *ui, Dictionary *info); |
64 | }; |
65 | |
66 | #ifdef INCLUDE_GENERATED_DECLARATIONS |
67 | # include "ui.h.generated.h" |
68 | # include "ui_events_call.h.generated.h" |
69 | #endif |
70 | |
71 | |
72 | EXTERN MultiQueue *resize_events; |
73 | #endif // NVIM_UI_H |
74 | |