WinGDI.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:178k
源码类别:

模拟服务器

开发平台:

C/C++

  1. typedef struct _MAT2 {
  2.      FIXED  eM11;
  3.      FIXED  eM12;
  4.      FIXED  eM21;
  5.      FIXED  eM22;
  6. } MAT2, FAR *LPMAT2;
  7. typedef struct _GLYPHMETRICS {
  8.     UINT    gmBlackBoxX;
  9.     UINT    gmBlackBoxY;
  10.     POINT   gmptGlyphOrigin;
  11.     short   gmCellIncX;
  12.     short   gmCellIncY;
  13. } GLYPHMETRICS, FAR *LPGLYPHMETRICS;
  14. //  GetGlyphOutline constants
  15. #define GGO_METRICS        0
  16. #define GGO_BITMAP         1
  17. #define GGO_NATIVE         2
  18. #define GGO_BEZIER         3
  19. #if(WINVER >= 0x0400)
  20. #define  GGO_GRAY2_BITMAP   4
  21. #define  GGO_GRAY4_BITMAP   5
  22. #define  GGO_GRAY8_BITMAP   6
  23. #define  GGO_GLYPH_INDEX    0x0080
  24. #endif /* WINVER >= 0x0400 */
  25. #if (_WIN32_WINNT >= 0x0500)
  26. #define  GGO_UNHINTED       0x0100
  27. #endif // (_WIN32_WINNT >= 0x0500)
  28. #define TT_POLYGON_TYPE   24
  29. #define TT_PRIM_LINE       1
  30. #define TT_PRIM_QSPLINE    2
  31. #define TT_PRIM_CSPLINE    3
  32. typedef struct tagPOINTFX
  33. {
  34.     FIXED x;
  35.     FIXED y;
  36. } POINTFX, FAR* LPPOINTFX;
  37. typedef struct tagTTPOLYCURVE
  38. {
  39.     WORD    wType;
  40.     WORD    cpfx;
  41.     POINTFX apfx[1];
  42. } TTPOLYCURVE, FAR* LPTTPOLYCURVE;
  43. typedef struct tagTTPOLYGONHEADER
  44. {
  45.     DWORD   cb;
  46.     DWORD   dwType;
  47.     POINTFX pfxStart;
  48. } TTPOLYGONHEADER, FAR* LPTTPOLYGONHEADER;
  49. #if(WINVER >= 0x0400)
  50. #define GCP_DBCS           0x0001
  51. #define GCP_REORDER        0x0002
  52. #define GCP_USEKERNING     0x0008
  53. #define GCP_GLYPHSHAPE     0x0010
  54. #define GCP_LIGATE         0x0020
  55. ////#define GCP_GLYPHINDEXING  0x0080
  56. #define GCP_DIACRITIC      0x0100
  57. #define GCP_KASHIDA        0x0400
  58. #define GCP_ERROR          0x8000
  59. #define FLI_MASK           0x103B
  60. #define GCP_JUSTIFY        0x00010000L
  61. ////#define GCP_NODIACRITICS   0x00020000L
  62. #define FLI_GLYPHS         0x00040000L
  63. #define GCP_CLASSIN        0x00080000L
  64. #define GCP_MAXEXTENT      0x00100000L
  65. #define GCP_JUSTIFYIN      0x00200000L
  66. #define GCP_DISPLAYZWG      0x00400000L
  67. #define GCP_SYMSWAPOFF      0x00800000L
  68. #define GCP_NUMERICOVERRIDE 0x01000000L
  69. #define GCP_NEUTRALOVERRIDE 0x02000000L
  70. #define GCP_NUMERICSLATIN   0x04000000L
  71. #define GCP_NUMERICSLOCAL   0x08000000L
  72. #define GCPCLASS_LATIN                  1
  73. #define GCPCLASS_HEBREW                 2
  74. #define GCPCLASS_ARABIC                 2
  75. #define GCPCLASS_NEUTRAL                3
  76. #define GCPCLASS_LOCALNUMBER            4
  77. #define GCPCLASS_LATINNUMBER            5
  78. #define GCPCLASS_LATINNUMERICTERMINATOR 6
  79. #define GCPCLASS_LATINNUMERICSEPARATOR  7
  80. #define GCPCLASS_NUMERICSEPARATOR       8
  81. #define GCPCLASS_PREBOUNDLTR         0x80
  82. #define GCPCLASS_PREBOUNDRTL         0x40
  83. #define GCPCLASS_POSTBOUNDLTR        0x20
  84. #define GCPCLASS_POSTBOUNDRTL        0x10
  85. #define GCPGLYPH_LINKBEFORE          0x8000
  86. #define GCPGLYPH_LINKAFTER           0x4000
  87. typedef struct tagGCP_RESULTSA
  88.     {
  89.     DWORD   lStructSize;
  90.     LPSTR     lpOutString;
  91.     UINT FAR *lpOrder;
  92.     int FAR  *lpDx;
  93.     int FAR  *lpCaretPos;
  94.     LPSTR   lpClass;
  95.     LPWSTR  lpGlyphs;
  96.     UINT    nGlyphs;
  97.     int     nMaxFit;
  98.     } GCP_RESULTSA, FAR* LPGCP_RESULTSA;
  99. typedef struct tagGCP_RESULTSW
  100.     {
  101.     DWORD   lStructSize;
  102.     LPWSTR    lpOutString;
  103.     UINT FAR *lpOrder;
  104.     int FAR  *lpDx;
  105.     int FAR  *lpCaretPos;
  106.     LPSTR   lpClass;
  107.     LPWSTR  lpGlyphs;
  108.     UINT    nGlyphs;
  109.     int     nMaxFit;
  110.     } GCP_RESULTSW, FAR* LPGCP_RESULTSW;
  111. #ifdef UNICODE
  112. typedef GCP_RESULTSW GCP_RESULTS;
  113. typedef LPGCP_RESULTSW LPGCP_RESULTS;
  114. #else
  115. typedef GCP_RESULTSA GCP_RESULTS;
  116. typedef LPGCP_RESULTSA LPGCP_RESULTS;
  117. #endif // UNICODE
  118. #endif /* WINVER >= 0x0400 */
  119. typedef struct _RASTERIZER_STATUS {
  120.     short   nSize;
  121.     short   wFlags;
  122.     short   nLanguageID;
  123. } RASTERIZER_STATUS, FAR *LPRASTERIZER_STATUS;
  124. /* bits defined in wFlags of RASTERIZER_STATUS */
  125. #define TT_AVAILABLE    0x0001
  126. #define TT_ENABLED      0x0002
  127. /* Pixel format descriptor */
  128. typedef struct tagPIXELFORMATDESCRIPTOR
  129. {
  130.     WORD  nSize;
  131.     WORD  nVersion;
  132.     DWORD dwFlags;
  133.     BYTE  iPixelType;
  134.     BYTE  cColorBits;
  135.     BYTE  cRedBits;
  136.     BYTE  cRedShift;
  137.     BYTE  cGreenBits;
  138.     BYTE  cGreenShift;
  139.     BYTE  cBlueBits;
  140.     BYTE  cBlueShift;
  141.     BYTE  cAlphaBits;
  142.     BYTE  cAlphaShift;
  143.     BYTE  cAccumBits;
  144.     BYTE  cAccumRedBits;
  145.     BYTE  cAccumGreenBits;
  146.     BYTE  cAccumBlueBits;
  147.     BYTE  cAccumAlphaBits;
  148.     BYTE  cDepthBits;
  149.     BYTE  cStencilBits;
  150.     BYTE  cAuxBuffers;
  151.     BYTE  iLayerType;
  152.     BYTE  bReserved;
  153.     DWORD dwLayerMask;
  154.     DWORD dwVisibleMask;
  155.     DWORD dwDamageMask;
  156. } PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, FAR *LPPIXELFORMATDESCRIPTOR;
  157. /* pixel types */
  158. #define PFD_TYPE_RGBA        0
  159. #define PFD_TYPE_COLORINDEX  1
  160. /* layer types */
  161. #define PFD_MAIN_PLANE       0
  162. #define PFD_OVERLAY_PLANE    1
  163. #define PFD_UNDERLAY_PLANE   (-1)
  164. /* PIXELFORMATDESCRIPTOR flags */
  165. #define PFD_DOUBLEBUFFER            0x00000001
  166. #define PFD_STEREO                  0x00000002
  167. #define PFD_DRAW_TO_WINDOW          0x00000004
  168. #define PFD_DRAW_TO_BITMAP          0x00000008
  169. #define PFD_SUPPORT_GDI             0x00000010
  170. #define PFD_SUPPORT_OPENGL          0x00000020
  171. #define PFD_GENERIC_FORMAT          0x00000040
  172. #define PFD_NEED_PALETTE            0x00000080
  173. #define PFD_NEED_SYSTEM_PALETTE     0x00000100
  174. #define PFD_SWAP_EXCHANGE           0x00000200
  175. #define PFD_SWAP_COPY               0x00000400
  176. #define PFD_SWAP_LAYER_BUFFERS      0x00000800
  177. #define PFD_GENERIC_ACCELERATED     0x00001000
  178. #define PFD_SUPPORT_DIRECTDRAW      0x00002000
  179. /* PIXELFORMATDESCRIPTOR flags for use in ChoosePixelFormat only */
  180. #define PFD_DEPTH_DONTCARE          0x20000000
  181. #define PFD_DOUBLEBUFFER_DONTCARE   0x40000000
  182. #define PFD_STEREO_DONTCARE         0x80000000
  183. #ifdef STRICT
  184. #if !defined(NOTEXTMETRIC)
  185. typedef int (CALLBACK* OLDFONTENUMPROCA)(CONST LOGFONTA *, CONST TEXTMETRICA *, DWORD, LPARAM);
  186. typedef int (CALLBACK* OLDFONTENUMPROCW)(CONST LOGFONTW *, CONST TEXTMETRICW *, DWORD, LPARAM);
  187. #ifdef UNICODE
  188. #define OLDFONTENUMPROC  OLDFONTENUMPROCW
  189. #else
  190. #define OLDFONTENUMPROC  OLDFONTENUMPROCA
  191. #endif // !UNICODE
  192. #else
  193. typedef int (CALLBACK* OLDFONTENUMPROCA)(CONST LOGFONTA *, CONST VOID *, DWORD, LPARAM);
  194. typedef int (CALLBACK* OLDFONTENUMPROCW)(CONST LOGFONTW *, CONST VOID *, DWORD, LPARAM);
  195. #ifdef UNICODE
  196. #define OLDFONTENUMPROC  OLDFONTENUMPROCW
  197. #else
  198. #define OLDFONTENUMPROC  OLDFONTENUMPROCA
  199. #endif // !UNICODE
  200. #endif
  201. typedef OLDFONTENUMPROCA    FONTENUMPROCA;
  202. typedef OLDFONTENUMPROCW    FONTENUMPROCW;
  203. #ifdef UNICODE
  204. typedef FONTENUMPROCW FONTENUMPROC;
  205. #else
  206. typedef FONTENUMPROCA FONTENUMPROC;
  207. #endif // UNICODE
  208. typedef int (CALLBACK* GOBJENUMPROC)(LPVOID, LPARAM);
  209. typedef VOID (CALLBACK* LINEDDAPROC)(int, int, LPARAM);
  210. #else
  211. typedef FARPROC OLDFONTENUMPROC;
  212. typedef FARPROC FONTENUMPROCA;
  213. typedef FARPROC FONTENUMPROCW;
  214. #ifdef UNICODE
  215. typedef FONTENUMPROCW FONTENUMPROC;
  216. #else
  217. typedef FONTENUMPROCA FONTENUMPROC;
  218. #endif // UNICODE
  219. typedef FARPROC GOBJENUMPROC;
  220. typedef FARPROC LINEDDAPROC;
  221. #endif
  222. WINGDIAPI int WINAPI AddFontResourceA(IN LPCSTR);
  223. WINGDIAPI int WINAPI AddFontResourceW(IN LPCWSTR);
  224. #ifdef UNICODE
  225. #define AddFontResource  AddFontResourceW
  226. #else
  227. #define AddFontResource  AddFontResourceA
  228. #endif // !UNICODE
  229. WINGDIAPI BOOL  WINAPI AnimatePalette( IN HPALETTE, IN UINT, IN  UINT, IN CONST PALETTEENTRY *);
  230. WINGDIAPI BOOL  WINAPI Arc( IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int);
  231. WINGDIAPI BOOL  WINAPI BitBlt( IN HDC, IN int, IN int, IN int, IN int, IN HDC, IN int, IN int, IN DWORD);
  232. WINGDIAPI BOOL  WINAPI CancelDC( IN HDC);
  233. WINGDIAPI BOOL  WINAPI Chord( IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int);
  234. WINGDIAPI int   WINAPI ChoosePixelFormat( IN HDC, IN CONST PIXELFORMATDESCRIPTOR *);
  235. WINGDIAPI HMETAFILE  WINAPI CloseMetaFile( IN HDC);
  236. WINGDIAPI int     WINAPI CombineRgn( IN HRGN, IN HRGN, IN HRGN, IN int);
  237. WINGDIAPI HMETAFILE WINAPI CopyMetaFileA( IN HMETAFILE, IN LPCSTR);
  238. WINGDIAPI HMETAFILE WINAPI CopyMetaFileW( IN HMETAFILE, IN LPCWSTR);
  239. #ifdef UNICODE
  240. #define CopyMetaFile  CopyMetaFileW
  241. #else
  242. #define CopyMetaFile  CopyMetaFileA
  243. #endif // !UNICODE
  244. WINGDIAPI HBITMAP WINAPI CreateBitmap( IN int, IN int, IN UINT, IN UINT, IN CONST VOID *);
  245. WINGDIAPI HBITMAP WINAPI CreateBitmapIndirect( IN CONST BITMAP *);
  246. WINGDIAPI HBRUSH  WINAPI CreateBrushIndirect( IN CONST LOGBRUSH *);
  247. WINGDIAPI HBITMAP WINAPI CreateCompatibleBitmap( IN HDC, IN int, IN int);
  248. WINGDIAPI HBITMAP WINAPI CreateDiscardableBitmap( IN HDC, IN int, IN int);
  249. WINGDIAPI HDC     WINAPI CreateCompatibleDC( IN HDC);
  250. WINGDIAPI HDC     WINAPI CreateDCA( IN LPCSTR, IN LPCSTR, IN LPCSTR, IN CONST DEVMODEA *);
  251. WINGDIAPI HDC     WINAPI CreateDCW( IN LPCWSTR, IN LPCWSTR, IN LPCWSTR, IN CONST DEVMODEW *);
  252. #ifdef UNICODE
  253. #define CreateDC  CreateDCW
  254. #else
  255. #define CreateDC  CreateDCA
  256. #endif // !UNICODE
  257. WINGDIAPI HBITMAP WINAPI CreateDIBitmap( IN HDC, IN CONST BITMAPINFOHEADER *, IN DWORD, IN CONST VOID *, IN CONST BITMAPINFO *, IN UINT);
  258. WINGDIAPI HBRUSH  WINAPI CreateDIBPatternBrush( IN HGLOBAL, IN UINT);
  259. WINGDIAPI HBRUSH  WINAPI CreateDIBPatternBrushPt( IN CONST VOID *, IN UINT);
  260. WINGDIAPI HRGN    WINAPI CreateEllipticRgn( IN int, IN int, IN int, IN int);
  261. WINGDIAPI HRGN    WINAPI CreateEllipticRgnIndirect( IN CONST RECT *);
  262. WINGDIAPI HFONT   WINAPI CreateFontIndirectA( IN CONST LOGFONTA *);
  263. WINGDIAPI HFONT   WINAPI CreateFontIndirectW( IN CONST LOGFONTW *);
  264. #ifdef UNICODE
  265. #define CreateFontIndirect  CreateFontIndirectW
  266. #else
  267. #define CreateFontIndirect  CreateFontIndirectA
  268. #endif // !UNICODE
  269. WINGDIAPI HFONT   WINAPI CreateFontA( IN int, IN int, IN int, IN int, IN int, IN DWORD,
  270.                              IN DWORD, IN DWORD, IN DWORD, IN DWORD, IN DWORD,
  271.                              IN DWORD, IN DWORD, IN LPCSTR);
  272. WINGDIAPI HFONT   WINAPI CreateFontW( IN int, IN int, IN int, IN int, IN int, IN DWORD,
  273.                              IN DWORD, IN DWORD, IN DWORD, IN DWORD, IN DWORD,
  274.                              IN DWORD, IN DWORD, IN LPCWSTR);
  275. #ifdef UNICODE
  276. #define CreateFont  CreateFontW
  277. #else
  278. #define CreateFont  CreateFontA
  279. #endif // !UNICODE
  280. WINGDIAPI HBRUSH  WINAPI CreateHatchBrush( IN int, IN COLORREF);
  281. WINGDIAPI HDC     WINAPI CreateICA( IN LPCSTR, IN LPCSTR, IN LPCSTR, IN CONST DEVMODEA *);
  282. WINGDIAPI HDC     WINAPI CreateICW( IN LPCWSTR, IN LPCWSTR, IN LPCWSTR, IN CONST DEVMODEW *);
  283. #ifdef UNICODE
  284. #define CreateIC  CreateICW
  285. #else
  286. #define CreateIC  CreateICA
  287. #endif // !UNICODE
  288. WINGDIAPI HDC     WINAPI CreateMetaFileA( IN LPCSTR);
  289. WINGDIAPI HDC     WINAPI CreateMetaFileW( IN LPCWSTR);
  290. #ifdef UNICODE
  291. #define CreateMetaFile  CreateMetaFileW
  292. #else
  293. #define CreateMetaFile  CreateMetaFileA
  294. #endif // !UNICODE
  295. WINGDIAPI HPALETTE WINAPI CreatePalette( IN CONST LOGPALETTE *);
  296. WINGDIAPI HPEN    WINAPI CreatePen( IN int, IN int, IN COLORREF);
  297. WINGDIAPI HPEN    WINAPI CreatePenIndirect( IN CONST LOGPEN *);
  298. WINGDIAPI HRGN    WINAPI CreatePolyPolygonRgn( IN CONST POINT *, IN CONST INT *, IN int, IN int);
  299. WINGDIAPI HBRUSH  WINAPI CreatePatternBrush( IN HBITMAP);
  300. WINGDIAPI HRGN    WINAPI CreateRectRgn( IN int, IN int, IN int, IN int);
  301. WINGDIAPI HRGN    WINAPI CreateRectRgnIndirect( IN CONST RECT *);
  302. WINGDIAPI HRGN    WINAPI CreateRoundRectRgn( IN int, IN int, IN int, IN int, IN int, IN int);
  303. WINGDIAPI BOOL    WINAPI CreateScalableFontResourceA( IN DWORD, IN LPCSTR, IN LPCSTR, IN LPCSTR);
  304. WINGDIAPI BOOL    WINAPI CreateScalableFontResourceW( IN DWORD, IN LPCWSTR, IN LPCWSTR, IN LPCWSTR);
  305. #ifdef UNICODE
  306. #define CreateScalableFontResource  CreateScalableFontResourceW
  307. #else
  308. #define CreateScalableFontResource  CreateScalableFontResourceA
  309. #endif // !UNICODE
  310. WINGDIAPI HBRUSH  WINAPI CreateSolidBrush( IN COLORREF);
  311. WINGDIAPI BOOL WINAPI DeleteDC( IN HDC);
  312. WINGDIAPI BOOL WINAPI DeleteMetaFile( IN HMETAFILE);
  313. WINGDIAPI BOOL WINAPI DeleteObject( IN HGDIOBJ);
  314. WINGDIAPI int  WINAPI DescribePixelFormat( IN HDC, IN int, IN UINT, OUT LPPIXELFORMATDESCRIPTOR);
  315. /* define types of pointers to ExtDeviceMode() and DeviceCapabilities()
  316.  * functions for Win 3.1 compatibility
  317.  */
  318. typedef UINT   (CALLBACK* LPFNDEVMODE)(HWND, HMODULE, LPDEVMODE, LPSTR, LPSTR, LPDEVMODE, LPSTR, UINT);
  319. typedef DWORD  (CALLBACK* LPFNDEVCAPS)(LPSTR, LPSTR, UINT, LPSTR, LPDEVMODE);
  320. /* mode selections for the device mode function */
  321. #define DM_UPDATE           1
  322. #define DM_COPY             2
  323. #define DM_PROMPT           4
  324. #define DM_MODIFY           8
  325. #define DM_IN_BUFFER        DM_MODIFY
  326. #define DM_IN_PROMPT        DM_PROMPT
  327. #define DM_OUT_BUFFER       DM_COPY
  328. #define DM_OUT_DEFAULT      DM_UPDATE
  329. /* device capabilities indices */
  330. #define DC_FIELDS           1
  331. #define DC_PAPERS           2
  332. #define DC_PAPERSIZE        3
  333. #define DC_MINEXTENT        4
  334. #define DC_MAXEXTENT        5
  335. #define DC_BINS             6
  336. #define DC_DUPLEX           7
  337. #define DC_SIZE             8
  338. #define DC_EXTRA            9
  339. #define DC_VERSION          10
  340. #define DC_DRIVER           11
  341. #define DC_BINNAMES         12
  342. #define DC_ENUMRESOLUTIONS  13
  343. #define DC_FILEDEPENDENCIES 14
  344. #define DC_TRUETYPE         15
  345. #define DC_PAPERNAMES       16
  346. #define DC_ORIENTATION      17
  347. #define DC_COPIES           18
  348. #if(WINVER >= 0x0400)
  349. #define DC_BINADJUST            19
  350. #define DC_EMF_COMPLIANT        20
  351. #define DC_DATATYPE_PRODUCED    21
  352. #define DC_COLLATE              22
  353. #define DC_MANUFACTURER         23
  354. #define DC_MODEL                24
  355. #endif /* WINVER >= 0x0400 */
  356. #if(WINVER >= 0x0500)
  357. #define DC_PERSONALITY          25
  358. #define DC_PRINTRATE            26
  359. #define DC_PRINTRATEUNIT        27
  360. #define   PRINTRATEUNIT_PPM     1
  361. #define   PRINTRATEUNIT_CPS     2
  362. #define   PRINTRATEUNIT_LPM     3
  363. #define   PRINTRATEUNIT_IPM     4
  364. #define DC_PRINTERMEM           28
  365. #define DC_MEDIAREADY           29
  366. #define DC_STAPLE               30
  367. #define DC_PRINTRATEPPM         31
  368. #define DC_COLORDEVICE          32
  369. #define DC_NUP                  33
  370. #define DC_MEDIATYPENAMES       34
  371. #define DC_MEDIATYPES           35
  372. #endif /* WINVER >= 0x0500 */
  373. /* bit fields of the return value (DWORD) for DC_TRUETYPE */
  374. #define DCTT_BITMAP             0x0000001L
  375. #define DCTT_DOWNLOAD           0x0000002L
  376. #define DCTT_SUBDEV             0x0000004L
  377. #if(WINVER >= 0x0400)
  378. #define DCTT_DOWNLOAD_OUTLINE   0x0000008L
  379. /* return values for DC_BINADJUST */
  380. #define DCBA_FACEUPNONE       0x0000
  381. #define DCBA_FACEUPCENTER     0x0001
  382. #define DCBA_FACEUPLEFT       0x0002
  383. #define DCBA_FACEUPRIGHT      0x0003
  384. #define DCBA_FACEDOWNNONE     0x0100
  385. #define DCBA_FACEDOWNCENTER   0x0101
  386. #define DCBA_FACEDOWNLEFT     0x0102
  387. #define DCBA_FACEDOWNRIGHT    0x0103
  388. #endif /* WINVER >= 0x0400 */
  389. WINSPOOLAPI int  WINAPI DeviceCapabilitiesA( IN LPCSTR, IN LPCSTR, IN WORD,
  390.                                 OUT LPSTR, IN CONST DEVMODEA *);
  391. WINSPOOLAPI int  WINAPI DeviceCapabilitiesW( IN LPCWSTR, IN LPCWSTR, IN WORD,
  392.                                 OUT LPWSTR, IN CONST DEVMODEW *);
  393. #ifdef UNICODE
  394. #define DeviceCapabilities  DeviceCapabilitiesW
  395. #else
  396. #define DeviceCapabilities  DeviceCapabilitiesA
  397. #endif // !UNICODE
  398. WINGDIAPI int  WINAPI DrawEscape( IN HDC, IN int, IN int, IN LPCSTR);
  399. WINGDIAPI BOOL WINAPI Ellipse( IN HDC, IN int, IN int, IN int, IN int);
  400. #if(WINVER >= 0x0400)
  401. WINGDIAPI int  WINAPI EnumFontFamiliesExA( IN HDC, IN LPLOGFONTA, IN FONTENUMPROCA, IN LPARAM, IN DWORD);
  402. WINGDIAPI int  WINAPI EnumFontFamiliesExW( IN HDC, IN LPLOGFONTW, IN FONTENUMPROCW, IN LPARAM, IN DWORD);
  403. #ifdef UNICODE
  404. #define EnumFontFamiliesEx  EnumFontFamiliesExW
  405. #else
  406. #define EnumFontFamiliesEx  EnumFontFamiliesExA
  407. #endif // !UNICODE
  408. #endif /* WINVER >= 0x0400 */
  409. WINGDIAPI int  WINAPI EnumFontFamiliesA( IN HDC, IN LPCSTR, IN FONTENUMPROCA, IN LPARAM);
  410. WINGDIAPI int  WINAPI EnumFontFamiliesW( IN HDC, IN LPCWSTR, IN FONTENUMPROCW, IN LPARAM);
  411. #ifdef UNICODE
  412. #define EnumFontFamilies  EnumFontFamiliesW
  413. #else
  414. #define EnumFontFamilies  EnumFontFamiliesA
  415. #endif // !UNICODE
  416. WINGDIAPI int  WINAPI EnumFontsA( IN HDC, IN LPCSTR,  IN FONTENUMPROCA, IN LPARAM);
  417. WINGDIAPI int  WINAPI EnumFontsW( IN HDC, IN LPCWSTR,  IN FONTENUMPROCW, IN LPARAM);
  418. #ifdef UNICODE
  419. #define EnumFonts  EnumFontsW
  420. #else
  421. #define EnumFonts  EnumFontsA
  422. #endif // !UNICODE
  423. #ifdef STRICT
  424. WINGDIAPI int  WINAPI EnumObjects( IN HDC, IN int, IN GOBJENUMPROC, IN LPARAM);
  425. #else
  426. WINGDIAPI int  WINAPI EnumObjects( IN HDC, IN int, IN GOBJENUMPROC, IN LPVOID);
  427. #endif
  428. WINGDIAPI BOOL WINAPI EqualRgn( IN HRGN, IN HRGN);
  429. WINGDIAPI int  WINAPI Escape( IN HDC, IN int, IN int, IN LPCSTR,  OUT LPVOID);
  430. WINGDIAPI int  WINAPI ExtEscape( IN HDC, IN int, IN int, IN LPCSTR,  IN int, OUT LPSTR);
  431. WINGDIAPI int  WINAPI ExcludeClipRect( IN HDC, IN int, IN int, IN int, IN int);
  432. WINGDIAPI HRGN WINAPI ExtCreateRegion( IN CONST XFORM *, IN DWORD, IN CONST RGNDATA *);
  433. WINGDIAPI BOOL  WINAPI ExtFloodFill( IN HDC, IN int, IN int, IN COLORREF, IN UINT);
  434. WINGDIAPI BOOL   WINAPI FillRgn( IN HDC, IN HRGN, IN HBRUSH);
  435. WINGDIAPI BOOL   WINAPI FloodFill( IN HDC, IN int, IN int, IN COLORREF);
  436. WINGDIAPI BOOL   WINAPI FrameRgn( IN HDC, IN HRGN, IN HBRUSH, IN int, IN int);
  437. WINGDIAPI int   WINAPI GetROP2( IN HDC);
  438. WINGDIAPI BOOL  WINAPI GetAspectRatioFilterEx( IN HDC, OUT LPSIZE);
  439. WINGDIAPI COLORREF WINAPI GetBkColor( IN HDC);
  440. #if (_WIN32_WINNT >= 0x0500)
  441. WINGDIAPI COLORREF WINAPI GetDCBrushColor( IN HDC);
  442. WINGDIAPI COLORREF WINAPI GetDCPenColor( IN HDC);
  443. #endif
  444. WINGDIAPI int   WINAPI GetBkMode( IN HDC);
  445. WINGDIAPI LONG  WINAPI GetBitmapBits( IN HBITMAP, IN LONG, OUT LPVOID);
  446. WINGDIAPI BOOL  WINAPI GetBitmapDimensionEx( IN HBITMAP, OUT LPSIZE);
  447. WINGDIAPI UINT  WINAPI GetBoundsRect( IN HDC, OUT LPRECT, IN UINT);
  448. WINGDIAPI BOOL  WINAPI GetBrushOrgEx( IN HDC, OUT LPPOINT);
  449. WINGDIAPI BOOL  WINAPI GetCharWidthA( IN HDC, IN UINT, IN UINT, OUT LPINT);
  450. WINGDIAPI BOOL  WINAPI GetCharWidthW( IN HDC, IN UINT, IN UINT, OUT LPINT);
  451. #ifdef UNICODE
  452. #define GetCharWidth  GetCharWidthW
  453. #else
  454. #define GetCharWidth  GetCharWidthA
  455. #endif // !UNICODE
  456. WINGDIAPI BOOL  WINAPI GetCharWidth32A( IN HDC, IN UINT, IN UINT,  OUT LPINT);
  457. WINGDIAPI BOOL  WINAPI GetCharWidth32W( IN HDC, IN UINT, IN UINT,  OUT LPINT);
  458. #ifdef UNICODE
  459. #define GetCharWidth32  GetCharWidth32W
  460. #else
  461. #define GetCharWidth32  GetCharWidth32A
  462. #endif // !UNICODE
  463. WINGDIAPI BOOL  APIENTRY GetCharWidthFloatA( IN HDC, IN UINT, IN UINT, OUT PFLOAT);
  464. WINGDIAPI BOOL  APIENTRY GetCharWidthFloatW( IN HDC, IN UINT, IN UINT, OUT PFLOAT);
  465. #ifdef UNICODE
  466. #define GetCharWidthFloat  GetCharWidthFloatW
  467. #else
  468. #define GetCharWidthFloat  GetCharWidthFloatA
  469. #endif // !UNICODE
  470. WINGDIAPI BOOL  APIENTRY GetCharABCWidthsA( IN HDC, IN UINT, IN UINT, OUT LPABC);
  471. WINGDIAPI BOOL  APIENTRY GetCharABCWidthsW( IN HDC, IN UINT, IN UINT, OUT LPABC);
  472. #ifdef UNICODE
  473. #define GetCharABCWidths  GetCharABCWidthsW
  474. #else
  475. #define GetCharABCWidths  GetCharABCWidthsA
  476. #endif // !UNICODE
  477. WINGDIAPI BOOL  APIENTRY GetCharABCWidthsFloatA( IN HDC, IN UINT, IN UINT, OUT LPABCFLOAT);
  478. WINGDIAPI BOOL  APIENTRY GetCharABCWidthsFloatW( IN HDC, IN UINT, IN UINT, OUT LPABCFLOAT);
  479. #ifdef UNICODE
  480. #define GetCharABCWidthsFloat  GetCharABCWidthsFloatW
  481. #else
  482. #define GetCharABCWidthsFloat  GetCharABCWidthsFloatA
  483. #endif // !UNICODE
  484. WINGDIAPI int   WINAPI GetClipBox( IN HDC,  OUT LPRECT);
  485. WINGDIAPI int   WINAPI GetClipRgn( IN HDC, IN HRGN);
  486. WINGDIAPI int   WINAPI GetMetaRgn( IN HDC, IN HRGN);
  487. WINGDIAPI HGDIOBJ WINAPI GetCurrentObject( IN HDC, IN UINT);
  488. WINGDIAPI BOOL  WINAPI GetCurrentPositionEx( IN HDC,  OUT LPPOINT);
  489. WINGDIAPI int   WINAPI GetDeviceCaps( IN HDC, IN int);
  490. WINGDIAPI int   WINAPI GetDIBits( IN HDC, IN HBITMAP, IN UINT, IN UINT,  OUT LPVOID, IN OUT LPBITMAPINFO, IN UINT);
  491. WINGDIAPI DWORD WINAPI GetFontData( IN HDC, IN DWORD, IN DWORD, OUT LPVOID, IN DWORD);
  492. WINGDIAPI DWORD WINAPI GetGlyphOutlineA( IN HDC, IN UINT, IN UINT, OUT LPGLYPHMETRICS, IN DWORD, OUT LPVOID, IN CONST MAT2 *);
  493. WINGDIAPI DWORD WINAPI GetGlyphOutlineW( IN HDC, IN UINT, IN UINT, OUT LPGLYPHMETRICS, IN DWORD, OUT LPVOID, IN CONST MAT2 *);
  494. #ifdef UNICODE
  495. #define GetGlyphOutline  GetGlyphOutlineW
  496. #else
  497. #define GetGlyphOutline  GetGlyphOutlineA
  498. #endif // !UNICODE
  499. WINGDIAPI int   WINAPI GetGraphicsMode( IN HDC);
  500. WINGDIAPI int   WINAPI GetMapMode( IN HDC);
  501. WINGDIAPI UINT  WINAPI GetMetaFileBitsEx( IN HMETAFILE, IN UINT,  OUT LPVOID);
  502. WINGDIAPI HMETAFILE   WINAPI GetMetaFileA( IN LPCSTR);
  503. WINGDIAPI HMETAFILE   WINAPI GetMetaFileW( IN LPCWSTR);
  504. #ifdef UNICODE
  505. #define GetMetaFile  GetMetaFileW
  506. #else
  507. #define GetMetaFile  GetMetaFileA
  508. #endif // !UNICODE
  509. WINGDIAPI COLORREF WINAPI GetNearestColor( IN HDC, IN COLORREF);
  510. WINGDIAPI UINT  WINAPI GetNearestPaletteIndex( IN HPALETTE, IN COLORREF);
  511. WINGDIAPI DWORD WINAPI GetObjectType( IN HGDIOBJ h);
  512. #ifndef NOTEXTMETRIC
  513. WINGDIAPI UINT APIENTRY GetOutlineTextMetricsA( IN HDC, IN UINT, OUT LPOUTLINETEXTMETRICA);
  514. WINGDIAPI UINT APIENTRY GetOutlineTextMetricsW( IN HDC, IN UINT, OUT LPOUTLINETEXTMETRICW);
  515. #ifdef UNICODE
  516. #define GetOutlineTextMetrics  GetOutlineTextMetricsW
  517. #else
  518. #define GetOutlineTextMetrics  GetOutlineTextMetricsA
  519. #endif // !UNICODE
  520. #endif /* NOTEXTMETRIC */
  521. WINGDIAPI UINT  WINAPI GetPaletteEntries( IN HPALETTE, IN UINT, IN UINT, OUT LPPALETTEENTRY);
  522. WINGDIAPI COLORREF WINAPI GetPixel( IN HDC, IN int, IN int);
  523. WINGDIAPI int   WINAPI GetPixelFormat( IN HDC);
  524. WINGDIAPI int   WINAPI GetPolyFillMode( IN HDC);
  525. WINGDIAPI BOOL  WINAPI GetRasterizerCaps( OUT LPRASTERIZER_STATUS, IN UINT);
  526. WINGDIAPI int   WINAPI GetRandomRgn (IN HDC, IN HRGN, IN INT);
  527. WINGDIAPI DWORD WINAPI GetRegionData( IN HRGN, IN DWORD,  OUT LPRGNDATA);
  528. WINGDIAPI int   WINAPI GetRgnBox( IN HRGN,  OUT LPRECT);
  529. WINGDIAPI HGDIOBJ WINAPI GetStockObject( IN int);
  530. WINGDIAPI int   WINAPI GetStretchBltMode( IN HDC);
  531. WINGDIAPI UINT  WINAPI GetSystemPaletteEntries( IN HDC, IN UINT, IN UINT, OUT LPPALETTEENTRY);
  532. WINGDIAPI UINT  WINAPI GetSystemPaletteUse( IN HDC);
  533. WINGDIAPI int   WINAPI GetTextCharacterExtra( IN HDC);
  534. WINGDIAPI UINT  WINAPI GetTextAlign( IN HDC);
  535. WINGDIAPI COLORREF WINAPI GetTextColor( IN HDC);
  536. WINGDIAPI BOOL  APIENTRY GetTextExtentPointA(
  537.                     IN HDC,
  538.                     IN LPCSTR,
  539.                     IN int,
  540.                     OUT LPSIZE
  541.                     );
  542. WINGDIAPI BOOL  APIENTRY GetTextExtentPointW(
  543.                     IN HDC,
  544.                     IN LPCWSTR,
  545.                     IN int,
  546.                     OUT LPSIZE
  547.                     );
  548. #ifdef UNICODE
  549. #define GetTextExtentPoint  GetTextExtentPointW
  550. #else
  551. #define GetTextExtentPoint  GetTextExtentPointA
  552. #endif // !UNICODE
  553. WINGDIAPI BOOL  APIENTRY GetTextExtentPoint32A(
  554.                     IN HDC,
  555.                     IN LPCSTR,
  556.                     IN int,
  557.                     OUT LPSIZE
  558.                     );
  559. WINGDIAPI BOOL  APIENTRY GetTextExtentPoint32W(
  560.                     IN HDC,
  561.                     IN LPCWSTR,
  562.                     IN int,
  563.                     OUT LPSIZE
  564.                     );
  565. #ifdef UNICODE
  566. #define GetTextExtentPoint32  GetTextExtentPoint32W
  567. #else
  568. #define GetTextExtentPoint32  GetTextExtentPoint32A
  569. #endif // !UNICODE
  570. WINGDIAPI BOOL  APIENTRY GetTextExtentExPointA(
  571.                     IN HDC,
  572.                     IN LPCSTR,
  573.                     IN int,
  574.                     IN int,
  575.                     OUT LPINT,
  576.                     OUT LPINT,
  577.                     OUT LPSIZE
  578.                     );
  579. WINGDIAPI BOOL  APIENTRY GetTextExtentExPointW(
  580.                     IN HDC,
  581.                     IN LPCWSTR,
  582.                     IN int,
  583.                     IN int,
  584.                     OUT LPINT,
  585.                     OUT LPINT,
  586.                     OUT LPSIZE
  587.                     );
  588. #ifdef UNICODE
  589. #define GetTextExtentExPoint  GetTextExtentExPointW
  590. #else
  591. #define GetTextExtentExPoint  GetTextExtentExPointA
  592. #endif // !UNICODE
  593. #if(WINVER >= 0x0400)
  594. WINGDIAPI int WINAPI GetTextCharset( IN HDC hdc);
  595. WINGDIAPI int WINAPI GetTextCharsetInfo( IN HDC hdc, OUT LPFONTSIGNATURE lpSig, IN DWORD dwFlags);
  596. WINGDIAPI BOOL WINAPI TranslateCharsetInfo( IN OUT DWORD FAR *lpSrc,  OUT LPCHARSETINFO lpCs, IN DWORD dwFlags);
  597. WINGDIAPI DWORD WINAPI GetFontLanguageInfo( IN HDC );
  598. WINGDIAPI DWORD WINAPI GetCharacterPlacementA(  IN HDC, IN LPCSTR, IN int, IN int, IN OUT LPGCP_RESULTSA, IN DWORD);
  599. WINGDIAPI DWORD WINAPI GetCharacterPlacementW(  IN HDC, IN LPCWSTR, IN int, IN int, IN OUT LPGCP_RESULTSW, IN DWORD);
  600. #ifdef UNICODE
  601. #define GetCharacterPlacement  GetCharacterPlacementW
  602. #else
  603. #define GetCharacterPlacement  GetCharacterPlacementA
  604. #endif // !UNICODE
  605. #endif /* WINVER >= 0x0400 */
  606. #if (_WIN32_WINNT >= 0x0500)
  607. typedef struct tagWCRANGE
  608. {
  609.     WCHAR  wcLow;
  610.     USHORT cGlyphs;
  611. } WCRANGE, *PWCRANGE,FAR *LPWCRANGE;
  612. typedef struct tagGLYPHSET
  613. {
  614.     DWORD    cbThis;
  615.     DWORD    flAccel;
  616.     DWORD    cGlyphsSupported;
  617.     DWORD    cRanges;
  618.     WCRANGE  ranges[1];
  619. } GLYPHSET, *PGLYPHSET, FAR *LPGLYPHSET;
  620. /* flAccel flags for the GLYPHSET structure above */
  621. #define GS_8BIT_INDICES     0x00000001
  622. /* flags for GetGlyphIndices */
  623. #define GGI_MARK_NONEXISTING_GLYPHS  0X0001
  624. WINGDIAPI DWORD WINAPI GetFontUnicodeRanges( IN HDC, OUT LPGLYPHSET);
  625. WINGDIAPI DWORD WINAPI GetGlyphIndicesA( IN HDC, IN LPCSTR, IN int, OUT LPWORD, IN DWORD);
  626. WINGDIAPI DWORD WINAPI GetGlyphIndicesW( IN HDC, IN LPCWSTR, IN int, OUT LPWORD, IN DWORD);
  627. #ifdef UNICODE
  628. #define GetGlyphIndices  GetGlyphIndicesW
  629. #else
  630. #define GetGlyphIndices  GetGlyphIndicesA
  631. #endif // !UNICODE
  632. WINGDIAPI BOOL  WINAPI GetTextExtentPointI( IN HDC, IN LPWORD, IN int, OUT LPSIZE);
  633. WINGDIAPI BOOL  WINAPI GetTextExtentExPointI( IN HDC, IN LPWORD, IN int, IN int, OUT LPINT, OUT LPINT, OUT LPSIZE);
  634. WINGDIAPI BOOL  WINAPI GetCharWidthI( IN HDC, IN UINT, IN UINT, IN LPWORD, OUT LPINT);
  635. WINGDIAPI BOOL  WINAPI GetCharABCWidthsI( IN HDC, IN UINT, IN UINT, IN LPWORD, OUT LPABC);
  636. #define STAMP_DESIGNVECTOR  (0x8000000 + 'd' + ('v' << 8))
  637. #define STAMP_AXESLIST      (0x8000000 + 'a' + ('l' << 8))
  638. #define MM_MAX_NUMAXES      16
  639. typedef struct tagDESIGNVECTOR
  640. {
  641.     DWORD  dvReserved;
  642.     DWORD  dvNumAxes;
  643.     LONG   dvValues[MM_MAX_NUMAXES];
  644. } DESIGNVECTOR, *PDESIGNVECTOR, FAR *LPDESIGNVECTOR;
  645. WINGDIAPI int  WINAPI AddFontResourceExA( IN LPCSTR, IN DWORD, IN PVOID);
  646. WINGDIAPI int  WINAPI AddFontResourceExW( IN LPCWSTR, IN DWORD, IN PVOID);
  647. #ifdef UNICODE
  648. #define AddFontResourceEx  AddFontResourceExW
  649. #else
  650. #define AddFontResourceEx  AddFontResourceExA
  651. #endif // !UNICODE
  652. WINGDIAPI BOOL WINAPI RemoveFontResourceExA( IN LPCSTR, IN DWORD, IN PVOID);
  653. WINGDIAPI BOOL WINAPI RemoveFontResourceExW( IN LPCWSTR, IN DWORD, IN PVOID);
  654. #ifdef UNICODE
  655. #define RemoveFontResourceEx  RemoveFontResourceExW
  656. #else
  657. #define RemoveFontResourceEx  RemoveFontResourceExA
  658. #endif // !UNICODE
  659. WINGDIAPI HANDLE WINAPI AddFontMemResourceEx( IN PVOID, IN DWORD, IN PVOID , IN DWORD*);
  660. WINGDIAPI BOOL WINAPI RemoveFontMemResourceEx( IN HANDLE);
  661. #define FR_PRIVATE     0x10
  662. #define FR_NOT_ENUM    0x20
  663. // The actual size of the DESIGNVECTOR and ENUMLOGFONTEXDV structures
  664. // is determined by dvNumAxes,
  665. // MM_MAX_NUMAXES only detemines the maximal size allowed
  666. #define MM_MAX_AXES_NAMELEN 16
  667. typedef struct tagAXISINFOA
  668. {
  669.     LONG   axMinValue;
  670.     LONG   axMaxValue;
  671.     BYTE   axAxisName[MM_MAX_AXES_NAMELEN];
  672. } AXISINFOA, *PAXISINFOA, FAR *LPAXISINFOA;
  673. typedef struct tagAXISINFOW
  674. {
  675.     LONG   axMinValue;
  676.     LONG   axMaxValue;
  677.     WCHAR  axAxisName[MM_MAX_AXES_NAMELEN];
  678. } AXISINFOW, *PAXISINFOW, FAR *LPAXISINFOW;
  679. #ifdef UNICODE
  680. typedef AXISINFOW AXISINFO;
  681. typedef PAXISINFOW PAXISINFO;
  682. typedef LPAXISINFOW LPAXISINFO;
  683. #else
  684. typedef AXISINFOA AXISINFO;
  685. typedef PAXISINFOA PAXISINFO;
  686. typedef LPAXISINFOA LPAXISINFO;
  687. #endif // UNICODE
  688. typedef struct tagAXESLISTA
  689. {
  690.     DWORD     axlReserved;
  691.     DWORD     axlNumAxes;
  692.     AXISINFOA axlAxisInfo[MM_MAX_NUMAXES];
  693. } AXESLISTA, *PAXESLISTA, FAR *LPAXESLISTA;
  694. typedef struct tagAXESLISTW
  695. {
  696.     DWORD     axlReserved;
  697.     DWORD     axlNumAxes;
  698.     AXISINFOW axlAxisInfo[MM_MAX_NUMAXES];
  699. } AXESLISTW, *PAXESLISTW, FAR *LPAXESLISTW;
  700. #ifdef UNICODE
  701. typedef AXESLISTW AXESLIST;
  702. typedef PAXESLISTW PAXESLIST;
  703. typedef LPAXESLISTW LPAXESLIST;
  704. #else
  705. typedef AXESLISTA AXESLIST;
  706. typedef PAXESLISTA PAXESLIST;
  707. typedef LPAXESLISTA LPAXESLIST;
  708. #endif // UNICODE
  709. // The actual size of the AXESLIST and ENUMTEXTMETRIC structure is
  710. // determined by axlNumAxes,
  711. // MM_MAX_NUMAXES only detemines the maximal size allowed
  712. typedef struct tagENUMLOGFONTEXDVA
  713. {
  714.     ENUMLOGFONTEXA elfEnumLogfontEx;
  715.     DESIGNVECTOR   elfDesignVector;
  716. } ENUMLOGFONTEXDVA, *PENUMLOGFONTEXDVA, FAR *LPENUMLOGFONTEXDVA;
  717. typedef struct tagENUMLOGFONTEXDVW
  718. {
  719.     ENUMLOGFONTEXW elfEnumLogfontEx;
  720.     DESIGNVECTOR   elfDesignVector;
  721. } ENUMLOGFONTEXDVW, *PENUMLOGFONTEXDVW, FAR *LPENUMLOGFONTEXDVW;
  722. #ifdef UNICODE
  723. typedef ENUMLOGFONTEXDVW ENUMLOGFONTEXDV;
  724. typedef PENUMLOGFONTEXDVW PENUMLOGFONTEXDV;
  725. typedef LPENUMLOGFONTEXDVW LPENUMLOGFONTEXDV;
  726. #else
  727. typedef ENUMLOGFONTEXDVA ENUMLOGFONTEXDV;
  728. typedef PENUMLOGFONTEXDVA PENUMLOGFONTEXDV;
  729. typedef LPENUMLOGFONTEXDVA LPENUMLOGFONTEXDV;
  730. #endif // UNICODE
  731. WINGDIAPI HFONT  WINAPI CreateFontIndirectExA( IN CONST ENUMLOGFONTEXDVA *);
  732. WINGDIAPI HFONT  WINAPI CreateFontIndirectExW( IN CONST ENUMLOGFONTEXDVW *);
  733. #ifdef UNICODE
  734. #define CreateFontIndirectEx  CreateFontIndirectExW
  735. #else
  736. #define CreateFontIndirectEx  CreateFontIndirectExA
  737. #endif // !UNICODE
  738. #ifndef NOTEXTMETRIC
  739. typedef struct tagENUMTEXTMETRICA
  740. {
  741.     NEWTEXTMETRICEXA etmNewTextMetricEx;
  742.     AXESLISTA        etmAxesList;
  743. } ENUMTEXTMETRICA, *PENUMTEXTMETRICA, FAR *LPENUMTEXTMETRICA;
  744. typedef struct tagENUMTEXTMETRICW
  745. {
  746.     NEWTEXTMETRICEXW etmNewTextMetricEx;
  747.     AXESLISTW        etmAxesList;
  748. } ENUMTEXTMETRICW, *PENUMTEXTMETRICW, FAR *LPENUMTEXTMETRICW;
  749. #ifdef UNICODE
  750. typedef ENUMTEXTMETRICW ENUMTEXTMETRIC;
  751. typedef PENUMTEXTMETRICW PENUMTEXTMETRIC;
  752. typedef LPENUMTEXTMETRICW LPENUMTEXTMETRIC;
  753. #else
  754. typedef ENUMTEXTMETRICA ENUMTEXTMETRIC;
  755. typedef PENUMTEXTMETRICA PENUMTEXTMETRIC;
  756. typedef LPENUMTEXTMETRICA LPENUMTEXTMETRIC;
  757. #endif // UNICODE
  758. #endif /* NOTEXTMETRIC */
  759. #endif // (_WIN32_WINNT >= 0x0500)
  760. WINGDIAPI BOOL  WINAPI GetViewportExtEx( IN HDC, OUT LPSIZE);
  761. WINGDIAPI BOOL  WINAPI GetViewportOrgEx( IN HDC, OUT LPPOINT);
  762. WINGDIAPI BOOL  WINAPI GetWindowExtEx( IN HDC, OUT LPSIZE);
  763. WINGDIAPI BOOL  WINAPI GetWindowOrgEx( IN HDC, OUT LPPOINT);
  764. WINGDIAPI int  WINAPI IntersectClipRect( IN HDC, IN int, IN int, IN int, IN int);
  765. WINGDIAPI BOOL WINAPI InvertRgn( IN HDC, IN HRGN);
  766. WINGDIAPI BOOL WINAPI LineDDA( IN int, IN int, IN int, IN int, IN LINEDDAPROC, IN LPARAM);
  767. WINGDIAPI BOOL WINAPI LineTo( IN HDC, IN int, IN int);
  768. WINGDIAPI BOOL WINAPI MaskBlt( IN HDC, IN int, IN int, IN int, IN int,
  769.               IN HDC, IN int, IN int, IN HBITMAP, IN int, IN int, IN DWORD);
  770. WINGDIAPI BOOL WINAPI PlgBlt( IN HDC, IN CONST POINT *, IN HDC, IN int, IN int, IN int,
  771.                      IN int, IN HBITMAP, IN int, IN int);
  772. WINGDIAPI int  WINAPI OffsetClipRgn(IN HDC, IN int, IN int);
  773. WINGDIAPI int  WINAPI OffsetRgn(IN HRGN, IN int, IN int);
  774. WINGDIAPI BOOL WINAPI PatBlt(IN HDC, IN int, IN int, IN int, IN int, IN DWORD);
  775. WINGDIAPI BOOL WINAPI Pie(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int);
  776. WINGDIAPI BOOL WINAPI PlayMetaFile(IN HDC, IN HMETAFILE);
  777. WINGDIAPI BOOL WINAPI PaintRgn(IN HDC, IN HRGN);
  778. WINGDIAPI BOOL WINAPI PolyPolygon(IN HDC, IN CONST POINT *, IN CONST INT *, IN int);
  779. WINGDIAPI BOOL WINAPI PtInRegion(IN HRGN, IN int, IN int);
  780. WINGDIAPI BOOL WINAPI PtVisible(IN HDC, IN int, IN int);
  781. WINGDIAPI BOOL WINAPI RectInRegion(IN HRGN, IN CONST RECT *);
  782. WINGDIAPI BOOL WINAPI RectVisible(IN HDC, IN CONST RECT *);
  783. WINGDIAPI BOOL WINAPI Rectangle(IN HDC, IN int, IN int, IN int, IN int);
  784. WINGDIAPI BOOL WINAPI RestoreDC(IN HDC, IN int);
  785. WINGDIAPI HDC  WINAPI ResetDCA(IN HDC, IN CONST DEVMODEA *);
  786. WINGDIAPI HDC  WINAPI ResetDCW(IN HDC, IN CONST DEVMODEW *);
  787. #ifdef UNICODE
  788. #define ResetDC  ResetDCW
  789. #else
  790. #define ResetDC  ResetDCA
  791. #endif // !UNICODE
  792. WINGDIAPI UINT WINAPI RealizePalette(IN HDC);
  793. WINGDIAPI BOOL WINAPI RemoveFontResourceA(IN LPCSTR);
  794. WINGDIAPI BOOL WINAPI RemoveFontResourceW(IN LPCWSTR);
  795. #ifdef UNICODE
  796. #define RemoveFontResource  RemoveFontResourceW
  797. #else
  798. #define RemoveFontResource  RemoveFontResourceA
  799. #endif // !UNICODE
  800. WINGDIAPI BOOL  WINAPI RoundRect(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int);
  801. WINGDIAPI BOOL WINAPI ResizePalette(IN HPALETTE, IN UINT);
  802. WINGDIAPI int  WINAPI SaveDC(IN HDC);
  803. WINGDIAPI int  WINAPI SelectClipRgn(IN HDC, IN HRGN);
  804. WINGDIAPI int  WINAPI ExtSelectClipRgn(IN HDC, IN HRGN, IN int);
  805. WINGDIAPI int  WINAPI SetMetaRgn(IN HDC);
  806. WINGDIAPI HGDIOBJ WINAPI SelectObject(IN HDC, IN HGDIOBJ);
  807. WINGDIAPI HPALETTE WINAPI SelectPalette(IN HDC, IN HPALETTE, IN BOOL);
  808. WINGDIAPI COLORREF WINAPI SetBkColor(IN HDC, IN COLORREF);
  809. #if (_WIN32_WINNT >= 0x0500)
  810. WINGDIAPI COLORREF WINAPI SetDCBrushColor(IN HDC, IN COLORREF);
  811. WINGDIAPI COLORREF WINAPI SetDCPenColor(IN HDC, IN COLORREF);
  812. #endif
  813. WINGDIAPI int   WINAPI SetBkMode(IN HDC, IN int);
  814. WINGDIAPI LONG  WINAPI SetBitmapBits(IN HBITMAP, IN DWORD, IN CONST VOID *);
  815. WINGDIAPI UINT  WINAPI SetBoundsRect(IN HDC, IN CONST RECT *, IN UINT);
  816. WINGDIAPI int   WINAPI SetDIBits(IN HDC, IN HBITMAP, IN UINT, IN UINT, IN CONST VOID *, IN CONST BITMAPINFO *, IN UINT);
  817. WINGDIAPI int   WINAPI SetDIBitsToDevice(IN HDC, IN int, IN int, IN DWORD, IN DWORD, IN int,
  818.         IN int, IN UINT, IN UINT, IN CONST VOID *, IN CONST BITMAPINFO *, IN UINT);
  819. WINGDIAPI DWORD WINAPI SetMapperFlags(IN HDC, IN DWORD);
  820. WINGDIAPI int   WINAPI SetGraphicsMode(IN HDC hdc, IN int iMode);
  821. WINGDIAPI int   WINAPI SetMapMode(IN HDC, IN int);
  822. #if(WINVER >= 0x0500)
  823. WINGDIAPI DWORD WINAPI SetLayout(IN HDC, IN DWORD);
  824. WINGDIAPI DWORD WINAPI GetLayout(IN HDC);
  825. #endif /* WINVER >= 0x0500 */
  826. WINGDIAPI HMETAFILE   WINAPI SetMetaFileBitsEx(IN UINT, IN CONST BYTE *);
  827. WINGDIAPI UINT  WINAPI SetPaletteEntries(IN HPALETTE, IN UINT, IN UINT, IN CONST PALETTEENTRY *);
  828. WINGDIAPI COLORREF WINAPI SetPixel(IN HDC, IN int, IN int, IN COLORREF);
  829. WINGDIAPI BOOL   WINAPI SetPixelV(IN HDC, IN int, IN int, IN COLORREF);
  830. WINGDIAPI BOOL  WINAPI SetPixelFormat(IN HDC, IN int, IN CONST PIXELFORMATDESCRIPTOR *);
  831. WINGDIAPI int   WINAPI SetPolyFillMode(IN HDC, IN int);
  832. 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);
  833. WINGDIAPI BOOL   WINAPI SetRectRgn(IN HRGN, IN int, IN int, IN int, IN int);
  834. WINGDIAPI int   WINAPI StretchDIBits(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN CONST
  835.         VOID *, IN CONST BITMAPINFO *, IN UINT, IN DWORD);
  836. WINGDIAPI int   WINAPI SetROP2(IN HDC, IN int);
  837. WINGDIAPI int   WINAPI SetStretchBltMode(IN HDC, IN int);
  838. WINGDIAPI UINT  WINAPI SetSystemPaletteUse(IN HDC, IN UINT);
  839. WINGDIAPI int   WINAPI SetTextCharacterExtra(IN HDC, IN int);
  840. WINGDIAPI COLORREF WINAPI SetTextColor(IN HDC, IN COLORREF);
  841. WINGDIAPI UINT  WINAPI SetTextAlign(IN HDC, IN UINT);
  842. WINGDIAPI BOOL  WINAPI SetTextJustification(IN HDC, IN int, IN int);
  843. WINGDIAPI BOOL  WINAPI UpdateColors(IN HDC);
  844. #if (WINVER >= 0x0400)
  845. //
  846. // image blt
  847. //
  848. typedef USHORT COLOR16;
  849. typedef struct _TRIVERTEX
  850. {
  851.     LONG    x;
  852.     LONG    y;
  853.     COLOR16 Red;
  854.     COLOR16 Green;
  855.     COLOR16 Blue;
  856.     COLOR16 Alpha;
  857. }TRIVERTEX,*PTRIVERTEX,*LPTRIVERTEX;
  858. typedef struct _GRADIENT_TRIANGLE
  859. {
  860.     ULONG Vertex1;
  861.     ULONG Vertex2;
  862.     ULONG Vertex3;
  863. } GRADIENT_TRIANGLE,*PGRADIENT_TRIANGLE,*LPGRADIENT_TRIANGLE;
  864. typedef struct _GRADIENT_RECT
  865. {
  866.     ULONG UpperLeft;
  867.     ULONG LowerRight;
  868. }GRADIENT_RECT,*PGRADIENT_RECT,*LPGRADIENT_RECT;
  869. typedef struct _BLENDFUNCTION
  870. {
  871.     BYTE   BlendOp;
  872.     BYTE   BlendFlags;
  873.     BYTE   SourceConstantAlpha;
  874.     BYTE   AlphaFormat;
  875. }BLENDFUNCTION,*PBLENDFUNCTION;
  876. //
  877. // currentlly defined blend function
  878. //
  879. #define AC_SRC_OVER                 0x00
  880. //
  881. // alpha format flags
  882. //
  883. #define AC_SRC_ALPHA                0x01
  884. 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);
  885. 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);
  886. //
  887. // gradient drawing modes
  888. //
  889. #define GRADIENT_FILL_RECT_H    0x00000000
  890. #define GRADIENT_FILL_RECT_V    0x00000001
  891. #define GRADIENT_FILL_TRIANGLE  0x00000002
  892. #define GRADIENT_FILL_OP_FLAG   0x000000ff
  893. WINGDIAPI BOOL  WINAPI GradientFill( IN HDC, IN PTRIVERTEX, IN ULONG, IN PVOID, IN ULONG, IN ULONG);
  894. #endif
  895. #ifndef NOMETAFILE
  896. WINGDIAPI BOOL  WINAPI PlayMetaFileRecord( IN HDC, IN LPHANDLETABLE, IN LPMETARECORD, IN UINT);
  897. typedef int (CALLBACK* MFENUMPROC)( IN HDC, IN HANDLETABLE FAR*, IN METARECORD FAR*, IN int, IN LPARAM);
  898. WINGDIAPI BOOL  WINAPI EnumMetaFile(  IN HDC, IN HMETAFILE, IN MFENUMPROC, IN LPARAM);
  899. typedef int (CALLBACK* ENHMFENUMPROC)(HDC, HANDLETABLE FAR*, CONST ENHMETARECORD *, int, LPARAM);
  900. // Enhanced Metafile Function Declarations
  901. WINGDIAPI HENHMETAFILE WINAPI CloseEnhMetaFile( IN HDC);
  902. WINGDIAPI HENHMETAFILE WINAPI CopyEnhMetaFileA( IN HENHMETAFILE, IN LPCSTR);
  903. WINGDIAPI HENHMETAFILE WINAPI CopyEnhMetaFileW( IN HENHMETAFILE, IN LPCWSTR);
  904. #ifdef UNICODE
  905. #define CopyEnhMetaFile  CopyEnhMetaFileW
  906. #else
  907. #define CopyEnhMetaFile  CopyEnhMetaFileA
  908. #endif // !UNICODE
  909. WINGDIAPI HDC   WINAPI CreateEnhMetaFileA( IN HDC, IN LPCSTR, IN CONST RECT *, IN LPCSTR);
  910. WINGDIAPI HDC   WINAPI CreateEnhMetaFileW( IN HDC, IN LPCWSTR, IN CONST RECT *, IN LPCWSTR);
  911. #ifdef UNICODE
  912. #define CreateEnhMetaFile  CreateEnhMetaFileW
  913. #else
  914. #define CreateEnhMetaFile  CreateEnhMetaFileA
  915. #endif // !UNICODE
  916. WINGDIAPI BOOL  WINAPI DeleteEnhMetaFile( IN HENHMETAFILE);
  917. WINGDIAPI BOOL  WINAPI EnumEnhMetaFile( IN HDC, IN HENHMETAFILE, IN ENHMFENUMPROC,
  918.                                         IN LPVOID, IN CONST RECT *);
  919. WINGDIAPI HENHMETAFILE  WINAPI GetEnhMetaFileA( IN LPCSTR);
  920. WINGDIAPI HENHMETAFILE  WINAPI GetEnhMetaFileW( IN LPCWSTR);
  921. #ifdef UNICODE
  922. #define GetEnhMetaFile  GetEnhMetaFileW
  923. #else
  924. #define GetEnhMetaFile  GetEnhMetaFileA
  925. #endif // !UNICODE
  926. WINGDIAPI UINT  WINAPI GetEnhMetaFileBits( IN HENHMETAFILE, IN UINT, OUT LPBYTE);
  927. WINGDIAPI UINT  WINAPI GetEnhMetaFileDescriptionA( IN HENHMETAFILE, IN UINT,  OUT LPSTR );
  928. WINGDIAPI UINT  WINAPI GetEnhMetaFileDescriptionW( IN HENHMETAFILE, IN UINT,  OUT LPWSTR );
  929. #ifdef UNICODE
  930. #define GetEnhMetaFileDescription  GetEnhMetaFileDescriptionW
  931. #else
  932. #define GetEnhMetaFileDescription  GetEnhMetaFileDescriptionA
  933. #endif // !UNICODE
  934. WINGDIAPI UINT  WINAPI GetEnhMetaFileHeader( IN HENHMETAFILE, IN UINT, OUT LPENHMETAHEADER );
  935. WINGDIAPI UINT  WINAPI GetEnhMetaFilePaletteEntries( IN HENHMETAFILE, IN UINT, OUT LPPALETTEENTRY );
  936. WINGDIAPI UINT  WINAPI GetEnhMetaFilePixelFormat( IN HENHMETAFILE, IN UINT,
  937.                                                   OUT PIXELFORMATDESCRIPTOR *);
  938. WINGDIAPI UINT  WINAPI GetWinMetaFileBits( IN HENHMETAFILE, IN UINT, OUT LPBYTE, IN INT, IN HDC);
  939. WINGDIAPI BOOL  WINAPI PlayEnhMetaFile( IN HDC, IN HENHMETAFILE, IN CONST RECT *);
  940. WINGDIAPI BOOL  WINAPI PlayEnhMetaFileRecord( IN HDC, IN LPHANDLETABLE, IN CONST ENHMETARECORD *, IN UINT);
  941. WINGDIAPI HENHMETAFILE  WINAPI SetEnhMetaFileBits( IN UINT, IN CONST BYTE *);
  942. WINGDIAPI HENHMETAFILE  WINAPI SetWinMetaFileBits( IN UINT, IN CONST BYTE *, IN HDC, IN CONST METAFILEPICT *);
  943. WINGDIAPI BOOL  WINAPI GdiComment( IN HDC, IN UINT, IN CONST BYTE *);
  944. #endif  /* NOMETAFILE */
  945. #ifndef NOTEXTMETRIC
  946. WINGDIAPI BOOL WINAPI GetTextMetricsA( IN HDC, OUT LPTEXTMETRICA);
  947. WINGDIAPI BOOL WINAPI GetTextMetricsW( IN HDC, OUT LPTEXTMETRICW);
  948. #ifdef UNICODE
  949. #define GetTextMetrics  GetTextMetricsW
  950. #else
  951. #define GetTextMetrics  GetTextMetricsA
  952. #endif // !UNICODE
  953. #endif
  954. /* new GDI */
  955. typedef struct tagDIBSECTION {
  956.     BITMAP              dsBm;
  957.     BITMAPINFOHEADER    dsBmih;
  958.     DWORD               dsBitfields[3];
  959.     HANDLE              dshSection;
  960.     DWORD               dsOffset;
  961. } DIBSECTION, FAR *LPDIBSECTION, *PDIBSECTION;
  962. WINGDIAPI BOOL WINAPI AngleArc( IN HDC, IN int, IN int, IN DWORD, IN FLOAT, IN FLOAT);
  963. WINGDIAPI BOOL WINAPI PolyPolyline( IN HDC, IN CONST POINT *, IN CONST DWORD *, IN DWORD);
  964. WINGDIAPI BOOL WINAPI GetWorldTransform( IN HDC, OUT LPXFORM);
  965. WINGDIAPI BOOL WINAPI SetWorldTransform( IN HDC, IN CONST XFORM *);
  966. WINGDIAPI BOOL WINAPI ModifyWorldTransform( IN HDC, IN CONST XFORM *, IN DWORD);
  967. WINGDIAPI BOOL WINAPI CombineTransform( OUT LPXFORM, IN CONST XFORM *, IN CONST XFORM *);
  968. WINGDIAPI HBITMAP WINAPI CreateDIBSection( IN HDC, IN CONST BITMAPINFO *, IN UINT, OUT VOID **, IN HANDLE, IN DWORD);
  969. WINGDIAPI UINT WINAPI GetDIBColorTable( IN HDC, IN UINT, IN UINT, OUT RGBQUAD *);
  970. WINGDIAPI UINT WINAPI SetDIBColorTable( IN HDC, IN UINT, IN UINT, IN CONST RGBQUAD *);
  971. /* Flags value for COLORADJUSTMENT */
  972. #define CA_NEGATIVE                 0x0001
  973. #define CA_LOG_FILTER               0x0002
  974. /* IlluminantIndex values */
  975. #define ILLUMINANT_DEVICE_DEFAULT   0
  976. #define ILLUMINANT_A                1
  977. #define ILLUMINANT_B                2
  978. #define ILLUMINANT_C                3
  979. #define ILLUMINANT_D50              4
  980. #define ILLUMINANT_D55              5
  981. #define ILLUMINANT_D65              6
  982. #define ILLUMINANT_D75              7
  983. #define ILLUMINANT_F2               8
  984. #define ILLUMINANT_MAX_INDEX        ILLUMINANT_F2
  985. #define ILLUMINANT_TUNGSTEN         ILLUMINANT_A
  986. #define ILLUMINANT_DAYLIGHT         ILLUMINANT_C
  987. #define ILLUMINANT_FLUORESCENT      ILLUMINANT_F2
  988. #define ILLUMINANT_NTSC             ILLUMINANT_C
  989. /* Min and max for RedGamma, GreenGamma, BlueGamma */
  990. #define RGB_GAMMA_MIN               (WORD)02500
  991. #define RGB_GAMMA_MAX               (WORD)65000
  992. /* Min and max for ReferenceBlack and ReferenceWhite */
  993. #define REFERENCE_WHITE_MIN         (WORD)6000
  994. #define REFERENCE_WHITE_MAX         (WORD)10000
  995. #define REFERENCE_BLACK_MIN         (WORD)0
  996. #define REFERENCE_BLACK_MAX         (WORD)4000
  997. /* Min and max for Contrast, Brightness, Colorfulness, RedGreenTint */
  998. #define COLOR_ADJ_MIN               (SHORT)-100
  999. #define COLOR_ADJ_MAX               (SHORT)100
  1000. typedef struct  tagCOLORADJUSTMENT {
  1001.     WORD   caSize;
  1002.     WORD   caFlags;
  1003.     WORD   caIlluminantIndex;
  1004.     WORD   caRedGamma;
  1005.     WORD   caGreenGamma;
  1006.     WORD   caBlueGamma;
  1007.     WORD   caReferenceBlack;
  1008.     WORD   caReferenceWhite;
  1009.     SHORT  caContrast;
  1010.     SHORT  caBrightness;
  1011.     SHORT  caColorfulness;
  1012.     SHORT  caRedGreenTint;
  1013. } COLORADJUSTMENT, *PCOLORADJUSTMENT, FAR *LPCOLORADJUSTMENT;
  1014. WINGDIAPI BOOL WINAPI SetColorAdjustment( IN HDC, IN CONST COLORADJUSTMENT *);
  1015. WINGDIAPI BOOL WINAPI GetColorAdjustment( IN HDC, OUT LPCOLORADJUSTMENT);
  1016. WINGDIAPI HPALETTE WINAPI CreateHalftonePalette( IN HDC);
  1017. #ifdef STRICT
  1018. typedef BOOL (CALLBACK* ABORTPROC)( IN HDC, IN int);
  1019. #else
  1020. typedef FARPROC ABORTPROC;
  1021. #endif
  1022. typedef struct _DOCINFOA {
  1023.     int     cbSize;
  1024.     LPCSTR   lpszDocName;
  1025.     LPCSTR   lpszOutput;
  1026. #if (WINVER >= 0x0400)
  1027.     LPCSTR   lpszDatatype;
  1028.     DWORD    fwType;
  1029. #endif /* WINVER */
  1030. } DOCINFOA, *LPDOCINFOA;
  1031. typedef struct _DOCINFOW {
  1032.     int     cbSize;
  1033.     LPCWSTR  lpszDocName;
  1034.     LPCWSTR  lpszOutput;
  1035. #if (WINVER >= 0x0400)
  1036.     LPCWSTR  lpszDatatype;
  1037.     DWORD    fwType;
  1038. #endif /* WINVER */
  1039. } DOCINFOW, *LPDOCINFOW;
  1040. #ifdef UNICODE
  1041. typedef DOCINFOW DOCINFO;
  1042. typedef LPDOCINFOW LPDOCINFO;
  1043. #else
  1044. typedef DOCINFOA DOCINFO;
  1045. typedef LPDOCINFOA LPDOCINFO;
  1046. #endif // UNICODE
  1047. #if(WINVER >= 0x0400)
  1048. #define DI_APPBANDING               0x00000001
  1049. #define DI_ROPS_READ_DESTINATION    0x00000002
  1050. #endif /* WINVER >= 0x0400 */
  1051. WINGDIAPI int WINAPI StartDocA(IN HDC, IN CONST DOCINFOA *);
  1052. WINGDIAPI int WINAPI StartDocW(IN HDC, IN CONST DOCINFOW *);
  1053. #ifdef UNICODE
  1054. #define StartDoc  StartDocW
  1055. #else
  1056. #define StartDoc  StartDocA
  1057. #endif // !UNICODE
  1058. WINGDIAPI int WINAPI EndDoc(IN HDC);
  1059. WINGDIAPI int WINAPI StartPage(IN HDC);
  1060. WINGDIAPI int WINAPI EndPage(IN HDC);
  1061. WINGDIAPI int WINAPI AbortDoc(IN HDC);
  1062. WINGDIAPI int WINAPI SetAbortProc(IN HDC, IN ABORTPROC);
  1063. WINGDIAPI BOOL WINAPI AbortPath(IN HDC);
  1064. WINGDIAPI BOOL WINAPI ArcTo(IN HDC, IN int, IN int, IN int, IN int, IN int, IN int, IN int, IN int);
  1065. WINGDIAPI BOOL WINAPI BeginPath(IN HDC);
  1066. WINGDIAPI BOOL WINAPI CloseFigure(IN HDC);
  1067. WINGDIAPI BOOL WINAPI EndPath(IN HDC);
  1068. WINGDIAPI BOOL WINAPI FillPath(IN HDC);
  1069. WINGDIAPI BOOL WINAPI FlattenPath(IN HDC);
  1070. WINGDIAPI int  WINAPI GetPath(IN HDC, OUT LPPOINT, OUT LPBYTE, IN int);
  1071. WINGDIAPI HRGN WINAPI PathToRegion(IN HDC);
  1072. WINGDIAPI BOOL WINAPI PolyDraw(IN HDC, IN CONST POINT *, IN CONST BYTE *, IN int);
  1073. WINGDIAPI BOOL WINAPI SelectClipPath(IN HDC, IN int);
  1074. WINGDIAPI int  WINAPI SetArcDirection(IN HDC, IN int);
  1075. WINGDIAPI BOOL WINAPI SetMiterLimit(IN HDC, IN FLOAT, OUT PFLOAT);
  1076. WINGDIAPI BOOL WINAPI StrokeAndFillPath(IN HDC);
  1077. WINGDIAPI BOOL WINAPI StrokePath(IN HDC);
  1078. WINGDIAPI BOOL WINAPI WidenPath(IN HDC);
  1079. WINGDIAPI HPEN WINAPI ExtCreatePen(IN DWORD, IN DWORD, IN CONST LOGBRUSH *, IN DWORD, IN CONST DWORD *);
  1080. WINGDIAPI BOOL WINAPI GetMiterLimit(IN HDC, OUT PFLOAT);
  1081. WINGDIAPI int  WINAPI GetArcDirection(IN HDC);
  1082. WINGDIAPI int   WINAPI GetObjectA( IN HGDIOBJ, IN int, OUT LPVOID);
  1083. WINGDIAPI int   WINAPI GetObjectW( IN HGDIOBJ, IN int, OUT LPVOID);
  1084. #ifdef UNICODE
  1085. #define GetObject  GetObjectW
  1086. #else
  1087. #define GetObject  GetObjectA
  1088. #endif // !UNICODE
  1089. WINGDIAPI BOOL  WINAPI MoveToEx( IN HDC, IN int, IN int, OUT LPPOINT);
  1090. WINGDIAPI BOOL  WINAPI TextOutA( IN HDC, IN int, IN int, IN LPCSTR, IN int);
  1091. WINGDIAPI BOOL  WINAPI TextOutW( IN HDC, IN int, IN int, IN LPCWSTR, IN int);
  1092. #ifdef UNICODE
  1093. #define TextOut  TextOutW
  1094. #else
  1095. #define TextOut  TextOutA
  1096. #endif // !UNICODE
  1097. WINGDIAPI BOOL  WINAPI ExtTextOutA( IN HDC, IN int, IN int, IN UINT, IN CONST RECT *, IN LPCSTR, IN UINT, IN CONST INT *);
  1098. WINGDIAPI BOOL  WINAPI ExtTextOutW( IN HDC, IN int, IN int, IN UINT, IN CONST RECT *, IN LPCWSTR, IN UINT, IN CONST INT *);
  1099. #ifdef UNICODE
  1100. #define ExtTextOut  ExtTextOutW
  1101. #else
  1102. #define ExtTextOut  ExtTextOutA
  1103. #endif // !UNICODE
  1104. WINGDIAPI BOOL  WINAPI PolyTextOutA( IN HDC, IN CONST POLYTEXTA *, IN int);
  1105. WINGDIAPI BOOL  WINAPI PolyTextOutW( IN HDC, IN CONST POLYTEXTW *, IN int);
  1106. #ifdef UNICODE
  1107. #define PolyTextOut  PolyTextOutW
  1108. #else
  1109. #define PolyTextOut  PolyTextOutA
  1110. #endif // !UNICODE
  1111. WINGDIAPI HRGN  WINAPI CreatePolygonRgn( IN CONST POINT *, IN int, IN int);
  1112. WINGDIAPI BOOL  WINAPI DPtoLP( IN HDC, IN OUT LPPOINT, IN int);
  1113. WINGDIAPI BOOL  WINAPI LPtoDP( IN HDC, IN OUT LPPOINT, IN int);
  1114. WINGDIAPI BOOL  WINAPI Polygon( IN HDC, IN CONST POINT *, IN int);
  1115. WINGDIAPI BOOL  WINAPI Polyline( IN HDC, IN CONST POINT *, IN int);
  1116. WINGDIAPI BOOL  WINAPI PolyBezier( IN HDC, IN CONST POINT *, IN DWORD);
  1117. WINGDIAPI BOOL  WINAPI PolyBezierTo( IN HDC, IN CONST POINT *, IN DWORD);
  1118. WINGDIAPI BOOL  WINAPI PolylineTo( IN HDC, IN CONST POINT *, IN DWORD);
  1119. WINGDIAPI BOOL  WINAPI SetViewportExtEx( IN HDC, IN int, IN int, OUT LPSIZE);
  1120. WINGDIAPI BOOL  WINAPI SetViewportOrgEx( IN HDC, IN int, IN int, OUT LPPOINT);
  1121. WINGDIAPI BOOL  WINAPI SetWindowExtEx( IN HDC, IN int, IN int, OUT LPSIZE);
  1122. WINGDIAPI BOOL  WINAPI SetWindowOrgEx( IN HDC, IN int, IN int, OUT LPPOINT);
  1123. WINGDIAPI BOOL  WINAPI OffsetViewportOrgEx( IN HDC, IN int, IN int, OUT LPPOINT);
  1124. WINGDIAPI BOOL  WINAPI OffsetWindowOrgEx( IN HDC, IN int, IN int, OUT LPPOINT);
  1125. WINGDIAPI BOOL  WINAPI ScaleViewportExtEx( IN HDC, IN int, IN int, IN int, IN int, OUT LPSIZE);
  1126. WINGDIAPI BOOL  WINAPI ScaleWindowExtEx( IN HDC, IN int, IN int, IN int, IN int, OUT LPSIZE);
  1127. WINGDIAPI BOOL  WINAPI SetBitmapDimensionEx( IN HBITMAP, IN int, IN int, OUT LPSIZE);
  1128. WINGDIAPI BOOL  WINAPI SetBrushOrgEx( IN HDC, IN int, IN int, OUT LPPOINT);
  1129. WINGDIAPI int   WINAPI GetTextFaceA( IN HDC, IN int, OUT LPSTR);
  1130. WINGDIAPI int   WINAPI GetTextFaceW( IN HDC, IN int, OUT LPWSTR);
  1131. #ifdef UNICODE
  1132. #define GetTextFace  GetTextFaceW
  1133. #else
  1134. #define GetTextFace  GetTextFaceA
  1135. #endif // !UNICODE
  1136. #define FONTMAPPER_MAX 10
  1137. typedef struct tagKERNINGPAIR {
  1138.    WORD wFirst;
  1139.    WORD wSecond;
  1140.    int  iKernAmount;
  1141. } KERNINGPAIR, *LPKERNINGPAIR;
  1142. WINGDIAPI DWORD WINAPI GetKerningPairsA( IN HDC, IN DWORD, OUT LPKERNINGPAIR);
  1143. WINGDIAPI DWORD WINAPI GetKerningPairsW( IN HDC, IN DWORD, OUT LPKERNINGPAIR);
  1144. #ifdef UNICODE
  1145. #define GetKerningPairs  GetKerningPairsW
  1146. #else
  1147. #define GetKerningPairs  GetKerningPairsA
  1148. #endif // !UNICODE
  1149. WINGDIAPI BOOL  WINAPI GetDCOrgEx( IN HDC, OUT LPPOINT);
  1150. WINGDIAPI BOOL  WINAPI FixBrushOrgEx( IN HDC, IN int, IN int, IN LPPOINT);
  1151. WINGDIAPI BOOL  WINAPI UnrealizeObject( IN HGDIOBJ);
  1152. WINGDIAPI BOOL  WINAPI GdiFlush();
  1153. WINGDIAPI DWORD WINAPI GdiSetBatchLimit( IN DWORD);
  1154. WINGDIAPI DWORD WINAPI GdiGetBatchLimit();
  1155. #if(WINVER >= 0x0400)
  1156. #define ICM_OFF               1
  1157. #define ICM_ON                2
  1158. #define ICM_QUERY             3
  1159. #define ICM_DONE_OUTSIDEDC    4
  1160. typedef int (CALLBACK* ICMENUMPROCA)(LPSTR, LPARAM);
  1161. typedef int (CALLBACK* ICMENUMPROCW)(LPWSTR, LPARAM);
  1162. #ifdef UNICODE
  1163. #define ICMENUMPROC  ICMENUMPROCW
  1164. #else
  1165. #define ICMENUMPROC  ICMENUMPROCA
  1166. #endif // !UNICODE
  1167. WINGDIAPI int         WINAPI SetICMMode( IN HDC, IN int);
  1168. WINGDIAPI BOOL        WINAPI CheckColorsInGamut( IN HDC, IN LPVOID, OUT LPVOID, IN DWORD);
  1169. WINGDIAPI HCOLORSPACE WINAPI GetColorSpace( IN HDC);
  1170. WINGDIAPI BOOL        WINAPI GetLogColorSpaceA( IN HCOLORSPACE, OUT LPLOGCOLORSPACEA, IN DWORD);
  1171. WINGDIAPI BOOL        WINAPI GetLogColorSpaceW( IN HCOLORSPACE, OUT LPLOGCOLORSPACEW, IN DWORD);
  1172. #ifdef UNICODE
  1173. #define GetLogColorSpace  GetLogColorSpaceW
  1174. #else
  1175. #define GetLogColorSpace  GetLogColorSpaceA
  1176. #endif // !UNICODE
  1177. WINGDIAPI HCOLORSPACE WINAPI CreateColorSpaceA( IN LPLOGCOLORSPACEA);
  1178. WINGDIAPI HCOLORSPACE WINAPI CreateColorSpaceW( IN LPLOGCOLORSPACEW);
  1179. #ifdef UNICODE
  1180. #define CreateColorSpace  CreateColorSpaceW
  1181. #else
  1182. #define CreateColorSpace  CreateColorSpaceA
  1183. #endif // !UNICODE
  1184. WINGDIAPI HCOLORSPACE WINAPI SetColorSpace( IN HDC, IN HCOLORSPACE);
  1185. WINGDIAPI BOOL        WINAPI DeleteColorSpace( IN HCOLORSPACE);
  1186. WINGDIAPI BOOL        WINAPI GetICMProfileA( IN HDC, IN OUT LPDWORD, OUT LPSTR);
  1187. WINGDIAPI BOOL        WINAPI GetICMProfileW( IN HDC, IN OUT LPDWORD, OUT LPWSTR);
  1188. #ifdef UNICODE
  1189. #define GetICMProfile  GetICMProfileW
  1190. #else
  1191. #define GetICMProfile  GetICMProfileA
  1192. #endif // !UNICODE
  1193. WINGDIAPI BOOL        WINAPI SetICMProfileA( IN HDC, IN LPSTR);
  1194. WINGDIAPI BOOL        WINAPI SetICMProfileW( IN HDC, IN LPWSTR);
  1195. #ifdef UNICODE
  1196. #define SetICMProfile  SetICMProfileW
  1197. #else
  1198. #define SetICMProfile  SetICMProfileA
  1199. #endif // !UNICODE
  1200. WINGDIAPI BOOL        WINAPI GetDeviceGammaRamp( IN HDC, OUT LPVOID);
  1201. WINGDIAPI BOOL        WINAPI SetDeviceGammaRamp( IN HDC, IN LPVOID);
  1202. WINGDIAPI BOOL        WINAPI ColorMatchToTarget( IN HDC, IN HDC, IN DWORD);
  1203. WINGDIAPI int         WINAPI EnumICMProfilesA( IN HDC, IN ICMENUMPROCA, IN LPARAM);
  1204. WINGDIAPI int         WINAPI EnumICMProfilesW( IN HDC, IN ICMENUMPROCW, IN LPARAM);
  1205. #ifdef UNICODE
  1206. #define EnumICMProfiles  EnumICMProfilesW
  1207. #else
  1208. #define EnumICMProfiles  EnumICMProfilesA
  1209. #endif // !UNICODE
  1210. WINGDIAPI BOOL        WINAPI UpdateICMRegKeyA( IN DWORD, IN LPSTR, IN LPSTR, IN UINT);
  1211. WINGDIAPI BOOL        WINAPI UpdateICMRegKeyW( IN DWORD, IN LPWSTR, IN LPWSTR, IN UINT);
  1212. #ifdef UNICODE
  1213. #define UpdateICMRegKey  UpdateICMRegKeyW
  1214. #else
  1215. #define UpdateICMRegKey  UpdateICMRegKeyA
  1216. #endif // !UNICODE
  1217. #endif /* WINVER >= 0x0400 */
  1218. #if (WINVER >= 0x0500)
  1219. WINGDIAPI BOOL        WINAPI ColorCorrectPalette( IN HDC, IN HPALETTE, IN DWORD, IN DWORD);
  1220. #endif
  1221. #ifndef NOMETAFILE
  1222. // Enhanced metafile constants.
  1223. #ifndef _MAC
  1224. #define ENHMETA_SIGNATURE       0x464D4520
  1225. #else
  1226. #define ENHMETA_SIGNATURE       0x20454D46
  1227. #endif
  1228. // Stock object flag used in the object handle index in the enhanced
  1229. // metafile records.
  1230. // E.g. The object handle index (META_STOCK_OBJECT | BLACK_BRUSH)
  1231. // represents the stock object BLACK_BRUSH.
  1232. #define ENHMETA_STOCK_OBJECT    0x80000000
  1233. // Enhanced metafile record types.
  1234. #define EMR_HEADER                      1
  1235. #define EMR_POLYBEZIER                  2
  1236. #define EMR_POLYGON                     3
  1237. #define EMR_POLYLINE                    4
  1238. #define EMR_POLYBEZIERTO                5
  1239. #define EMR_POLYLINETO                  6
  1240. #define EMR_POLYPOLYLINE                7
  1241. #define EMR_POLYPOLYGON                 8
  1242. #define EMR_SETWINDOWEXTEX              9
  1243. #define EMR_SETWINDOWORGEX              10
  1244. #define EMR_SETVIEWPORTEXTEX            11
  1245. #define EMR_SETVIEWPORTORGEX            12
  1246. #define EMR_SETBRUSHORGEX               13
  1247. #define EMR_EOF                         14
  1248. #define EMR_SETPIXELV                   15
  1249. #define EMR_SETMAPPERFLAGS              16
  1250. #define EMR_SETMAPMODE                  17
  1251. #define EMR_SETBKMODE                   18
  1252. #define EMR_SETPOLYFILLMODE             19
  1253. #define EMR_SETROP2                     20
  1254. #define EMR_SETSTRETCHBLTMODE           21
  1255. #define EMR_SETTEXTALIGN                22
  1256. #define EMR_SETCOLORADJUSTMENT          23
  1257. #define EMR_SETTEXTCOLOR                24
  1258. #define EMR_SETBKCOLOR                  25
  1259. #define EMR_OFFSETCLIPRGN               26
  1260. #define EMR_MOVETOEX                    27
  1261. #define EMR_SETMETARGN                  28
  1262. #define EMR_EXCLUDECLIPRECT             29
  1263. #define EMR_INTERSECTCLIPRECT           30
  1264. #define EMR_SCALEVIEWPORTEXTEX          31
  1265. #define EMR_SCALEWINDOWEXTEX            32
  1266. #define EMR_SAVEDC                      33
  1267. #define EMR_RESTOREDC                   34
  1268. #define EMR_SETWORLDTRANSFORM           35
  1269. #define EMR_MODIFYWORLDTRANSFORM        36
  1270. #define EMR_SELECTOBJECT                37
  1271. #define EMR_CREATEPEN                   38
  1272. #define EMR_CREATEBRUSHINDIRECT         39
  1273. #define EMR_DELETEOBJECT                40
  1274. #define EMR_ANGLEARC                    41
  1275. #define EMR_ELLIPSE                     42
  1276. #define EMR_RECTANGLE                   43
  1277. #define EMR_ROUNDRECT                   44
  1278. #define EMR_ARC                         45
  1279. #define EMR_CHORD                       46
  1280. #define EMR_PIE                         47
  1281. #define EMR_SELECTPALETTE               48
  1282. #define EMR_CREATEPALETTE               49
  1283. #define EMR_SETPALETTEENTRIES           50
  1284. #define EMR_RESIZEPALETTE               51
  1285. #define EMR_REALIZEPALETTE              52
  1286. #define EMR_EXTFLOODFILL                53
  1287. #define EMR_LINETO                      54
  1288. #define EMR_ARCTO                       55
  1289. #define EMR_POLYDRAW                    56
  1290. #define EMR_SETARCDIRECTION             57
  1291. #define EMR_SETMITERLIMIT               58
  1292. #define EMR_BEGINPATH                   59
  1293. #define EMR_ENDPATH                     60
  1294. #define EMR_CLOSEFIGURE                 61
  1295. #define EMR_FILLPATH                    62
  1296. #define EMR_STROKEANDFILLPATH           63
  1297. #define EMR_STROKEPATH                  64
  1298. #define EMR_FLATTENPATH                 65
  1299. #define EMR_WIDENPATH                   66
  1300. #define EMR_SELECTCLIPPATH              67
  1301. #define EMR_ABORTPATH                   68
  1302. #define EMR_GDICOMMENT                  70
  1303. #define EMR_FILLRGN                     71
  1304. #define EMR_FRAMERGN                    72
  1305. #define EMR_INVERTRGN                   73
  1306. #define EMR_PAINTRGN                    74
  1307. #define EMR_EXTSELECTCLIPRGN            75
  1308. #define EMR_BITBLT                      76
  1309. #define EMR_STRETCHBLT                  77
  1310. #define EMR_MASKBLT                     78
  1311. #define EMR_PLGBLT                      79
  1312. #define EMR_SETDIBITSTODEVICE           80
  1313. #define EMR_STRETCHDIBITS               81
  1314. #define EMR_EXTCREATEFONTINDIRECTW      82
  1315. #define EMR_EXTTEXTOUTA                 83
  1316. #define EMR_EXTTEXTOUTW                 84
  1317. #define EMR_POLYBEZIER16                85
  1318. #define EMR_POLYGON16                   86
  1319. #define EMR_POLYLINE16                  87
  1320. #define EMR_POLYBEZIERTO16              88
  1321. #define EMR_POLYLINETO16                89
  1322. #define EMR_POLYPOLYLINE16              90
  1323. #define EMR_POLYPOLYGON16               91
  1324. #define EMR_POLYDRAW16                  92
  1325. #define EMR_CREATEMONOBRUSH             93
  1326. #define EMR_CREATEDIBPATTERNBRUSHPT     94
  1327. #define EMR_EXTCREATEPEN                95
  1328. #define EMR_POLYTEXTOUTA                96
  1329. #define EMR_POLYTEXTOUTW                97
  1330. #if(WINVER >= 0x0400)
  1331. #define EMR_SETICMMODE                  98
  1332. #define EMR_CREATECOLORSPACE            99
  1333. #define EMR_SETCOLORSPACE              100
  1334. #define EMR_DELETECOLORSPACE           101
  1335. #define EMR_GLSRECORD                  102
  1336. #define EMR_GLSBOUNDEDRECORD           103
  1337. #define EMR_PIXELFORMAT                104
  1338. #endif /* WINVER >= 0x0400 */
  1339. #if(WINVER >= 0x0500)
  1340. #define EMR_RESERVED_105               105
  1341. #define EMR_RESERVED_106               106
  1342. #define EMR_RESERVED_107               107
  1343. #define EMR_RESERVED_108               108
  1344. #define EMR_RESERVED_109               109
  1345. #define EMR_RESERVED_110               110
  1346. #define EMR_COLORCORRECTPALETTE        111
  1347. #define EMR_SETICMPROFILEA             112
  1348. #define EMR_SETICMPROFILEW             113
  1349. #define EMR_ALPHABLEND                 114
  1350. #define EMR_SETLAYOUT                  115
  1351. #define EMR_TRANSPARENTBLT             116
  1352. #define EMR_RESERVED_117               117
  1353. #define EMR_GRADIENTFILL               118
  1354. #define EMR_RESERVED_119               119
  1355. #define EMR_RESERVED_120               120
  1356. #define EMR_COLORMATCHTOTARGETW        121
  1357. #define EMR_CREATECOLORSPACEW          122
  1358. #endif /* WINVER >= 0x0500 */
  1359. #define EMR_MIN                          1
  1360. #if (WINVER >= 0x0500)
  1361. #define EMR_MAX                        122
  1362. #elif (WINVER >= 0x0400)
  1363. #define EMR_MAX                        104
  1364. #else
  1365. #define EMR_MAX                         97
  1366. #endif
  1367. // Base record type for the enhanced metafile.
  1368. typedef struct tagEMR
  1369. {
  1370.     DWORD   iType;              // Enhanced metafile record type
  1371.     DWORD   nSize;              // Length of the record in bytes.
  1372.                                 // This must be a multiple of 4.
  1373. } EMR, *PEMR;
  1374. // Base text record type for the enhanced metafile.
  1375. typedef struct tagEMRTEXT
  1376. {
  1377.     POINTL  ptlReference;
  1378.     DWORD   nChars;
  1379.     DWORD   offString;          // Offset to the string
  1380.     DWORD   fOptions;
  1381.     RECTL   rcl;
  1382.     DWORD   offDx;              // Offset to the inter-character spacing array.
  1383.                                 // This is always given.
  1384. } EMRTEXT, *PEMRTEXT;
  1385. // Record structures for the enhanced metafile.
  1386. typedef struct tagABORTPATH
  1387. {
  1388.     EMR     emr;
  1389. } EMRABORTPATH,      *PEMRABORTPATH,
  1390.   EMRBEGINPATH,      *PEMRBEGINPATH,
  1391.   EMRENDPATH,        *PEMRENDPATH,
  1392.   EMRCLOSEFIGURE,    *PEMRCLOSEFIGURE,
  1393.   EMRFLATTENPATH,    *PEMRFLATTENPATH,
  1394.   EMRWIDENPATH,      *PEMRWIDENPATH,
  1395.   EMRSETMETARGN,     *PEMRSETMETARGN,
  1396.   EMRSAVEDC,         *PEMRSAVEDC,
  1397.   EMRREALIZEPALETTE, *PEMRREALIZEPALETTE;
  1398. typedef struct tagEMRSELECTCLIPPATH
  1399. {
  1400.     EMR     emr;
  1401.     DWORD   iMode;
  1402. } EMRSELECTCLIPPATH,    *PEMRSELECTCLIPPATH,
  1403.   EMRSETBKMODE,         *PEMRSETBKMODE,
  1404.   EMRSETMAPMODE,        *PEMRSETMAPMODE,
  1405. #if(WINVER >= 0x0500)
  1406.   EMRSETLAYOUT,         *PEMRSETLAYOUT,
  1407. #endif /* WINVER >= 0x0500 */
  1408.   EMRSETPOLYFILLMODE,   *PEMRSETPOLYFILLMODE,
  1409.   EMRSETROP2,           *PEMRSETROP2,
  1410.   EMRSETSTRETCHBLTMODE, *PEMRSETSTRETCHBLTMODE,
  1411.   EMRSETICMMODE,        *PEMRSETICMMODE,
  1412.   EMRSETTEXTALIGN,      *PEMRSETTEXTALIGN;
  1413. typedef struct tagEMRSETMITERLIMIT
  1414. {
  1415.     EMR     emr;
  1416.     FLOAT   eMiterLimit;
  1417. } EMRSETMITERLIMIT, *PEMRSETMITERLIMIT;
  1418. typedef struct tagEMRRESTOREDC
  1419. {
  1420.     EMR     emr;
  1421.     LONG    iRelative;          // Specifies a relative instance
  1422. } EMRRESTOREDC, *PEMRRESTOREDC;
  1423. typedef struct tagEMRSETARCDIRECTION
  1424. {
  1425.     EMR     emr;
  1426.     DWORD   iArcDirection;      // Specifies the arc direction in the
  1427.                                 // advanced graphics mode.
  1428. } EMRSETARCDIRECTION, *PEMRSETARCDIRECTION;
  1429. typedef struct tagEMRSETMAPPERFLAGS
  1430. {
  1431.     EMR     emr;
  1432.     DWORD   dwFlags;
  1433. } EMRSETMAPPERFLAGS, *PEMRSETMAPPERFLAGS;
  1434. typedef struct tagEMRSETTEXTCOLOR
  1435. {
  1436.     EMR     emr;
  1437.     COLORREF crColor;
  1438. } EMRSETBKCOLOR,   *PEMRSETBKCOLOR,
  1439.   EMRSETTEXTCOLOR, *PEMRSETTEXTCOLOR;
  1440. typedef struct tagEMRSELECTOBJECT
  1441. {
  1442.     EMR     emr;
  1443.     DWORD   ihObject;           // Object handle index
  1444. } EMRSELECTOBJECT, *PEMRSELECTOBJECT,
  1445.   EMRDELETEOBJECT, *PEMRDELETEOBJECT;
  1446. typedef struct tagEMRSELECTPALETTE
  1447. {
  1448.     EMR     emr;
  1449.     DWORD   ihPal;              // Palette handle index, background mode only
  1450. } EMRSELECTPALETTE, *PEMRSELECTPALETTE;
  1451. typedef struct tagEMRRESIZEPALETTE
  1452. {
  1453.     EMR     emr;
  1454.     DWORD   ihPal;              // Palette handle index
  1455.     DWORD   cEntries;
  1456. } EMRRESIZEPALETTE, *PEMRRESIZEPALETTE;
  1457. typedef struct tagEMRSETPALETTEENTRIES
  1458. {
  1459.     EMR     emr;
  1460.     DWORD   ihPal;              // Palette handle index
  1461.     DWORD   iStart;
  1462.     DWORD   cEntries;
  1463.     PALETTEENTRY aPalEntries[1];// The peFlags fields do not contain any flags
  1464. } EMRSETPALETTEENTRIES, *PEMRSETPALETTEENTRIES;
  1465. typedef struct tagEMRSETCOLORADJUSTMENT
  1466. {
  1467.     EMR     emr;
  1468.     COLORADJUSTMENT ColorAdjustment;
  1469. } EMRSETCOLORADJUSTMENT, *PEMRSETCOLORADJUSTMENT;
  1470. typedef struct tagEMRGDICOMMENT
  1471. {
  1472.     EMR     emr;
  1473.     DWORD   cbData;             // Size of data in bytes
  1474.     BYTE    Data[1];
  1475. } EMRGDICOMMENT, *PEMRGDICOMMENT;
  1476. typedef struct tagEMREOF
  1477. {
  1478.     EMR     emr;
  1479.     DWORD   nPalEntries;        // Number of palette entries
  1480.     DWORD   offPalEntries;      // Offset to the palette entries
  1481.     DWORD   nSizeLast;          // Same as nSize and must be the last DWORD
  1482.                                 // of the record.  The palette entries,
  1483.                                 // if exist, precede this field.
  1484. } EMREOF, *PEMREOF;
  1485. typedef struct tagEMRLINETO
  1486. {
  1487.     EMR     emr;
  1488.     POINTL  ptl;
  1489. } EMRLINETO,   *PEMRLINETO,
  1490.   EMRMOVETOEX, *PEMRMOVETOEX;
  1491. typedef struct tagEMROFFSETCLIPRGN
  1492. {
  1493.     EMR     emr;
  1494.     POINTL  ptlOffset;
  1495. } EMROFFSETCLIPRGN, *PEMROFFSETCLIPRGN;
  1496. typedef struct tagEMRFILLPATH
  1497. {
  1498.     EMR     emr;
  1499.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1500. } EMRFILLPATH,          *PEMRFILLPATH,
  1501.   EMRSTROKEANDFILLPATH, *PEMRSTROKEANDFILLPATH,
  1502.   EMRSTROKEPATH,        *PEMRSTROKEPATH;
  1503. typedef struct tagEMREXCLUDECLIPRECT
  1504. {
  1505.     EMR     emr;
  1506.     RECTL   rclClip;
  1507. } EMREXCLUDECLIPRECT,   *PEMREXCLUDECLIPRECT,
  1508.   EMRINTERSECTCLIPRECT, *PEMRINTERSECTCLIPRECT;
  1509. typedef struct tagEMRSETVIEWPORTORGEX
  1510. {
  1511.     EMR     emr;
  1512.     POINTL  ptlOrigin;
  1513. } EMRSETVIEWPORTORGEX, *PEMRSETVIEWPORTORGEX,
  1514.   EMRSETWINDOWORGEX,   *PEMRSETWINDOWORGEX,
  1515.   EMRSETBRUSHORGEX,    *PEMRSETBRUSHORGEX;
  1516. typedef struct tagEMRSETVIEWPORTEXTEX
  1517. {
  1518.     EMR     emr;
  1519.     SIZEL   szlExtent;
  1520. } EMRSETVIEWPORTEXTEX, *PEMRSETVIEWPORTEXTEX,
  1521.   EMRSETWINDOWEXTEX,   *PEMRSETWINDOWEXTEX;
  1522. typedef struct tagEMRSCALEVIEWPORTEXTEX
  1523. {
  1524.     EMR     emr;
  1525.     LONG    xNum;
  1526.     LONG    xDenom;
  1527.     LONG    yNum;
  1528.     LONG    yDenom;
  1529. } EMRSCALEVIEWPORTEXTEX, *PEMRSCALEVIEWPORTEXTEX,
  1530.   EMRSCALEWINDOWEXTEX,   *PEMRSCALEWINDOWEXTEX;
  1531. typedef struct tagEMRSETWORLDTRANSFORM
  1532. {
  1533.     EMR     emr;
  1534.     XFORM   xform;
  1535. } EMRSETWORLDTRANSFORM, *PEMRSETWORLDTRANSFORM;
  1536. typedef struct tagEMRMODIFYWORLDTRANSFORM
  1537. {
  1538.     EMR     emr;
  1539.     XFORM   xform;
  1540.     DWORD   iMode;
  1541. } EMRMODIFYWORLDTRANSFORM, *PEMRMODIFYWORLDTRANSFORM;
  1542. typedef struct tagEMRSETPIXELV
  1543. {
  1544.     EMR     emr;
  1545.     POINTL  ptlPixel;
  1546.     COLORREF crColor;
  1547. } EMRSETPIXELV, *PEMRSETPIXELV;
  1548. typedef struct tagEMREXTFLOODFILL
  1549. {
  1550.     EMR     emr;
  1551.     POINTL  ptlStart;
  1552.     COLORREF crColor;
  1553.     DWORD   iMode;
  1554. } EMREXTFLOODFILL, *PEMREXTFLOODFILL;
  1555. typedef struct tagEMRELLIPSE
  1556. {
  1557.     EMR     emr;
  1558.     RECTL   rclBox;             // Inclusive-inclusive bounding rectangle
  1559. } EMRELLIPSE,  *PEMRELLIPSE,
  1560.   EMRRECTANGLE, *PEMRRECTANGLE;
  1561. typedef struct tagEMRROUNDRECT
  1562. {
  1563.     EMR     emr;
  1564.     RECTL   rclBox;             // Inclusive-inclusive bounding rectangle
  1565.     SIZEL   szlCorner;
  1566. } EMRROUNDRECT, *PEMRROUNDRECT;
  1567. typedef struct tagEMRARC
  1568. {
  1569.     EMR     emr;
  1570.     RECTL   rclBox;             // Inclusive-inclusive bounding rectangle
  1571.     POINTL  ptlStart;
  1572.     POINTL  ptlEnd;
  1573. } EMRARC,   *PEMRARC,
  1574.   EMRARCTO, *PEMRARCTO,
  1575.   EMRCHORD, *PEMRCHORD,
  1576.   EMRPIE,   *PEMRPIE;
  1577. typedef struct tagEMRANGLEARC
  1578. {
  1579.     EMR     emr;
  1580.     POINTL  ptlCenter;
  1581.     DWORD   nRadius;
  1582.     FLOAT   eStartAngle;
  1583.     FLOAT   eSweepAngle;
  1584. } EMRANGLEARC, *PEMRANGLEARC;
  1585. typedef struct tagEMRPOLYLINE
  1586. {
  1587.     EMR     emr;
  1588.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1589.     DWORD   cptl;
  1590.     POINTL  aptl[1];
  1591. } EMRPOLYLINE,     *PEMRPOLYLINE,
  1592.   EMRPOLYBEZIER,   *PEMRPOLYBEZIER,
  1593.   EMRPOLYGON,      *PEMRPOLYGON,
  1594.   EMRPOLYBEZIERTO, *PEMRPOLYBEZIERTO,
  1595.   EMRPOLYLINETO,   *PEMRPOLYLINETO;
  1596. typedef struct tagEMRPOLYLINE16
  1597. {
  1598.     EMR     emr;
  1599.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1600.     DWORD   cpts;
  1601.     POINTS  apts[1];
  1602. } EMRPOLYLINE16,     *PEMRPOLYLINE16,
  1603.   EMRPOLYBEZIER16,   *PEMRPOLYBEZIER16,
  1604.   EMRPOLYGON16,      *PEMRPOLYGON16,
  1605.   EMRPOLYBEZIERTO16, *PEMRPOLYBEZIERTO16,
  1606.   EMRPOLYLINETO16,   *PEMRPOLYLINETO16;
  1607. typedef struct tagEMRPOLYDRAW
  1608. {
  1609.     EMR     emr;
  1610.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1611.     DWORD   cptl;               // Number of points
  1612.     POINTL  aptl[1];            // Array of points
  1613.     BYTE    abTypes[1];         // Array of point types
  1614. } EMRPOLYDRAW, *PEMRPOLYDRAW;
  1615. typedef struct tagEMRPOLYDRAW16
  1616. {
  1617.     EMR     emr;
  1618.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1619.     DWORD   cpts;               // Number of points
  1620.     POINTS  apts[1];            // Array of points
  1621.     BYTE    abTypes[1];         // Array of point types
  1622. } EMRPOLYDRAW16, *PEMRPOLYDRAW16;
  1623. typedef struct tagEMRPOLYPOLYLINE
  1624. {
  1625.     EMR     emr;
  1626.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1627.     DWORD   nPolys;             // Number of polys
  1628.     DWORD   cptl;               // Total number of points in all polys
  1629.     DWORD   aPolyCounts[1];     // Array of point counts for each poly
  1630.     POINTL  aptl[1];            // Array of points
  1631. } EMRPOLYPOLYLINE, *PEMRPOLYPOLYLINE,
  1632.   EMRPOLYPOLYGON,  *PEMRPOLYPOLYGON;
  1633. typedef struct tagEMRPOLYPOLYLINE16
  1634. {
  1635.     EMR     emr;
  1636.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1637.     DWORD   nPolys;             // Number of polys
  1638.     DWORD   cpts;               // Total number of points in all polys
  1639.     DWORD   aPolyCounts[1];     // Array of point counts for each poly
  1640.     POINTS  apts[1];            // Array of points
  1641. } EMRPOLYPOLYLINE16, *PEMRPOLYPOLYLINE16,
  1642.   EMRPOLYPOLYGON16,  *PEMRPOLYPOLYGON16;
  1643. typedef struct tagEMRINVERTRGN
  1644. {
  1645.     EMR     emr;
  1646.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1647.     DWORD   cbRgnData;          // Size of region data in bytes
  1648.     BYTE    RgnData[1];
  1649. } EMRINVERTRGN, *PEMRINVERTRGN,
  1650.   EMRPAINTRGN,  *PEMRPAINTRGN;
  1651. typedef struct tagEMRFILLRGN
  1652. {
  1653.     EMR     emr;
  1654.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1655.     DWORD   cbRgnData;          // Size of region data in bytes
  1656.     DWORD   ihBrush;            // Brush handle index
  1657.     BYTE    RgnData[1];
  1658. } EMRFILLRGN, *PEMRFILLRGN;
  1659. typedef struct tagEMRFRAMERGN
  1660. {
  1661.     EMR     emr;
  1662.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1663.     DWORD   cbRgnData;          // Size of region data in bytes
  1664.     DWORD   ihBrush;            // Brush handle index
  1665.     SIZEL   szlStroke;
  1666.     BYTE    RgnData[1];
  1667. } EMRFRAMERGN, *PEMRFRAMERGN;
  1668. typedef struct tagEMREXTSELECTCLIPRGN
  1669. {
  1670.     EMR     emr;
  1671.     DWORD   cbRgnData;          // Size of region data in bytes
  1672.     DWORD   iMode;
  1673.     BYTE    RgnData[1];
  1674. } EMREXTSELECTCLIPRGN, *PEMREXTSELECTCLIPRGN;
  1675. typedef struct tagEMREXTTEXTOUTA
  1676. {
  1677.     EMR     emr;
  1678.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1679.     DWORD   iGraphicsMode;      // Current graphics mode
  1680.     FLOAT   exScale;            // X and Y scales from Page units to .01mm units
  1681.     FLOAT   eyScale;            //   if graphics mode is GM_COMPATIBLE.
  1682.     EMRTEXT emrtext;            // This is followed by the string and spacing
  1683.                                 // array
  1684. } EMREXTTEXTOUTA, *PEMREXTTEXTOUTA,
  1685.   EMREXTTEXTOUTW, *PEMREXTTEXTOUTW;
  1686. typedef struct tagEMRPOLYTEXTOUTA
  1687. {
  1688.     EMR     emr;
  1689.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1690.     DWORD   iGraphicsMode;      // Current graphics mode
  1691.     FLOAT   exScale;            // X and Y scales from Page units to .01mm units
  1692.     FLOAT   eyScale;            //   if graphics mode is GM_COMPATIBLE.
  1693.     LONG    cStrings;
  1694.     EMRTEXT aemrtext[1];        // Array of EMRTEXT structures.  This is
  1695.                                 // followed by the strings and spacing arrays.
  1696. } EMRPOLYTEXTOUTA, *PEMRPOLYTEXTOUTA,
  1697.   EMRPOLYTEXTOUTW, *PEMRPOLYTEXTOUTW;
  1698. typedef struct tagEMRBITBLT
  1699. {
  1700.     EMR     emr;
  1701.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1702.     LONG    xDest;
  1703.     LONG    yDest;
  1704.     LONG    cxDest;
  1705.     LONG    cyDest;
  1706.     DWORD   dwRop;
  1707.     LONG    xSrc;
  1708.     LONG    ySrc;
  1709.     XFORM   xformSrc;           // Source DC transform
  1710.     COLORREF crBkColorSrc;      // Source DC BkColor in RGB
  1711.     DWORD   iUsageSrc;          // Source bitmap info color table usage
  1712.                                 // (DIB_RGB_COLORS)
  1713.     DWORD   offBmiSrc;          // Offset to the source BITMAPINFO structure
  1714.     DWORD   cbBmiSrc;           // Size of the source BITMAPINFO structure
  1715.     DWORD   offBitsSrc;         // Offset to the source bitmap bits
  1716.     DWORD   cbBitsSrc;          // Size of the source bitmap bits
  1717. } EMRBITBLT, *PEMRBITBLT;
  1718. typedef struct tagEMRSTRETCHBLT
  1719. {
  1720.     EMR     emr;
  1721.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1722.     LONG    xDest;
  1723.     LONG    yDest;
  1724.     LONG    cxDest;
  1725.     LONG    cyDest;
  1726.     DWORD   dwRop;
  1727.     LONG    xSrc;
  1728.     LONG    ySrc;
  1729.     XFORM   xformSrc;           // Source DC transform
  1730.     COLORREF crBkColorSrc;      // Source DC BkColor in RGB
  1731.     DWORD   iUsageSrc;          // Source bitmap info color table usage
  1732.                                 // (DIB_RGB_COLORS)
  1733.     DWORD   offBmiSrc;          // Offset to the source BITMAPINFO structure
  1734.     DWORD   cbBmiSrc;           // Size of the source BITMAPINFO structure
  1735.     DWORD   offBitsSrc;         // Offset to the source bitmap bits
  1736.     DWORD   cbBitsSrc;          // Size of the source bitmap bits
  1737.     LONG    cxSrc;
  1738.     LONG    cySrc;
  1739. } EMRSTRETCHBLT, *PEMRSTRETCHBLT;
  1740. typedef struct tagEMRMASKBLT
  1741. {
  1742.     EMR     emr;
  1743.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1744.     LONG    xDest;
  1745.     LONG    yDest;
  1746.     LONG    cxDest;
  1747.     LONG    cyDest;
  1748.     DWORD   dwRop;
  1749.     LONG    xSrc;
  1750.     LONG    ySrc;
  1751.     XFORM   xformSrc;           // Source DC transform
  1752.     COLORREF crBkColorSrc;      // Source DC BkColor in RGB
  1753.     DWORD   iUsageSrc;          // Source bitmap info color table usage
  1754.                                 // (DIB_RGB_COLORS)
  1755.     DWORD   offBmiSrc;          // Offset to the source BITMAPINFO structure
  1756.     DWORD   cbBmiSrc;           // Size of the source BITMAPINFO structure
  1757.     DWORD   offBitsSrc;         // Offset to the source bitmap bits
  1758.     DWORD   cbBitsSrc;          // Size of the source bitmap bits
  1759.     LONG    xMask;
  1760.     LONG    yMask;
  1761.     DWORD   iUsageMask;         // Mask bitmap info color table usage
  1762.     DWORD   offBmiMask;         // Offset to the mask BITMAPINFO structure if any
  1763.     DWORD   cbBmiMask;          // Size of the mask BITMAPINFO structure if any
  1764.     DWORD   offBitsMask;        // Offset to the mask bitmap bits if any
  1765.     DWORD   cbBitsMask;         // Size of the mask bitmap bits if any
  1766. } EMRMASKBLT, *PEMRMASKBLT;
  1767. typedef struct tagEMRPLGBLT
  1768. {
  1769.     EMR     emr;
  1770.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1771.     POINTL  aptlDest[3];
  1772.     LONG    xSrc;
  1773.     LONG    ySrc;
  1774.     LONG    cxSrc;
  1775.     LONG    cySrc;
  1776.     XFORM   xformSrc;           // Source DC transform
  1777.     COLORREF crBkColorSrc;      // Source DC BkColor in RGB
  1778.     DWORD   iUsageSrc;          // Source bitmap info color table usage
  1779.                                 // (DIB_RGB_COLORS)
  1780.     DWORD   offBmiSrc;          // Offset to the source BITMAPINFO structure
  1781.     DWORD   cbBmiSrc;           // Size of the source BITMAPINFO structure
  1782.     DWORD   offBitsSrc;         // Offset to the source bitmap bits
  1783.     DWORD   cbBitsSrc;          // Size of the source bitmap bits
  1784.     LONG    xMask;
  1785.     LONG    yMask;
  1786.     DWORD   iUsageMask;         // Mask bitmap info color table usage
  1787.     DWORD   offBmiMask;         // Offset to the mask BITMAPINFO structure if any
  1788.     DWORD   cbBmiMask;          // Size of the mask BITMAPINFO structure if any
  1789.     DWORD   offBitsMask;        // Offset to the mask bitmap bits if any
  1790.     DWORD   cbBitsMask;         // Size of the mask bitmap bits if any
  1791. } EMRPLGBLT, *PEMRPLGBLT;
  1792. typedef struct tagEMRSETDIBITSTODEVICE
  1793. {
  1794.     EMR     emr;
  1795.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1796.     LONG    xDest;
  1797.     LONG    yDest;
  1798.     LONG    xSrc;
  1799.     LONG    ySrc;
  1800.     LONG    cxSrc;
  1801.     LONG    cySrc;
  1802.     DWORD   offBmiSrc;          // Offset to the source BITMAPINFO structure
  1803.     DWORD   cbBmiSrc;           // Size of the source BITMAPINFO structure
  1804.     DWORD   offBitsSrc;         // Offset to the source bitmap bits
  1805.     DWORD   cbBitsSrc;          // Size of the source bitmap bits
  1806.     DWORD   iUsageSrc;          // Source bitmap info color table usage
  1807.     DWORD   iStartScan;
  1808.     DWORD   cScans;
  1809. } EMRSETDIBITSTODEVICE, *PEMRSETDIBITSTODEVICE;
  1810. typedef struct tagEMRSTRETCHDIBITS
  1811. {
  1812.     EMR     emr;
  1813.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1814.     LONG    xDest;
  1815.     LONG    yDest;
  1816.     LONG    xSrc;
  1817.     LONG    ySrc;
  1818.     LONG    cxSrc;
  1819.     LONG    cySrc;
  1820.     DWORD   offBmiSrc;          // Offset to the source BITMAPINFO structure
  1821.     DWORD   cbBmiSrc;           // Size of the source BITMAPINFO structure
  1822.     DWORD   offBitsSrc;         // Offset to the source bitmap bits
  1823.     DWORD   cbBitsSrc;          // Size of the source bitmap bits
  1824.     DWORD   iUsageSrc;          // Source bitmap info color table usage
  1825.     DWORD   dwRop;
  1826.     LONG    cxDest;
  1827.     LONG    cyDest;
  1828. } EMRSTRETCHDIBITS, *PEMRSTRETCHDIBITS;
  1829. typedef struct tagEMREXTCREATEFONTINDIRECTW
  1830. {
  1831.     EMR     emr;
  1832.     DWORD   ihFont;             // Font handle index
  1833.     EXTLOGFONTW elfw;
  1834. } EMREXTCREATEFONTINDIRECTW, *PEMREXTCREATEFONTINDIRECTW;
  1835. typedef struct tagEMRCREATEPALETTE
  1836. {
  1837.     EMR     emr;
  1838.     DWORD   ihPal;              // Palette handle index
  1839.     LOGPALETTE lgpl;            // The peFlags fields in the palette entries
  1840.                                 // do not contain any flags
  1841. } EMRCREATEPALETTE, *PEMRCREATEPALETTE;
  1842. typedef struct tagEMRCREATEPEN
  1843. {
  1844.     EMR     emr;
  1845.     DWORD   ihPen;              // Pen handle index
  1846.     LOGPEN  lopn;
  1847. } EMRCREATEPEN, *PEMRCREATEPEN;
  1848. typedef struct tagEMREXTCREATEPEN
  1849. {
  1850.     EMR     emr;
  1851.     DWORD   ihPen;              // Pen handle index
  1852.     DWORD   offBmi;             // Offset to the BITMAPINFO structure if any
  1853.     DWORD   cbBmi;              // Size of the BITMAPINFO structure if any
  1854.                                 // The bitmap info is followed by the bitmap
  1855.                                 // bits to form a packed DIB.
  1856.     DWORD   offBits;            // Offset to the brush bitmap bits if any
  1857.     DWORD   cbBits;             // Size of the brush bitmap bits if any
  1858.     EXTLOGPEN elp;              // The extended pen with the style array.
  1859. } EMREXTCREATEPEN, *PEMREXTCREATEPEN;
  1860. typedef struct tagEMRCREATEBRUSHINDIRECT
  1861. {
  1862.     EMR        emr;
  1863.     DWORD      ihBrush;          // Brush handle index
  1864.     LOGBRUSH32 lb;               // The style must be BS_SOLID, BS_HOLLOW,
  1865.                                  // BS_NULL or BS_HATCHED.
  1866. } EMRCREATEBRUSHINDIRECT, *PEMRCREATEBRUSHINDIRECT;
  1867. typedef struct tagEMRCREATEMONOBRUSH
  1868. {
  1869.     EMR     emr;
  1870.     DWORD   ihBrush;            // Brush handle index
  1871.     DWORD   iUsage;             // Bitmap info color table usage
  1872.     DWORD   offBmi;             // Offset to the BITMAPINFO structure
  1873.     DWORD   cbBmi;              // Size of the BITMAPINFO structure
  1874.     DWORD   offBits;            // Offset to the bitmap bits
  1875.     DWORD   cbBits;             // Size of the bitmap bits
  1876. } EMRCREATEMONOBRUSH, *PEMRCREATEMONOBRUSH;
  1877. typedef struct tagEMRCREATEDIBPATTERNBRUSHPT
  1878. {
  1879.     EMR     emr;
  1880.     DWORD   ihBrush;            // Brush handle index
  1881.     DWORD   iUsage;             // Bitmap info color table usage
  1882.     DWORD   offBmi;             // Offset to the BITMAPINFO structure
  1883.     DWORD   cbBmi;              // Size of the BITMAPINFO structure
  1884.                                 // The bitmap info is followed by the bitmap
  1885.                                 // bits to form a packed DIB.
  1886.     DWORD   offBits;            // Offset to the bitmap bits
  1887.     DWORD   cbBits;             // Size of the bitmap bits
  1888. } EMRCREATEDIBPATTERNBRUSHPT, *PEMRCREATEDIBPATTERNBRUSHPT;
  1889. typedef struct tagEMRFORMAT
  1890. {
  1891.     DWORD   dSignature;         // Format signature, e.g. ENHMETA_SIGNATURE.
  1892.     DWORD   nVersion;           // Format version number.
  1893.     DWORD   cbData;             // Size of data in bytes.
  1894.     DWORD   offData;            // Offset to data from GDICOMMENT_IDENTIFIER.
  1895.                                 // It must begin at a DWORD offset.
  1896. } EMRFORMAT, *PEMRFORMAT;
  1897. #if(WINVER >= 0x0400)
  1898. typedef struct tagEMRGLSRECORD
  1899. {
  1900.     EMR     emr;
  1901.     DWORD   cbData;             // Size of data in bytes
  1902.     BYTE    Data[1];
  1903. } EMRGLSRECORD, *PEMRGLSRECORD;
  1904. typedef struct tagEMRGLSBOUNDEDRECORD
  1905. {
  1906.     EMR     emr;
  1907.     RECTL   rclBounds;          // Bounds in recording coordinates
  1908.     DWORD   cbData;             // Size of data in bytes
  1909.     BYTE    Data[1];
  1910. } EMRGLSBOUNDEDRECORD, *PEMRGLSBOUNDEDRECORD;
  1911. typedef struct tagEMRPIXELFORMAT
  1912. {
  1913.     EMR     emr;
  1914.     PIXELFORMATDESCRIPTOR pfd;
  1915. } EMRPIXELFORMAT, *PEMRPIXELFORMAT;
  1916. typedef struct tagEMRCREATECOLORSPACE
  1917. {
  1918.     EMR             emr;
  1919.     DWORD           ihCS;       // ColorSpace handle index
  1920.     LOGCOLORSPACEA  lcs;        // Ansi version of LOGCOLORSPACE
  1921. } EMRCREATECOLORSPACE, *PEMRCREATECOLORSPACE;
  1922. typedef struct tagEMRSETCOLORSPACE
  1923. {
  1924.     EMR     emr;
  1925.     DWORD   ihCS;               // ColorSpace handle index
  1926. } EMRSETCOLORSPACE,    *PEMRSETCOLORSPACE,
  1927.   EMRSELECTCOLORSPACE, *PEMRSELECTCOLORSPACE,
  1928.   EMRDELETECOLORSPACE, *PEMRDELETECOLORSPACE;
  1929. #endif /* WINVER >= 0x0400 */
  1930. #if(WINVER >= 0x0500)
  1931. typedef struct tagEMREXTESCAPE
  1932. {
  1933.     EMR     emr;
  1934.     INT     iEscape;            // Escape code
  1935.     INT     cbEscData;          // Size of escape data
  1936.     BYTE    EscData[1];         // Escape data
  1937. } EMREXTESCAPE,  *PEMREXTESCAPE,
  1938.   EMRDRAWESCAPE, *PEMRDRAWESCAPE;
  1939. typedef struct tagEMRNAMEDESCAPE
  1940. {
  1941.     EMR     emr;
  1942.     INT     iEscape;            // Escape code
  1943.     INT     cbDriver;           // Size of driver name
  1944.     INT     cbEscData;          // Size of escape data
  1945.     BYTE    EscData[1];         // Driver name and Escape data
  1946. } EMRNAMEDESCAPE, *PEMRNAMEDESCAPE;
  1947. #define SETICMPROFILE_EMBEDED           0x00000001
  1948. typedef struct tagEMRSETICMPROFILE
  1949. {
  1950.     EMR     emr;
  1951.     DWORD   dwFlags;            // flags
  1952.     DWORD   cbName;             // Size of desired profile name
  1953.     DWORD   cbData;             // Size of raw profile data if attached
  1954.     BYTE    Data[1];            // Array size is cbName + cbData
  1955. } EMRSETICMPROFILE,  *PEMRSETICMPROFILE,
  1956.   EMRSETICMPROFILEA, *PEMRSETICMPROFILEA,
  1957.   EMRSETICMPROFILEW, *PEMRSETICMPROFILEW;
  1958. #define CREATECOLORSPACE_EMBEDED        0x00000001
  1959. typedef struct tagEMRCREATECOLORSPACEW
  1960. {
  1961.     EMR             emr;
  1962.     DWORD           ihCS;       // ColorSpace handle index
  1963.     LOGCOLORSPACEW  lcs;        // Unicode version of logical color space structure
  1964.     DWORD           dwFlags;    // flags
  1965.     DWORD           cbData;     // size of raw source profile data if attached
  1966.     BYTE            Data[1];    // Array size is cbData
  1967. } EMRCREATECOLORSPACEW, *PEMRCREATECOLORSPACEW;
  1968. #define COLORMATCHTOTARGET_EMBEDED      0x00000001
  1969. typedef struct tagCOLORMATCHTOTARGET
  1970. {
  1971.     EMR     emr;
  1972.     DWORD   dwAction;           // CS_ENABLE, CS_DISABLE or CS_DELETE_TRANSFORM
  1973.     DWORD   dwFlags;            // flags
  1974.     DWORD   cbName;             // Size of desired target profile name
  1975.     DWORD   cbData;             // Size of raw target profile data if attached
  1976.     BYTE    Data[1];            // Array size is cbName + cbData
  1977. } EMRCOLORMATCHTOTARGET, *PEMRCOLORMATCHTOTARGET;
  1978. typedef struct tagCOLORCORRECTPALETTE
  1979. {
  1980.     EMR     emr;
  1981.     DWORD   ihPalette;          // Palette handle index
  1982.     DWORD   nFirstEntry;        // Index of first entry to correct
  1983.     DWORD   nPalEntries;        // Number of palette entries to correct
  1984.     DWORD   nReserved;          // Reserved
  1985. } EMRCOLORCORRECTPALETTE, *PEMRCOLORCORRECTPALETTE;
  1986. typedef struct tagEMRALPHABLEND
  1987. {
  1988.     EMR     emr;
  1989.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  1990.     LONG    xDest;
  1991.     LONG    yDest;
  1992.     LONG    cxDest;
  1993.     LONG    cyDest;
  1994.     DWORD   dwRop;
  1995.     LONG    xSrc;
  1996.     LONG    ySrc;
  1997.     XFORM   xformSrc;           // Source DC transform
  1998.     COLORREF crBkColorSrc;      // Source DC BkColor in RGB
  1999.     DWORD   iUsageSrc;          // Source bitmap info color table usage
  2000.                                 // (DIB_RGB_COLORS)
  2001.     DWORD   offBmiSrc;          // Offset to the source BITMAPINFO structure
  2002.     DWORD   cbBmiSrc;           // Size of the source BITMAPINFO structure
  2003.     DWORD   offBitsSrc;         // Offset to the source bitmap bits
  2004.     DWORD   cbBitsSrc;          // Size of the source bitmap bits
  2005.     LONG    cxSrc;
  2006.     LONG    cySrc;
  2007. } EMRALPHABLEND, *PEMRALPHABLEND;
  2008. typedef struct tagEMRGRADIENTFILL
  2009. {
  2010.     EMR       emr;
  2011.     RECTL     rclBounds;          // Inclusive-inclusive bounds in device units
  2012.     DWORD     nVer;
  2013.     DWORD     nTri;
  2014.     ULONG     ulMode;
  2015.     TRIVERTEX Ver[1];
  2016. }EMRGRADIENTFILL,*PEMRGRADIENTFILL;
  2017. typedef struct tagEMRTRANSPARENTBLT
  2018. {
  2019.     EMR     emr;
  2020.     RECTL   rclBounds;          // Inclusive-inclusive bounds in device units
  2021.     LONG    xDest;
  2022.     LONG    yDest;
  2023.     LONG    cxDest;
  2024.     LONG    cyDest;
  2025.     DWORD   dwRop;
  2026.     LONG    xSrc;
  2027.     LONG    ySrc;
  2028.     XFORM   xformSrc;           // Source DC transform
  2029.     COLORREF crBkColorSrc;      // Source DC BkColor in RGB
  2030.     DWORD   iUsageSrc;          // Source bitmap info color table usage
  2031.                                 // (DIB_RGB_COLORS)
  2032.     DWORD   offBmiSrc;          // Offset to the source BITMAPINFO structure
  2033.     DWORD   cbBmiSrc;           // Size of the source BITMAPINFO structure
  2034.     DWORD   offBitsSrc;         // Offset to the source bitmap bits
  2035.     DWORD   cbBitsSrc;          // Size of the source bitmap bits
  2036.     LONG    cxSrc;
  2037.     LONG    cySrc;
  2038. } EMRTRANSPARENTBLT, *PEMRTRANSPARENTBLT;
  2039. #endif /* WINVER >= 0x0500 */
  2040. #define GDICOMMENT_IDENTIFIER           0x43494447
  2041. #define GDICOMMENT_WINDOWS_METAFILE     0x80000001
  2042. #define GDICOMMENT_BEGINGROUP           0x00000002
  2043. #define GDICOMMENT_ENDGROUP             0x00000003
  2044. #define GDICOMMENT_MULTIFORMATS         0x40000004
  2045. #define EPS_SIGNATURE                   0x46535045
  2046. #define GDICOMMENT_UNICODE_STRING       0x00000040
  2047. #define GDICOMMENT_UNICODE_END          0x00000080
  2048. #endif  /* NOMETAFILE */
  2049. // OpenGL wgl prototypes
  2050. WINGDIAPI BOOL  WINAPI wglCopyContext(HGLRC, HGLRC, UINT);
  2051. WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
  2052. WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int);
  2053. WINGDIAPI BOOL  WINAPI wglDeleteContext(HGLRC);
  2054. WINGDIAPI HGLRC WINAPI wglGetCurrentContext(VOID);
  2055. WINGDIAPI HDC   WINAPI wglGetCurrentDC(VOID);
  2056. WINGDIAPI PROC  WINAPI wglGetProcAddress(LPCSTR);
  2057. WINGDIAPI BOOL  WINAPI wglMakeCurrent(HDC, HGLRC);
  2058. WINGDIAPI BOOL  WINAPI wglShareLists(HGLRC, HGLRC);
  2059. WINGDIAPI BOOL  WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD);
  2060. WINGDIAPI BOOL  WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD);
  2061. #ifdef UNICODE
  2062. #define wglUseFontBitmaps  wglUseFontBitmapsW
  2063. #else
  2064. #define wglUseFontBitmaps  wglUseFontBitmapsA
  2065. #endif // !UNICODE
  2066. WINGDIAPI BOOL  WINAPI SwapBuffers(HDC);
  2067. typedef struct _POINTFLOAT {
  2068.     FLOAT   x;
  2069.     FLOAT   y;
  2070. } POINTFLOAT, *PPOINTFLOAT;
  2071. typedef struct _GLYPHMETRICSFLOAT {
  2072.     FLOAT       gmfBlackBoxX;
  2073.     FLOAT       gmfBlackBoxY;
  2074.     POINTFLOAT  gmfptGlyphOrigin;
  2075.     FLOAT       gmfCellIncX;
  2076.     FLOAT       gmfCellIncY;
  2077. } GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, FAR *LPGLYPHMETRICSFLOAT;
  2078. #define WGL_FONT_LINES      0
  2079. #define WGL_FONT_POLYGONS   1
  2080. WINGDIAPI BOOL  WINAPI wglUseFontOutlinesA(HDC, DWORD, DWORD, DWORD, FLOAT,
  2081.                                            FLOAT, int, LPGLYPHMETRICSFLOAT);
  2082. WINGDIAPI BOOL  WINAPI wglUseFontOutlinesW(HDC, DWORD, DWORD, DWORD, FLOAT,
  2083.                                            FLOAT, int, LPGLYPHMETRICSFLOAT);
  2084. #ifdef UNICODE
  2085. #define wglUseFontOutlines  wglUseFontOutlinesW
  2086. #else
  2087. #define wglUseFontOutlines  wglUseFontOutlinesA
  2088. #endif // !UNICODE
  2089. /* Layer plane descriptor */
  2090. typedef struct tagLAYERPLANEDESCRIPTOR { // lpd
  2091.     WORD  nSize;
  2092.     WORD  nVersion;
  2093.     DWORD dwFlags;
  2094.     BYTE  iPixelType;
  2095.     BYTE  cColorBits;
  2096.     BYTE  cRedBits;
  2097.     BYTE  cRedShift;
  2098.     BYTE  cGreenBits;
  2099.     BYTE  cGreenShift;
  2100.     BYTE  cBlueBits;
  2101.     BYTE  cBlueShift;
  2102.     BYTE  cAlphaBits;
  2103.     BYTE  cAlphaShift;
  2104.     BYTE  cAccumBits;
  2105.     BYTE  cAccumRedBits;
  2106.     BYTE  cAccumGreenBits;
  2107.     BYTE  cAccumBlueBits;
  2108.     BYTE  cAccumAlphaBits;
  2109.     BYTE  cDepthBits;
  2110.     BYTE  cStencilBits;
  2111.     BYTE  cAuxBuffers;
  2112.     BYTE  iLayerPlane;
  2113.     BYTE  bReserved;
  2114.     COLORREF crTransparent;
  2115. } LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, FAR *LPLAYERPLANEDESCRIPTOR;
  2116. /* LAYERPLANEDESCRIPTOR flags */
  2117. #define LPD_DOUBLEBUFFER        0x00000001
  2118. #define LPD_STEREO              0x00000002
  2119. #define LPD_SUPPORT_GDI         0x00000010
  2120. #define LPD_SUPPORT_OPENGL      0x00000020
  2121. #define LPD_SHARE_DEPTH         0x00000040
  2122. #define LPD_SHARE_STENCIL       0x00000080
  2123. #define LPD_SHARE_ACCUM         0x00000100
  2124. #define LPD_SWAP_EXCHANGE       0x00000200
  2125. #define LPD_SWAP_COPY           0x00000400
  2126. #define LPD_TRANSPARENT         0x00001000
  2127. #define LPD_TYPE_RGBA        0
  2128. #define LPD_TYPE_COLORINDEX  1
  2129. /* wglSwapLayerBuffers flags */
  2130. #define WGL_SWAP_MAIN_PLANE     0x00000001
  2131. #define WGL_SWAP_OVERLAY1       0x00000002
  2132. #define WGL_SWAP_OVERLAY2       0x00000004
  2133. #define WGL_SWAP_OVERLAY3       0x00000008
  2134. #define WGL_SWAP_OVERLAY4       0x00000010
  2135. #define WGL_SWAP_OVERLAY5       0x00000020
  2136. #define WGL_SWAP_OVERLAY6       0x00000040
  2137. #define WGL_SWAP_OVERLAY7       0x00000080
  2138. #define WGL_SWAP_OVERLAY8       0x00000100
  2139. #define WGL_SWAP_OVERLAY9       0x00000200
  2140. #define WGL_SWAP_OVERLAY10      0x00000400
  2141. #define WGL_SWAP_OVERLAY11      0x00000800
  2142. #define WGL_SWAP_OVERLAY12      0x00001000
  2143. #define WGL_SWAP_OVERLAY13      0x00002000
  2144. #define WGL_SWAP_OVERLAY14      0x00004000
  2145. #define WGL_SWAP_OVERLAY15      0x00008000
  2146. #define WGL_SWAP_UNDERLAY1      0x00010000
  2147. #define WGL_SWAP_UNDERLAY2      0x00020000
  2148. #define WGL_SWAP_UNDERLAY3      0x00040000
  2149. #define WGL_SWAP_UNDERLAY4      0x00080000
  2150. #define WGL_SWAP_UNDERLAY5      0x00100000
  2151. #define WGL_SWAP_UNDERLAY6      0x00200000
  2152. #define WGL_SWAP_UNDERLAY7      0x00400000
  2153. #define WGL_SWAP_UNDERLAY8      0x00800000
  2154. #define WGL_SWAP_UNDERLAY9      0x01000000
  2155. #define WGL_SWAP_UNDERLAY10     0x02000000
  2156. #define WGL_SWAP_UNDERLAY11     0x04000000
  2157. #define WGL_SWAP_UNDERLAY12     0x08000000
  2158. #define WGL_SWAP_UNDERLAY13     0x10000000
  2159. #define WGL_SWAP_UNDERLAY14     0x20000000
  2160. #define WGL_SWAP_UNDERLAY15     0x40000000
  2161. WINGDIAPI BOOL  WINAPI wglDescribeLayerPlane(HDC, int, int, UINT,
  2162.                                              LPLAYERPLANEDESCRIPTOR);
  2163. WINGDIAPI int   WINAPI wglSetLayerPaletteEntries(HDC, int, int, int,
  2164.                                                  CONST COLORREF *);
  2165. WINGDIAPI int   WINAPI wglGetLayerPaletteEntries(HDC, int, int, int,
  2166.                                                  COLORREF *);
  2167. WINGDIAPI BOOL  WINAPI wglRealizeLayerPalette(HDC, int, BOOL);
  2168. WINGDIAPI BOOL  WINAPI wglSwapLayerBuffers(HDC, UINT);
  2169. #if (WINVER >= 0x0500)
  2170. typedef struct _WGLSWAP
  2171. {
  2172.     HDC hdc;
  2173.     UINT uiFlags;
  2174. } WGLSWAP, *PWGLSWAP, FAR *LPWGLSWAP;
  2175. #define WGL_SWAPMULTIPLE_MAX 16
  2176. WINGDIAPI DWORD WINAPI wglSwapMultipleBuffers(UINT, CONST WGLSWAP *);
  2177. #endif // (WINVER >= 0x0500)
  2178. #endif /* NOGDI */
  2179. #ifdef __cplusplus
  2180. }
  2181. #endif
  2182. #endif /* _WINGDI_ */