source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/wingdi.h@ 1180

Last change on this file since 1180 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

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