aspell: fix `-Wdeprecated-declarations` for `g_module_build_path`
[midnight-commander.git] / lib / tty / color.h
blobe09516f6e643002b8bb3ab1f4014814b8fdf4a68
1 /** \file color.h
2 * \brief Header: color setup
4 * PLEASE FORGOT ABOUT tty/color.h!
5 * Use skin engine for getting needed color pairs.
7 * edit/syntax.c may use this file directly, I'm agree. :)
9 */
11 #ifndef MC__COLOR_H
12 #define MC__COLOR_H
14 #include "lib/global.h" /* glib.h */
16 #ifdef HAVE_SLANG
17 #include "color-slang.h"
18 #else
19 #include "tty-ncurses.h"
20 #endif
22 /*** typedefs(not structures) and defined constants **********************************************/
24 typedef struct
26 char *fg;
27 char *bg;
28 char *attrs;
29 size_t pair_index;
30 } tty_color_pair_t;
32 /*** enums ***************************************************************************************/
34 /*** structures declarations (and typedefs of structures)*****************************************/
36 /*** global variables defined in .c file *********************************************************/
38 /*** declarations of public functions ************************************************************/
40 void tty_init_colors (gboolean disable, gboolean force);
41 void tty_colors_done (void);
43 gboolean tty_use_colors (void);
44 int tty_try_alloc_color_pair (const tty_color_pair_t * color, gboolean is_temp);
46 void tty_color_free_temp (void);
47 void tty_color_free_all (void);
49 void tty_setcolor (int color);
50 void tty_lowlevel_setcolor (int color);
51 void tty_set_normal_attrs (void);
53 void tty_color_set_defaults (const tty_color_pair_t * color);
55 extern gboolean tty_use_256colors (GError ** error);
56 extern gboolean tty_use_truecolors (GError ** error);
58 /*** inline functions ****************************************************************************/
60 #endif /* MC__COLOR_H */