1 /**
2  * @namespace   biew
3  * @file        colorset.h
4  * @brief       This file contains color function prototypes.
5  * @version     -
6  * @remark      this source file is part of Binary vIEW project (BIEW).
7  *              The Binary vIEW (BIEW) is copyright (C) 1995 Nickols_K.
8  *              All rights reserved. This software is redistributable under the
9  *              licence given in the file "Licence.en" ("Licence.ru" in russian
10  *              translation) distributed in the BIEW archive.
11  * @note        Requires POSIX compatible development system
12  *
13  * @author      Nickols_K
14  * @since       2000
15  * @note        Development, fixes and improvements
16 **/
17 #ifndef __COLORSET__H
18 #define __COLORSET__H
19 
20 #ifndef __TWIN_H
21 #include "biewlib/twin.h"
22 #endif
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 typedef struct tag_namedColorDef
29 {
30   const char  *name;
31   Color  color;
32 }namedColorDef;
33 
34 extern namedColorDef named_color_def[16];
35 
36 typedef struct tag_MultiEditCSet
37 {
38   ColorAttr  main;
39   ColorAttr  change;
40   ColorAttr  selected;
41 }MultiEditCSet;
42 
43 /** Browser window */
44 typedef struct tag_BrowserCSet
45 {
46   ColorAttr main;
47   ColorAttr bound;
48   ColorAttr hlight;
49   ColorAttr highline;
50   ColorAttr title;
51   ColorAttr footer;
52   ColorAttr scroller;
53   MultiEditCSet edit;
54 }BrowserCSet;
55 
56 extern BrowserCSet browser_cset;
57 
58 /** Prompt window */
59 typedef struct tag_PromptCSet
60 {
61   ColorAttr button;
62   ColorAttr digit;
63   ColorAttr control;
64 }PromptCSet;
65 
66 extern PromptCSet prompt_cset;
67 
68 /** Title window */
69 typedef struct tag_TitleCSet
70 {
71   ColorAttr main;
72   ColorAttr change;
73 }TitleCSet;
74 
75 extern TitleCSet title_cset;
76 
77 typedef struct tag_ButtonCSet
78 {
79   ColorAttr active;
80   ColorAttr focused;
81   ColorAttr disabled;
82 }ButtonCSet;
83 
84 /** message box */
85 typedef struct tag_MessageCSet
86 {
87   ColorAttr main;
88   ColorAttr border;
89   ButtonCSet button;
90 }MessageCSet;
91 
92 extern MessageCSet error_cset;
93 extern MessageCSet warn_cset;
94 extern MessageCSet notify_cset;
95 
96 /** Text highlight */
97 typedef struct tag_TextCSet
98 {
99   ColorAttr normal;
100   ColorAttr bold;
101   ColorAttr italic;
102   ColorAttr underline;
103   ColorAttr strikethrough;
104 }TextCSet;
105 
106 extern TextCSet text_cset;
107 
108 /** CPU highlight */
109 typedef struct tag_CPUCSet
110 {
111   ColorAttr clone[16];
112 }CPUCSet;
113 
114 typedef struct tag_EngineCSet
115 {
116   ColorAttr engine,engine_unopt;
117 }EngineCSet;
118 
119 /** Disassembler highlight */
120 typedef struct tag_DisasmCSet
121 {
122   ColorAttr family_id;
123   ColorAttr opcodes;
124   ColorAttr opcodes0;
125   ColorAttr opcodes1;
126   ColorAttr opcodes2;
127   ColorAttr opcodes3;
128   ColorAttr opcodes4;
129   ColorAttr opcodes5;
130   ColorAttr comments;
131   CPUCSet   cpu_cset[4];
132   EngineCSet engine[7];
133 }DisasmCSet;
134 
135 extern DisasmCSet disasm_cset;
136 
137 /** Programming highlight */
138 
139 typedef struct tag_PrgWordCSet
140 {
141     ColorAttr base;
142     ColorAttr extended;
143     ColorAttr reserved;
144     ColorAttr alt;
145 }PrgWordCSet;
146 
147 typedef struct tag_ProgCSet
148 {
149   ColorAttr bads;
150   PrgWordCSet comments;
151   PrgWordCSet keywords;
152   PrgWordCSet constants;
153   PrgWordCSet operators;
154   PrgWordCSet preproc;
155 }ProgCSet;
156 
157 extern ProgCSet prog_cset;
158 
159 typedef struct tag_EditorCSet
160 {
161   ColorAttr  active;
162   ColorAttr  focused;
163   ColorAttr  disabled;
164   ColorAttr  select;
165 }EditorCSet;
166 
167 
168 /** Dialog window */
169 typedef struct tag_DialogCSet
170 {
171   ColorAttr main;
172   ColorAttr border;
173   ColorAttr title;
174   ColorAttr footer;
175   ColorAttr selfooter;
176   ColorAttr entry;
177   ColorAttr altentry;
178   ColorAttr addinfo;
179   ColorAttr altinfo;
180   ColorAttr extrainfo;
181   ButtonCSet group;
182   ButtonCSet button;
183   ButtonCSet any;
184   EditorCSet editor;
185 }DialogCSet;
186 
187 extern DialogCSet dialog_cset;
188 
189 typedef struct tag_MenuCSet
190 {
191   ColorAttr  main;
192   ColorAttr  border;
193   ColorAttr  title;
194   ColorAttr  highlight;
195   ButtonCSet hotkey;
196   ButtonCSet item;
197 }MenuCSet;
198 
199 extern MenuCSet menu_cset;
200 
201 /** Help window */
202 typedef struct tag_HelpCSet
203 {
204   ColorAttr main;
205   ColorAttr border;
206   ColorAttr title;
207   ColorAttr bold;
208   ColorAttr italic;
209   ColorAttr reverse;
210   ColorAttr underline;
211   ColorAttr strikethrough;
212   ColorAttr link;
213   ColorAttr sellink;
214 }HelpCSet;
215 
216 extern HelpCSet help_cset;
217 
218 extern tBool   csetReadIniFile(const char *pal_name);
219 
220 #ifdef __cplusplus
221 }
222 #endif
223 
224 #endif
225