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