initial step to do mark in inpun fields
[midnight-commander.git] / lib / skin.h
blob006881dbe310b22fa24704aaeeb8cd499e9bea2f
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 REVERSE_COLOR mc_skin_color__cache[5]
22 #define COMMAND_MARK_COLOR mc_skin_color__cache[6]
24 /* Dialog colors */
25 #define COLOR_NORMAL mc_skin_color__cache[7]
26 #define COLOR_FOCUS mc_skin_color__cache[8]
27 #define COLOR_HOT_NORMAL mc_skin_color__cache[9]
28 #define COLOR_HOT_FOCUS mc_skin_color__cache[10]
30 /* Error dialog colors */
31 #define ERROR_COLOR mc_skin_color__cache[11]
32 #define ERROR_HOT_NORMAL mc_skin_color__cache[12]
33 #define ERROR_HOT_FOCUS mc_skin_color__cache[13]
35 /* Menu colors */
36 #define MENU_ENTRY_COLOR mc_skin_color__cache[14]
37 #define MENU_SELECTED_COLOR mc_skin_color__cache[15]
38 #define MENU_HOT_COLOR mc_skin_color__cache[16]
39 #define MENU_HOTSEL_COLOR mc_skin_color__cache[17]
40 #define MENU_INACTIVE_COLOR mc_skin_color__cache[18]
43 * This should be selectable independently. Default has to be black background
44 * foreground does not matter at all.
46 #define GAUGE_COLOR mc_skin_color__cache[19]
47 #define INPUT_COLOR mc_skin_color__cache[20]
48 #define INPUT_UNCHANGED_COLOR mc_skin_color__cache[21]
49 #define INPUT_MARK_COLOR mc_skin_color__cache[22]
51 #define HELP_NORMAL_COLOR mc_skin_color__cache[23]
52 #define HELP_ITALIC_COLOR mc_skin_color__cache[24]
53 #define HELP_BOLD_COLOR mc_skin_color__cache[25]
54 #define HELP_LINK_COLOR mc_skin_color__cache[26]
55 #define HELP_SLINK_COLOR mc_skin_color__cache[27]
57 #define VIEW_UNDERLINED_COLOR mc_skin_color__cache[28]
60 * editor colors - only 4 for normal, search->found, select, and whitespace
61 * respectively
62 * Last is defined to view color.
64 #define EDITOR_NORMAL_COLOR mc_skin_color__cache[29]
65 #define EDITOR_BOLD_COLOR mc_skin_color__cache[30]
66 #define EDITOR_MARKED_COLOR mc_skin_color__cache[31]
67 #define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[32]
68 #define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[33]
69 /* color of left 8 char status per line */
70 #define LINE_STATE_COLOR mc_skin_color__cache[34]
71 #define BOOK_MARK_COLOR mc_skin_color__cache[35]
72 #define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[36]
74 #define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[37]
75 #define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[38]
77 /* Diff colors */
78 #define DFF_ADD_COLOR mc_skin_color__cache[39]
79 #define DFF_CHG_COLOR mc_skin_color__cache[40]
80 #define DFF_CHH_COLOR mc_skin_color__cache[41]
81 #define DFF_CHD_COLOR mc_skin_color__cache[42]
82 #define DFF_DEL_COLOR mc_skin_color__cache[43]
83 #define DFF_FOLDER_COLOR mc_skin_color__cache[44]
84 #define DFF_ERROR_COLOR mc_skin_color__cache[45]
86 #define MC_SKIN_COLOR_CACHE_COUNT 46
88 /*** enums ***************************************************************************************/
90 /*** structures declarations (and typedefs of structures)*****************************************/
92 typedef struct mc_skin_struct {
93 gchar *name;
94 gchar *description;
95 mc_config_t *config;
96 GHashTable *colors;
97 } mc_skin_t;
99 /*** global variables defined in .c file *********************************************************/
101 extern int mc_skin_color__cache[];
102 extern mc_skin_t mc_skin__default;
104 /*** declarations of public functions ************************************************************/
106 gboolean mc_skin_init (GError **);
107 void mc_skin_deinit (void);
109 int mc_skin_color_get (const gchar *, const gchar *);
111 void mc_skin_lines_parse_ini_file (mc_skin_t *);
113 gchar *mc_skin_get(const gchar *, const gchar *, const gchar *);
116 #endif