1 /* mswindows-specific Lisp objects.
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
3 Copyright (C) 1995 Board of Trustees, University of Illinois.
4 Copyright (C) 1995 Tinker Systems.
5 Copyright (C) 1995, 1996 Ben Wing.
6 Copyright (C) 1995 Sun Microsystems, Inc.
7 Copyright (C) 1997 Jonathan Harris.
9 This file is part of XEmacs.
11 XEmacs is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2, or (at your option) any
16 XEmacs is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with XEmacs; see the file COPYING. If not, write to
23 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. */
26 /* Synched up with: Not in FSF. */
30 Jamie Zawinski, Chuck Thompson, Ben Wing
31 Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0.
35 /* TODO: palette handling */
41 #include "console-msw.h"
42 #include "objects-msw.h"
45 #include "character.h"
52 #if (defined(__CYGWIN32__) || defined(__MINGW32__)) && \
53 CYGWIN_VERSION_DLL_MAJOR < 21
54 #define stricmp strcasecmp
55 #define FONTENUMPROC FONTENUMEXPROC
59 typedef struct colormap_t
65 /* Colors from X11R6 "XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp" */
66 /* MSWindows tends to round up the numbers in it's palette, ie where X uses
67 * 127, MSWindows uses 128. Colors commented as "Adjusted" are tweaked to
68 * match the Windows standard palette to increase the likelyhood of
69 * mswindows_color_to_string() finding a named match.
71 static const colormap_t mswindows_X_color_map[] =
73 {"white" , PALETTERGB (255, 255, 255) },
74 {"black" , PALETTERGB (0, 0, 0) },
75 {"snow" , PALETTERGB (255, 250, 250) },
76 {"GhostWhite" , PALETTERGB (248, 248, 255) },
77 {"WhiteSmoke" , PALETTERGB (245, 245, 245) },
78 {"gainsboro" , PALETTERGB (220, 220, 220) },
79 {"FloralWhite" , PALETTERGB (255, 250, 240) },
80 {"OldLace" , PALETTERGB (253, 245, 230) },
81 {"linen" , PALETTERGB (250, 240, 230) },
82 {"AntiqueWhite" , PALETTERGB (250, 235, 215) },
83 {"PapayaWhip" , PALETTERGB (255, 239, 213) },
84 {"BlanchedAlmond" , PALETTERGB (255, 235, 205) },
85 {"bisque" , PALETTERGB (255, 228, 196) },
86 {"PeachPuff" , PALETTERGB (255, 218, 185) },
87 {"NavajoWhite" , PALETTERGB (255, 222, 173) },
88 {"moccasin" , PALETTERGB (255, 228, 181) },
89 {"cornsilk" , PALETTERGB (255, 248, 220) },
90 {"ivory" , PALETTERGB (255, 255, 240) },
91 {"LemonChiffon" , PALETTERGB (255, 250, 205) },
92 {"seashell" , PALETTERGB (255, 245, 238) },
93 {"honeydew" , PALETTERGB (240, 255, 240) },
94 {"MintCream" , PALETTERGB (245, 255, 250) },
95 {"azure" , PALETTERGB (240, 255, 255) },
96 {"AliceBlue" , PALETTERGB (240, 248, 255) },
97 {"lavender" , PALETTERGB (230, 230, 250) },
98 {"LavenderBlush" , PALETTERGB (255, 240, 245) },
99 {"MistyRose" , PALETTERGB (255, 228, 225) },
100 {"DarkSlateGray" , PALETTERGB (47, 79, 79) },
101 {"DarkSlateGrey" , PALETTERGB (47, 79, 79) },
102 {"DimGray" , PALETTERGB (105, 105, 105) },
103 {"DimGrey" , PALETTERGB (105, 105, 105) },
104 {"SlateGray" , PALETTERGB (112, 128, 144) },
105 {"SlateGrey" , PALETTERGB (112, 128, 144) },
106 {"LightSlateGray" , PALETTERGB (119, 136, 153) },
107 {"LightSlateGrey" , PALETTERGB (119, 136, 153) },
108 {"gray" , PALETTERGB (190, 190, 190) },
109 {"grey" , PALETTERGB (190, 190, 190) },
110 {"LightGrey" , PALETTERGB (211, 211, 211) },
111 {"LightGray" , PALETTERGB (211, 211, 211) },
112 {"MidnightBlue" , PALETTERGB (25, 25, 112) },
113 {"navy" , PALETTERGB (0, 0, 128) },
114 {"NavyBlue" , PALETTERGB (0, 0, 128) },
115 {"CornflowerBlue" , PALETTERGB (100, 149, 237) },
116 {"DarkSlateBlue" , PALETTERGB (72, 61, 139) },
117 {"SlateBlue" , PALETTERGB (106, 90, 205) },
118 {"MediumSlateBlue" , PALETTERGB (123, 104, 238) },
119 {"LightSlateBlue" , PALETTERGB (132, 112, 255) },
120 {"MediumBlue" , PALETTERGB (0, 0, 205) },
121 {"RoyalBlue" , PALETTERGB (65, 105, 225) },
122 {"blue" , PALETTERGB (0, 0, 255) },
123 {"DodgerBlue" , PALETTERGB (30, 144, 255) },
124 {"DeepSkyBlue" , PALETTERGB (0, 191, 255) },
125 {"SkyBlue" , PALETTERGB (135, 206, 235) },
126 {"LightSkyBlue" , PALETTERGB (135, 206, 250) },
127 {"SteelBlue" , PALETTERGB (70, 130, 180) },
128 {"LightSteelBlue" , PALETTERGB (176, 196, 222) },
129 {"LightBlue" , PALETTERGB (173, 216, 230) },
130 {"PowderBlue" , PALETTERGB (176, 224, 230) },
131 {"PaleTurquoise" , PALETTERGB (175, 238, 238) },
132 {"DarkTurquoise" , PALETTERGB (0, 206, 209) },
133 {"MediumTurquoise" , PALETTERGB (72, 209, 204) },
134 {"turquoise" , PALETTERGB (64, 224, 208) },
135 {"cyan" , PALETTERGB (0, 255, 255) },
136 {"LightCyan" , PALETTERGB (224, 255, 255) },
137 {"CadetBlue" , PALETTERGB (95, 158, 160) },
138 {"MediumAquamarine" , PALETTERGB (102, 205, 170) },
139 {"aquamarine" , PALETTERGB (127, 255, 212) },
140 {"DarkGreen" , PALETTERGB (0, 128, 0) }, /* Adjusted */
141 {"DarkOliveGreen" , PALETTERGB (85, 107, 47) },
142 {"DarkSeaGreen" , PALETTERGB (143, 188, 143) },
143 {"SeaGreen" , PALETTERGB (46, 139, 87) },
144 {"MediumSeaGreen" , PALETTERGB (60, 179, 113) },
145 {"LightSeaGreen" , PALETTERGB (32, 178, 170) },
146 {"PaleGreen" , PALETTERGB (152, 251, 152) },
147 {"SpringGreen" , PALETTERGB (0, 255, 127) },
148 {"LawnGreen" , PALETTERGB (124, 252, 0) },
149 {"green" , PALETTERGB (0, 255, 0) },
150 {"chartreuse" , PALETTERGB (127, 255, 0) },
151 {"MediumSpringGreen" , PALETTERGB (0, 250, 154) },
152 {"GreenYellow" , PALETTERGB (173, 255, 47) },
153 {"LimeGreen" , PALETTERGB (50, 205, 50) },
154 {"YellowGreen" , PALETTERGB (154, 205, 50) },
155 {"ForestGreen" , PALETTERGB (34, 139, 34) },
156 {"OliveDrab" , PALETTERGB (107, 142, 35) },
157 {"DarkKhaki" , PALETTERGB (189, 183, 107) },
158 {"khaki" , PALETTERGB (240, 230, 140) },
159 {"PaleGoldenrod" , PALETTERGB (238, 232, 170) },
160 {"LightGoldenrodYellow", PALETTERGB (250, 250, 210) },
161 {"LightYellow" , PALETTERGB (255, 255, 224) },
162 {"LightYellow" , PALETTERGB (255, 255, 225) }, /* Adjusted */
163 {"yellow" , PALETTERGB (255, 255, 0) },
164 {"gold" , PALETTERGB (255, 215, 0) },
165 {"LightGoldenrod" , PALETTERGB (238, 221, 130) },
166 {"goldenrod" , PALETTERGB (218, 165, 32) },
167 {"DarkGoldenrod" , PALETTERGB (184, 134, 11) },
168 {"RosyBrown" , PALETTERGB (188, 143, 143) },
169 {"IndianRed" , PALETTERGB (205, 92, 92) },
170 {"SaddleBrown" , PALETTERGB (139, 69, 19) },
171 {"sienna" , PALETTERGB (160, 82, 45) },
172 {"peru" , PALETTERGB (205, 133, 63) },
173 {"burlywood" , PALETTERGB (222, 184, 135) },
174 {"beige" , PALETTERGB (245, 245, 220) },
175 {"wheat" , PALETTERGB (245, 222, 179) },
176 {"SandyBrown" , PALETTERGB (244, 164, 96) },
177 {"tan" , PALETTERGB (210, 180, 140) },
178 {"chocolate" , PALETTERGB (210, 105, 30) },
179 {"firebrick" , PALETTERGB (178, 34, 34) },
180 {"brown" , PALETTERGB (165, 42, 42) },
181 {"DarkSalmon" , PALETTERGB (233, 150, 122) },
182 {"salmon" , PALETTERGB (250, 128, 114) },
183 {"LightSalmon" , PALETTERGB (255, 160, 122) },
184 {"orange" , PALETTERGB (255, 165, 0) },
185 {"DarkOrange" , PALETTERGB (255, 140, 0) },
186 {"coral" , PALETTERGB (255, 127, 80) },
187 {"LightCoral" , PALETTERGB (240, 128, 128) },
188 {"tomato" , PALETTERGB (255, 99, 71) },
189 {"OrangeRed" , PALETTERGB (255, 69, 0) },
190 {"red" , PALETTERGB (255, 0, 0) },
191 {"HotPink" , PALETTERGB (255, 105, 180) },
192 {"DeepPink" , PALETTERGB (255, 20, 147) },
193 {"pink" , PALETTERGB (255, 192, 203) },
194 {"LightPink" , PALETTERGB (255, 182, 193) },
195 {"PaleVioletRed" , PALETTERGB (219, 112, 147) },
196 {"maroon" , PALETTERGB (176, 48, 96) },
197 {"MediumVioletRed" , PALETTERGB (199, 21, 133) },
198 {"VioletRed" , PALETTERGB (208, 32, 144) },
199 {"magenta" , PALETTERGB (255, 0, 255) },
200 {"violet" , PALETTERGB (238, 130, 238) },
201 {"plum" , PALETTERGB (221, 160, 221) },
202 {"orchid" , PALETTERGB (218, 112, 214) },
203 {"MediumOrchid" , PALETTERGB (186, 85, 211) },
204 {"DarkOrchid" , PALETTERGB (153, 50, 204) },
205 {"DarkViolet" , PALETTERGB (148, 0, 211) },
206 {"BlueViolet" , PALETTERGB (138, 43, 226) },
207 {"purple" , PALETTERGB (160, 32, 240) },
208 {"MediumPurple" , PALETTERGB (147, 112, 219) },
209 {"thistle" , PALETTERGB (216, 191, 216) },
210 {"snow1" , PALETTERGB (255, 250, 250) },
211 {"snow2" , PALETTERGB (238, 233, 233) },
212 {"snow3" , PALETTERGB (205, 201, 201) },
213 {"snow4" , PALETTERGB (139, 137, 137) },
214 {"seashell1" , PALETTERGB (255, 245, 238) },
215 {"seashell2" , PALETTERGB (238, 229, 222) },
216 {"seashell3" , PALETTERGB (205, 197, 191) },
217 {"seashell4" , PALETTERGB (139, 134, 130) },
218 {"AntiqueWhite1" , PALETTERGB (255, 239, 219) },
219 {"AntiqueWhite2" , PALETTERGB (238, 223, 204) },
220 {"AntiqueWhite3" , PALETTERGB (205, 192, 176) },
221 {"AntiqueWhite4" , PALETTERGB (139, 131, 120) },
222 {"bisque1" , PALETTERGB (255, 228, 196) },
223 {"bisque2" , PALETTERGB (238, 213, 183) },
224 {"bisque3" , PALETTERGB (205, 183, 158) },
225 {"bisque4" , PALETTERGB (139, 125, 107) },
226 {"PeachPuff1" , PALETTERGB (255, 218, 185) },
227 {"PeachPuff2" , PALETTERGB (238, 203, 173) },
228 {"PeachPuff3" , PALETTERGB (205, 175, 149) },
229 {"PeachPuff4" , PALETTERGB (139, 119, 101) },
230 {"NavajoWhite1" , PALETTERGB (255, 222, 173) },
231 {"NavajoWhite2" , PALETTERGB (238, 207, 161) },
232 {"NavajoWhite3" , PALETTERGB (205, 179, 139) },
233 {"NavajoWhite4" , PALETTERGB (139, 121, 94) },
234 {"LemonChiffon1" , PALETTERGB (255, 250, 205) },
235 {"LemonChiffon2" , PALETTERGB (238, 233, 191) },
236 {"LemonChiffon3" , PALETTERGB (205, 201, 165) },
237 {"LemonChiffon4" , PALETTERGB (139, 137, 112) },
238 {"cornsilk1" , PALETTERGB (255, 248, 220) },
239 {"cornsilk2" , PALETTERGB (238, 232, 205) },
240 {"cornsilk3" , PALETTERGB (205, 200, 177) },
241 {"cornsilk4" , PALETTERGB (139, 136, 120) },
242 {"ivory1" , PALETTERGB (255, 255, 240) },
243 {"ivory2" , PALETTERGB (240, 240, 208) }, /* Adjusted */
244 {"ivory3" , PALETTERGB (205, 205, 193) },
245 {"ivory4" , PALETTERGB (139, 139, 131) },
246 {"honeydew1" , PALETTERGB (240, 255, 240) },
247 {"honeydew2" , PALETTERGB (224, 238, 224) },
248 {"honeydew3" , PALETTERGB (193, 205, 193) },
249 {"honeydew4" , PALETTERGB (131, 139, 131) },
250 {"LavenderBlush1" , PALETTERGB (255, 240, 245) },
251 {"LavenderBlush2" , PALETTERGB (238, 224, 229) },
252 {"LavenderBlush3" , PALETTERGB (205, 193, 197) },
253 {"LavenderBlush4" , PALETTERGB (139, 131, 134) },
254 {"MistyRose1" , PALETTERGB (255, 228, 225) },
255 {"MistyRose2" , PALETTERGB (238, 213, 210) },
256 {"MistyRose3" , PALETTERGB (205, 183, 181) },
257 {"MistyRose4" , PALETTERGB (139, 125, 123) },
258 {"azure1" , PALETTERGB (240, 255, 255) },
259 {"azure2" , PALETTERGB (224, 238, 238) },
260 {"azure3" , PALETTERGB (193, 205, 205) },
261 {"azure4" , PALETTERGB (131, 139, 139) },
262 {"SlateBlue1" , PALETTERGB (131, 111, 255) },
263 {"SlateBlue2" , PALETTERGB (122, 103, 238) },
264 {"SlateBlue3" , PALETTERGB (105, 89, 205) },
265 {"SlateBlue4" , PALETTERGB (71, 60, 139) },
266 {"RoyalBlue1" , PALETTERGB (72, 118, 255) },
267 {"RoyalBlue2" , PALETTERGB (67, 110, 238) },
268 {"RoyalBlue3" , PALETTERGB (58, 95, 205) },
269 {"RoyalBlue4" , PALETTERGB (39, 64, 139) },
270 {"blue1" , PALETTERGB (0, 0, 255) },
271 {"blue2" , PALETTERGB (0, 0, 238) },
272 {"blue3" , PALETTERGB (0, 0, 205) },
273 {"blue4" , PALETTERGB (0, 0, 139) },
274 {"DodgerBlue1" , PALETTERGB (30, 144, 255) },
275 {"DodgerBlue2" , PALETTERGB (28, 134, 238) },
276 {"DodgerBlue3" , PALETTERGB (24, 116, 205) },
277 {"DodgerBlue4" , PALETTERGB (16, 78, 139) },
278 {"SteelBlue1" , PALETTERGB (99, 184, 255) },
279 {"SteelBlue2" , PALETTERGB (92, 172, 238) },
280 {"SteelBlue3" , PALETTERGB (79, 148, 205) },
281 {"SteelBlue4" , PALETTERGB (54, 100, 139) },
282 {"DeepSkyBlue1" , PALETTERGB (0, 191, 255) },
283 {"DeepSkyBlue2" , PALETTERGB (0, 178, 238) },
284 {"DeepSkyBlue3" , PALETTERGB (0, 154, 205) },
285 {"DeepSkyBlue4" , PALETTERGB (0, 104, 139) },
286 {"SkyBlue1" , PALETTERGB (135, 206, 255) },
287 {"SkyBlue2" , PALETTERGB (126, 192, 238) },
288 {"SkyBlue3" , PALETTERGB (108, 166, 205) },
289 {"SkyBlue4" , PALETTERGB (74, 112, 139) },
290 {"LightSkyBlue1" , PALETTERGB (176, 226, 255) },
291 {"LightSkyBlue2" , PALETTERGB (164, 211, 238) },
292 {"LightSkyBlue3" , PALETTERGB (141, 182, 205) },
293 {"LightSkyBlue4" , PALETTERGB (96, 123, 139) },
294 {"SlateGray1" , PALETTERGB (198, 226, 255) },
295 {"SlateGray2" , PALETTERGB (185, 211, 238) },
296 {"SlateGray3" , PALETTERGB (159, 182, 205) },
297 {"SlateGray4" , PALETTERGB (108, 123, 139) },
298 {"LightSteelBlue1" , PALETTERGB (202, 225, 255) },
299 {"LightSteelBlue2" , PALETTERGB (188, 210, 238) },
300 {"LightSteelBlue3" , PALETTERGB (162, 181, 205) },
301 {"LightSteelBlue4" , PALETTERGB (110, 123, 139) },
302 {"LightBlue1" , PALETTERGB (191, 239, 255) },
303 {"LightBlue2" , PALETTERGB (178, 223, 238) },
304 {"LightBlue3" , PALETTERGB (154, 192, 205) },
305 {"LightBlue4" , PALETTERGB (104, 131, 139) },
306 {"LightCyan1" , PALETTERGB (224, 255, 255) },
307 {"LightCyan2" , PALETTERGB (209, 238, 238) },
308 {"LightCyan3" , PALETTERGB (180, 205, 205) },
309 {"LightCyan4" , PALETTERGB (122, 139, 139) },
310 {"PaleTurquoise1" , PALETTERGB (187, 255, 255) },
311 {"PaleTurquoise2" , PALETTERGB (174, 238, 238) },
312 {"PaleTurquoise3" , PALETTERGB (150, 205, 205) },
313 {"PaleTurquoise4" , PALETTERGB (102, 139, 139) },
314 {"CadetBlue1" , PALETTERGB (152, 245, 255) },
315 {"CadetBlue2" , PALETTERGB (144, 220, 240) }, /* Adjusted */
316 {"CadetBlue3" , PALETTERGB (122, 197, 205) },
317 {"CadetBlue4" , PALETTERGB (83, 134, 139) },
318 {"turquoise1" , PALETTERGB (0, 245, 255) },
319 {"turquoise2" , PALETTERGB (0, 229, 238) },
320 {"turquoise3" , PALETTERGB (0, 197, 205) },
321 {"turquoise4" , PALETTERGB (0, 134, 139) },
322 {"cyan1" , PALETTERGB (0, 255, 255) },
323 {"cyan2" , PALETTERGB (0, 238, 238) },
324 {"cyan3" , PALETTERGB (0, 205, 205) },
325 {"cyan4" , PALETTERGB (0, 139, 139) },
326 {"DarkSlateGray1" , PALETTERGB (151, 255, 255) },
327 {"DarkSlateGray2" , PALETTERGB (141, 238, 238) },
328 {"DarkSlateGray3" , PALETTERGB (121, 205, 205) },
329 {"DarkSlateGray4" , PALETTERGB (82, 139, 139) },
330 {"aquamarine1" , PALETTERGB (127, 255, 212) },
331 {"aquamarine2" , PALETTERGB (118, 238, 198) },
332 {"aquamarine3" , PALETTERGB (102, 205, 170) },
333 {"aquamarine4" , PALETTERGB (69, 139, 116) },
334 {"DarkSeaGreen1" , PALETTERGB (193, 255, 193) },
335 {"DarkSeaGreen2" , PALETTERGB (180, 238, 180) },
336 {"DarkSeaGreen3" , PALETTERGB (155, 205, 155) },
337 {"DarkSeaGreen4" , PALETTERGB (105, 139, 105) },
338 {"SeaGreen1" , PALETTERGB (84, 255, 159) },
339 {"SeaGreen2" , PALETTERGB (78, 238, 148) },
340 {"SeaGreen3" , PALETTERGB (67, 205, 128) },
341 {"SeaGreen4" , PALETTERGB (46, 139, 87) },
342 {"PaleGreen1" , PALETTERGB (154, 255, 154) },
343 {"PaleGreen2" , PALETTERGB (144, 238, 144) },
344 {"PaleGreen3" , PALETTERGB (124, 205, 124) },
345 {"PaleGreen4" , PALETTERGB (84, 139, 84) },
346 {"SpringGreen1" , PALETTERGB (0, 255, 127) },
347 {"SpringGreen2" , PALETTERGB (0, 238, 118) },
348 {"SpringGreen3" , PALETTERGB (0, 205, 102) },
349 {"SpringGreen4" , PALETTERGB (0, 139, 69) },
350 {"green1" , PALETTERGB (0, 255, 0) },
351 {"green2" , PALETTERGB (0, 238, 0) },
352 {"green3" , PALETTERGB (0, 205, 0) },
353 {"green4" , PALETTERGB (0, 139, 0) },
354 {"chartreuse1" , PALETTERGB (127, 255, 0) },
355 {"chartreuse2" , PALETTERGB (118, 238, 0) },
356 {"chartreuse3" , PALETTERGB (102, 205, 0) },
357 {"chartreuse4" , PALETTERGB (69, 139, 0) },
358 {"OliveDrab1" , PALETTERGB (192, 255, 62) },
359 {"OliveDrab2" , PALETTERGB (179, 238, 58) },
360 {"OliveDrab3" , PALETTERGB (154, 205, 50) },
361 {"OliveDrab4" , PALETTERGB (105, 139, 34) },
362 {"DarkOliveGreen1" , PALETTERGB (202, 255, 112) },
363 {"DarkOliveGreen2" , PALETTERGB (188, 238, 104) },
364 {"DarkOliveGreen3" , PALETTERGB (162, 205, 90) },
365 {"DarkOliveGreen4" , PALETTERGB (110, 139, 61) },
366 {"khaki1" , PALETTERGB (255, 246, 143) },
367 {"khaki2" , PALETTERGB (238, 230, 133) },
368 {"khaki3" , PALETTERGB (205, 198, 115) },
369 {"khaki4" , PALETTERGB (139, 134, 78) },
370 {"LightGoldenrod1" , PALETTERGB (255, 236, 139) },
371 {"LightGoldenrod2" , PALETTERGB (238, 220, 130) },
372 {"LightGoldenrod3" , PALETTERGB (205, 190, 112) },
373 {"LightGoldenrod4" , PALETTERGB (139, 129, 76) },
374 {"LightYellow1" , PALETTERGB (255, 255, 224) },
375 {"LightYellow2" , PALETTERGB (238, 238, 209) },
376 {"LightYellow3" , PALETTERGB (205, 205, 180) },
377 {"LightYellow4" , PALETTERGB (139, 139, 122) },
378 {"yellow1" , PALETTERGB (255, 255, 0) },
379 {"yellow2" , PALETTERGB (238, 238, 0) },
380 {"yellow3" , PALETTERGB (205, 205, 0) },
381 {"yellow4" , PALETTERGB (139, 139, 0) },
382 {"gold1" , PALETTERGB (255, 215, 0) },
383 {"gold2" , PALETTERGB (238, 201, 0) },
384 {"gold3" , PALETTERGB (205, 173, 0) },
385 {"gold4" , PALETTERGB (139, 117, 0) },
386 {"goldenrod1" , PALETTERGB (255, 193, 37) },
387 {"goldenrod2" , PALETTERGB (238, 180, 34) },
388 {"goldenrod3" , PALETTERGB (205, 155, 29) },
389 {"goldenrod4" , PALETTERGB (139, 105, 20) },
390 {"DarkGoldenrod1" , PALETTERGB (255, 185, 15) },
391 {"DarkGoldenrod2" , PALETTERGB (238, 173, 14) },
392 {"DarkGoldenrod3" , PALETTERGB (205, 149, 12) },
393 {"DarkGoldenrod4" , PALETTERGB (139, 101, 8) },
394 {"RosyBrown1" , PALETTERGB (255, 193, 193) },
395 {"RosyBrown2" , PALETTERGB (238, 180, 180) },
396 {"RosyBrown3" , PALETTERGB (205, 155, 155) },
397 {"RosyBrown4" , PALETTERGB (139, 105, 105) },
398 {"IndianRed1" , PALETTERGB (255, 106, 106) },
399 {"IndianRed2" , PALETTERGB (238, 99, 99) },
400 {"IndianRed3" , PALETTERGB (205, 85, 85) },
401 {"IndianRed4" , PALETTERGB (139, 58, 58) },
402 {"sienna1" , PALETTERGB (255, 130, 71) },
403 {"sienna2" , PALETTERGB (238, 121, 66) },
404 {"sienna3" , PALETTERGB (205, 104, 57) },
405 {"sienna4" , PALETTERGB (139, 71, 38) },
406 {"burlywood1" , PALETTERGB (255, 211, 155) },
407 {"burlywood2" , PALETTERGB (238, 197, 145) },
408 {"burlywood3" , PALETTERGB (205, 170, 125) },
409 {"burlywood4" , PALETTERGB (139, 115, 85) },
410 {"wheat1" , PALETTERGB (255, 231, 186) },
411 {"wheat2" , PALETTERGB (238, 216, 174) },
412 {"wheat3" , PALETTERGB (205, 186, 150) },
413 {"wheat4" , PALETTERGB (139, 126, 102) },
414 {"tan1" , PALETTERGB (255, 165, 79) },
415 {"tan2" , PALETTERGB (238, 154, 73) },
416 {"tan3" , PALETTERGB (205, 133, 63) },
417 {"tan4" , PALETTERGB (139, 90, 43) },
418 {"chocolate1" , PALETTERGB (255, 127, 36) },
419 {"chocolate2" , PALETTERGB (238, 118, 33) },
420 {"chocolate3" , PALETTERGB (205, 102, 29) },
421 {"chocolate4" , PALETTERGB (139, 69, 19) },
422 {"firebrick1" , PALETTERGB (255, 48, 48) },
423 {"firebrick2" , PALETTERGB (238, 44, 44) },
424 {"firebrick3" , PALETTERGB (205, 38, 38) },
425 {"firebrick4" , PALETTERGB (139, 26, 26) },
426 {"brown1" , PALETTERGB (255, 64, 64) },
427 {"brown2" , PALETTERGB (238, 59, 59) },
428 {"brown3" , PALETTERGB (205, 51, 51) },
429 {"brown4" , PALETTERGB (139, 35, 35) },
430 {"salmon1" , PALETTERGB (255, 140, 105) },
431 {"salmon2" , PALETTERGB (238, 130, 98) },
432 {"salmon3" , PALETTERGB (205, 112, 84) },
433 {"salmon4" , PALETTERGB (139, 76, 57) },
434 {"LightSalmon1" , PALETTERGB (255, 160, 122) },
435 {"LightSalmon2" , PALETTERGB (238, 149, 114) },
436 {"LightSalmon3" , PALETTERGB (205, 129, 98) },
437 {"LightSalmon4" , PALETTERGB (139, 87, 66) },
438 {"orange1" , PALETTERGB (255, 165, 0) },
439 {"orange2" , PALETTERGB (238, 154, 0) },
440 {"orange3" , PALETTERGB (205, 133, 0) },
441 {"orange4" , PALETTERGB (139, 90, 0) },
442 {"DarkOrange1" , PALETTERGB (255, 127, 0) },
443 {"DarkOrange2" , PALETTERGB (238, 118, 0) },
444 {"DarkOrange3" , PALETTERGB (205, 102, 0) },
445 {"DarkOrange4" , PALETTERGB (139, 69, 0) },
446 {"coral1" , PALETTERGB (255, 114, 86) },
447 {"coral2" , PALETTERGB (238, 106, 80) },
448 {"coral3" , PALETTERGB (205, 91, 69) },
449 {"coral4" , PALETTERGB (139, 62, 47) },
450 {"tomato1" , PALETTERGB (255, 99, 71) },
451 {"tomato2" , PALETTERGB (238, 92, 66) },
452 {"tomato3" , PALETTERGB (205, 79, 57) },
453 {"tomato4" , PALETTERGB (139, 54, 38) },
454 {"OrangeRed1" , PALETTERGB (255, 69, 0) },
455 {"OrangeRed2" , PALETTERGB (238, 64, 0) },
456 {"OrangeRed3" , PALETTERGB (205, 55, 0) },
457 {"OrangeRed4" , PALETTERGB (139, 37, 0) },
458 {"red1" , PALETTERGB (255, 0, 0) },
459 {"red2" , PALETTERGB (238, 0, 0) },
460 {"red3" , PALETTERGB (205, 0, 0) },
461 {"red4" , PALETTERGB (139, 0, 0) },
462 {"DeepPink1" , PALETTERGB (255, 20, 147) },
463 {"DeepPink2" , PALETTERGB (238, 18, 137) },
464 {"DeepPink3" , PALETTERGB (205, 16, 118) },
465 {"DeepPink4" , PALETTERGB (139, 10, 80) },
466 {"HotPink1" , PALETTERGB (255, 110, 180) },
467 {"HotPink2" , PALETTERGB (238, 106, 167) },
468 {"HotPink3" , PALETTERGB (205, 96, 144) },
469 {"HotPink4" , PALETTERGB (139, 58, 98) },
470 {"pink1" , PALETTERGB (255, 181, 197) },
471 {"pink2" , PALETTERGB (238, 169, 184) },
472 {"pink3" , PALETTERGB (205, 145, 158) },
473 {"pink4" , PALETTERGB (139, 99, 108) },
474 {"LightPink1" , PALETTERGB (255, 174, 185) },
475 {"LightPink2" , PALETTERGB (238, 162, 173) },
476 {"LightPink3" , PALETTERGB (205, 140, 149) },
477 {"LightPink4" , PALETTERGB (139, 95, 101) },
478 {"PaleVioletRed1" , PALETTERGB (255, 130, 171) },
479 {"PaleVioletRed2" , PALETTERGB (238, 121, 159) },
480 {"PaleVioletRed3" , PALETTERGB (205, 104, 137) },
481 {"PaleVioletRed4" , PALETTERGB (139, 71, 93) },
482 {"maroon1" , PALETTERGB (255, 52, 179) },
483 {"maroon2" , PALETTERGB (238, 48, 167) },
484 {"maroon3" , PALETTERGB (205, 41, 144) },
485 {"maroon4" , PALETTERGB (139, 28, 98) },
486 {"VioletRed1" , PALETTERGB (255, 62, 150) },
487 {"VioletRed2" , PALETTERGB (238, 58, 140) },
488 {"VioletRed3" , PALETTERGB (205, 50, 120) },
489 {"VioletRed4" , PALETTERGB (139, 34, 82) },
490 {"magenta1" , PALETTERGB (255, 0, 255) },
491 {"magenta2" , PALETTERGB (238, 0, 238) },
492 {"magenta3" , PALETTERGB (205, 0, 205) },
493 {"magenta4" , PALETTERGB (139, 0, 139) },
494 {"orchid1" , PALETTERGB (255, 131, 250) },
495 {"orchid2" , PALETTERGB (238, 122, 233) },
496 {"orchid3" , PALETTERGB (205, 105, 201) },
497 {"orchid4" , PALETTERGB (139, 71, 137) },
498 {"plum1" , PALETTERGB (255, 187, 255) },
499 {"plum2" , PALETTERGB (238, 174, 238) },
500 {"plum3" , PALETTERGB (205, 150, 205) },
501 {"plum4" , PALETTERGB (139, 102, 139) },
502 {"MediumOrchid1" , PALETTERGB (224, 102, 255) },
503 {"MediumOrchid2" , PALETTERGB (209, 95, 238) },
504 {"MediumOrchid3" , PALETTERGB (180, 82, 205) },
505 {"MediumOrchid4" , PALETTERGB (122, 55, 139) },
506 {"DarkOrchid1" , PALETTERGB (191, 62, 255) },
507 {"DarkOrchid2" , PALETTERGB (178, 58, 238) },
508 {"DarkOrchid3" , PALETTERGB (154, 50, 205) },
509 {"DarkOrchid4" , PALETTERGB (104, 34, 139) },
510 {"purple1" , PALETTERGB (155, 48, 255) },
511 {"purple2" , PALETTERGB (145, 44, 238) },
512 {"purple3" , PALETTERGB (125, 38, 205) },
513 {"purple4" , PALETTERGB (85, 26, 139) },
514 {"MediumPurple1" , PALETTERGB (171, 130, 255) },
515 {"MediumPurple2" , PALETTERGB (159, 121, 238) },
516 {"MediumPurple3" , PALETTERGB (137, 104, 205) },
517 {"MediumPurple4" , PALETTERGB (93, 71, 139) },
518 {"thistle1" , PALETTERGB (255, 225, 255) },
519 {"thistle2" , PALETTERGB (238, 210, 238) },
520 {"thistle3" , PALETTERGB (205, 181, 205) },
521 {"thistle4" , PALETTERGB (139, 123, 139) },
522 {"gray0" , PALETTERGB (0, 0, 0) },
523 {"grey0" , PALETTERGB (0, 0, 0) },
524 {"gray1" , PALETTERGB (3, 3, 3) },
525 {"grey1" , PALETTERGB (3, 3, 3) },
526 {"gray2" , PALETTERGB (5, 5, 5) },
527 {"grey2" , PALETTERGB (5, 5, 5) },
528 {"gray3" , PALETTERGB (8, 8, 8) },
529 {"grey3" , PALETTERGB (8, 8, 8) },
530 {"gray4" , PALETTERGB (10, 10, 10) },
531 {"grey4" , PALETTERGB (10, 10, 10) },
532 {"gray5" , PALETTERGB (13, 13, 13) },
533 {"grey5" , PALETTERGB (13, 13, 13) },
534 {"gray6" , PALETTERGB (15, 15, 15) },
535 {"grey6" , PALETTERGB (15, 15, 15) },
536 {"gray7" , PALETTERGB (18, 18, 18) },
537 {"grey7" , PALETTERGB (18, 18, 18) },
538 {"gray8" , PALETTERGB (20, 20, 20) },
539 {"grey8" , PALETTERGB (20, 20, 20) },
540 {"gray9" , PALETTERGB (23, 23, 23) },
541 {"grey9" , PALETTERGB (23, 23, 23) },
542 {"gray10" , PALETTERGB (26, 26, 26) },
543 {"grey10" , PALETTERGB (26, 26, 26) },
544 {"gray11" , PALETTERGB (28, 28, 28) },
545 {"grey11" , PALETTERGB (28, 28, 28) },
546 {"gray12" , PALETTERGB (31, 31, 31) },
547 {"grey12" , PALETTERGB (31, 31, 31) },
548 {"gray13" , PALETTERGB (33, 33, 33) },
549 {"grey13" , PALETTERGB (33, 33, 33) },
550 {"gray14" , PALETTERGB (36, 36, 36) },
551 {"grey14" , PALETTERGB (36, 36, 36) },
552 {"gray15" , PALETTERGB (38, 38, 38) },
553 {"grey15" , PALETTERGB (38, 38, 38) },
554 {"gray16" , PALETTERGB (41, 41, 41) },
555 {"grey16" , PALETTERGB (41, 41, 41) },
556 {"gray17" , PALETTERGB (43, 43, 43) },
557 {"grey17" , PALETTERGB (43, 43, 43) },
558 {"gray18" , PALETTERGB (46, 46, 46) },
559 {"grey18" , PALETTERGB (46, 46, 46) },
560 {"gray19" , PALETTERGB (48, 48, 48) },
561 {"grey19" , PALETTERGB (48, 48, 48) },
562 {"gray20" , PALETTERGB (51, 51, 51) },
563 {"grey20" , PALETTERGB (51, 51, 51) },
564 {"gray21" , PALETTERGB (54, 54, 54) },
565 {"grey21" , PALETTERGB (54, 54, 54) },
566 {"gray22" , PALETTERGB (56, 56, 56) },
567 {"grey22" , PALETTERGB (56, 56, 56) },
568 {"gray23" , PALETTERGB (59, 59, 59) },
569 {"grey23" , PALETTERGB (59, 59, 59) },
570 {"gray24" , PALETTERGB (61, 61, 61) },
571 {"grey24" , PALETTERGB (61, 61, 61) },
572 {"gray25" , PALETTERGB (64, 64, 64) },
573 {"grey25" , PALETTERGB (64, 64, 64) },
574 {"gray26" , PALETTERGB (66, 66, 66) },
575 {"grey26" , PALETTERGB (66, 66, 66) },
576 {"gray27" , PALETTERGB (69, 69, 69) },
577 {"grey27" , PALETTERGB (69, 69, 69) },
578 {"gray28" , PALETTERGB (71, 71, 71) },
579 {"grey28" , PALETTERGB (71, 71, 71) },
580 {"gray29" , PALETTERGB (74, 74, 74) },
581 {"grey29" , PALETTERGB (74, 74, 74) },
582 {"gray30" , PALETTERGB (77, 77, 77) },
583 {"grey30" , PALETTERGB (77, 77, 77) },
584 {"gray31" , PALETTERGB (79, 79, 79) },
585 {"grey31" , PALETTERGB (79, 79, 79) },
586 {"gray32" , PALETTERGB (82, 82, 82) },
587 {"grey32" , PALETTERGB (82, 82, 82) },
588 {"gray33" , PALETTERGB (84, 84, 84) },
589 {"grey33" , PALETTERGB (84, 84, 84) },
590 {"gray34" , PALETTERGB (87, 87, 87) },
591 {"grey34" , PALETTERGB (87, 87, 87) },
592 {"gray35" , PALETTERGB (89, 89, 89) },
593 {"grey35" , PALETTERGB (89, 89, 89) },
594 {"gray36" , PALETTERGB (92, 92, 92) },
595 {"grey36" , PALETTERGB (92, 92, 92) },
596 {"gray37" , PALETTERGB (94, 94, 94) },
597 {"grey37" , PALETTERGB (94, 94, 94) },
598 {"gray38" , PALETTERGB (97, 97, 97) },
599 {"grey38" , PALETTERGB (97, 97, 97) },
600 {"gray39" , PALETTERGB (99, 99, 99) },
601 {"grey39" , PALETTERGB (99, 99, 99) },
602 {"gray40" , PALETTERGB (102, 102, 102) },
603 {"grey40" , PALETTERGB (102, 102, 102) },
604 {"gray41" , PALETTERGB (105, 105, 105) },
605 {"grey41" , PALETTERGB (105, 105, 105) },
606 {"gray42" , PALETTERGB (107, 107, 107) },
607 {"grey42" , PALETTERGB (107, 107, 107) },
608 {"gray43" , PALETTERGB (110, 110, 110) },
609 {"grey43" , PALETTERGB (110, 110, 110) },
610 {"gray44" , PALETTERGB (112, 112, 112) },
611 {"grey44" , PALETTERGB (112, 112, 112) },
612 {"gray45" , PALETTERGB (115, 115, 115) },
613 {"grey45" , PALETTERGB (115, 115, 115) },
614 {"gray46" , PALETTERGB (117, 117, 117) },
615 {"grey46" , PALETTERGB (117, 117, 117) },
616 {"gray47" , PALETTERGB (120, 120, 120) },
617 {"grey47" , PALETTERGB (120, 120, 120) },
618 {"gray48" , PALETTERGB (122, 122, 122) },
619 {"grey48" , PALETTERGB (122, 122, 122) },
620 {"gray49" , PALETTERGB (125, 125, 125) },
621 {"grey49" , PALETTERGB (125, 125, 125) },
622 {"gray50" , PALETTERGB (128, 128, 128) }, /* Adjusted */
623 {"grey50" , PALETTERGB (128, 128, 128) }, /* Adjusted */
624 {"gray51" , PALETTERGB (130, 130, 130) },
625 {"grey51" , PALETTERGB (130, 130, 130) },
626 {"gray52" , PALETTERGB (133, 133, 133) },
627 {"grey52" , PALETTERGB (133, 133, 133) },
628 {"gray53" , PALETTERGB (135, 135, 135) },
629 {"grey53" , PALETTERGB (135, 135, 135) },
630 {"gray54" , PALETTERGB (138, 138, 138) },
631 {"grey54" , PALETTERGB (138, 138, 138) },
632 {"gray55" , PALETTERGB (140, 140, 140) },
633 {"grey55" , PALETTERGB (140, 140, 140) },
634 {"gray56" , PALETTERGB (143, 143, 143) },
635 {"grey56" , PALETTERGB (143, 143, 143) },
636 {"gray57" , PALETTERGB (145, 145, 145) },
637 {"grey57" , PALETTERGB (145, 145, 145) },
638 {"gray58" , PALETTERGB (148, 148, 148) },
639 {"grey58" , PALETTERGB (148, 148, 148) },
640 {"gray59" , PALETTERGB (150, 150, 150) },
641 {"grey59" , PALETTERGB (150, 150, 150) },
642 {"gray60" , PALETTERGB (153, 153, 153) },
643 {"grey60" , PALETTERGB (153, 153, 153) },
644 {"gray61" , PALETTERGB (156, 156, 156) },
645 {"grey61" , PALETTERGB (156, 156, 156) },
646 {"gray62" , PALETTERGB (158, 158, 158) },
647 {"grey62" , PALETTERGB (158, 158, 158) },
648 {"gray63" , PALETTERGB (161, 161, 161) },
649 {"grey63" , PALETTERGB (161, 161, 161) },
650 {"gray64" , PALETTERGB (163, 163, 163) },
651 {"grey64" , PALETTERGB (163, 163, 163) },
652 {"gray65" , PALETTERGB (166, 166, 166) },
653 {"grey65" , PALETTERGB (166, 166, 166) },
654 {"gray66" , PALETTERGB (168, 168, 168) },
655 {"grey66" , PALETTERGB (168, 168, 168) },
656 {"gray67" , PALETTERGB (171, 171, 171) },
657 {"grey67" , PALETTERGB (171, 171, 171) },
658 {"gray68" , PALETTERGB (173, 173, 173) },
659 {"grey68" , PALETTERGB (173, 173, 173) },
660 {"gray69" , PALETTERGB (176, 176, 176) },
661 {"grey69" , PALETTERGB (176, 176, 176) },
662 {"gray70" , PALETTERGB (179, 179, 179) },
663 {"grey70" , PALETTERGB (179, 179, 179) },
664 {"gray71" , PALETTERGB (181, 181, 181) },
665 {"grey71" , PALETTERGB (181, 181, 181) },
666 {"gray72" , PALETTERGB (184, 184, 184) },
667 {"grey72" , PALETTERGB (184, 184, 184) },
668 {"gray73" , PALETTERGB (186, 186, 186) },
669 {"grey73" , PALETTERGB (186, 186, 186) },
670 {"gray74" , PALETTERGB (189, 189, 189) },
671 {"grey74" , PALETTERGB (189, 189, 189) },
672 {"gray75" , PALETTERGB (192, 192, 192) }, /* Adjusted */
673 {"grey75" , PALETTERGB (192, 192, 192) }, /* Adjusted */
674 {"gray76" , PALETTERGB (194, 194, 194) },
675 {"grey76" , PALETTERGB (194, 194, 194) },
676 {"gray77" , PALETTERGB (196, 196, 196) },
677 {"grey77" , PALETTERGB (196, 196, 196) },
678 {"gray78" , PALETTERGB (199, 199, 199) },
679 {"grey78" , PALETTERGB (199, 199, 199) },
680 {"gray79" , PALETTERGB (201, 201, 201) },
681 {"grey79" , PALETTERGB (201, 201, 201) },
682 {"gray80" , PALETTERGB (204, 204, 204) },
683 {"grey80" , PALETTERGB (204, 204, 204) },
684 {"gray81" , PALETTERGB (207, 207, 207) },
685 {"grey81" , PALETTERGB (207, 207, 207) },
686 {"gray82" , PALETTERGB (209, 209, 209) },
687 {"grey82" , PALETTERGB (209, 209, 209) },
688 {"gray83" , PALETTERGB (212, 212, 212) },
689 {"grey83" , PALETTERGB (212, 212, 212) },
690 {"gray84" , PALETTERGB (214, 214, 214) },
691 {"grey84" , PALETTERGB (214, 214, 214) },
692 {"gray85" , PALETTERGB (217, 217, 217) },
693 {"grey85" , PALETTERGB (217, 217, 217) },
694 {"gray86" , PALETTERGB (219, 219, 219) },
695 {"grey86" , PALETTERGB (219, 219, 219) },
696 {"gray87" , PALETTERGB (222, 222, 222) },
697 {"grey87" , PALETTERGB (222, 222, 222) },
698 {"gray88" , PALETTERGB (224, 224, 224) },
699 {"grey88" , PALETTERGB (224, 224, 224) },
700 {"gray89" , PALETTERGB (227, 227, 227) },
701 {"grey89" , PALETTERGB (227, 227, 227) },
702 {"gray90" , PALETTERGB (229, 229, 229) },
703 {"grey90" , PALETTERGB (229, 229, 229) },
704 {"gray91" , PALETTERGB (232, 232, 232) },
705 {"grey91" , PALETTERGB (232, 232, 232) },
706 {"gray92" , PALETTERGB (235, 235, 235) },
707 {"grey92" , PALETTERGB (235, 235, 235) },
708 {"gray93" , PALETTERGB (237, 237, 237) },
709 {"grey93" , PALETTERGB (237, 237, 237) },
710 {"gray94" , PALETTERGB (240, 240, 240) },
711 {"grey94" , PALETTERGB (240, 240, 240) },
712 {"gray95" , PALETTERGB (242, 242, 242) },
713 {"grey95" , PALETTERGB (242, 242, 242) },
714 {"gray96" , PALETTERGB (245, 245, 245) },
715 {"grey96" , PALETTERGB (245, 245, 245) },
716 {"gray97" , PALETTERGB (247, 247, 247) },
717 {"grey97" , PALETTERGB (247, 247, 247) },
718 {"gray98" , PALETTERGB (250, 250, 250) },
719 {"grey98" , PALETTERGB (250, 250, 250) },
720 {"gray99" , PALETTERGB (252, 252, 252) },
721 {"grey99" , PALETTERGB (252, 252, 252) },
722 {"gray100" , PALETTERGB (255, 255, 255) },
723 {"grey100" , PALETTERGB (255, 255, 255) },
724 {"DarkGrey" , PALETTERGB (169, 169, 169) },
725 {"DarkGray" , PALETTERGB (169, 169, 169) },
726 {"DarkBlue" , PALETTERGB (0, 0, 128) }, /* Adjusted == Navy */
727 {"DarkCyan" , PALETTERGB (0, 128, 128) }, /* Adjusted */
728 {"DarkMagenta" , PALETTERGB (128, 0, 128) }, /* Adjusted */
729 {"DarkRed" , PALETTERGB (128, 0, 0) }, /* Adjusted */
730 {"LightGreen" , PALETTERGB (144, 238, 144) },
731 /* Added to match values in the default Windows palette: */
732 {"DarkYellow" , PALETTERGB (128, 128, 0) },
733 {"PaleYellow" , PALETTERGB (255, 255, 128) }
737 typedef struct fontmap_t
743 /* Default weight first, preferred names listed before synonyms */
744 static const fontmap_t fontweight_map[] =
746 {"Regular" , FW_REGULAR}, /* The standard font weight */
748 {"Extra Light" , FW_EXTRALIGHT},
749 {"Ultra Light" , FW_ULTRALIGHT},
750 {"Light" , FW_LIGHT},
751 {"Normal" , FW_NORMAL},
752 {"Medium" , FW_MEDIUM},
753 {"Semi Bold" , FW_SEMIBOLD},
754 {"Demi Bold" , FW_DEMIBOLD},
755 {"Bold" , FW_BOLD}, /* The standard bold font weight */
756 {"Extra Bold" , FW_EXTRABOLD},
757 {"Ultra Bold" , FW_ULTRABOLD},
758 {"Heavy" , FW_HEAVY},
762 /* Default charset first, no synonyms allowed because these names are
763 * matched against the names reported by win32 by match_font() */
764 static const fontmap_t charset_map[] =
766 {"Western" , ANSI_CHARSET},
767 {"Symbol" , SYMBOL_CHARSET},
768 {"Shift JIS" , SHIFTJIS_CHARSET}, /* #### Name to be verified */
769 {"GB2312" , GB2312_CHARSET}, /* #### Name to be verified */
770 {"Hanguel" , HANGEUL_CHARSET},
771 {"Chinese Big 5" , CHINESEBIG5_CHARSET}, /* #### Name to be verified */
772 #if (WINVER >= 0x0400)
773 {"Johab" , JOHAB_CHARSET}, /* #### Name to be verified */
774 {"Hebrew" , HEBREW_CHARSET}, /* #### Name to be verified */
775 {"Arabic" , ARABIC_CHARSET}, /* #### Name to be verified */
776 {"Greek" , GREEK_CHARSET},
777 {"Turkish" , TURKISH_CHARSET},
778 {"Vietnamese" , VIETNAMESE_CHARSET}, /* #### Name to be verified */
779 {"Thai" , THAI_CHARSET}, /* #### Name to be verified */
780 {"Central European" , EASTEUROPE_CHARSET},
781 {"Cyrillic" , RUSSIAN_CHARSET},
782 {"Mac" , MAC_CHARSET},
783 {"Baltic" , BALTIC_CHARSET},
785 {"OEM/DOS" , OEM_CHARSET}
789 /************************************************************************/
791 /************************************************************************/
796 /* assumes ASCII and isxdigit(c) */
806 mswindows_string_to_color(const char *name)
812 /* numeric names look like "#RRGGBB", "#RRRGGGBBB" or "#RRRRGGGGBBBB"
813 or "rgb:rrrr/gggg/bbbb" */
814 unsigned int r, g, b;
816 for (i=1; i<strlen(name); i++)
818 if (!isxdigit ((int)name[i]))
819 return (COLORREF) -1;
823 r = hexval (name[1]) * 16 + hexval (name[2]);
824 g = hexval (name[3]) * 16 + hexval (name[4]);
825 b = hexval (name[5]) * 16 + hexval (name[6]);
826 return (PALETTERGB (r, g, b));
828 else if (strlen(name)==10)
830 r = hexval (name[1]) * 16 + hexval (name[2]);
831 g = hexval (name[4]) * 16 + hexval (name[5]);
832 b = hexval (name[7]) * 16 + hexval (name[8]);
833 return (PALETTERGB (r, g, b));
835 else if (strlen(name)==13)
837 r = hexval (name[1]) * 16 + hexval (name[2]);
838 g = hexval (name[5]) * 16 + hexval (name[6]);
839 b = hexval (name[9]) * 16 + hexval (name[10]);
840 return (PALETTERGB (r, g, b));
843 else if (!strncmp(name, "rgb:", 4))
847 if (sscanf(name, "rgb:%04x/%04x/%04x", &r, &g, &b) == 3)
849 int len = strlen (name);
862 return (PALETTERGB (r, g, b));
865 return (COLORREF) -1;
867 else if (*name) /* Can't be an empty string */
869 char *nospaces = (char*) alloca (strlen (name)+1);
878 for (i = 0; i < countof (mswindows_X_color_map); i++)
879 if (!stricmp (nospaces, mswindows_X_color_map[i].name))
880 return (mswindows_X_color_map[i].colorref);
882 return (COLORREF) -1;
886 mswindows_color_to_string (COLORREF color)
890 COLORREF pcolor = PALETTERGB (GetRValue (color), GetGValue (color),
893 for (i=0; i < countof (mswindows_X_color_map); i++)
894 if (pcolor == (mswindows_X_color_map[i].colorref))
895 return build_string (mswindows_X_color_map[i].name);
897 sprintf (buf, "#%02X%02X%02X",
898 GetRValue (color), GetGValue (color), GetBValue (color));
899 return build_string (buf);
903 * Returns non-zero if the two supplied font patterns match.
904 * If they match and fontname is not NULL, copies the logical OR of the
905 * patterns to fontname (which is assumed to be at least MSW_FONTSIZE in size).
907 * The patterns 'match' iff for each field that is not blank in either pattern,
908 * the corresponding field in the other pattern is either identical or blank.
911 match_font (char *pattern1, char *pattern2, char *fontname)
913 char *c1=pattern1, *c2=pattern2, *e1=0, *e2=0;
921 if (c1 && (e1 = strchr (c1, ':')))
923 if (c2 && (e2 = strchr (c2, ':')))
926 if (c1 && c1[0]!='\0')
928 if (c2 && c2[0]!='\0' && stricmp(c1, c2))
935 strcat (strcat (fontname, c1), ":");
939 if (c2 && c2[0]!='\0')
940 strcat (strcat (fontname, c2), ":");
942 strcat (fontname, ":");
945 if (e1) *(e1++) = ':';
946 if (e2) *(e2++) = ':';
952 fontname[strlen (fontname) - 1] = '\0'; /* Trim trailing ':' */
960 /************************************************************************/
962 /************************************************************************/
971 font_enum_callback_2 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
972 int FontType, struct font_enum_t *font_enum)
974 char fontname[MSW_FONTSIZE];
975 Lisp_Object fontname_lispstr;
979 * The enumerated font weights are not to be trusted because:
980 * a) lpelfe->elfStyle is only filled in for TrueType fonts.
981 * b) Not all Bold and Italic styles of all fonts (inluding some Vector,
982 * Truetype and Raster fonts) are enumerated.
983 * I guess that fonts for which Bold and Italic styles are generated
984 * 'on-the-fly' are not enumerated. It would be overly restrictive to
985 * disallow Bold And Italic weights for these fonts, so we just leave
986 * weights unspecified. This means that we have to weed out duplicates of
987 * those fonts that do get enumerated with different weights.
989 if (FontType == 0 /*vector*/ || FontType == TRUETYPE_FONTTYPE)
990 /* Scalable, so leave pointsize blank */
991 sprintf (fontname, "%s::::", lpelfe->elfLogFont.lfFaceName);
993 /* Formula for pointsize->height from LOGFONT docs in Platform SDK */
994 sprintf (fontname, "%s::%d::", lpelfe->elfLogFont.lfFaceName,
995 MulDiv (lpntme->ntmTm.tmHeight - lpntme->ntmTm.tmInternalLeading,
996 72, GetDeviceCaps (font_enum->hdc, LOGPIXELSY)));
999 * The enumerated font character set strings are not to be trusted because
1000 * lpelfe->elfScript is returned in the host language and not in English.
1001 * We can't know a priori the translations of "Western", "Central European"
1002 * etc into the host language, so we must use English. The same argument
1003 * applies to the font weight string when matching fonts.
1005 for (i=0; i<countof (charset_map); i++)
1006 if (lpelfe->elfLogFont.lfCharSet == charset_map[i].value)
1008 strcat (fontname, charset_map[i].name);
1011 if (i==countof (charset_map))
1012 strcpy (fontname, charset_map[0].name);
1014 /* Add the font name to the list if not already there */
1015 fontname_lispstr = build_string (fontname);
1016 if (NILP (memq_no_quit (fontname_lispstr, font_enum->list)))
1017 font_enum->list = Fcons (fontname_lispstr, font_enum->list);
1023 font_enum_callback_1 (ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme,
1024 int FontType, struct font_enum_t *font_enum)
1026 /* This function gets called once per facename per character set.
1027 * We call a second callback to enumerate the fonts in each facename */
1028 return EnumFontFamiliesEx (font_enum->hdc, &lpelfe->elfLogFont,
1029 (FONTENUMPROC) font_enum_callback_2,
1030 (LPARAM) font_enum, 0);
1034 * Enumerate the available on the HDC fonts and return a list of string
1038 mswindows_enumerate_fonts (HDC hdc)
1040 /* This cannot CG */
1042 struct font_enum_t font_enum;
1045 logfont.lfCharSet = DEFAULT_CHARSET;
1046 logfont.lfFaceName[0] = '\0';
1047 logfont.lfPitchAndFamily = DEFAULT_PITCH;
1048 font_enum.hdc = hdc;
1049 font_enum.list = Qnil;
1050 EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) font_enum_callback_1,
1051 (LPARAM) (&font_enum), 0);
1052 return font_enum.list;
1056 mswindows_create_font_variant (Lisp_Font_Instance* f,
1057 int under, int strike)
1064 assert (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) == NULL);
1066 if (GetObject (FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0),
1067 sizeof (lf), (void*) &lf) == 0)
1069 hfont = MSWINDOWS_BAD_HFONT;
1073 lf.lfUnderline = under;
1074 lf.lfStrikeOut = strike;
1076 hfont = CreateFontIndirect (&lf);
1078 hfont = MSWINDOWS_BAD_HFONT;
1081 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike) = hfont;
1086 mswindows_get_hfont (Lisp_Font_Instance* f,
1087 int under, int strike)
1090 HFONT hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, under, strike);
1093 hfont = mswindows_create_font_variant (f, under, strike);
1095 /* If strikeout/underline variant of the font could not be
1096 created, then use the base version of the font */
1097 if (hfont == MSWINDOWS_BAD_HFONT)
1098 hfont = FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0);
1100 assert (hfont != NULL && hfont != MSWINDOWS_BAD_HFONT);
1105 /************************************************************************/
1107 /************************************************************************/
1110 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
1111 Lisp_Object device, Error_behavior errb)
1113 const char *extname;
1116 TO_EXTERNAL_FORMAT (LISP_STRING, name,
1117 C_STRING_ALLOCA, extname,
1119 color = mswindows_string_to_color(extname);
1122 c->data = xnew (struct mswindows_color_instance_data);
1123 COLOR_INSTANCE_MSWINDOWS_COLOR (c) = color;
1126 maybe_signal_simple_error ("Unrecognized color", name, Qcolor, errb);
1132 mswindows_mark_color_instance (Lisp_Color_Instance *c)
1138 mswindows_print_color_instance (Lisp_Color_Instance *c,
1139 Lisp_Object printcharfun,
1143 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
1144 sprintf (buf, " %06ld=(%04X,%04X,%04X)", color & 0xffffff,
1145 GetRValue(color)*257, GetGValue(color)*257, GetBValue(color)*257);
1146 write_c_string (buf, printcharfun);
1150 mswindows_finalize_color_instance (Lisp_Color_Instance *c)
1160 mswindows_color_instance_equal (Lisp_Color_Instance *c1,
1161 Lisp_Color_Instance *c2,
1164 return (COLOR_INSTANCE_MSWINDOWS_COLOR(c1) == COLOR_INSTANCE_MSWINDOWS_COLOR(c2));
1167 static unsigned long
1168 mswindows_color_instance_hash (Lisp_Color_Instance *c, int depth)
1170 return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR(c);
1174 mswindows_color_instance_rgb_components (Lisp_Color_Instance *c)
1176 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
1177 return list3 (make_int (GetRValue (color) * 257),
1178 make_int (GetGValue (color) * 257),
1179 make_int (GetBValue (color) * 257));
1183 mswindows_valid_color_name_p (struct device *d, Lisp_Object color)
1185 const char *extname;
1187 TO_EXTERNAL_FORMAT (LISP_STRING, color,
1188 C_STRING_ALLOCA, extname,
1190 return (mswindows_string_to_color(extname)!=-1);
1196 mswindows_finalize_font_instance (Lisp_Font_Instance *f);
1199 * This is a work horse for both mswindows_initialize_font_instanc and
1200 * msprinter_initialize_font_instance.
1203 initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
1204 Lisp_Object device_font_list, HDC hdc,
1205 Error_behavior errb)
1207 const char *extname;
1211 char fontname[LF_FACESIZE], weight[LF_FACESIZE], *style, points[8];
1212 char effects[LF_FACESIZE], charset[LF_FACESIZE];
1214 HFONT hfont, hfont2;
1217 extname = XSTRING_DATA (name);
1220 * mswindows fonts look like:
1221 * fontname[:[weight ][style][:pointsize[:effects]]][:charset]
1222 * The font name field shouldn't be empty.
1225 * Lucida Console:Regular:10
1229 * Courier New:Bold Italic:10:underline strikeout:western
1232 fields = sscanf (extname, "%31[^:]:%31[^:]:%7[^:]:%31[^:]:%31s",
1233 fontname, weight, points, effects, charset);
1235 /* This function is implemented in a fairly ad-hoc manner.
1236 * The general idea is to validate and canonicalize each of the above fields
1237 * at the same time as we build up the win32 LOGFONT structure. This enables
1238 * us to use match_font() on a canonicalized font string to check the
1239 * availability of the requested font */
1243 maybe_signal_simple_error ("Invalid font", name, Qfont, errb);
1247 if (fields>0 && strlen(fontname))
1249 strncpy (logfont.lfFaceName, fontname, LF_FACESIZE);
1250 logfont.lfFaceName[LF_FACESIZE-1] = 0;
1254 maybe_signal_simple_error ("Must specify a font name", name, Qfont, errb);
1260 strcpy (weight, fontweight_map[0].name);
1262 /* Maybe split weight into weight and style */
1263 if ((c=strchr(weight, ' ')))
1271 for (i=0; i<countof (fontweight_map); i++)
1272 if (!stricmp (weight, fontweight_map[i].name))
1274 logfont.lfWeight = fontweight_map[i].value;
1277 if (i == countof (fontweight_map)) /* No matching weight */
1281 logfont.lfWeight = FW_REGULAR;
1282 style = weight; /* May have specified style without weight */
1286 maybe_signal_simple_error ("Invalid font weight", name, Qfont, errb);
1293 /* #### what about oblique? */
1294 if (stricmp (style,"italic") == 0)
1295 logfont.lfItalic = TRUE;
1298 maybe_signal_simple_error ("Invalid font weight or style", name, Qfont, errb);
1302 /* Glue weight and style together again */
1303 if (weight != style)
1307 logfont.lfItalic = FALSE;
1310 pt = 10; /* #### Should we reject strings that don't specify a size? */
1311 else if ((pt=atoi(points)) == 0)
1313 maybe_signal_simple_error ("Invalid font pointsize", name, Qfont, errb);
1317 /* Formula for pointsize->height from LOGFONT docs in MSVC5 Platform SDK */
1318 logfont.lfHeight = -MulDiv(pt, GetDeviceCaps (hdc, LOGPIXELSY), 72);
1319 logfont.lfWidth = 0;
1322 logfont.lfUnderline = FALSE;
1323 logfont.lfStrikeOut = FALSE;
1324 if (fields >= 4 && effects[0] != '\0')
1328 /* Maybe split effects into effects and effects2 */
1329 if ((c=strchr (effects, ' ')))
1337 if (stricmp (effects, "underline") == 0)
1338 logfont.lfUnderline = TRUE;
1339 else if (stricmp (effects, "strikeout") == 0)
1340 logfont.lfStrikeOut = TRUE;
1343 maybe_signal_simple_error ("Invalid font effect", name, Qfont, errb);
1347 if (effects2 && effects2[0] != '\0')
1349 if (stricmp (effects2, "underline") == 0)
1350 logfont.lfUnderline = TRUE;
1351 else if (stricmp (effects2, "strikeout") == 0)
1352 logfont.lfStrikeOut = TRUE;
1355 maybe_signal_simple_error ("Invalid font effect", name,
1361 /* Regenerate sanitised effects string */
1362 if (logfont.lfUnderline)
1364 if (logfont.lfStrikeOut)
1365 strcpy (effects, "underline strikeout");
1367 strcpy (effects, "underline");
1369 else if (logfont.lfStrikeOut)
1370 strcpy (effects, "strikeout");
1376 /* charset can be specified even if earlier fields havn't been */
1379 if ((c=strchr (extname, ':')) && (c=strchr (c+1, ':')) &&
1380 (c=strchr (c+1, ':')) && (c=strchr (c+1, ':')))
1382 strncpy (charset, c+1, LF_FACESIZE);
1383 charset[LF_FACESIZE-1] = '\0';
1386 strcpy (charset, charset_map[0].name);
1389 for (i=0; i<countof (charset_map); i++)
1390 if (!stricmp (charset, charset_map[i].name))
1392 logfont.lfCharSet = charset_map[i].value;
1396 if (i == countof (charset_map)) /* No matching charset */
1398 maybe_signal_simple_error ("Invalid charset", name, Qfont, errb);
1403 logfont.lfEscapement = logfont.lfOrientation = 0;
1405 logfont.lfOutPrecision = OUT_DEFAULT_PRECIS;
1406 logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
1407 logfont.lfQuality = DEFAULT_QUALITY;
1409 logfont.lfOutPrecision = OUT_STROKE_PRECIS;
1410 logfont.lfClipPrecision = CLIP_STROKE_PRECIS;
1411 logfont.lfQuality = PROOF_QUALITY;
1413 /* Default to monospaced if the specified fontname doesn't exist. */
1414 logfont.lfPitchAndFamily = FF_MODERN;
1416 /* Windows will silently substitute a default font if the fontname specifies
1417 a non-existent font. This is bad for screen fonts because it doesn't
1418 allow higher-level code to see the error and to act appropriately.
1419 For instance complex_vars_of_faces() sets up a fallback list of fonts
1420 for the default face. */
1422 if (!NILP (device_font_list))
1424 Lisp_Object fonttail;
1425 char truename[MSW_FONTSIZE];
1427 sprintf (truename, "%s:%s:%d:%s:%s", fontname, weight, pt, effects, charset);
1428 LIST_LOOP (fonttail, device_font_list)
1430 if (match_font (XSTRING_DATA (XCAR (fonttail)), truename, NULL))
1433 if (NILP (fonttail))
1435 maybe_signal_simple_error ("No matching font", name, Qfont, errb);
1440 if ((hfont = CreateFontIndirect(&logfont)) == NULL)
1442 maybe_signal_simple_error ("Couldn't create font", name, Qfont, errb);
1446 f->data = xnew_and_zero (struct mswindows_font_instance_data);
1447 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0) = hfont;
1449 /* Some underlined fonts have the descent of one pixel more than their
1450 non-underlined counterparts. Font variants though are assumed to have
1451 identical metrics. So get the font metrics from the underlined variant
1453 hfont2 = mswindows_create_font_variant (f, 1, 0);
1454 if (hfont2 != MSWINDOWS_BAD_HFONT)
1457 hfont2 = (HFONT) SelectObject (hdc, hfont);
1460 mswindows_finalize_font_instance (f);
1461 maybe_signal_simple_error ("Couldn't map font", name, Qfont, errb);
1464 GetTextMetrics (hdc, &metrics);
1465 SelectObject(hdc, hfont2);
1467 f->width = (unsigned short) metrics.tmAveCharWidth;
1468 f->height = (unsigned short) metrics.tmHeight;
1469 f->ascent = (unsigned short) metrics.tmAscent;
1470 f->descent = (unsigned short) metrics.tmDescent;
1471 f->proportional_p = (metrics.tmPitchAndFamily & TMPF_FIXED_PITCH);
1477 mswindows_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
1478 Lisp_Object device, Error_behavior errb)
1480 HDC hdc = CreateCompatibleDC (NULL);
1481 Lisp_Object font_list = DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device));
1482 int res = initialize_font_instance (f, name, font_list, hdc, errb);
1488 msprinter_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name,
1489 Lisp_Object device, Error_behavior errb)
1491 HDC hdc = DEVICE_MSPRINTER_HDC (XDEVICE (device));
1492 Lisp_Object font_list = DEVICE_MSPRINTER_FONTLIST (XDEVICE (device));
1493 return initialize_font_instance (f, name, font_list, hdc, errb);
1497 mswindows_finalize_font_instance (Lisp_Font_Instance *f)
1503 for (i = 0; i < MSWINDOWS_NUM_FONT_VARIANTS; i++)
1505 if (FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i) != NULL
1506 && FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i) != MSWINDOWS_BAD_HFONT)
1507 DeleteObject (FONT_INSTANCE_MSWINDOWS_HFONT_I (f, i));
1517 mswindows_mark_font_instance (Lisp_Font_Instance *f)
1523 mswindows_print_font_instance (Lisp_Font_Instance *f,
1524 Lisp_Object printcharfun,
1528 sprintf (buf, " 0x%lx",
1529 (unsigned long)FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f,0,0));
1530 write_c_string (buf, printcharfun);
1534 mswindows_list_fonts (Lisp_Object pattern, Lisp_Object device)
1536 Lisp_Object fonttail, result = Qnil;
1539 TO_EXTERNAL_FORMAT (LISP_STRING, pattern,
1540 C_STRING_ALLOCA, extpattern,
1543 LIST_LOOP (fonttail, DEVICE_MSWINDOWS_FONTLIST (XDEVICE (device)))
1545 if (match_font (XSTRING_DATA (XCAR (fonttail)), extpattern, NULL))
1546 result = Fcons (XCAR (fonttail), result);
1549 return Fnreverse (result);
1552 /* Fill in missing parts of a font spec. This is primarily intended as a
1553 * helper function for the functions below.
1554 * mswindows fonts look like:
1555 * fontname[:[weight][ style][:pointsize[:effects]]][:charset]
1556 * A minimal mswindows font spec looks like:
1558 * A maximal mswindows font spec looks like:
1559 * Courier New:Bold Italic:10:underline strikeout:Western
1560 * Missing parts of the font spec should be filled in with these values:
1561 * Courier New:Regular:10::Western */
1563 mswindows_font_instance_truename (Lisp_Font_Instance *f, Error_behavior errb)
1566 char *name = (char *) XSTRING_DATA (f->name);
1568 char* extname = (char*) alloca (strlen (name) + 19);
1569 strcpy (extname, name);
1571 while ((ptr = strchr (ptr, ':')) != 0)
1580 strcat (extname, ":Regular:10::Western");
1583 strcat (extname, ":10::Western");
1586 strcat (extname, "::Western");
1589 strcat (extname, ":Western");
1594 return build_ext_string (extname, Qnative);
1600 mswindows_font_spec_matches_charset (struct device *d, Lisp_Object charset,
1601 const Bufbyte *nonreloc, Lisp_Object reloc,
1602 Bytecount offset, Bytecount length)
1604 /* #### Implement me */
1605 if (UNBOUNDP (charset))
1611 /* find a font spec that matches font spec FONT and also matches
1612 (the registry of) CHARSET. */
1614 mswindows_find_charset_font (Lisp_Object device, Lisp_Object font,
1615 Lisp_Object charset)
1617 /* #### Implement me */
1618 return build_string ("Courier New:Regular:10");
1624 /************************************************************************/
1626 /************************************************************************/
1628 DEFUN ("mswindows-color-list", Fmswindows_color_list, 0, 0, 0, /*
1629 Return a list of the colors available on mswindows devices.
1633 Lisp_Object result = Qnil;
1636 for (i=0; i<countof (mswindows_X_color_map); i++)
1637 result = Fcons (build_string (mswindows_X_color_map[i].name), result);
1639 return Fnreverse (result);
1644 /************************************************************************/
1645 /* initialization */
1646 /************************************************************************/
1649 syms_of_objects_mswindows (void)
1651 DEFSUBR (Fmswindows_color_list);
1655 console_type_create_objects_mswindows (void)
1657 /* object methods */
1658 CONSOLE_HAS_METHOD (mswindows, initialize_color_instance);
1659 /* CONSOLE_HAS_METHOD (mswindows, mark_color_instance); */
1660 CONSOLE_HAS_METHOD (mswindows, print_color_instance);
1661 CONSOLE_HAS_METHOD (mswindows, finalize_color_instance);
1662 CONSOLE_HAS_METHOD (mswindows, color_instance_equal);
1663 CONSOLE_HAS_METHOD (mswindows, color_instance_hash);
1664 CONSOLE_HAS_METHOD (mswindows, color_instance_rgb_components);
1665 CONSOLE_HAS_METHOD (mswindows, valid_color_name_p);
1667 CONSOLE_HAS_METHOD (mswindows, initialize_font_instance);
1668 /* CONSOLE_HAS_METHOD (mswindows, mark_font_instance); */
1669 CONSOLE_HAS_METHOD (mswindows, print_font_instance);
1670 CONSOLE_HAS_METHOD (mswindows, finalize_font_instance);
1671 CONSOLE_HAS_METHOD (mswindows, font_instance_truename);
1672 CONSOLE_HAS_METHOD (mswindows, list_fonts);
1674 CONSOLE_HAS_METHOD (mswindows, font_spec_matches_charset);
1675 CONSOLE_HAS_METHOD (mswindows, find_charset_font);
1678 /* Printer methods - delegate most to windows methods,
1679 since graphical objects behave the same way. */
1681 CONSOLE_INHERITS_METHOD (msprinter, mswindows, initialize_color_instance);
1682 /* CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_color_instance); */
1683 CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_color_instance);
1684 CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_color_instance);
1685 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_equal);
1686 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_hash);
1687 CONSOLE_INHERITS_METHOD (msprinter, mswindows, color_instance_rgb_components);
1688 CONSOLE_INHERITS_METHOD (msprinter, mswindows, valid_color_name_p);
1690 CONSOLE_HAS_METHOD (msprinter, initialize_font_instance);
1691 /* CONSOLE_INHERITS_METHOD (msprinter, mswindows, mark_font_instance); */
1692 CONSOLE_INHERITS_METHOD (msprinter, mswindows, print_font_instance);
1693 CONSOLE_INHERITS_METHOD (msprinter, mswindows, finalize_font_instance);
1694 CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_instance_truename);
1695 CONSOLE_INHERITS_METHOD (msprinter, mswindows, list_fonts);
1697 CONSOLE_INHERITS_METHOD (msprinter, mswindows, font_spec_matches_charset);
1698 CONSOLE_INHERITS_METHOD (msprinter, mswindows, find_charset_font);
1703 vars_of_objects_mswindows (void)