* New version 2.21.999
[alpine.git] / alpine / colorconf.h
blob0028fabf16d78e5f0fb33a87d41f7663ba3a0633
1 /*
2 * $Id: colorconf.h 769 2007-10-24 00:15:40Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2018 Eduardo Chappa
6 * Copyright 2006-2007 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PINE_COLORCONF_INCLUDED
18 #define PINE_COLORCONF_INCLUDED
21 #include "conftype.h"
22 #include "../pith/state.h"
23 #include "../pith/conf.h"
26 #define HEADER_WORD "Header "
27 #define TOKEN_WORD "Index Token "
28 #define KW_COLORS_HDR "KEYWORD COLORS"
29 #define HDR_COLORS "HEADER COLORS"
30 #define ADDHEADER_COMMENT N_("[ Use the AddHeader command to add colored headers in MESSAGE TEXT screen ]")
31 #define ADDINDEXTOKEN_COMMENT N_("[ Use the IndxHdr command to add colored tokens in MESSAGE INDEX screen ]")
32 #define EQ_COL 37
34 #define SPACE_BETWEEN_DOUBLEVARS 3
35 #define SAMPLE_LEADER "---------------------------"
36 #define SAMP1 "[Sample ]"
37 #define SAMP2 "[Default]"
38 #define SAMPEXC "[Exception]"
39 #define SBS 1 /* space between samples */
40 #define COLOR_BLOB "< >"
41 #define COLOR_BLOB_TRAN "<TRAN>"
42 #define COLOR_BLOB_NORM "<NORM>"
43 #define COLOR_BLOB_NONE "<NONE>"
44 #define COLOR_BLOB_LEN 6
45 #define COLOR_INDENT 3
46 #define COLORNOSET " [ Colors below may not be set until color is turned on above ]"
50 * The CONF_S's varmem field serves dual purposes. The low two bytes
51 * are reserved for the pre-defined color index (though only 8 are
52 * defined for the nonce, and the high order bits are for the index
53 * of the particular SPEC_COLOR_S this CONF_S is associated with.
54 * Capiche?
56 #define CFC_ICOLOR(V) ((V)->varmem & 0xffff)
57 #define CFC_ICUST(V) ((V)->varmem >> 16)
58 #define CFC_SET_COLOR(I, C) (((I) << 16) | (C))
59 #define CFC_ICUST_INC(V) CFC_SET_COLOR(CFC_ICUST(V) + 1, CFC_ICOLOR(V))
60 #define CFC_ICUST_DEC(V) CFC_SET_COLOR(CFC_ICUST(V) - 1, CFC_ICOLOR(V))
62 #define CFC_ICOLOR_NORM (1000)
63 #define CFC_ICOLOR_NONE (1001)
66 extern int treat_color_vars_as_text;
69 /* exported protoypes */
70 void color_config_screen(struct pine *, int);
71 int color_setting_tool(struct pine *, int, CONF_S **, unsigned);
72 char *sampleexc_text(struct pine *, struct variable *);
73 int color_related_var(struct pine *, struct variable *);
74 int color_holding_var(struct pine *, struct variable *);
75 char *sample_text(struct pine *, struct variable *);
76 char *color_parenthetical(struct variable *);
77 void add_color_setting_disp(struct pine *, CONF_S **, struct variable *, CONF_S *,
78 struct key_menu *, struct key_menu *, HelpType,
79 int, int, char *, char *, int);
82 #endif /* PINE_COLORCONF_INCLUDED */