mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
329ef3846a
added src/diffviewer/ydiff.[ch] into project tree added entry 'View diff files' into 'Command' menu added 'diffviewer' color pairs fixed Makefile and configure.am added new binding CmdDiffView into '[main]' section Big thanx to 'Daniel Borca <dborca@yahoo.com>' for ydiff Signed-off-by: Ilia Maslakov <il.smind@gmail.com> Added diffviewer own library Signed-off-by: Slava Zanko <slavazanko@gmail.com> Fixed CFLAGS for diffviewer. Signed-off-by: Andrew Borodin <aborodin@vmail.ru> changed skins, added section [diffviewer] added= changedline= changednew= changed= removed= folder= error= Signed-off-by: Ilia Maslakov <il.smind@gmail.com> Reimplementation of hardcoded shortcuts to keybindings. Signed-off-by: Ilia Maslakov <il.smind@gmail.com> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
117 lines
4.0 KiB
C
117 lines
4.0 KiB
C
#ifndef MC__SKIN_H
|
|
#define MC__SKIN_H
|
|
|
|
#include "lib/global.h"
|
|
|
|
#include "lib/mcconfig.h"
|
|
|
|
#include "lib/tty/color.h"
|
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
/* Beware! When using Slang with color, not all the indexes are free.
|
|
See color-slang.h (A_*) */
|
|
|
|
/* cache often used colors*/
|
|
#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]
|
|
#define REVERSE_COLOR mc_skin_color__cache[5]
|
|
|
|
/* Dialog colors */
|
|
#define COLOR_NORMAL mc_skin_color__cache[6]
|
|
#define COLOR_FOCUS mc_skin_color__cache[7]
|
|
#define COLOR_HOT_NORMAL mc_skin_color__cache[8]
|
|
#define COLOR_HOT_FOCUS mc_skin_color__cache[9]
|
|
|
|
/* Error dialog colors */
|
|
#define ERROR_COLOR mc_skin_color__cache[10]
|
|
#define ERROR_HOT_NORMAL mc_skin_color__cache[11]
|
|
#define ERROR_HOT_FOCUS mc_skin_color__cache[12]
|
|
|
|
/* Menu colors */
|
|
#define MENU_ENTRY_COLOR mc_skin_color__cache[13]
|
|
#define MENU_SELECTED_COLOR mc_skin_color__cache[14]
|
|
#define MENU_HOT_COLOR mc_skin_color__cache[15]
|
|
#define MENU_HOTSEL_COLOR mc_skin_color__cache[16]
|
|
#define MENU_INACTIVE_COLOR mc_skin_color__cache[17]
|
|
|
|
/*
|
|
* This should be selectable independently. Default has to be black background
|
|
* foreground does not matter at all.
|
|
*/
|
|
#define GAUGE_COLOR mc_skin_color__cache[18]
|
|
#define INPUT_COLOR mc_skin_color__cache[19]
|
|
|
|
#define HELP_NORMAL_COLOR mc_skin_color__cache[20]
|
|
#define HELP_ITALIC_COLOR mc_skin_color__cache[21]
|
|
#define HELP_BOLD_COLOR mc_skin_color__cache[22]
|
|
#define HELP_LINK_COLOR mc_skin_color__cache[23]
|
|
#define HELP_SLINK_COLOR mc_skin_color__cache[24]
|
|
|
|
#define VIEW_UNDERLINED_COLOR mc_skin_color__cache[25]
|
|
|
|
/*
|
|
* editor colors - only 4 for normal, search->found, select, and whitespace
|
|
* respectively
|
|
* Last is defined to view color.
|
|
*/
|
|
#define EDITOR_NORMAL_COLOR mc_skin_color__cache[26]
|
|
#define EDITOR_BOLD_COLOR mc_skin_color__cache[27]
|
|
#define EDITOR_MARKED_COLOR mc_skin_color__cache[28]
|
|
#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[29]
|
|
#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[30]
|
|
/* color of left 8 char status per line */
|
|
#define LINE_STATE_COLOR mc_skin_color__cache[31]
|
|
#define BOOK_MARK_COLOR mc_skin_color__cache[32]
|
|
#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[33]
|
|
|
|
#define BUTTONBAR_HOTKEY_COLOR mc_skin_color__cache[34]
|
|
#define BUTTONBAR_BUTTON_COLOR mc_skin_color__cache[35]
|
|
|
|
/* Diff colors */
|
|
#define DFF_ADD_COLOR mc_skin_color__cache[36]
|
|
#define DFF_CHG_COLOR mc_skin_color__cache[37]
|
|
#define DFF_CHH_COLOR mc_skin_color__cache[38]
|
|
#define DFF_CHD_COLOR mc_skin_color__cache[39]
|
|
#define DFF_DEL_COLOR mc_skin_color__cache[40]
|
|
#define DFF_FOLDER_COLOR mc_skin_color__cache[41]
|
|
#define DFF_ERROR_COLOR mc_skin_color__cache[42]
|
|
|
|
|
|
|
|
#define MC_SKIN_COLOR_CACHE_COUNT 43
|
|
|
|
|
|
/*** enums ***************************************************************************************/
|
|
|
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
|
|
|
typedef struct mc_skin_struct {
|
|
gchar *name;
|
|
gchar *description;
|
|
mc_config_t *config;
|
|
GHashTable *colors;
|
|
} mc_skin_t;
|
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
extern int mc_skin_color__cache[];
|
|
extern mc_skin_t mc_skin__default;
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
gboolean mc_skin_init (GError **);
|
|
void mc_skin_deinit (void);
|
|
|
|
int mc_skin_color_get (const gchar *, const gchar *);
|
|
|
|
void mc_skin_lines_parse_ini_file (mc_skin_t *);
|
|
|
|
gchar *mc_skin_get(const gchar *, const gchar *, const gchar *);
|
|
|
|
|
|
#endif
|