1
2
3
4
5
6
7
8
9
10
11 #ifndef MC__COLOR_H
12 #define MC__COLOR_H
13
14 #include "lib/global.h"
15
16 #ifdef HAVE_SLANG
17 #include "color-slang.h"
18 #else
19 #include "tty-ncurses.h"
20 #endif
21
22
23
24 #define ALLOC_COLOR_PAIR_INDEX 1
25
26
27
28
29
30
31
32
33
34 void tty_init_colors (gboolean disable, gboolean force);
35 void tty_colors_done (void);
36
37 gboolean tty_use_colors (void);
38 int tty_try_alloc_color_pair (const char *fg, const char *bg, const char *attrs);
39 int tty_try_alloc_color_pair2 (const char *fg, const char *bg, const char *attrs,
40 gboolean is_temp_color);
41
42 void tty_color_free_all_tmp (void);
43 void tty_color_free_all_non_tmp (void);
44
45 void tty_setcolor (int color);
46 void tty_lowlevel_setcolor (int color);
47 void tty_set_normal_attrs (void);
48
49 void tty_color_set_defaults (const char *fgcolor, const char *bgcolor, const char *attrs);
50
51 extern gboolean tty_use_256colors (GError ** error);
52 extern gboolean tty_use_truecolors (GError ** error);
53
54
55
56 #endif