2010-06-29 13:42:39 +04:00
|
|
|
#ifndef MC_SKIN_H
|
|
|
|
#define MC_SKIN_H
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2010-01-20 18:11:52 +03:00
|
|
|
#include "lib/global.h"
|
2009-09-14 17:43:03 +04:00
|
|
|
|
2010-01-21 16:06:15 +03:00
|
|
|
#include "lib/mcconfig.h"
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2010-01-20 18:11:52 +03:00
|
|
|
#include "lib/tty/color.h"
|
2009-09-04 18:22:49 +04:00
|
|
|
|
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
|
|
|
|
/* Beware! When using Slang with color, not all the indexes are free.
|
|
|
|
See color-slang.h (A_*) */
|
|
|
|
|
2010-11-08 13:21:45 +03:00
|
|
|
/* cache often used colors */
|
2010-04-29 23:30:06 +04:00
|
|
|
#define DEFAULT_COLOR mc_skin_color__cache[0]
|
|
|
|
#define NORMAL_COLOR mc_skin_color__cache[1]
|
|
|
|
#define MARKED_COLOR mc_skin_color__cache[2]
|
|
|
|
#define SELECTED_COLOR mc_skin_color__cache[3]
|
|
|
|
#define MARKED_SELECTED_COLOR mc_skin_color__cache[4]
|
2010-06-29 13:42:39 +04:00
|
|
|
#define DISABLED_COLOR mc_skin_color__cache[5]
|
|
|
|
#define REVERSE_COLOR mc_skin_color__cache[6]
|
|
|
|
#define COMMAND_MARK_COLOR mc_skin_color__cache[7]
|
2010-10-12 13:33:09 +04:00
|
|
|
#define HEADER_COLOR mc_skin_color__cache[8]
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2009-09-10 16:14:18 +04:00
|
|
|
/* Dialog colors */
|
2010-10-12 13:33:09 +04:00
|
|
|
#define COLOR_NORMAL mc_skin_color__cache[9]
|
|
|
|
#define COLOR_FOCUS mc_skin_color__cache[10]
|
|
|
|
#define COLOR_HOT_NORMAL mc_skin_color__cache[11]
|
|
|
|
#define COLOR_HOT_FOCUS mc_skin_color__cache[12]
|
|
|
|
#define COLOR_TITLE mc_skin_color__cache[13]
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2009-09-10 16:14:18 +04:00
|
|
|
/* Error dialog colors */
|
2010-10-12 13:33:09 +04:00
|
|
|
#define ERROR_COLOR mc_skin_color__cache[14]
|
|
|
|
#define ERROR_FOCUS mc_skin_color__cache[15]
|
|
|
|
#define ERROR_HOT_NORMAL mc_skin_color__cache[16]
|
|
|
|
#define ERROR_HOT_FOCUS mc_skin_color__cache[17]
|
|
|
|
#define ERROR_TITLE mc_skin_color__cache[18]
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2009-09-10 16:14:18 +04:00
|
|
|
/* Menu colors */
|
2010-10-12 13:33:09 +04:00
|
|
|
#define MENU_ENTRY_COLOR mc_skin_color__cache[19]
|
|
|
|
#define MENU_SELECTED_COLOR mc_skin_color__cache[20]
|
|
|
|
#define MENU_HOT_COLOR mc_skin_color__cache[21]
|
|
|
|
#define MENU_HOTSEL_COLOR mc_skin_color__cache[22]
|
|
|
|
#define MENU_INACTIVE_COLOR mc_skin_color__cache[23]
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2010-11-29 21:46:11 +03:00
|
|
|
/* Popup menu colors */
|
|
|
|
#define PMENU_ENTRY_COLOR mc_skin_color__cache[24]
|
|
|
|
#define PMENU_SELECTED_COLOR mc_skin_color__cache[25]
|
2011-01-16 03:13:48 +03:00
|
|
|
#define PMENU_HOT_COLOR mc_skin_color__cache[26] /* unused: not implemented yet */
|
|
|
|
#define PMENU_HOTSEL_COLOR mc_skin_color__cache[27] /* unused: not implemented yet */
|
2010-11-29 21:46:11 +03:00
|
|
|
#define PMENU_TITLE_COLOR mc_skin_color__cache[28]
|
2010-11-11 14:05:34 +03:00
|
|
|
|
2010-11-29 21:46:11 +03:00
|
|
|
#define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[29]
|
|
|
|
#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[30]
|
|
|
|
|
|
|
|
#define STATUSBAR_COLOR mc_skin_color__cache[31]
|
2010-11-11 14:05:34 +03:00
|
|
|
|
2009-09-04 18:22:49 +04:00
|
|
|
/*
|
|
|
|
* This should be selectable independently. Default has to be black background
|
|
|
|
* foreground does not matter at all.
|
|
|
|
*/
|
2010-11-29 21:46:11 +03:00
|
|
|
#define GAUGE_COLOR mc_skin_color__cache[32]
|
|
|
|
#define INPUT_COLOR mc_skin_color__cache[33]
|
|
|
|
#define INPUT_UNCHANGED_COLOR mc_skin_color__cache[34]
|
|
|
|
#define INPUT_MARK_COLOR mc_skin_color__cache[35]
|
|
|
|
#define INPUT_HISTORY_COLOR mc_skin_color__cache[36]
|
|
|
|
#define COMMAND_HISTORY_COLOR mc_skin_color__cache[37]
|
2009-09-10 16:14:18 +04:00
|
|
|
|
2010-11-29 21:46:11 +03:00
|
|
|
#define HELP_NORMAL_COLOR mc_skin_color__cache[38]
|
|
|
|
#define HELP_ITALIC_COLOR mc_skin_color__cache[39]
|
|
|
|
#define HELP_BOLD_COLOR mc_skin_color__cache[40]
|
|
|
|
#define HELP_LINK_COLOR mc_skin_color__cache[41]
|
|
|
|
#define HELP_SLINK_COLOR mc_skin_color__cache[42]
|
|
|
|
#define HELP_TITLE_COLOR mc_skin_color__cache[43]
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2010-10-12 13:33:09 +04:00
|
|
|
|
2014-05-02 10:22:34 +04:00
|
|
|
#define VIEW_NORMAL_COLOR mc_skin_color__cache[44]
|
|
|
|
#define VIEW_BOLD_COLOR mc_skin_color__cache[45]
|
|
|
|
#define VIEW_UNDERLINED_COLOR mc_skin_color__cache[46]
|
|
|
|
#define VIEW_SELECTED_COLOR mc_skin_color__cache[47]
|
2009-09-04 18:22:49 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* editor colors - only 4 for normal, search->found, select, and whitespace
|
|
|
|
* respectively
|
|
|
|
* Last is defined to view color.
|
|
|
|
*/
|
2014-05-02 10:22:34 +04:00
|
|
|
#define EDITOR_NORMAL_COLOR mc_skin_color__cache[48]
|
|
|
|
#define EDITOR_BOLD_COLOR mc_skin_color__cache[49]
|
|
|
|
#define EDITOR_MARKED_COLOR mc_skin_color__cache[50]
|
|
|
|
#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[51]
|
|
|
|
#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[52]
|
|
|
|
#define EDITOR_BACKGROUND mc_skin_color__cache[53]
|
|
|
|
#define EDITOR_FRAME mc_skin_color__cache[54]
|
|
|
|
#define EDITOR_FRAME_ACTIVE mc_skin_color__cache[55]
|
|
|
|
#define EDITOR_FRAME_DRAG mc_skin_color__cache[56]
|
2009-09-04 18:22:49 +04:00
|
|
|
/* color of left 8 char status per line */
|
2014-05-02 10:22:34 +04:00
|
|
|
#define LINE_STATE_COLOR mc_skin_color__cache[57]
|
|
|
|
#define BOOK_MARK_COLOR mc_skin_color__cache[58]
|
|
|
|
#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[59]
|
2009-10-28 17:18:06 +03:00
|
|
|
|
2010-03-03 16:09:15 +03:00
|
|
|
/* Diff colors */
|
2014-05-02 10:22:34 +04:00
|
|
|
#define DFF_ADD_COLOR mc_skin_color__cache[60]
|
|
|
|
#define DFF_CHG_COLOR mc_skin_color__cache[61]
|
|
|
|
#define DFF_CHH_COLOR mc_skin_color__cache[62]
|
|
|
|
#define DFF_CHD_COLOR mc_skin_color__cache[63]
|
|
|
|
#define DFF_DEL_COLOR mc_skin_color__cache[64]
|
|
|
|
#define DFF_ERROR_COLOR mc_skin_color__cache[65]
|
|
|
|
|
|
|
|
#define MC_SKIN_COLOR_CACHE_COUNT 66
|
2009-09-04 18:22:49 +04:00
|
|
|
|
|
|
|
/*** enums ***************************************************************************************/
|
|
|
|
|
|
|
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
|
|
|
|
2010-11-08 13:21:45 +03:00
|
|
|
typedef struct mc_skin_struct
|
|
|
|
{
|
2009-09-04 18:22:49 +04:00
|
|
|
gchar *name;
|
|
|
|
gchar *description;
|
|
|
|
mc_config_t *config;
|
|
|
|
GHashTable *colors;
|
2011-01-16 03:13:48 +03:00
|
|
|
gboolean have_256_colors;
|
2009-09-04 18:22:49 +04:00
|
|
|
} mc_skin_t;
|
|
|
|
|
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
|
|
|
|
extern int mc_skin_color__cache[];
|
2009-09-10 16:14:18 +04:00
|
|
|
extern mc_skin_t mc_skin__default;
|
2009-09-04 18:22:49 +04:00
|
|
|
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
|
2014-02-08 19:37:11 +04:00
|
|
|
gboolean mc_skin_init (const gchar * skin_override, GError ** error);
|
2009-09-14 17:43:03 +04:00
|
|
|
void mc_skin_deinit (void);
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2009-09-14 17:43:03 +04:00
|
|
|
int mc_skin_color_get (const gchar *, const gchar *);
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2009-09-14 17:43:03 +04:00
|
|
|
void mc_skin_lines_parse_ini_file (mc_skin_t *);
|
2009-09-04 18:22:49 +04:00
|
|
|
|
2010-11-08 13:21:45 +03:00
|
|
|
gchar *mc_skin_get (const gchar *, const gchar *, const gchar *);
|
2009-10-15 11:31:24 +04:00
|
|
|
|
2014-02-08 19:37:11 +04:00
|
|
|
GPtrArray *mc_skin_list (void);
|
|
|
|
|
2010-06-29 13:42:39 +04:00
|
|
|
#endif /* MC_SKIN_H */
|