Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 70 lines (66 sloc) 3.51 kb
9f1c6f0 @mbert Import Elvis 2.2_0 (written by Steve Kirkendall)
authored
1 /* color.h */
2
3 typedef struct
4 {
5 CHAR *name; /* name of this role */
6 CHAR *descr; /* args of original :color command */
7 long fg; /* foreground color code */
8 long bg; /* background color code */
9 char like; /* "like" index, or 0 for nothing */
10 unsigned char lpfg_rgb[3]; /* foreground when printing hardcopy */
11 DRAWATTR da; /* RGB colors & bitmap of attributes */
12 } COLORINFO;
13 #define COLOR_BOLD 0x0001 /* add the bold attribute to the font */
14 #define COLOR_ITALIC 0x0002 /* add the italic attribute to the font */
15 #define COLOR_UNDERLINED 0x0004 /* draw a line under the text */
16 #define COLOR_BOXED 0x0008 /* draw a box around the text */
17 #define COLOR_GRAPHIC 0x0010 /* replace text with graphical chars */
18 #define COLOR_PROP 0x0020 /* use proportionally-spaced font */
19 #define COLOR_PROPSET 0x0040 /* don't inherit the COLOR_PROP flag */
20 #define COLOR_SET 0x0080 /* attributes were explicitly set by the user */
21 #define COLOR_FG 0x0100 /* fg field contains a foreground color */
22 #define COLOR_BG 0x0200 /* bg field contains a background color */
23 #define COLOR_FGSET 0x0400 /* don't inherit the foreground color */
24 #define COLOR_BGSET 0x0800 /* don't inherit the background color */
25 #define COLOR_LEFTBOX 0x1000 /* boxed text should draw left edge */
26 #define COLOR_RIGHTBOX 0x2000 /* boxed text should draw the right edge */
27 #define COLOR_SEL 0x4000 /* text is "selected", in draw.c */
28
29 /* Some special font codes */
30 #define COLOR_FONT_NORMAL 1 /* normal colors */
31 #define COLOR_FONT_IDLE 2 /* colors for idle screen */
32 #define COLOR_FONT_BOTTOM 3 /* the bottom row of the window */
33 #define COLOR_FONT_SELECTION 4 /* colors for selections */
34 #define COLOR_FONT_HLSEARCH 5 /* colors for hlsearch option */
35 #define COLOR_FONT_RULER 6 /* colors of the ruler, in text gui */
36 #define COLOR_FONT_SHOWMODE 7 /* colors of the showmode, in text gui*/
37 #define COLOR_FONT_LNUM 8 /* colors of the line numbers "lnum" */
38 #define COLOR_FONT_NONTEXT 9 /* non-text characters such "~" lines */
39 #define COLOR_FONT_QTY_SPECIALS 10 /* first non-special font code */
40 /* NOTE: If you add any more special fonts here, you must increase the
41 * COLOR_FONT_QTY_SPECIALS value, append your new value to the colorinfo[]
42 * definition in color.c, and adjust the colorsortorder[] array in color.c
43 */
44
45 extern COLORINFO colorinfo[128];
46 extern int colorsortorder[128];
47 extern int colornpermanent;
48 #ifdef FEATURE_IMAGE
49 extern char *colorimage P_((CHAR *bgname));
50 #endif
51 extern int colorisbg P_((OPTDESC *desc, OPTVAL *val, CHAR *newval));
52 extern int colorfind P_((CHAR *fontname));
53 extern COLORINFO *colorcombine P_((int oldfont, COLORINFO *newcinfo));
54 extern void colorparse P_((CHAR *descr, CHAR **fgref, CHAR **bgref, CHAR **likeref, unsigned short *bitsref));
55 extern void colorset P_((int fontcode, CHAR *descr, ELVBOOL explicit));
56 extern void colorforeign P_((CHAR *name, CHAR *descr));
57 extern void colorsetup P_((void));
58 extern int colortmp P_((int oldfont, int newfont));
59 extern void colorlist P_((WINDOW win, CHAR *name, ELVBOOL implicit));
60 #ifdef FEATURE_MKEXRC
61 extern void colorsave P_((BUFFER buf));
62 #endif
63 #ifdef FEATURE_COMPLETE
64 extern CHAR *colorcomplete P_((WINDOW win, MARK from, MARK to, ELVBOOL nameonly));
65 #endif
66 extern _char_ colorexpose P_((_char_ font, DRAWATTR *refattr));
67 extern int colorrgb2ansi P_((ELVBOOL isfg, unsigned char *rgb));
68 extern ELVBOOL coloransi P_((int fontcode, CHAR *name, ELVBOOL isfg, long *colorptr, unsigned char *rgb));
69 extern char *colorname P_((long ansi));
Something went wrong with that request. Please try again.