Source code of Windows XP (NT5)
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.

1292 lines
44 KiB

  1. ;/*
  2. ;***************************************************************************
  3. ; *
  4. ; Copyright (C) 1983,1984,1985 by Microsoft Inc. *
  5. ; *
  6. ;***************************************************************************
  7. ; GDI Definitions for Device Drivers
  8. ;
  9. ; Since most of the routines only need a portion of these definitions,
  10. ; conditional assembly flags have been defined in the various files
  11. ; to only include portions as needed (as opposed to having a lot of
  12. ; include files to mess with). The flags are as follows:
  13. ;
  14. ; incFont include font definitions
  15. ; incDevice include device definitions
  16. ; incLogical include logical object definitions
  17. ; incDrawmode include DrawMode structure definition
  18. ; incOutput include Output definitions
  19. ; incControl include Control definitions
  20. page
  21. ; General definitions that almost everyone will use.
  22. ; Physical Bitmap Structure
  23. ;
  24. ; Bitmap data structure passed to OEM routines. Defines the location and
  25. ; size of a main memory bitmap.
  26. BITMAP struc ;*/ typedef struct { /*
  27. bmType dw 0 ; 0 means main memory bitmap. Non-zero ;*/ short int bmType; /*
  28. ; is number of physical display and format
  29. ; of the rest of the structure known only
  30. ; to device driver
  31. bmWidth dw 0 ; Width of bitmap in pixels ;*/ unsigned short int bmWidth; /*
  32. bmHeight dw 0 ; Height of bitmap in pixels ;*/ unsigned short int bmHeight; /*
  33. bmWidthBytes dw 0 ; #bytes per scan line ;*/ unsigned short int bmWidthBytes; /*
  34. bmPlanes db 0 ; # of planes in bitmap ;*/ BYTE bmPlanes; /*
  35. bmBitsPixel db 0 ; # of bits per pixel ;*/ BYTE bmBitsPixel; /*
  36. bmBits dd 0 ; Far pointer to bits of main memory bitmap ;*/ BYTE FAR *bmBits; /*
  37. bmWidthPlanes dd 0 ; Product of bmWidthBytes and bmHeight ;*/ unsigned long int bmWidthPlanes;/*
  38. bmlpPDevice dd 0 ; Pointer to associated PDevice ;*/ BYTE FAR *bmlpPDevice; /*
  39. bmSegmentIndex dw 0 ; Index to plaens next segment if non-zero ;*/ unsigned short int bmSegmentIndex; /*
  40. bmScanSegment dw 0 ; Number of scans per segment ;*/ unsigned short int bmScanSegment; /*
  41. bmFillBytes dw 0 ; Number of unused bytes per segment ;*/ unsigned short int bmFillBytes; /*
  42. dw 0 ;*/ unsigned short int futureUse4; /*
  43. dw 0 ;*/ unsigned short int futureUse5; /*
  44. BITMAP ends ;*/ } BITMAP; /*
  45. ; structures used for Device Independent Bitmap (DIB) processing.
  46. ; all taken out of Presentation Manager's documentation
  47. ; Tuesday 25-October-1988 15:04 -by- Ron Gery [rong]
  48. ; C definitions are provided below (separately).
  49. ; triple used in PM1.1 (BitmapCoreInfo) format color table
  50. RGBTriple struc
  51. rgbtBlue db 0
  52. rgbtGreen db 0
  53. rgbtRed db 0
  54. RGBTriple ends
  55. ; RGB DWORD used in PM2.0 format color table
  56. RGBQuad struc
  57. rgbBlue db 0
  58. rgbGreen db 0
  59. rgbRed db 0
  60. rgbReserved db 0
  61. RGBQuad ends
  62. BitmapCoreHeader struc
  63. bcSize dd 0
  64. bcWidth dw 0
  65. bcHeight dw 0
  66. bcPlanes dw 0
  67. bcBitCount dw 0
  68. BitmapCoreHeader ends
  69. ; new format bitmap structure based on PM2.0 format DCR.
  70. ; Tuesday 23-May-1989 16:05 -by- Ron Gery [rong]
  71. BitmapInfoHeader struc
  72. biSize dd 0
  73. biWidth dd 0
  74. biHeight dd 0
  75. biPlanes dw 0
  76. biBitCount dw 0
  77. biCompression dd 0
  78. biSizeImage dd 0
  79. biXPelsPerMeter dd 0
  80. biYPelsPerMeter dd 0
  81. biClrUsed dd 0
  82. biClrImportant dd 0
  83. BitmapInfoHeader ends
  84. BitmapInfo struc
  85. bmiHeader db (size BitmapInfoHeader) DUP (?)
  86. bmiColors db ? ; array of RGBQUADS
  87. BitmapInfo ends
  88. BitmapCoreInfo struc
  89. bmciHeader db (size BitmapCoreHeader) DUP (?)
  90. bmciColors db ? ; array of RGBTRIPLES
  91. BitmapCoreInfo ends
  92. BI_RGB equ 0h
  93. BI_RLE8 equ 1h
  94. BI_RLE4 equ 2h
  95. if 0
  96. */
  97. /* C definitions for DIBs, as defined in windows.h */
  98. typedef struct {
  99. DWORD bcSize;
  100. WORD bcWidth;
  101. WORD bcHeight;
  102. WORD bcPlanes;
  103. WORD bcBitCount;
  104. } BITMAPCOREHEADER;
  105. typedef BITMAPCOREHEADER FAR *LPBITMAPCOREHEADER;
  106. typedef BITMAPCOREHEADER *PBITMAPCOREHEADER;
  107. typedef struct {
  108. DWORD biSize;
  109. DWORD biWidth;
  110. DWORD biHeight;
  111. WORD biPlanes;
  112. WORD biBitCount;
  113. DWORD biCompression;
  114. DWORD biSizeImage;
  115. DWORD biXPelsPerMeter;
  116. DWORD biYPelsPerMeter;
  117. DWORD biClrUsed;
  118. DWORD biClrImportant;
  119. } BITMAPINFOHEADER;
  120. typedef BITMAPINFOHEADER FAR *LPBITMAPINFOHEADER;
  121. typedef BITMAPINFOHEADER *PBITMAPINFOHEADER;
  122. typedef struct {
  123. BYTE rgbtBlue;
  124. BYTE rgbtGreen;
  125. BYTE rgbtRed;
  126. } RGBTRIPLE;
  127. typedef struct {
  128. BYTE rgbBlue;
  129. BYTE rgbGreen;
  130. BYTE rgbRed;
  131. BYTE rgbReserved;
  132. } RGBQUAD;
  133. typedef struct {
  134. BITMAPCOREHEADER bmicHeader;
  135. RGBQUAD bmiColors[1];
  136. } BITMAPINFO;
  137. typedef BITMAPINFO FAR *LPBITMAPINFO;
  138. typedef BITMAPINFO *PBITMAPINFO;
  139. /* currently, if the low byte of biCompression is non zero,
  140. * it must be one of following */
  141. #define BI_RGB 0x00
  142. #define BI_RLE8 0x01
  143. #define BI_RLE4 0x02
  144. #define BITMAP_SELECTED 0x01
  145. #define BITMAP_64K 0x01
  146. #define DIBSIGNATURE 0x4944
  147. /*
  148. endif
  149. if 0
  150. */
  151. #ifndef NOPTRC
  152. /*
  153. endif
  154. PTTYPE struc ;*/ typedef struct { /*
  155. xcoord dw 0 ;x coordinate of point ;*/ short int xcoord; /*
  156. ycoord dw 0 ;y coordinate of point ;*/ short int ycoord; /*
  157. PTTYPE ends ;*/ } PTTYPE; /*
  158. ;*/ typedef PTTYPE *PPOINT; /*
  159. ;*/ typedef PTTYPE FAR *LPPOINT; /*
  160. if 0
  161. */
  162. #define POINT PTTYPE
  163. /*
  164. endif
  165. RECT struc ;*/ typedef struct { /*
  166. left dw 0 ;*/ short int left, /*
  167. top dw 0 ;*/ top, /*
  168. right dw 0 ;*/ right, /*
  169. bottom dw 0 ;*/ bottom; /*
  170. RECT ends ;*/ } RECT; /*
  171. ;*/ typedef RECT *PRECT; /*
  172. if 0
  173. */
  174. #endif
  175. /*
  176. endif
  177. BOXTYPE struc ;*/ typedef struct { /*
  178. min db SIZE PTTYPE dup (?) ;x,y starting coord ;*/ PTTYPE min; /*
  179. ext db SIZE PTTYPE dup (?) ;x,y extents ;*/ PTTYPE ext; /*
  180. BOXTYPE ends ;*/ } BOXTYPE; /*
  181. ;*/ typedef RECT FAR * LPRECT; /*
  182. page
  183. ; Logical Object Definitions - incLogical
  184. ifdef incLogical
  185. if incLogical
  186. OBJ_PEN equ 1
  187. OBJ_BRUSH equ 2
  188. OBJ_FONT equ 3
  189. if 0
  190. */
  191. /* Object definitions used by GDI support routines written in C */
  192. #define OBJ_PEN 1
  193. #define OBJ_BRUSH 2
  194. #define OBJ_FONT 3
  195. /*
  196. endif
  197. LogBrush struc ;*/ typedef struct { /*
  198. lbStyle dw 0 ;Style of logical BRUSH ;*/ unsigned short int lbStyle; /*
  199. lbColor dd 0 ;RGB color ;*/ unsigned long int lbColor; /*
  200. lbHatch dw 0 ;Hatching style ;*/ unsigned short int lbHatch; /*
  201. lbBkColor dd 0 ;Background color for hatched brush ;*/ unsigned long int lbBkColor;/*
  202. LogBrush ends ;*/ } LOGBRUSH; /*
  203. lbPattern = lbColor ; pointer to physical pattern
  204. if 0
  205. */
  206. #define lbPattern lbColor
  207. /*
  208. endif
  209. ; Brush styles defined by GDI
  210. BS_SOLID equ 0
  211. BS_HOLLOW equ 1
  212. BS_HATCHED equ 2
  213. BS_PATTERN equ 3
  214. MaxBrushStyle equ 3
  215. ; Hatched Brush hatching styles defined by GDI
  216. HS_HORIZONTAL equ 0 ; Horizontal -----
  217. HS_VERTICAL equ 1 ; Vertical |||||
  218. HS_FDIAGONAL equ 2 ; Foreward Diagonal /////
  219. HS_BDIAGONAL equ 3 ; Backward Diagonal \\\\\
  220. HS_CROSS equ 4 ; Cross +++++
  221. HS_DIAGCROSS equ 5 ; Diagonal Cross XXXXX
  222. MaxHatchStyle equ 5
  223. if 0
  224. */
  225. /* Brush Style definitions used by GDI support routines written in C */
  226. #define BS_SOLID 0
  227. #define BS_HOLLOW 1
  228. #define BS_HATCHED 2
  229. #define BS_PATTERN 3
  230. #define MaxBrushStyle 3
  231. /* Hatch Style definitions used by GDI support routines written in C */
  232. #define HS_HORIZONTAL 0 /* ----- */
  233. #define HS_VERTICAL 1 /* ||||| */
  234. #define HS_FDIAGONAL 2 /* ///// */
  235. #define HS_BDIAGONAL 3 /* \\\\\ */
  236. #define HS_CROSS 4 /* +++++ */
  237. #define HS_DIAGCROSS 5 /* xxxxx */
  238. #define MaxHatchStyle 5
  239. /*
  240. endif
  241. ; Logical Pen Structure
  242. LogPen struc ;*/ typedef struct { /*
  243. lopnStyle dw 0 ;(solid, hollow, dashed..) ;*/ unsigned short int lopnStyle;/*
  244. lopnWidth dw 0 ;This is really a point type ;*/ PTTYPE lopnWidth;/*
  245. dw 0
  246. lopnColor dd 0 ;*/ unsigned long int lopnColor;/*
  247. LogPen ends ;*/ } LOGPEN; /*
  248. errnz <(SIZE PTTYPE) -4>
  249. ; Line Style definitions
  250. LS_SOLID equ 0
  251. LS_DASHED equ 1
  252. LS_DOTTED equ 2
  253. LS_DOTDASHED equ 3
  254. LS_DASHDOTDOT equ 4
  255. LS_NOLINE equ 5
  256. LS_INSIDEFRAME equ 6
  257. MaxLineStyle equ LS_NOLINE
  258. if 0
  259. */
  260. /* Line Style definitions used by GDI support routines written in C */
  261. #define LS_SOLID 0
  262. #define LS_DASHED 1
  263. #define LS_DOTTED 2
  264. #define LS_DOTDASHED 3
  265. #define LS_DASHDOTDOT 4
  266. #define LS_NOLINE 5
  267. #define LS_INSIDEFRAME 6
  268. #define MaxLineStyle LS_NOLINE
  269. /*
  270. endif
  271. ; Various constants for defining a logical font.
  272. OUT_DEFAULT_PRECIS equ 0
  273. OUT_STRING_PRECIS equ 1
  274. OUT_CHARACTER_PRECIS equ 2
  275. OUT_STROKE_PRECIS equ 3
  276. OUT_TT_PRECIS equ 4
  277. OUT_DEVICE_PRECIS equ 5
  278. OUT_RASTER_PRECIS equ 6
  279. OUT_TT_ONLY_PRECIS equ 7
  280. CLIP_DEFAULT_PRECIS equ 0
  281. CLIP_CHARACTER_PRECIS equ 1
  282. CLIP_STROKE_PRECIS equ 2
  283. CLIP_MASK equ 00Fh
  284. CLIP_LH_ANGLES equ 010h
  285. CLIP_TT_ALWAYS equ 020h
  286. CLIP_EMBEDDED equ 080h
  287. DEFAULT_QUALITY equ 0
  288. DRAFT_QUALITY equ 1
  289. PROOF_QUALITY equ 2
  290. DEFAULT_PITCH equ 0
  291. FIXED_PITCH equ 1
  292. VARIABLE_PITCH equ 2
  293. ANSI_CHARSET equ 0
  294. DEFAULT_CHARSET equ 1
  295. SYMBOL_CHARSET equ 2
  296. SHIFTJIS_CHARSET equ 128
  297. HANGEUL_CHARSET equ 129
  298. CHINESEBIG5_CHARSET equ 136
  299. OEM_CHARSET equ 255
  300. ; GDI font families.
  301. FF_DONTCARE equ 00000000b ; Don't care or don't know.
  302. FF_ROMAN equ 00010000b ; Variable stroke width, serifed.
  303. ; Times Roman, Century Schoolbook, etc.
  304. FF_SWISS equ 00100000b ; Variable stroke width, sans-serifed.
  305. ; Helvetica, Swiss, etc.
  306. FF_MODERN equ 00110000b ; Constant stroke width, serifed or sans-serifed.
  307. ; Pica, Elite, Courier, etc.
  308. FF_SCRIPT equ 01000000b ; Cursive, etc.
  309. FF_DECORATIVE equ 01010000b ; Old English, etc.
  310. ; Font weights lightest to darkest.
  311. FW_DONTCARE equ 0d
  312. FW_THIN equ 100d
  313. FW_EXTRALIGHT equ 200d
  314. FW_LIGHT equ 300d
  315. FW_NORMAL equ 400d
  316. FW_MEDIUM equ 500d
  317. FW_SEMIBOLD equ 600d
  318. FW_BOLD equ 700d
  319. FW_EXTRABOLD equ 800d
  320. FW_HEAVY equ 900d
  321. FW_ULTRALIGHT equ FW_EXTRALIGHT
  322. FW_REGULAR equ FW_NORMAL
  323. FW_DEMIBOLD equ FW_SEMIBOLD
  324. FW_ULTRABOLD equ FW_EXTRABOLD
  325. FW_BLACK equ FW_HEAVY
  326. ; Enumeration font types.
  327. RASTER_FONTTYPE equ 1
  328. DEVICE_FONTTYPE equ 2
  329. if 0
  330. */
  331. /* The size to allocate for the lfFaceName field in the logical font. */
  332. #ifndef LF_FACESIZE
  333. #define LF_FACESIZE 32
  334. #endif
  335. /* Various constants for defining a logical font. */
  336. #define OUT_DEFAULT_PRECIS 0
  337. #define OUT_STRING_PRECIS 1
  338. #define OUT_CHARACTER_PRECIS 2
  339. #define OUT_STROKE_PRECIS 3
  340. #define OUT_TT_PRECIS 4
  341. #define OUT_DEVICE_PRECIS 5
  342. #define OUT_RASTER_PRECIS 6
  343. #define OUT_TT_ONLY_PRECIS 7
  344. #define CLIP_DEFAULT_PRECIS 0
  345. #define CLIP_CHARACTER_PRECIS 1
  346. #define CLIP_STROKE_PRECIS 2
  347. #define CLIP_MASK 0x0F
  348. #define CLIP_LH_ANGLES 0x10
  349. #define CLIP_TT_ALWAYS 0x20
  350. #define CLIP_EMBEDDED 0x80
  351. #define DEFAULT_QUALITY 0
  352. #define DRAFT_QUALITY 1
  353. #define PROOF_QUALITY 2
  354. #define DEFAULT_PITCH 0
  355. #define FIXED_PITCH 1
  356. #define VARIABLE_PITCH 2
  357. #define ANSI_CHARSET 0
  358. #define DEFAULT_CHARSET 1
  359. #define SYMBOL_CHARSET 2
  360. #define SHIFTJIS_CHARSET 128
  361. #define HANGEUL_CHARSET 129
  362. #define CHINESEBIG5_CHARSET 136
  363. #define OEM_CHARSET 255
  364. /* GDI font families. */
  365. #define FF_DONTCARE (0<<4) /* Don't care or don't know. */
  366. #define FF_ROMAN (1<<4) /* Variable stroke width, serifed. */
  367. /* Times Roman, Century Schoolbook, etc.*/
  368. #define FF_SWISS (2<<4) /* Variable stroke width, sans-serifed. */
  369. /* Helvetica, Swiss, etc. */
  370. #define FF_MODERN (3<<4) /* Constant stroke width, serifed or sans-serifed. */
  371. /* Pica, Elite, Courier, etc. */
  372. #define FF_SCRIPT (4<<4) /* Cursive, etc. */
  373. #define FF_DECORATIVE (5<<4) /* Old English, etc. */
  374. /* Font weights lightest to darkest. */
  375. #define FW_DONTCARE 0
  376. #define FW_THIN 100
  377. #define FW_EXTRALIGHT 200
  378. #define FW_LIGHT 300
  379. #define FW_NORMAL 400
  380. #define FW_MEDIUM 500
  381. #define FW_SEMIBOLD 600
  382. #define FW_BOLD 700
  383. #define FW_EXTRABOLD 800
  384. #define FW_HEAVY 900
  385. #define FW_ULTRALIGHT FW_EXTRALIGHT
  386. #define FW_REGULAR FW_NORMAL
  387. #define FW_DEMIBOLD FW_SEMIBOLD
  388. #define FW_ULTRABOLD FW_EXTRABOLD
  389. #define FW_BLACK FW_HEAVY
  390. /* Enumeration font types. */
  391. #define RASTER_FONTTYPE 1
  392. #define DEVICE_FONTTYPE 2
  393. /*
  394. endif
  395. LogFont struc ;*/ typedef struct { /*
  396. lfHeight dw 0 ;*/ short int lfHeight; /*
  397. lfWidth dw 0 ;*/ short int lfWidth; /*
  398. lfEscapement dw 0 ;*/ short int lfEscapement; /*
  399. lfOrientation dw 0 ;*/ short int lfOrientation; /*
  400. lfWeight dw 0 ;*/ short int lfWeight; /*
  401. lfItalic db 0 ;*/ BYTE lfItalic; /*
  402. lfUnderline db 0 ;*/ BYTE lfUnderline; /*
  403. lfStrikeOut db 0 ;*/ BYTE lfStrikeOut; /*
  404. lfCharSet db 0 ;*/ BYTE lfCharSet; /*
  405. lfOutPrecision db 0 ;*/ BYTE lfOutPrecision; /*
  406. lfClipPrecision db 0 ;*/ BYTE lfClipPrecision; /*
  407. lfQuality db 0 ;*/ BYTE lfQuality; /*
  408. lfPitchAndFamily db 0 ;*/ BYTE lfPitchAndFamily; /*
  409. lfFaceName db 0 ; A variable length field for the face name.;*/ BYTE lfFaceName[LF_FACESIZE]; /*
  410. LogFont ends ;*/ } LOGFONT; /*
  411. endif
  412. endif
  413. page
  414. ; Device Definitions - incDevice
  415. ifdef incDevice
  416. if incDevice
  417. InquireInfo = 00000001b ;Inquire Device GDI Info
  418. EnableDevice = 00000000b ;Enable Device
  419. InfoContext = 8000h ;Inquire/Enable for information context
  420. ; Device Technologies
  421. DT_PLOTTER equ 0 ; Vector plotter
  422. DT_RASDISPLAY equ 1 ; Raster display
  423. DT_RASPRINTER equ 2 ; Raster printer
  424. DT_RASCAMERA equ 3 ; Raster camera
  425. DT_CHARSTREAM equ 4 ; Character-stream, PLP
  426. DT_METAFILE equ 5 ; Metafile, VDM
  427. DT_DISPFILE equ 6 ; Display-file
  428. ; Curve Capabilities
  429. CC_NONE equ 00000000B ; Curves not supported
  430. CC_CIRCLES equ 00000001B ; Can do circles
  431. CC_PIE equ 00000010B ; Can do pie wedges
  432. CC_CHORD equ 00000100B ; Can do chord arcs
  433. CC_ELLIPSES equ 00001000B ; Can do ellipese
  434. CC_WIDE equ 00010000B ; Can do wide lines
  435. CC_STYLED equ 00100000B ; Can do styled lines
  436. CC_WIDESTYLED equ 01000000B ; Can do wide styled lines
  437. CC_INTERIORS equ 10000000B ; Can do interiors
  438. CC_ROUNDRECT equ 0100000000B ; Can do round rectangles
  439. ; Line Capabilities
  440. LC_NONE equ 00000000B ; Lines not supported
  441. ; equ 00000001B ;
  442. LC_POLYLINE equ 00000010B ; Can do polylines
  443. LC_MARKER equ 00000100B ; Can do markers
  444. LC_POLYMARKER equ 00001000B ; Can do polymarkers
  445. LC_WIDE equ 00010000B ; Can do wide lines
  446. LC_STYLED equ 00100000B ; Can do styled lines
  447. LC_WIDESTYLED equ 01000000B ; Can do wide styled lines
  448. LC_INTERIORS equ 10000000B ; Can do interiors
  449. ; Polygonal Capabilities
  450. PC_NONE equ 00000000B ; Polygonals not supported
  451. PC_POLYGON equ 00000001B ; Can do polygons
  452. PC_RECTANGLE equ 00000010B ; Can do rectangles
  453. PC_WINDPOLYGON equ 00000100B ; Can do winding polygons
  454. PC_TRAPEZOID equ 00000100B ; Can do trapezoids
  455. PC_SCANLINE equ 00001000B ; Can do scanlines
  456. PC_WIDE equ 00010000B ; Can do wide borders
  457. PC_STYLED equ 00100000B ; Can do styled borders
  458. PC_WIDESTYLED equ 01000000B ; Can do wide styled borders
  459. PC_INTERIORS equ 10000000B ; Can do interiors
  460. ; Clipping Capabilities
  461. CP_NONE equ 00000000B ; No clipping at device level
  462. CP_RECTANGLE equ 00000001B ; Device Output clips to rectangles
  463. ; Text Capabilities
  464. TC_NONE equ 0000000000000000B ; Text not supported
  465. TC_OP_CHARACTER equ 0000000000000001B ; Can do OutputPrecision CHARACTER
  466. TC_OP_STROKE equ 0000000000000010B ; Can do OutputPrecision STROKE
  467. TC_CP_STROKE equ 0000000000000100B ; Can do ClipPrecision STROKE
  468. TC_CR_90 equ 0000000000001000B ; Can do CharRotAbility 90
  469. TC_CR_ANY equ 0000000000010000B ; Can do CharRotAbility ANY
  470. TC_SF_X_YINDEP equ 0000000000100000B ; Can do ScaleFreedom X_YINDEPENDENT
  471. TC_SA_DOUBLE equ 0000000001000000B ; Can do ScaleAbility DOUBLE
  472. TC_SA_INTEGER equ 0000000010000000B ; Can do ScaleAbility INTEGER
  473. TC_SA_CONTIN equ 0000000100000000B ; Can do ScaleAbility CONTINUOUS
  474. TC_EA_DOUBLE equ 0000001000000000B ; Can do EmboldenAbility DOUBLE
  475. TC_IA_ABLE equ 0000010000000000B ; Can do ItalisizeAbility ABLE
  476. TC_UA_ABLE equ 0000100000000000B ; Can do UnderlineAbility ABLE
  477. TC_SO_ABLE equ 0001000000000000B ; Can do StrikeOutAbility ABLE
  478. TC_RA_ABLE equ 0010000000000000B ; Can do RasterFontAble ABLE
  479. TC_VA_ABLE equ 0100000000000000B ; Can do VectorFontAble ABLE
  480. TC_RESERVED equ 1000000000000000B ; Reserved. Must be returned zero.
  481. ; Raster Capabilities
  482. RC_NONE equ 0000000000000000b ; No Raster Capabilities
  483. RC_BITBLT equ 0000000000000001b ; Can do bitblt
  484. RC_BANDING equ 0000000000000010b ; Requires banding support
  485. RC_SCALING equ 0000000000000100b ; Requires scaling support
  486. RC_BITMAP64 equ 0000000000001000b ; supports >64k bitmaps
  487. RC_GDI20_OUTPUT equ 0000000000010000b ; supports Window 2.0 output functions
  488. RC_GDI20_STATE equ 0000000000100000b ; DC has state block
  489. RC_SAVEBITMAP equ 0000000001000000b ; can save bitmaps locally
  490. RC_DI_BITMAP equ 0000000010000000b ; can do device independent bitmaps
  491. RC_PALETTE equ 0000000100000000b ; can do color palette management
  492. RC_DIBTODEV equ 0000001000000000b ; can do SetDIBitsToDevice
  493. RC_BIGFONT equ 0000010000000000b ; does BIGFONTs
  494. RC_STRETCHBLT equ 0000100000000000b ; can do StretchBlt
  495. RC_FLOODFILL equ 0001000000000000b ; can do FloodFill
  496. RC_STRETCHDIB equ 0010000000000000b ; can do StretchDIBits
  497. RC_OP_DX_OUTPUT equ 0100000000000000b ; can do opaque ext text out
  498. ; DC Management Flags
  499. DC_SPDevice equ 00000001b ;Seperate PDevice required per device/filename
  500. DC_1PDevice equ 00000010b ;Only 1 PDevice allowed per device/filename
  501. DC_IgnoreDFNP equ 00000100b ;Ignore device/filename pairs when matching
  502. ; dpCaps1 capability bits
  503. C1_TRANSPARENT equ 0000000000000001b ; supports transparency
  504. TC_TT_ABLE equ 0000000000000010b ; can do TT fonts through DDI or brute
  505. C1_TT_CR_ANY equ 0000000000000100b ; can do rotated TT fonts
  506. if 0
  507. */
  508. #define InquireInfo 0x01 /* Inquire Device GDI Info */
  509. #define EnableDevice 0x00 /* Enable Device */
  510. #define InfoContext 0x8000 /* Inquire/Enable for info context */
  511. /* Device Technologies */
  512. #define DT_PLOTTER 0 /* Vector plotter */
  513. #define DT_RASDISPLAY 1 /* Raster display */
  514. #define DT_RASPRINTER 2 /* Raster printer */
  515. #define DT_RASCAMERA 3 /* Raster camera */
  516. #define DT_CHARSTREAM 4 /* Character-stream, PLP */
  517. #define DT_METAFILE 5 /* Metafile, VDM */
  518. #define DT_DISPFILE 6 /* Display-file */
  519. /* Curve Capabilities */
  520. #define CC_NONE 00000000 /* Curves not supported */
  521. #define CC_CIRCLES 00000001 /* Can do circles */
  522. #define CC_PIE 00000002 /* Can do pie wedges */
  523. #define CC_CHORD 00000004 /* Can do chord arcs */
  524. #define CC_ELLIPSES 00000010 /* Can do ellipese */
  525. #define CC_WIDE 00000020 /* Can do wide lines */
  526. #define CC_STYLED 00000040 /* Can do styled lines */
  527. #define CC_WIDESTYLED 00000100 /* Can do wide styled lines*/
  528. #define CC_INTERIORS 00000200 /* Can do interiors */
  529. #define CC_ROUNDRECT 0x0100 /* Can do round rectangles */
  530. /* Line Capabilities */
  531. #define LC_NONE 00000000 /* Lines not supported */
  532. #define LC_POLYLINE 00000002 /* Can do polylines */
  533. #define LC_MARKER 00000004 /* Can do markers */
  534. #define LC_POLYMARKER 00000010 /* Can do polymarkers */
  535. #define LC_WIDE 00000020 /* Can do wide lines */
  536. #define LC_STYLED 00000040 /* Can do styled lines */
  537. #define LC_WIDESTYLED 00000100 /* Can do wide styled lines*/
  538. #define LC_INTERIORS 00000200 /* Can do interiors */
  539. /* Polygonal Capabilities */
  540. #define PC_NONE 00000000 /* Polygonals not supported*/
  541. #define PC_POLYGON 00000001 /* Can do polygons */
  542. #define PC_RECTANGLE 00000002 /* Can do rectangles */
  543. #define PC_WINDPOLYGON 00000004 /* Can do winding polygons */
  544. #define PC_TRAPEZOID 00000004 /* Can do trapezoids */
  545. #define PC_SCANLINE 00000010 /* Can do scanlines */
  546. #define PC_WIDE 00000020 /* Can do wide borders */
  547. #define PC_STYLED 00000040 /* Can do styled borders */
  548. #define PC_WIDESTYLED 00000100 /* Can do wide styled borders*/
  549. #define PC_INTERIORS 00000200 /* Can do interiors */
  550. /* Polygonal Capabilities */
  551. #define CP_NONE 00000000 /* no clipping of Output */
  552. #define CP_RECTANGLE 00000001 /* Output clipped to Rects */
  553. /* Text Capabilities */
  554. #define TC_OP_CHARACTER 0000001 /* Can do OutputPrecision CHARACTER */
  555. #define TC_OP_STROKE 0000002 /* Can do OutputPrecision STROKE */
  556. #define TC_CP_STROKE 0000004 /* Can do ClipPrecision STROKE */
  557. #define TC_CR_90 0000010 /* Can do CharRotAbility 90 */
  558. #define TC_CR_ANY 0000020 /* Can do CharRotAbility ANY */
  559. #define TC_SF_X_YINDEP 0000040 /* Can do ScaleFreedom X_YINDEPENDENT */
  560. #define TC_SA_DOUBLE 0000100 /* Can do ScaleAbility DOUBLE */
  561. #define TC_SA_INTEGER 0000200 /* Can do ScaleAbility INTEGER */
  562. #define TC_SA_CONTIN 0000400 /* Can do ScaleAbility CONTINUOUS */
  563. #define TC_EA_DOUBLE 0001000 /* Can do EmboldenAbility DOUBLE */
  564. #define TC_IA_ABLE 0002000 /* Can do ItalisizeAbility ABLE */
  565. #define TC_UA_ABLE 0004000 /* Can do UnderlineAbility ABLE */
  566. #define TC_SO_ABLE 0010000 /* Can do StrikeOutAbility ABLE */
  567. #define TC_RA_ABLE 0020000 /* Can do RasterFontAble ABLE */
  568. #define TC_VA_ABLE 0040000 /* Can do VectorFontAble ABLE */
  569. #define TC_RESERVED 0100000 /* Reserved. Must be returned zero. */
  570. /* Raster Capabilities */
  571. #define RC_NONE 00000000 /* No Raster Capabilities */
  572. #define RC_BITBLT 00000001 /* Can do bitblt */
  573. #define RC_BANDING 00000002 /* Requires banding support */
  574. #define RC_SCALING 00000004 /* Requires scaling support */
  575. #define RC_BITMAP64 00000010 /* supports >64k bitmaps */
  576. #define RC_GDI20_OUTPUT 00000020 /* support Windows 2.0 functions */
  577. #define RC_GDI20_STATE 00000040 /* dc has a state block */
  578. #define RC_SAVEBITMAP 00000100 /* can save bitmaps locally */
  579. #define RC_DI_BITMAP 00000200 /* can do device independent bitmaps*/
  580. #define RC_PALETTE 00000400 /* can do color palette management */
  581. #define RC_DIBTODEV 00001000 /* can do SetDIBitsToDevice */
  582. #define RC_BIGFONT 00002000 /* does BIGFONTs */
  583. #define RC_STRETCHBLT 00004000 /* can do StretchBlt */
  584. #define RC_FLOODFILL 00010000 /* can do FloodFill */
  585. #define RC_STRETCHDIB 00020000 /* can do StretchDIBits */
  586. /* DC Management Flags */
  587. #define DC_SPDevice 0000001 /* Seperate PDevice required per device/filename */
  588. #define DC_1PDevice 0000002 /* Only 1 PDevice allowed per device/filename */
  589. #define DC_IgnoreDFNP 0000004 /* Ignore device/filename pairs when matching */
  590. /* dpCaps1 capability bits */
  591. #define C1_TRANSPARENT 0x0001 /* supports transparency */
  592. #define TC_TT_ABLE 0x0002 /* can do TT fonts through DDI or brute */
  593. #define C1_TT_CR_ANY 0x0004 /* can do rotated TT fonts */
  594. /*
  595. endif
  596. GDIINFO struc ;*/ typedef struct { /*
  597. dpVersion dw 0 ; Version = 0100h for now ;*/ short int dpVersion; /*
  598. dpTechnology dw 0 ; Device classification ;*/ short int dpTechnology; /*
  599. dpHorzSize dw 0 ; Horizontal size in millimeters ;*/ short int dpHorzSize; /*
  600. dpVertSize dw 0 ; Vertical size in millimeters ;*/ short int dpVertSize; /*
  601. dpHorzRes dw 0 ; Horizontal width in pixels ;*/ short int dpHorzRes; /*
  602. dpVertRes dw 0 ; Vertical width in pixels ;*/ short int dpVertRes; /*
  603. dpBitsPixel dw 0 ; Number of bits per pixel ;*/ short int dpBitsPixel; /*
  604. dpPlanes dw 0 ; Number of planes ;*/ short int dpPlanes; /*
  605. dpNumBrushes dw 0 ; Number of brushes the device has ;*/ short int dpNumBrushes; /*
  606. dpNumPens dw 0 ; Number of pens the device has ;*/ short int dpNumPens; /*
  607. dw 0 ; Number of markers the device has ;*/ short int futureuse; /*
  608. dpNumFonts dw 0 ; Number of fonts the device has ;*/ short int dpNumFonts; /*
  609. dpNumColors dw 0 ; Number of colors in color table ;*/ short int dpNumColors; /*
  610. dpDEVICEsize dw 0 ; Size required for the device descriptor ;*/ short int dpDEVICEsize; /*
  611. dpCurves dw 0 ; Curves capabilities ;*/ unsigned short int /*
  612. ;*/ dpCurves; /*
  613. dpLines dw 0 ; Line capabilities ;*/ unsigned short int /*
  614. ;*/ dpLines; /*
  615. dpPolygonals dw 0 ; Polygonal capabilities ;*/ unsigned short int /*
  616. ;*/ dpPolygonals; /*
  617. dpText dw 0 ; Text capabilities ;*/ unsigned short int /*
  618. ;*/ dpText; /*
  619. dpClip dw 0 ; Clipping capabilities ;*/ unsigned short int /*
  620. ;*/ dpClip; /*
  621. dpRaster dw 0 ; Bitblt capabilities ;*/ unsigned short int /*
  622. ;*/ dpRaster; /*
  623. dpAspectX dw 0 ; Length of X leg ;*/ short int dpAspectX; /*
  624. dpAspectY dw 0 ; Length of Y leg ;*/ short int dpAspectY; /*
  625. dpAspectXY dw 0 ; Length of hypotenuse ;*/ short int dpAspectXY; /*
  626. dpStyleLen dw 0 ; Length of segment for line styles ;*/ short int dpStyleLen; /*
  627. dpMLoWin dw 0 ; Metric Lo res WinX,WinY (PTTYPE) ;*/ PTTYPE dpMLoWin; /*
  628. dw 0
  629. dpMLoVpt dw 0 ; Metric Lo res VptX,VptY (PTTYPE) ;*/ PTTYPE dpMLoVpt; /*
  630. dw 0
  631. dpMHiWin dw 0 ; Metric Hi res WinX,WinY (PTTYPE) ;*/ PTTYPE dpMHiWin; /*
  632. dw 0
  633. dpMHiVpt dw 0 ; Metric Hi res VptX,VptY (PTTYPE) ;*/ PTTYPE dpMHiVpt; /*
  634. dw 0
  635. dpELoWin dw 0 ; English Lo res WinX,WinY (PTTYPE) ;*/ PTTYPE dpELoWin; /*
  636. dw 0
  637. dpELoVpt dw 0 ; English Lo res VptX,VptY (PTTYPE) ;*/ PTTYPE dpELoVpt; /*
  638. dw 0
  639. dpEHiWin dw 0 ; English Hi res WinX,WinY (PTTYPE) ;*/ PTTYPE dpEHiWin; /*
  640. dw 0
  641. dpEHiVpt dw 0 ; English Hi res VptX,VptY (PTTYPE) ;*/ PTTYPE dpEHiVpt; /*
  642. dw 0
  643. dpTwpWin dw 0 ; Twips WinX,WinY (PTTYPE) ;*/ PTTYPE dpTwpWin; /*
  644. dw 0
  645. dpTwpVpt dw 0 ; Twips VptX,VptY (PTTYPE) ;*/ PTTYPE dpTwpVpt; /*
  646. dw 0
  647. dpLogPixelsX dw 0 ;Logical pixels/inch in X ;*/ short int dpLogPixelsX; /*
  648. dpLogPixelsY dw 0 ;Logical pixels/inch in Y ;*/ short int dpLogPixelsY; /*
  649. dpDCManage dw 0 ;DC Management flags ;*/ short int dpDCManage; /*
  650. dpCaps1 dw 0 ; more capability bits ;*/ unsigned short int dpCaps1; /*
  651. dpSpotSizeX dw 0 ;*/ short int futureuse4; /*
  652. dw 0 ;*/ short int futureuse5; /*
  653. dpSpotSizeY dw 0 ;*/ short int futureuse6; /*
  654. dw 0 ;*/ short int futureuse7; /*
  655. ; start of entries in version 3.0 of this structure
  656. dpNumPalReg dw 0 ; Number of entries in device's palette ;*/ WORD dpNumPalReg; /*
  657. dpPalReserved dw 0 ; Number of reserved entries palette ;*/ WORD dpPalReserved; /*
  658. dpColorRes dw 0 ; bits of color resolution (total) ;*/ WORD dpColorRes; /*
  659. GDIINFO ends ;*/ } GDIINFO; /*
  660. endif
  661. endif
  662. page
  663. ; Font Definitions
  664. ifdef incFont
  665. if incFont
  666. PF_BITS_IS_ADDRESS equ 4
  667. PF_DEVICE_REALIZED equ 10000000B
  668. PF_RASTER_TYPE equ 0
  669. PF_VECTOR_TYPE equ 1
  670. PF_OTHER1_TYPE equ 2
  671. PF_OTHER2_TYPE equ 3
  672. if 0
  673. */
  674. /* This bit in the dfType field signals that the dfBitsOffset field is an
  675. absolute memory address and should not be altered. */
  676. #define PF_BITS_IS_ADDRESS 4
  677. /* This bit in the dfType field signals that the font is device realized. */
  678. #define PF_DEVICE_REALIZED 0x80
  679. /* These bits in the dfType give the fonttype -
  680. raster, vector, other1, other2. */
  681. #define PF_RASTER_TYPE 0
  682. #define PF_VECTOR_TYPE 1
  683. #define PF_OTHER1_TYPE 2
  684. #define PF_OTHER2_TYPE 3
  685. /* The size to allocate for the dfMaps field in the physical font. */
  686. #ifndef DF_MAPSIZE
  687. #define DF_MAPSIZE 1
  688. #endif
  689. /*
  690. endif
  691. ; Font data structure passed to OEM routines. Refer to chapters 12 and
  692. ; 13 of the OEM adaptation guide for a complete description.
  693. FONTINFO struc ;*/ typedef struct { /*
  694. dfType dw 0 ; Type field for the font. ;*/ short int dfType; /*
  695. dfPoints dw 0 ; Point size of font. ;*/ short int dfPoints; /*
  696. dfVertRes dw 0 ; Vertical digitization. ;*/ short int dfVertRes; /*
  697. dfHorizRes dw 0 ; Horizontal digitization. ;*/ short int dfHorizRes; /*
  698. dfAscent dw 0 ; Baseline offset from char cell top. ;*/ short int dfAscent; /*
  699. dfInternalLeading dw 0 ; Internal leading included in font ;*/ short int dfInternalLeading; /*
  700. dfExternalLeading dw 0 ; Prefered extra space between lines ;*/ short int dfExternalLeading; /*
  701. dfItalic db 0 ; Flag specifying if italic. ;*/ BYTE dfItalic; /*
  702. dfUnderline db 0 ; Flag specifying if underlined. ;*/ BYTE dfUnderline; /*
  703. dfStrikeOut db 0 ; Flag specifying if struck out. ;*/ BYTE dfStrikeOut; /*
  704. dfWeight dw 0 ; Weight of font. ;*/ short int dfWeight; /*
  705. dfCharSet db 0 ; Character set of font. ;*/ BYTE dfCharSet; /*
  706. dfPixWidth dw 0 ; Width field for the font. ;*/ short int dfPixWidth; /*
  707. dfPixHeight dw 0 ; Height field for the font. ;*/ short int dfPixHeight; /*
  708. dfPitchAndFamily db 0 ; Flag specifying variable pitch, family. ;*/ BYTE dfPitchAndFamily; /*
  709. dfAvgWidth dw 0 ; Average character width. ;*/ short int dfAvgWidth; /*
  710. dfMaxWidth dw 0 ; Maximum character width. ;*/ short int dfMaxWidth; /*
  711. dfFirstChar db 0 ; First character in the font. ;*/ BYTE dfFirstChar; /*
  712. dfLastChar db 0 ; Last character in the font. ;*/ BYTE dfLastChar; /*
  713. dfDefaultChar db 0 ; Default character for out of range. ;*/ BYTE dfDefaultChar; /*
  714. dfBreakChar db 0 ; Character to define wordbreaks. ;*/ BYTE dfBreakChar; /*
  715. dfWidthBytes dw 0 ; Number of bytes in each row. ;*/ short int dfWidthBytes; /*
  716. dfDevice dd 0 ; Offset to device name. ;*/ unsigned long int dfDevice; /*
  717. dfFace dd 0 ; Offset to face name. ;*/ unsigned long int dfFace; /*
  718. dfBitsPointer dd 0 ; Bits pointer. ;*/ unsigned long int dfBitsPointer;/*
  719. dfBitsOffset dd 0 ; Offset to the begining of the bitmap. ;*/ unsigned long int dfBitsOffset;/*
  720. ; On the disk, this is relative to the
  721. ; begining of the file. In memory this is
  722. ; relative to the begining of this structure.
  723. dfReservedByte db 0 ; filler byte to WORD-align charoffset ;*/ BYTE dfReservedByte; /*
  724. dfCharOffset dw 0 ; Area for storing the character offsets, ;*/ unsigned short dfMaps[DF_MAPSIZE];/*
  725. ; facename, device name (opt), and bitmap.
  726. FONTINFO ends ;*/ } FONTINFO; /*
  727. SCALABLEFONTINFO struc ;*/ typedef struct { /*
  728. erType dw 0 ; Type field for the font. ;*/ short int erType; /*
  729. erPoints dw 0 ; Point size of font. ;*/ short int erPoints; /*
  730. erVertRes dw 0 ; Vertical digitization. ;*/ short int erVertRes; /*
  731. erHorizRes dw 0 ; Horizontal digitization. ;*/ short int erHorizRes; /*
  732. erAscent dw 0 ; Baseline offset from char cell top. ;*/ short int erAscent; /*
  733. erInternalLeading dw 0 ; Internal leading included in font ;*/ short int erInternalLeading; /*
  734. erExternalLeading dw 0 ; Prefered extra space between lines ;*/ short int erExternalLeading; /*
  735. erItalic db 0 ; Flag specifying if italic. ;*/ BYTE erItalic; /*
  736. erUnderline db 0 ; Flag specifying if underlined. ;*/ BYTE erUnderline; /*
  737. erStrikeOut db 0 ; Flag specifying if struck out. ;*/ BYTE erStrikeOut; /*
  738. erWeight dw 0 ; Weight of font. ;*/ short int erWeight; /*
  739. erCharSet db 0 ; Character set of font. ;*/ BYTE erCharSet; /*
  740. erPixWidth dw 0 ; Width field for the font. ;*/ short int erPixWidth; /*
  741. erPixHeight dw 0 ; Height field for the font. ;*/ short int erPixHeight; /*
  742. erPitchAndFamily db 0 ; Flag specifying pitch and family. ;*/ BYTE erPitchAndFamily; /*
  743. erAvgWidth dw 0 ; Average character width. ;*/ short int erAvgWidth; /*
  744. erMaxWidth dw 0 ; Maximum character width. ;*/ short int erMaxWidth; /*
  745. erFirstChar db 0 ; First character in the font. ;*/ BYTE erFirstChar; /*
  746. erLastChar db 0 ; Last character in the font. ;*/ BYTE erLastChar; /*
  747. erDefaultChar db 0 ; Default character for out of range. ;*/ BYTE erDefaultChar; /*
  748. erBreakChar db 0 ; Character to define wordbreaks. ;*/ BYTE erBreakChar; /*
  749. erWidthBytes dw 0 ; Number of bytes in each row. ;*/ short int erWidthBytes; /*
  750. erDevice dd 0 ; Offset to device name. ;*/ unsigned long int erDevice; /*
  751. erFace dd 0 ; Offset to face name. ;*/ unsigned long int erFace; /*
  752. erBitsPointer dd 0 ; Bits pointer. ;*/ unsigned long int erBitsPointer;/*
  753. erBitsOffset dd 0 ; Offset to the begining of the bitmap. ;*/ unsigned long int erBitsOffset;/*
  754. erFlags db 0 ; flags, and word align the stuff to come ;*/ BYTE erReservedByte; /*
  755. erUnderlinePos dw 0 ; underline position relative to cell origin ;*/ short int erUnderlinePos; /*
  756. erUnderlineThick dw 0 ; underline thickness ;*/ short int erUnderlineThick;/*
  757. erStrikeoutPos dw 0 ; Strikeout position relative to cell origin ;*/ short int erStrikeoutPos; /*
  758. erStrikeoutThick dw 0 ; strikeout thickness ;*/ short int erStrikeoutThick;/*
  759. SCALABLEFONTINFO ends ;*/ } SCALABLEFONTINFO; /*
  760. TEXTXFORM struc ;*/ typedef struct { /*
  761. ftHeight dw 0 ;*/ short int ftHeight; /*
  762. ftWidth dw 0 ;*/ short int ftWidth; /*
  763. ftEscapement dw 0 ;*/ short int ftEscapement; /*
  764. ftOrientation dw 0 ;*/ short int ftOrientation; /*
  765. ftWeight dw 0 ;*/ short int ftWeight; /*
  766. ftItalic db 0 ;*/ BYTE ftItalic; /*
  767. ftUnderline db 0 ;*/ BYTE ftUnderline; /*
  768. ftStrikeOut db 0 ;*/ BYTE ftStrikeOut; /*
  769. ftOutPrecision db 0 ;*/ BYTE ftOutPrecision; /*
  770. ftClipPrecision db 0 ;*/ BYTE ftClipPrecision; /*
  771. ftAccelerator dw 0 ;*/ unsigned short int /*
  772. ;*/ ftAccelerator; /*
  773. ftOverhang dw 0 ;*/ short int ftOverhang; /*
  774. TEXTXFORM ends ;*/ } TEXTXFORM; /*
  775. TEXTMETRIC struc ;*/ typedef struct { /*
  776. tmHeight dw 0 ; Ascent+Descent ;*/ short int tmHeight; /*
  777. tmAscent dw 0 ; Pixels above the baseline ;*/ short int tmAscent; /*
  778. tmDescent dw 0 ; Pixels below the baseline ;*/ short int tmDescent; /*
  779. tmInternalLeading dw 0 ; Internal leading included in font ;*/ short int tmInternalLeading; /*
  780. tmExternalLeading dw 0 ; Prefered extra space between lines ;*/ short int tmExternalLeading; /*
  781. tmAveCharWidth dw 0 ; Of the letter 'X' ;*/ short int tmAveCharWidth; /*
  782. tmMaxCharWidth dw 0 ;*/ short int tmMaxCharWidth; /*
  783. tmWeight dw 0 ;*/ short int tmWeight; /*
  784. tmItalic db 0 ;*/ BYTE tmItalic; /*
  785. tmUnderlined db 0 ;*/ BYTE tmUnderlined; /*
  786. tmStruckOut db 0 ;*/ BYTE tmStruckOut; /*
  787. tmFirstChar db 0 ;*/ BYTE tmFirstChar; /*
  788. tmLastChar db 0 ;*/ BYTE tmLastChar; /*
  789. tmDefaultChar db 0 ; dfDefaultChar+dfFirstChar ;*/ BYTE tmDefaultChar; /*
  790. tmBreakChar db 0 ; dfBreakChar+dfFirstChar ;*/ BYTE tmBreakChar; /*
  791. tmPitchAndFamily db 0 ; Low bit zero if fixed pitch, one if ;*/ BYTE tmPitchAndFamily; /*
  792. ; variable. Family in high nibble.
  793. tmCharSet db 0 ;*/ BYTE tmCharSet; /*
  794. tmOverhang dw 0 ;*/ short int tmOverhang; /*
  795. tmDigitizedAspectX dw 0 ; Digitization aspect ratio ;*/ short int tmDigitizedAspectX; /*
  796. tmDigitizedAspectY dw 0 ; in X and Y. ;*/ short int tmDigitizedAspectY; /*
  797. TEXTMETRIC ends ;*/ } TEXTMETRIC; /*
  798. endif
  799. endif
  800. page
  801. ; Drawing mode definitions - incDrawMode
  802. ifdef incDrawMode
  803. if incDrawMode
  804. DRAWMODE struc ;*/ typedef struct { /*
  805. Rop2 dw 0 ;The 16-bit encoded Logical op ;*/ short int Rop2; /*
  806. bkMode dw 0 ;Background Mode (for text only) ;*/ short int bkMode; /*
  807. bkColor dd 0 ;Physical background Color ;*/ unsigned long int bkColor; /*
  808. TextColor dd 0 ;Physical text (forground) color ;*/ unsigned long int TextColor; /*
  809. TBreakExtra dw 0 ; total pixles to stuff into a line ;*/ short int TBreakExtra;/*
  810. BreakExtra dw 0 ; div(TBreakExtra, BreakCount) ;*/ short int BreakExtra; /*
  811. BreakErr dw 0 ; running error term ;*/ short int BreakErr; /*
  812. BreakRem dw 0 ; mod(TBreakExtra, BreakCount) ;*/ short int BreakRem; /*
  813. BreakCount dw 0 ; count of breaks in the line ;*/ short int BreakCount; /*
  814. CharExtra dw 0 ; extra pixles to stuff after each char ;*/ short int CharExtra; /*
  815. ; (used to space out a font)
  816. LbkColor dd 0 ;Logical background color ;*/ unsigned long int LbkColor; /*
  817. LTextColor dd 0 ;Logical Text (forground) color ;*/ unsigned long int LTextColor; /*
  818. DRAWMODE ends ;*/ } DRAWMODE; /*
  819. ; Background Mode definitions
  820. TRANSPARENT equ 1
  821. OPAQUE equ 2
  822. if 0
  823. */
  824. /* Background Mode definitions used by GDI support routines written in C */
  825. #define TRANSPARENT 1
  826. #define OPAQUE 2
  827. /*
  828. endif
  829. endif
  830. endif
  831. page
  832. ; Output Definitions - incOutput
  833. ifdef incOutput
  834. if incOutput
  835. ; Output Style definitions used by GDI
  836. OS_ARC equ 3
  837. OS_SCANLINES equ 4
  838. OS_RECTANGLE equ 6
  839. OS_ELLIPSE equ 7
  840. OS_MARKER equ 8
  841. OS_POLYLINE equ 18
  842. OS_TRAPEZOID equ 20
  843. OS_POLYGON equ 22
  844. OS_PIE equ 23
  845. OS_POLYMARKER equ 24
  846. OS_CHORD equ 39
  847. OS_CIRCLE equ 55
  848. OS_BEGINNSCAN equ 80
  849. OS_ENDNSCAN equ 81
  850. if 0
  851. */
  852. /* Output Style definitions used by GDI support routines written in C */
  853. #define OS_ARC 3
  854. #define OS_SCANLINES 4
  855. #define OS_RECTANGLE 6
  856. #define OS_ELLIPSE 7
  857. #define OS_MARKER 8
  858. #define OS_POLYLINE 18
  859. #define OS_TRAPEZOID 20
  860. #define OS_POLYGON 22
  861. #define OS_PIE 23
  862. #define OS_POLYMARKER 24
  863. #define OS_CHORD 39
  864. #define OS_CIRCLE 55
  865. #define OS_BEGINNSCAN 80
  866. #define OS_ENDNSCAN 81
  867. /*
  868. endif
  869. endif
  870. endif
  871. ifdef incControl
  872. if incControl
  873. OEM_FAILED equ 8000000
  874. ; GDI escape constants
  875. NEWFRAME equ 1
  876. ABORTDOC equ 2
  877. NEXTBAND equ 3
  878. SETCOLORTABLE equ 4
  879. GETCOLORTABLE equ 5
  880. FLUSHOUTPUT equ 6
  881. DRAFTMODE equ 7
  882. QUERYESCSUPPORT equ 8
  883. SETPRINTERDC equ 9
  884. SETABORTPROC equ 9
  885. STARTDOC equ 10
  886. ENDDOC equ 11
  887. GETPHYSPAGESIZE equ 12
  888. GETPRINTINGOFFSET equ 13
  889. GETSCALINGFACTOR equ 14
  890. MFCOMMENT equ 15
  891. GETPENWIDTH equ 16
  892. SETCOPYCOUNT equ 17
  893. SELECTPAPERSOURCE equ 18
  894. DEVICEDATA equ 19
  895. PASSTHROUGH equ 19
  896. GETTECHNOLGY equ 20
  897. GETTECHNOLOGY equ 20
  898. SETLINECAP equ 21
  899. SETLINEJOIN equ 22
  900. SETMITERLIMIT equ 23
  901. BANDINFO equ 24
  902. DRAWPATTERNRECT equ 25
  903. GETVECTORPENSIZE equ 26
  904. GETVECTORBRUSHSIZE equ 27
  905. ENABLEDUPLEX equ 28
  906. GETSETPAPERBINS equ 29
  907. GETSETPRINTORIENT equ 30
  908. ENUMPAPERBINS equ 31
  909. SETDIBSCALING equ 32
  910. EPSPRINTING equ 33
  911. ENUMPAPERMETRICS equ 34
  912. GETSETPAPERMETRICS equ 35
  913. POSTSCRIPT_DATA equ 37
  914. POSTSCRIPT_IGNORE equ 38
  915. MOUSETRAILS equ 39
  916. RESETDEVICE equ 128
  917. GETEXTENDEDTEXTMETRICS equ 256
  918. GETEXTENTTABLE equ 257
  919. GETPAIRKERNTABLE equ 258
  920. GETTRACKKERNTABLE equ 259
  921. EXTTEXTOUT equ 512
  922. GETFACENAME equ 513
  923. ENABLERELATIVEWIDTHS equ 768
  924. ENABLEPAIRKERNING equ 769
  925. SETKERNTRACK equ 770
  926. SETALLJUSTVALUES equ 771
  927. SETCHARSET equ 772
  928. STRETCHBLT equ 2048
  929. BEGIN_PATH equ 4096
  930. CLIP_TO_PATH equ 4097
  931. END_PATH equ 4098
  932. EXT_DEVICE_CAPS equ 4099
  933. RESTORE_CTM equ 4100
  934. SAVE_CTM equ 4101
  935. SET_ARC_DIRECTION equ 4102
  936. SET_BACKGROUND_COLOR equ 4103
  937. SET_POLY_MODE equ 4104
  938. SET_SCREEN_ANGLE equ 4105
  939. SET_SPREAD equ 4106
  940. TRANSFORM_CTM equ 4107
  941. SET_CLIP_BOX equ 4108
  942. SET_BOUNDS equ 4109
  943. if 0
  944. */
  945. #define OEM_FAILED 0x80000000L
  946. #define NEWFRAME 1
  947. #define ABORTDOC 2
  948. #define NEXTBAND 3
  949. #define SETCOLORTABLE 4
  950. #define GETCOLORTABLE 5
  951. #define FLUSHOUTPUT 6
  952. #define DRAFTMODE 7
  953. #define QUERYESCSUPPORT 8
  954. #define SETPRINTERDC 9 // DDK - between GDI and Driver
  955. #define SETABORTPROC 9 // SDK - between APP and GDI
  956. #define STARTDOC 10
  957. #define ENDDOC 11
  958. #define GETPHYSPAGESIZE 12
  959. #define GETPRINTINGOFFSET 13
  960. #define GETSCALINGFACTOR 14
  961. #define MFCOMMENT 15
  962. #define GETPENWIDTH 16
  963. #define SETCOPYCOUNT 17
  964. #define SELECTPAPERSOURCE 18
  965. #define DEVICEDATA 19
  966. #define PASSTHROUGH 19
  967. #define GETTECHNOLGY 20
  968. #define GETTECHNOLOGY 20
  969. #define SETLINECAP 21
  970. #define SETLINEJOIN 22
  971. #define SETMITERLIMIT 23
  972. #define BANDINFO 24
  973. #define DRAWPATTERNRECT 25
  974. #define GETVECTORPENSIZE 26
  975. #define GETVECTORBRUSHSIZE 27
  976. #define ENABLEDUPLEX 28
  977. #define GETSETPAPERBINS 29
  978. #define GETSETPRINTORIENT 30
  979. #define ENUMPAPERBINS 31
  980. #define SETDIBSCALING 32
  981. #define EPSPRINTING 33
  982. #define ENUMPAPERMETRICS 34
  983. #define GETSETPAPERMETRICS 35
  984. #define POSTSCRIPT_DATA 37
  985. #define POSTSCRIPT_IGNORE 38
  986. #define RESETDEVICE 128
  987. #define GETEXTENDEDTEXTMETRICS 256
  988. #define GETEXTENTTABLE 257
  989. #define GETPAIRKERNTABLE 258
  990. #define GETTRACKKERNTABLE 259
  991. #define EXTTEXTOUT 512
  992. #define GETFACENAME 513
  993. #define ENABLERELATIVEWIDTHS 768
  994. #define ENABLEPAIRKERNING 769
  995. #define SETKERNTRACK 770
  996. #define SETALLJUSTVALUES 771
  997. #define SETCHARSET 772
  998. #define STRETCHBLT 2048
  999. #define BEGIN_PATH 4096
  1000. #define CLIP_TO_PATH 4097
  1001. #define END_PATH 4098
  1002. #define EXT_DEVICE_CAPS 4099
  1003. #define RESTORE_CTM 4100
  1004. #define SAVE_CTM 4101
  1005. #define SET_ARC_DIRECTION 4102
  1006. #define SET_BACKGROUND_COLOR 4103
  1007. #define SET_POLY_MODE 4104
  1008. #define SET_SCREEN_ANGLE 4105
  1009. #define SET_SPREAD 4106
  1010. #define TRANSFORM_CTM 4107
  1011. #define SET_CLIP_BOX 4108
  1012. #define SET_BOUNDS 4109
  1013. typedef FONTINFO FAR *LPFONTINFO;
  1014. typedef DRAWMODE FAR *LPDRAWMODE;
  1015. typedef TEXTXFORM FAR *LPTEXTXFORM;
  1016. typedef TEXTMETRIC FAR *LPTEXTMETRIC;
  1017. typedef LOGFONT FAR *LPLOGFONT;
  1018. typedef LOGPEN FAR *LPLOGPEN;
  1019. typedef LOGBRUSH FAR *LPLOGBRUSH;
  1020. typedef BITMAP FAR *LPBITMAP;
  1021. typedef FARPROC FAR *LPFARPROC;
  1022. typedef GDIINFO FAR *LPGDIINFO;
  1023. typedef SCALABLEFONTINFO FAR * LPSCALABLEFONTINFO;
  1024. /*
  1025. endif
  1026. endif
  1027. endif
  1028. ;*/