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 #include "nvim/highlight_defs.h"
7 #include "nvim/ui.h"
8 
9 #ifdef INCLUDE_GENERATED_DECLARATIONS
10 # include "highlight.h.generated.h"
11 #endif
12 
13 # define HL_SET_DEFAULT_COLORS(rgb_fg, rgb_bg, rgb_sp) \
14  do { \
15  bool dark_ = (*p_bg == 'd'); \
16  rgb_fg = rgb_fg != -1 ? rgb_fg : (dark_ ? 0xFFFFFF : 0x000000); \
17  rgb_bg = rgb_bg != -1 ? rgb_bg : (dark_ ? 0x000000 : 0xFFFFFF); \
18  rgb_sp = rgb_sp != -1 ? rgb_sp : 0xFF0000; \
19  } while (0);
20 
21 #endif // NVIM_HIGHLIGHT_H