mc/lib/tty/color.h
Egmont Koblinger e593572bb9 Ticket #2169: Add support for 256 colors terminals
Forget the old limit of 8 background and 16 foreground colors.
From now on Midnight Commander can use all the 256 colors,
as your favorite terminal emulator supports them - or not,
in which case it's not going to stay your favorite terminal for long.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-29 11:58:10 +02:00

55 lines
1.6 KiB
C

/** \file color.h
* \brief Header: color setup
*
* PLEASE FORGOT ABOUT tty/color.h!
* Use skin engine for getting needed color pairs.
*
* edit/syntax.c may use this file directly, I'm agree. :)
*
*/
#ifndef MC__COLOR_H
#define MC__COLOR_H
#include "lib/global.h" /* glib.h */
#ifdef HAVE_SLANG
#include "color-slang.h"
#else
#include "tty-ncurses.h"
#endif
/*** typedefs(not structures) and defined constants **********************************************/
#define ALLOC_COLOR_PAIR_INDEX 1
/*** enums ***************************************************************************************/
/*** structures declarations (and typedefs of structures)*****************************************/
/*** global variables defined in .c file *********************************************************/
/* colors specified on the command line: they override any other setting */
extern char *command_line_colors;
/*** declarations of public functions ************************************************************/
void tty_init_colors (gboolean disable, gboolean force);
void tty_colors_done (void);
gboolean tty_use_colors (void);
int tty_try_alloc_color_pair (const char *, const char *, const char *);
int tty_try_alloc_color_pair2 (const char *, const char *, const char *, gboolean);
void tty_color_free_all_tmp (void);
void tty_color_free_all_non_tmp (void);
void tty_setcolor (int color);
void tty_lowlevel_setcolor (int color);
void tty_set_normal_attrs (void);
void tty_color_set_defaults (const char *, const char *, const char *);
/*** inline functions ****************************************************************************/
#endif /* MC_COLOR_H */