Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4962 lines
180 KiB

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