2009-02-05 21:28:18 +03:00
|
|
|
|
|
|
|
/** \file color.h
|
|
|
|
* \brief Header: color setup
|
|
|
|
*/
|
|
|
|
|
2004-12-03 22:17:46 +03:00
|
|
|
#ifndef MC_COLOR_H
|
|
|
|
#define MC_COLOR_H
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2009-05-14 19:18:03 +04:00
|
|
|
#include "../../src/global.h" /* glib.h */
|
|
|
|
|
2001-09-03 08:32:16 +04:00
|
|
|
#ifdef HAVE_SLANG
|
2009-05-10 19:01:15 +04:00
|
|
|
# include "../../src/tty/color-slang.h"
|
1998-02-27 07:54:42 +03:00
|
|
|
#else
|
2009-05-10 19:01:15 +04:00
|
|
|
# include "../../src/tty/color-ncurses.h"
|
1998-02-27 07:54:42 +03:00
|
|
|
#endif
|
|
|
|
|
1998-12-29 19:52:49 +03:00
|
|
|
/* Beware! When using Slang with color, not all the indexes are free.
|
2009-05-14 19:18:03 +04:00
|
|
|
See color-slang.h (A_*) */
|
2002-10-14 03:55:39 +04:00
|
|
|
#define NORMAL_COLOR IF_COLOR (1, 0)
|
|
|
|
#define SELECTED_COLOR IF_COLOR (2, A_REVERSE)
|
|
|
|
#define MARKED_COLOR IF_COLOR (3, A_BOLD)
|
2009-05-10 19:01:15 +04:00
|
|
|
/* MARKED_SELECTED_COLOR is screen library specific */
|
2002-10-14 03:55:39 +04:00
|
|
|
#define ERROR_COLOR IF_COLOR (5, A_BOLD)
|
|
|
|
#define MENU_ENTRY_COLOR IF_COLOR (6, A_REVERSE)
|
|
|
|
#define REVERSE_COLOR IF_COLOR (7, A_REVERSE)
|
1998-12-29 19:52:49 +03:00
|
|
|
|
2004-12-03 22:17:46 +03:00
|
|
|
/* Dialog colors */
|
2002-10-14 03:55:39 +04:00
|
|
|
#define COLOR_NORMAL IF_COLOR (8, A_REVERSE)
|
|
|
|
#define COLOR_FOCUS IF_COLOR (9, A_BOLD)
|
|
|
|
#define COLOR_HOT_NORMAL IF_COLOR (10, 0)
|
|
|
|
#define COLOR_HOT_FOCUS IF_COLOR (11, 0)
|
2004-12-03 22:17:46 +03:00
|
|
|
|
2002-10-14 03:55:39 +04:00
|
|
|
#define VIEW_UNDERLINED_COLOR IF_COLOR (12, A_UNDERLINE)
|
|
|
|
#define MENU_SELECTED_COLOR IF_COLOR (13, A_BOLD)
|
|
|
|
#define MENU_HOT_COLOR IF_COLOR (14, 0)
|
|
|
|
#define MENU_HOTSEL_COLOR IF_COLOR (15, 0)
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2002-10-14 03:55:39 +04:00
|
|
|
#define HELP_NORMAL_COLOR IF_COLOR (16, A_REVERSE)
|
|
|
|
#define HELP_ITALIC_COLOR IF_COLOR (17, A_REVERSE)
|
|
|
|
#define HELP_BOLD_COLOR IF_COLOR (18, A_REVERSE)
|
|
|
|
#define HELP_LINK_COLOR IF_COLOR (19, 0)
|
|
|
|
#define HELP_SLINK_COLOR IF_COLOR (20, A_BOLD)
|
1998-12-11 01:04:54 +03:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
/*
|
|
|
|
* This should be selectable independently. Default has to be black background
|
|
|
|
* foreground does not matter at all.
|
|
|
|
*/
|
2002-10-14 03:55:39 +04:00
|
|
|
#define GAUGE_COLOR IF_COLOR (21, 0)
|
|
|
|
#define INPUT_COLOR IF_COLOR (22, 0)
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
/* Add this to color panel, on BW all pairs are normal */
|
2002-10-14 03:55:39 +04:00
|
|
|
#define DIRECTORY_COLOR IF_COLOR (23, 0)
|
|
|
|
#define EXECUTABLE_COLOR IF_COLOR (24, 0)
|
|
|
|
#define LINK_COLOR IF_COLOR (25, 0)
|
|
|
|
#define STALE_LINK_COLOR IF_COLOR (26, 0)
|
|
|
|
#define DEVICE_COLOR IF_COLOR (27, 0)
|
|
|
|
#define SPECIAL_COLOR IF_COLOR (28, 0)
|
|
|
|
#define CORE_COLOR IF_COLOR (29, 0)
|
1998-12-29 19:52:49 +03:00
|
|
|
|
|
|
|
|
|
|
|
/* For the default color any unused index may be chosen. */
|
2001-05-29 21:02:28 +04:00
|
|
|
#define DEFAULT_COLOR_INDEX 30
|
2002-10-14 03:55:39 +04:00
|
|
|
#define DEFAULT_COLOR IF_COLOR (DEFAULT_COLOR_INDEX, 0)
|
1998-12-29 19:52:49 +03:00
|
|
|
|
|
|
|
/*
|
2007-08-27 16:06:02 +04:00
|
|
|
* editor colors - only 4 for normal, search->found, select, and whitespace
|
|
|
|
* respectively
|
1998-12-29 19:52:49 +03:00
|
|
|
* Last is defined to view color.
|
|
|
|
*/
|
2002-07-30 03:37:22 +04:00
|
|
|
#define EDITOR_NORMAL_COLOR_INDEX 34
|
2002-10-14 03:55:39 +04:00
|
|
|
#define EDITOR_NORMAL_COLOR IF_COLOR (EDITOR_NORMAL_COLOR_INDEX, 0)
|
|
|
|
#define EDITOR_BOLD_COLOR IF_COLOR (35, A_BOLD)
|
|
|
|
#define EDITOR_MARKED_COLOR IF_COLOR (36, A_REVERSE)
|
2007-08-27 16:06:02 +04:00
|
|
|
#define EDITOR_WHITESPACE_COLOR IF_COLOR (37, 0 /* irrelevant */)
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2009-05-12 01:15:55 +04:00
|
|
|
/* color of left 8 char status per line */
|
|
|
|
#define LINE_STATE_COLOR IF_COLOR (38, 0)
|
|
|
|
|
2004-09-02 02:33:43 +04:00
|
|
|
/* Error dialog colors */
|
2009-05-12 01:15:55 +04:00
|
|
|
#define ERROR_HOT_NORMAL IF_COLOR (39, 0)
|
|
|
|
#define ERROR_HOT_FOCUS IF_COLOR (40, 0)
|
2004-09-02 02:33:43 +04:00
|
|
|
|
2009-05-14 19:18:03 +04:00
|
|
|
void tty_colors_done (void);
|
|
|
|
gboolean tty_use_colors (void);
|
|
|
|
void tty_disable_colors (gboolean disable, gboolean force);
|
|
|
|
int tty_try_alloc_color_pair (const char *fg, const char *bg);
|
|
|
|
void tty_setcolor (int color);
|
|
|
|
void tty_lowlevel_setcolor (int color);
|
2009-06-02 08:55:07 +04:00
|
|
|
void tty_set_normal_attrs (void);
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2009-05-10 19:01:15 +04:00
|
|
|
#endif /* MC_COLOR_H */
|