xref: /reactos/sdk/include/psdk/wingdi.h (revision 40462c92)
1 #ifndef _WINGDI_H
2 #define _WINGDI_H
3 #define _WINGDI_
4 
5 #ifndef NOGDI
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 #ifdef _MSC_VER
12 #pragma warning(push)
13 #pragma warning(disable:4201)
14 #pragma warning(disable:4820)
15 #endif
16 
17 /* Get/SetSystemPaletteUse() values */
18 #define SYSPAL_ERROR        0
19 #define SYSPAL_STATIC       1
20 #define SYSPAL_NOSTATIC     2
21 #define SYSPAL_NOSTATIC256  3
22 
23 #define WINGDIAPI
24 
25 #define NTM_NONNEGATIVE_AC  0x00010000
26 #define NTM_PS_OPENTYPE     0x00020000
27 #define NTM_TT_OPENTYPE     0x00040000
28 #define NTM_MULTIPLEMASTER  0x00080000
29 #define NTM_TYPE1           0x00100000
30 #define NTM_DSIG            0x00200000
31 
32 #define AC_SRC_OVER 0
33 #define AC_SRC_ALPHA 1
34 #define BI_RGB 0
35 #define BI_RLE8 1
36 #define BI_RLE4 2
37 #define BI_BITFIELDS 3
38 #define BI_JPEG 4
39 #define BI_PNG 5
40 #define LF_FACESIZE	32
41 #define LF_FULLFACESIZE	64
42 #define CA_NEGATIVE	1
43 #define CA_LOG_FILTER	2
44 #define ILLUMINANT_DEVICE_DEFAULT	0
45 #define ILLUMINANT_A	1
46 #define ILLUMINANT_B	2
47 #define ILLUMINANT_C	3
48 #define ILLUMINANT_D50	4
49 #define ILLUMINANT_D55	5
50 #define ILLUMINANT_D65	6
51 #define ILLUMINANT_D75	7
52 #define ILLUMINANT_F2	8
53 #define ILLUMINANT_MAX_INDEX	ILLUMINANT_F2
54 #define ILLUMINANT_TUNGSTEN	ILLUMINANT_A
55 #define ILLUMINANT_DAYLIGHT	ILLUMINANT_C
56 #define ILLUMINANT_FLUORESCENT	ILLUMINANT_F2
57 #define ILLUMINANT_NTSC	ILLUMINANT_C
58 #define RGB_GAMMA_MIN	2500
59 #define RGB_GAMMA_MAX	65000
60 #define REFERENCE_WHITE_MIN	6000
61 #define REFERENCE_WHITE_MAX	10000
62 #define REFERENCE_BLACK_MIN	0
63 #define REFERENCE_BLACK_MAX	4000
64 #define COLOR_ADJ_MIN	(-100)
65 #define COLOR_ADJ_MAX	100
66 #define CCHDEVICENAME 32
67 #define CCHFORMNAME 32
68 #define DI_COMPAT	4
69 #define DI_DEFAULTSIZE	8
70 #define DI_IMAGE	2
71 #define DI_MASK	1
72 #define DI_NORMAL	3
73 #define DI_APPBANDING 1
74 #define DI_NOMIRROR	16
75 #define EMR_HEADER	1
76 #define EMR_POLYBEZIER 2
77 #define EMR_POLYGON	3
78 #define EMR_POLYLINE	4
79 #define EMR_POLYBEZIERTO	5
80 #define EMR_POLYLINETO 6
81 #define EMR_POLYPOLYLINE	7
82 #define EMR_POLYPOLYGON 8
83 #define EMR_SETWINDOWEXTEX	9
84 #define EMR_SETWINDOWORGEX	10
85 #define EMR_SETVIEWPORTEXTEX 11
86 #define EMR_SETVIEWPORTORGEX 12
87 #define EMR_SETBRUSHORGEX 13
88 #define EMR_EOF 14
89 #define EMR_SETPIXELV 15
90 #define EMR_SETMAPPERFLAGS 16
91 #define EMR_SETMAPMODE 17
92 #define EMR_SETBKMODE 18
93 #define EMR_SETPOLYFILLMODE 19
94 #define EMR_SETROP2 20
95 #define EMR_SETSTRETCHBLTMODE 21
96 #define EMR_SETTEXTALIGN 22
97 #define EMR_SETCOLORADJUSTMENT 23
98 #define EMR_SETTEXTCOLOR 24
99 #define EMR_SETBKCOLOR 25
100 #define EMR_OFFSETCLIPRGN 26
101 #define EMR_MOVETOEX 27
102 #define EMR_SETMETARGN 28
103 #define EMR_EXCLUDECLIPRECT 29
104 #define EMR_INTERSECTCLIPRECT 30
105 #define EMR_SCALEVIEWPORTEXTEX 31
106 #define EMR_SCALEWINDOWEXTEX 32
107 #define EMR_SAVEDC 33
108 #define EMR_RESTOREDC 34
109 #define EMR_SETWORLDTRANSFORM 35
110 #define EMR_MODIFYWORLDTRANSFORM 36
111 #define EMR_SELECTOBJECT 37
112 #define EMR_CREATEPEN 38
113 #define EMR_CREATEBRUSHINDIRECT 39
114 #define EMR_DELETEOBJECT 40
115 #define EMR_ANGLEARC 41
116 #define EMR_ELLIPSE  42
117 #define EMR_RECTANGLE 43
118 #define EMR_ROUNDRECT 44
119 #define EMR_ARC 45
120 #define EMR_CHORD 46
121 #define EMR_PIE 47
122 #define EMR_SELECTPALETTE 48
123 #define EMR_CREATEPALETTE 49
124 #define EMR_SETPALETTEENTRIES 50
125 #define EMR_RESIZEPALETTE 51
126 #define EMR_REALIZEPALETTE 52
127 #define EMR_EXTFLOODFILL 53
128 #define EMR_LINETO 54
129 #define EMR_ARCTO 55
130 #define EMR_POLYDRAW 56
131 #define EMR_SETARCDIRECTION 57
132 #define EMR_SETMITERLIMIT 58
133 #define EMR_BEGINPATH 59
134 #define EMR_ENDPATH 60
135 #define EMR_CLOSEFIGURE 61
136 #define EMR_FILLPATH 62
137 #define EMR_STROKEANDFILLPATH 63
138 #define EMR_STROKEPATH 64
139 #define EMR_FLATTENPATH 65
140 #define EMR_WIDENPATH 66
141 #define EMR_SELECTCLIPPATH 67
142 #define EMR_ABORTPATH 68
143 #define EMR_GDICOMMENT 70
144 #define EMR_FILLRGN 71
145 #define EMR_FRAMERGN 72
146 #define EMR_INVERTRGN 73
147 #define EMR_PAINTRGN 74
148 #define EMR_EXTSELECTCLIPRGN 75
149 #define EMR_BITBLT 76
150 #define EMR_STRETCHBLT 77
151 #define EMR_MASKBLT 78
152 #define EMR_PLGBLT 79
153 #define EMR_SETDIBITSTODEVICE 80
154 #define EMR_STRETCHDIBITS 81
155 #define EMR_EXTCREATEFONTINDIRECTW 82
156 #define EMR_EXTTEXTOUTA 83
157 #define EMR_EXTTEXTOUTW 84
158 #define EMR_POLYBEZIER16 85
159 #define EMR_POLYGON16 86
160 #define EMR_POLYLINE16 87
161 #define EMR_POLYBEZIERTO16 88
162 #define EMR_POLYLINETO16 89
163 #define EMR_POLYPOLYLINE16 90
164 #define EMR_POLYPOLYGON16 91
165 #define EMR_POLYDRAW16 92
166 #define EMR_CREATEMONOBRUSH 93
167 #define EMR_CREATEDIBPATTERNBRUSHPT 94
168 #define EMR_EXTCREATEPEN 95
169 #define EMR_POLYTEXTOUTA 96
170 #define EMR_POLYTEXTOUTW 97
171 #define EMR_SETICMMODE 98
172 #define EMR_CREATECOLORSPACE 99
173 #define EMR_SETCOLORSPACE 100
174 #define EMR_DELETECOLORSPACE 101
175 #define EMR_GLSRECORD 102
176 #define EMR_GLSBOUNDEDRECORD 103
177 #define EMR_PIXELFORMAT 104
178 #if (_WIN32_WINNT >= 0x0500)
179 #define EMR_DRAWESCAPE 105
180 #define EMR_EXTESCAPE 106
181 #define EMR_STARTDOC 107
182 #define EMR_SMALLTEXTOUT 108
183 #define EMR_FORCEUFIMAPPING 109
184 #define EMR_NAMEDESCAPE 110
185 #define EMR_COLORCORRECTPALETTE 111
186 #define EMR_SETICMPROFILEA 112
187 #define EMR_SETICMPROFILEW 113
188 #define EMR_ALPHABLEND 114
189 #define EMR_ALPHADIBBLEND 115
190 #define EMR_SETLAYOUT 115
191 #define EMR_TRANSPARENTBLT 116
192 #define EMR_TRANSPARENTDIB 117
193 #define EMR_RESERVED_117 117
194 #define EMR_GRADIENTFILL 118
195 #define EMR_SETLINKEDUFIS 119
196 #define EMR_SETTEXTJUSTIFICATION 120
197 #define EMR_COLORMATCHTOTARGETW 121
198 #define EMR_CREATECOLORSPACEW 122
199 
200 #define EMR_MIN 1
201 #define EMR_MAX 122
202 
203 #endif
204 #define ENHMETA_SIGNATURE 1179469088
205 #define EPS_SIGNATURE 0x46535045
206 #if (_WIN32_WINNT >= 0x0500)
207 #define FR_PRIVATE 0x10
208 #define FR_NOT_ENUM 0x20
209 #endif
210 #define META_SETBKCOLOR	0x201
211 #define META_SETBKMODE	0x102
212 #define META_SETMAPMODE	0x103
213 #define META_SETROP2	0x104
214 #define META_SETRELABS	0x105
215 #define META_SETPOLYFILLMODE	0x106
216 #define META_SETSTRETCHBLTMODE	0x107
217 #define META_SETTEXTCHAREXTRA	0x108
218 #define META_SETTEXTCOLOR	0x209
219 #define META_SETTEXTJUSTIFICATION	0x20A
220 #define META_SETWINDOWORG	0x20B
221 #define META_SETWINDOWEXT	0x20C
222 #define META_SETVIEWPORTORG	0x20D
223 #define META_SETVIEWPORTEXT	0x20E
224 #define META_OFFSETWINDOWORG	0x20F
225 #define META_SCALEWINDOWEXT	0x410
226 #define META_OFFSETVIEWPORTORG	0x211
227 #define META_SCALEVIEWPORTEXT	0x412
228 #define META_LINETO	0x213
229 #define META_MOVETO	0x214
230 #define META_EXCLUDECLIPRECT	0x415
231 #define META_INTERSECTCLIPRECT	0x416
232 #define META_ARC	0x817
233 #define META_ELLIPSE	0x418
234 #define META_FLOODFILL	0x419
235 #define META_PIE	0x81A
236 #define META_RECTANGLE	0x41B
237 #define META_ROUNDRECT	0x61C
238 #define META_PATBLT	0x61D
239 #define META_SAVEDC	0x1E
240 #define META_SETPIXEL	0x41F
241 #define META_OFFSETCLIPRGN	0x220
242 #define META_TEXTOUT	0x521
243 #define META_BITBLT	0x922
244 #define META_STRETCHBLT	0xB23
245 #define META_POLYGON	0x324
246 #define META_POLYLINE	0x325
247 #define META_ESCAPE	0x626
248 #define META_RESTOREDC	0x127
249 #define META_FILLREGION	0x228
250 #define META_FRAMEREGION	0x429
251 #define META_INVERTREGION	0x12A
252 #define META_PAINTREGION	0x12B
253 #define META_SELECTCLIPREGION	0x12C
254 #define META_SELECTOBJECT	0x12D
255 #define META_SETTEXTALIGN	0x12E
256 #define META_CHORD	0x830
257 #define META_SETMAPPERFLAGS	0x231
258 #define META_EXTTEXTOUT	0xa32
259 #define META_SETDIBTODEV	0xd33
260 #define META_SELECTPALETTE	0x234
261 #define META_REALIZEPALETTE	0x35
262 #define META_ANIMATEPALETTE	0x436
263 #define META_SETPALENTRIES	0x37
264 #define META_POLYPOLYGON	0x538
265 #define META_RESIZEPALETTE	0x139
266 #define META_DIBBITBLT	0x940
267 #define META_DIBSTRETCHBLT	0xb41
268 #define META_DIBCREATEPATTERNBRUSH	0x142
269 #define META_STRETCHDIB	0xf43
270 #define META_EXTFLOODFILL	0x548
271 #define META_DELETEOBJECT	0x1f0
272 #define META_CREATEPALETTE	0xf7
273 #define META_CREATEPATTERNBRUSH	0x1F9
274 #define META_CREATEPENINDIRECT	0x2FA
275 #define META_CREATEFONTINDIRECT	0x2FB
276 #define META_CREATEBRUSHINDIRECT	0x2FC
277 #define META_CREATEREGION	0x6FF
278 #define META_DRAWTEXT	0x062F
279 #define META_RESETDC	0x014C
280 #define META_STARTDOC	0x014D
281 #define META_STARTPAGE	0x004F
282 #define META_ENDPAGE	0x0050
283 #define META_ABORTDOC	0x0052
284 #define META_ENDDOC	0x005E
285 #define META_CREATEBRUSH	0x00F8
286 #define META_CREATEBITMAPINDIRECT	0x02FD
287 #define META_CREATEBITMAP	0x06FE
288 #define PT_MOVETO	6
289 #define PT_LINETO	2
290 #define PT_BEZIERTO	4
291 #define PT_CLOSEFIGURE 1
292 #define ELF_VENDOR_SIZE	4
293 #define ELF_VERSION	0
294 #define ELF_CULTURE_LATIN	0
295 #define PFD_TYPE_RGBA	0
296 #define PFD_TYPE_COLORINDEX	1
297 #define PFD_MAIN_PLANE	0
298 #define PFD_OVERLAY_PLANE	1
299 #define PFD_UNDERLAY_PLANE	(-1)
300 #define PFD_DOUBLEBUFFER	1
301 #define PFD_STEREO	2
302 #define PFD_DRAW_TO_WINDOW	4
303 #define PFD_DRAW_TO_BITMAP	8
304 #define PFD_SUPPORT_GDI	16
305 #define PFD_SUPPORT_OPENGL	32
306 #define PFD_GENERIC_FORMAT	64
307 #define PFD_NEED_PALETTE	128
308 #define PFD_NEED_SYSTEM_PALETTE	0x00000100
309 #define PFD_SWAP_EXCHANGE	0x00000200
310 #define PFD_SWAP_COPY	0x00000400
311 #define PFD_SWAP_LAYER_BUFFERS	0x00000800
312 #define PFD_GENERIC_ACCELERATED	0x00001000
313 #define PFD_SUPPORT_COMPOSITION 0x00008000
314 #define PFD_DEPTH_DONTCARE	0x20000000
315 #define PFD_DOUBLEBUFFER_DONTCARE	0x40000000
316 #define PFD_STEREO_DONTCARE	0x80000000
317 #define SP_ERROR	(-1)
318 #define SP_OUTOFDISK	(-4)
319 #define SP_OUTOFMEMORY	(-5)
320 #define SP_USERABORT	(-3)
321 #define SP_APPABORT	(-2)
322 #define BLACKNESS	0x42
323 #define NOTSRCERASE	0x1100A6
324 #define NOTSRCCOPY	0x330008
325 #define SRCERASE	0x440328
326 #define DSTINVERT	0x550009
327 #define PATINVERT	0x5A0049
328 #define SRCINVERT	0x660046
329 #define SRCAND	0x8800C6
330 #define MERGEPAINT	0xBB0226
331 #define MERGECOPY	0xC000CA
332 #define SRCCOPY 0xCC0020
333 #define SRCPAINT	0xEE0086
334 #define PATCOPY	0xF00021
335 #define PATPAINT	0xFB0A09
336 #define WHITENESS	0xFF0062
337 #define R2_BLACK	1
338 #define R2_COPYPEN	13
339 #define R2_MASKNOTPEN	3
340 #define R2_MASKPEN	9
341 #define R2_MASKPENNOT	5
342 #define R2_MERGENOTPEN	12
343 #define R2_MERGEPEN	15
344 #define R2_MERGEPENNOT	14
345 #define R2_NOP	11
346 #define R2_NOT	6
347 #define R2_NOTCOPYPEN	4
348 #define R2_NOTMASKPEN	8
349 #define R2_NOTMERGEPEN	2
350 #define R2_NOTXORPEN	10
351 #define R2_WHITE	16
352 #define R2_XORPEN	7
353 #define CM_OUT_OF_GAMUT	255
354 #define CM_IN_GAMUT	0
355 #define RGN_AND 1
356 #define RGN_COPY	5
357 #define RGN_DIFF	4
358 #define RGN_OR	2
359 #define RGN_XOR	3
360 #define NULLREGION	1
361 #define SIMPLEREGION	2
362 #define COMPLEXREGION	3
363 #define ERROR 0
364 #define CBM_INIT	4
365 #define DIB_PAL_COLORS	1
366 #define DIB_RGB_COLORS	0
367 #define FW_DONTCARE	0
368 #define FW_THIN	100
369 #define FW_EXTRALIGHT	200
370 #define FW_ULTRALIGHT	FW_EXTRALIGHT
371 #define FW_LIGHT	300
372 #define FW_NORMAL	400
373 #define FW_REGULAR	400
374 #define FW_MEDIUM	500
375 #define FW_SEMIBOLD	600
376 #define FW_DEMIBOLD	FW_SEMIBOLD
377 #define FW_BOLD	700
378 #define FW_EXTRABOLD	800
379 #define FW_ULTRABOLD	FW_EXTRABOLD
380 #define FW_HEAVY	900
381 #define FW_BLACK	FW_HEAVY
382 #define ANSI_CHARSET	0
383 #define DEFAULT_CHARSET	1
384 #define SYMBOL_CHARSET	2
385 #define SHIFTJIS_CHARSET	128
386 #define HANGEUL_CHARSET	129
387 #define HANGUL_CHARSET  129
388 #define GB2312_CHARSET	134
389 #define CHINESEBIG5_CHARSET	136
390 #define GREEK_CHARSET	161
391 #define TURKISH_CHARSET	162
392 #define HEBREW_CHARSET	177
393 #define ARABIC_CHARSET	178
394 #define BALTIC_CHARSET	186
395 #define RUSSIAN_CHARSET	204
396 #define THAI_CHARSET	222
397 #define EE_CHARSET	    238
398 #define EASTEUROPE_CHARSET	238
399 #define OEM_CHARSET	255
400 #define JOHAB_CHARSET	130
401 #define VIETNAMESE_CHARSET	163
402 #define MAC_CHARSET 77
403 /* I don't know if the values of *_CHARSET macros are defined in Windows
404  * or if we can choose them as we want. -- srtxg
405  */
406 #define VISCII_CHARSET        (BYTE)240 /* viscii1.1-1 */
407 #define TCVN_CHARSET          (BYTE)241 /* tcvn-0 */
408 #define KOI8_CHARSET          (BYTE)242 /* koi8-{r,u,ru} */
409 #define ISO3_CHARSET          (BYTE)243 /* iso8859-3 */
410 #define ISO4_CHARSET          (BYTE)244 /* iso8859-4 */
411 #define ISO10_CHARSET         (BYTE)245 /* iso8859-10 */
412 #define CELTIC_CHARSET        (BYTE)246 /* iso8859-14 */
413 
414 #define OUT_DEFAULT_PRECIS	0
415 #define OUT_STRING_PRECIS	1
416 #define OUT_CHARACTER_PRECIS	2
417 #define OUT_STROKE_PRECIS	3
418 #define OUT_TT_PRECIS	4
419 #define OUT_DEVICE_PRECIS	5
420 #define OUT_RASTER_PRECIS	6
421 #define OUT_TT_ONLY_PRECIS	7
422 #define OUT_OUTLINE_PRECIS	8
423 #define OUT_SCREEN_OUTLINE_PRECIS	9
424 #define OUT_PS_ONLY_PRECIS	10
425 #define CLIP_DEFAULT_PRECIS	0
426 #define CLIP_CHARACTER_PRECIS	1
427 #define CLIP_STROKE_PRECIS	2
428 #define CLIP_MASK	15
429 #define CLIP_LH_ANGLES	16
430 #define CLIP_TT_ALWAYS	32
431 #if (_WIN32_WINNT >= _WIN32_WINNT_LONGHORN)
432 #define CLIP_DFA_DISABLE	64
433 #endif
434 #define CLIP_EMBEDDED	128
435 #define DEFAULT_QUALITY	0
436 #define DRAFT_QUALITY	1
437 #define PROOF_QUALITY	2
438 #define NONANTIALIASED_QUALITY 3
439 #define ANTIALIASED_QUALITY 4
440 #define CLEARTYPE_QUALITY 5
441 #define CLEARTYPE_NATURAL_QUALITY 6
442 #define DEFAULT_PITCH	0
443 #define FIXED_PITCH	1
444 #define VARIABLE_PITCH	2
445 #define MONO_FONT 8
446 #define FF_DECORATIVE	80
447 #define FF_DONTCARE	0
448 #define FF_MODERN	48
449 #define FF_ROMAN	16
450 #define FF_SCRIPT	64
451 #define FF_SWISS	32
452 #define PANOSE_COUNT 10
453 #define PAN_FAMILYTYPE_INDEX 0
454 #define PAN_SERIFSTYLE_INDEX 1
455 #define PAN_WEIGHT_INDEX 2
456 #define PAN_PROPORTION_INDEX 3
457 #define PAN_CONTRAST_INDEX 4
458 #define PAN_STROKEVARIATION_INDEX 5
459 #define PAN_ARMSTYLE_INDEX 6
460 #define PAN_LETTERFORM_INDEX 7
461 #define PAN_MIDLINE_INDEX 8
462 #define PAN_XHEIGHT_INDEX 9
463 #define PAN_CULTURE_LATIN 0
464 #define PAN_ANY 0
465 #define PAN_NO_FIT 1
466 #define PAN_FAMILY_TEXT_DISPLAY 2
467 #define PAN_FAMILY_SCRIPT 3
468 #define PAN_FAMILY_DECORATIVE 4
469 #define PAN_FAMILY_PICTORIAL 5
470 #define PAN_SERIF_COVE 2
471 #define PAN_SERIF_OBTUSE_COVE 3
472 #define PAN_SERIF_SQUARE_COVE 4
473 #define PAN_SERIF_OBTUSE_SQUARE_COVE 5
474 #define PAN_SERIF_SQUARE 6
475 #define PAN_SERIF_THIN 7
476 #define PAN_SERIF_BONE 8
477 #define PAN_SERIF_EXAGGERATED 9
478 #define PAN_SERIF_TRIANGLE 10
479 #define PAN_SERIF_NORMAL_SANS 11
480 #define PAN_SERIF_OBTUSE_SANS 12
481 #define PAN_SERIF_PERP_SANS 13
482 #define PAN_SERIF_FLARED 14
483 #define PAN_SERIF_ROUNDED 15
484 #define PAN_WEIGHT_VERY_LIGHT 2
485 #define PAN_WEIGHT_LIGHT 3
486 #define PAN_WEIGHT_THIN 4
487 #define PAN_WEIGHT_BOOK 5
488 #define PAN_WEIGHT_MEDIUM 6
489 #define PAN_WEIGHT_DEMI 7
490 #define PAN_WEIGHT_BOLD 8
491 #define PAN_WEIGHT_HEAVY 9
492 #define PAN_WEIGHT_BLACK 10
493 #define PAN_WEIGHT_NORD 11
494 #define PAN_PROP_OLD_STYLE 2
495 #define PAN_PROP_MODERN 3
496 #define PAN_PROP_EVEN_WIDTH 4
497 #define PAN_PROP_EXPANDED 5
498 #define PAN_PROP_CONDENSED 6
499 #define PAN_PROP_VERY_EXPANDED 7
500 #define PAN_PROP_VERY_CONDENSED 8
501 #define PAN_PROP_MONOSPACED 9
502 #define PAN_CONTRAST_NONE 2
503 #define PAN_CONTRAST_VERY_LOW 3
504 #define PAN_CONTRAST_LOW 4
505 #define PAN_CONTRAST_MEDIUM_LOW 5
506 #define PAN_CONTRAST_MEDIUM 6
507 #define PAN_CONTRAST_MEDIUM_HIGH 7
508 #define PAN_CONTRAST_HIGH 8
509 #define PAN_CONTRAST_VERY_HIGH 9
510 #define PAN_STROKE_GRADUAL_DIAG 2
511 #define PAN_STROKE_GRADUAL_TRAN 3
512 #define PAN_STROKE_GRADUAL_VERT 4
513 #define PAN_STROKE_GRADUAL_HORZ 5
514 #define PAN_STROKE_RAPID_VERT 6
515 #define PAN_STROKE_RAPID_HORZ 7
516 #define PAN_STROKE_INSTANT_VERT 8
517 #define PAN_STRAIGHT_ARMS_HORZ 2
518 #define PAN_STRAIGHT_ARMS_WEDGE 3
519 #define PAN_STRAIGHT_ARMS_VERT 4
520 #define PAN_STRAIGHT_ARMS_SINGLE_SERIF 5
521 #define PAN_STRAIGHT_ARMS_DOUBLE_SERIF 6
522 #define PAN_BENT_ARMS_HORZ 7
523 #define PAN_BENT_ARMS_WEDGE 8
524 #define PAN_BENT_ARMS_VERT 9
525 #define PAN_BENT_ARMS_SINGLE_SERIF 10
526 #define PAN_BENT_ARMS_DOUBLE_SERIF 11
527 #define PAN_LETT_NORMAL_CONTACT 2
528 #define PAN_LETT_NORMAL_WEIGHTED 3
529 #define PAN_LETT_NORMAL_BOXED 4
530 #define PAN_LETT_NORMAL_FLATTENED 5
531 #define PAN_LETT_NORMAL_ROUNDED 6
532 #define PAN_LETT_NORMAL_OFF_CENTER 7
533 #define PAN_LETT_NORMAL_SQUARE 8
534 #define PAN_LETT_OBLIQUE_CONTACT 9
535 #define PAN_LETT_OBLIQUE_WEIGHTED 10
536 #define PAN_LETT_OBLIQUE_BOXED 11
537 #define PAN_LETT_OBLIQUE_FLATTENED 12
538 #define PAN_LETT_OBLIQUE_ROUNDED 13
539 #define PAN_LETT_OBLIQUE_OFF_CENTER 14
540 #define PAN_LETT_OBLIQUE_SQUARE 15
541 #define PAN_MIDLINE_STANDARD_TRIMMED 2
542 #define PAN_MIDLINE_STANDARD_POINTED 3
543 #define PAN_MIDLINE_STANDARD_SERIFED 4
544 #define PAN_MIDLINE_HIGH_TRIMMED 5
545 #define PAN_MIDLINE_HIGH_POINTED 6
546 #define PAN_MIDLINE_HIGH_SERIFED 7
547 #define PAN_MIDLINE_CONSTANT_TRIMMED 8
548 #define PAN_MIDLINE_CONSTANT_POINTED 9
549 #define PAN_MIDLINE_CONSTANT_SERIFED 10
550 #define PAN_MIDLINE_LOW_TRIMMED 11
551 #define PAN_MIDLINE_LOW_POINTED 12
552 #define PAN_MIDLINE_LOW_SERIFED 13
553 #define PAN_XHEIGHT_CONSTANT_SMALL 2
554 #define PAN_XHEIGHT_CONSTANT_STD 3
555 #define PAN_XHEIGHT_CONSTANT_LARGE 4
556 #define PAN_XHEIGHT_DUCKING_SMALL 5
557 #define PAN_XHEIGHT_DUCKING_STD 6
558 #define PAN_XHEIGHT_DUCKING_LARGE 7
559 #define FS_LATIN1 1
560 #define FS_LATIN2 2
561 #define FS_CYRILLIC 4
562 #define FS_GREEK 8
563 #define FS_TURKISH 16
564 #define FS_HEBREW 32
565 #define FS_ARABIC 64
566 #define FS_BALTIC 128
567 #define FS_VIETNAMESE 256
568 #define FS_THAI 0x10000
569 #define FS_JISJAPAN 0x20000
570 #define FS_CHINESESIMP 0x40000
571 #define FS_WANSUNG 0x80000
572 #define FS_CHINESETRAD 0x100000
573 #define FS_JOHAB 0x200000
574 #define FS_SYMBOL 0x80000000
575 #define HS_BDIAGONAL	3
576 #define HS_CROSS	4
577 #define HS_DIAGCROSS	5
578 #define HS_FDIAGONAL	2
579 #define HS_HORIZONTAL	0
580 #define HS_VERTICAL	1
581 #define HS_API_MAX	12
582 #define PS_GEOMETRIC	65536
583 #define PS_COSMETIC	0
584 #define PS_ALTERNATE	8
585 #define PS_SOLID	0
586 #define PS_DASH	1
587 #define PS_DOT	2
588 #define PS_DASHDOT	3
589 #define PS_DASHDOTDOT	4
590 #define PS_NULL	5
591 #define PS_USERSTYLE	7
592 #define PS_INSIDEFRAME	6
593 #define PS_ENDCAP_ROUND	0
594 #define PS_ENDCAP_SQUARE	256
595 #define PS_ENDCAP_FLAT	512
596 #define PS_JOIN_BEVEL	4096
597 #define PS_JOIN_MITER	8192
598 #define PS_JOIN_ROUND	0
599 #define PS_JOIN_MASK    0x0000F000
600 #define PS_STYLE_MASK	15
601 #define PS_ENDCAP_MASK	3840
602 #define PS_TYPE_MASK	983040
603 #define ALTERNATE	1
604 #define WINDING	2
605 #define POLYFILL_LAST	2
606 #define DC_BINNAMES	12
607 #define DC_BINS	6
608 #define DC_COPIES	18
609 #define DC_DRIVER	11
610 #define DC_DATATYPE_PRODUCED	21
611 #define DC_DUPLEX	7
612 #define DC_EMF_COMPLIANT	20
613 #define DC_ENUMRESOLUTIONS	13
614 #define DC_EXTRA	9
615 #define DC_FIELDS	1
616 #define DC_FILEDEPENDENCIES	14
617 #define DC_MAXEXTENT	5
618 #define DC_MINEXTENT	4
619 #define DC_ORIENTATION	17
620 #define DC_PAPERNAMES	16
621 #define DC_PAPERS	2
622 #define DC_PAPERSIZE	3
623 #define DC_SIZE	8
624 #define DC_TRUETYPE	15
625 #define DCTT_BITMAP	1
626 #define DCTT_DOWNLOAD	2
627 #define DCTT_SUBDEV	4
628 #define DCTT_DOWNLOAD_OUTLINE 8
629 #define DC_VERSION	10
630 #define DC_BINADJUST	19
631 #define DC_EMF_COMPLIANT	20
632 #define DC_DATATYPE_PRODUCED	21
633 #define DC_MANUFACTURER	23
634 #define DC_MODEL	24
635 #define DCBA_FACEUPNONE	0
636 #define DCBA_FACEUPCENTER	1
637 #define DCBA_FACEUPLEFT	2
638 #define DCBA_FACEUPRIGHT	3
639 #define DCBA_FACEDOWNNONE	256
640 #define DCBA_FACEDOWNCENTER	257
641 #define DCBA_FACEDOWNLEFT	258
642 #define DCBA_FACEDOWNRIGHT	259
643 #define FLOODFILLBORDER 0
644 #define FLOODFILLSURFACE 1
645 #define ETO_GRAYED            0x00001
646 #define ETO_OPAQUE            0x00002
647 #define ETO_CLIPPED           0x00004
648 #if (WINVER >= 0x0400)
649 #define ETO_GLYPH_INDEX       0x00010
650 #define ETO_RTLREADING        0x00080
651 #define ETO_NUMERICSLOCAL     0x00400
652 #define ETO_NUMERICSLATIN     0x00800
653 #define ETO_IGNORELANGUAGE    0x01000
654 #endif
655 #if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
656 #define ETO_PDY               0x02000
657 #endif
658 #if (_WIN32_WINNT >= _WIN32_WINNT_LONGHORN)
659 #define ETO_REVERSE_INDEX_MAP 0x10000
660 #endif
661 #define GDICOMMENT_WINDOWS_METAFILE (-2147483647)
662 #define GDICOMMENT_BEGINGROUP 2
663 #define GDICOMMENT_ENDGROUP 3
664 #define GDICOMMENT_MULTIFORMATS 1073741828
665 #define GDICOMMENT_IDENTIFIER 1128875079
666 #define AD_COUNTERCLOCKWISE 1
667 #define AD_CLOCKWISE 2
668 #define RDH_RECTANGLES	1
669 #define GCPCLASS_LATIN	1
670 #define GCPCLASS_HEBREW	2
671 #define GCPCLASS_ARABIC	2
672 #define GCPCLASS_NEUTRAL	3
673 #define GCPCLASS_LOCALNUMBER	4
674 #define GCPCLASS_LATINNUMBER	5
675 #define GCPCLASS_LATINNUMERICTERMINATOR	6
676 #define GCPCLASS_LATINNUMERICSEPARATOR	7
677 #define GCPCLASS_NUMERICSEPARATOR	8
678 #define GCPCLASS_PREBOUNDLTR	128
679 #define GCPCLASS_PREBOUNDRTL	64
680 #define GCPCLASS_POSTBOUNDLTR	32
681 #define GCPCLASS_POSTBOUNDRTL	16
682 #define GCPGLYPH_LINKBEFORE	0x8000
683 #define GCPGLYPH_LINKAFTER	0x4000
684 #define DCB_DISABLE 8
685 #define DCB_ENABLE 4
686 #define DCB_RESET 1
687 #define DCB_SET 3
688 #define DCB_ACCUMULATE 2
689 #define DCB_DIRTY	2
690 #define OBJ_BRUSH 2
691 #define OBJ_PEN 1
692 #define OBJ_PAL 5
693 #define OBJ_FONT 6
694 #define OBJ_BITMAP 7
695 #define OBJ_EXTPEN 11
696 #define OBJ_REGION 8
697 #define OBJ_DC 3
698 #define OBJ_MEMDC 10
699 #define OBJ_METAFILE 9
700 #define OBJ_METADC 4
701 #define OBJ_ENHMETAFILE 13
702 #define OBJ_ENHMETADC 12
703 #define OBJ_COLORSPACE 14
704 #define DRIVERVERSION 0
705 #define TECHNOLOGY 2
706 #define DT_PLOTTER 0
707 #define DT_RASDISPLAY 1
708 #define DT_RASPRINTER 2
709 #define DT_RASCAMERA 3
710 #define DT_CHARSTREAM 4
711 #define DT_METAFILE 5
712 #define DT_DISPFILE 6
713 #define HORZSIZE 4
714 #define VERTSIZE 6
715 #define HORZRES 8
716 #define VERTRES 10
717 #define LOGPIXELSX 88
718 #define LOGPIXELSY 90
719 #define BITSPIXEL 12
720 #define PLANES 14
721 #define NUMBRUSHES 16
722 #define NUMPENS 18
723 #define NUMFONTS 22
724 #define NUMCOLORS 24
725 #define NUMMARKERS 20
726 #define ASPECTX 40
727 #define ASPECTY 42
728 #define ASPECTXY 44
729 #define PDEVICESIZE 26
730 #define CLIPCAPS 36
731 #define SIZEPALETTE 104
732 #define NUMRESERVED 106
733 #define COLORRES 108
734 #define PHYSICALWIDTH 110
735 #define PHYSICALHEIGHT 111
736 #define PHYSICALOFFSETX 112
737 #define PHYSICALOFFSETY 113
738 #define SCALINGFACTORX 114
739 #define SCALINGFACTORY 115
740 #define VREFRESH 116
741 #define DESKTOPHORZRES 118
742 #define DESKTOPVERTRES 117
743 #define BLTALIGNMENT 119
744 #define RASTERCAPS 38
745 #define RC_BANDING 2
746 #define RC_BITBLT 1
747 #define RC_BITMAP64 8
748 #define RC_DI_BITMAP 128
749 #define RC_DIBTODEV 512
750 #define RC_FLOODFILL 4096
751 #define RC_GDI20_OUTPUT 16
752 #define RC_PALETTE 256
753 #define RC_SCALING 4
754 #define RC_STRETCHBLT 2048
755 #define RC_STRETCHDIB 8192
756 #define RC_DEVBITS 0x8000
757 #define RC_OP_DX_OUTPUT 0x4000
758 #define CURVECAPS 28
759 #define CC_NONE 0
760 #define CC_CIRCLES 1
761 #define CC_PIE 2
762 #define CC_CHORD 4
763 #define CC_ELLIPSES 8
764 #define CC_WIDE 16
765 #define CC_STYLED 32
766 #define CC_WIDESTYLED 64
767 #define CC_INTERIORS 128
768 #define CC_ROUNDRECT 256
769 #define LINECAPS 30
770 #define LC_NONE 0
771 #define LC_POLYLINE 2
772 #define LC_MARKER 4
773 #define LC_POLYMARKER 8
774 #define LC_WIDE 16
775 #define LC_STYLED 32
776 #define LC_WIDESTYLED 64
777 #define LC_INTERIORS 128
778 #define POLYGONALCAPS 32
779 #define RC_BANDING 2
780 #define RC_BIGFONT 1024
781 #define RC_BITBLT 1
782 #define RC_BITMAP64 8
783 #define RC_DEVBITS 0x8000
784 #define RC_DI_BITMAP 128
785 #define RC_GDI20_OUTPUT 16
786 #define RC_GDI20_STATE 32
787 #define RC_NONE 0
788 #define RC_OP_DX_OUTPUT 0x4000
789 #define RC_PALETTE 256
790 #define RC_SAVEBITMAP 64
791 #define RC_SCALING 4
792 #define PC_NONE 0
793 #define PC_POLYGON 1
794 #define PC_POLYPOLYGON 256
795 #define PC_PATHS 512
796 #define PC_RECTANGLE 2
797 #define PC_WINDPOLYGON 4
798 #define PC_SCANLINE 8
799 #define PC_TRAPEZOID 4
800 #define PC_WIDE 16
801 #define PC_STYLED 32
802 #define PC_WIDESTYLED 64
803 #define PC_INTERIORS 128
804 #define PC_PATHS 512
805 #define TEXTCAPS 34
806 #define TC_OP_CHARACTER 1
807 #define TC_OP_STROKE 2
808 #define TC_CP_STROKE 4
809 #define TC_CR_90 8
810 #define TC_CR_ANY 16
811 #define TC_SF_X_YINDEP 32
812 #define TC_SA_DOUBLE 64
813 #define TC_SA_INTEGER 128
814 #define TC_SA_CONTIN 256
815 #define TC_EA_DOUBLE 512
816 #define TC_IA_ABLE 1024
817 #define TC_UA_ABLE 2048
818 #define TC_SO_ABLE 4096
819 #define TC_RA_ABLE 8192
820 #define TC_VA_ABLE 16384
821 #define TC_RESERVED 32768
822 #define TC_SCROLLBLT 65536
823 /* CLIPCAPS */
824 #define CP_NONE 0
825 #define CP_RECTANGLE 1
826 #define CP_REGION 2
827 #define GCP_DBCS 1
828 #define GCP_ERROR 0x8000
829 #define GCP_CLASSIN 0x80000
830 #define GCP_DIACRITIC 256
831 #define GCP_DISPLAYZWG 0x400000
832 #define GCP_GLYPHSHAPE 16
833 #define GCP_JUSTIFY 0x10000
834 #define GCP_JUSTIFYIN 0x200000
835 #define GCP_KASHIDA 1024
836 #define GCP_LIGATE 32
837 #define GCP_MAXEXTENT 0x100000
838 #define GCP_NEUTRALOVERRIDE 0x2000000
839 #define GCP_NUMERICOVERRIDE 0x1000000
840 #define GCP_NUMERICSLATIN 0x4000000
841 #define GCP_NUMERICSLOCAL 0x8000000
842 #define GCP_REORDER 2
843 #define GCP_SYMSWAPOFF 0x800000
844 #define GCP_USEKERNING 8
845 #define FLI_GLYPHS 0x40000
846 #define FLI_MASK 0x103b
847 #define GGO_METRICS 0
848 #define GGO_BITMAP 1
849 #define GGO_NATIVE 2
850 #define GGO_BEZIER 3
851 #define GGO_GRAY2_BITMAP 4
852 #define GGO_GRAY4_BITMAP 5
853 #define GGO_GRAY8_BITMAP 6
854 #define GGO_GLYPH_INDEX 128
855 #define GGO_UNHINTED 256
856 #ifdef __WINESRC__
857 #define WINE_GGO_GRAY16_BITMAP 0x10
858 #define WINE_GGO_HRGB_BITMAP   0x11
859 #define WINE_GGO_HBGR_BITMAP   0x12
860 #define WINE_GGO_VRGB_BITMAP   0x13
861 #define WINE_GGO_VBGR_BITMAP   0x14
862 #endif
863 #define GM_COMPATIBLE 1
864 #define GM_ADVANCED 2
865 #define GM_LAST     2
866 #define MM_ANISOTROPIC 8
867 #define MM_HIENGLISH 5
868 #define MM_HIMETRIC 3
869 #define MM_ISOTROPIC 7
870 #define MM_LOENGLISH 4
871 #define MM_LOMETRIC 2
872 #define MM_TEXT 1
873 #define MM_TWIPS 6
874 #define MM_MAX_FIXEDSCALE	MM_TWIPS
875 #define MM_MIN MM_TEXT
876 #define MM_MAX MM_ANISOTROPIC
877 #define ABSOLUTE	1
878 #define RELATIVE	2
879 #define PC_EXPLICIT 2
880 #define PC_NOCOLLAPSE 4
881 #define PC_RESERVED 1
882 #define CLR_INVALID     0xFFFFFFFF
883 #define PT_MOVETO 6
884 #define PT_LINETO 2
885 #define PT_BEZIERTO 4
886 #define PT_CLOSEFIGURE 1
887 #define TT_AVAILABLE 1
888 #define TT_ENABLED 2
889 
890 #ifdef __WINESRC__
891 #define WINE_TT_SUBPIXEL_RENDERING_ENABLED 0x4000
892 #define WINE_TT_HINTER_ENABLED 0x8000
893 #endif
894 
895 #define BLACK_BRUSH 4
896 #define DKGRAY_BRUSH 3
897 #define GRAY_BRUSH 2
898 #define HOLLOW_BRUSH 5
899 #define LTGRAY_BRUSH 1
900 #define NULL_BRUSH 5
901 #define WHITE_BRUSH 0
902 #define BLACK_PEN 7
903 #define NULL_PEN 8
904 #define WHITE_PEN 6
905 #define ANSI_FIXED_FONT 11
906 #define ANSI_VAR_FONT 12
907 #define DEVICE_DEFAULT_FONT 14
908 #define DEFAULT_GUI_FONT 17
909 #define OEM_FIXED_FONT 10
910 #define SYSTEM_FONT 13
911 #define SYSTEM_FIXED_FONT 16
912 #define DEFAULT_PALETTE 15
913 #if (_WIN32_WINNT >= 0x0500)
914 #define DC_BRUSH	18
915 #define DC_PEN	19
916 #endif
917 #if (_WIN32_WINNT >= 0x0500)
918 #define STOCK_LAST          19
919 #elif (WINVER >= 0x0400)
920 #define STOCK_LAST          17
921 #else
922 #define STOCK_LAST          16
923 #endif
924 #define SYSPAL_NOSTATIC 2
925 #define SYSPAL_STATIC 1
926 #define SYSPAL_ERROR 0
927 #define TA_BASELINE 24
928 #define TA_BOTTOM 8
929 #define TA_TOP 0
930 #define TA_CENTER 6
931 #define TA_LEFT 0
932 #define TA_RIGHT 2
933 #define TA_RTLREADING 256
934 #define TA_NOUPDATECP 0
935 #define TA_UPDATECP 1
936 #define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING)
937 #define VTA_BASELINE 24
938 #define VTA_CENTER 6
939 #define VTA_LEFT TA_BOTTOM
940 #define VTA_RIGHT TA_TOP
941 #define VTA_BOTTOM TA_RIGHT
942 #define VTA_TOP TA_LEFT
943 #define MWT_IDENTITY 1
944 #define MWT_LEFTMULTIPLY 2
945 #define MWT_RIGHTMULTIPLY 3
946 #define MWT_MIN MWT_IDENTITY
947 #define MWT_MAX MWT_RIGHTMULTIPLY
948 #define OPAQUE 2
949 #define TRANSPARENT 1
950 #define BKMODE_LAST  2
951 #define BLACKONWHITE 1
952 #define WHITEONBLACK 2
953 #define COLORONCOLOR 3
954 #define HALFTONE 4
955 #define MAXSTRETCHBLTMODE 4
956 #define STRETCH_ANDSCANS 1
957 #define STRETCH_DELETESCANS 3
958 #define STRETCH_HALFTONE 4
959 #define STRETCH_ORSCANS 2
960 #define TCI_SRCCHARSET 1
961 #define TCI_SRCCODEPAGE 2
962 #define TCI_SRCFONTSIG 3
963 #define TCI_SRCLOCALE 4096
964 #if (_WIN32_WINNT >= 0x0500)
965 #define SHADEBLENDCAPS    120
966 #define COLORMGMTCAPS     121
967 /* SHADEBLENDCAPS */
968 #define SB_NONE           0x00000000
969 #define SB_CONST_ALPHA    0x00000001
970 #define SB_PIXEL_ALPHA    0x00000002
971 #define SB_PREMULT_ALPHA  0x00000004
972 #define SB_GRAD_RECT      0x00000010
973 #define SB_GRAD_TRI       0x00000020
974 /* Color Management caps */
975 #define CM_NONE           0x00000000
976 #define CM_DEVICE_ICM     0x00000001
977 #define CM_GAMMA_RAMP     0x00000002
978 #define CM_CMYK_COLOR     0x00000004
979 #endif
980 #define ICM_ON 2
981 #define ICM_OFF 1
982 #define ICM_QUERY 3
983 
984 #if (WINVER >= 0x0400)
985 typedef struct _DRAWPATRECT {
986         POINT ptPosition;
987         POINT ptSize;
988         WORD  wStyle;
989         WORD  wPattern;
990 } DRAWPATRECT, *PDRAWPATRECT;
991 #endif
992 
993 #define NEWFRAME	1
994 #define ABORTDOC	2
995 #define NEXTBAND	3
996 #define SETCOLORTABLE	4
997 #define GETCOLORTABLE	5
998 #define FLUSHOUTPUT	6
999 #define DRAFTMODE	7
1000 #define QUERYESCSUPPORT	8
1001 #define SETABORTPROC	9
1002 #define STARTDOC	10
1003 #define ENDDOC	11
1004 #define GETPHYSPAGESIZE	12
1005 #define GETPRINTINGOFFSET	13
1006 #define GETSCALINGFACTOR	14
1007 #define MFCOMMENT	15
1008 #define GETPENWIDTH	16
1009 #define SETCOPYCOUNT	17
1010 #define SELECTPAPERSOURCE	18
1011 #define DEVICEDATA	19
1012 #define PASSTHROUGH	19
1013 #define GETTECHNOLGY	20
1014 #define GETTECHNOLOGY	20
1015 #define SETLINECAP	21
1016 #define SETLINEJOIN	22
1017 #define SETMITERLIMIT	23
1018 #define BANDINFO	24
1019 #define DRAWPATTERNRECT	25
1020 #define GETVECTORPENSIZE	26
1021 #define GETVECTORBRUSHSIZE	27
1022 #define ENABLEDUPLEX	28
1023 #define GETSETPAPERBINS	29
1024 #define GETSETPRINTORIENT	30
1025 #define ENUMPAPERBINS	31
1026 #define SETDIBSCALING	32
1027 #define EPSPRINTING	33
1028 #define ENUMPAPERMETRICS	34
1029 #define GETSETPAPERMETRICS	35
1030 #define POSTSCRIPT_DATA	37
1031 #define POSTSCRIPT_IGNORE	38
1032 #define MOUSETRAILS	39
1033 #define GETDEVICEUNITS	42
1034 #define GETEXTENDEDTEXTMETRICS	256
1035 #define GETEXTENTTABLE	257
1036 #define GETPAIRKERNTABLE	258
1037 #define GETTRACKKERNTABLE	259
1038 #define EXTTEXTOUT	512
1039 #define GETFACENAME	513
1040 #define DOWNLOADFACE	514
1041 #define ENABLERELATIVEWIDTHS	768
1042 #define ENABLEPAIRKERNING	769
1043 #define SETKERNTRACK	770
1044 #define SETALLJUSTVALUES	771
1045 #define SETCHARSET	772
1046 #define STRETCHBLT	2048
1047 #define METAFILE_DRIVER 2049
1048 #define GETSETSCREENPARAMS	3072
1049 #define QUERYDIBSUPPORT	3073
1050 #define BEGIN_PATH	4096
1051 #define CLIP_TO_PATH	4097
1052 #define END_PATH	4098
1053 #define EXT_DEVICE_CAPS	4099
1054 #define RESTORE_CTM	4100
1055 #define SAVE_CTM	4101
1056 #define SET_ARC_DIRECTION	4102
1057 #define SET_BACKGROUND_COLOR	4103
1058 #define SET_POLY_MODE	4104
1059 #define SET_SCREEN_ANGLE	4105
1060 #define SET_SPREAD	4106
1061 #define TRANSFORM_CTM	4107
1062 #define SET_CLIP_BOX	4108
1063 #define SET_BOUNDS	4109
1064 #define SET_MIRROR_MODE	4110
1065 #define OPENCHANNEL	4110
1066 #define DOWNLOADHEADER	4111
1067 #define CLOSECHANNEL	4112
1068 #define POSTSCRIPT_PASSTHROUGH	4115
1069 #define ENCAPSULATED_POSTSCRIPT	4116
1070 #define POSTSCRIPT_IDENTIFY 4117
1071 #define POSTSCRIPT_INJECTION 4118
1072 #define CHECKJPEGFORMAT 4119
1073 #define CHECKPNGFORMAT 4120
1074 #define GET_PS_FEATURESETTING 4121
1075 #define SPCLPASSTHROUGH2 4568
1076 #define QDI_SETDIBITS	1
1077 #define QDI_GETDIBITS	2
1078 #define QDI_DIBTOSCREEN	4
1079 #define QDI_STRETCHDIB	8
1080 #define SP_NOTREPORTED	0x4000
1081 #define PR_JOBSTATUS	0
1082 #define ASPECT_FILTERING	1
1083 #define GS_8BIT_INDICES     0x00000001
1084 #define GGI_MARK_NONEXISTING_GLYPHS  0X0001
1085 #define BS_SOLID	0
1086 #define BS_NULL	1
1087 #define BS_HOLLOW	1
1088 #define BS_HATCHED	2
1089 #define BS_PATTERN	3
1090 #define BS_INDEXED	4
1091 #define BS_DIBPATTERN	5
1092 #define BS_DIBPATTERNPT	6
1093 #define BS_PATTERN8X8	7
1094 #define BS_DIBPATTERN8X8	8
1095 #define BS_MONOPATTERN	9
1096 #define LCS_CALIBRATED_RGB	0
1097 #define LCS_DEVICE_RGB	1
1098 #define LCS_DEVICE_CMYK	2
1099 #define LCS_GM_BUSINESS	1
1100 #define LCS_GM_GRAPHICS	2
1101 #define LCS_GM_IMAGES	4
1102 #define LCS_GM_ABS_COLORIMETRIC 8
1103 #define LCS_SIGNATURE   0x50534F43 // 'PSOC'
1104 #define LCS_sRGB        'sRGB'
1105 #define LCS_WINDOWS_COLOR_SPACE 'Win '
1106 #define RASTER_FONTTYPE	1
1107 #define DEVICE_FONTTYPE	2
1108 #define TRUETYPE_FONTTYPE	4
1109 #define DMORIENT_PORTRAIT   1
1110 #define DMORIENT_LANDSCAPE  2
1111 #define DMPAPER_FIRST	1
1112 #define DMPAPER_LETTER	1
1113 #define DMPAPER_LETTERSMALL	2
1114 #define DMPAPER_TABLOID	3
1115 #define DMPAPER_LEDGER	4
1116 #define DMPAPER_LEGAL	5
1117 #define DMPAPER_STATEMENT	6
1118 #define DMPAPER_EXECUTIVE	7
1119 #define DMPAPER_A3	8
1120 #define DMPAPER_A4	9
1121 #define DMPAPER_A4SMALL	10
1122 #define DMPAPER_A5	11
1123 #define DMPAPER_B4	12
1124 #define DMPAPER_B5	13
1125 #define DMPAPER_FOLIO	14
1126 #define DMPAPER_QUARTO	15
1127 #define DMPAPER_10X14	16
1128 #define DMPAPER_11X17	17
1129 #define DMPAPER_NOTE	18
1130 #define DMPAPER_ENV_9	19
1131 #define DMPAPER_ENV_10	20
1132 #define DMPAPER_ENV_11	21
1133 #define DMPAPER_ENV_12	22
1134 #define DMPAPER_ENV_14	23
1135 #define DMPAPER_CSHEET	24
1136 #define DMPAPER_DSHEET	25
1137 #define DMPAPER_ESHEET	26
1138 #define DMPAPER_ENV_DL	27
1139 #define DMPAPER_ENV_C5	28
1140 #define DMPAPER_ENV_C3	29
1141 #define DMPAPER_ENV_C4	30
1142 #define DMPAPER_ENV_C6	31
1143 #define DMPAPER_ENV_C65	32
1144 #define DMPAPER_ENV_B4	33
1145 #define DMPAPER_ENV_B5	34
1146 #define DMPAPER_ENV_B6	35
1147 #define DMPAPER_ENV_ITALY	36
1148 #define DMPAPER_ENV_MONARCH	37
1149 #define DMPAPER_ENV_PERSONAL	38
1150 #define DMPAPER_FANFOLD_US	39
1151 #define DMPAPER_FANFOLD_STD_GERMAN	40
1152 #define DMPAPER_FANFOLD_LGL_GERMAN	41
1153 #define DMPAPER_ISO_B4	42
1154 #define DMPAPER_JAPANESE_POSTCARD	43
1155 #define DMPAPER_9X11	44
1156 #define DMPAPER_10X11	45
1157 #define DMPAPER_15X11	46
1158 #define DMPAPER_ENV_INVITE	47
1159 #define DMPAPER_RESERVED_48	48
1160 #define DMPAPER_RESERVED_49	49
1161 #define DMPAPER_LETTER_EXTRA	50
1162 #define DMPAPER_LEGAL_EXTRA	51
1163 #define DMPAPER_TABLOID_EXTRA	52
1164 #define DMPAPER_A4_EXTRA	53
1165 #define DMPAPER_LETTER_TRANSVERSE	54
1166 #define DMPAPER_A4_TRANSVERSE	55
1167 #define DMPAPER_LETTER_EXTRA_TRANSVERSE	56
1168 #define DMPAPER_A_PLUS	57
1169 #define DMPAPER_B_PLUS	58
1170 #define DMPAPER_LETTER_PLUS	59
1171 #define DMPAPER_A4_PLUS	60
1172 #define DMPAPER_A5_TRANSVERSE	61
1173 #define DMPAPER_B5_TRANSVERSE	62
1174 #define DMPAPER_A3_EXTRA	63
1175 #define DMPAPER_A5_EXTRA	64
1176 #define DMPAPER_B5_EXTRA	65
1177 #define DMPAPER_A2	66
1178 #define DMPAPER_A3_TRANSVERSE	67
1179 #define DMPAPER_A3_EXTRA_TRANSVERSE	68
1180 #define DMPAPER_LAST	68
1181 #define DMPAPER_USER	256
1182 #define DMBIN_FIRST	1
1183 #define DMBIN_UPPER	1
1184 #define DMBIN_ONLYONE	1
1185 #define DMBIN_LOWER	2
1186 #define DMBIN_MIDDLE	3
1187 #define DMBIN_MANUAL	4
1188 #define DMBIN_ENVELOPE	5
1189 #define DMBIN_ENVMANUAL	6
1190 #define DMBIN_AUTO	7
1191 #define DMBIN_TRACTOR	8
1192 #define DMBIN_SMALLFMT	9
1193 #define DMBIN_LARGEFMT	10
1194 #define DMBIN_LARGECAPACITY	11
1195 #define DMBIN_CASSETTE	14
1196 #define DMBIN_FORMSOURCE	15
1197 #define DMBIN_LAST	15
1198 #define DMBIN_USER	256
1199 #define DMRES_DRAFT	(-1)
1200 #define DMRES_LOW	(-2)
1201 #define DMRES_MEDIUM	(-3)
1202 #define DMRES_HIGH	(-4)
1203 #define DMCOLOR_MONOCHROME	1
1204 #define DMCOLOR_COLOR	2
1205 #define DMDUP_SIMPLEX	1
1206 #define DMDUP_VERTICAL	2
1207 #define DMDUP_HORIZONTAL	3
1208 #define DMTT_BITMAP	1
1209 #define DMTT_DOWNLOAD	2
1210 #define DMTT_SUBDEV	3
1211 #define DMTT_DOWNLOAD_OUTLINE	4
1212 #define DMCOLLATE_FALSE	0
1213 #define DMCOLLATE_TRUE	1
1214 
1215 
1216 #define DMDO_DEFAULT    0
1217 #define DMDO_90         1
1218 #define DMDO_180        2
1219 #define DMDO_270        3
1220 
1221 #define DMDFO_DEFAULT   0
1222 #define DMDFO_STRETCH   1
1223 #define DMDFO_CENTER    2
1224 
1225 
1226 #define DM_GRAYSCALE            0x00000001
1227 #define DM_INTERLACED           0x00000002
1228 #define DMDISPLAYFLAGS_TEXTMODE 0x00000004
1229 
1230 
1231 #define DM_UPDATE	1
1232 #define DM_COPY	2
1233 #define DM_PROMPT	4
1234 #define DM_MODIFY	8
1235 #define DM_IN_BUFFER	DM_MODIFY
1236 #define DM_IN_PROMPT	DM_PROMPT
1237 #define DM_OUT_BUFFER	DM_COPY
1238 #define DM_OUT_DEFAULT	DM_UPDATE
1239 
1240 
1241 #if (WINVER >= 0x0500) || (_WIN32_WINNT >= _WIN32_WINNT_NT4)
1242 #define DM_SPECVERSION 0x0401
1243 #elif (WINVER >= 0x0400)
1244 #define DM_SPECVERSION 0x0400
1245 #else
1246 #define DM_SPECVERSION 0x0320
1247 #endif
1248 
1249 #define DM_ORIENTATION        0x00000001
1250 #define DM_PAPERSIZE          0x00000002
1251 #define DM_PAPERLENGTH        0x00000004
1252 #define DM_PAPERWIDTH         0x00000008
1253 #define DM_SCALE              0x00000010
1254 #define DM_POSITION           0x00000020
1255 #define DM_NUP                0x00000040
1256 #define DM_DISPLAYORIENTATION 0x00000080
1257 #define DM_COPIES             0x00000100
1258 #define DM_DEFAULTSOURCE      0x00000200
1259 #define DM_PRINTQUALITY       0x00000400
1260 #define DM_COLOR              0x00000800
1261 #define DM_DUPLEX             0x00001000
1262 #define DM_YRESOLUTION        0x00002000
1263 #define DM_TTOPTION           0x00004000
1264 #define DM_COLLATE            0x00008000
1265 #define DM_FORMNAME           0x00010000
1266 #define DM_LOGPIXELS          0x00020000
1267 #define DM_BITSPERPEL         0x00040000
1268 #define DM_PELSWIDTH          0x00080000
1269 #define DM_PELSHEIGHT         0x00100000
1270 #define DM_DISPLAYFLAGS       0x00200000
1271 #define DM_DISPLAYFREQUENCY   0x00400000
1272 #define DM_ICMMETHOD          0x00800000
1273 #define DM_ICMINTENT          0x01000000
1274 #define DM_MEDIATYPE          0x02000000
1275 #define DM_DITHERTYPE         0x04000000
1276 #define DM_PANNINGWIDTH       0x08000000
1277 #define DM_PANNINGHEIGHT      0x10000000
1278 #if (WINVER >= 0x0501)
1279 #define DM_DISPLAYFIXEDOUTPUT 0x20000000
1280 #endif
1281 
1282 #define QDC_ALL_PATHS 0x00000001
1283 
1284 #define DMICMMETHOD_NONE	1
1285 #define DMICMMETHOD_SYSTEM	2
1286 #define DMICMMETHOD_DRIVER	3
1287 #define DMICMMETHOD_DEVICE	4
1288 #define DMICMMETHOD_USER	256
1289 #define DMICM_SATURATE	1
1290 #define DMICM_CONTRAST	2
1291 #define DMICM_COLORMETRIC	3
1292 #define DMICM_USER	256
1293 #define DMMEDIA_STANDARD	1
1294 #define DMMEDIA_TRANSPARENCY	2
1295 #define DMMEDIA_GLOSSY	3
1296 #define DMMEDIA_USER	256
1297 #define DMDITHER_NONE	1
1298 #define DMDITHER_COARSE	2
1299 #define DMDITHER_FINE	3
1300 #define DMDITHER_LINEART	4
1301 #define DMDITHER_ERRORDIFFUSION	5
1302 #define DMDITHER_RESERVED6	6
1303 #define DMDITHER_RESERVED7	7
1304 #define DMDITHER_RESERVED8	8
1305 #define DMDITHER_RESERVED9	9
1306 #define DMDITHER_GRAYSCALE	10
1307 #define DMDITHER_USER	256
1308 #define GDI_ERROR 0xFFFFFFFF
1309 #define HGDI_ERROR ((HANDLE)GDI_ERROR)
1310 #define TMPF_FIXED_PITCH 1
1311 #define TMPF_VECTOR 2
1312 #define TMPF_TRUETYPE 4
1313 #define TMPF_DEVICE 8
1314 #define NTM_ITALIC 1
1315 #define NTM_BOLD 32
1316 #define NTM_REGULAR 64
1317 #define TT_POLYGON_TYPE 24
1318 #define TT_PRIM_LINE 1
1319 #define TT_PRIM_QSPLINE 2
1320 #define TT_PRIM_CSPLINE 3
1321 #define FONTMAPPER_MAX 10
1322 #define ENHMETA_STOCK_OBJECT 0x80000000
1323 #define WGL_FONT_LINES 0
1324 #define WGL_FONT_POLYGONS 1
1325 #define LPD_DOUBLEBUFFER 1
1326 #define LPD_STEREO 2
1327 #define LPD_SUPPORT_GDI 16
1328 #define LPD_SUPPORT_OPENGL 32
1329 #define LPD_SHARE_DEPTH 64
1330 #define LPD_SHARE_STENCIL 128
1331 #define LPD_SHARE_ACCUM 256
1332 #define LPD_SWAP_EXCHANGE 512
1333 #define LPD_SWAP_COPY 1024
1334 #define LPD_TRANSPARENT 4096
1335 #define LPD_TYPE_RGBA 0
1336 #define LPD_TYPE_COLORINDEX 1
1337 #define WGL_SWAP_MAIN_PLANE 1
1338 #define WGL_SWAP_OVERLAY1 2
1339 #define WGL_SWAP_OVERLAY2 4
1340 #define WGL_SWAP_OVERLAY3 8
1341 #define WGL_SWAP_OVERLAY4 16
1342 #define WGL_SWAP_OVERLAY5 32
1343 #define WGL_SWAP_OVERLAY6 64
1344 #define WGL_SWAP_OVERLAY7 128
1345 #define WGL_SWAP_OVERLAY8 256
1346 #define WGL_SWAP_OVERLAY9 512
1347 #define WGL_SWAP_OVERLAY10 1024
1348 #define WGL_SWAP_OVERLAY11 2048
1349 #define WGL_SWAP_OVERLAY12 4096
1350 #define WGL_SWAP_OVERLAY13 8192
1351 #define WGL_SWAP_OVERLAY14 16384
1352 #define WGL_SWAP_OVERLAY15 32768
1353 #define WGL_SWAP_UNDERLAY1 65536
1354 #define WGL_SWAP_UNDERLAY2 0x20000
1355 #define WGL_SWAP_UNDERLAY3 0x40000
1356 #define WGL_SWAP_UNDERLAY4 0x80000
1357 #define WGL_SWAP_UNDERLAY5 0x100000
1358 #define WGL_SWAP_UNDERLAY6 0x200000
1359 #define WGL_SWAP_UNDERLAY7 0x400000
1360 #define WGL_SWAP_UNDERLAY8 0x800000
1361 #define WGL_SWAP_UNDERLAY9 0x1000000
1362 #define WGL_SWAP_UNDERLAY10 0x2000000
1363 #define WGL_SWAP_UNDERLAY11 0x4000000
1364 #define WGL_SWAP_UNDERLAY12 0x8000000
1365 #define WGL_SWAP_UNDERLAY13 0x10000000
1366 #define WGL_SWAP_UNDERLAY14 0x20000000
1367 #define WGL_SWAP_UNDERLAY15 0x40000000
1368 #define AC_SRC_OVER 0
1369 #define LAYOUT_LTR 0
1370 #define LAYOUT_RTL 1 // Right to left
1371 #define LAYOUT_BTT 2 // Bottom to top
1372 #define LAYOUT_VBH 4 // Vertical before horizontal
1373 #define LAYOUT_ORIENTATIONMASK (LAYOUT_RTL | LAYOUT_BTT | LAYOUT_VBH)
1374 #define LAYOUT_BITMAPORIENTATIONPRESERVED 8
1375 #define CAPTUREBLT 0x40000000
1376 #define NOMIRRORBITMAP 0x80000000
1377 #if (WINVER > 0x400)
1378 #define CS_ENABLE           0x00000001
1379 #define CS_DISABLE          0x00000002
1380 #define CS_DELETE_TRANSFORM 0x00000003
1381 #endif
1382 
1383 
1384 
1385 #if (WINVER > 0x500)
1386 #define GRADIENT_FILL_RECT_H 0x00
1387 #define GRADIENT_FILL_RECT_V 0x01
1388 #define GRADIENT_FILL_TRIANGLE 0x02
1389 #define GRADIENT_FILL_OP_FLAG 0xff
1390 #define COLORMATCHTOTARGET_EMBEDED 0x00000001
1391 #define CREATECOLORSPACE_EMBEDED   0x00000001
1392 #define SETICMPROFILE_EMBEDED      0x00000001
1393 #endif
1394 
1395 #define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001
1396 #define DISPLAY_DEVICE_MULTI_DRIVER        0x00000002
1397 #define DISPLAY_DEVICE_PRIMARY_DEVICE      0x00000004
1398 #define DISPLAY_DEVICE_MIRRORING_DRIVER    0x00000008
1399 #define DISPLAY_DEVICE_VGA_COMPATIBLE      0x00000010
1400 #define DISPLAY_DEVICE_REMOVABLE           0x00000020
1401 #define DISPLAY_DEVICE_DISCONNECT          0x02000000
1402 #define DISPLAY_DEVICE_REMOTE              0x04000000
1403 #define DISPLAY_DEVICE_MODESPRUNED         0x08000000
1404 
1405 #define DISPLAY_DEVICE_ACTIVE   0x00000001
1406 #define DISPLAY_DEVICE_ATTACHED 0x00000002
1407 
1408 #ifndef RC_INVOKED
1409 typedef struct _ABC {
1410 	int abcA;
1411 	UINT abcB;
1412 	int abcC;
1413 } ABC, *PABC, *LPABC;
1414 typedef struct _ABCFLOAT {
1415 	FLOAT abcfA;
1416 	FLOAT abcfB;
1417 	FLOAT abcfC;
1418 } ABCFLOAT, *PABCFLOAT, *LPABCFLOAT;
1419 typedef struct tagBITMAP {
1420 	LONG	bmType;
1421 	LONG	bmWidth;
1422 	LONG	bmHeight;
1423 	LONG	bmWidthBytes;
1424 	WORD	bmPlanes;
1425 	WORD	bmBitsPixel;
1426 	LPVOID	bmBits;
1427 } BITMAP,*PBITMAP,*LPBITMAP;
1428 typedef struct tagBITMAPCOREHEADER {
1429 	DWORD	bcSize;
1430 	WORD	bcWidth;
1431 	WORD	bcHeight;
1432 	WORD	bcPlanes;
1433 	WORD	bcBitCount;
1434 } BITMAPCOREHEADER,*LPBITMAPCOREHEADER,*PBITMAPCOREHEADER;
1435 #include "pshpack1.h"
1436 typedef struct tagRGBTRIPLE {
1437 	BYTE rgbtBlue;
1438 	BYTE rgbtGreen;
1439 	BYTE rgbtRed;
1440 } RGBTRIPLE,*LPRGBTRIPLE;
1441 #include "poppack.h"
1442 #include "pshpack2.h"
1443 typedef struct tagBITMAPFILEHEADER {
1444 	WORD	bfType;
1445 	DWORD	bfSize;
1446 	WORD	bfReserved1;
1447 	WORD	bfReserved2;
1448 	DWORD	bfOffBits;
1449 } BITMAPFILEHEADER,*LPBITMAPFILEHEADER,*PBITMAPFILEHEADER;
1450 #include "poppack.h"
1451 typedef struct _BITMAPCOREINFO {
1452 	BITMAPCOREHEADER	bmciHeader;
1453 	RGBTRIPLE	bmciColors[1];
1454 } BITMAPCOREINFO,*LPBITMAPCOREINFO,*PBITMAPCOREINFO;
1455 typedef struct tagBITMAPINFOHEADER{
1456 	DWORD	biSize;
1457 	LONG	biWidth;
1458 	LONG	biHeight;
1459 	WORD	biPlanes;
1460 	WORD	biBitCount;
1461 	DWORD	biCompression;
1462 	DWORD	biSizeImage;
1463 	LONG	biXPelsPerMeter;
1464 	LONG	biYPelsPerMeter;
1465 	DWORD	biClrUsed;
1466 	DWORD	biClrImportant;
1467 } BITMAPINFOHEADER,*LPBITMAPINFOHEADER,*PBITMAPINFOHEADER;
1468 typedef struct tagRGBQUAD {
1469 	BYTE	rgbBlue;
1470 	BYTE	rgbGreen;
1471 	BYTE	rgbRed;
1472 	BYTE	rgbReserved;
1473 } RGBQUAD,*LPRGBQUAD;
1474 typedef struct tagBITMAPINFO {
1475 	BITMAPINFOHEADER bmiHeader;
1476 	RGBQUAD bmiColors[1];
1477 } BITMAPINFO,*LPBITMAPINFO,*PBITMAPINFO;
1478 typedef long FXPT16DOT16,*LPFXPT16DOT16;
1479 typedef long FXPT2DOT30,*LPFXPT2DOT30;
1480 typedef struct tagCIEXYZ {
1481 	FXPT2DOT30 ciexyzX;
1482 	FXPT2DOT30 ciexyzY;
1483 	FXPT2DOT30 ciexyzZ;
1484 } CIEXYZ,*LPCIEXYZ;
1485 typedef struct tagCIEXYZTRIPLE {
1486 	CIEXYZ ciexyzRed;
1487 	CIEXYZ ciexyzGreen;
1488 	CIEXYZ ciexyzBlue;
1489 } CIEXYZTRIPLE,*LPCIEXYZTRIPLE;
1490 typedef struct {
1491 	DWORD	bV4Size;
1492 	LONG	bV4Width;
1493 	LONG	bV4Height;
1494 	WORD	bV4Planes;
1495 	WORD	bV4BitCount;
1496 	DWORD	bV4V4Compression;
1497 	DWORD	bV4SizeImage;
1498 	LONG	bV4XPelsPerMeter;
1499 	LONG	bV4YPelsPerMeter;
1500 	DWORD	bV4ClrUsed;
1501 	DWORD	bV4ClrImportant;
1502 	DWORD	bV4RedMask;
1503 	DWORD	bV4GreenMask;
1504 	DWORD	bV4BlueMask;
1505 	DWORD	bV4AlphaMask;
1506 	DWORD	bV4CSType;
1507 	CIEXYZTRIPLE bV4Endpoints;
1508 	DWORD	bV4GammaRed;
1509 	DWORD	bV4GammaGreen;
1510 	DWORD	bV4GammaBlue;
1511 } BITMAPV4HEADER,*LPBITMAPV4HEADER,*PBITMAPV4HEADER;
1512 #if (WINVER >= 0x500)
1513 typedef struct {
1514 	DWORD	bV5Size;
1515 	LONG	bV5Width;
1516 	LONG	bV5Height;
1517 	WORD	bV5Planes;
1518 	WORD	bV5BitCount;
1519 	DWORD	bV5Compression;
1520 	DWORD	bV5SizeImage;
1521 	LONG	bV5XPelsPerMeter;
1522 	LONG	bV5YPelsPerMeter;
1523 	DWORD	bV5ClrUsed;
1524 	DWORD	bV5ClrImportant;
1525 	DWORD	bV5RedMask;
1526 	DWORD	bV5GreenMask;
1527 	DWORD	bV5BlueMask;
1528 	DWORD	bV5AlphaMask;
1529 	DWORD	bV5CSType;
1530 	CIEXYZTRIPLE	bV5Endpoints;
1531 	DWORD	bV5GammaRed;
1532 	DWORD	bV5GammaGreen;
1533 	DWORD	bV5GammaBlue;
1534 	DWORD	bV5Intent;
1535 	DWORD	bV5ProfileData;
1536 	DWORD	bV5ProfileSize;
1537 	DWORD	bV5Reserved;
1538 } BITMAPV5HEADER,*LPBITMAPV5HEADER,*PBITMAPV5HEADER;
1539 #endif
1540 typedef struct tagFONTSIGNATURE {
1541 	DWORD	fsUsb[4];
1542 	DWORD	fsCsb[2];
1543 } FONTSIGNATURE, *PFONTSIGNATURE,*LPFONTSIGNATURE;
1544 typedef struct tagCHARSETINFO {
1545 	UINT ciCharset;
1546 	UINT ciACP;
1547 	FONTSIGNATURE fs;
1548 } CHARSETINFO, *PCHARSETINFO, *LPCHARSETINFO;
1549 typedef struct  tagCOLORADJUSTMENT {
1550 	WORD	caSize;
1551 	WORD	caFlags;
1552 	WORD	caIlluminantIndex;
1553 	WORD	caRedGamma;
1554 	WORD	caGreenGamma;
1555 	WORD	caBlueGamma;
1556 	WORD	caReferenceBlack;
1557 	WORD	caReferenceWhite;
1558 	SHORT	caContrast;
1559 	SHORT	caBrightness;
1560 	SHORT	caColorfulness;
1561 	SHORT	caRedGreenTint;
1562 } COLORADJUSTMENT, *PCOLORADJUSTMENT, FAR *LPCOLORADJUSTMENT;
1563 typedef struct _devicemodeA {
1564   BYTE   dmDeviceName[CCHDEVICENAME];
1565   WORD   dmSpecVersion;
1566   WORD   dmDriverVersion;
1567   WORD   dmSize;
1568   WORD   dmDriverExtra;
1569   DWORD  dmFields;
1570   _ANONYMOUS_UNION union {
1571     _ANONYMOUS_STRUCT struct {
1572       short dmOrientation;
1573       short dmPaperSize;
1574       short dmPaperLength;
1575       short dmPaperWidth;
1576       short dmScale;
1577       short dmCopies;
1578       short dmDefaultSource;
1579       short dmPrintQuality;
1580     } DUMMYSTRUCTNAME1;
1581     struct {
1582       POINTL dmPosition;
1583       DWORD  dmDisplayOrientation;
1584       DWORD  dmDisplayFixedOutput;
1585     } DUMMYSTRUCTNAME2;
1586   } DUMMYUNIONNAME1;
1587   short  dmColor;
1588   short  dmDuplex;
1589   short  dmYResolution;
1590   short  dmTTOption;
1591   short  dmCollate;
1592   BYTE   dmFormName[CCHFORMNAME];
1593   WORD   dmLogPixels;
1594   DWORD  dmBitsPerPel;
1595   DWORD  dmPelsWidth;
1596   DWORD  dmPelsHeight;
1597   _ANONYMOUS_UNION union {
1598     DWORD  dmDisplayFlags;
1599     DWORD  dmNup;
1600   } DUMMYUNIONNAME2;
1601   DWORD  dmDisplayFrequency;
1602 #if(WINVER >= 0x0400)
1603   DWORD  dmICMMethod;
1604   DWORD  dmICMIntent;
1605   DWORD  dmMediaType;
1606   DWORD  dmDitherType;
1607   DWORD  dmReserved1;
1608   DWORD  dmReserved2;
1609 #if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
1610   DWORD  dmPanningWidth;
1611   DWORD  dmPanningHeight;
1612 #endif
1613 #endif /* WINVER >= 0x0400 */
1614 } DEVMODEA,*LPDEVMODEA,*PDEVMODEA;
1615 typedef struct _devicemodeW {
1616   WCHAR   dmDeviceName[CCHDEVICENAME];
1617   WORD   dmSpecVersion;
1618   WORD   dmDriverVersion;
1619   WORD   dmSize;
1620   WORD   dmDriverExtra;
1621   DWORD  dmFields;
1622   _ANONYMOUS_UNION union {
1623     _ANONYMOUS_STRUCT struct {
1624       short dmOrientation;
1625       short dmPaperSize;
1626       short dmPaperLength;
1627       short dmPaperWidth;
1628       short dmScale;
1629       short dmCopies;
1630       short dmDefaultSource;
1631       short dmPrintQuality;
1632     } DUMMYSTRUCTNAME1;
1633     struct {
1634       POINTL dmPosition;
1635       DWORD  dmDisplayOrientation;
1636       DWORD  dmDisplayFixedOutput;
1637     } DUMMYSTRUCTNAME2;
1638   } DUMMYUNIONNAME1;
1639   short  dmColor;
1640   short  dmDuplex;
1641   short  dmYResolution;
1642   short  dmTTOption;
1643   short  dmCollate;
1644   WCHAR  dmFormName[CCHFORMNAME];
1645   WORD   dmLogPixels;
1646   DWORD  dmBitsPerPel;
1647   DWORD  dmPelsWidth;
1648   DWORD  dmPelsHeight;
1649   _ANONYMOUS_UNION union {
1650     DWORD  dmDisplayFlags;
1651     DWORD  dmNup;
1652   } DUMMYUNIONNAME2;
1653   DWORD  dmDisplayFrequency;
1654 #if(WINVER >= 0x0400)
1655   DWORD  dmICMMethod;
1656   DWORD  dmICMIntent;
1657   DWORD  dmMediaType;
1658   DWORD  dmDitherType;
1659   DWORD  dmReserved1;
1660   DWORD  dmReserved2;
1661 #if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
1662   DWORD  dmPanningWidth;
1663   DWORD  dmPanningHeight;
1664 #endif
1665 #endif /* WINVER >= 0x0400 */
1666 } DEVMODEW,*LPDEVMODEW,*PDEVMODEW,*NPDEVMODEW;
1667 typedef struct tagDIBSECTION {
1668 	BITMAP dsBm;
1669 	BITMAPINFOHEADER dsBmih;
1670 	DWORD dsBitfields[3];
1671 	HANDLE dshSection;
1672 	DWORD dsOffset;
1673 } DIBSECTION,*PDIBSECTION,*LPDIBSECTION;
1674 typedef struct _DOCINFOA {
1675 	int cbSize;
1676 	LPCSTR lpszDocName;
1677 	LPCSTR lpszOutput;
1678 	LPCSTR lpszDatatype;
1679 	DWORD fwType;
1680 } DOCINFOA,*LPDOCINFOA;
1681 typedef struct _DOCINFOW {
1682 	int cbSize;
1683 	LPCWSTR lpszDocName;
1684 	LPCWSTR lpszOutput;
1685 	LPCWSTR lpszDatatype;
1686 	DWORD fwType;
1687 } DOCINFOW,*LPDOCINFOW;
1688 typedef struct tagEMR {
1689 	DWORD iType;
1690 	DWORD nSize;
1691 } EMR,*PEMR;
1692 
1693 #if(WINVER >= 0x0400)
1694 typedef struct tagEMRGLSRECORD {
1695 	EMR emr;
1696 	DWORD cbData;
1697 	BYTE Data[1];
1698 } EMRGLSRECORD, *PEMRGLSRECORD;
1699 typedef struct tagEMRGLSBOUNDEDRECORD {
1700 	EMR emr;
1701 	RECTL rclBounds;
1702 	DWORD cbData;
1703 	BYTE Data[1];
1704 } EMRGLSBOUNDEDRECORD, *PEMRGLSBOUNDEDRECORD;
1705 #endif
1706 typedef struct tagEMRANGLEARC {
1707 	EMR emr;
1708 	POINTL ptlCenter;
1709 	DWORD nRadius;
1710 	FLOAT eStartAngle;
1711 	FLOAT eSweepAngle;
1712 } EMRANGLEARC,*PEMRANGLEARC;
1713 typedef struct tagEMRARC {
1714 	EMR emr;
1715 	RECTL rclBox;
1716 	POINTL ptlStart;
1717 	POINTL ptlEnd;
1718 } EMRARC,*PEMRARC,EMRARCTO,*PEMRARCTO,EMRCHORD,*PEMRCHORD,EMRPIE,*PEMRPIE;
1719 typedef struct  _XFORM {
1720 	FLOAT eM11;
1721 	FLOAT eM12;
1722 	FLOAT eM21;
1723 	FLOAT eM22;
1724 	FLOAT eDx;
1725 	FLOAT eDy;
1726 } XFORM,*PXFORM,*LPXFORM;
1727 typedef struct tagEMRBITBLT {
1728 	EMR emr;
1729 	RECTL rclBounds;
1730 	LONG xDest;
1731 	LONG yDest;
1732 	LONG cxDest;
1733 	LONG cyDest;
1734 	DWORD dwRop;
1735 	LONG xSrc;
1736 	LONG ySrc;
1737 	XFORM xformSrc;
1738 	COLORREF crBkColorSrc;
1739     DWORD iUsageSrc;
1740 	DWORD offBmiSrc;
1741 	DWORD cbBmiSrc;
1742 	DWORD offBitsSrc;
1743 	DWORD cbBitsSrc;
1744 } EMRBITBLT,*PEMRBITBLT;
1745 typedef struct tagLOGBRUSH {
1746 	UINT lbStyle;
1747 	COLORREF lbColor;
1748 	ULONG_PTR lbHatch;
1749 } LOGBRUSH,*PLOGBRUSH,*LPLOGBRUSH;
1750 typedef LOGBRUSH PATTERN,*PPATTERN,*LPPATTERN;
1751 typedef struct tagLOGBRUSH32 {
1752 	UINT lbStyle;
1753 	COLORREF lbColor;
1754 	ULONG lbHatch;
1755 } LOGBRUSH32, *PLOGBRUSH32;
1756 typedef struct tagEMRCREATEBRUSHINDIRECT {
1757 	EMR emr;
1758 	DWORD ihBrush;
1759 	LOGBRUSH32 lb;
1760 } EMRCREATEBRUSHINDIRECT,*PEMRCREATEBRUSHINDIRECT;
1761 typedef LONG LCSCSTYPE;
1762 typedef LONG LCSGAMUTMATCH;
1763 typedef struct tagLOGCOLORSPACEA {
1764 	DWORD lcsSignature;
1765 	DWORD lcsVersion;
1766 	DWORD lcsSize;
1767 	LCSCSTYPE lcsCSType;
1768 	LCSGAMUTMATCH lcsIntent;
1769 	CIEXYZTRIPLE lcsEndpoints;
1770 	DWORD lcsGammaRed;
1771 	DWORD lcsGammaGreen;
1772 	DWORD lcsGammaBlue;
1773 	CHAR lcsFilename[MAX_PATH];
1774 } LOGCOLORSPACEA,*LPLOGCOLORSPACEA;
1775 typedef struct tagLOGCOLORSPACEW {
1776 	DWORD lcsSignature;
1777 	DWORD lcsVersion;
1778 	DWORD lcsSize;
1779 	LCSCSTYPE lcsCSType;
1780 	LCSGAMUTMATCH lcsIntent;
1781 	CIEXYZTRIPLE lcsEndpoints;
1782 	DWORD lcsGammaRed;
1783 	DWORD lcsGammaGreen;
1784 	DWORD lcsGammaBlue;
1785 	WCHAR lcsFilename[MAX_PATH];
1786 } LOGCOLORSPACEW,*LPLOGCOLORSPACEW;
1787 typedef struct tagEMRCREATECOLORSPACEW {
1788 	EMR emr;
1789 	DWORD ihCS;
1790 	LOGCOLORSPACEW lcs;
1791 	DWORD dwFlags;
1792 	DWORD cbData;
1793 	BYTE Data[1];
1794 } EMRCREATECOLORSPACEW, *PEMRCREATECOLORSPACEW;
1795 typedef struct tagEMRCREATECOLORSPACE {
1796 	EMR emr;
1797 	DWORD ihCS;
1798 	LOGCOLORSPACEA lcs;
1799 } EMRCREATECOLORSPACE,*PEMRCREATECOLORSPACE;
1800 typedef struct tagEMRCREATEDIBPATTERNBRUSHPT {
1801 	EMR emr;
1802 	DWORD ihBrush;
1803 	DWORD iUsage;
1804 	DWORD offBmi;
1805 	DWORD cbBmi;
1806 	DWORD offBits;
1807 	DWORD cbBits;
1808 } EMRCREATEDIBPATTERNBRUSHPT,*PEMRCREATEDIBPATTERNBRUSHPT;
1809 typedef struct tagEMRCREATEMONOBRUSH {
1810 	EMR emr;
1811 	DWORD ihBrush;
1812 	DWORD iUsage;
1813 	DWORD offBmi;
1814 	DWORD cbBmi;
1815 	DWORD offBits;
1816 	DWORD cbBits;
1817 } EMRCREATEMONOBRUSH,*PEMRCREATEMONOBRUSH;
1818 
1819 #ifndef _PALETTEENTRY_DEFINED
1820 #define _PALETTEENTRY_DEFINED
1821 typedef struct tagPALETTEENTRY {
1822 	BYTE peRed;
1823 	BYTE peGreen;
1824 	BYTE peBlue;
1825 	BYTE peFlags;
1826 } PALETTEENTRY,*LPPALETTEENTRY,*PPALETTEENTRY;
1827 #endif
1828 
1829 #ifndef _LOGPALETTE_DEFINED
1830 #define _LOGPALETTE_DEFINED
1831 typedef struct tagLOGPALETTE {
1832   WORD palVersion;
1833   WORD palNumEntries;
1834   _Field_size_opt_(palNumEntries) PALETTEENTRY palPalEntry[1];
1835 } LOGPALETTE, *NPLOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
1836 #endif
1837 
1838 typedef struct tagEMRCREATEPALETTE {
1839 	EMR emr;
1840 	DWORD ihPal;
1841 	LOGPALETTE lgpl;
1842 } EMRCREATEPALETTE,*PEMRCREATEPALETTE;
1843 typedef struct tagLOGPEN {
1844 	UINT lopnStyle;
1845 	POINT lopnWidth;
1846 	COLORREF lopnColor;
1847 } LOGPEN,*PLOGPEN,*LPLOGPEN;
1848 typedef struct tagEMRCREATEPEN {
1849 	EMR emr;
1850 	DWORD ihPen;
1851 	LOGPEN lopn;
1852 } EMRCREATEPEN,*PEMRCREATEPEN;
1853 typedef struct tagEMRELLIPSE {
1854 	EMR emr;
1855 	RECTL rclBox;
1856 } EMRELLIPSE,*PEMRELLIPSE,EMRRECTANGLE,*PEMRRECTANGLE;
1857 typedef struct tagEMREOF {
1858 	EMR emr;
1859 	DWORD nPalEntries;
1860 	DWORD offPalEntries;
1861 	DWORD nSizeLast;
1862 } EMREOF,*PEMREOF;
1863 typedef struct tagEMREXCLUDECLIPRECT {
1864 	EMR emr;
1865 	RECTL rclClip;
1866 } EMREXCLUDECLIPRECT,*PEMREXCLUDECLIPRECT,EMRINTERSECTCLIPRECT,*PEMRINTERSECTCLIPRECT;
1867 typedef struct tagPANOSE {
1868 	BYTE bFamilyType;
1869 	BYTE bSerifStyle;
1870 	BYTE bWeight;
1871 	BYTE bProportion;
1872 	BYTE bContrast;
1873 	BYTE bStrokeVariation;
1874 	BYTE bArmStyle;
1875 	BYTE bLetterform;
1876 	BYTE bMidline;
1877 	BYTE bXHeight;
1878 } PANOSE, *LPPANOSE;
1879 typedef struct tagLOGFONTA {
1880 	LONG	lfHeight;
1881 	LONG	lfWidth;
1882 	LONG	lfEscapement;
1883 	LONG	lfOrientation;
1884 	LONG	lfWeight;
1885 	BYTE	lfItalic;
1886 	BYTE	lfUnderline;
1887 	BYTE	lfStrikeOut;
1888 	BYTE	lfCharSet;
1889 	BYTE	lfOutPrecision;
1890 	BYTE	lfClipPrecision;
1891 	BYTE	lfQuality;
1892 	BYTE	lfPitchAndFamily;
1893 	CHAR	lfFaceName[LF_FACESIZE];
1894 } LOGFONTA,*PLOGFONTA,*LPLOGFONTA;
1895 typedef struct tagLOGFONTW {
1896 	LONG	lfHeight;
1897 	LONG	lfWidth;
1898 	LONG	lfEscapement;
1899 	LONG	lfOrientation;
1900 	LONG	lfWeight;
1901 	BYTE	lfItalic;
1902 	BYTE	lfUnderline;
1903 	BYTE	lfStrikeOut;
1904 	BYTE	lfCharSet;
1905 	BYTE	lfOutPrecision;
1906 	BYTE	lfClipPrecision;
1907 	BYTE	lfQuality;
1908 	BYTE	lfPitchAndFamily;
1909 	WCHAR	lfFaceName[LF_FACESIZE];
1910 } LOGFONTW,*PLOGFONTW,*LPLOGFONTW;
1911 typedef struct tagEXTLOGFONTA {
1912 	LOGFONTA	elfLogFont;
1913 	BYTE	elfFullName[LF_FULLFACESIZE];
1914 	BYTE	elfStyle[LF_FACESIZE];
1915 	DWORD	elfVersion;
1916 	DWORD	elfStyleSize;
1917 	DWORD	elfMatch;
1918 	DWORD	elfReserved;
1919 	BYTE	elfVendorId[ELF_VENDOR_SIZE];
1920 	DWORD	elfCulture;
1921 	PANOSE	elfPanose;
1922 } EXTLOGFONTA,*PEXTLOGFONTA,*LPEXTLOGFONTA;
1923 typedef struct tagEXTLOGFONTW {
1924 	LOGFONTW	elfLogFont;
1925 	WCHAR	elfFullName[LF_FULLFACESIZE];
1926 	WCHAR	elfStyle[LF_FACESIZE];
1927 	DWORD	elfVersion;
1928 	DWORD	elfStyleSize;
1929 	DWORD	elfMatch;
1930 	DWORD	elfReserved;
1931 	BYTE	elfVendorId[ELF_VENDOR_SIZE];
1932 	DWORD	elfCulture;
1933 	PANOSE	elfPanose;
1934 } EXTLOGFONTW,*PEXTLOGFONTW,*LPEXTLOGFONTW;
1935 typedef struct tagEMREXTCREATEFONTINDIRECTW {
1936 	EMR emr;
1937 	DWORD ihFont;
1938 	EXTLOGFONTW elfw;
1939 } EMREXTCREATEFONTINDIRECTW,*PEMREXTCREATEFONTINDIRECTW;
1940 typedef struct tagEXTLOGPEN {
1941 	DWORD elpPenStyle;
1942 	DWORD elpWidth;
1943 	UINT elpBrushStyle;
1944 	COLORREF elpColor;
1945 	ULONG_PTR elpHatch;
1946 	DWORD elpNumEntries;
1947 	DWORD elpStyleEntry[1];
1948 } EXTLOGPEN,*PEXTLOGPEN,*LPEXTLOGPEN,*NPEXTLOGPEN;
1949 typedef struct tagEMREXTCREATEPEN {
1950 	EMR emr;
1951 	DWORD ihPen;
1952 	DWORD offBmi;
1953 	DWORD cbBmi;
1954 	DWORD offBits;
1955 	DWORD cbBits;
1956 	EXTLOGPEN elp;
1957 } EMREXTCREATEPEN,*PEMREXTCREATEPEN;
1958 typedef struct tagEMREXTFLOODFILL {
1959 	EMR emr;
1960 	POINTL ptlStart;
1961 	COLORREF crColor;
1962 	DWORD iMode;
1963 } EMREXTFLOODFILL,*PEMREXTFLOODFILL;
1964 typedef struct tagEMREXTSELECTCLIPRGN {
1965 	EMR emr;
1966 	DWORD cbRgnData;
1967 	DWORD iMode;
1968 	BYTE RgnData[1];
1969 } EMREXTSELECTCLIPRGN,*PEMREXTSELECTCLIPRGN;
1970 typedef struct tagEMRTEXT {
1971 	POINTL ptlReference;
1972 	DWORD nChars;
1973 	DWORD offString;
1974 	DWORD fOptions;
1975 	RECTL rcl;
1976 	DWORD offDx;
1977 } EMRTEXT,*PEMRTEXT;
1978 typedef struct tagEMREXTTEXTOUTA {
1979 	EMR emr;
1980 	RECTL rclBounds;
1981 	DWORD iGraphicsMode;
1982 	FLOAT exScale;
1983 	FLOAT eyScale;
1984 	EMRTEXT emrtext;
1985 } EMREXTTEXTOUTA,*PEMREXTTEXTOUTA,EMREXTTEXTOUTW,*PEMREXTTEXTOUTW;
1986 typedef struct tagEMRFILLPATH {
1987 	EMR emr;
1988 	RECTL rclBounds;
1989 } EMRFILLPATH,*PEMRFILLPATH,EMRSTROKEANDFILLPATH,*PEMRSTROKEANDFILLPATH,EMRSTROKEPATH,*PEMRSTROKEPATH;
1990 typedef struct tagEMRFILLRGN {
1991 	EMR emr;
1992 	RECTL rclBounds;
1993 	DWORD cbRgnData;
1994 	DWORD ihBrush;
1995 	BYTE RgnData[1];
1996 } EMRFILLRGN,*PEMRFILLRGN;
1997 typedef struct tagEMRFORMAT   {
1998 	DWORD dSignature;
1999 	DWORD nVersion;
2000 	DWORD cbData;
2001 	DWORD offData;
2002 } EMRFORMAT, *PEMRFORMAT;
2003 
2004 
2005 typedef struct tagEMRSETCOLORSPACE
2006 {
2007     EMR   emr;
2008     DWORD ihCS;
2009 } EMRSETCOLORSPACE, *PEMRSETCOLORSPACE, EMRSELECTCOLORSPACE, *PEMRSELECTCOLORSPACE,
2010   EMRDELETECOLORSPACE, *PEMRDELETECOLORSPACE;
2011 
2012 typedef struct tagEMRFRAMERGN {
2013 	EMR emr;
2014 	RECTL rclBounds;
2015 	DWORD cbRgnData;
2016 	DWORD ihBrush;
2017 	SIZEL szlStroke;
2018 	BYTE RgnData[1];
2019 } EMRFRAMERGN,*PEMRFRAMERGN;
2020 typedef struct tagEMRGDICOMMENT {
2021 	EMR emr;
2022 	DWORD cbData;
2023 	BYTE Data[1];
2024 } EMRGDICOMMENT,*PEMRGDICOMMENT;
2025 typedef struct tagEMRINVERTRGN {
2026 	EMR emr;
2027 	RECTL rclBounds;
2028 	DWORD cbRgnData;
2029 	BYTE RgnData[1];
2030 } EMRINVERTRGN,*PEMRINVERTRGN,EMRPAINTRGN,*PEMRPAINTRGN;
2031 typedef struct tagEMRLINETO {
2032 	EMR emr;
2033 	POINTL ptl;
2034 } EMRLINETO,*PEMRLINETO,EMRMOVETOEX,*PEMRMOVETOEX;
2035 typedef struct tagEMRMASKBLT {
2036 	EMR emr;
2037 	RECTL rclBounds;
2038 	LONG xDest;
2039 	LONG yDest;
2040 	LONG cxDest;
2041 	LONG cyDest;
2042 	DWORD dwRop;
2043 	LONG xSrc;
2044 	LONG ySrc;
2045 	XFORM xformSrc;
2046 	COLORREF crBkColorSrc;
2047 	DWORD iUsageSrc;
2048 	DWORD offBmiSrc;
2049 	DWORD cbBmiSrc;
2050 	DWORD offBitsSrc;
2051 	DWORD cbBitsSrc;
2052 	LONG xMask;
2053 	LONG yMask;
2054 	DWORD iUsageMask;
2055 	DWORD offBmiMask;
2056 	DWORD cbBmiMask;
2057 	DWORD offBitsMask;
2058 	DWORD cbBitsMask;
2059 } EMRMASKBLT,*PEMRMASKBLT;
2060 typedef struct tagEMRMODIFYWORLDTRANSFORM {
2061 	EMR emr;
2062 	XFORM xform;
2063 	DWORD iMode;
2064 } EMRMODIFYWORLDTRANSFORM,*PEMRMODIFYWORLDTRANSFORM;
2065 typedef struct tagEMROFFSETCLIPRGN {
2066 	EMR emr;
2067 	POINTL ptlOffset;
2068 } EMROFFSETCLIPRGN,*PEMROFFSETCLIPRGN;
2069 typedef struct tagEMRPLGBLT {
2070 	EMR emr;
2071 	RECTL rclBounds;
2072 	POINTL aptlDest[3];
2073 	LONG xSrc;
2074 	LONG ySrc;
2075 	LONG cxSrc;
2076 	LONG cySrc;
2077 	XFORM xformSrc;
2078 	COLORREF crBkColorSrc;
2079 	DWORD iUsageSrc;
2080 	DWORD offBmiSrc;
2081 	DWORD cbBmiSrc;
2082 	DWORD offBitsSrc;
2083 	DWORD cbBitsSrc;
2084 	LONG xMask;
2085 	LONG yMask;
2086 	DWORD iUsageMask;
2087 	DWORD offBmiMask;
2088 	DWORD cbBmiMask;
2089 	DWORD offBitsMask;
2090 	DWORD cbBitsMask;
2091 } EMRPLGBLT,*PEMRPLGBLT;
2092 typedef struct tagEMRPOLYDRAW {
2093 	EMR emr;
2094 	RECTL rclBounds;
2095 	DWORD cptl;
2096 	POINTL aptl[1];
2097 	BYTE abTypes[1];
2098 } EMRPOLYDRAW,*PEMRPOLYDRAW;
2099 typedef struct tagEMRPOLYDRAW16 {
2100 	EMR emr;
2101 	RECTL rclBounds;
2102 	DWORD cpts;
2103 	POINTS apts[1];
2104 	BYTE abTypes[1];
2105 } EMRPOLYDRAW16,*PEMRPOLYDRAW16;
2106 typedef struct tagEMRPOLYLINE {
2107 	EMR emr;
2108 	RECTL rclBounds;
2109 	DWORD cptl;
2110 	POINTL aptl[1];
2111 } EMRPOLYLINE,*PEMRPOLYLINE,EMRPOLYBEZIER,*PEMRPOLYBEZIER,EMRPOLYGON,*PEMRPOLYGON,EMRPOLYBEZIERTO,*PEMRPOLYBEZIERTO,EMRPOLYLINETO,*PEMRPOLYLINETO;
2112 typedef struct tagEMRPOLYLINE16 {
2113 	EMR emr;
2114 	RECTL rclBounds;
2115 	DWORD cpts;
2116 	POINTS apts[1];
2117 } EMRPOLYLINE16,*PEMRPOLYLINE16,EMRPOLYBEZIER16,*PEMRPOLYBEZIER16,EMRPOLYGON16,*PEMRPOLYGON16,EMRPOLYBEZIERTO16,*PEMRPOLYBEZIERTO16,EMRPOLYLINETO16,*PEMRPOLYLINETO16;
2118 typedef struct tagEMRPOLYPOLYLINE {
2119 	EMR emr;
2120 	RECTL rclBounds;
2121 	DWORD nPolys;
2122 	DWORD cptl;
2123 	DWORD aPolyCounts[1];
2124 	POINTL aptl[1];
2125 } EMRPOLYPOLYLINE,*PEMRPOLYPOLYLINE,EMRPOLYPOLYGON,*PEMRPOLYPOLYGON;
2126 typedef struct tagEMRPOLYPOLYLINE16 {
2127 	EMR emr;
2128 	RECTL rclBounds;
2129 	DWORD nPolys;
2130 	DWORD cpts;
2131 	DWORD aPolyCounts[1];
2132 	POINTS apts[1];
2133 } EMRPOLYPOLYLINE16,*PEMRPOLYPOLYLINE16,EMRPOLYPOLYGON16,*PEMRPOLYPOLYGON16;
2134 typedef struct tagEMRPOLYTEXTOUTA {
2135 	EMR emr;
2136 	RECTL rclBounds;
2137 	DWORD iGraphicsMode;
2138 	FLOAT exScale;
2139 	FLOAT eyScale;
2140 	LONG cStrings;
2141 	EMRTEXT aemrtext[1];
2142 } EMRPOLYTEXTOUTA,*PEMRPOLYTEXTOUTA,EMRPOLYTEXTOUTW,*PEMRPOLYTEXTOUTW;
2143 typedef struct tagEMRRESIZEPALETTE {
2144 	EMR emr;
2145 	DWORD ihPal;
2146 	DWORD cEntries;
2147 } EMRRESIZEPALETTE,*PEMRRESIZEPALETTE;
2148 typedef struct tagEMRRESTOREDC {
2149 	EMR emr;
2150 	LONG iRelative;
2151 } EMRRESTOREDC,*PEMRRESTOREDC;
2152 typedef struct tagEMRROUNDRECT {
2153 	EMR emr;
2154 	RECTL rclBox;
2155 	SIZEL szlCorner;
2156 } EMRROUNDRECT,*PEMRROUNDRECT;
2157 typedef struct tagEMRSCALEVIEWPORTEXTEX {
2158 	EMR emr;
2159 	LONG xNum;
2160 	LONG xDenom;
2161 	LONG yNum;
2162 	LONG yDenom;
2163 } EMRSCALEVIEWPORTEXTEX,*PEMRSCALEVIEWPORTEXTEX,EMRSCALEWINDOWEXTEX,*PEMRSCALEWINDOWEXTEX;
2164 
2165 
2166 typedef struct tagEMRSELECTOBJECT {
2167 	EMR emr;
2168 	DWORD ihObject;
2169 } EMRSELECTOBJECT,*PEMRSELECTOBJECT,EMRDELETEOBJECT,*PEMRDELETEOBJECT;
2170 typedef struct tagEMRSELECTPALETTE {
2171 	EMR emr;
2172 	DWORD ihPal;
2173 } EMRSELECTPALETTE,*PEMRSELECTPALETTE;
2174 typedef struct tagEMRSETARCDIRECTION {
2175 	EMR emr;
2176 	DWORD iArcDirection;
2177 } EMRSETARCDIRECTION,*PEMRSETARCDIRECTION;
2178 typedef struct tagEMRSETTEXTCOLOR {
2179 	EMR emr;
2180 	COLORREF crColor;
2181 } EMRSETBKCOLOR,*PEMRSETBKCOLOR,EMRSETTEXTCOLOR,*PEMRSETTEXTCOLOR;
2182 typedef struct tagEMRSETCOLORADJUSTMENT {
2183 	EMR emr;
2184 	COLORADJUSTMENT ColorAdjustment;
2185 } EMRSETCOLORADJUSTMENT,*PEMRSETCOLORADJUSTMENT;
2186 typedef struct tagEMRSETDIBITSTODEVICE {
2187 	EMR emr;
2188 	RECTL rclBounds;
2189 	LONG xDest;
2190 	LONG yDest;
2191 	LONG xSrc;
2192 	LONG ySrc;
2193 	LONG cxSrc;
2194 	LONG cySrc;
2195 	DWORD offBmiSrc;
2196 	DWORD cbBmiSrc;
2197 	DWORD offBitsSrc;
2198 	DWORD cbBitsSrc;
2199 	DWORD iUsageSrc;
2200 	DWORD iStartScan;
2201 	DWORD cScans;
2202 } EMRSETDIBITSTODEVICE,*PEMRSETDIBITSTODEVICE;
2203 typedef struct tagEMRSETMAPPERFLAGS {
2204 	EMR emr;
2205 	DWORD dwFlags;
2206 } EMRSETMAPPERFLAGS,*PEMRSETMAPPERFLAGS;
2207 typedef struct tagEMRSETMITERLIMIT {
2208 	EMR emr;
2209 	FLOAT eMiterLimit;
2210 } EMRSETMITERLIMIT,*PEMRSETMITERLIMIT;
2211 typedef struct tagEMRSETPALETTEENTRIES {
2212 	EMR emr;
2213 	DWORD ihPal;
2214 	DWORD iStart;
2215 	DWORD cEntries;
2216 	PALETTEENTRY aPalEntries[1];
2217 } EMRSETPALETTEENTRIES,*PEMRSETPALETTEENTRIES;
2218 typedef struct tagEMRSETPIXELV {
2219 	EMR emr;
2220 	POINTL ptlPixel;
2221 	COLORREF crColor;
2222 } EMRSETPIXELV,*PEMRSETPIXELV;
2223 typedef struct tagEMRSETVIEWPORTEXTEX {
2224 	EMR emr;
2225 	SIZEL szlExtent;
2226 } EMRSETVIEWPORTEXTEX,*PEMRSETVIEWPORTEXTEX,EMRSETWINDOWEXTEX,*PEMRSETWINDOWEXTEX;
2227 typedef struct tagEMRSETVIEWPORTORGEX {
2228 	EMR emr;
2229 	POINTL ptlOrigin;
2230 } EMRSETVIEWPORTORGEX,*PEMRSETVIEWPORTORGEX,EMRSETWINDOWORGEX,*PEMRSETWINDOWORGEX,EMRSETBRUSHORGEX,*PEMRSETBRUSHORGEX;
2231 typedef struct tagEMRSETWORLDTRANSFORM {
2232 	EMR emr;
2233 	XFORM xform;
2234 } EMRSETWORLDTRANSFORM,*PEMRSETWORLDTRANSFORM;
2235 typedef struct tagEMRSTRETCHBLT {
2236 	EMR emr;
2237 	RECTL rclBounds;
2238 	LONG xDest;
2239 	LONG yDest;
2240 	LONG cxDest;
2241 	LONG cyDest;
2242 	DWORD dwRop;
2243 	LONG xSrc;
2244 	LONG ySrc;
2245 	XFORM xformSrc;
2246 	COLORREF crBkColorSrc;
2247 	DWORD iUsageSrc;
2248 	DWORD offBmiSrc;
2249 	DWORD cbBmiSrc;
2250 	DWORD offBitsSrc;
2251 	DWORD cbBitsSrc;
2252 	LONG cxSrc;
2253 	LONG cySrc;
2254 } EMRSTRETCHBLT,*PEMRSTRETCHBLT;
2255 typedef struct tagEMRALPHABLEND {
2256 	EMR      emr;
2257 	RECTL    rclBounds;
2258 	LONG     xDest;
2259 	LONG     yDest;
2260 	LONG     cxDest;
2261 	LONG     cyDest;
2262 	DWORD    dwRop;
2263 	LONG     xSrc;
2264 	LONG     ySrc;
2265 	XFORM    xformSrc;
2266 	COLORREF crBkColorSrc;
2267 	DWORD    iUsageSrc;
2268 	DWORD    offBmiSrc;
2269 	DWORD    cbBmiSrc;
2270 	DWORD    offBitsSrc;
2271 	DWORD    cbBitsSrc;
2272 	LONG     cxSrc;
2273 	LONG     cySrc;
2274 } EMRALPHABLEND, *PEMRALPHABLEND;
2275 typedef struct tagEMRSTRETCHDIBITS {
2276 	EMR emr;
2277 	RECTL rclBounds;
2278 	LONG xDest;
2279 	LONG yDest;
2280 	LONG xSrc;
2281 	LONG ySrc;
2282 	LONG cxSrc;
2283 	LONG cySrc;
2284 	DWORD offBmiSrc;
2285 	DWORD cbBmiSrc;
2286 	DWORD offBitsSrc;
2287 	DWORD cbBitsSrc;
2288 	DWORD iUsageSrc;
2289 	DWORD dwRop;
2290 	LONG cxDest;
2291 	LONG cyDest;
2292 } EMRSTRETCHDIBITS,*PEMRSTRETCHDIBITS;
2293 typedef struct tagABORTPATH {
2294 	EMR emr;
2295 } EMRABORTPATH,*PEMRABORTPATH,EMRBEGINPATH,*PEMRBEGINPATH,EMRENDPATH,*PEMRENDPATH,EMRCLOSEFIGURE,*PEMRCLOSEFIGURE,EMRFLATTENPATH,*PEMRFLATTENPATH,EMRWIDENPATH,*PEMRWIDENPATH,EMRSETMETARGN,*PEMRSETMETARGN,EMRSAVEDC,*PEMRSAVEDC,EMRREALIZEPALETTE,*PEMRREALIZEPALETTE;
2296 typedef struct tagEMRSELECTCLIPPATH {
2297 	EMR emr;
2298 	DWORD iMode;
2299 } EMRSELECTCLIPPATH,*PEMRSELECTCLIPPATH, EMRSETBKMODE,*PEMRSETBKMODE, EMRSETMAPMODE, *PEMRSETMAPMODE,
2300   EMRSETPOLYFILLMODE, *PEMRSETPOLYFILLMODE, EMRSETROP2, *PEMRSETROP2, EMRSETSTRETCHBLTMODE, *PEMRSETSTRETCHBLTMODE,
2301   EMRSETICMMODE, *PEMRSETICMMODE, EMRSETTEXTALIGN,
2302 #if(WINVER >= 0x0500)
2303   EMRSETLAYOUT, *PEMRSETLAYOUT,
2304 #endif
2305   *PEMRSETTEXTALIGN;
2306 
2307 #include "pshpack2.h"
2308 typedef struct tagMETAHEADER {
2309 	WORD mtType;
2310 	WORD mtHeaderSize;
2311 	WORD mtVersion;
2312 	DWORD mtSize;
2313 	WORD mtNoObjects;
2314 	DWORD mtMaxRecord;
2315 	WORD mtNoParameters;
2316 } METAHEADER,*PMETAHEADER,*LPMETAHEADER;
2317 #include "poppack.h"
2318 typedef struct tagENHMETAHEADER {
2319 	DWORD iType;
2320 	DWORD nSize;
2321 	RECTL rclBounds;
2322 	RECTL rclFrame;
2323 	DWORD dSignature;
2324 	DWORD nVersion;
2325 	DWORD nBytes;
2326 	DWORD nRecords;
2327 	WORD nHandles;
2328 	WORD sReserved;
2329 	DWORD nDescription;
2330 	DWORD offDescription;
2331 	DWORD nPalEntries;
2332 	SIZEL szlDevice;
2333 	SIZEL szlMillimeters;
2334 #if (WINVER >= 0x0400)
2335 	DWORD cbPixelFormat;
2336 	DWORD offPixelFormat;
2337 	DWORD bOpenGL;
2338 #endif
2339 #if (WINVER >= 0x0500)
2340 	SIZEL szlMicrometers;
2341 #endif
2342 } ENHMETAHEADER,*PENHMETAHEADER,*LPENHMETAHEADER;
2343 typedef struct tagMETARECORD {
2344 	DWORD rdSize;
2345 	WORD rdFunction;
2346 	WORD rdParm[1];
2347 } METARECORD,*PMETARECORD,*LPMETARECORD;
2348 typedef struct tagENHMETARECORD {
2349 	DWORD iType;
2350 	DWORD nSize;
2351 	DWORD dParm[1];
2352 } ENHMETARECORD,*LPENHMETARECORD;
2353 typedef struct tagHANDLETABLE {
2354 	HGDIOBJ objectHandle[1];
2355 } HANDLETABLE,*PHANDLETABLE, *LPHANDLETABLE;
2356 
2357 #ifndef _TEXTMETRIC_DEFINED
2358 #define _TEXTMETRIC_DEFINED
2359 typedef struct tagTEXTMETRICA {
2360 	LONG tmHeight;
2361 	LONG tmAscent;
2362 	LONG tmDescent;
2363 	LONG tmInternalLeading;
2364 	LONG tmExternalLeading;
2365 	LONG tmAveCharWidth;
2366 	LONG tmMaxCharWidth;
2367 	LONG tmWeight;
2368 	LONG tmOverhang;
2369 	LONG tmDigitizedAspectX;
2370 	LONG tmDigitizedAspectY;
2371 	BYTE tmFirstChar;
2372 	BYTE tmLastChar;
2373 	BYTE tmDefaultChar;
2374 	BYTE tmBreakChar;
2375 	BYTE tmItalic;
2376 	BYTE tmUnderlined;
2377 	BYTE tmStruckOut;
2378 	BYTE tmPitchAndFamily;
2379 	BYTE tmCharSet;
2380 } TEXTMETRICA,*PTEXTMETRICA,*LPTEXTMETRICA;
2381 typedef struct tagTEXTMETRICW {
2382 	LONG tmHeight;
2383 	LONG tmAscent;
2384 	LONG tmDescent;
2385 	LONG tmInternalLeading;
2386 	LONG tmExternalLeading;
2387 	LONG tmAveCharWidth;
2388 	LONG tmMaxCharWidth;
2389 	LONG tmWeight;
2390 	LONG tmOverhang;
2391 	LONG tmDigitizedAspectX;
2392 	LONG tmDigitizedAspectY;
2393 	WCHAR tmFirstChar;
2394 	WCHAR tmLastChar;
2395 	WCHAR tmDefaultChar;
2396 	WCHAR tmBreakChar;
2397 	BYTE tmItalic;
2398 	BYTE tmUnderlined;
2399 	BYTE tmStruckOut;
2400 	BYTE tmPitchAndFamily;
2401 	BYTE tmCharSet;
2402 } TEXTMETRICW,*PTEXTMETRICW,*LPTEXTMETRICW;
2403 #endif
2404 
2405 typedef struct _RGNDATAHEADER {
2406 	DWORD dwSize;
2407 	DWORD iType;
2408 	DWORD nCount;
2409 	DWORD nRgnSize;
2410 	RECT rcBound;
2411 } RGNDATAHEADER, *PRGNDATAHEADER;
2412 typedef struct _RGNDATA {
2413 	RGNDATAHEADER rdh;
2414 	char Buffer[1];
2415 } RGNDATA,*PRGNDATA, *LPRGNDATA;
2416 /* for GetRandomRgn */
2417 #define SYSRGN  4
2418 typedef struct tagGCP_RESULTSA {
2419 	DWORD lStructSize;
2420 	LPSTR lpOutString;
2421 	UINT *lpOrder;
2422 	INT *lpDx;
2423 	INT *lpCaretPos;
2424 	LPSTR lpClass;
2425 	LPWSTR lpGlyphs;
2426 	UINT nGlyphs;
2427 	UINT nMaxFit;
2428 } GCP_RESULTSA,*LPGCP_RESULTSA;
2429 typedef struct tagGCP_RESULTSW {
2430 	DWORD lStructSize;
2431 	LPWSTR lpOutString;
2432 	UINT *lpOrder;
2433 	INT *lpDx;
2434 	INT *lpCaretPos;
2435 	LPWSTR lpClass;
2436 	LPWSTR lpGlyphs;
2437 	UINT nGlyphs;
2438 	UINT nMaxFit;
2439 } GCP_RESULTSW,*LPGCP_RESULTSW;
2440 typedef struct _GLYPHMETRICS {
2441 	UINT gmBlackBoxX;
2442 	UINT gmBlackBoxY;
2443 	POINT gmptGlyphOrigin;
2444 	short gmCellIncX;
2445 	short gmCellIncY;
2446 } GLYPHMETRICS,*LPGLYPHMETRICS;
2447 #if (_WIN32_WINNT >= 0x0500)
2448 typedef struct tagWCRANGE
2449 {
2450     WCHAR  wcLow;
2451     USHORT cGlyphs;
2452 } WCRANGE, *PWCRANGE, *LPWCRANGE;
2453 typedef struct tagGLYPHSET
2454 {
2455 	DWORD cbThis;
2456 	DWORD flAccel;
2457 	DWORD cGlyphsSupported;
2458 	DWORD cRanges;
2459 	WCRANGE ranges[1];
2460 } GLYPHSET, *PGLYPHSET, *LPGLYPHSET;
2461 #endif
2462 typedef struct tagKERNINGPAIR {
2463 	WORD wFirst;
2464 	WORD wSecond;
2465 	int iKernAmount;
2466 } KERNINGPAIR,*LPKERNINGPAIR;
2467 typedef struct _FIXED {
2468 	WORD fract;
2469 	short value;
2470 } FIXED;
2471 typedef struct _MAT2 {
2472 	FIXED eM11;
2473 	FIXED eM12;
2474 	FIXED eM21;
2475 	FIXED eM22;
2476 } MAT2,*LPMAT2;
2477 typedef struct _OUTLINETEXTMETRICA {
2478 	UINT otmSize;
2479 	TEXTMETRICA otmTextMetrics;
2480 	BYTE otmFiller;
2481 	PANOSE otmPanoseNumber;
2482 	UINT otmfsSelection;
2483 	UINT otmfsType;
2484 	int otmsCharSlopeRise;
2485 	int otmsCharSlopeRun;
2486 	int otmItalicAngle;
2487 	UINT otmEMSquare;
2488 	int otmAscent;
2489 	int otmDescent;
2490 	UINT otmLineGap;
2491 	UINT otmsCapEmHeight;
2492 	UINT otmsXHeight;
2493 	RECT otmrcFontBox;
2494 	int otmMacAscent;
2495 	int otmMacDescent;
2496 	UINT otmMacLineGap;
2497 	UINT otmusMinimumPPEM;
2498 	POINT otmptSubscriptSize;
2499 	POINT otmptSubscriptOffset;
2500 	POINT otmptSuperscriptSize;
2501 	POINT otmptSuperscriptOffset;
2502 	UINT otmsStrikeoutSize;
2503 	int otmsStrikeoutPosition;
2504 	int otmsUnderscoreSize;
2505 	int otmsUnderscorePosition;
2506 	PSTR otmpFamilyName;
2507 	PSTR otmpFaceName;
2508 	PSTR otmpStyleName;
2509 	PSTR otmpFullName;
2510 } OUTLINETEXTMETRICA,*POUTLINETEXTMETRICA,*LPOUTLINETEXTMETRICA;
2511 typedef struct _OUTLINETEXTMETRICW {
2512 	UINT otmSize;
2513 	TEXTMETRICW otmTextMetrics;
2514 	BYTE otmFiller;
2515 	PANOSE otmPanoseNumber;
2516 	UINT otmfsSelection;
2517 	UINT otmfsType;
2518 	int otmsCharSlopeRise;
2519 	int otmsCharSlopeRun;
2520 	int otmItalicAngle;
2521 	UINT otmEMSquare;
2522 	int otmAscent;
2523 	int otmDescent;
2524 	UINT otmLineGap;
2525 	UINT otmsCapEmHeight;
2526 	UINT otmsXHeight;
2527 	RECT otmrcFontBox;
2528 	int otmMacAscent;
2529 	int otmMacDescent;
2530 	UINT otmMacLineGap;
2531 	UINT otmusMinimumPPEM;
2532 	POINT otmptSubscriptSize;
2533 	POINT otmptSubscriptOffset;
2534 	POINT otmptSuperscriptSize;
2535 	POINT otmptSuperscriptOffset;
2536 	UINT otmsStrikeoutSize;
2537 	int otmsStrikeoutPosition;
2538 	int otmsUnderscoreSize;
2539 	int otmsUnderscorePosition;
2540 	PSTR otmpFamilyName;
2541 	PSTR otmpFaceName;
2542 	PSTR otmpStyleName;
2543 	PSTR otmpFullName;
2544 } OUTLINETEXTMETRICW,*POUTLINETEXTMETRICW,*LPOUTLINETEXTMETRICW;
2545 typedef struct _RASTERIZER_STATUS {
2546 	short nSize;
2547 	short wFlags;
2548 	short nLanguageID;
2549 } RASTERIZER_STATUS,*LPRASTERIZER_STATUS;
2550 typedef struct _POLYTEXTA {
2551 	int x;
2552 	int y;
2553 	UINT n;
2554 	LPCSTR lpstr;
2555 	UINT uiFlags;
2556 	RECT rcl;
2557 	int *pdx;
2558 } POLYTEXTA, *PPOLYTEXTA, *LPPOLYTEXTA;
2559 typedef struct _POLYTEXTW {
2560 	int x;
2561 	int y;
2562 	UINT n;
2563 	LPCWSTR lpstr;
2564 	UINT uiFlags;
2565 	RECT rcl;
2566 	int *pdx;
2567 } POLYTEXTW, *PPOLYTEXTW, *LPPOLYTEXTW;
2568 typedef struct tagPIXELFORMATDESCRIPTOR {
2569 	WORD nSize;
2570 	WORD nVersion;
2571 	DWORD dwFlags;
2572 	BYTE iPixelType;
2573 	BYTE cColorBits;
2574 	BYTE cRedBits;
2575 	BYTE cRedShift;
2576 	BYTE cGreenBits;
2577 	BYTE cGreenShift;
2578 	BYTE cBlueBits;
2579 	BYTE cBlueShift;
2580 	BYTE cAlphaBits;
2581 	BYTE cAlphaShift;
2582 	BYTE cAccumBits;
2583 	BYTE cAccumRedBits;
2584 	BYTE cAccumGreenBits;
2585 	BYTE cAccumBlueBits;
2586 	BYTE cAccumAlphaBits;
2587 	BYTE cDepthBits;
2588 	BYTE cStencilBits;
2589 	BYTE cAuxBuffers;
2590 	BYTE iLayerType;
2591 	BYTE bReserved;
2592 	DWORD dwLayerMask;
2593 	DWORD dwVisibleMask;
2594 	DWORD dwDamageMask;
2595 } PIXELFORMATDESCRIPTOR,*PPIXELFORMATDESCRIPTOR,*LPPIXELFORMATDESCRIPTOR;
2596 
2597 typedef struct tagEMRPIXELFORMAT
2598 {
2599     EMR emr;
2600     PIXELFORMATDESCRIPTOR pfd;
2601 } EMRPIXELFORMAT, *PEMRPIXELFORMAT;
2602 
2603 typedef struct tagMETAFILEPICT {
2604 	LONG mm;
2605 	LONG xExt;
2606 	LONG yExt;
2607 	HMETAFILE hMF;
2608 } METAFILEPICT,*LPMETAFILEPICT;
2609 typedef struct tagLOCALESIGNATURE {
2610 	DWORD lsUsb[4];
2611 	DWORD lsCsbDefault[2];
2612 	DWORD lsCsbSupported[2];
2613 } LOCALESIGNATURE,*PLOCALESIGNATURE,*LPLOCALESIGNATURE;
2614 typedef LONG LCSTYPE;
2615 #include "pshpack4.h"
2616 typedef struct tagNEWTEXTMETRICA {
2617 	LONG tmHeight;
2618 	LONG tmAscent;
2619 	LONG tmDescent;
2620 	LONG tmInternalLeading;
2621 	LONG tmExternalLeading;
2622 	LONG tmAveCharWidth;
2623 	LONG tmMaxCharWidth;
2624 	LONG tmWeight;
2625 	LONG tmOverhang;
2626 	LONG tmDigitizedAspectX;
2627 	LONG tmDigitizedAspectY;
2628 	BYTE tmFirstChar;
2629 	BYTE tmLastChar;
2630 	BYTE tmDefaultChar;
2631 	BYTE tmBreakChar;
2632 	BYTE tmItalic;
2633 	BYTE tmUnderlined;
2634 	BYTE tmStruckOut;
2635 	BYTE tmPitchAndFamily;
2636 	BYTE tmCharSet;
2637 	DWORD ntmFlags;
2638 	UINT ntmSizeEM;
2639 	UINT ntmCellHeight;
2640 	UINT ntmAvgWidth;
2641 } NEWTEXTMETRICA,*PNEWTEXTMETRICA,*LPNEWTEXTMETRICA;
2642 typedef struct tagNEWTEXTMETRICW {
2643 	LONG tmHeight;
2644 	LONG tmAscent;
2645 	LONG tmDescent;
2646 	LONG tmInternalLeading;
2647 	LONG tmExternalLeading;
2648 	LONG tmAveCharWidth;
2649 	LONG tmMaxCharWidth;
2650 	LONG tmWeight;
2651 	LONG tmOverhang;
2652 	LONG tmDigitizedAspectX;
2653 	LONG tmDigitizedAspectY;
2654 	WCHAR tmFirstChar;
2655 	WCHAR tmLastChar;
2656 	WCHAR tmDefaultChar;
2657 	WCHAR tmBreakChar;
2658 	BYTE tmItalic;
2659 	BYTE tmUnderlined;
2660 	BYTE tmStruckOut;
2661 	BYTE tmPitchAndFamily;
2662 	BYTE tmCharSet;
2663 	DWORD ntmFlags;
2664 	UINT ntmSizeEM;
2665 	UINT ntmCellHeight;
2666 	UINT ntmAvgWidth;
2667 } NEWTEXTMETRICW,*PNEWTEXTMETRICW,*LPNEWTEXTMETRICW;
2668 #include "poppack.h"
2669 typedef struct tagNEWTEXTMETRICEXA {
2670 	NEWTEXTMETRICA ntmTm;
2671 	FONTSIGNATURE ntmFontSig;
2672 } NEWTEXTMETRICEXA;
2673 typedef struct tagNEWTEXTMETRICEXW {
2674 	NEWTEXTMETRICW ntmTm;
2675 	FONTSIGNATURE ntmFontSig;
2676 } NEWTEXTMETRICEXW;
2677 typedef struct tagPELARRAY {
2678 	LONG paXCount;
2679 	LONG paYCount;
2680 	LONG paXExt;
2681 	LONG paYExt;
2682 	BYTE paRGBs;
2683 } PELARRAY,*PPELARRAY,*LPPELARRAY;
2684 typedef struct tagENUMLOGFONTA {
2685 	LOGFONTA elfLogFont;
2686 	BYTE elfFullName[LF_FULLFACESIZE];
2687 	BYTE elfStyle[LF_FACESIZE];
2688 } ENUMLOGFONTA,*LPENUMLOGFONTA;
2689 typedef struct tagENUMLOGFONTW {
2690 	LOGFONTW elfLogFont;
2691 	WCHAR elfFullName[LF_FULLFACESIZE];
2692 	WCHAR elfStyle[LF_FACESIZE];
2693 } ENUMLOGFONTW,*LPENUMLOGFONTW;
2694 typedef struct tagENUMLOGFONTEXA {
2695 	LOGFONTA elfLogFont;
2696 	BYTE elfFullName[LF_FULLFACESIZE];
2697 	BYTE elfStyle[LF_FACESIZE];
2698 	BYTE elfScript[LF_FACESIZE];
2699 } ENUMLOGFONTEXA,*LPENUMLOGFONTEXA;
2700 typedef struct tagENUMLOGFONTEXW {
2701 	LOGFONTW elfLogFont;
2702 	WCHAR elfFullName[LF_FULLFACESIZE];
2703 	WCHAR elfStyle[LF_FACESIZE];
2704 	WCHAR elfScript[LF_FACESIZE];
2705 } ENUMLOGFONTEXW,*LPENUMLOGFONTEXW;
2706 typedef struct tagPOINTFX {
2707 	FIXED x;
2708 	FIXED y;
2709 } POINTFX,*LPPOINTFX;
2710 typedef struct tagTTPOLYCURVE {
2711 	WORD wType;
2712 	WORD cpfx;
2713 	POINTFX apfx[1];
2714 } TTPOLYCURVE,*LPTTPOLYCURVE;
2715 typedef struct tagTTPOLYGONHEADER {
2716 	DWORD cb;
2717 	DWORD dwType;
2718 	POINTFX pfxStart;
2719 } TTPOLYGONHEADER,*LPTTPOLYGONHEADER;
2720 typedef struct _POINTFLOAT {
2721 	FLOAT x;
2722 	FLOAT y;
2723 } POINTFLOAT,*PPOINTFLOAT;
2724 typedef struct _GLYPHMETRICSFLOAT {
2725 	FLOAT gmfBlackBoxX;
2726 	FLOAT gmfBlackBoxY;
2727 	POINTFLOAT gmfptGlyphOrigin;
2728 	FLOAT gmfCellIncX;
2729 	FLOAT gmfCellIncY;
2730 } GLYPHMETRICSFLOAT,*PGLYPHMETRICSFLOAT,*LPGLYPHMETRICSFLOAT;
2731 typedef struct tagLAYERPLANEDESCRIPTOR {
2732 	WORD nSize;
2733 	WORD nVersion;
2734 	DWORD dwFlags;
2735 	BYTE iPixelType;
2736 	BYTE cColorBits;
2737 	BYTE cRedBits;
2738 	BYTE cRedShift;
2739 	BYTE cGreenBits;
2740 	BYTE cGreenShift;
2741 	BYTE cBlueBits;
2742 	BYTE cBlueShift;
2743 	BYTE cAlphaBits;
2744 	BYTE cAlphaShift;
2745 	BYTE cAccumBits;
2746 	BYTE cAccumRedBits;
2747 	BYTE cAccumGreenBits;
2748 	BYTE cAccumBlueBits;
2749 	BYTE cAccumAlphaBits;
2750 	BYTE cDepthBits;
2751 	BYTE cStencilBits;
2752 	BYTE cAuxBuffers;
2753 	BYTE iLayerPlane;
2754 	BYTE bReserved;
2755 	COLORREF crTransparent;
2756 } LAYERPLANEDESCRIPTOR,*PLAYERPLANEDESCRIPTOR,*LPLAYERPLANEDESCRIPTOR;
2757 typedef struct _BLENDFUNCTION {
2758     BYTE BlendOp;
2759     BYTE BlendFlags;
2760     BYTE SourceConstantAlpha;
2761     BYTE AlphaFormat;
2762 } BLENDFUNCTION,*PBLENDFUNCTION,*LPBLENDFUNCTION;
2763 #define STAMP_DESIGNVECTOR (0x8000000 + 'd' + ('v' << 8))
2764 #define STAMP_AXESLIST     (0x8000000 + 'a' + ('l' << 8))
2765 #define MM_MAX_NUMAXES  16
2766 typedef struct _DESIGNVECTOR {
2767 	DWORD dvReserved;
2768 	DWORD dvNumAxes;
2769 	LONG dvValues[MM_MAX_NUMAXES];
2770 } DESIGNVECTOR, *PDESIGNVECTOR, *LPDESIGNVECTOR;
2771 typedef struct tagENUMLOGFONTEXDVA
2772 {
2773 	ENUMLOGFONTEXA elfEnumLogfontEx;
2774 	DESIGNVECTOR elfDesignVector;
2775 } ENUMLOGFONTEXDVA, *PENUMLOGFONTEXDVA, *LPENUMLOGFONTEXDVA;
2776 typedef struct tagENUMLOGFONTEXDVW
2777 {
2778 	ENUMLOGFONTEXW elfEnumLogfontEx;
2779 	DESIGNVECTOR elfDesignVector;
2780 } ENUMLOGFONTEXDVW, *PENUMLOGFONTEXDVW, *LPENUMLOGFONTEXDVW;
2781 typedef USHORT COLOR16;
2782 typedef struct _TRIVERTEX {
2783 	LONG x;
2784 	LONG y;
2785 	COLOR16 Red;
2786 	COLOR16 Green;
2787 	COLOR16 Blue;
2788 	COLOR16 Alpha;
2789 } TRIVERTEX, *PTRIVERTEX, *LPTRIVERTEX;
2790 typedef struct tagEMRGRADIENTFILL {
2791     EMR       emr;
2792     RECTL     rclBounds;
2793     DWORD     nVer;
2794     DWORD     nTri;
2795     ULONG     ulMode;
2796     TRIVERTEX Ver[1];
2797 } EMRGRADIENTFILL, *PEMRGRADIENTFILL;
2798 typedef struct _GRADIENT_TRIANGLE {
2799 	ULONG Vertex1;
2800 	ULONG Vertex2;
2801 	ULONG Vertex3;
2802 } GRADIENT_TRIANGLE,*PGRADIENT_TRIANGLE,*LPGRADIENT_TRIANGLE;
2803 typedef struct _GRADIENT_RECT {
2804 	ULONG UpperLeft;
2805 	ULONG LowerRight;
2806 }GRADIENT_RECT,*PGRADIENT_RECT,*LPGRADIENT_RECT;
2807 typedef struct _DISPLAY_DEVICEA {
2808   DWORD cb;
2809   CHAR DeviceName[32];
2810   CHAR DeviceString[128];
2811   DWORD StateFlags;
2812   CHAR DeviceID[128];
2813   CHAR DeviceKey[128];
2814 } DISPLAY_DEVICEA, *PDISPLAY_DEVICEA, *LPDISPLAY_DEVICEA;
2815 typedef struct _DISPLAY_DEVICEW {
2816   DWORD cb;
2817   WCHAR DeviceName[32];
2818   WCHAR DeviceString[128];
2819   DWORD StateFlags;
2820   WCHAR DeviceID[128];
2821   WCHAR DeviceKey[128];
2822 } DISPLAY_DEVICEW, *PDISPLAY_DEVICEW, *LPDISPLAY_DEVICEW;
2823 #define MM_MAX_AXES_NAMELEN 16
2824 typedef struct _AXISINFOA
2825 {
2826   LONG   axMinValue;
2827   LONG   axMaxValue;
2828   BYTE   axAxisName[MM_MAX_AXES_NAMELEN];
2829 } AXISINFOA, *PAXISINFOA, *LPAXISINFOA;
2830 typedef struct _AXISINFOW
2831 {
2832   LONG   axMinValue;
2833   LONG   axMaxValue;
2834   WCHAR  axAxisName[MM_MAX_AXES_NAMELEN];
2835 } AXISINFOW, *PAXISINFOW, *LPAXISINFOW;
2836 typedef struct _AXESLISTA
2837 {
2838   DWORD     axlReserved;
2839   DWORD     axlNumAxes;
2840   AXISINFOA axlAxisInfo[MM_MAX_NUMAXES];
2841 } AXESLISTA, *PAXESLISTA, *LPAXESLISTA;
2842 typedef struct _AXESLISTW
2843 {
2844   DWORD     axlReserved;
2845   DWORD     axlNumAxes;
2846   AXISINFOW axlAxisInfo[MM_MAX_NUMAXES];
2847 } AXESLISTW, *PAXESLISTW, *LPAXESLISTW;
2848 typedef struct _ENUMTEXTMETRICA
2849 {
2850     NEWTEXTMETRICEXA etmNewTextMetricEx;
2851     AXESLISTA        etmAxesList;
2852 } ENUMTEXTMETRICA, *PENUMTEXTMETRICA, *LPENUMTEXTMETRICA;
2853 typedef struct _ENUMTEXTMETRICW
2854 {
2855     NEWTEXTMETRICEXW etmNewTextMetricEx;
2856     AXESLISTW        etmAxesList;
2857 } ENUMTEXTMETRICW, *PENUMTEXTMETRICW, *LPENUMTEXTMETRICW;
2858 
2859 
2860 #if defined(STRICT)
2861 
2862 #if !defined(NOTEXTMETRIC)
2863 
2864 typedef int (CALLBACK *OLDFONTENUMPROCA)(CONST LOGFONTA *, CONST TEXTMETRICA *, DWORD, LPARAM);
2865 typedef int (CALLBACK *OLDFONTENUMPROCW)(CONST LOGFONTW *, CONST TEXTMETRICW *, DWORD, LPARAM);
2866 
2867 #else
2868 
2869 typedef int (CALLBACK* OLDFONTENUMPROCA)(CONST LOGFONTA *, CONST VOID *, DWORD, LPARAM);
2870 typedef int (CALLBACK* OLDFONTENUMPROCW)(CONST LOGFONTW *, CONST VOID *, DWORD, LPARAM);
2871 
2872 #endif
2873 
2874 #ifdef UNICODE
2875 #define OLDFONTENUMPROC OLDFONTENUMPROCW
2876 #else
2877 #define OLDFONTENUMPROC OLDFONTENUMPROCA
2878 #endif
2879 
2880 typedef OLDFONTENUMPROCA FONTENUMPROCA;
2881 typedef OLDFONTENUMPROCW FONTENUMPROCW;
2882 
2883 #ifdef UNICODE
2884 typedef FONTENUMPROCW FONTENUMPROC;
2885 #else
2886 typedef FONTENUMPROCA FONTENUMPROC;
2887 #endif
2888 
2889 typedef INT (CALLBACK *GOBJENUMPROC)(LPVOID, LPARAM);
2890 typedef VOID (CALLBACK *LINEDDAPROC)(INT, INT, LPARAM);
2891 
2892 #else // defined(STRICT)
2893 
2894 typedef FARPROC OLDFONTENUMPROC;
2895 typedef FARPROC FONTENUMPROCA;
2896 typedef FARPROC FONTENUMPROCW;
2897 
2898 #ifdef UNICODE
2899 typedef FONTENUMPROCW FONTENUMPROC;
2900 #else
2901 typedef FONTENUMPROCA FONTENUMPROC;
2902 #endif
2903 
2904 typedef FARPROC GOBJENUMPROC;
2905 typedef FARPROC LINEDDAPROC;
2906 
2907 #endif
2908 
2909 
2910 typedef BOOL (CALLBACK *ABORTPROC)(HDC,int);
2911 
2912 typedef int
2913 (CALLBACK *MFENUMPROC)(
2914   _In_ HDC hdc,
2915   _In_reads_(nObj) HANDLETABLE FAR* lpht,
2916   _In_ METARECORD FAR* lpMR,
2917   _In_ int nObj,
2918   _In_opt_ LPARAM param);
2919 
2920 typedef int
2921 (CALLBACK *ENHMFENUMPROC)(
2922   _In_ HDC hdc,
2923   _In_reads_(nHandles) HANDLETABLE FAR* lpht,
2924   _In_ CONST ENHMETARECORD * lpmr,
2925   _In_ int nHandles,
2926   _In_opt_ LPARAM data);
2927 
2928 typedef int (CALLBACK *ICMENUMPROCA)(LPSTR,LPARAM);
2929 typedef int (CALLBACK *ICMENUMPROCW)(LPWSTR,LPARAM);
2930 typedef UINT (CALLBACK *LPFNDEVMODE)(HWND,HMODULE,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,UINT);
2931 typedef DWORD (CALLBACK *LPFNDEVCAPS)(LPSTR,LPSTR,UINT,LPSTR,LPDEVMODEA);
2932 
2933 
2934 #define GetRValue(rgb) ((BYTE)(rgb))
2935 #define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8))
2936 #define GetBValue(rgb) ((BYTE)((rgb)>>16))
2937 #define GetAValue(rgb) ((BYTE)((rgb)>>24))
2938 
2939 #define RGB(r,g,b)          ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
2940 #define RGBA(r,g,b,a)       ((COLORREF)((((DWORD)(BYTE)(a))<<24) | RGB(r,g,b)))
2941 #define PALETTERGB(r,g,b)   (0x02000000 | RGB(r,g,b))
2942 #define PALETTEINDEX(i)     ((COLORREF)(0x01000000 | (DWORD)(WORD)(i)))
2943 
2944 #define MAKEPOINTS(l) (*((POINTS*)&(l)))
2945 #define MAKEROP4(f,b) (DWORD)((((b)<<8)&0xFF000000)|(f))
2946 
2947 INT
2948 WINAPI
2949 AbortDoc(
2950     _In_ HDC hdc);
2951 
2952 BOOL
2953 WINAPI
2954 AbortPath(
2955     _In_ HDC hdc);
2956 
2957 int
2958 WINAPI
2959 AddFontResourceA(
2960     _In_ LPCSTR pszFilename);
2961 
2962 int
2963 WINAPI
2964 AddFontResourceW(
2965     _In_ LPCWSTR pszFilename);
2966 
2967 HANDLE
2968 WINAPI
2969 AddFontMemResourceEx(
2970     _In_reads_bytes_(cjSize) PVOID pvFileView,
2971     _In_ DWORD cjSize,
2972     _Reserved_ PVOID pvResrved,
2973     _In_ DWORD* pNumFonts);
2974 
2975 INT
2976 WINAPI
2977 AddFontResourceExA(
2978     _In_ LPCSTR pszFilename,
2979     _In_ DWORD fl,
2980     _Reserved_ PVOID pvReserved);
2981 
2982 INT
2983 WINAPI
2984 AddFontResourceExW(
2985     _In_ LPCWSTR pszFilename,
2986     _In_ DWORD fl,
2987     _Reserved_ PVOID pvReserved);
2988 
2989 BOOL
2990 WINAPI
2991 AngleArc(
2992     _In_ HDC hdc,
2993     _In_ INT x,
2994     _In_ INT y,
2995     _In_ DWORD dwRadius,
2996     _In_ FLOAT eStartAngle,
2997     _In_ FLOAT eSweepAngle);
2998 
2999 BOOL
3000 WINAPI
3001 AnimatePalette(
3002     _In_ HPALETTE hPal,
3003     _In_ UINT iStartIndex,
3004     _In_ UINT cEntries,
3005     _In_reads_(cEntries) CONST PALETTEENTRY *ppe);
3006 
3007 BOOL
3008 WINAPI
3009 Arc(
3010     _In_ HDC hdc,
3011     _In_ INT xLeft,
3012     _In_ INT yTop,
3013     _In_ INT xRight,
3014     _In_ INT yBottom,
3015     _In_ INT xStartArc,
3016     _In_ INT yStartArc,
3017     _In_ INT xEndArc,
3018     _In_ INT yEndArc);
3019 
3020 BOOL
3021 WINAPI
3022 ArcTo(
3023     _In_ HDC hdc,
3024     _In_ INT xLeft,
3025     _In_ INT yTop,
3026     _In_ INT xRight,
3027     _In_ INT yBottom,
3028     _In_ INT xRadial1,
3029     _In_ INT yRadial1,
3030     _In_ INT xRadial2,
3031     _In_ INT yRadial2);
3032 
3033 BOOL
3034 WINAPI
3035 BeginPath(
3036     _In_ HDC hdc);
3037 
3038 BOOL
3039 WINAPI
3040 BitBlt(
3041     _In_ HDC hdcDest,
3042     _In_ INT xDest,
3043     _In_ INT yDest,
3044     _In_ INT cxDest,
3045     _In_ INT cyDest,
3046     _In_opt_ HDC hdcSrc,
3047     _In_ INT xSrc,
3048     _In_ INT ySrc,
3049     _In_ DWORD dwRop);
3050 
3051 BOOL
3052 WINAPI
3053 CancelDC(
3054     _In_ HDC hdc);
3055 
3056 BOOL
3057 WINAPI
3058 CheckColorsInGamut(
3059   _In_ HDC hdc,
3060   _In_reads_(nCount) LPVOID pRGBTriple,
3061   _Out_writes_bytes_(nCount) LPVOID pvBuffer,
3062   _In_ DWORD nCount);
3063 
3064 BOOL
3065 WINAPI
3066 Chord(
3067     _In_ HDC hdc,
3068     _In_ INT xLeft,
3069     _In_ INT yTop,
3070     _In_ INT xRight,
3071     _In_ INT yBottom,
3072     _In_ INT xRadial1,
3073     _In_ INT yRadial1,
3074     _In_ INT xRadial2,
3075     _In_ INT yRadial2);
3076 
3077 int
3078 WINAPI
3079 ChoosePixelFormat(
3080     _In_ HDC hdc,
3081     _In_ const PIXELFORMATDESCRIPTOR* ppfd);
3082 
3083 HENHMETAFILE
3084 WINAPI
3085 CloseEnhMetaFile(
3086     _In_ HDC hdc);
3087 
3088 BOOL
3089 WINAPI
3090 CloseFigure(
3091     _In_ HDC hdc);
3092 
3093 HMETAFILE
3094 WINAPI
3095 CloseMetaFile(
3096     _In_ HDC hdc);
3097 
3098 BOOL
3099 WINAPI
3100 ColorMatchToTarget(
3101     _In_ HDC hdc,
3102     _In_ HDC hdcTarget,
3103     _In_ DWORD uAction);
3104 
3105 int
3106 WINAPI
3107 CombineRgn(
3108     _In_opt_ HRGN hrgnDest,
3109     _In_opt_ HRGN hrgnSrc1,
3110     _In_opt_ HRGN hrgnSrc2,
3111     _In_ int fnCombineMode);
3112 
3113 BOOL
3114 WINAPI
3115 CombineTransform(
3116     _Out_ LPXFORM pxformResult,
3117     _In_ const XFORM* pxform1,
3118     _In_ const XFORM* pxform2);
3119 
3120 HENHMETAFILE
3121 WINAPI
3122 CopyEnhMetaFileA(
3123     _In_ HENHMETAFILE hemfSrc,
3124     _In_opt_ LPCSTR pszFile);
3125 
3126 HENHMETAFILE
3127 WINAPI
3128 CopyEnhMetaFileW(
3129     _In_ HENHMETAFILE hemfSrc,
3130     _In_opt_ LPCWSTR pszFile);
3131 
3132 HMETAFILE
3133 WINAPI
3134 CopyMetaFileA(
3135     _In_ HMETAFILE hmfSrc,
3136     _In_opt_ LPCSTR pszFile);
3137 
3138 HMETAFILE
3139 WINAPI
3140 CopyMetaFileW(
3141     _In_ HMETAFILE hmfSrc,
3142     _In_opt_ LPCWSTR pszFile);
3143 
3144 HBITMAP
3145 WINAPI
3146 CreateBitmap(
3147     _In_ INT cx,
3148     _In_ INT cy,
3149     _In_ UINT cPlanes,
3150     _In_ UINT cBitsPerPel,
3151     _In_opt_ const VOID* pvBits);
3152 
3153 HBITMAP
3154 WINAPI
3155 CreateBitmapIndirect(
3156     _In_ const BITMAP* pbm);
3157 
3158 HBRUSH
3159 WINAPI
3160 CreateBrushIndirect(
3161     _In_ const LOGBRUSH* plb);
3162 
3163 HCOLORSPACE
3164 WINAPI
3165 CreateColorSpaceA(
3166     _In_ LPLOGCOLORSPACEA pLogColorSpace);
3167 
3168 HCOLORSPACE
3169 WINAPI
3170 CreateColorSpaceW(
3171     _In_ LPLOGCOLORSPACEW pLogColorSpace);
3172 
3173 HBITMAP
3174 WINAPI
3175 CreateCompatibleBitmap(
3176     _In_ HDC hdc,
3177     _In_ INT cx,
3178     _In_ INT cy);
3179 
3180 HDC
3181 WINAPI
3182 CreateCompatibleDC(
3183     _In_opt_ HDC hdc);
3184 
3185 HDC
3186 WINAPI
3187 CreateDCA(
3188     _In_opt_ LPCSTR pszDriver,
3189     _In_opt_ LPCSTR pszDevice,
3190     _In_opt_ LPCSTR pszOutput,
3191     _In_opt_ const DEVMODEA* pdmInit);
3192 
3193 HDC
3194 WINAPI
3195 CreateDCW(
3196     _In_opt_ LPCWSTR pszDriver,
3197     _In_opt_ LPCWSTR pszDevice,
3198     _In_opt_ LPCWSTR psz,
3199     _In_opt_ const DEVMODEW* pdmInit);
3200 
3201 HBITMAP
3202 WINAPI
3203 CreateDIBitmap(
3204     _In_ HDC hdc,
3205     _In_opt_ const BITMAPINFOHEADER* pbmih,
3206     _In_ DWORD fdwInit,
3207     _In_opt_ const VOID* pvInit,
3208     _In_opt_ const BITMAPINFO* pbmi,
3209     _In_ UINT uUsage);
3210 
3211 HBRUSH
3212 WINAPI
3213 CreateDIBPatternBrush(
3214     _In_ HGLOBAL hglbDIBPacked,
3215     _In_ UINT uUsage);
3216 
3217 HBRUSH
3218 WINAPI
3219 CreateDIBPatternBrushPt(
3220     _In_ const VOID* pvPackedDIB,
3221     _In_ UINT uUsage);
3222 
3223 #define GDI_WIDTHBYTES(bits)  ((DWORD)(((bits) + 31) & (~31)) / 8)
3224 #define GDI_DIBWIDTHBYTES(bi) (DWORD)GDI_WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
3225 #define GDI__DIBSIZE(bi)      (GDI_DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
3226 #define GDI_DIBSIZE(bi)       ((bi).biHeight < 0 ? (-1) * (GDI__DIBSIZE(bi)) : GDI__DIBSIZE(bi))
3227 
3228 _Success_(return != NULL)
3229 HBITMAP
3230 WINAPI
3231 CreateDIBSection(
3232   _In_opt_ HDC hdc,
3233   _In_ const BITMAPINFO *pbmi,
3234   _In_ UINT usage,
3235   _When_((pbmi->bmiHeader.biBitCount != 0), _Outptr_result_bytebuffer_(GDI_DIBSIZE((pbmi->bmiHeader))))
3236   _When_((pbmi->bmiHeader.biBitCount == 0), _Outptr_result_bytebuffer_((pbmi->bmiHeader).biSizeImage))
3237     VOID **ppvBits,
3238   _In_opt_ HANDLE hSection,
3239   _In_ DWORD offset);
3240 
3241 HBITMAP WINAPI CreateDiscardableBitmap(_In_ HDC, _In_ int, _In_ int);
3242 HRGN WINAPI CreateEllipticRgn(_In_ int, _In_ int, _In_ int, _In_ int);
3243 HRGN WINAPI CreateEllipticRgnIndirect(_In_ LPCRECT);
3244 HDC WINAPI CreateEnhMetaFileA(_In_opt_ HDC, _In_opt_ LPCSTR, _In_opt_ LPCRECT, _In_opt_ LPCSTR);
3245 HDC WINAPI CreateEnhMetaFileW(_In_opt_ HDC, _In_opt_ LPCWSTR, _In_opt_ LPCRECT, _In_opt_ LPCWSTR);
3246 HFONT WINAPI CreateFontA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR);
3247 HFONT WINAPI CreateFontW(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCWSTR);
3248 HFONT WINAPI CreateFontIndirectA(_In_ const LOGFONTA*);
3249 HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW*);
3250 HFONT WINAPI CreateFontIndirectExA(const ENUMLOGFONTEXDVA *);
3251 HFONT WINAPI CreateFontIndirectExW(const ENUMLOGFONTEXDVW *);
3252 HPALETTE WINAPI CreateHalftonePalette(_In_opt_ HDC);
3253 HBRUSH WINAPI CreateHatchBrush(_In_ int, _In_ COLORREF);
3254 HDC WINAPI CreateICA(_In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ const DEVMODEA*);
3255 HDC WINAPI CreateICW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ const DEVMODEW*);
3256 HDC WINAPI CreateMetaFileA(_In_opt_ LPCSTR);
3257 HDC WINAPI CreateMetaFileW(_In_opt_ LPCWSTR);
3258 
3259 HPALETTE
3260 WINAPI
3261 CreatePalette(
3262   _In_reads_(_Inexpressible_(2*sizeof(WORD) + plpal->palNumEntries * sizeof(PALETTEENTRY))) const LOGPALETTE*);
3263 
3264 HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP);
3265 HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF);
3266 HPEN WINAPI CreatePenIndirect(_In_ const LOGPEN*);
3267 
3268 HRGN
3269 WINAPI
3270 CreatePolygonRgn(
3271   _In_reads_(cPoint) const POINT *pptl,
3272   _In_ int cPoint,
3273   _In_ int iMode);
3274 
3275 HRGN
3276 WINAPI
3277 CreatePolyPolygonRgn(
3278   _In_ const POINT *pptl,
3279   _In_reads_(cPoly) const INT *pc,
3280   _In_ int cPoly,
3281   _In_ int iMode);
3282 
3283 HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int);
3284 HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT);
3285 HRGN WINAPI CreateRoundRectRgn(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int);
3286 BOOL WINAPI CreateScalableFontResourceA(_In_ DWORD, _In_ LPCSTR, _In_ LPCSTR, _In_opt_ LPCSTR);
3287 BOOL WINAPI CreateScalableFontResourceW(_In_ DWORD, _In_ LPCWSTR, _In_ LPCWSTR, _In_opt_ LPCWSTR);
3288 HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF);
3289 BOOL WINAPI DeleteColorSpace(_In_ HCOLORSPACE);
3290 BOOL WINAPI DeleteDC(_In_ HDC);
3291 BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE);
3292 BOOL WINAPI DeleteMetaFile(_In_ HMETAFILE);
3293 BOOL WINAPI DeleteObject(_In_ HGDIOBJ);
3294 
3295 int
3296 WINAPI
3297 DescribePixelFormat(
3298   _In_ HDC hdc,
3299   _In_ int iPixelFormat,
3300   _In_ UINT nBytes,
3301   _Out_writes_bytes_opt_(nBytes) LPPIXELFORMATDESCRIPTOR ppfd);
3302 
3303 DWORD
3304 WINAPI
3305 DeviceCapabilitiesA(
3306   _In_ LPCSTR pDevice,
3307   _In_opt_ LPCSTR pPort,
3308   _In_ WORD fwCapability,
3309   _Out_writes_opt_(_Inexpressible_(1)) LPSTR pOutput,
3310   _In_opt_ const DEVMODEA *pDevMode);
3311 
3312 DWORD
3313 WINAPI
3314 DeviceCapabilitiesW(
3315   _In_ LPCWSTR pDevice,
3316   _In_opt_ LPCWSTR pPort,
3317   _In_ WORD fwCapability,
3318   _Out_writes_opt_(_Inexpressible_(1)) LPWSTR pOutput,
3319   _In_opt_ const DEVMODEW *pDevMode);
3320 
3321 BOOL
3322 WINAPI
3323 DPtoLP(
3324   _In_ HDC hdc,
3325   _Inout_updates_(c) LPPOINT lppt,
3326   _In_ int c);
3327 
3328 int
3329 WINAPI
3330 DrawEscape(
3331   _In_ HDC hdc,
3332   _In_ int iEscape,
3333   _In_ int cjIn,
3334   _In_reads_bytes_opt_(cjIn) LPCSTR lpIn);
3335 
3336 BOOL WINAPI Ellipse(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int);
3337 int WINAPI EndDoc(_In_ HDC);
3338 int WINAPI EndPage(_In_ HDC);
3339 BOOL WINAPI EndPath(_In_ HDC);
3340 BOOL WINAPI EnumEnhMetaFile(_In_opt_ HDC, _In_ HENHMETAFILE, _In_ ENHMFENUMPROC, _In_opt_ PVOID, _In_opt_ LPCRECT);
3341 int WINAPI EnumFontFamiliesA(_In_ HDC, _In_opt_ LPCSTR, _In_ FONTENUMPROCA, _In_ LPARAM);
3342 int WINAPI EnumFontFamiliesW(_In_ HDC, _In_opt_ LPCWSTR, _In_ FONTENUMPROCW, _In_ LPARAM);
3343 int WINAPI EnumFontFamiliesExA(_In_ HDC, _In_ PLOGFONTA, _In_ FONTENUMPROCA, _In_ LPARAM, _In_ DWORD);
3344 int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD);
3345 int WINAPI EnumFontsA(_In_ HDC, _In_opt_ LPCSTR, _In_ FONTENUMPROCA, _In_ LPARAM);
3346 int WINAPI EnumFontsW(_In_ HDC, _In_opt_ LPCWSTR, _In_ FONTENUMPROCW, _In_ LPARAM);
3347 int WINAPI EnumICMProfilesA(_In_ HDC, _In_ ICMENUMPROCA, _In_opt_ LPARAM);
3348 int WINAPI EnumICMProfilesW(_In_ HDC, _In_ ICMENUMPROCW, _In_opt_ LPARAM);
3349 BOOL WINAPI EnumMetaFile(_In_ HDC, _In_ HMETAFILE, _In_ MFENUMPROC, _In_opt_ LPARAM);
3350 int WINAPI EnumObjects(_In_ HDC, _In_ int, _In_ GOBJENUMPROC, _In_ LPARAM);
3351 BOOL WINAPI EqualRgn(_In_ HRGN, _In_ HRGN);
3352 
3353 int
3354 WINAPI
3355 Escape(
3356   _In_ HDC hdc,
3357   _In_ int iEscape,
3358   _In_ int cjIn,
3359   _In_reads_bytes_opt_(cjIn) LPCSTR pvIn,
3360   _Out_opt_ LPVOID pvOut);
3361 
3362 int WINAPI ExcludeClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int);
3363 int WINAPI ExcludeUpdateRgn(HDC,HWND);
3364 
3365 HPEN
3366 WINAPI
3367 ExtCreatePen(
3368   _In_ DWORD iPenStyle,
3369   _In_ DWORD cWidth,
3370   _In_ const LOGBRUSH *plbrush,
3371   _In_ DWORD cStyle,
3372   _In_reads_opt_(cStyle) const DWORD *pstyle);
3373 
3374 HRGN
3375 WINAPI
3376 ExtCreateRegion(
3377   _In_opt_ const XFORM *lpx,
3378   _In_ DWORD nCount,
3379   _In_reads_bytes_(nCount) const RGNDATA *lpData);
3380 
3381 int
3382 WINAPI
3383 ExtEscape(
3384   _In_ HDC hdc,
3385   _In_ int iEscape,
3386   _In_ int cjInput,
3387   _In_reads_bytes_opt_(cjInput) LPCSTR lpInData,
3388   _In_ int cjOutput,
3389   _Out_writes_bytes_opt_(cjOutput) LPSTR lpOutData);
3390 
3391 BOOL WINAPI ExtFloodFill(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF, _In_ UINT);
3392 int WINAPI ExtSelectClipRgn(_In_ HDC, _In_opt_ HRGN, _In_ int);
3393 
3394 BOOL
3395 WINAPI
3396 ExtTextOutA(
3397   _In_ HDC hdc,
3398   _In_ int x,
3399   _In_ int y,
3400   _In_ UINT options,
3401   _In_opt_ const RECT *lprect,
3402   _In_reads_opt_(c) LPCSTR lpString,
3403   _In_ UINT c,
3404   _In_reads_opt_(c) const INT *lpDx);
3405 
3406 BOOL
3407 WINAPI
3408 ExtTextOutW(
3409   _In_ HDC hdc,
3410   _In_ int x,
3411   _In_ int y,
3412   _In_ UINT options,
3413   _In_opt_ const RECT *lprect,
3414   _In_reads_opt_(c) LPCWSTR lpString,
3415   _In_ UINT c,
3416   _In_reads_opt_(c) const INT *lpDx);
3417 
3418 BOOL WINAPI FillPath(_In_ HDC);
3419 int WINAPI FillRect(HDC,LPCRECT,HBRUSH);
3420 int WINAPI FillRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH);
3421 BOOL WINAPI FixBrushOrgEx(_In_ HDC, _In_ int, _In_ int, _In_opt_ LPPOINT);
3422 BOOL WINAPI FlattenPath(_In_ HDC);
3423 BOOL WINAPI FloodFill(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF);
3424 BOOL WINAPI FrameRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH, _In_ int, _In_ int);
3425 BOOL WINAPI GdiAlphaBlend(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BLENDFUNCTION);
3426 
3427 BOOL
3428 WINAPI
3429 GdiComment(
3430   _In_ HDC hdc,
3431   _In_ UINT nSize,
3432   _In_reads_bytes_(nSize) const BYTE *lpData);
3433 
3434 DEVMODEW * WINAPI GdiConvertToDevmodeW(const DEVMODEA *);
3435 BOOL WINAPI GdiFlush(void);
3436 LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
3437 DWORD WINAPI GdiGetCodePage(HDC);
3438 DWORD WINAPI GdiGetBatchLimit(void);
3439 DWORD WINAPI GdiSetBatchLimit(_In_ DWORD);
3440 
3441 BOOL
3442 WINAPI
3443 GdiGradientFill(
3444   _In_ HDC hdc,
3445   _In_reads_(nVertex) PTRIVERTEX pVertex,
3446   _In_ ULONG nVertex,
3447   _In_ PVOID pMesh,
3448   _In_ ULONG nCount,
3449   _In_ ULONG ulMode);
3450 
3451 BOOL WINAPI GdiTransparentBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT);
3452 BOOL WINAPI GdiIsMetaFileDC(HDC);
3453 
3454 #define GetKValue(cmyk) ((BYTE)(cmyk))
3455 #define GetYValue(cmyk) ((BYTE)((cmyk)>> 8))
3456 #define GetMValue(cmyk) ((BYTE)((cmyk)>>16))
3457 #define GetCValue(cmyk) ((BYTE)((cmyk)>>24))
3458 #define CMYK(c,m,y,k) ((COLORREF)((((BYTE)(k)|((WORD)((BYTE)(y))<<8))|(((DWORD)(BYTE)(m))<<16))|(((DWORD)(BYTE)(c))<<24)))
3459 
3460 int WINAPI GetArcDirection(_In_ HDC);
3461 BOOL WINAPI GetAspectRatioFilterEx(_In_ HDC, _Out_ LPSIZE);
3462 
3463 LONG
3464 WINAPI
3465 GetBitmapBits(
3466   _In_ HBITMAP hbit,
3467   _In_ LONG cb,
3468   _Out_writes_bytes_(cb) LPVOID lpvBits);
3469 
3470 BOOL WINAPI GetBitmapDimensionEx(_In_ HBITMAP, _Out_ LPSIZE);
3471 COLORREF WINAPI GetBkColor(_In_ HDC);
3472 int WINAPI GetBkMode(_In_ HDC);
3473 UINT WINAPI GetBoundsRect(_In_ HDC, _Out_ LPRECT, _In_ UINT);
3474 BOOL WINAPI GetBrushOrgEx(_In_ HDC, _Out_ LPPOINT);
3475 
3476 BOOL
3477 WINAPI
3478 GetCharABCWidthsA(
3479   _In_ HDC hdc,
3480   _In_ UINT wFirst,
3481   _In_ UINT wLast,
3482   _Out_writes_(wLast - wFirst + 1) LPABC lpABC);
3483 
3484 BOOL
3485 WINAPI
3486 GetCharABCWidthsW(
3487   _In_ HDC hdc,
3488   _In_ UINT wFirst,
3489   _In_ UINT wLast,
3490   _Out_writes_(wLast - wFirst + 1) LPABC lpABC);
3491 
3492 BOOL
3493 WINAPI
3494 GetCharABCWidthsFloatA(
3495   _In_ HDC hdc,
3496   _In_ UINT iFirst,
3497   _In_ UINT iLast,
3498   _Out_writes_(iLast + 1 - iFirst) LPABCFLOAT lpABC);
3499 
3500 BOOL
3501 WINAPI
3502 GetCharABCWidthsFloatW(
3503   _In_ HDC hdc,
3504   _In_ UINT iFirst,
3505   _In_ UINT iLast,
3506   _Out_writes_(iLast + 1 - iFirst) LPABCFLOAT lpABC);
3507 
3508 BOOL
3509 WINAPI
3510 GetCharABCWidthsI(
3511   _In_ HDC hdc,
3512   _In_ UINT giFirst,
3513   _In_ UINT cgi,
3514   _In_reads_opt_(cgi) LPWORD pgi,
3515   _Out_writes_(cgi) LPABC pabc);
3516 
3517 DWORD
3518 WINAPI
3519 GetCharacterPlacementA(
3520   _In_ HDC hdc,
3521   _In_reads_(nCount) LPCSTR lpString,
3522   _In_ int nCount,
3523   _In_ int nMexExtent,
3524   _Inout_ LPGCP_RESULTSA lpResults,
3525   _In_ DWORD dwFlags);
3526 
3527 DWORD
3528 WINAPI
3529 GetCharacterPlacementW(
3530   _In_ HDC hdc,
3531   _In_reads_(nCount) LPCWSTR lpString,
3532   _In_ int nCount,
3533   _In_ int nMexExtent,
3534   _Inout_ LPGCP_RESULTSW lpResults,
3535   _In_ DWORD dwFlags);
3536 
3537 BOOL
3538 WINAPI
3539 GetCharWidth32A(
3540   _In_ HDC hdc,
3541   _In_ UINT iFirst,
3542   _In_ UINT iLast,
3543   _Out_writes_(iLast + 1 - iFirst) LPINT lpBuffer);
3544 
3545 BOOL
3546 WINAPI
3547 GetCharWidth32W(
3548   _In_ HDC hdc,
3549   _In_ UINT iFirst,
3550   _In_ UINT iLast,
3551   _Out_writes_(iLast + 1 - iFirst) LPINT lpBuffer);
3552 
3553 BOOL
3554 WINAPI
3555 GetCharWidthA(
3556   _In_ HDC hdc,
3557   _In_ UINT iFirst,
3558   _In_ UINT iLast,
3559   _Out_writes_(iLast + 1 - iFirst) LPINT lpBuffer);
3560 
3561 BOOL
3562 WINAPI
3563 GetCharWidthW(
3564   _In_ HDC hdc,
3565   _In_ UINT iFirst,
3566   _In_ UINT iLast,
3567   _Out_writes_(iLast + 1 - iFirst) LPINT lpBuffer);
3568 
3569 BOOL
3570 WINAPI
3571 GetCharWidthI(
3572   _In_ HDC hdc,
3573   _In_ UINT giFirst,
3574   _In_ UINT cgi,
3575   _In_reads_opt_(cgi) LPWORD pgi,
3576   _Out_writes_(cgi) LPINT piWidths);
3577 
3578 BOOL
3579 WINAPI
3580 GetCharWidthFloatA(
3581   _In_ HDC hdc,
3582   _In_ UINT iFirst,
3583   _In_ UINT iLast,
3584   _Out_writes_(iLast + 1 - iFirst) PFLOAT lpBuffer);
3585 
3586 BOOL
3587 WINAPI
3588 GetCharWidthFloatW(
3589   _In_ HDC hdc,
3590   _In_ UINT iFirst,
3591   _In_ UINT iLast,
3592   _Out_writes_(iLast + 1 - iFirst) PFLOAT lpBuffer);
3593 
3594 int WINAPI GetClipBox(_In_ HDC, _Out_ LPRECT);
3595 int WINAPI GetClipRgn(_In_ HDC, _In_ HRGN);
3596 BOOL WINAPI GetColorAdjustment(_In_ HDC, _Out_ LPCOLORADJUSTMENT);
3597 HCOLORSPACE WINAPI GetColorSpace(_In_ HDC);
3598 HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT);
3599 BOOL WINAPI GetCurrentPositionEx(_In_ HDC, _Out_ LPPOINT);
3600 HCURSOR WINAPI GetCursor(void);
3601 BOOL WINAPI GetDCOrgEx(_In_ HDC, _Out_ LPPOINT);
3602 #if (_WIN32_WINNT >= 0x0500)
3603 COLORREF WINAPI GetDCBrushColor(_In_ HDC);
3604 COLORREF WINAPI GetDCPenColor(_In_ HDC);
3605 #endif
3606 int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int);
3607 
3608 BOOL
3609 WINAPI
3610 GetDeviceGammaRamp(
3611   _In_ HDC hdc,
3612   _Out_writes_bytes_(3*256*2) LPVOID lpRamp);
3613 
3614 _Ret_range_(0,cEntries)
3615 UINT
3616 WINAPI
3617 GetDIBColorTable(
3618   _In_ HDC hdc,
3619   _In_ UINT iStart,
3620   _In_ UINT cEntries,
3621   _Out_writes_to_(cEntries,return) RGBQUAD *prgbq);
3622 
3623 int
3624 WINAPI
3625 GetDIBits(
3626   _In_ HDC hdc,
3627   _In_ HBITMAP hbm,
3628   _In_ UINT start,
3629   _In_ UINT cLines,
3630   _Out_opt_ LPVOID lpvBits,
3631   _At_((LPBITMAPINFOHEADER)lpbmi, _Inout_) LPBITMAPINFO lpbmi,
3632   _In_ UINT usage);
3633 
3634 HENHMETAFILE WINAPI GetEnhMetaFileA(_In_ LPCSTR);
3635 HENHMETAFILE WINAPI GetEnhMetaFileW(_In_ LPCWSTR);
3636 
3637 UINT
3638 WINAPI
3639 GetEnhMetaFileBits(
3640   _In_ HENHMETAFILE hEMF,
3641   _In_ UINT nSize,
3642   _Out_writes_bytes_opt_(nSize) LPBYTE lpData);
3643 
3644 UINT
3645 WINAPI
3646 GetEnhMetaFileDescriptionA(
3647   _In_ HENHMETAFILE hemf,
3648   _In_ UINT cchBuffer,
3649   _Out_writes_opt_(cchBuffer) LPSTR lpDescription);
3650 
3651 UINT
3652 WINAPI
3653 GetEnhMetaFileDescriptionW(
3654   _In_ HENHMETAFILE hemf,
3655   _In_ UINT cchBuffer,
3656   _Out_writes_opt_(cchBuffer) LPWSTR lpDescription);
3657 
3658 UINT
3659 WINAPI
3660 GetEnhMetaFileHeader(
3661   _In_ HENHMETAFILE hemf,
3662   _In_ UINT nSize,
3663   _Out_writes_bytes_opt_(nSize) LPENHMETAHEADER lpEnhMetaHeader);
3664 
3665 UINT
3666 WINAPI
3667 GetEnhMetaFilePaletteEntries(
3668   _In_ HENHMETAFILE hemf,
3669   _In_ UINT nNumEntries,
3670   _Out_writes_opt_(nNumEntries) LPPALETTEENTRY lpPaletteEntries);
3671 
3672 UINT
3673 WINAPI
3674 GetEnhMetaFilePixelFormat(
3675   _In_ HENHMETAFILE hemf,
3676   _In_ UINT cbBuffer,
3677   _Out_writes_bytes_opt_(cbBuffer) PIXELFORMATDESCRIPTOR *ppfd);
3678 
3679 _Success_(return != GDI_ERROR)
3680 DWORD
3681 WINAPI
3682 GetFontData(
3683   _In_ HDC hdc,
3684   _In_ DWORD dwTable,
3685   _In_ DWORD dwOffset,
3686   _Out_writes_bytes_to_opt_(cjBuffer, return) PVOID pvBuffer,
3687   _In_ DWORD cjBuffer);
3688 
3689 DWORD WINAPI GetFontLanguageInfo(_In_ HDC);
3690 #if (_WIN32_WINNT >= 0x0500)
3691 DWORD WINAPI GetFontUnicodeRanges(_In_ HDC, _Out_opt_ LPGLYPHSET);
3692 #endif
3693 
3694 DWORD
3695 WINAPI
3696 GetGlyphIndicesA(
3697   _In_ HDC hdc,
3698   _In_reads_(c) LPCSTR lpstr,
3699   _In_ int c,
3700   _Out_writes_(c) LPWORD pgi,
3701   _In_ DWORD fl);
3702 
3703 DWORD
3704 WINAPI
3705 GetGlyphIndicesW(
3706   _In_ HDC hdc,
3707   _In_reads_(c) LPCWSTR lpstr,
3708   _In_ int c,
3709   _Out_writes_(c) LPWORD pgi,
3710   _In_ DWORD fl);
3711 
3712 DWORD
3713 WINAPI
3714 GetGlyphOutlineA(
3715   _In_ HDC hdc,
3716   _In_ UINT uChar,
3717   _In_ UINT fuFormat,
3718   _Out_ LPGLYPHMETRICS lpgm,
3719   _In_ DWORD cjBuffer,
3720   _Out_writes_bytes_opt_(cjBuffer) LPVOID pvBuffer,
3721   _In_ CONST MAT2 *lpmat2);
3722 
3723 DWORD
3724 WINAPI
3725 GetGlyphOutlineW(
3726   _In_ HDC hdc,
3727   _In_ UINT uChar,
3728   _In_ UINT fuFormat,
3729   _Out_ LPGLYPHMETRICS lpgm,
3730   _In_ DWORD cjBuffer,
3731   _Out_writes_bytes_opt_(cjBuffer) LPVOID pvBuffer,
3732   _In_ CONST MAT2 *lpmat2);
3733 
3734 int WINAPI GetGraphicsMode(_In_ HDC);
3735 
3736 BOOL
3737 WINAPI
3738 GetICMProfileA(
3739   _In_ HDC hdc,
3740   _Inout_ LPDWORD pBufSize,
3741   _Out_writes_opt_(*pBufSize) LPSTR pszFilename);
3742 
3743 BOOL
3744 WINAPI
3745 GetICMProfileW(
3746   _In_ HDC hdc,
3747   _Inout_ LPDWORD pBufSize,
3748   _Out_writes_opt_(*pBufSize) LPWSTR pszFilename);
3749 
3750 DWORD
3751 WINAPI
3752 GetKerningPairsA(
3753   _In_ HDC hdc,
3754   _In_ DWORD nPairs,
3755   _Out_writes_to_opt_(nPairs, return) LPKERNINGPAIR lpKernPair);
3756 
3757 DWORD
3758 WINAPI
3759 GetKerningPairsW(
3760   _In_ HDC hdc,
3761   _In_ DWORD nPairs,
3762   _Out_writes_to_opt_(nPairs, return) LPKERNINGPAIR lpKernPair);
3763 
3764 BOOL
3765 WINAPI
3766 GetLogColorSpaceA(
3767   _In_ HCOLORSPACE hColorSpace,
3768   _Out_writes_bytes_(nSize) LPLOGCOLORSPACEA lpBuffer,
3769   _In_ DWORD nSize);
3770 
3771 BOOL
3772 WINAPI
3773 GetLogColorSpaceW(
3774   _In_ HCOLORSPACE hColorSpace,
3775   _Out_writes_bytes_(nSize) LPLOGCOLORSPACEW lpBuffer,
3776   _In_ DWORD nSize);
3777 
3778 int WINAPI GetMapMode(_In_ HDC);
3779 HMETAFILE WINAPI GetMetaFileA(_In_ LPCSTR);
3780 HMETAFILE WINAPI GetMetaFileW(_In_ LPCWSTR);
3781 
3782 UINT
3783 WINAPI
3784 GetMetaFileBitsEx(
3785   _In_ HMETAFILE hMF,
3786   _In_ UINT cbBuffer,
3787   _Out_writes_bytes_opt_(cbBuffer) LPVOID lpData);
3788 
3789 int WINAPI GetMetaRgn(_In_ HDC, _In_ HRGN);
3790 BOOL WINAPI GetMiterLimit(_In_ HDC, _Out_ PFLOAT);
3791 COLORREF WINAPI GetNearestColor(_In_ HDC, _In_ COLORREF);
3792 UINT WINAPI GetNearestPaletteIndex(_In_ HPALETTE, _In_ COLORREF);
3793 
3794 int
3795 WINAPI
3796 GetObjectA(
3797   _In_ HANDLE h,
3798   _In_ int c,
3799   _Out_writes_bytes_opt_(c) LPVOID pv);
3800 
3801 int
3802 WINAPI
3803 GetObjectW(
3804   _In_ HANDLE h,
3805   _In_ int c,
3806   _Out_writes_bytes_opt_(c) LPVOID pv);
3807 
3808 DWORD WINAPI GetObjectType(_In_ HGDIOBJ);
3809 
3810 UINT
3811 WINAPI
3812 GetOutlineTextMetricsA(
3813   _In_ HDC hdc,
3814   _In_ UINT cjCopy,
3815   _Out_writes_bytes_opt_(cjCopy) LPOUTLINETEXTMETRICA potm);
3816 
3817 UINT
3818 WINAPI
3819 GetOutlineTextMetricsW(
3820   _In_ HDC hdc,
3821   _In_ UINT cjCopy,
3822   _Out_writes_bytes_opt_(cjCopy) LPOUTLINETEXTMETRICW potm);
3823 
3824 _Ret_range_(0,cEntries)
3825 UINT
3826 WINAPI
3827 GetPaletteEntries(
3828   _In_ HPALETTE hpal,
3829   _In_ UINT iStart,
3830   _In_ UINT cEntries,
3831   _Out_writes_to_opt_(cEntries,return) LPPALETTEENTRY pPalEntries);
3832 
3833 int
3834 WINAPI
3835 GetPath(
3836   _In_ HDC hdc,
3837   _Out_writes_opt_(cpt) LPPOINT apt,
3838   _Out_writes_opt_(cpt) LPBYTE aj,
3839   int cpt);
3840 
3841 COLORREF WINAPI GetPixel(_In_ HDC, _In_ int, _In_ int);
3842 int WINAPI GetPixelFormat(_In_ HDC);
3843 int WINAPI GetPolyFillMode(_In_ HDC);
3844 
3845 BOOL
3846 WINAPI
3847 GetRasterizerCaps(
3848   _Out_writes_bytes_(cjBytes) LPRASTERIZER_STATUS lpraststat,
3849   _In_ UINT cjBytes);
3850 
3851 int WINAPI GetRandomRgn(_In_ HDC, _In_ HRGN, _In_ INT);
3852 
3853 DWORD
3854 WINAPI
3855 GetRegionData(
3856   _In_ HRGN hrgn,
3857   _In_ DWORD nCount,
3858   _Out_writes_bytes_to_opt_(nCount, return) LPRGNDATA lpRgnData);
3859 
3860 int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT);
3861 int WINAPI GetROP2(_In_ HDC);
3862 HGDIOBJ WINAPI GetStockObject(_In_ int);
3863 int WINAPI GetStretchBltMode(_In_ HDC);
3864 
3865 UINT
3866 WINAPI
3867 GetSystemPaletteEntries(
3868   _In_ HDC  hdc,
3869   _In_ UINT iStart,
3870   _In_ UINT cEntries,
3871   _Out_writes_opt_(cEntries) LPPALETTEENTRY pPalEntries);
3872 
3873 UINT WINAPI GetSystemPaletteUse(_In_ HDC);
3874 UINT WINAPI GetTextAlign(_In_ HDC);
3875 int WINAPI GetTextCharacterExtra(_In_ HDC);
3876 int WINAPI GetTextCharset(_In_ HDC);
3877 int WINAPI GetTextCharsetInfo(_In_ HDC, _Out_opt_ LPFONTSIGNATURE, _In_ DWORD);
3878 COLORREF WINAPI GetTextColor(_In_ HDC);
3879 
3880 BOOL
3881 WINAPI
3882 GetTextExtentExPointA(
3883   _In_ HDC hdc,
3884   _In_reads_(cchString) LPCSTR lpszString,
3885   _In_ int cchString,
3886   _In_ int nMaxExtent,
3887   _Out_opt_ LPINT lpnFit,
3888   _Out_writes_to_opt_ (cchString, *lpnFit) LPINT lpnDx,
3889   _Out_ LPSIZE lpSize);
3890 
3891 BOOL
3892 WINAPI
3893 GetTextExtentExPointW(
3894   _In_ HDC hdc,
3895   _In_reads_(cchString) LPCWSTR lpszString,
3896   _In_ int cchString,
3897   _In_ int nMaxExtent,
3898   _Out_opt_ LPINT lpnFit,
3899   _Out_writes_to_opt_ (cchString, *lpnFit) LPINT lpnDx,
3900   _Out_ LPSIZE lpSize);
3901 
3902 BOOL
3903 WINAPI
3904 GetTextExtentExPointI(
3905   _In_ HDC hdc,
3906   _In_reads_(cwchString) LPWORD lpwszString,
3907   _In_ int cwchString,
3908   _In_ int nMaxExtent,
3909   _Out_opt_ LPINT lpnFit,
3910   _Out_writes_to_opt_(cwchString, *lpnFit) LPINT lpnDx,
3911   _Out_ LPSIZE lpSize);
3912 
3913 BOOL
3914 WINAPI
3915 GetTextExtentPointA(
3916   _In_ HDC hdc,
3917   _In_reads_(c) LPCSTR lpString,
3918   _In_ int c,
3919   _Out_ LPSIZE lpsz);
3920 
3921 BOOL
3922 WINAPI
3923 GetTextExtentPointW(
3924   _In_ HDC hdc,
3925   _In_reads_(c) LPCWSTR lpString,
3926   _In_ int c,
3927   _Out_ LPSIZE lpsz);
3928 
3929 BOOL
3930 WINAPI
3931 GetTextExtentPointI(
3932   _In_ HDC hdc,
3933   _In_reads_(cgi) LPWORD pgiIn,
3934   _In_ int cgi,
3935   _Out_ LPSIZE psize);
3936 
3937 BOOL
3938 WINAPI
3939 GetTextExtentPoint32A(
3940   _In_ HDC hdc,
3941   _In_reads_(c) LPCSTR lpString,
3942   _In_ int c,
3943   _Out_ LPSIZE psizl);
3944 
3945 BOOL
3946 WINAPI
3947 GetTextExtentPoint32W(
3948   _In_ HDC hdc,
3949   _In_reads_(c) LPCWSTR lpString,
3950   _In_ int c,
3951   _Out_ LPSIZE psizl);
3952 
3953 int
3954 WINAPI
3955 GetTextFaceA(
3956   _In_ HDC hdc,
3957   _In_ int c,
3958   _Out_writes_to_opt_(c, return) LPSTR lpName);
3959 
3960 int
3961 WINAPI
3962 GetTextFaceW(
3963   _In_ HDC hdc,
3964   _In_ int c,
3965   _Out_writes_to_opt_(c, return) LPWSTR lpName);
3966 
3967 BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA);
3968 BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW);
3969 BOOL WINAPI GetTransform(HDC,DWORD,XFORM*);
3970 BOOL WINAPI GetViewportExtEx(_In_ HDC, _Out_ LPSIZE);
3971 BOOL WINAPI GetViewportOrgEx(_In_ HDC, _Out_ LPPOINT);
3972 BOOL WINAPI GetWindowExtEx(_In_ HDC, _Out_ LPSIZE);
3973 BOOL WINAPI GetWindowOrgEx(_In_ HDC, _Out_ LPPOINT);
3974 
3975 UINT
3976 WINAPI
3977 GetWinMetaFileBits(
3978   _In_ HENHMETAFILE hemf,
3979   _In_ UINT cbData16,
3980   _Out_writes_bytes_opt_(cbData16) LPBYTE pData16,
3981   _In_ INT iMapMode,
3982   _In_ HDC hdcRef);
3983 
3984 BOOL WINAPI GetWorldTransform(_In_ HDC, _Out_ LPXFORM);
3985 int WINAPI IntersectClipRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int);
3986 BOOL WINAPI InvertRgn(_In_ HDC, _In_ HRGN);
3987 BOOL WINAPI LineDDA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ LINEDDAPROC, _In_opt_ LPARAM);
3988 BOOL WINAPI LineTo(_In_ HDC, _In_ int, _In_ int);
3989 
3990 BOOL
3991 WINAPI
3992 LPtoDP(
3993   _In_ HDC hdc,
3994   _Inout_updates_(c) LPPOINT lppt,
3995   _In_ int c);
3996 
3997 BOOL WINAPI MaskBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ HDC, _In_ int, _In_ int, _In_ HBITMAP, _In_ int, _In_ int, _In_ DWORD);
3998 BOOL WINAPI ModifyWorldTransform(_In_ HDC, _In_opt_ const XFORM*, _In_ DWORD);
3999 BOOL WINAPI MoveToEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT);
4000 int WINAPI OffsetClipRgn(_In_ HDC, _In_ int, _In_ int);
4001 int WINAPI OffsetRgn(_In_ HRGN, _In_ int, _In_ int);
4002 BOOL WINAPI OffsetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT);
4003 BOOL WINAPI OffsetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT);
4004 BOOL WINAPI PaintRgn(_In_ HDC, _In_ HRGN);
4005 BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD);
4006 HRGN WINAPI PathToRegion(_In_ HDC);
4007 BOOL WINAPI Pie(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int);
4008 BOOL WINAPI PlayEnhMetaFile(_In_ HDC, _In_ HENHMETAFILE, _In_ LPCRECT);
4009 
4010 BOOL
4011 WINAPI
4012 PlayEnhMetaFileRecord(
4013   _In_ HDC hdc,
4014   _In_reads_(cht) LPHANDLETABLE pht,
4015   _In_ CONST ENHMETARECORD *pmr,
4016   _In_ UINT cht);
4017 
4018 BOOL WINAPI PlayMetaFile(_In_ HDC, _In_ HMETAFILE);
4019 
4020 BOOL
4021 WINAPI
4022 PlayMetaFileRecord(
4023   _In_ HDC hdc,
4024   _In_reads_(noObjs) LPHANDLETABLE lpHandleTable,
4025   _In_ LPMETARECORD lpMR,
4026   _In_ UINT noObjs);
4027 
4028 BOOL
4029 WINAPI
4030 PlgBlt(
4031   _In_ HDC hdcDest,
4032   _In_reads_(3) const POINT *lpPoint,
4033   _In_ HDC hdcSrc,
4034   _In_ int xSrc,
4035   _In_ int ySrc,
4036   _In_ int width,
4037   _In_ int height,
4038   _In_opt_ HBITMAP hbmMask,
4039   _In_ int xMask,
4040   _In_ int yMask);
4041 
4042 BOOL
4043 WINAPI
4044 PolyBezier(
4045   _In_ HDC hdc,
4046   _In_reads_(cpt) const POINT *apt,
4047   _In_ DWORD cpt);
4048 
4049 BOOL
4050 WINAPI
4051 PolyBezierTo(
4052   _In_ HDC hdc,
4053   _In_reads_(cpt) const POINT *apt,
4054   _In_ DWORD cpt);
4055 
4056 BOOL
4057 WINAPI
4058 PolyDraw(
4059   _In_ HDC hdc,
4060   _In_reads_(cpt) const POINT * apt,
4061   _In_reads_(cpt) const BYTE * aj,
4062   _In_ int cpt);
4063 
4064 BOOL
4065 WINAPI
4066 Polygon(
4067   _In_ HDC hdc,
4068   _In_reads_(cpt) const POINT *apt,
4069   _In_ int cpt);
4070 
4071 BOOL
4072 WINAPI
4073 Polyline(
4074   _In_ HDC hdc,
4075   _In_reads_(cpt) const POINT *apt,
4076   _In_ int cpt);
4077 
4078 BOOL
4079 WINAPI
4080 PolylineTo(
4081   _In_ HDC hdc,
4082   _In_reads_(cpt) const POINT *apt,
4083   _In_ DWORD cpt);
4084 
4085 BOOL
4086 WINAPI
4087 PolyPolygon(
4088   _In_ HDC hdc,
4089   _In_ const POINT *apt,
4090   _In_reads_(csz) const INT *asz,
4091   _In_ int csz);
4092 
4093 BOOL
4094 WINAPI
4095 PolyPolyline(
4096   _In_ HDC hdc,
4097   _In_ const POINT *apt,
4098   _In_reads_(csz) const DWORD *asz,
4099   _In_ DWORD csz);
4100 
4101 BOOL
4102 WINAPI
4103 PolyTextOutA(
4104   _In_ HDC hdc,
4105   _In_reads_(nstrings) const POLYTEXTA *ppt,
4106   _In_ int nstrings);
4107 
4108 BOOL
4109 WINAPI
4110 PolyTextOutW(
4111   _In_ HDC hdc,
4112   _In_reads_(nstrings) const POLYTEXTW *ppt,
4113   _In_ int nstrings);
4114 
4115 BOOL WINAPI PtInRegion(_In_ HRGN, _In_ int, _In_ int);
4116 BOOL WINAPI PtVisible(_In_ HDC, _In_ int, _In_ int);
4117 UINT WINAPI RealizePalette(_In_ HDC);
4118 BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int);
4119 BOOL WINAPI RectInRegion(_In_ HRGN, _In_ LPCRECT);
4120 BOOL WINAPI RectVisible(_In_ HDC, _In_ LPCRECT);
4121 BOOL WINAPI RemoveFontResourceA(_In_ LPCSTR);
4122 BOOL WINAPI RemoveFontResourceW(_In_ LPCWSTR);
4123 #if (_WIN32_WINNT >= 0x0500)
4124 BOOL WINAPI RemoveFontMemResourceEx(_In_ HANDLE);
4125 BOOL WINAPI RemoveFontResourceExA(_In_ LPCSTR, _In_ DWORD, _Reserved_ PVOID);
4126 BOOL WINAPI RemoveFontResourceExW(_In_ LPCWSTR, _In_ DWORD, _Reserved_ PVOID);
4127 #endif
4128 HDC WINAPI ResetDCA(_In_ HDC, _In_ const DEVMODEA*);
4129 HDC WINAPI ResetDCW(_In_ HDC, _In_ const DEVMODEW*);
4130 BOOL WINAPI ResizePalette(_In_ HPALETTE, _In_ UINT);
4131 BOOL WINAPI RestoreDC(_In_ HDC, _In_ int);
4132 BOOL WINAPI RoundRect(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int);
4133 int WINAPI SaveDC(_In_ HDC);
4134 BOOL WINAPI ScaleViewportExtEx(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _Out_opt_ LPSIZE);
4135 BOOL WINAPI ScaleWindowExtEx(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _Out_opt_ LPSIZE);
4136 BOOL WINAPI SelectClipPath(_In_ HDC, _In_ int);
4137 int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN);
4138 HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ);
4139 HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL);
4140 int WINAPI SetAbortProc(_In_ HDC, _In_ ABORTPROC);
4141 int WINAPI SetArcDirection(_In_ HDC, _In_ int);
4142 
4143 LONG
4144 WINAPI
4145 SetBitmapBits(
4146   _In_ HBITMAP hbm,
4147   _In_ DWORD cb,
4148   _In_reads_bytes_(cb) CONST VOID *pvBits);
4149 
4150 BOOL WINAPI SetBitmapDimensionEx(_In_ HBITMAP, _In_ int, _In_ int, _Out_opt_ LPSIZE);
4151 COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF);
4152 int WINAPI SetBkMode(_In_ HDC, _In_ int);
4153 UINT WINAPI SetBoundsRect(_In_ HDC, _In_opt_ LPCRECT, _In_ UINT);
4154 BOOL WINAPI SetBrushOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT);
4155 BOOL WINAPI SetColorAdjustment(_In_ HDC, _In_ const COLORADJUSTMENT*);
4156 HCOLORSPACE WINAPI SetColorSpace(_In_ HDC, _In_ HCOLORSPACE);
4157 #if (_WIN32_WINNT >= 0x0500)
4158 COLORREF WINAPI SetDCBrushColor(_In_ HDC, _In_ COLORREF);
4159 COLORREF WINAPI SetDCPenColor(_In_ HDC, _In_ COLORREF);
4160 #endif
4161 
4162 BOOL
4163 WINAPI
4164 SetDeviceGammaRamp(
4165   _In_ HDC hdc,
4166   _In_reads_bytes_(3*256*2) LPVOID lpRamp);
4167 
4168 UINT
4169 WINAPI
4170 SetDIBColorTable(
4171   _In_ HDC  hdc,
4172   _In_ UINT iStart,
4173   _In_ UINT cEntries,
4174   _In_reads_(cEntries) const RGBQUAD *prgbq);
4175 
4176 int WINAPI SetDIBits(_In_opt_ HDC, _In_ HBITMAP, _In_ UINT, _In_ UINT, _In_ CONST VOID*, _In_ CONST BITMAPINFO*, _In_ UINT);
4177 int WINAPI SetDIBitsToDevice(_In_ HDC, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ int, _In_ int, _In_ UINT, _In_ UINT, _In_ CONST VOID*, _In_ CONST BITMAPINFO*, _In_ UINT);
4178 
4179 HENHMETAFILE
4180 WINAPI
4181 SetEnhMetaFileBits(
4182   _In_ UINT nSize,
4183   _In_reads_bytes_(nSize) const BYTE * pb);
4184 
4185 int WINAPI SetGraphicsMode(_In_ HDC, _In_ int);
4186 int WINAPI SetICMMode(_In_ HDC, _In_ int);
4187 BOOL WINAPI SetICMProfileA(_In_ HDC, _In_ LPSTR);
4188 BOOL WINAPI SetICMProfileW(_In_ HDC, _In_ LPWSTR);
4189 int WINAPI SetMapMode(_In_ HDC, _In_ int);
4190 DWORD WINAPI SetMapperFlags(_In_ HDC, _In_ DWORD);
4191 #if (_WIN32_WINNT >= 0x0500)
4192 DWORD WINAPI SetLayout(_In_ HDC, _In_ DWORD);
4193 DWORD WINAPI GetLayout(_In_ HDC);
4194 #endif
4195 
4196 HMETAFILE
4197 WINAPI
4198 SetMetaFileBitsEx(
4199   _In_ UINT cbBuffer,
4200   _In_reads_bytes_(cbBuffer) CONST BYTE *lpData);
4201 
4202 int WINAPI SetMetaRgn(_In_ HDC);
4203 BOOL WINAPI SetMiterLimit(_In_ HDC, _In_ FLOAT, _Out_opt_ PFLOAT);
4204 
4205 UINT
4206 WINAPI
4207 SetPaletteEntries(
4208   _In_ HPALETTE hpal,
4209   _In_ UINT iStart,
4210   _In_ UINT cEntries,
4211   _In_reads_(cEntries) CONST PALETTEENTRY *pPalEntries);
4212 
4213 COLORREF WINAPI SetPixel(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF);
4214 BOOL WINAPI SetPixelFormat(_In_ HDC, _In_ int, _In_ const PIXELFORMATDESCRIPTOR*);
4215 BOOL WINAPI SetPixelV(_In_ HDC, _In_ int, _In_ int, _In_ COLORREF);
4216 int WINAPI SetPolyFillMode(_In_ HDC, _In_ int);
4217 BOOL WINAPI SetRectRgn(_In_ HRGN, _In_ int, _In_ int, _In_ int, _In_ int);
4218 INT WINAPI SetRelAbs(HDC,INT);
4219 int WINAPI SetROP2(_In_ HDC, _In_ int);
4220 int WINAPI SetStretchBltMode(_In_ HDC, _In_ int);
4221 UINT WINAPI SetSystemPaletteUse(_In_ HDC, _In_ UINT);
4222 UINT WINAPI SetTextAlign(_In_ HDC, _In_ UINT);
4223 int WINAPI SetTextCharacterExtra(_In_ HDC, _In_ int);
4224 COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF);
4225 BOOL WINAPI SetTextJustification(_In_ HDC, _In_ int, _In_ int);
4226 BOOL WINAPI SetViewportExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE);
4227 BOOL WINAPI SetViewportOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT);
4228 BOOL WINAPI SetWindowExtEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPSIZE);
4229 BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT);
4230 
4231 HENHMETAFILE
4232 WINAPI
4233 SetWinMetaFileBits(
4234   _In_ UINT nSize,
4235   _In_reads_bytes_(nSize) const BYTE *lpMeta16Data,
4236   _In_opt_ HDC hdcRef,
4237   _In_opt_ const METAFILEPICT *lpMFP);
4238 
4239 BOOL WINAPI SetWorldTransform(_In_ HDC, _In_ const XFORM *);
4240 int WINAPI StartDocA(_In_ HDC, _In_ const DOCINFOA*);
4241 int WINAPI StartDocW(_In_ HDC, _In_ const DOCINFOW*);
4242 int WINAPI StartPage(_In_ HDC);
4243 BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD);
4244 int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD);
4245 BOOL WINAPI StrokeAndFillPath(_In_ HDC);
4246 BOOL WINAPI StrokePath(_In_ HDC);
4247 BOOL WINAPI SwapBuffers(HDC);
4248 
4249 BOOL
4250 WINAPI
4251 TextOutA(
4252   _In_ HDC hdc,
4253   _In_ int x,
4254   _In_ int y,
4255   _In_reads_(c) LPCSTR lpString,
4256   _In_ int c);
4257 
4258 BOOL
4259 WINAPI
4260 TextOutW(
4261   _In_ HDC hdc,
4262   _In_ int x,
4263   _In_ int y,
4264   _In_reads_(c) LPCWSTR lpString,
4265   _In_ int c);
4266 
4267 BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD);
4268 BOOL WINAPI UnrealizeObject(_In_ HGDIOBJ);
4269 BOOL WINAPI UpdateColors(_In_ HDC);
4270 BOOL WINAPI UpdateICMRegKeyA(_Reserved_ DWORD, _In_ LPSTR, _In_ LPSTR, _In_ UINT);
4271 BOOL WINAPI UpdateICMRegKeyW(_Reserved_ DWORD, _In_ LPWSTR, _In_ LPWSTR, _In_ UINT);
4272 BOOL WINAPI WidenPath(_In_ HDC);
4273 BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
4274 HGLRC WINAPI wglCreateContext(HDC);
4275 HGLRC WINAPI wglCreateLayerContext(HDC,int);
4276 BOOL WINAPI wglDeleteContext(HGLRC);
4277 BOOL WINAPI wglDescribeLayerPlane(HDC,int,int,UINT,LPLAYERPLANEDESCRIPTOR);
4278 HGLRC WINAPI wglGetCurrentContext(void);
4279 HDC WINAPI wglGetCurrentDC(void);
4280 int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,COLORREF*);
4281 PROC WINAPI wglGetProcAddress(LPCSTR);
4282 BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
4283 BOOL WINAPI wglRealizeLayerPalette(HDC,int,BOOL);
4284 int WINAPI wglSetLayerPaletteEntries(HDC,int,int,int,const COLORREF*);
4285 BOOL WINAPI wglShareLists(HGLRC,HGLRC);
4286 BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
4287 BOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
4288 BOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
4289 BOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
4290 BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
4291 
4292 #if (WINVER >= 0x0500)
4293 
4294 typedef struct _WGLSWAP
4295 {
4296     HDC hdc;
4297     UINT uiFlags;
4298 } WGLSWAP, *PWGLSWAP, FAR *LPWGLSWAP;
4299 
4300 #define WGL_SWAPMULTIPLE_MAX 16
4301 
4302 DWORD WINAPI wglSwapMultipleBuffers(UINT, CONST WGLSWAP *);
4303 
4304 #endif // (WINVER >= 0x0500)
4305 
4306 #if (WINVER>= 0x0500)
4307 
4308 BOOL WINAPI AlphaBlend(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BLENDFUNCTION);
4309 
4310 BOOL
4311 WINAPI
4312 GradientFill(
4313   _In_ HDC hdc,
4314   _In_reads_(nVertex) PTRIVERTEX pVertex,
4315   _In_ ULONG nVertex,
4316   _In_ PVOID pMesh,
4317   _In_ ULONG nMesh,
4318   _In_ ULONG ulMode);
4319 
4320 BOOL WINAPI TransparentBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT);
4321 
4322 #endif
4323 
4324 #ifdef UNICODE
4325 typedef AXESLISTW AXESLIST;
4326 typedef PAXESLISTW PAXESLIST;
4327 typedef LPAXESLISTW LPAXESLIST;
4328 typedef AXISINFOA AXISINFO;
4329 typedef PAXISINFOA PAXISINFO;
4330 typedef LPAXISINFOA LPAXISINFO;
4331 typedef WCHAR BCHAR;
4332 typedef DOCINFOW DOCINFO, *LPDOCINFO;
4333 typedef LOGFONTW LOGFONT,*PLOGFONT,*LPLOGFONT;
4334 typedef TEXTMETRICW TEXTMETRIC,*PTEXTMETRIC,*LPTEXTMETRIC;
4335 #define ICMENUMPROC ICMENUMPROCW
4336 typedef DEVMODEW DEVMODE,*PDEVMODE,*LPDEVMODE;
4337 typedef ENUMLOGFONTEXDVW ENUMLOGFONTEXDV;
4338 typedef PENUMLOGFONTEXDVW PENUMLOGFONTEXDV;
4339 typedef LPENUMLOGFONTEXDVW LPENUMLOGFONTEXDV;
4340 typedef ENUMTEXTMETRICW ENUMTEXTMETRIC;
4341 typedef PENUMTEXTMETRICW PENUMTEXTMETRIC;
4342 typedef LPENUMTEXTMETRICW LPENUMTEXTMETRIC;
4343 typedef EXTLOGFONTW EXTLOGFONT,*PEXTLOGFONT,*LPEXTLOGFONT;
4344 typedef GCP_RESULTSW GCP_RESULTS,*LPGCP_RESULTS;
4345 typedef OUTLINETEXTMETRICW OUTLINETEXTMETRIC,*POUTLINETEXTMETRIC,*LPOUTLINETEXTMETRIC;
4346 typedef POLYTEXTW POLYTEXT,*PPOLYTEXT,*LPPOLYTEXT;
4347 typedef LOGCOLORSPACEW LOGCOLORSPACE,*LPLOGCOLORSPACE;
4348 typedef NEWTEXTMETRICW NEWTEXTMETRIC,*PNEWTEXTMETRIC,*LPNEWTEXTMETRIC;
4349 typedef NEWTEXTMETRICEXW NEWTEXTMETRICEX;
4350 typedef ENUMLOGFONTW ENUMLOGFONT,*LPENUMLOGFONT;
4351 typedef ENUMLOGFONTEXW ENUMLOGFONTEX,*LPENUMLOGFONTEX;
4352 typedef DISPLAY_DEVICEW DISPLAY_DEVICE, *PDISPLAY_DEVICE, *LPDISPLAY_DEVICE;
4353 #define AddFontResource AddFontResourceW
4354 #if (_WIN32_WINNT >= 0x0500)
4355 #define AddFontResourceEx AddFontResourceExW
4356 #endif
4357 #define CopyEnhMetaFile CopyEnhMetaFileW
4358 #define CopyMetaFile CopyMetaFileW
4359 #define CreateDC CreateDCW
4360 #define CreateEnhMetaFile CreateEnhMetaFileW
4361 #define CreateFont CreateFontW
4362 #define CreateFontIndirect CreateFontIndirectW
4363 #define CreateFontIndirectEx CreateFontIndirectExW
4364 #define CreateIC CreateICW
4365 #define CreateMetaFile CreateMetaFileW
4366 #define CreateScalableFontResource CreateScalableFontResourceW
4367 #define DeviceCapabilities DeviceCapabilitiesW
4368 #define EnumFontFamilies EnumFontFamiliesW
4369 #define EnumFontFamiliesEx EnumFontFamiliesExW
4370 #define EnumFonts EnumFontsW
4371 #define EnumICMProfiles EnumICMProfilesW
4372 #define ExtTextOut ExtTextOutW
4373 #define GetCharABCWidthsFloat GetCharABCWidthsFloatW
4374 #define GetCharABCWidths GetCharABCWidthsW
4375 #define GetCharacterPlacement GetCharacterPlacementW
4376 #define GetCharWidth32 GetCharWidth32W
4377 #define GetCharWidthFloat GetCharWidthFloatW
4378 #define GetCharWidth GetCharWidthW
4379 #define GetEnhMetaFile GetEnhMetaFileW
4380 #define GetEnhMetaFileDescription GetEnhMetaFileDescriptionW
4381 #define GetGlyphOutline GetGlyphOutlineW
4382 #define GetICMProfile GetICMProfileW
4383 #define GetKerningPairs GetKerningPairsW
4384 #define GetLogColorSpace GetLogColorSpaceW
4385 #define GetMetaFile GetMetaFileW
4386 #define GetObject GetObjectW
4387 #define GetOutlineTextMetrics GetOutlineTextMetricsW
4388 #define GetTextExtentPoint GetTextExtentPointW
4389 #define GetTextExtentExPoint GetTextExtentExPointW
4390 #define GetTextExtentPoint32 GetTextExtentPoint32W
4391 #define GetTextFace GetTextFaceW
4392 #define GetTextMetrics GetTextMetricsW
4393 #define PolyTextOut PolyTextOutW
4394 #define RemoveFontResource RemoveFontResourceW
4395 #if (_WIN32_WINNT >= 0x0500)
4396 #define RemoveFontResourceEx RemoveFontResourceExW
4397 #endif
4398 #define ResetDC ResetDCW
4399 #define SetICMProfile SetICMProfileW
4400 #define StartDoc StartDocW
4401 #define TextOut TextOutW
4402 #define UpdateICMRegKey UpdateICMRegKeyW
4403 #define wglUseFontBitmaps wglUseFontBitmapsW
4404 #define wglUseFontOutlines wglUseFontOutlinesW
4405 #else
4406 typedef AXESLISTA AXESLIST;
4407 typedef PAXESLISTA PAXESLIST;
4408 typedef LPAXESLISTA LPAXESLIST;
4409 typedef AXISINFOA AXISINFO;
4410 typedef PAXISINFOA PAXISINFO;
4411 typedef LPAXISINFOA LPAXISINFO;
4412 typedef BYTE BCHAR;
4413 typedef DOCINFOA DOCINFO, *LPDOCINFO;
4414 typedef LOGFONTA LOGFONT,*PLOGFONT,*LPLOGFONT;
4415 typedef TEXTMETRICA TEXTMETRIC,*PTEXTMETRIC,*LPTEXTMETRIC;
4416 #define ICMENUMPROC ICMENUMPROCA
4417 typedef DEVMODEA DEVMODE,*PDEVMODE,*LPDEVMODE;
4418 typedef ENUMLOGFONTEXDVA ENUMLOGFONTEXDV;
4419 typedef PENUMLOGFONTEXDVA PENUMLOGFONTEXDV;
4420 typedef LPENUMLOGFONTEXDVA LPENUMLOGFONTEXDV;
4421 typedef ENUMTEXTMETRICA ENUMTEXTMETRIC;
4422 typedef PENUMTEXTMETRICA PENUMTEXTMETRIC;
4423 typedef LPENUMTEXTMETRICA LPENUMTEXTMETRIC;
4424 typedef EXTLOGFONTA EXTLOGFONT,*PEXTLOGFONT,*LPEXTLOGFONT;
4425 typedef GCP_RESULTSA GCP_RESULTS,*LPGCP_RESULTS;
4426 typedef OUTLINETEXTMETRICA OUTLINETEXTMETRIC,*POUTLINETEXTMETRIC,*LPOUTLINETEXTMETRIC;
4427 typedef POLYTEXTA POLYTEXT,*PPOLYTEXT,*LPPOLYTEXT;
4428 typedef LOGCOLORSPACEA LOGCOLORSPACE,*LPLOGCOLORSPACE;
4429 typedef NEWTEXTMETRICA NEWTEXTMETRIC,*PNEWTEXTMETRIC,*LPNEWTEXTMETRIC;
4430 typedef NEWTEXTMETRICEXA NEWTEXTMETRICEX;
4431 typedef ENUMLOGFONTA ENUMLOGFONT,*LPENUMLOGFONT;
4432 typedef ENUMLOGFONTEXA ENUMLOGFONTEX,*LPENUMLOGFONTEX;
4433 typedef DISPLAY_DEVICEA DISPLAY_DEVICE, *PDISPLAY_DEVICE, *LPDISPLAY_DEVICE;
4434 #define AddFontResource AddFontResourceA
4435 #if (_WIN32_WINNT >= 0x0500)
4436 #define AddFontResourceEx AddFontResourceExA
4437 #endif
4438 #define CopyEnhMetaFile CopyEnhMetaFileA
4439 #define CopyMetaFile CopyMetaFileA
4440 #define CreateDC CreateDCA
4441 #define CreateEnhMetaFile CreateEnhMetaFileA
4442 #define CreateFont CreateFontA
4443 #define CreateFontIndirect CreateFontIndirectA
4444 #define CreateFontIndirectEx CreateFontIndirectExA
4445 #define CreateIC CreateICA
4446 #define CreateMetaFile CreateMetaFileA
4447 #define CreateScalableFontResource CreateScalableFontResourceA
4448 #define DeviceCapabilities DeviceCapabilitiesA
4449 #define EnumFontFamilies EnumFontFamiliesA
4450 #define EnumFontFamiliesEx EnumFontFamiliesExA
4451 #define EnumFonts EnumFontsA
4452 #define EnumICMProfiles EnumICMProfilesA
4453 #define ExtTextOut ExtTextOutA
4454 #define GetCharWidthFloat GetCharWidthFloatA
4455 #define GetCharWidth GetCharWidthA
4456 #define GetCharacterPlacement GetCharacterPlacementA
4457 #define GetCharABCWidths GetCharABCWidthsA
4458 #define GetCharABCWidthsFloat GetCharABCWidthsFloatA
4459 #define GetCharWidth32 GetCharWidth32A
4460 #define GetEnhMetaFile GetEnhMetaFileA
4461 #define GetEnhMetaFileDescription GetEnhMetaFileDescriptionA
4462 #define GetGlyphOutline GetGlyphOutlineA
4463 #define GetICMProfile GetICMProfileA
4464 #define GetKerningPairs GetKerningPairsA
4465 #define GetLogColorSpace GetLogColorSpaceA
4466 #define GetMetaFile GetMetaFileA
4467 #define GetObject GetObjectA
4468 #define GetOutlineTextMetrics GetOutlineTextMetricsA
4469 #define GetTextExtentPoint GetTextExtentPointA
4470 #define GetTextExtentExPoint GetTextExtentExPointA
4471 #define GetTextExtentPoint32 GetTextExtentPoint32A
4472 #define GetTextFace GetTextFaceA
4473 #define GetTextMetrics GetTextMetricsA
4474 #define PolyTextOut PolyTextOutA
4475 #define RemoveFontResource RemoveFontResourceA
4476 #if (_WIN32_WINNT >= 0x0500)
4477 #define RemoveFontResourceEx RemoveFontResourceExA
4478 #endif
4479 #define ResetDC ResetDCA
4480 #define SetICMProfile SetICMProfileA
4481 #define StartDoc StartDocA
4482 #define TextOut TextOutA
4483 #define UpdateICMRegKey UpdateICMRegKeyA
4484 #define wglUseFontBitmaps wglUseFontBitmapsA
4485 #define wglUseFontOutlines wglUseFontOutlinesA
4486 #endif
4487 #endif
4488 
4489 #ifdef __WINESRC__
4490 /* the DC hook support is only exported on Win16, the 32-bit version is a Wine extension */
4491 
4492 #define DCHC_INVALIDVISRGN      0x0001
4493 #define DCHC_DELETEDC           0x0002
4494 #define DCHF_INVALIDATEVISRGN   0x0001
4495 #define DCHF_VALIDATEVISRGN     0x0002
4496 
4497 typedef BOOL (CALLBACK *DCHOOKPROC)(HDC,WORD,DWORD_PTR,LPARAM);
4498 
4499 WINGDIAPI DWORD_PTR WINAPI GetDCHook(HDC,DCHOOKPROC*);
4500 WINGDIAPI BOOL      WINAPI SetDCHook(HDC,DCHOOKPROC,DWORD_PTR);
4501 WINGDIAPI WORD      WINAPI SetHookFlags(HDC,WORD);
4502 WINGDIAPI INT       WINAPI SelectVisRgn(HDC,HRGN);
4503 #endif /* __WINESRC__ */
4504 
4505 #ifdef _MSC_VER
4506 #pragma warning(pop)
4507 #endif
4508 
4509 #ifdef __cplusplus
4510 }
4511 #endif
4512 
4513 #endif //!NOGDI
4514 #endif // _WINGDI_H
4515