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

1680 lines
62 KiB

  1. ;/*
  2. ;****************************************************************************
  3. ; *
  4. ; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY *
  5. ; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE *
  6. ; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR *
  7. ; PURPOSE. *
  8. ; *
  9. ; Copyright (C) 1993-95 Microsoft Corporation. All Rights Reserved. *
  10. ; *
  11. ;****************************************************************************
  12. ; GDI Definitions for Device Drivers
  13. ;
  14. ; Since most of the routines only need a portion of these definitions,
  15. ; conditional assembly flags have been defined in the various files
  16. ; to only include portions as needed (as opposed to having a lot of
  17. ; include files to mess with). The flags are as follows:
  18. ;
  19. ; incFont include font definitions
  20. ; incDevice include device definitions
  21. ; incLogical include logical object definitions
  22. ; incDrawmode include DrawMode structure definition
  23. ; incOutput include Output definitions
  24. ; incControl include Control definitions
  25. ; incPolyScanline include Scan definition
  26. page
  27. ; General definitions that almost everyone will use.
  28. ; Physical Bitmap Structure
  29. ;
  30. ; Bitmap data structure passed to OEM routines. Defines the location and
  31. ; size of a main memory bitmap.
  32. BITMAP struc ;*/ typedef struct { /*
  33. bmType dw 0 ; 0 means main memory bitmap. Non-zero ;*/ short int bmType; /*
  34. ; is number of physical display and format
  35. ; of the rest of the structure known only
  36. ; to device driver
  37. bmWidth dw 0 ; Width of bitmap in pixels ;*/ unsigned short int bmWidth; /*
  38. bmHeight dw 0 ; Height of bitmap in pixels ;*/ unsigned short int bmHeight; /*
  39. bmWidthBytes dw 0 ; #bytes per scan line ;*/ unsigned short int bmWidthBytes; /*
  40. bmPlanes db 0 ; # of planes in bitmap ;*/ BYTE bmPlanes; /*
  41. bmBitsPixel db 0 ; # of bits per pixel ;*/ BYTE bmBitsPixel; /*
  42. bmBits dd 0 ; Far pointer to bits of main memory bitmap ;*/ BYTE FAR *bmBits; /*
  43. bmWidthPlanes dd 0 ; Product of bmWidthBytes and bmHeight ;*/ unsigned long int bmWidthPlanes;/*
  44. bmlpPDevice dd 0 ; Pointer to associated PDevice ;*/ BYTE FAR *bmlpPDevice; /*
  45. bmSegmentIndex dw 0 ; Index to plaens next segment if non-zero ;*/ unsigned short int bmSegmentIndex; /*
  46. bmScanSegment dw 0 ; Number of scans per segment ;*/ unsigned short int bmScanSegment; /*
  47. bmFillBytes dw 0 ; Number of unused bytes per segment ;*/ unsigned short int bmFillBytes; /*
  48. dw 0 ;*/ unsigned short int futureUse4; /*
  49. dw 0 ;*/ unsigned short int futureUse5; /*
  50. BITMAP ends ;*/ } BITMAP; /*
  51. ; structures used for Device Independent Bitmap (DIB) processing.
  52. ; all taken out of Presentation Manager's documentation
  53. ; Tuesday 25-October-1988 15:04 -by- Ron Gery [rong]
  54. ; C definitions are provided below (separately).
  55. ; triple used in PM1.1 (BitmapCoreInfo) format color table
  56. RGBTriple struc
  57. rgbtBlue db 0
  58. rgbtGreen db 0
  59. rgbtRed db 0
  60. RGBTriple ends
  61. ; RGB DWORD used in PM2.0 format color table
  62. RGBQuad struc
  63. rgbBlue db 0
  64. rgbGreen db 0
  65. rgbRed db 0
  66. rgbReserved db 0
  67. RGBQuad ends
  68. BitmapCoreHeader struc
  69. bcSize dd 0
  70. bcWidth dw 0
  71. bcHeight dw 0
  72. bcPlanes dw 0
  73. bcBitCount dw 0
  74. BitmapCoreHeader ends
  75. ; new format bitmap structure based on PM2.0 format DCR.
  76. ; Tuesday 23-May-1989 16:05 -by- Ron Gery [rong]
  77. BitmapInfoHeader struc
  78. biSize dd 0
  79. biWidth dd 0
  80. biHeight dd 0
  81. biPlanes dw 0
  82. biBitCount dw 0
  83. biCompression dd 0
  84. biSizeImage dd 0
  85. biXPelsPerMeter dd 0
  86. biYPelsPerMeter dd 0
  87. biClrUsed dd 0
  88. biClrImportant dd 0
  89. BitmapInfoHeader ends
  90. BitmapInfo struc
  91. bmiHeader db (size BitmapInfoHeader) DUP (?)
  92. bmiColors db ? ; array of RGBQUADS
  93. BitmapInfo ends
  94. BitmapCoreInfo struc
  95. bmciHeader db (size BitmapCoreHeader) DUP (?)
  96. bmciColors db ? ; array of RGBTRIPLES
  97. BitmapCoreInfo ends
  98. BI_RGB equ 0h
  99. BI_RLE8 equ 1h
  100. BI_RLE4 equ 2h
  101. BI_BITFIELDS equ 3h
  102. BitmapV4Header struc
  103. bV4Size dd 0
  104. bV4Width dd 0
  105. bV4Height dd 0
  106. bV4Planes dw 0
  107. bV4BitCount dw 0
  108. bV4Compression dd 0
  109. bV4SizeImage dd 0
  110. bV4XPelsPerMeter dd 0
  111. bV4YPelsPerMeter dd 0
  112. bV4ClrUsed dd 0
  113. bV4ClrImportant dd 0
  114. bV4RedMask dd 0
  115. bV4GreenMask dd 0
  116. bV4BlueMask dd 0
  117. bV4AlphaMask dd 0
  118. bV4CSType dd 0
  119. bV4Endpoints db 36 dup (0)
  120. bV4GammaRed dd 0
  121. bV4GammaGreen dd 0
  122. bV4GammaBlue dd 0
  123. BitmapV4Header ends
  124. if 0
  125. */
  126. /* C definitions for DIBs, as defined in windows.h */
  127. typedef struct {
  128. DWORD bcSize;
  129. WORD bcWidth;
  130. WORD bcHeight;
  131. WORD bcPlanes;
  132. WORD bcBitCount;
  133. } BITMAPCOREHEADER;
  134. typedef BITMAPCOREHEADER FAR *LPBITMAPCOREHEADER;
  135. typedef BITMAPCOREHEADER *PBITMAPCOREHEADER;
  136. typedef struct {
  137. DWORD biSize;
  138. DWORD biWidth;
  139. DWORD biHeight;
  140. WORD biPlanes;
  141. WORD biBitCount;
  142. DWORD biCompression;
  143. DWORD biSizeImage;
  144. DWORD biXPelsPerMeter;
  145. DWORD biYPelsPerMeter;
  146. DWORD biClrUsed;
  147. DWORD biClrImportant;
  148. } BITMAPINFOHEADER;
  149. typedef BITMAPINFOHEADER FAR *LPBITMAPINFOHEADER;
  150. typedef BITMAPINFOHEADER *PBITMAPINFOHEADER;
  151. typedef struct {
  152. BYTE rgbtBlue;
  153. BYTE rgbtGreen;
  154. BYTE rgbtRed;
  155. } RGBTRIPLE;
  156. typedef struct {
  157. BYTE rgbBlue;
  158. BYTE rgbGreen;
  159. BYTE rgbRed;
  160. BYTE rgbReserved;
  161. } RGBQUAD;
  162. /* ICM Color Definitions */
  163. // The following two structures are used for defining RGB's in terms of
  164. // CIEXYZ. The values are fixed point 16.16.
  165. typedef long FXPT16DOT16, FAR *LPFXPT16DOT16;
  166. typedef long FXPT2DOT30, FAR *LPFXPT2DOT30;
  167. typedef struct tagCIEXYZ
  168. {
  169. FXPT2DOT30 ciexyzX;
  170. FXPT2DOT30 ciexyzY;
  171. FXPT2DOT30 ciexyzZ;
  172. } CIEXYZ;
  173. typedef CIEXYZ FAR *LPCIEXYZ;
  174. typedef struct tagICEXYZTRIPLE
  175. {
  176. CIEXYZ ciexyzRed;
  177. CIEXYZ ciexyzGreen;
  178. CIEXYZ ciexyzBlue;
  179. } CIEXYZTRIPLE;
  180. typedef CIEXYZTRIPLE FAR *LPCIEXYZTRIPLE;
  181. typedef struct {
  182. BITMAPCOREHEADER bmciHeader;
  183. RGBQUAD bmciColors[1];
  184. } BITMAPCOREINFO;
  185. typedef BITMAPCOREINFO FAR *LPBITMAPCOREINFO;
  186. typedef BITMAPCOREINFO *PBITMAPCOREINFO;
  187. typedef struct {
  188. BITMAPINFOHEADER bmiHeader;
  189. RGBQUAD bmiColors[1];
  190. } BITMAPINFO;
  191. typedef BITMAPINFO FAR *LPBITMAPINFO;
  192. typedef BITMAPINFO *PBITMAPINFO;
  193. typedef struct {
  194. DWORD bV4Size;
  195. LONG bV4Width;
  196. LONG bV4Height;
  197. WORD bV4Planes;
  198. WORD bV4BitCount;
  199. DWORD bV4V4Compression;
  200. DWORD bV4SizeImage;
  201. LONG bV4XPelsPerMeter;
  202. LONG bV4YPelsPerMeter;
  203. DWORD bV4ClrUsed;
  204. DWORD bV4ClrImportant;
  205. DWORD bV4RedMask;
  206. DWORD bV4GreenMask;
  207. DWORD bV4BlueMask;
  208. DWORD bV4AlphaMask;
  209. DWORD bV4CSType;
  210. CIEXYZTRIPLE bV4Endpoints;
  211. DWORD bV4GammaRed;
  212. DWORD bV4GammaGreen;
  213. DWORD bV4GammaBlue;
  214. } BITMAPV4HEADER, FAR *LPBITMAPV4HEADER, *PBITMAPV4HEADER;
  215. typedef struct {
  216. BITMAPV4HEADER bmv4Header;
  217. RGBQUAD bmv4Colors[1];
  218. } BITMAPV4INFO;
  219. typedef BITMAPV4INFO FAR *LPBITMAPV4INFO;
  220. typedef BITMAPV4INFO *PBITMAPV4INFO;
  221. /* currently, if the low byte of biCompression is non zero,
  222. * it must be one of following */
  223. #define BI_RGB 0x00
  224. #define BI_RLE8 0x01
  225. #define BI_RLE4 0x02
  226. #define BI_BITFIELDS 0x03
  227. #define BITMAP_SELECTED 0x01
  228. #define BITMAP_64K 0x01
  229. #define DIBSIGNATURE 0x4944
  230. /*
  231. endif
  232. if 0
  233. */
  234. #ifndef NOPTRC
  235. /*
  236. endif
  237. PTTYPE struc ;*/ typedef struct { /*
  238. xcoord dw 0 ;x coordinate of point ;*/ short int xcoord; /*
  239. ycoord dw 0 ;y coordinate of point ;*/ short int ycoord; /*
  240. PTTYPE ends ;*/ } PTTYPE; /*
  241. ;*/ typedef PTTYPE *PPOINT; /*
  242. ;*/ typedef PTTYPE FAR *LPPOINT; /*
  243. if 0
  244. */
  245. #define POINT PTTYPE
  246. /*
  247. endif
  248. RECT struc ;*/ typedef struct { /*
  249. left dw 0 ;*/ short int left, /*
  250. top dw 0 ;*/ top, /*
  251. right dw 0 ;*/ right, /*
  252. bottom dw 0 ;*/ bottom; /*
  253. RECT ends ;*/ } RECT; /*
  254. ;*/ typedef RECT *PRECT; /*
  255. if 0
  256. */
  257. #endif
  258. /*
  259. endif
  260. BOXTYPE struc ;*/ typedef struct { /*
  261. min db SIZE PTTYPE dup (?) ;x,y starting coord ;*/ PTTYPE min; /*
  262. ext db SIZE PTTYPE dup (?) ;x,y extents ;*/ PTTYPE ext; /*
  263. BOXTYPE ends ;*/ } BOXTYPE; /*
  264. ;*/ typedef RECT FAR * LPRECT; /*
  265. page
  266. ; Logical Object Definitions - incLogical
  267. ifdef incLogical
  268. if incLogical
  269. OBJ_PEN equ 1
  270. OBJ_BRUSH equ 2
  271. OBJ_FONT equ 3
  272. if 0
  273. */
  274. /* Object definitions used by GDI support routines written in C */
  275. #define OBJ_PEN 1
  276. #define OBJ_BRUSH 2
  277. #define OBJ_FONT 3
  278. /*
  279. endif
  280. LogBrush struc ;*/ typedef struct { /*
  281. lbStyle dw 0 ;Style of logical BRUSH ;*/ unsigned short int lbStyle; /*
  282. lbColor dd 0 ;RGB color ;*/ unsigned long int lbColor; /*
  283. lbHatch dw 0 ;Hatching style ;*/ unsigned short int lbHatch; /*
  284. lbBkColor dd 0 ;Background color for hatched brush ;*/ unsigned long int lbBkColor;/*
  285. lbhcmXform dd 0 ;transform for image color matching ;*/ unsigned long int lbhcmXform;/*
  286. LogBrush ends ;*/ } LOGBRUSH; /*
  287. lbPattern = lbColor ; pointer to physical pattern
  288. if 0
  289. */
  290. #define lbPattern lbColor
  291. /*
  292. endif
  293. ; Brush styles defined by GDI
  294. BS_SOLID equ 0
  295. BS_HOLLOW equ 1
  296. BS_HATCHED equ 2
  297. BS_PATTERN equ 3
  298. MaxBrushStyle equ 3
  299. ; Hatched Brush hatching styles defined by GDI
  300. HS_HORIZONTAL equ 0 ; Horizontal -----
  301. HS_VERTICAL equ 1 ; Vertical |||||
  302. HS_FDIAGONAL equ 2 ; Foreward Diagonal /////
  303. HS_BDIAGONAL equ 3 ; Backward Diagonal \\\\\
  304. HS_CROSS equ 4 ; Cross +++++
  305. HS_DIAGCROSS equ 5 ; Diagonal Cross XXXXX
  306. MaxHatchStyle equ 5
  307. if 0
  308. */
  309. /* Brush Style definitions used by GDI support routines written in C */
  310. #define BS_SOLID 0
  311. #define BS_HOLLOW 1
  312. #define BS_HATCHED 2
  313. #define BS_PATTERN 3
  314. #define MaxBrushStyle 3
  315. /* Hatch Style definitions used by GDI support routines written in C */
  316. #define HS_HORIZONTAL 0 /* ----- */
  317. #define HS_VERTICAL 1 /* ||||| */
  318. #define HS_FDIAGONAL 2 /* ///// */
  319. #define HS_BDIAGONAL 3 /* \\\\\ */
  320. #define HS_CROSS 4 /* +++++ */
  321. #define HS_DIAGCROSS 5 /* xxxxx */
  322. #define MaxHatchStyle 5
  323. /*
  324. endif
  325. ; Logical Pen Structure
  326. LogPen struc ;*/ typedef struct { /*
  327. lopnStyle dw 0 ;(solid, hollow, dashed..) ;*/ unsigned short int lopnStyle;/*
  328. lopnWidth dw 0 ;This is really a point type ;*/ PTTYPE lopnWidth;/*
  329. dw 0
  330. lopnColor dd 0 ;*/ unsigned long int lopnColor;/*
  331. lopnStyle2 dw 0 ;end caps and joins ;*/ unsigned short int lopnStyle2;/*
  332. lopnhcmXform dd 0 ;transform for image color matching ;*/ unsigned long int lopnhcmXform;/*
  333. LogPen ends ;*/ } LOGPEN; /*
  334. errnz <(SIZE PTTYPE) -4>
  335. ; Line Style definitions for lopnStyle
  336. LS_SOLID equ 0
  337. LS_DASHED equ 1
  338. LS_DOTTED equ 2
  339. LS_DOTDASHED equ 3
  340. LS_DASHDOTDOT equ 4
  341. LS_NOLINE equ 5
  342. LS_INSIDEFRAME equ 6
  343. MaxLineStyle equ LS_NOLINE
  344. ; Line Style definitions for lopnStyle2
  345. LS_ENDCAP_FLAT equ 01h
  346. LS_ENDCAP_ROUND equ 02h
  347. LS_ENDCAP_SQUARE equ 04h
  348. LS_JOIN_BEVEL equ 08h
  349. LS_JOIN_MITER equ 10h
  350. LS_JOIN_ROUND equ 20h
  351. if 0
  352. */
  353. /* Line Style definitions used by GDI support routines written in C */
  354. #define LS_SOLID 0
  355. #define LS_DASHED 1
  356. #define LS_DOTTED 2
  357. #define LS_DOTDASHED 3
  358. #define LS_DASHDOTDOT 4
  359. #define LS_NOLINE 5
  360. #define LS_INSIDEFRAME 6
  361. #define MaxLineStyle LS_NOLINE
  362. #define LS_ENDCAP_FLAT 0x01
  363. #define LS_ENDCAP_ROUND 0x02
  364. #define LS_ENDCAP_SQUARE 0x04
  365. #define LS_JOIN_BEVEL 0x08
  366. #define LS_JOIN_MITER 0x10
  367. #define LS_JOIN_ROUND 0x20
  368. /*
  369. endif
  370. ; Various constants for defining a logical font.
  371. OUT_DEFAULT_PRECIS equ 0
  372. OUT_STRING_PRECIS equ 1
  373. OUT_CHARACTER_PRECIS equ 2
  374. OUT_STROKE_PRECIS equ 3
  375. OUT_TT_PRECIS equ 4
  376. OUT_DEVICE_PRECIS equ 5
  377. OUT_RASTER_PRECIS equ 6
  378. OUT_TT_ONLY_PRECIS equ 7
  379. CLIP_DEFAULT_PRECIS equ 0
  380. CLIP_CHARACTER_PRECIS equ 1
  381. CLIP_STROKE_PRECIS equ 2
  382. CLIP_MASK equ 00Fh
  383. CLIP_LH_ANGLES equ 010h
  384. CLIP_TT_ALWAYS equ 020h
  385. CLIP_EMBEDDED equ 080h
  386. DEFAULT_QUALITY equ 0
  387. DRAFT_QUALITY equ 1
  388. PROOF_QUALITY equ 2
  389. DEFAULT_PITCH equ 0
  390. FIXED_PITCH equ 1
  391. VARIABLE_PITCH equ 2
  392. ANSI_CHARSET equ 0
  393. DEFAULT_CHARSET equ 1
  394. SYMBOL_CHARSET equ 2
  395. MAC_CHARSET equ 77
  396. SHIFTJIS_CHARSET equ 128
  397. HANGEUL_CHARSET equ 129
  398. CHINESEBIG5_CHARSET equ 136
  399. OEM_CHARSET equ 255
  400. ; GDI font families.
  401. FF_DONTCARE equ 00000000b ; Don't care or don't know.
  402. FF_ROMAN equ 00010000b ; Variable stroke width, serifed.
  403. ; Times Roman, Century Schoolbook, etc.
  404. FF_SWISS equ 00100000b ; Variable stroke width, sans-serifed.
  405. ; Helvetica, Swiss, etc.
  406. FF_MODERN equ 00110000b ; Constant stroke width, serifed or sans-serifed.
  407. ; Pica, Elite, Courier, etc.
  408. FF_SCRIPT equ 01000000b ; Cursive, etc.
  409. FF_DECORATIVE equ 01010000b ; Old English, etc.
  410. ; Font weights lightest to darkest.
  411. FW_DONTCARE equ 0d
  412. FW_THIN equ 100d
  413. FW_EXTRALIGHT equ 200d
  414. FW_LIGHT equ 300d
  415. FW_NORMAL equ 400d
  416. FW_MEDIUM equ 500d
  417. FW_SEMIBOLD equ 600d
  418. FW_BOLD equ 700d
  419. FW_EXTRABOLD equ 800d
  420. FW_HEAVY equ 900d
  421. FW_ULTRALIGHT equ FW_EXTRALIGHT
  422. FW_REGULAR equ FW_NORMAL
  423. FW_DEMIBOLD equ FW_SEMIBOLD
  424. FW_ULTRABOLD equ FW_EXTRABOLD
  425. FW_BLACK equ FW_HEAVY
  426. ; Enumeration font types.
  427. RASTER_FONTTYPE equ 1
  428. DEVICE_FONTTYPE equ 2
  429. if 0
  430. */
  431. /* The size to allocate for the lfFaceName field in the logical font. */
  432. #ifndef LF_FACESIZE
  433. #define LF_FACESIZE 32
  434. #endif
  435. /* Various constants for defining a logical font. */
  436. #define OUT_DEFAULT_PRECIS 0
  437. #define OUT_STRING_PRECIS 1
  438. #define OUT_CHARACTER_PRECIS 2
  439. #define OUT_STROKE_PRECIS 3
  440. #define OUT_TT_PRECIS 4
  441. #define OUT_DEVICE_PRECIS 5
  442. #define OUT_RASTER_PRECIS 6
  443. #define OUT_TT_ONLY_PRECIS 7
  444. #define CLIP_DEFAULT_PRECIS 0
  445. #define CLIP_CHARACTER_PRECIS 1
  446. #define CLIP_STROKE_PRECIS 2
  447. #define CLIP_MASK 0x0F
  448. #define CLIP_LH_ANGLES 0x10
  449. #define CLIP_TT_ALWAYS 0x20
  450. #define CLIP_EMBEDDED 0x80
  451. #define DEFAULT_QUALITY 0
  452. #define DRAFT_QUALITY 1
  453. #define PROOF_QUALITY 2
  454. #define DEFAULT_PITCH 0
  455. #define FIXED_PITCH 1
  456. #define VARIABLE_PITCH 2
  457. #define ANSI_CHARSET 0
  458. #define DEFAULT_CHARSET 1
  459. #define SYMBOL_CHARSET 2
  460. #define MAC_CHARSET 77
  461. #define SHIFTJIS_CHARSET 128
  462. #define HANGEUL_CHARSET 129
  463. #define CHINESEBIG5_CHARSET 136
  464. #define OEM_CHARSET 255
  465. /* GDI font families. */
  466. #define FF_DONTCARE (0<<4) /* Don't care or don't know. */
  467. #define FF_ROMAN (1<<4) /* Variable stroke width, serifed. */
  468. /* Times Roman, Century Schoolbook, etc.*/
  469. #define FF_SWISS (2<<4) /* Variable stroke width, sans-serifed. */
  470. /* Helvetica, Swiss, etc. */
  471. #define FF_MODERN (3<<4) /* Constant stroke width, serifed or sans-serifed. */
  472. /* Pica, Elite, Courier, etc. */
  473. #define FF_SCRIPT (4<<4) /* Cursive, etc. */
  474. #define FF_DECORATIVE (5<<4) /* Old English, etc. */
  475. /* Font weights lightest to darkest. */
  476. #define FW_DONTCARE 0
  477. #define FW_THIN 100
  478. #define FW_EXTRALIGHT 200
  479. #define FW_LIGHT 300
  480. #define FW_NORMAL 400
  481. #define FW_MEDIUM 500
  482. #define FW_SEMIBOLD 600
  483. #define FW_BOLD 700
  484. #define FW_EXTRABOLD 800
  485. #define FW_HEAVY 900
  486. #define FW_ULTRALIGHT FW_EXTRALIGHT
  487. #define FW_REGULAR FW_NORMAL
  488. #define FW_DEMIBOLD FW_SEMIBOLD
  489. #define FW_ULTRABOLD FW_EXTRABOLD
  490. #define FW_BLACK FW_HEAVY
  491. /* Enumeration font types. */
  492. #define RASTER_FONTTYPE 1
  493. #define DEVICE_FONTTYPE 2
  494. /*
  495. endif
  496. LogFont struc ;*/ typedef struct { /*
  497. lfHeight dw 0 ;*/ short int lfHeight; /*
  498. lfWidth dw 0 ;*/ short int lfWidth; /*
  499. lfEscapement dw 0 ;*/ short int lfEscapement; /*
  500. lfOrientation dw 0 ;*/ short int lfOrientation; /*
  501. lfWeight dw 0 ;*/ short int lfWeight; /*
  502. lfItalic db 0 ;*/ BYTE lfItalic; /*
  503. lfUnderline db 0 ;*/ BYTE lfUnderline; /*
  504. lfStrikeOut db 0 ;*/ BYTE lfStrikeOut; /*
  505. lfCharSet db 0 ;*/ BYTE lfCharSet; /*
  506. lfOutPrecision db 0 ;*/ BYTE lfOutPrecision; /*
  507. lfClipPrecision db 0 ;*/ BYTE lfClipPrecision; /*
  508. lfQuality db 0 ;*/ BYTE lfQuality; /*
  509. lfPitchAndFamily db 0 ;*/ BYTE lfPitchAndFamily; /*
  510. lfFaceName db 0 ; A variable length field for the face name.;*/ BYTE lfFaceName[LF_FACESIZE]; /*
  511. LogFont ends ;*/ } LOGFONT; /*
  512. endif
  513. endif
  514. page
  515. ; Device Definitions - incDevice
  516. ifdef incDevice
  517. if incDevice
  518. InquireInfo = 00000001b ;Inquire Device GDI Info
  519. EnableDevice = 00000000b ;Enable Device
  520. InfoContext = 8000h ;Inquire/Enable for information context
  521. ; Device Technologies
  522. DT_PLOTTER equ 0 ; Vector plotter
  523. DT_RASDISPLAY equ 1 ; Raster display
  524. DT_RASPRINTER equ 2 ; Raster printer
  525. DT_RASCAMERA equ 3 ; Raster camera
  526. DT_CHARSTREAM equ 4 ; Character-stream, PLP
  527. DT_METAFILE equ 5 ; Metafile, VDM
  528. DT_DISPFILE equ 6 ; Display-file
  529. DT_JUMBO equ 11 ; SPAG LJ cool thing
  530. ; Curve Capabilities
  531. CC_NONE equ 0000000000000000B ; Curves not supported
  532. CC_CIRCLES equ 0000000000000001B ; Can do circles
  533. CC_PIE equ 0000000000000010B ; Can do pie wedges
  534. CC_CHORD equ 0000000000000100B ; Can do chord arcs
  535. CC_ELLIPSES equ 0000000000001000B ; Can do ellipses (full arcs)
  536. CC_WIDE equ 0000000000010000B ; Can do wide lines
  537. CC_STYLED equ 0000000000100000B ; Can do styled lines
  538. CC_WIDESTYLED equ 0000000001000000B ; Can do wide styled lines
  539. CC_INTERIORS equ 0000000010000000B ; Can do interiors
  540. CC_ROUNDRECT equ 0000000100000000B ; Can do round rectangles
  541. CC_POLYBEZIER equ 0000001000000000B ; Can do beziers
  542. ; Line Capabilities
  543. LC_NONE equ 00000000B ; Lines not supported
  544. LC_POLYSCANLINE equ 00000001B ; Poly Scanlines supported
  545. LC_POLYLINE equ 00000010B ; Can do polylines
  546. LC_MARKER equ 00000100B ; Can do markers
  547. LC_POLYMARKER equ 00001000B ; Can do polymarkers
  548. LC_WIDE equ 00010000B ; Can do wide lines
  549. LC_STYLED equ 00100000B ; Can do styled lines
  550. LC_WIDESTYLED equ 01000000B ; Can do wide styled lines
  551. LC_INTERIORS equ 10000000B ; Can do interiors
  552. ; Polygonal Capabilities
  553. PC_NONE equ 0000000000000000B ; Polygonals not supported
  554. PC_ALTPOLYGON equ 0000000000000001B ; Can do alternate polygons
  555. PC_POLYGON equ 0000000000000001B ; an old name for ALTPOLYGON
  556. PC_RECTANGLE equ 0000000000000010B ; Can do rectangles
  557. PC_WINDPOLYGON equ 0000000000000100B ; Can do winding polygons
  558. PC_TRAPEZOID equ 0000000000000100B ; an old name for WINDPOLYGON
  559. PC_SCANLINE equ 0000000000001000B ; Can do scanlines
  560. PC_WIDE equ 0000000000010000B ; Can do wide borders
  561. PC_STYLED equ 0000000000100000B ; Can do styled borders
  562. PC_WIDESTYLED equ 0000000001000000B ; Can do wide styled borders
  563. PC_INTERIORS equ 0000000010000000B ; Can do interiors
  564. PC_POLYPOLYGON equ 0000000100000000B ; Can do PolyPolygons
  565. PC_PATHS equ 0000001000000000B ; Can do Paths
  566. ; Clipping Capabilities
  567. CP_NONE equ 00000000B ; No clipping at device level
  568. CP_RECTANGLE equ 00000001B ; Device Output clips to rectangles
  569. CP_REGION equ 00000010B ; Not supported.
  570. CP_REGION32 equ 00000100B ; Device Output clips to regions
  571. ; Text Capabilities
  572. TC_OP_CHARACTER equ 0000000000000001B ; Can do OutputPrecision CHARACTER
  573. TC_OP_STROKE equ 0000000000000010B ; Can do OutputPrecision STROKE
  574. TC_CP_STROKE equ 0000000000000100B ; Can do ClipPrecision STROKE
  575. TC_CR_90 equ 0000000000001000B ; Can do CharRotAbility 90
  576. TC_CR_ANY equ 0000000000010000B ; Can do CharRotAbility ANY
  577. TC_SF_X_YINDEP equ 0000000000100000B ; Can do ScaleFreedom X_YINDEPENDENT
  578. TC_SA_DOUBLE equ 0000000001000000B ; Can do ScaleAbility DOUBLE
  579. TC_SA_INTEGER equ 0000000010000000B ; Can do ScaleAbility INTEGER
  580. TC_SA_CONTIN equ 0000000100000000B ; Can do ScaleAbility CONTINUOUS
  581. TC_EA_DOUBLE equ 0000001000000000B ; Can do EmboldenAbility DOUBLE
  582. TC_IA_ABLE equ 0000010000000000B ; Can do ItalisizeAbility ABLE
  583. TC_UA_ABLE equ 0000100000000000B ; Can do UnderlineAbility ABLE
  584. TC_SO_ABLE equ 0001000000000000B ; Can do StrikeOutAbility ABLE
  585. TC_RA_ABLE equ 0010000000000000B ; Can do RasterFontAble ABLE
  586. TC_VA_ABLE equ 0100000000000000B ; Can do VectorFontAble ABLE
  587. TC_RESERVED equ 1000000000000000B ; Reserved. Must be returned zero.
  588. ; Raster Capabilities
  589. RC_NONE equ 0000000000000000b ; No Raster Capabilities
  590. RC_BITBLT equ 0000000000000001b ; Can do bitblt
  591. RC_BANDING equ 0000000000000010b ; Requires banding support
  592. RC_SCALING equ 0000000000000100b ; does scaling while banding
  593. RC_BITMAP64 equ 0000000000001000b ; supports >64k bitmaps
  594. RC_GDI20_OUTPUT equ 0000000000010000b ; has 2.0 output calls
  595. RC_GDI20_STATE equ 0000000000100000b ; dc has a state block
  596. RC_SAVEBITMAP equ 0000000001000000b ; can save bitmaps locally
  597. RC_DI_BITMAP equ 0000000010000000b ; can do device independent bitmaps
  598. RC_PALETTE equ 0000000100000000b ; can do color palette management
  599. RC_DIBTODEV equ 0000001000000000b ; can do SetDIBitsToDevice
  600. RC_BIGFONT equ 0000010000000000b ; does BIGFONTs
  601. RC_STRETCHBLT equ 0000100000000000b ; can do StretchBlt
  602. RC_FLOODFILL equ 0001000000000000b ; can do FloodFill
  603. RC_STRETCHDIB equ 0010000000000000b ; can do StretchDIBits
  604. RC_OP_DX_OUTPUT equ 0100000000000000b ;dev opaque and dx array capable
  605. RC_DEVBITS equ 1000000000000000b ; supports device bitmaps
  606. ; DC Management Flags
  607. DC_SPDevice equ 00000001b ;Seperate PDevice required per device/filename
  608. DC_1PDevice equ 00000010b ;Only 1 PDevice allowed per device/filename
  609. DC_IgnoreDFNP equ 00000100b ;Ignore device/filename pairs when matching
  610. ; dpCaps1 capability bits
  611. C1_TRANSPARENT equ 0000000000000001b ; supports transparency
  612. TC_TT_ABLE equ 0000000000000010b ; can do TT fonts through DDI or brute
  613. C1_TT_CR_ANY equ 0000000000000100b ; can do rotated TT fonts
  614. C1_EMF_COMPLIANT equ 0000000000001000b ; Win95 - supports metafile spooling
  615. C1_DIBENGINE equ 0000000000010000b ; DIB Engine compliant driver
  616. C1_GAMMA_RAMP equ 0000000000100000b ; supports gamma ramp setting
  617. C1_ICM equ 0000000001000000b ; does some form of ICM support
  618. C1_REINIT_ABLE equ 0000000010000000b ; driver supports ReEnable call
  619. C1_GLYPH_INDEX equ 0000000100000000b ; Driver supports glyph index fonts
  620. C1_BIT_PACKED equ 0000001000000000b ; Supports bit-packed glyphs
  621. C1_BYTE_PACKED equ 0000010000000000b ; Supports byte-packed glyphs
  622. C1_COLORCURSOR equ 0000100000000000b ; Supports color-cursors and async SetCursor
  623. C1_CMYK_ABLE equ 0001000000000000b ; Supports CMYK ColorRefs
  624. C1_SLOW_CARD equ 0010000000000000b ; Little or no acceleration (VGA, etc.)
  625. ; dpCapsFE capability bits
  626. FEC_TT_DBCS equ 0000000000100000b ; can output DBCS TT fonts correctly
  627. FEC_WIFE_ABLE equ 0000000010000000b ; can handle WIFE font as Engine font
  628. if 0
  629. */
  630. #define InquireInfo 0x01 /* Inquire Device GDI Info */
  631. #define EnableDevice 0x00 /* Enable Device */
  632. #define InfoContext 0x8000 /* Inquire/Enable for info context */
  633. /* Device Technologies */
  634. #define DT_PLOTTER 0 /* Vector plotter */
  635. #define DT_RASDISPLAY 1 /* Raster display */
  636. #define DT_RASPRINTER 2 /* Raster printer */
  637. #define DT_RASCAMERA 3 /* Raster camera */
  638. #define DT_CHARSTREAM 4 /* Character-stream, PLP */
  639. #define DT_METAFILE 5 /* Metafile, VDM */
  640. #define DT_DISPFILE 6 /* Display-file */
  641. #define DT_JUMBO 11 /* SPAG LJ cool thing */
  642. /* Curve Capabilities */
  643. #define CC_NONE 0x0000 /* Curves not supported */
  644. #define CC_CIRCLES 0x0001 /* Can do circles */
  645. #define CC_PIE 0x0002 /* Can do pie wedges */
  646. #define CC_CHORD 0x0004 /* Can do chord arcs */
  647. #define CC_ELLIPSES 0x0008 /* Can do ellipese */
  648. #define CC_WIDE 0x0010 /* Can do wide lines */
  649. #define CC_STYLED 0x0020 /* Can do styled lines */
  650. #define CC_WIDESTYLED 0x0040 /* Can do wide styled lines*/
  651. #define CC_INTERIORS 0x0080 /* Can do interiors */
  652. #define CC_ROUNDRECT 0x0100 /* Can do round rectangles */
  653. #define CC_POLYBEZIER 0x0200 /* Can do polybeziers */
  654. /* Line Capabilities */
  655. #define LC_NONE 0x0000 /* Lines not supported */
  656. #define LC_POLYSCANLINE 0x0001 /* Poly Scanlines supported*/
  657. #define LC_POLYLINE 0x0002 /* Can do polylines */
  658. #define LC_MARKER 0x0004 /* Can do markers */
  659. #define LC_POLYMARKER 0x0008 /* Can do polymarkers */
  660. #define LC_WIDE 0x0010 /* Can do wide lines */
  661. #define LC_STYLED 0x0020 /* Can do styled lines */
  662. #define LC_WIDESTYLED 0x0040 /* Can do wide styled lines*/
  663. #define LC_INTERIORS 0x0080 /* Can do interiors */
  664. /* Polygonal Capabilities */
  665. #define PC_NONE 0x0000 /* Polygonals not supported*/
  666. #define PC_ALTPOLYGON 0x0001 /* Can do even odd polygons*/
  667. #define PC_POLYGON 0x0001 /* old name for ALTPOLYGON */
  668. #define PC_RECTANGLE 0x0002 /* Can do rectangles */
  669. #define PC_WINDPOLYGON 0x0004 /* Can do winding polygons */
  670. #define PC_TRAPEZOID 0x0004 /* old name for WINDPOLYGON*/
  671. #define PC_SCANLINE 0x0008 /* Can do scanlines */
  672. #define PC_WIDE 0x0010 /* Can do wide borders */
  673. #define PC_STYLED 0x0020 /* Can do styled borders */
  674. #define PC_WIDESTYLED 0x0040 /* Can do wide styled borders*/
  675. #define PC_INTERIORS 0x0080 /* Can do interiors */
  676. #define PC_POLYPOLYGON 0x0100 /* Can do PolyPolygons */
  677. /* Clipping Capabilities */
  678. #define CP_NONE 0x0000 /* no clipping of Output */
  679. #define CP_RECTANGLE 0x0001 /* Output clipped to Rects */
  680. #define CP_REGION 0x0002 /* not supported */
  681. #define CP_REGION32 0x0004 /* Output clipped to regions */
  682. /* Text Capabilities */
  683. #define TC_OP_CHARACTER 0x0001 /* Can do OutputPrecision CHARACTER */
  684. #define TC_OP_STROKE 0x0002 /* Can do OutputPrecision STROKE */
  685. #define TC_CP_STROKE 0x0004 /* Can do ClipPrecision STROKE */
  686. #define TC_CR_90 0x0008 /* Can do CharRotAbility 90 */
  687. #define TC_CR_ANY 0x0010 /* Can do CharRotAbility ANY */
  688. #define TC_SF_X_YINDEP 0x0020 /* Can do ScaleFreedom X_YINDEPENDENT */
  689. #define TC_SA_DOUBLE 0x0040 /* Can do ScaleAbility DOUBLE */
  690. #define TC_SA_INTEGER 0x0080 /* Can do ScaleAbility INTEGER */
  691. #define TC_SA_CONTIN 0x0100 /* Can do ScaleAbility CONTINUOUS */
  692. #define TC_EA_DOUBLE 0x0200 /* Can do EmboldenAbility DOUBLE */
  693. #define TC_IA_ABLE 0x0400 /* Can do ItalisizeAbility ABLE */
  694. #define TC_UA_ABLE 0x0800 /* Can do UnderlineAbility ABLE */
  695. #define TC_SO_ABLE 0x1000 /* Can do StrikeOutAbility ABLE */
  696. #define TC_RA_ABLE 0x2000 /* Can do RasterFontAble ABLE */
  697. #define TC_VA_ABLE 0x4000 /* Can do VectorFontAble ABLE */
  698. #define TC_RESERVED 0x8000 /* Reserved. Must be returned zero. */
  699. /* Raster Capabilities */
  700. #define RC_NONE 0x0000 /* No Raster Capabilities */
  701. #define RC_BITBLT 0x0001 /* Can do bitblt */
  702. #define RC_BANDING 0x0002 /* Requires banding support */
  703. #define RC_SCALING 0x0004 /* does scaling while banding */
  704. #define RC_BITMAP64 0x0008 /* supports >64k bitmaps */
  705. #define RC_GDI20_OUTPUT 0x0010 /* has 2.0 output calls */
  706. #define RC_GDI20_STATE 0x0020 /* dc has a state block */
  707. #define RC_SAVEBITMAP 0x0040 /* can save bitmaps locally */
  708. #define RC_DI_BITMAP 0x0080 /* can do DIBs */
  709. #define RC_PALETTE 0x0100 /* can do color pal management */
  710. #define RC_DIBTODEV 0x0200 /* can do SetDIBitsToDevice */
  711. #define RC_BIGFONT 0x0400 /* can do BIGFONTs */
  712. #define RC_STRETCHBLT 0x0800 /* can do StretchBlt */
  713. #define RC_FLOODFILL 0x1000 /* can do FloodFill */
  714. #define RC_STRETCHDIB 0x2000 /* can do StretchDIBits */
  715. #define RC_OP_DX_OUTPUT 0x4000 /* can do smart ExtTextOut w/dx */
  716. #define RC_DEVBITS 0x8000 /* supports device bitmaps */
  717. /* DC Management Flags */
  718. #define DC_SPDevice 0000001 /* Seperate PDevice required per device/filename */
  719. #define DC_1PDevice 0000002 /* Only 1 PDevice allowed per device/filename */
  720. #define DC_IgnoreDFNP 0000004 /* Ignore device/filename pairs when matching */
  721. /* dpCaps1 capability bits */
  722. #define C1_TRANSPARENT 0x0001 /* supports transparency */
  723. #define TC_TT_ABLE 0x0002 /* can do TT through DDI or brute */
  724. #define C1_TT_CR_ANY 0x0004 /* can do rotated TT fonts */
  725. #define C1_EMF_COMPLIANT 0x0008 /* Win95 - supports metafile spooling */
  726. #define C1_DIBENGINE 0x0010 /* DIB Engine compliant driver */
  727. #define C1_GAMMA_RAMP 0x0020 /* supports gamma ramp setting */
  728. #define C1_ICM 0x0040 /* does some form of ICM support */
  729. #define C1_REINIT_ABLE 0x0080 /* Driver supports ReEnable */
  730. #define C1_GLYPH_INDEX 0x0100 /* Driver supports glyph index fonts */
  731. #define C1_BIT_PACKED 0x0200 /* Supports bit-packed glyphs */
  732. #define C1_BYTE_PACKED 0x0400 /* Supports byte-packed glyphs */
  733. #define C1_COLORCURSOR 0x0800 /* Driver supports color_cursors and async SetCursor */
  734. #define C1_CMYK_ABLE 0x1000 /* Driver supports CMYK ColorRefs */
  735. /* dpCapsFE capability bits */
  736. #define FEC_TT_DBCS 0x0020 /* can output DBCS TT fonts correctly */
  737. #define FEC_WIFE_ABLE 0x0080 /* can handle WIFE font as Engine font */
  738. /*
  739. endif
  740. GDIINFO struc ;*/ typedef struct { /*
  741. dpVersion dw 0 ; Version = 0100h for now ;*/ short int dpVersion; /*
  742. dpTechnology dw 0 ; Device classification ;*/ short int dpTechnology; /*
  743. dpHorzSize dw 0 ; Horizontal size in millimeters ;*/ short int dpHorzSize; /*
  744. dpVertSize dw 0 ; Vertical size in millimeters ;*/ short int dpVertSize; /*
  745. dpHorzRes dw 0 ; Horizontal width in pixels ;*/ short int dpHorzRes; /*
  746. dpVertRes dw 0 ; Vertical width in pixels ;*/ short int dpVertRes; /*
  747. dpBitsPixel dw 0 ; Number of bits per pixel ;*/ short int dpBitsPixel; /*
  748. dpPlanes dw 0 ; Number of planes ;*/ short int dpPlanes; /*
  749. dpNumBrushes dw 0 ; Number of brushes the device has ;*/ short int dpNumBrushes; /*
  750. dpNumPens dw 0 ; Number of pens the device has ;*/ short int dpNumPens; /*
  751. dpCapsFE dw 0 ; capability bits for Far East ;*/ short int dpCapsFE; /*
  752. dpNumFonts dw 0 ; Number of fonts the device has ;*/ short int dpNumFonts; /*
  753. dpNumColors dw 0 ; Number of colors in color table ;*/ short int dpNumColors; /*
  754. dpDEVICEsize dw 0 ; Size required for the device descriptor ;*/ short int dpDEVICEsize; /*
  755. dpCurves dw 0 ; Curves capabilities ;*/ unsigned short int /*
  756. ;*/ dpCurves; /*
  757. dpLines dw 0 ; Line capabilities ;*/ unsigned short int /*
  758. ;*/ dpLines; /*
  759. dpPolygonals dw 0 ; Polygonal capabilities ;*/ unsigned short int /*
  760. ;*/ dpPolygonals; /*
  761. dpText dw 0 ; Text capabilities ;*/ unsigned short int /*
  762. ;*/ dpText; /*
  763. dpClip dw 0 ; Clipping capabilities ;*/ unsigned short int /*
  764. ;*/ dpClip; /*
  765. dpRaster dw 0 ; Bitblt capabilities ;*/ unsigned short int /*
  766. ;*/ dpRaster; /*
  767. dpAspectX dw 0 ; Length of X leg ;*/ short int dpAspectX; /*
  768. dpAspectY dw 0 ; Length of Y leg ;*/ short int dpAspectY; /*
  769. dpAspectXY dw 0 ; Length of hypotenuse ;*/ short int dpAspectXY; /*
  770. dpStyleLen dw 0 ; Length of segment for line styles ;*/ short int dpStyleLen; /*
  771. dpMLoWin dw 0 ; Metric Lo res WinX,WinY (PTTYPE) ;*/ PTTYPE dpMLoWin; /*
  772. dw 0
  773. dpMLoVpt dw 0 ; Metric Lo res VptX,VptY (PTTYPE) ;*/ PTTYPE dpMLoVpt; /*
  774. dw 0
  775. dpMHiWin dw 0 ; Metric Hi res WinX,WinY (PTTYPE) ;*/ PTTYPE dpMHiWin; /*
  776. dw 0
  777. dpMHiVpt dw 0 ; Metric Hi res VptX,VptY (PTTYPE) ;*/ PTTYPE dpMHiVpt; /*
  778. dw 0
  779. dpELoWin dw 0 ; English Lo res WinX,WinY (PTTYPE) ;*/ PTTYPE dpELoWin; /*
  780. dw 0
  781. dpELoVpt dw 0 ; English Lo res VptX,VptY (PTTYPE) ;*/ PTTYPE dpELoVpt; /*
  782. dw 0
  783. dpEHiWin dw 0 ; English Hi res WinX,WinY (PTTYPE) ;*/ PTTYPE dpEHiWin; /*
  784. dw 0
  785. dpEHiVpt dw 0 ; English Hi res VptX,VptY (PTTYPE) ;*/ PTTYPE dpEHiVpt; /*
  786. dw 0
  787. dpTwpWin dw 0 ; Twips WinX,WinY (PTTYPE) ;*/ PTTYPE dpTwpWin; /*
  788. dw 0
  789. dpTwpVpt dw 0 ; Twips VptX,VptY (PTTYPE) ;*/ PTTYPE dpTwpVpt; /*
  790. dw 0
  791. dpLogPixelsX dw 0 ;Logical pixels/inch in X ;*/ short int dpLogPixelsX; /*
  792. dpLogPixelsY dw 0 ;Logical pixels/inch in Y ;*/ short int dpLogPixelsY; /*
  793. dpDCManage dw 0 ;DC Management flags ;*/ short int dpDCManage; /*
  794. dpCaps1 dw 0 ; more capability bits ;*/ unsigned short int dpCaps1; /*
  795. dpSpotSizeX dw 0 ;*/ short int futureuse4; /*
  796. dw 0 ;*/ short int futureuse5; /*
  797. dpSpotSizeY dw 0 ;*/ short int futureuse6; /*
  798. dw 0 ;*/ short int futureuse7; /*
  799. ; start of entries in version 3.0 of this structure
  800. dpNumPalReg dw 0 ; Number of entries in device's palette ;*/ WORD dpNumPalReg; /*
  801. dpPalReserved dw 0 ; Number of reserved entries palette ;*/ WORD dpPalReserved; /*
  802. dpColorRes dw 0 ; bits of color resolution (total) ;*/ WORD dpColorRes; /*
  803. GDIINFO ends ;*/ } GDIINFO; /*
  804. endif
  805. endif
  806. page
  807. ; Font Definitions
  808. ifdef incFont
  809. if incFont
  810. ; flags for extended textout
  811. ETO_GRAYED equ 0001h
  812. ETO_OPAQUE equ 0002h
  813. ETO_CLIPPED equ 0004h
  814. ETO_GLYPH_INDEX equ 0010h
  815. ETO_RTL equ 0080h
  816. ETO_BYTE_PACKED equ 0100h
  817. ETO_BIT_PACKED equ 0200h
  818. ETO_LEVEL_MODE equ 1000h
  819. PF_BITS_IS_ADDRESS equ 4
  820. PF_DEVICE_REALIZED equ 10000000B
  821. PF_RASTER_TYPE equ 0
  822. PF_VECTOR_TYPE equ 1
  823. PF_OTHER1_TYPE equ 2
  824. PF_OTHER2_TYPE equ 3
  825. PF_GLYPH_INDEX equ 20h
  826. PF_WIFE_TYPE equ 08h
  827. ; Glyph types for EngineGetGlyphBmp
  828. EGB_BITMAP equ 1
  829. EGB_OUTLINE equ 2
  830. EGB_GRAY2_BITMAP equ 8
  831. EGB_GRAY4_BITMAP equ 9
  832. EGB_GRAY8_BITMAP equ 10
  833. if 0
  834. */
  835. /* This bit in the dfType field signals that the dfBitsOffset field is an
  836. absolute memory address and should not be altered. */
  837. #define PF_BITS_IS_ADDRESS 4
  838. /* This bit in the dfType field signals that the font is device realized. */
  839. #define PF_DEVICE_REALIZED 0x80
  840. /* These bits in the dfType give the fonttype -
  841. raster, vector, other1, other2. */
  842. #define PF_RASTER_TYPE 0
  843. #define PF_VECTOR_TYPE 1
  844. #define PF_OTHER1_TYPE 2
  845. #define PF_OTHER2_TYPE 3
  846. #define PF_GLYPH_INDEX 0x20
  847. #define PF_WIFE_TYPE 0x08
  848. /* Glyph types for EngineGetGlyphBmp */
  849. #define EGB_BITMAP 1
  850. #define EGB_OUTLINE 2
  851. #define EGB_GRAY2_BITMAP 8
  852. #define EGB_GRAY4_BITMAP 9
  853. #define EGB_GRAY8_BITMAP 10
  854. /* The size to allocate for the dfMaps field in the physical font. */
  855. #ifndef DF_MAPSIZE
  856. #define DF_MAPSIZE 1
  857. #endif
  858. /*
  859. endif
  860. ; Font data structure passed to OEM routines. Refer to chapters 12 and
  861. ; 13 of the OEM adaptation guide for a complete description.
  862. FONTINFO struc ;*/ typedef struct { /*
  863. dfType dw 0 ; Type field for the font. ;*/ short int dfType; /*
  864. dfPoints dw 0 ; Point size of font. ;*/ short int dfPoints; /*
  865. dfVertRes dw 0 ; Vertical digitization. ;*/ short int dfVertRes; /*
  866. dfHorizRes dw 0 ; Horizontal digitization. ;*/ short int dfHorizRes; /*
  867. dfAscent dw 0 ; Baseline offset from char cell top. ;*/ short int dfAscent; /*
  868. dfInternalLeading dw 0 ; Internal leading included in font ;*/ short int dfInternalLeading; /*
  869. dfExternalLeading dw 0 ; Prefered extra space between lines ;*/ short int dfExternalLeading; /*
  870. dfItalic db 0 ; Flag specifying if italic. ;*/ BYTE dfItalic; /*
  871. dfUnderline db 0 ; Flag specifying if underlined. ;*/ BYTE dfUnderline; /*
  872. dfStrikeOut db 0 ; Flag specifying if struck out. ;*/ BYTE dfStrikeOut; /*
  873. dfWeight dw 0 ; Weight of font. ;*/ short int dfWeight; /*
  874. dfCharSet db 0 ; Character set of font. ;*/ BYTE dfCharSet; /*
  875. dfPixWidth dw 0 ; Width field for the font. ;*/ short int dfPixWidth; /*
  876. dfPixHeight dw 0 ; Height field for the font. ;*/ short int dfPixHeight; /*
  877. dfPitchAndFamily db 0 ; Flag specifying variable pitch, family. ;*/ BYTE dfPitchAndFamily; /*
  878. dfAvgWidth dw 0 ; Average character width. ;*/ short int dfAvgWidth; /*
  879. dfMaxWidth dw 0 ; Maximum character width. ;*/ short int dfMaxWidth; /*
  880. dfFirstChar db 0 ; First character in the font. ;*/ BYTE dfFirstChar; /*
  881. dfLastChar db 0 ; Last character in the font. ;*/ BYTE dfLastChar; /*
  882. dfDefaultChar db 0 ; Default character for out of range. ;*/ BYTE dfDefaultChar; /*
  883. dfBreakChar db 0 ; Character to define wordbreaks. ;*/ BYTE dfBreakChar; /*
  884. dfWidthBytes dw 0 ; Number of bytes in each row. ;*/ short int dfWidthBytes; /*
  885. dfDevice dd 0 ; Offset to device name. ;*/ unsigned long int dfDevice; /*
  886. dfFace dd 0 ; Offset to face name. ;*/ unsigned long int dfFace; /*
  887. dfBitsPointer dd 0 ; Bits pointer. ;*/ unsigned long int dfBitsPointer;/*
  888. dfBitsOffset dd 0 ; Offset to the begining of the bitmap. ;*/ unsigned long int dfBitsOffset;/*
  889. ; On the disk, this is relative to the
  890. ; begining of the file. In memory this is
  891. ; relative to the begining of this structure.
  892. dfReservedByte db 0 ; filler byte to WORD-align charoffset ;*/ BYTE dfReservedByte; /*
  893. dfCharOffset dw 0 ; Area for storing the character offsets, ;*/ unsigned short dfMaps[DF_MAPSIZE];/*
  894. ; facename, device name (opt), and bitmap.
  895. FONTINFO ends ;*/ } FONTINFO; /*
  896. SCALABLEFONTINFO struc ;*/ typedef struct { /*
  897. erType dw 0 ; Type field for the font. ;*/ short int erType; /*
  898. erPoints dw 0 ; Point size of font. ;*/ short int erPoints; /*
  899. erVertRes dw 0 ; Vertical digitization. ;*/ short int erVertRes; /*
  900. erHorizRes dw 0 ; Horizontal digitization. ;*/ short int erHorizRes; /*
  901. erAscent dw 0 ; Baseline offset from char cell top. ;*/ short int erAscent; /*
  902. erInternalLeading dw 0 ; Internal leading included in font ;*/ short int erInternalLeading; /*
  903. erExternalLeading dw 0 ; Prefered extra space between lines ;*/ short int erExternalLeading; /*
  904. erItalic db 0 ; Flag specifying if italic. ;*/ BYTE erItalic; /*
  905. erUnderline db 0 ; Flag specifying if underlined. ;*/ BYTE erUnderline; /*
  906. erStrikeOut db 0 ; Flag specifying if struck out. ;*/ BYTE erStrikeOut; /*
  907. erWeight dw 0 ; Weight of font. ;*/ short int erWeight; /*
  908. erCharSet db 0 ; Character set of font. ;*/ BYTE erCharSet; /*
  909. erPixWidth dw 0 ; Width field for the font. ;*/ short int erPixWidth; /*
  910. erPixHeight dw 0 ; Height field for the font. ;*/ short int erPixHeight; /*
  911. erPitchAndFamily db 0 ; Flag specifying pitch and family. ;*/ BYTE erPitchAndFamily; /*
  912. erAvgWidth dw 0 ; Average character width. ;*/ short int erAvgWidth; /*
  913. erMaxWidth dw 0 ; Maximum character width. ;*/ short int erMaxWidth; /*
  914. erFirstChar db 0 ; First character in the font. ;*/ BYTE erFirstChar; /*
  915. erLastChar db 0 ; Last character in the font. ;*/ BYTE erLastChar; /*
  916. erDefaultChar db 0 ; Default character for out of range. ;*/ BYTE erDefaultChar; /*
  917. erBreakChar db 0 ; Character to define wordbreaks. ;*/ BYTE erBreakChar; /*
  918. erWidthBytes dw 0 ; Number of bytes in each row. ;*/ short int erWidthBytes; /*
  919. erDevice dd 0 ; Offset to device name. ;*/ unsigned long int erDevice; /*
  920. erFace dd 0 ; Offset to face name. ;*/ unsigned long int erFace; /*
  921. erBitsPointer dd 0 ; Bits pointer. ;*/ unsigned long int erBitsPointer;/*
  922. erBitsOffset dd 0 ; Offset to the begining of the bitmap. ;*/ unsigned long int erBitsOffset;/*
  923. erFlags db 0 ; flags, and word align the stuff to come ;*/ BYTE erReservedByte; /*
  924. erUnderlinePos dw 0 ; underline position relative to cell origin ;*/ short int erUnderlinePos; /*
  925. erUnderlineThick dw 0 ; underline thickness ;*/ short int erUnderlineThick;/*
  926. erStrikeoutPos dw 0 ; Strikeout position relative to cell origin ;*/ short int erStrikeoutPos; /*
  927. erStrikeoutThick dw 0 ; strikeout thickness ;*/ short int erStrikeoutThick;/*
  928. SCALABLEFONTINFO ends ;*/ } SCALABLEFONTINFO; /*
  929. ;------------------------------------------------------------------------------
  930. ;-------------------------- 4.0 font structures -----------------------------
  931. ;------------------------------------------------------------------------------
  932. ; This font format has a simple font header. It contains a version field
  933. ; followed by a glyph format field, the total number of glyphs in the
  934. ; entire font, and the dword offset to the array of glyph offsets.
  935. ;------------------------------------------------------------------------------
  936. ;------------------------------------------------------------------------------
  937. ; The NF_LARGE flag indicates that the glyph offset table is
  938. ; array of DWORDs instead of WORD offsets AND that the glyphs
  939. ; have LARGExxxGLYPH headers instead of SMALLxxxGLYPH headers.
  940. ;------------------------------------------------------------------------------
  941. NF_BYTE_PACKED equ 0001h ; Byte aligned row format
  942. NF_BIT_PACKED equ 0002h ; Bit packed row format
  943. NF_FROM_BMP equ 0040h ; Derived from bitmap font
  944. NF_LARGE equ 0080h ; Large offsets and glyph headers
  945. NewFontSeg struct
  946. nfVersion dw 0 ; Font version (0x0400)
  947. nfFormat dw 0 ; Font format flags
  948. nfNumGlyphs dw 0 ; Number of glyphs in font
  949. nfGlyphOffset dd 0 ; Offset to glyph offset table
  950. nfAWTable dd 0 ; Offset to advance width table
  951. nfHeight dw 0 ; Height of font in pixels
  952. nfAscent dw 0 ; Distance from baseline to top
  953. nfUniqueID dd 0 ; Unique identifier for this PFont
  954. NewFontSeg ends
  955. ;---------------------- Byte-packed glyph structures ------------------------
  956. ;
  957. ; This structure is the header for a glyph stored in byte-packed
  958. ; row-oriented format. The glyph bitmap is stored immediately after
  959. ; the ROWGLYPH structure.
  960. ;------------------------------------------------------------------------------
  961. SMALLROWGLYPH struc
  962. srgOrgX db 0 ; Vector to glyph origin in bitmap
  963. srgOrgY db 0 ; from upper left corner
  964. srgWidth db 0 ; Width and height of glyph bmp in
  965. srgHeight db 0 ; pixels
  966. SMALLROWGLYPH ends
  967. LARGEROWGLYPH struc
  968. lrgOrgX dw 0 ; Vector to glyph origin in bitmap
  969. lrgOrgY dw 0 ; from upper left corner
  970. lrgWidth dw 0 ; Width and height of glyph bmp in
  971. lrgHeight dw 0 ; pixels
  972. LARGEROWGLYPH ends
  973. ;---------------------- Bit-packed glyph structures -------------------------
  974. ;
  975. ; This structure is the header for a glyph stored in bit-packed row-oriented
  976. ; format. The glyph bitmap is stored immediately after the BITGLYPH structure.
  977. ;
  978. ; Bit-packed format means that the glyph rows are packed together end-to-end.
  979. ; There is no padding out to byte boundaries at the end of a row. This
  980. ; format results in the highest performance on some accelerated cards and
  981. ; the smallest memory footprint.
  982. ;------------------------------------------------------------------------------
  983. SMALLBITGLYPH struc
  984. sbgOrgX db 0 ; Vector to glyph origin in bitmap
  985. sbgOrgY db 0 ; from upper left corner
  986. sbgWidth db 0 ; Width and height of glyph bmp in
  987. sbgHeight db 0 ; pixels
  988. sbgPixels dw 0 ; Total # of pixels in the glyph
  989. SMALLBITGLYPH ends
  990. LARGEBITGLYPH struc
  991. lbgOrgX dw 0 ; Vector to glyph origin in bitmap
  992. lbgOrgY dw 0 ; from upper left corner
  993. lbgWidth dw 0 ; Width and height of glyph bmp in
  994. lbgHeight dw 0 ; pixels
  995. lbgPixels dd 0 ; Total # of pixels in the glyph
  996. LARGEBITGLYPH ends
  997. TEXTXFORM struc ;*/ typedef struct { /*
  998. ftHeight dw 0 ;*/ short int ftHeight; /*
  999. ftWidth dw 0 ;*/ short int ftWidth; /*
  1000. ftEscapement dw 0 ;*/ short int ftEscapement; /*
  1001. ftOrientation dw 0 ;*/ short int ftOrientation; /*
  1002. ftWeight dw 0 ;*/ short int ftWeight; /*
  1003. ftItalic db 0 ;*/ BYTE ftItalic; /*
  1004. ftUnderline db 0 ;*/ BYTE ftUnderline; /*
  1005. ftStrikeOut db 0 ;*/ BYTE ftStrikeOut; /*
  1006. ftOutPrecision db 0 ;*/ BYTE ftOutPrecision; /*
  1007. ftClipPrecision db 0 ;*/ BYTE ftClipPrecision; /*
  1008. ftAccelerator dw 0 ;*/ unsigned short int /*
  1009. ;*/ ftAccelerator; /*
  1010. ftOverhang dw 0 ;*/ short int ftOverhang; /*
  1011. TEXTXFORM ends ;*/ } TEXTXFORM; /*
  1012. TEXTMETRIC struc ;*/ typedef struct { /*
  1013. tmHeight dw 0 ; Ascent+Descent ;*/ short int tmHeight; /*
  1014. tmAscent dw 0 ; Pixels above the baseline ;*/ short int tmAscent; /*
  1015. tmDescent dw 0 ; Pixels below the baseline ;*/ short int tmDescent; /*
  1016. tmInternalLeading dw 0 ; Internal leading included in font ;*/ short int tmInternalLeading; /*
  1017. tmExternalLeading dw 0 ; Prefered extra space between lines ;*/ short int tmExternalLeading; /*
  1018. tmAveCharWidth dw 0 ; Of the letter 'X' ;*/ short int tmAveCharWidth; /*
  1019. tmMaxCharWidth dw 0 ;*/ short int tmMaxCharWidth; /*
  1020. tmWeight dw 0 ;*/ short int tmWeight; /*
  1021. tmItalic db 0 ;*/ BYTE tmItalic; /*
  1022. tmUnderlined db 0 ;*/ BYTE tmUnderlined; /*
  1023. tmStruckOut db 0 ;*/ BYTE tmStruckOut; /*
  1024. tmFirstChar db 0 ;*/ BYTE tmFirstChar; /*
  1025. tmLastChar db 0 ;*/ BYTE tmLastChar; /*
  1026. tmDefaultChar db 0 ; dfDefaultChar+dfFirstChar ;*/ BYTE tmDefaultChar; /*
  1027. tmBreakChar db 0 ; dfBreakChar+dfFirstChar ;*/ BYTE tmBreakChar; /*
  1028. tmPitchAndFamily db 0 ; Low bit zero if fixed pitch, one if ;*/ BYTE tmPitchAndFamily; /*
  1029. ; variable. Family in high nibble.
  1030. tmCharSet db 0 ;*/ BYTE tmCharSet; /*
  1031. tmOverhang dw 0 ;*/ short int tmOverhang; /*
  1032. tmDigitizedAspectX dw 0 ; Digitization aspect ratio ;*/ short int tmDigitizedAspectX; /*
  1033. tmDigitizedAspectY dw 0 ; in X and Y. ;*/ short int tmDigitizedAspectY; /*
  1034. TEXTMETRIC ends ;*/ } TEXTMETRIC; /*
  1035. endif
  1036. endif
  1037. page
  1038. ; Drawing mode definitions - incDrawMode
  1039. ifdef incDrawMode
  1040. if incDrawMode
  1041. DRAWMODE struc ;*/ typedef struct { /*
  1042. Rop2 dw 0 ;The 16-bit encoded Logical op ;*/ short int Rop2; /*
  1043. bkMode dw 0 ;Background Mode (for text only) ;*/ short int bkMode; /*
  1044. bkColor dd 0 ;Physical background Color ;*/ unsigned long int bkColor; /*
  1045. TextColor dd 0 ;Physical text (forground) color ;*/ unsigned long int TextColor; /*
  1046. TBreakExtra dw 0 ; total pixles to stuff into a line ;*/ short int TBreakExtra;/*
  1047. BreakExtra dw 0 ; div(TBreakExtra, BreakCount) ;*/ short int BreakExtra; /*
  1048. BreakErr dw 0 ; running error term ;*/ short int BreakErr; /*
  1049. BreakRem dw 0 ; mod(TBreakExtra, BreakCount) ;*/ short int BreakRem; /*
  1050. BreakCount dw 0 ; count of breaks in the line ;*/ short int BreakCount; /*
  1051. CharExtra dw 0 ; extra pixles to stuff after each char ;*/ short int CharExtra; /*
  1052. ; (used to space out a font)
  1053. LbkColor dd 0 ;Logical background color ;*/ unsigned long int LbkColor; /*
  1054. LTextColor dd 0 ;Logical Text (forground) color ;*/ unsigned long int LTextColor; /*
  1055. ICMCXform dd 0 ;Transform for DIC image color matcher ;*/ DWORD ICMCXform; /*
  1056. StretchBltMode dw 0 ;Stretch Blt mode ;*/ short StretchBltMode; /*
  1057. eMiterLimit dd 0 ;Miter Limit (single precision IEEE float) ;*/ DWORD eMiterLimit;/*
  1058. DRAWMODE ends ;*/ } DRAWMODE; /*
  1059. ; Background Mode definitions
  1060. TRANSPARENT equ 1
  1061. OPAQUE equ 2
  1062. BKMODE_TRANSPARENT equ 1
  1063. BKMODE_OPAQUE equ 2
  1064. BKMODE_LEVEL1 equ 3
  1065. BKMODE_LEVEL2 equ 4
  1066. BKMODE_LEVEL3 equ 5
  1067. BKMODE_TRANSLATE equ 6
  1068. ; StretchBlt Mode definitions
  1069. STRETCH_ANDSCANS equ 1
  1070. STRETCH_ORSCANS equ 2
  1071. STRETCH_DELETESCANS equ 3
  1072. STRETCH_HALFTONE equ 4
  1073. SBM_BLACKONWHITE equ STRETCH_ANDSCANS
  1074. SBM_WHITEONBLACK equ STRETCH_ORSCANS
  1075. SBM_COLORONCOLOR equ STRETCH_DELETESCANS
  1076. SBM_HALFTONE equ STRETCH_HALFTONE
  1077. if 0
  1078. */
  1079. /* Background Mode definitions used by GDI support routines written in C */
  1080. #define TRANSPARENT 1
  1081. #define OPAQUE 2
  1082. #define BKMODE_TRANSPARENT 1
  1083. #define BKMODE_OPAQUE 2
  1084. #define BKMODE_LEVEL1 3
  1085. #define BKMODE_LEVEL2 4
  1086. #define BKMODE_LEVEL3 5
  1087. #define BKMODE_TRANSLATE 6
  1088. /* StretchBlt Mode definitions used by GDI support routines written in C */
  1089. #define STRETCH_ANDSCANS 1
  1090. #define STRETCH_ORSCANS 2
  1091. #define STRETCH_DELETESCANS 3
  1092. #define STRETCH_HALFTONE 4
  1093. #define SBM_BLACKONWHITE STRETCH_ANDSCANS
  1094. #define SBM_WHITEONBLACK STRETCH_ORSCANS
  1095. #define SBM_COLORONCOLOR STRETCH_DELETESCANS
  1096. #define SBM_HALFTONE STRETCH_HALFTONE
  1097. /*
  1098. endif
  1099. endif
  1100. endif
  1101. page
  1102. ; The SCAN structure used by OS_POLYSCANLINE and DRAWESCAPE.
  1103. ; The DRAWESCAPE structure is used by the DrawEcape DDI.
  1104. ifdef incPolyScanline
  1105. if incPolyScanline
  1106. SCAN struc ;*/ typedef struct { /*
  1107. scnPntCnt dw ? ;Count of X coords (not pairs) ;*/ short int scnPntCnt; /*
  1108. scnPntTop dw ? ;Top of scan (inclusive) ;*/ short int scnPntTop; /*
  1109. scnPntBottom dw ? ;Bottom of scan (exclusive) ;*/ short int scnPntBottom; /*
  1110. scnPntX dw 2 dup (?) ;Var. length array of X pairs ;*/ short int scnPntX[2]; /*
  1111. scnPntCntToo dw ? ;=scnPntCnt ;*/ short int scnPntCntToo; /*
  1112. SCAN ends ;*/ } SCAN, FAR* LPSCAN; /*
  1113. DRAWESCAPE struc ;*/ typedef struct { /*
  1114. de_cbSize dd ? ;sizeof(DRAWESCAPE) ;*/ DWORD cbSize; /*
  1115. de_lpDestDev dd ? ;PDEVICE or PBITMAP ;*/ LPVOID lpDestDev; /*
  1116. de_nEscape dd ? ;API parameter ;*/ DWORD nEscape; /*
  1117. de_cbInput dd ? ;API parameter ;*/ DWORD cbInput; /*
  1118. de_lpszInput dd ? ;API parameter ;*/ LPVOID lpInput; /*
  1119. de_ptOrigin dd ? ;origin of window ;*/ POINT ptOrigin; /*
  1120. de_dwUniq dd ? ;region uniqueness value ;*/ DWORD dwUniq; /*
  1121. de_rcBBox dw 4 dup (?) ;bounding box of region ;*/ RECT rcBBox; /*
  1122. de_cScans dd ? ;count of scans in region ;*/ DWORD cScans; /*
  1123. de_lpScan dd ? ;ptr to first scan in region ;*/ LPSCAN lpScan; /*
  1124. DRAWESCAPE ends ;*/ } DRAWESCAPE, FAR* LPDRAWESCAPE; /*
  1125. REGION struc ;*/ typedef struct { /*
  1126. rgn_id dw ? ;if LPREGION 0x8000 else LPRECT ;*/ WORD id; /*
  1127. rgn_cbSize dw ? ;sizeof(REGION) ;*/ WORD cbSize; /*
  1128. rgn_lprcClip dd ? ;NULL or region walking opt. ;*/ LPRECT lprcClip; /*
  1129. rgn_dwUniq dd ? ;region uniqueness value ;*/ DWORD dwUniq; /*
  1130. rgn_rcBBox dw 4 dup (?) ;bounding box of region ;*/ RECT rcBBox; /*
  1131. rgn_cScans dd ? ;count of scans in region ;*/ DWORD cScans; /*
  1132. rgn_lpScan dd ? ;ptr to first scan in region ;*/ LPSCAN lpScan; /*
  1133. REGION ends ;*/ } REGION, FAR* LPREGION; /*
  1134. endif ;incPolyScanline
  1135. endif ;incPolyScanline
  1136. ; Output Definitions - incOutput
  1137. ifdef incOutput
  1138. if incOutput
  1139. ; Output Style definitions used by GDI
  1140. OS_POLYBEZIER equ 1
  1141. OS_ARC equ 3
  1142. OS_SCANLINES equ 4
  1143. OS_POLYSCANLINE equ 5
  1144. OS_RECTANGLE equ 6
  1145. OS_ELLIPSE equ 7
  1146. OS_MARKER equ 8
  1147. OS_POLYLINE equ 18
  1148. OS_WINDPOLYGON equ 20
  1149. OS_TRAPEZOID equ 20 ; replaced with WINDPOLYGON
  1150. OS_ALTPOLYGON equ 22
  1151. OS_POLYGON equ 22 ; replaced with ALTPOLYGON
  1152. OS_PIE equ 23
  1153. OS_POLYMARKER equ 24
  1154. OS_CHORD equ 39
  1155. OS_CIRCLE equ 55
  1156. OS_POLYPOLYGON equ 4000h ; this bit is ORd with OS_WIND/ALTPOLYGON
  1157. OS_BEGINNSCAN equ 80
  1158. OS_ENDNSCAN equ 81
  1159. if 0
  1160. */
  1161. /* Output Style definitions used by GDI support routines written in C */
  1162. #define OS_POLYBEZIER 1
  1163. #define OS_ARC 3
  1164. #define OS_SCANLINES 4
  1165. #define OS_POLYSCANLINE 5
  1166. #define OS_RECTANGLE 6
  1167. #define OS_ELLIPSE 7
  1168. #define OS_MARKER 8
  1169. #define OS_POLYLINE 18
  1170. #define OS_TRAPEZOID 20 /* should really be WINDPOLYGON */
  1171. #define OS_WINDPOLYGON OS_TRAPEZOID
  1172. #define OS_POLYGON 22 /* should really be ALTPOLYGON */
  1173. #define OS_ALTPOLYGON OS_POLYGON
  1174. #define OS_PIE 23
  1175. #define OS_POLYMARKER 24
  1176. #define OS_CHORD 39
  1177. #define OS_CIRCLE 55
  1178. #define OS_POLYPOLYGON 0x4000 /* this bit is ORd with OS_WIND/ALTPOLYGON */
  1179. #define OS_BEGINNSCAN 80
  1180. #define OS_ENDNSCAN 81
  1181. /*
  1182. endif
  1183. endif
  1184. endif
  1185. ifdef incControl
  1186. if incControl
  1187. OEM_FAILED equ 8000000
  1188. ; GDI escape constants
  1189. NEWFRAME equ 1
  1190. ABORTDOC equ 2
  1191. NEXTBAND equ 3
  1192. SETCOLORTABLE equ 4
  1193. GETCOLORTABLE equ 5
  1194. FLUSHOUTPUT equ 6
  1195. DRAFTMODE equ 7
  1196. QUERYESCSUPPORT equ 8
  1197. SETPRINTERDC equ 9
  1198. SETABORTPROC equ 9
  1199. STARTDOC equ 10
  1200. ENDDOC equ 11
  1201. GETPHYSPAGESIZE equ 12
  1202. GETPRINTINGOFFSET equ 13
  1203. GETSCALINGFACTOR equ 14
  1204. MFCOMMENT equ 15
  1205. GETPENWIDTH equ 16
  1206. SETCOPYCOUNT equ 17
  1207. SELECTPAPERSOURCE equ 18
  1208. DEVICEDATA equ 19
  1209. PASSTHROUGH equ 19
  1210. GETTECHNOLGY equ 20
  1211. GETTECHNOLOGY equ 20
  1212. SETLINECAP equ 21
  1213. SETLINEJOIN equ 22
  1214. SETMITERLIMIT equ 23
  1215. BANDINFO equ 24
  1216. DRAWPATTERNRECT equ 25
  1217. GETVECTORPENSIZE equ 26
  1218. GETVECTORBRUSHSIZE equ 27
  1219. ENABLEDUPLEX equ 28
  1220. GETSETPAPERBINS equ 29
  1221. GETSETPRINTORIENT equ 30
  1222. ENUMPAPERBINS equ 31
  1223. SETDIBSCALING equ 32
  1224. EPSPRINTING equ 33
  1225. ENUMPAPERMETRICS equ 34
  1226. GETSETPAPERMETRICS equ 35
  1227. GETVERSION equ 36
  1228. POSTSCRIPT_DATA equ 37
  1229. POSTSCRIPT_IGNORE equ 38
  1230. MOUSETRAILS equ 39
  1231. QUERYROPSUPPORT equ 40
  1232. GETDEVICEUNITS equ 42
  1233. RESETDEVICE equ 128
  1234. GETEXTENDEDTEXTMETRICS equ 256
  1235. GETEXTENTTABLE equ 257
  1236. GETPAIRKERNTABLE equ 258
  1237. GETTRACKKERNTABLE equ 259
  1238. EXTTEXTOUT equ 512
  1239. GETFACENAME equ 513
  1240. DOWNLOADFACE equ 514
  1241. ENABLERELATIVEWIDTHS equ 768
  1242. ENABLEPAIRKERNING equ 769
  1243. SETKERNTRACK equ 770
  1244. SETALLJUSTVALUES equ 771
  1245. SETCHARSET equ 772
  1246. STRETCHBLT equ 2048
  1247. QUERYDIBSUPPORT equ 3073
  1248. QDI_SETDIBITS equ 1h
  1249. QDI_GETDIBITS equ 2h
  1250. QDI_DIBTOSCREEN equ 4h
  1251. QDI_STRETCHDIB equ 8h
  1252. DCICOMMAND equ 3075
  1253. BEGIN_PATH equ 4096
  1254. CLIP_TO_PATH equ 4097
  1255. END_PATH equ 4098
  1256. EXT_DEVICE_CAPS equ 4099
  1257. RESTORE_CTM equ 4100
  1258. SAVE_CTM equ 4101
  1259. SET_ARC_DIRECTION equ 4102
  1260. SET_BACKGROUND_COLOR equ 4103
  1261. SET_POLY_MODE equ 4104
  1262. SET_SCREEN_ANGLE equ 4105
  1263. SET_SPREAD equ 4106
  1264. TRANSFORM_CTM equ 4107
  1265. SET_CLIP_BOX equ 4108
  1266. SET_BOUNDS equ 4109
  1267. OPENCHANNEL equ 4110
  1268. DOWNLOADHEADER equ 4111
  1269. CLOSECHANNEL equ 4112
  1270. SETGDIXFORM equ 4113
  1271. RESETPAGE equ 4114
  1272. POSTSCRIPT_PASSTHROUGH equ 4115
  1273. ENCAPSULATED_POSTSCRIPT equ 4116
  1274. if 0
  1275. */
  1276. #define OEM_FAILED 0x80000000L
  1277. #define NEWFRAME 1
  1278. #define ABORTDOC 2
  1279. #define NEXTBAND 3
  1280. #define SETCOLORTABLE 4
  1281. #define GETCOLORTABLE 5
  1282. #define FLUSHOUTPUT 6
  1283. #define DRAFTMODE 7
  1284. #define QUERYESCSUPPORT 8
  1285. #define SETPRINTERDC 9 // DDK - between GDI and Driver
  1286. #define SETABORTPROC 9 // SDK - between APP and GDI
  1287. #define STARTDOC 10
  1288. #define ENDDOC 11
  1289. #define GETPHYSPAGESIZE 12
  1290. #define GETPRINTINGOFFSET 13
  1291. #define GETSCALINGFACTOR 14
  1292. #define MFCOMMENT 15
  1293. #define GETPENWIDTH 16
  1294. #define SETCOPYCOUNT 17
  1295. #define SELECTPAPERSOURCE 18
  1296. #define DEVICEDATA 19
  1297. #define PASSTHROUGH 19
  1298. #define GETTECHNOLGY 20
  1299. #define GETTECHNOLOGY 20
  1300. #define SETLINECAP 21
  1301. #define SETLINEJOIN 22
  1302. #define SETMITERLIMIT 23
  1303. #define BANDINFO 24
  1304. #define DRAWPATTERNRECT 25
  1305. #define GETVECTORPENSIZE 26
  1306. #define GETVECTORBRUSHSIZE 27
  1307. #define ENABLEDUPLEX 28
  1308. #define GETSETPAPERBINS 29
  1309. #define GETSETPRINTORIENT 30
  1310. #define ENUMPAPERBINS 31
  1311. #define SETDIBSCALING 32
  1312. #define EPSPRINTING 33
  1313. #define ENUMPAPERMETRICS 34
  1314. #define GETSETPAPERMETRICS 35
  1315. #define GETVERSION 36 /* ADOBE_11_1_88 */
  1316. #define POSTSCRIPT_DATA 37
  1317. #define POSTSCRIPT_IGNORE 38
  1318. #define QUERYROPSUPPORT 40
  1319. #define GETDEVICEUNITS 42
  1320. #define RESETDEVICE 128
  1321. #define GETEXTENDEDTEXTMETRICS 256
  1322. #define GETEXTENTTABLE 257
  1323. #define GETPAIRKERNTABLE 258
  1324. #define GETTRACKKERNTABLE 259
  1325. #define EXTTEXTOUT 512
  1326. #define GETFACENAME 513
  1327. #define DOWNLOADFACE 514 /* ADOBE_11_1_88 */
  1328. #define ENABLERELATIVEWIDTHS 768
  1329. #define ENABLEPAIRKERNING 769
  1330. #define SETKERNTRACK 770
  1331. #define SETALLJUSTVALUES 771
  1332. #define SETCHARSET 772
  1333. #define STRETCHBLT 2048
  1334. #define QUERYDIBSUPPORT 3073
  1335. #define QDI_SETDIBITS 0x0001
  1336. #define QDI_GETDIBITS 0x0002
  1337. #define QDI_DIBTOSCREEN 0x0004
  1338. #define QDI_STRETCHDIB 0x0008
  1339. #define DCICOMMAND 3075
  1340. #define BEGIN_PATH 4096
  1341. #define CLIP_TO_PATH 4097
  1342. #define END_PATH 4098
  1343. #define EXT_DEVICE_CAPS 4099
  1344. #define RESTORE_CTM 4100
  1345. #define SAVE_CTM 4101
  1346. #define SET_ARC_DIRECTION 4102
  1347. #define SET_BACKGROUND_COLOR 4103
  1348. #define SET_POLY_MODE 4104
  1349. #define SET_SCREEN_ANGLE 4105
  1350. #define SET_SPREAD 4106
  1351. #define TRANSFORM_CTM 4107
  1352. #define SET_CLIP_BOX 4108
  1353. #define SET_BOUNDS 4109
  1354. #define OPENCHANNEL 4110
  1355. #define DOWNLOADHEADER 4111
  1356. #define CLOSECHANNEL 4112
  1357. #define SETGDIXFORM 4113
  1358. #define RESETPAGE 4114
  1359. #define POSTSCRIPT_PASSTHROUGH 4115
  1360. #define ENCAPSULATED_POSTSCRIPT 4116
  1361. typedef FONTINFO FAR *LPFONTINFO;
  1362. typedef DRAWMODE FAR *LPDRAWMODE;
  1363. typedef TEXTXFORM FAR *LPTEXTXFORM;
  1364. typedef TEXTMETRIC FAR *LPTEXTMETRIC;
  1365. typedef LOGFONT FAR *LPLOGFONT;
  1366. typedef LOGPEN FAR *LPLOGPEN;
  1367. typedef LOGBRUSH FAR *LPLOGBRUSH;
  1368. typedef BITMAP FAR *LPBITMAP;
  1369. typedef FARPROC FAR *LPFARPROC;
  1370. typedef GDIINFO FAR *LPGDIINFO;
  1371. typedef SCALABLEFONTINFO FAR * LPSCALABLEFONTINFO;
  1372. /*
  1373. endif
  1374. endif
  1375. endif
  1376. ;*/