mc/lib/tty/color.h
Andrew Borodin 4cbc61a775 Clarify check of 256 colors support.
(tty_use_truecolors): don't check 256 colors here.
(tty_use_256colors): generate error message if 256 colors aren't
supported.
(tty_init): sync with modified tty_use_256colors().
(tty_color_try_alloc_pair_lib): likewise.
(mc_skin_init): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:48:59 +03: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 *********************************************************/
/*** 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 *);
extern gboolean tty_use_256colors (GError **);
extern gboolean tty_use_truecolors (GError **);
/*** inline functions ****************************************************************************/
#endif /* MC_COLOR_H */