Ticket #380: About colors schemes (reopened ticket)
[midnight-commander.git] / src / skin / skin.h
blobf152bc6ca4087d69213a74754fbcab47ca500d79
1 #ifndef MC__SKIN_H
2 #define MC__SKIN_H
4 #include "../../src/global.h"
6 #include "../../src/mcconfig/mcconfig.h"
8 #include "../src/tty/color.h"
10 /*** typedefs(not structures) and defined constants **********************************************/
12 /* Beware! When using Slang with color, not all the indexes are free.
13 See color-slang.h (A_*) */
15 /* cache often used colors*/
16 #define DEFAULT_COLOR mc_skin_color__cache[0]
17 #define NORMAL_COLOR mc_skin_color__cache[1]
18 #define MARKED_COLOR mc_skin_color__cache[2]
19 #define SELECTED_COLOR mc_skin_color__cache[3]
20 #define MARKED_SELECTED_COLOR mc_skin_color__cache[4]
21 #define REVERSE_COLOR mc_skin_color__cache[5]
23 /* Dialog colors */
24 #define COLOR_NORMAL mc_skin_color__cache[6]
25 #define COLOR_FOCUS mc_skin_color__cache[7]
26 #define COLOR_HOT_NORMAL mc_skin_color__cache[8]
27 #define COLOR_HOT_FOCUS mc_skin_color__cache[9]
29 /* Error dialog colors */
30 #define ERROR_COLOR mc_skin_color__cache[10]
31 #define ERROR_HOT_NORMAL mc_skin_color__cache[11]
32 #define ERROR_HOT_FOCUS mc_skin_color__cache[12]
34 /* Menu colors */
35 #define MENU_ENTRY_COLOR mc_skin_color__cache[13]
36 #define MENU_SELECTED_COLOR mc_skin_color__cache[14]
37 #define MENU_HOT_COLOR mc_skin_color__cache[15]
38 #define MENU_HOTSEL_COLOR mc_skin_color__cache[16]
41 * This should be selectable independently. Default has to be black background
42 * foreground does not matter at all.
44 #define GAUGE_COLOR mc_skin_color__cache[17]
45 #define INPUT_COLOR mc_skin_color__cache[18]
47 #define HELP_NORMAL_COLOR mc_skin_color__cache[19]
48 #define HELP_ITALIC_COLOR mc_skin_color__cache[20]
49 #define HELP_BOLD_COLOR mc_skin_color__cache[21]
50 #define HELP_LINK_COLOR mc_skin_color__cache[22]
51 #define HELP_SLINK_COLOR mc_skin_color__cache[23]
53 #define VIEW_UNDERLINED_COLOR mc_skin_color__cache[24]
56 * editor colors - only 4 for normal, search->found, select, and whitespace
57 * respectively
58 * Last is defined to view color.
60 #define EDITOR_NORMAL_COLOR mc_skin_color__cache[25]
61 #define EDITOR_BOLD_COLOR mc_skin_color__cache[26]
62 #define EDITOR_MARKED_COLOR mc_skin_color__cache[27]
63 #define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[28]
64 /* color of left 8 char status per line */
65 #define LINE_STATE_COLOR mc_skin_color__cache[29]
67 #define MC_SKIN_COLOR_CACHE_COUNT 30
70 /*** enums ***************************************************************************************/
72 /*** structures declarations (and typedefs of structures)*****************************************/
74 typedef struct mc_skin_struct {
75 gchar *name;
76 gchar *description;
77 mc_config_t *config;
78 GHashTable *colors;
79 } mc_skin_t;
81 /*** global variables defined in .c file *********************************************************/
83 extern int mc_skin_color__cache[];
84 extern mc_skin_t mc_skin__default;
86 /*** declarations of public functions ************************************************************/
88 gboolean mc_skin_init (GError **);
89 void mc_skin_deinit (void);
91 int mc_skin_color_get (const gchar *, const gchar *);
93 void mc_skin_lines_parse_ini_file (mc_skin_t *);
95 #endif