2009-05-10 19:01:15 +04:00
|
|
|
|
|
|
|
/** \file color-internal.h
|
|
|
|
* \brief Header: Internal stuff of color setup
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MC_COLOR_INTERNAL_H
|
|
|
|
#define MC_COLOR_INTERNAL_H
|
|
|
|
|
2009-09-17 02:07:04 +04:00
|
|
|
#include <sys/types.h> /* size_t */
|
2009-05-10 19:01:15 +04:00
|
|
|
|
2010-01-20 18:11:52 +03:00
|
|
|
#include "lib/global.h"
|
2009-05-13 17:05:55 +04:00
|
|
|
|
2009-05-10 19:01:15 +04:00
|
|
|
#ifdef HAVE_SLANG
|
2010-01-07 02:57:27 +03:00
|
|
|
# include "tty-slang.h"
|
2009-05-10 19:01:15 +04:00
|
|
|
#else
|
2010-01-07 02:57:27 +03:00
|
|
|
# include "tty-ncurses.h"
|
2009-09-17 02:07:04 +04:00
|
|
|
#endif /* HAVE_SLANG */
|
2009-05-10 19:01:15 +04:00
|
|
|
|
2009-05-14 19:18:03 +04:00
|
|
|
extern gboolean use_colors;
|
2009-09-09 18:56:52 +04:00
|
|
|
extern gboolean mc_tty_color_disable;
|
|
|
|
|
2010-02-26 12:25:53 +03:00
|
|
|
typedef struct mc_color_pair_struct
|
|
|
|
{
|
2009-09-04 18:22:49 +04:00
|
|
|
const char *cfg;
|
|
|
|
const char *cbg;
|
|
|
|
int ifg;
|
|
|
|
int ibg;
|
2010-02-24 22:37:49 +03:00
|
|
|
size_t pair_index;
|
2009-09-10 16:14:18 +04:00
|
|
|
gboolean is_temp;
|
2009-09-14 17:43:03 +04:00
|
|
|
} tty_color_pair_t;
|
2009-05-10 19:01:15 +04:00
|
|
|
|
2010-02-26 12:25:53 +03:00
|
|
|
/* *INDENT-OFF* */
|
2009-09-17 02:07:04 +04:00
|
|
|
typedef enum {
|
2009-09-14 17:43:03 +04:00
|
|
|
SPEC_A_REVERSE = -100,
|
|
|
|
SPEC_A_BOLD = -101,
|
|
|
|
SPEC_A_BOLD_REVERSE = -102,
|
|
|
|
SPEC_A_UNDERLINE = -103
|
|
|
|
} tty_special_color_t;
|
2010-02-26 12:25:53 +03:00
|
|
|
/* *INDENT-ON* */
|
2009-09-14 17:43:03 +04:00
|
|
|
|
|
|
|
const char *tty_color_get_valid_name (const char *);
|
|
|
|
int tty_color_get_index_by_name (const char *);
|
|
|
|
|
|
|
|
void tty_color_init_lib (gboolean, gboolean);
|
|
|
|
void tty_color_deinit_lib (void);
|
|
|
|
|
|
|
|
void tty_color_try_alloc_pair_lib (tty_color_pair_t *);
|
2009-05-10 19:01:15 +04:00
|
|
|
|
2009-09-17 02:07:04 +04:00
|
|
|
#endif /* MC_COLOR_INTERNAL_H */
|