Just a little correction at the it.po file.
[midnight-commander.git] / src / color.h
blobd56fee711a3df16c9602999fe057432b7c87c234
1 #ifndef __COLOR_H
2 #define __COLOR_H
4 void init_colors (void);
6 extern int use_colors;
7 extern int disable_colors;
9 extern int attr_pairs [];
10 #ifdef HAVE_SLANG
11 # define MY_COLOR_PAIR(x) COLOR_PAIR(x)
12 #else
13 # define MY_COLOR_PAIR(x) (COLOR_PAIR(x) | attr_pairs [x])
14 #endif
16 #define IF_COLOR(co,bw) (use_colors ? MY_COLOR_PAIR(co) : bw)
18 /* Beware! When using Slang with color, not all the indexes are free.
19 See myslang.h (A_*) */
20 #define NORMAL_COLOR IF_COLOR (1, 0)
21 #define SELECTED_COLOR IF_COLOR (2, A_REVERSE)
22 #define MARKED_COLOR IF_COLOR (3, A_BOLD)
24 #ifdef HAVE_SLANG
25 #define MARKED_SELECTED_COLOR IF_COLOR (4, (SLtt_Use_Ansi_Colors ? A_BOLD_REVERSE : A_REVERSE | A_BOLD))
26 #else
27 #define MARKED_SELECTED_COLOR IF_COLOR (4, A_REVERSE | A_BOLD)
28 #endif
30 #define ERROR_COLOR IF_COLOR (5, A_BOLD)
31 #define MENU_ENTRY_COLOR IF_COLOR (6, A_REVERSE)
32 #define REVERSE_COLOR IF_COLOR (7, A_REVERSE)
34 extern int dialog_colors[4];
35 extern int alarm_colors[4];
37 /* Dialog colors */
38 #define COLOR_NORMAL IF_COLOR (8, A_REVERSE)
39 #define COLOR_FOCUS IF_COLOR (9, A_BOLD)
40 #define COLOR_HOT_NORMAL IF_COLOR (10, 0)
41 #define COLOR_HOT_FOCUS IF_COLOR (11, 0)
43 #define VIEW_UNDERLINED_COLOR IF_COLOR (12, A_UNDERLINE)
44 #define MENU_SELECTED_COLOR IF_COLOR (13, A_BOLD)
45 #define MENU_HOT_COLOR IF_COLOR (14, 0)
46 #define MENU_HOTSEL_COLOR IF_COLOR (15, 0)
48 #define HELP_NORMAL_COLOR IF_COLOR (16, A_REVERSE)
49 #define HELP_ITALIC_COLOR IF_COLOR (17, A_REVERSE)
50 #define HELP_BOLD_COLOR IF_COLOR (18, A_REVERSE)
51 #define HELP_LINK_COLOR IF_COLOR (19, 0)
52 #define HELP_SLINK_COLOR IF_COLOR (20, A_BOLD)
55 * This should be selectable independently. Default has to be black background
56 * foreground does not matter at all.
58 #define GAUGE_COLOR IF_COLOR (21, 0)
59 #define INPUT_COLOR IF_COLOR (22, 0)
61 /* Add this to color panel, on BW all pairs are normal */
62 #define DIRECTORY_COLOR IF_COLOR (23, 0)
63 #define EXECUTABLE_COLOR IF_COLOR (24, 0)
64 #define LINK_COLOR IF_COLOR (25, 0)
65 #define STALE_LINK_COLOR IF_COLOR (26, 0)
66 #define DEVICE_COLOR IF_COLOR (27, 0)
67 #define SPECIAL_COLOR IF_COLOR (28, 0)
68 #define CORE_COLOR IF_COLOR (29, 0)
71 /* For the default color any unused index may be chosen. */
72 #define DEFAULT_COLOR_INDEX 30
73 #define DEFAULT_COLOR IF_COLOR (DEFAULT_COLOR_INDEX, 0)
76 * editor colors - only 3 for normal, search->found, and select, respectively
77 * Last is defined to view color.
79 #define EDITOR_NORMAL_COLOR_INDEX 34
80 #define EDITOR_NORMAL_COLOR IF_COLOR (EDITOR_NORMAL_COLOR_INDEX, 0)
81 #define EDITOR_BOLD_COLOR IF_COLOR (35, A_BOLD)
82 #define EDITOR_MARKED_COLOR IF_COLOR (36, A_REVERSE)
84 #ifdef HAVE_SLANG
85 # define CTYPE char *
86 #else
87 # define CTYPE int
88 #endif
90 void mc_init_pair (int index, CTYPE foreground, CTYPE background);
91 int try_alloc_color_pair (char *fg, char *bg);
92 void dealloc_color_pairs (void);
94 #endif /* __COLOR_H */