Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef COLOR_H
00006 #define COLOR_H
00007
00008 #ifdef MENU_COLOR
00009 # ifdef MENU_COLOR_REGEX
00010 # include <regex.h>
00011 # endif
00012 #endif
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(VIDEOSHADES) || defined(WIN32CON)
00022 #define CLR_BLACK 0
00023 #else
00024 # define CLR_BLACK 8
00025 #endif
00026 #define CLR_RED 1
00027 #define CLR_GREEN 2
00028 #define CLR_BROWN 3
00029 #define CLR_BLUE 4
00030 #define CLR_MAGENTA 5
00031 #define CLR_CYAN 6
00032 #define CLR_GRAY 7
00033 #if !defined(VIDEOSHADES) || defined(WIN32CON)
00034 #define NO_COLOR 8
00035 #else
00036 # define NO_COLOR 0
00037 #endif
00038 #define CLR_ORANGE 9
00039 #define CLR_BRIGHT_GREEN 10
00040 #define CLR_YELLOW 11
00041 #define CLR_BRIGHT_BLUE 12
00042 #define CLR_BRIGHT_MAGENTA 13
00043 #define CLR_BRIGHT_CYAN 14
00044 #define CLR_WHITE 15
00045 #define CLR_MAX 16
00046
00047
00048
00049 #define BRIGHT 8
00050
00051
00052 #define HI_OBJ CLR_MAGENTA
00053 #define HI_METAL CLR_CYAN
00054 #define HI_COPPER CLR_YELLOW
00055 #define HI_SILVER CLR_GRAY
00056 #define HI_GOLD CLR_YELLOW
00057 #define HI_LEATHER CLR_BROWN
00058 #define HI_CLOTH CLR_BROWN
00059 #define HI_ORGANIC CLR_BROWN
00060 #define HI_WOOD CLR_BROWN
00061 #define HI_PAPER CLR_WHITE
00062 #define HI_GLASS CLR_BRIGHT_CYAN
00063 #define HI_MINERAL CLR_GRAY
00064 #define DRAGON_SILVER CLR_BRIGHT_CYAN
00065 #define HI_ZAP CLR_BRIGHT_BLUE
00066
00067 #ifdef MENU_COLOR
00068 struct menucoloring {
00069 # ifdef MENU_COLOR_REGEX
00070 # ifdef MENU_COLOR_REGEX_POSIX
00071 regex_t match;
00072 # else
00073 struct re_pattern_buffer match;
00074 # endif
00075 # else
00076 char *match;
00077 # endif
00078 int color, attr;
00079 struct menucoloring *next;
00080 };
00081 #endif
00082
00083 #ifdef STATUS_COLORS
00084 struct color_option {
00085 int color;
00086 int attr_bits;
00087 };
00088
00089 struct percent_color_option {
00090 int percentage;
00091 struct color_option color_option;
00092 const struct percent_color_option *next;
00093 };
00094
00095 struct text_color_option {
00096 const char *text;
00097 struct color_option color_option;
00098 const struct text_color_option *next;
00099 };
00100 #endif
00101
00102 #ifndef MSDOS
00103 extern int ttycolors[CLR_MAX];
00104 #endif
00105
00106 #endif