highlight.h
Go to the documentation of this file.
1 #ifndef NVIM_HIGHLIGHT_H
2 #define NVIM_HIGHLIGHT_H
3 
4 #include <stdbool.h>
5 
7 #include "nvim/highlight_defs.h"
8 #include "nvim/ui.h"
9 
10 #ifdef INCLUDE_GENERATED_DECLARATIONS
11 # include "highlight.h.generated.h"
12 #endif
13 
14 #define HL_SET_DEFAULT_COLORS(rgb_fg, rgb_bg, rgb_sp) \
15  do { \
16  bool dark_ = (*p_bg == 'd'); \
17  rgb_fg = rgb_fg != -1 ? rgb_fg : (dark_ ? 0xFFFFFF : 0x000000); \
18  rgb_bg = rgb_bg != -1 ? rgb_bg : (dark_ ? 0x000000 : 0xFFFFFF); \
19  rgb_sp = rgb_sp != -1 ? rgb_sp : 0xFF0000; \
20  } while (0);
21 
22 #endif // NVIM_HIGHLIGHT_H
ui.h
highlight_defs.h
defs.h