Manual pages: mcmcdiffmceditmcview

root/lib/skin.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 #ifndef MC_SKIN_H
   2 #define MC_SKIN_H
   3 
   4 #include "lib/global.h"
   5 
   6 #include "lib/mcconfig.h"
   7 
   8 #include "lib/tty/color.h"
   9 
  10 /*** typedefs(not structures) and defined constants **********************************************/
  11 
  12 /* Beware! When using Slang with color, not all the indexes are free.
  13    See color-slang.h (A_*) */
  14 
  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]
  24 #define HEADER_COLOR          mc_skin_color__cache[8]
  25 #define SHADOW_COLOR          mc_skin_color__cache[9]
  26 
  27 /* Dialog colors */
  28 #define COLOR_NORMAL          mc_skin_color__cache[10]
  29 #define COLOR_FOCUS           mc_skin_color__cache[11]
  30 #define COLOR_HOT_NORMAL      mc_skin_color__cache[12]
  31 #define COLOR_HOT_FOCUS       mc_skin_color__cache[13]
  32 #define COLOR_SELECTED_NORMAL mc_skin_color__cache[14]
  33 #define COLOR_SELECTED_FOCUS  mc_skin_color__cache[15]
  34 #define COLOR_TITLE           mc_skin_color__cache[16]
  35 
  36 /* Error dialog colors */
  37 #define ERROR_COLOR      mc_skin_color__cache[17]
  38 #define ERROR_FOCUS      mc_skin_color__cache[18]
  39 #define ERROR_HOT_NORMAL mc_skin_color__cache[19]
  40 #define ERROR_HOT_FOCUS  mc_skin_color__cache[20]
  41 #define ERROR_TITLE      mc_skin_color__cache[21]
  42 
  43 /* Menu colors */
  44 #define MENU_ENTRY_COLOR    mc_skin_color__cache[22]
  45 #define MENU_SELECTED_COLOR mc_skin_color__cache[23]
  46 #define MENU_HOT_COLOR      mc_skin_color__cache[24]
  47 #define MENU_HOTSEL_COLOR   mc_skin_color__cache[25]
  48 #define MENU_INACTIVE_COLOR mc_skin_color__cache[26]
  49 
  50 /* Popup menu colors */
  51 #define PMENU_ENTRY_COLOR      mc_skin_color__cache[27]
  52 #define PMENU_SELECTED_COLOR   mc_skin_color__cache[28]
  53 #define PMENU_HOT_COLOR        mc_skin_color__cache[29]  // unused: not implemented yet
  54 #define PMENU_HOTSEL_COLOR     mc_skin_color__cache[30]  // unused: not implemented yet
  55 #define PMENU_TITLE_COLOR      mc_skin_color__cache[31]
  56 
  57 #define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[32]
  58 #define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[33]
  59 
  60 #define STATUSBAR_COLOR        mc_skin_color__cache[34]
  61 
  62 /*
  63  * This should be selectable independently. Default has to be black background
  64  * foreground does not matter at all.
  65  */
  66 #define GAUGE_COLOR           mc_skin_color__cache[35]
  67 #define INPUT_COLOR           mc_skin_color__cache[36]
  68 #define INPUT_UNCHANGED_COLOR mc_skin_color__cache[37]
  69 #define INPUT_MARK_COLOR      mc_skin_color__cache[38]
  70 #define INPUT_HISTORY_COLOR   mc_skin_color__cache[39]
  71 #define COMMAND_HISTORY_COLOR mc_skin_color__cache[40]
  72 
  73 #define HELP_NORMAL_COLOR     mc_skin_color__cache[41]
  74 #define HELP_ITALIC_COLOR     mc_skin_color__cache[42]
  75 #define HELP_BOLD_COLOR       mc_skin_color__cache[43]
  76 #define HELP_LINK_COLOR       mc_skin_color__cache[44]
  77 #define HELP_SLINK_COLOR      mc_skin_color__cache[45]
  78 #define HELP_TITLE_COLOR      mc_skin_color__cache[46]
  79 
  80 #define VIEW_NORMAL_COLOR     mc_skin_color__cache[47]
  81 #define VIEW_BOLD_COLOR       mc_skin_color__cache[48]
  82 #define VIEW_UNDERLINED_COLOR mc_skin_color__cache[49]
  83 #define VIEW_SELECTED_COLOR   mc_skin_color__cache[50]
  84 
  85 /*
  86  * editor colors - only 4 for normal, search->found, select, and whitespace
  87  * respectively
  88  * Last is defined to view color.
  89  */
  90 #define EDITOR_NORMAL_COLOR       mc_skin_color__cache[51]
  91 #define EDITOR_NONPRINTABLE_COLOR mc_skin_color__cache[52]
  92 #define EDITOR_BOLD_COLOR         mc_skin_color__cache[53]
  93 #define EDITOR_MARKED_COLOR       mc_skin_color__cache[54]
  94 #define EDITOR_WHITESPACE_COLOR   mc_skin_color__cache[55]
  95 #define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[56]
  96 #define EDITOR_BACKGROUND         mc_skin_color__cache[57]
  97 #define EDITOR_FRAME              mc_skin_color__cache[58]
  98 #define EDITOR_FRAME_ACTIVE       mc_skin_color__cache[59]
  99 #define EDITOR_FRAME_DRAG         mc_skin_color__cache[60]
 100 /* color of left 8 char status per line */
 101 #define LINE_STATE_COLOR      mc_skin_color__cache[61]
 102 #define BOOK_MARK_COLOR       mc_skin_color__cache[62]
 103 #define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[63]
 104 
 105 /* Diff colors */
 106 #define DFF_ADD_COLOR             mc_skin_color__cache[64]
 107 #define DFF_CHG_COLOR             mc_skin_color__cache[65]
 108 #define DFF_CHH_COLOR             mc_skin_color__cache[66]
 109 #define DFF_CHD_COLOR             mc_skin_color__cache[67]
 110 #define DFF_DEL_COLOR             mc_skin_color__cache[68]
 111 #define DFF_ERROR_COLOR           mc_skin_color__cache[69]
 112 
 113 #define MC_SKIN_COLOR_CACHE_COUNT 70
 114 
 115 /*** enums ***************************************************************************************/
 116 
 117 /*** structures declarations (and typedefs of structures)*****************************************/
 118 
 119 typedef struct mc_skin_struct
 120 {
 121     gchar *name;
 122     gchar *description;
 123     mc_config_t *config;
 124     GHashTable *colors;
 125     gboolean have_256_colors;
 126     gboolean have_true_colors;
 127 } mc_skin_t;
 128 
 129 /*** global variables defined in .c file *********************************************************/
 130 
 131 extern int mc_skin_color__cache[];
 132 extern mc_skin_t mc_skin__default;
 133 
 134 /*** declarations of public functions ************************************************************/
 135 
 136 gboolean mc_skin_init (const gchar *skin_override, GError **error);
 137 void mc_skin_deinit (void);
 138 
 139 int mc_skin_color_get (const gchar *group, const gchar *name);
 140 
 141 void mc_skin_lines_parse_ini_file (mc_skin_t *mc_skin);
 142 
 143 gchar *mc_skin_get (const gchar *group, const gchar *key, const gchar *default_value);
 144 
 145 GPtrArray *mc_skin_list (void);
 146 
 147 #endif

/* [previous][next][first][last][top][bottom][index][help]  */