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 /*** enums ***************************************************************************************/
  13 
  14 enum
  15 {
  16     /* Basic colors */
  17     CORE_DEFAULT_COLOR = TTY_COLOR_MAP_OFFSET,
  18     CORE_NORMAL_COLOR,
  19     CORE_MARKED_COLOR,
  20     CORE_SELECTED_COLOR,
  21     CORE_MARKED_SELECTED_COLOR,
  22     CORE_DISABLED_COLOR,
  23     CORE_REVERSE_COLOR,
  24     CORE_HINTBAR_COLOR,
  25     CORE_SHELLPROMPT_COLOR,
  26     CORE_COMMANDLINE_COLOR,
  27     CORE_COMMANDLINE_MARK_COLOR,
  28     CORE_HEADER_COLOR,
  29     CORE_SHADOW_COLOR,
  30     CORE_FRAME_COLOR,
  31 
  32     /* Dialog colors */
  33     DIALOG_NORMAL_COLOR,
  34     DIALOG_FOCUS_COLOR,
  35     DIALOG_HOT_NORMAL_COLOR,
  36     DIALOG_HOT_FOCUS_COLOR,
  37     DIALOG_SELECTED_NORMAL_COLOR,
  38     DIALOG_SELECTED_FOCUS_COLOR,
  39     DIALOG_TITLE_COLOR,
  40     DIALOG_FRAME_COLOR,
  41 
  42     /* Error dialog colors */
  43     ERROR_NORMAL_COLOR,
  44     ERROR_FOCUS_COLOR,
  45     ERROR_HOT_NORMAL_COLOR,
  46     ERROR_HOT_FOCUS_COLOR,
  47     ERROR_TITLE_COLOR,
  48     ERROR_FRAME_COLOR,
  49 
  50     /* File highlight default color, the rest are constructed dynamically */
  51     FILEHIGHLIGHT_DEFAULT_COLOR,
  52 
  53     /* Menu colors */
  54     MENU_ENTRY_COLOR,
  55     MENU_SELECTED_COLOR,
  56     MENU_HOT_COLOR,
  57     MENU_HOTSEL_COLOR,
  58     MENU_INACTIVE_COLOR,
  59     MENU_FRAME_COLOR,
  60 
  61     /* Popup menu colors */
  62     PMENU_ENTRY_COLOR,
  63     PMENU_SELECTED_COLOR,
  64     PMENU_HOT_COLOR,     // unused: not implemented yet
  65     PMENU_HOTSEL_COLOR,  // unused: not implemented yet
  66     PMENU_TITLE_COLOR,
  67     PMENU_FRAME_COLOR,
  68 
  69     BUTTONBAR_HOTKEY_COLOR,
  70     BUTTONBAR_BUTTON_COLOR,
  71 
  72     STATUSBAR_COLOR,
  73 
  74     /*
  75      * This should be selectable independently. Default has to be black background
  76      * foreground does not matter at all.
  77      */
  78     CORE_GAUGE_COLOR,
  79     CORE_INPUT_COLOR,
  80     CORE_INPUT_UNCHANGED_COLOR,
  81     CORE_INPUT_MARK_COLOR,
  82     CORE_INPUT_HISTORY_COLOR,
  83     CORE_COMMAND_HISTORY_COLOR,
  84 
  85     HELP_NORMAL_COLOR,
  86     HELP_ITALIC_COLOR,
  87     HELP_BOLD_COLOR,
  88     HELP_LINK_COLOR,
  89     HELP_SLINK_COLOR,
  90     HELP_TITLE_COLOR,
  91     HELP_FRAME_COLOR,
  92 
  93     VIEWER_NORMAL_COLOR,
  94     VIEWER_BOLD_COLOR,
  95     VIEWER_UNDERLINED_COLOR,
  96     VIEWER_BOLD_UNDERLINED_COLOR,
  97     VIEWER_SELECTED_COLOR,
  98     VIEWER_FRAME_COLOR,
  99 
 100     /*
 101      * editor colors - only 4 for normal, search->found, select, and whitespace
 102      * respectively
 103      * Last is defined to view color.
 104      */
 105     EDITOR_NORMAL_COLOR,
 106     EDITOR_NONPRINTABLE_COLOR,
 107     EDITOR_BOLD_COLOR,
 108     EDITOR_MARKED_COLOR,
 109     EDITOR_WHITESPACE_COLOR,
 110     EDITOR_RIGHT_MARGIN_COLOR,
 111     EDITOR_BACKGROUND_COLOR,
 112     EDITOR_FRAME_COLOR,
 113     EDITOR_FRAME_ACTIVE_COLOR,
 114     EDITOR_FRAME_DRAG_COLOR,
 115     /* color of left 8 char status per line */
 116     EDITOR_LINE_STATE_COLOR,
 117     EDITOR_BOOKMARK_COLOR,
 118     EDITOR_BOOKMARK_FOUND_COLOR,
 119 
 120     /* Diff colors */
 121     DIFFVIEWER_ADDED_COLOR,
 122     DIFFVIEWER_CHANGEDLINE_COLOR,
 123     DIFFVIEWER_CHANGEDNEW_COLOR,
 124     DIFFVIEWER_CHANGED_COLOR,
 125     DIFFVIEWER_REMOVED_COLOR,
 126     DIFFVIEWER_ERROR_COLOR,
 127 
 128     COLOR_MAP_NEXT
 129 };
 130 
 131 #define COLOR_MAP_SIZE (COLOR_MAP_NEXT - TTY_COLOR_MAP_OFFSET)
 132 
 133 /*** structures declarations (and typedefs of structures)*****************************************/
 134 
 135 typedef struct mc_skin_struct
 136 {
 137     gchar *name;
 138     gchar *description;
 139     mc_config_t *config;
 140     GHashTable *colors;
 141     gboolean have_256_colors;
 142     gboolean have_true_colors;
 143 } mc_skin_t;
 144 
 145 /*** global variables defined in .c file *********************************************************/
 146 
 147 extern mc_skin_t mc_skin__default;
 148 
 149 /*** declarations of public functions ************************************************************/
 150 
 151 gboolean mc_skin_init (const gchar *skin_override, GError **error);
 152 void mc_skin_deinit (void);
 153 
 154 int mc_skin_color_get (const gchar *group, const gchar *name);
 155 
 156 void mc_skin_lines_parse_ini_file (mc_skin_t *mc_skin);
 157 
 158 gchar *mc_skin_get (const gchar *group, const gchar *key, const gchar *default_value);
 159 
 160 GPtrArray *mc_skin_list (void);
 161 
 162 #endif

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