home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 August / PCWorld_2000-08_cd.bin / Software / TemaCD / xbasic / xbpro.exe / xb / gdi32.dec < prev    next >
Text File  |  2000-01-13  |  14KB  |  250 lines

  1. '
  2. '
  3. ' ###################  Max Reason
  4. ' #####  gdi32  #####  copyright 1988-2000
  5. ' ###################  Windows XBasic declarations for Windows "gdi32"
  6. '
  7. ' subject to GPLL license - see gpll.txt
  8. '
  9. ' maxreason@maxreason.com
  10. '
  11. ' for Windows XBasic
  12. '
  13. '
  14. ' ###########################
  15. ' #####  declare types  #####
  16. ' ###########################
  17. '
  18. TYPE DOCINFO
  19.   ULONG .size 
  20.   ULONG .docName 
  21.   ULONG .output
  22.   ULONG .dataType 
  23.   ULONG .type
  24. END TYPE
  25. '
  26. '
  27. ' ###############################
  28. ' #####  declare functions  #####
  29. ' ###############################
  30. '
  31. EXTERNAL FUNCTION  Arc                        (hdc, left, top, right, bottom, x1, y1, x2, y2)
  32. EXTERNAL FUNCTION  BitBlt                     (hdc, x, y, w, h, hdcImage, xSrc, ySrc, mode)
  33. EXTERNAL FUNCTION  CreateCompatibleBitmap     (hdc, width, height)
  34. EXTERNAL FUNCTION  CreateCompatibleDC         (hdc)
  35. EXTERNAL FUNCTION  CreateDCA                  (driverName,printerName,portName,InitData)
  36. EXTERNAL FUNCTION  CreateFontIndirectA        (logFontAddr)
  37. EXTERNAL FUNCTION  CreateRectRgn              (left, top, right, bottom)
  38. EXTERNAL FUNCTION  CreateSolidBrush           (color)
  39. EXTERNAL FUNCTION  CreatePen                  (style, width, color)
  40. EXTERNAL FUNCTION  DeleteDC                   (hdc)
  41. EXTERNAL FUNCTION  DeleteObject               (object)
  42. EXTERNAL FUNCTION  Ellipse                    (hdc, left, top, right, bottom)
  43. EXTERNAL FUNCTION  EndDoc                     (hdc) 
  44. EXTERNAL FUNCTION  EndPage                    (hdc)
  45. EXTERNAL FUNCTION  EnumFontFamiliesA          (hdc, fontNameAddr, callbackProc, lParam)
  46. EXTERNAL FUNCTION  GdiFlush                   ()
  47. EXTERNAL FUNCTION  GdiSetBatchLimit           (limit)
  48. EXTERNAL FUNCTION  GetCurrentObject           (hdc, objType)
  49. EXTERNAL FUNCTION  GetDeviceCaps              (hdc, index)
  50. EXTERNAL FUNCTION  GetDIBits                  (hdc, hBitmap, startScan, scanLines, dataAddr, infoAddr, usage)
  51. EXTERNAL FUNCTION  GetMapMode                 (hdc)
  52. EXTERNAL FUNCTION  GetPixel                   (hdc, x, y)
  53. EXTERNAL FUNCTION  GetStockObject             (object)
  54. EXTERNAL FUNCTION  GetTextExtentPointA        (hdc, textAddr, lenText, stringSize)
  55. EXTERNAL FUNCTION  GetTextMetricsA            (hdc, textMetric)
  56. EXTERNAL FUNCTION  GetViewportExtEx           (hdc, buffAddr)
  57. EXTERNAL FUNCTION  GetWindowExtEx             (hdc, buffAddr)
  58. EXTERNAL FUNCTION  Polyline                   (hdc, pointsAddr, numPoints)
  59. EXTERNAL FUNCTION  PolyPolyline               (hdc, pointsAddr, polyPointsAddr, numPoints)
  60. EXTERNAL FUNCTION  Rectangle                  (hdc, x, y, w, h)
  61. EXTERNAL FUNCTION  SelectClipRgn              (hdc, hrgn)
  62. EXTERNAL FUNCTION  SelectObject               (hdc, object)
  63. EXTERNAL FUNCTION  SetBkColor                 (hdc, color)
  64. EXTERNAL FUNCTION  SetBkMode                  (hdc, nMode)
  65. EXTERNAL FUNCTION  SetDIBits                  (hdc, hBitmap, startScan, scanLines, DIBdata, bitmapInfo, usage)
  66. EXTERNAL FUNCTION  SetDIBitsToDevice          (hdc, xDest, yDest, width, height, xSrc, ySrc, startScan, scanLines, DIBdata, bitmapInfo, usage)
  67. EXTERNAL FUNCTION  SetMapMode                 (hdc, mapMode)
  68. EXTERNAL FUNCTION  SetROP2                    (hdc, nDrawMode)
  69. EXTERNAL FUNCTION  SetStretchBltMode          (hdc, mode)
  70. EXTERNAL FUNCTION  SetTextColor               (hdc, pixel)
  71. EXTERNAL FUNCTION  SetViewportExtEx           (hdc, xExt, yExt, buffAddr)
  72. EXTERNAL FUNCTION  SetWindowExtEx             (hdc, xExt, yExt, buffAddr)
  73. EXTERNAL FUNCTION  StartDocA                  (hdc, lpdi)
  74. EXTERNAL FUNCTION  StartPage                  (hdc)
  75. EXTERNAL FUNCTION  StretchBlt                 (hdc, x, y, w, h, hdcImage, xSrc, ySrc, wSrc, hSrc, mode)
  76. EXTERNAL FUNCTION  TextOutA                   (hdc, x, y, textAddr, lenText)
  77. '
  78. '
  79. ' ##########################################
  80. ' #####  declare and define constants  #####
  81. ' ##########################################
  82. '
  83. $$OEM_FIXED_FONT        = 10
  84. $$ANSI_FIXED_FONT       = 11
  85. $$ANSI_VAR_FONT         = 12
  86. $$SYSTEM_FONT           = 13
  87. $$DEVICE_DEFAULT_FONT   = 14
  88. $$UNSPECIFIED_FONT      = 15
  89. $$SYSTEM_FIXED_FONT     = 16
  90. $$DEFAULT_GUI_FONT      = 17
  91. $$STARTDOCC             = 10
  92. $$ENDDOCC               = 11
  93. '
  94. '
  95. ' device parameters for GetDeviceCaps()
  96. '
  97. $$DRIVERVERSION                               = 0     '  Device driver version
  98. $$TECHNOLOGY                                  = 2     '  Device classification
  99. $$HORZSIZE                                    = 4     '  Horizontal size in millimeters
  100. $$VERTSIZE                                    = 6     '  Vertical size in millimeters
  101. $$HORZRES                                     = 8     '  Horizontal width in pixels
  102. $$VERTRES                                     = 10    '  Vertical width in pixels
  103. $$BITSPIXEL                                   = 12    '  Number of bits per pixel
  104. $$PLANES                                      = 14    '  Number of planes
  105. $$NUMBRUSHES                                  = 16    '  Number of brushes the device has
  106. $$NUMPENS                                     = 18    '  Number of pens the device has
  107. $$NUMMARKERS                                  = 20    '  Number of markers the device has
  108. $$NUMFONTS                                    = 22    '  Number of fonts the device has
  109. $$NUMCOLORS                                   = 24    '  Number of colors the device supports
  110. $$PDEVICESIZE                                 = 26    '  Size required for device descriptor
  111. $$CURVECAPS                                   = 28    '  Curve capabilities
  112. $$LINECAPS                                    = 30    '  Line capabilities
  113. $$POLYGONALCAPS                               = 32    '  Polygonal capabilities
  114. $$TEXTCAPS                                    = 34    '  Text capabilities
  115. $$CLIPCAPS                                    = 36    '  Clipping capabilities
  116. $$RASTERCAPS                                  = 38    '  Bitblt capabilities
  117. $$ASPECTX                                     = 40    '  Length of the X leg
  118. $$ASPECTY                                     = 42    '  Length of the Y leg
  119. $$ASPECTXY                                    = 44    '  Length of the hypotenuse
  120. $$LOGPIXELSX                                  = 88    '  Logical pixels/inch in X
  121. $$LOGPIXELSY                                  = 90    '  Logical pixels/inch in Y
  122. $$SIZEPALETTE                                 = 104   '  Number of entries in physical palette
  123. $$NUMRESERVED                                 = 106   '  Number of reserved entries in palette
  124. $$COLORRES                                    = 108   '  Actual color resolution
  125. '
  126. '  printing related DeviceCaps.  These replace the appropriate escapes
  127. '
  128. $$PHYSICALWIDTH                               = 110   '  Physical Width in device units
  129. $$PHYSICALHEIGHT                              = 111   '  Physical Height in device units
  130. $$PHYSICALOFFSETX                             = 112   '  Physical Printable Area x margin
  131. $$PHYSICALOFFSETY                             = 113   '  Physical Printable Area y margin
  132. $$SCALINGFACTORX                              = 114   '  Scaling factor x
  133. $$SCALINGFACTORY                              = 115   '  Scaling factor y
  134. '
  135. '
  136. '
  137. ' *****  device capability masks  *****
  138. '
  139. '  device technologies
  140. '
  141. $$DT_PLOTTER                                  = 0     '  Vector plotter
  142. $$DT_RASDISPLAY                               = 1     '  Raster display
  143. $$DT_RASPRINTER                               = 2     '  Raster printer
  144. $$DT_RASCAMERA                                = 3     '  Raster camera
  145. $$DT_CHARSTREAM                               = 4     '  Character-stream, PLP
  146. $$DT_METAFILE                                 = 5     '  Metafile, VDM
  147. $$DT_DISPFILE                                 = 6     '  Display-file
  148. '
  149. '  curve capabilities
  150. '
  151. $$CC_NONE                                     = 0     '  Curves not supported
  152. $$CC_CIRCLES                                  = 1     '  Can do circles
  153. $$CC_PIE                                      = 2     '  Can do pie wedges
  154. $$CC_CHORD                                    = 4     '  Can do chord arcs
  155. $$CC_ELLIPSES                                 = 8     '  Can do ellipese
  156. $$CC_WIDE                                     = 16    '  Can do wide lines
  157. $$CC_STYLED                                   = 32    '  Can do styled lines
  158. $$CC_WIDESTYLED                               = 64    '  Can do wide styled lines
  159. $$CC_INTERIORS                                = 128   '  Can do interiors
  160. $$CC_ROUNDRECT                                = 256   '
  161. '
  162. '  line capabilities
  163. '
  164. $$LC_NONE                                     = 0     '  Lines not supported
  165. $$LC_POLYLINE                                 = 2     '  Can do polylines
  166. $$LC_MARKER                                   = 4     '  Can do markers
  167. $$LC_POLYMARKER                               = 8     '  Can do polymarkers
  168. $$LC_WIDE                                     = 16    '  Can do wide lines
  169. $$LC_STYLED                                   = 32    '  Can do styled lines
  170. $$LC_WIDESTYLED                               = 64    '  Can do wide styled lines
  171. $$LC_INTERIORS                                = 128   '  Can do interiors
  172. '
  173. '  polygonal capabilities
  174. '
  175. $$PC_NONE                                     = 0     '  Polygonals not supported
  176. $$PC_POLYGON                                  = 1     '  Can do polygons
  177. $$PC_RECTANGLE                                = 2     '  Can do rectangles
  178. $$PC_WINDPOLYGON                              = 4     '  Can do winding polygons
  179. $$PC_TRAPEZOID                                = 4     '  Can do trapezoids
  180. $$PC_SCANLINE                                 = 8     '  Can do scanlines
  181. $$PC_WIDE                                     = 16    '  Can do wide borders
  182. $$PC_STYLED                                   = 32    '  Can do styled borders
  183. $$PC_WIDESTYLED                               = 64    '  Can do wide styled borders
  184. $$PC_INTERIORS                                = 128   '  Can do interiors
  185. '
  186. '  polygonal capabilities
  187. '
  188. $$CP_NONE                                     = 0     '  No clipping of output
  189. $$CP_RECTANGLE                                = 1     '  Output clipped to rects
  190. $$CP_REGION                                   = 2     '
  191. '
  192. '  text capabilities
  193. '
  194. $$TC_OP_CHARACTER                             = 0x0000001  ' can do OutputPrecision   CHARACTER
  195. $$TC_OP_STROKE                                = 0x0000002  ' can do OutputPrecision   STROKE
  196. $$TC_CP_STROKE                                = 0x0000004  ' can do ClipPrecision     STROKE
  197. $$TC_CR_90                                    = 0x0000008  ' can do CharRotAbility    90
  198. $$TC_CR_ANY                                   = 0x0000010  ' can do CharRotAbility    ANY
  199. $$TC_SF_X_YINDEP                              = 0x0000020  ' can do ScaleFreedom      X_YINDEPENDENT
  200. $$TC_SA_DOUBLE                                = 0x0000040  ' can do ScaleAbility      DOUBLE
  201. $$TC_SA_INTEGER                               = 0x0000080  ' can do ScaleAbility      INTEGER
  202. $$TC_SA_CONTIN                                = 0x0000100  ' can do ScaleAbility      CONTINUOUS
  203. $$TC_EA_DOUBLE                                = 0x0000200  ' can do EmboldenAbility   DOUBLE
  204. $$TC_IA_ABLE                                  = 0x0000400  ' can do ItalisizeAbility  ABLE
  205. $$TC_UA_ABLE                                  = 0x0000800  ' can do UnderlineAbility  ABLE
  206. $$TC_SO_ABLE                                  = 0x0001000  ' can do StrikeOutAbility  ABLE
  207. $$TC_RA_ABLE                                  = 0x0002000  ' can do RasterFontAble    ABLE
  208. $$TC_VA_ABLE                                  = 0x0004000  ' can do VectorFontAble    ABLE
  209. $$TC_RESERVED                                 = 0x0008000  '
  210. $$TC_SCROLLBLT                                = 0x0010000  ' do text scroll with blt
  211. '
  212. ' raster capabilities
  213. '
  214. $$RC_NONE                                     = 0x0000000
  215. $$RC_BITBLT                                   = 0x0000001  ' can do standard BLT.
  216. $$RC_BANDING                                  = 0x0000002  ' device requires banding support
  217. $$RC_SCALING                                  = 0x0000004  ' device requires scaling support
  218. $$RC_BITMAP64                                 = 0x0000008  ' device can support >64K bitmap
  219. $$RC_GDI20_OUTPUT                             = 0x0000010  ' has 2.0 output calls
  220. $$RC_GDI20_STATE                              = 0x0000020
  221. $$RC_SAVEBITMAP                               = 0x0000040
  222. $$RC_DI_BITMAP                                = 0x0000080  ' supports DIB to memory
  223. $$RC_PALETTE                                  = 0x0000100  ' supports a palette
  224. $$RC_DIBTODEV                                 = 0x0000200  ' supports DIBitsToDevice
  225. $$RC_BIGFONT                                  = 0x0000400  ' supports >64K fonts
  226. $$RC_STRETCHBLT                               = 0x0000800  ' supports StretchBlt
  227. $$RC_FLOODFILL                                = 0x0001000  ' supports FloodFill
  228. $$RC_STRETCHDIB                               = 0x0002000  ' supports StretchDIBits
  229. $$RC_OP_DX_OUTPUT                             = 0x0004000
  230. $$RC_DEVBITS                                  = 0x0008000
  231. '
  232. ' DIB color table identifiers
  233. '
  234. $$DIB_RGB_COLORS                              = 0          '  color table in RGBs
  235. $$DIB_PAL_COLORS                              = 1          '  color table in palette indices
  236. $$DIB_PAL_INDICES                             = 2          '  no color table indices into surf palette
  237. $$DIB_PAL_PHYSINDICES                         = 2          '  no color table indices into surf palette
  238. $$DIB_PAL_LOGINDICES                          = 4          '  no color table indices into DC palette
  239. '
  240. ' constants for Get/SetSystemPaletteUse()
  241. '
  242. $$SYSPAL_ERROR                                = 0
  243. $$SYSPAL_STATIC                               = 1
  244. $$SYSPAL_NOSTATIC                             = 2
  245. '
  246. ' constants for CreateDIBitmap
  247. '
  248. $$CBM_CREATEDIB                               = 0x00000002  '  create DIB bitmap
  249. $$CBM_INIT                                    = 0x00000004  '  initialize bitmap
  250.