Massive moved some dirs from $(srcdir)/src into $(srcdir)/lib
[midnight-commander.git] / lib / tty / color-internal.h
blob79e08814bdb7032d04b9cff0e75b456ddd9d590a
2 /** \file color-internal.h
3 * \brief Header: Internal stuff of color setup
4 */
6 #ifndef MC_COLOR_INTERNAL_H
7 #define MC_COLOR_INTERNAL_H
9 #include <sys/types.h> /* size_t */
11 #include "../../src/global.h"
13 #ifdef HAVE_SLANG
14 # include "../../src/tty/tty-slang.h"
15 #else
16 # include "../../src/tty/tty-ncurses.h"
17 #endif /* HAVE_SLANG */
19 extern gboolean use_colors;
20 extern gboolean mc_tty_color_disable;
22 typedef struct mc_color_pair_struct {
23 const char *cfg;
24 const char *cbg;
25 int ifg;
26 int ibg;
27 int pair_index;
28 gboolean is_temp;
29 } tty_color_pair_t;
31 typedef enum {
32 SPEC_A_REVERSE = -100,
33 SPEC_A_BOLD = -101,
34 SPEC_A_BOLD_REVERSE = -102,
35 SPEC_A_UNDERLINE = -103
36 } tty_special_color_t;
38 const char *tty_color_get_valid_name (const char *);
39 int tty_color_get_index_by_name (const char *);
41 void tty_color_init_lib (gboolean, gboolean);
42 void tty_color_deinit_lib (void);
44 void tty_color_try_alloc_pair_lib (tty_color_pair_t *);
46 #endif /* MC_COLOR_INTERNAL_H */