1
2
3
4
5
6 #ifndef MC__COLOR_INTERNAL_H
7 #define MC__COLOR_INTERNAL_H
8
9 #include <sys/types.h>
10
11 #include "lib/global.h"
12
13 #ifdef HAVE_SLANG
14 # include "tty-slang.h"
15 #else
16 # include "tty-ncurses.h"
17 #endif
18
19
20
21
22
23 typedef enum
24 {
25 SPEC_A_REVERSE = -100,
26 SPEC_A_BOLD = -101,
27 SPEC_A_BOLD_REVERSE = -102,
28 SPEC_A_UNDERLINE = -103
29 } tty_special_color_t;
30
31
32
33
34 typedef struct
35 {
36 int fg;
37 int bg;
38 int attr;
39 size_t pair_index;
40 gboolean is_temp;
41 } tty_color_lib_pair_t;
42
43
44
45 extern gboolean use_colors;
46 extern gboolean mc_tty_color_disable;
47
48
49
50 const char *tty_color_get_name_by_index (int idx);
51 int tty_color_get_index_by_name (const char *color_name);
52 int tty_attr_get_bits (const char *attrs);
53
54 void tty_color_init_lib (gboolean disable, gboolean force);
55 void tty_color_deinit_lib (void);
56
57 void tty_color_try_alloc_lib_pair (tty_color_lib_pair_t *mc_color_pair);
58
59
60
61 #endif