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.

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