Ticket #121: Fixed IPV4 FTP connection scheme
[midnight-commander.git] / lib / skin.h
blobc55be9954ea47ddba7cbddd1f214397578d51db4
1 #ifndef MC_SKIN_H
2 #define MC_SKIN_H
4 #include "lib/global.h"
6 #include "lib/mcconfig.h"
8 #include "lib/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 DISABLED_COLOR mc_skin_color__cache[5]
22 #define REVERSE_COLOR mc_skin_color__cache[6]
23 #define COMMAND_MARK_COLOR mc_skin_color__cache[7]
25 /* Dialog colors */
26 #define COLOR_NORMAL mc_skin_color__cache[8]
27 #define COLOR_FOCUS mc_skin_color__cache[9]
28 #define COLOR_HOT_NORMAL mc_skin_color__cache[10]
29 #define COLOR_HOT_FOCUS mc_skin_color__cache[11]
31 /* Error dialog colors */
32 #define ERROR_COLOR mc_skin_color__cache[12]
33 #define ERROR_HOT_NORMAL mc_skin_color__cache[13]
34 #define ERROR_HOT_FOCUS mc_skin_color__cache[14]
36 /* Menu colors */
37 #define MENU_ENTRY_COLOR mc_skin_color__cache[15]
38 #define MENU_SELECTED_COLOR mc_skin_color__cache[16]
39 #define MENU_HOT_COLOR mc_skin_color__cache[17]
40 #define MENU_HOTSEL_COLOR mc_skin_color__cache[18]
41 #define MENU_INACTIVE_COLOR mc_skin_color__cache[19]
44 * This should be selectable independently. Default has to be black background
45 * foreground does not matter at all.
47 #define GAUGE_COLOR mc_skin_color__cache[20]
48 #define INPUT_COLOR mc_skin_color__cache[21]
49 #define INPUT_UNCHANGED_COLOR mc_skin_color__cache[22]
50 #define INPUT_MARK_COLOR mc_skin_color__cache[23]
52 #define HELP_NORMAL_COLOR mc_skin_color__cache[24]
53 #define HELP_ITALIC_COLOR mc_skin_color__cache[25]
54 #define HELP_BOLD_COLOR mc_skin_color__cache[26]
55 #define HELP_LINK_COLOR mc_skin_color__cache[27]
56 #define HELP_SLINK_COLOR mc_skin_color__cache[28]
58 #define VIEW_UNDERLINED_COLOR mc_skin_color__cache[29]
61 * editor colors - only 4 for normal, search->found, select, and whitespace
62 * respectively
63 * Last is defined to view color.
65 #define EDITOR_NORMAL_COLOR mc_skin_color__cache[30]
66 #define EDITOR_BOLD_COLOR mc_skin_color__cache[31]
67 #define EDITOR_MARKED_COLOR mc_skin_color__cache[32]
68 #define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[33]
69 #define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[34]
70 /* color of left 8 char status per line */
71 #define LINE_STATE_COLOR mc_skin_color__cache[35]
72 #define BOOK_MARK_COLOR mc_skin_color__cache[36]
73 #define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[37]
75 #define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[38]
76 #define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[39]
78 /* Diff colors */
79 #define DFF_ADD_COLOR mc_skin_color__cache[40]
80 #define DFF_CHG_COLOR mc_skin_color__cache[41]
81 #define DFF_CHH_COLOR mc_skin_color__cache[42]
82 #define DFF_CHD_COLOR mc_skin_color__cache[43]
83 #define DFF_DEL_COLOR mc_skin_color__cache[44]
84 #define DFF_FOLDER_COLOR mc_skin_color__cache[45]
85 #define DFF_ERROR_COLOR mc_skin_color__cache[46]
87 #define MC_SKIN_COLOR_CACHE_COUNT 47
89 /*** enums ***************************************************************************************/
91 /*** structures declarations (and typedefs of structures)*****************************************/
93 typedef struct mc_skin_struct {
94 gchar *name;
95 gchar *description;
96 mc_config_t *config;
97 GHashTable *colors;
98 } mc_skin_t;
100 /*** global variables defined in .c file *********************************************************/
102 extern int mc_skin_color__cache[];
103 extern mc_skin_t mc_skin__default;
105 /*** declarations of public functions ************************************************************/
107 gboolean mc_skin_init (GError **);
108 void mc_skin_deinit (void);
110 int mc_skin_color_get (const gchar *, const gchar *);
112 void mc_skin_lines_parse_ini_file (mc_skin_t *);
114 gchar *mc_skin_get(const gchar *, const gchar *, const gchar *);
116 #endif /* MC_SKIN_H */