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 >
Wrap
Text File
|
2000-01-13
|
14KB
|
250 lines
'
'
' ################### Max Reason
' ##### gdi32 ##### copyright 1988-2000
' ################### Windows XBasic declarations for Windows "gdi32"
'
' subject to GPLL license - see gpll.txt
'
' maxreason@maxreason.com
'
' for Windows XBasic
'
'
' ###########################
' ##### declare types #####
' ###########################
'
TYPE DOCINFO
ULONG .size
ULONG .docName
ULONG .output
ULONG .dataType
ULONG .type
END TYPE
'
'
' ###############################
' ##### declare functions #####
' ###############################
'
EXTERNAL FUNCTION Arc (hdc, left, top, right, bottom, x1, y1, x2, y2)
EXTERNAL FUNCTION BitBlt (hdc, x, y, w, h, hdcImage, xSrc, ySrc, mode)
EXTERNAL FUNCTION CreateCompatibleBitmap (hdc, width, height)
EXTERNAL FUNCTION CreateCompatibleDC (hdc)
EXTERNAL FUNCTION CreateDCA (driverName,printerName,portName,InitData)
EXTERNAL FUNCTION CreateFontIndirectA (logFontAddr)
EXTERNAL FUNCTION CreateRectRgn (left, top, right, bottom)
EXTERNAL FUNCTION CreateSolidBrush (color)
EXTERNAL FUNCTION CreatePen (style, width, color)
EXTERNAL FUNCTION DeleteDC (hdc)
EXTERNAL FUNCTION DeleteObject (object)
EXTERNAL FUNCTION Ellipse (hdc, left, top, right, bottom)
EXTERNAL FUNCTION EndDoc (hdc)
EXTERNAL FUNCTION EndPage (hdc)
EXTERNAL FUNCTION EnumFontFamiliesA (hdc, fontNameAddr, callbackProc, lParam)
EXTERNAL FUNCTION GdiFlush ()
EXTERNAL FUNCTION GdiSetBatchLimit (limit)
EXTERNAL FUNCTION GetCurrentObject (hdc, objType)
EXTERNAL FUNCTION GetDeviceCaps (hdc, index)
EXTERNAL FUNCTION GetDIBits (hdc, hBitmap, startScan, scanLines, dataAddr, infoAddr, usage)
EXTERNAL FUNCTION GetMapMode (hdc)
EXTERNAL FUNCTION GetPixel (hdc, x, y)
EXTERNAL FUNCTION GetStockObject (object)
EXTERNAL FUNCTION GetTextExtentPointA (hdc, textAddr, lenText, stringSize)
EXTERNAL FUNCTION GetTextMetricsA (hdc, textMetric)
EXTERNAL FUNCTION GetViewportExtEx (hdc, buffAddr)
EXTERNAL FUNCTION GetWindowExtEx (hdc, buffAddr)
EXTERNAL FUNCTION Polyline (hdc, pointsAddr, numPoints)
EXTERNAL FUNCTION PolyPolyline (hdc, pointsAddr, polyPointsAddr, numPoints)
EXTERNAL FUNCTION Rectangle (hdc, x, y, w, h)
EXTERNAL FUNCTION SelectClipRgn (hdc, hrgn)
EXTERNAL FUNCTION SelectObject (hdc, object)
EXTERNAL FUNCTION SetBkColor (hdc, color)
EXTERNAL FUNCTION SetBkMode (hdc, nMode)
EXTERNAL FUNCTION SetDIBits (hdc, hBitmap, startScan, scanLines, DIBdata, bitmapInfo, usage)
EXTERNAL FUNCTION SetDIBitsToDevice (hdc, xDest, yDest, width, height, xSrc, ySrc, startScan, scanLines, DIBdata, bitmapInfo, usage)
EXTERNAL FUNCTION SetMapMode (hdc, mapMode)
EXTERNAL FUNCTION SetROP2 (hdc, nDrawMode)
EXTERNAL FUNCTION SetStretchBltMode (hdc, mode)
EXTERNAL FUNCTION SetTextColor (hdc, pixel)
EXTERNAL FUNCTION SetViewportExtEx (hdc, xExt, yExt, buffAddr)
EXTERNAL FUNCTION SetWindowExtEx (hdc, xExt, yExt, buffAddr)
EXTERNAL FUNCTION StartDocA (hdc, lpdi)
EXTERNAL FUNCTION StartPage (hdc)
EXTERNAL FUNCTION StretchBlt (hdc, x, y, w, h, hdcImage, xSrc, ySrc, wSrc, hSrc, mode)
EXTERNAL FUNCTION TextOutA (hdc, x, y, textAddr, lenText)
'
'
' ##########################################
' ##### declare and define constants #####
' ##########################################
'
$$OEM_FIXED_FONT = 10
$$ANSI_FIXED_FONT = 11
$$ANSI_VAR_FONT = 12
$$SYSTEM_FONT = 13
$$DEVICE_DEFAULT_FONT = 14
$$UNSPECIFIED_FONT = 15
$$SYSTEM_FIXED_FONT = 16
$$DEFAULT_GUI_FONT = 17
$$STARTDOCC = 10
$$ENDDOCC = 11
'
'
' device parameters for GetDeviceCaps()
'
$$DRIVERVERSION = 0 ' Device driver version
$$TECHNOLOGY = 2 ' Device classification
$$HORZSIZE = 4 ' Horizontal size in millimeters
$$VERTSIZE = 6 ' Vertical size in millimeters
$$HORZRES = 8 ' Horizontal width in pixels
$$VERTRES = 10 ' Vertical width in pixels
$$BITSPIXEL = 12 ' Number of bits per pixel
$$PLANES = 14 ' Number of planes
$$NUMBRUSHES = 16 ' Number of brushes the device has
$$NUMPENS = 18 ' Number of pens the device has
$$NUMMARKERS = 20 ' Number of markers the device has
$$NUMFONTS = 22 ' Number of fonts the device has
$$NUMCOLORS = 24 ' Number of colors the device supports
$$PDEVICESIZE = 26 ' Size required for device descriptor
$$CURVECAPS = 28 ' Curve capabilities
$$LINECAPS = 30 ' Line capabilities
$$POLYGONALCAPS = 32 ' Polygonal capabilities
$$TEXTCAPS = 34 ' Text capabilities
$$CLIPCAPS = 36 ' Clipping capabilities
$$RASTERCAPS = 38 ' Bitblt capabilities
$$ASPECTX = 40 ' Length of the X leg
$$ASPECTY = 42 ' Length of the Y leg
$$ASPECTXY = 44 ' Length of the hypotenuse
$$LOGPIXELSX = 88 ' Logical pixels/inch in X
$$LOGPIXELSY = 90 ' Logical pixels/inch in Y
$$SIZEPALETTE = 104 ' Number of entries in physical palette
$$NUMRESERVED = 106 ' Number of reserved entries in palette
$$COLORRES = 108 ' Actual color resolution
'
' printing related DeviceCaps. These replace the appropriate escapes
'
$$PHYSICALWIDTH = 110 ' Physical Width in device units
$$PHYSICALHEIGHT = 111 ' Physical Height in device units
$$PHYSICALOFFSETX = 112 ' Physical Printable Area x margin
$$PHYSICALOFFSETY = 113 ' Physical Printable Area y margin
$$SCALINGFACTORX = 114 ' Scaling factor x
$$SCALINGFACTORY = 115 ' Scaling factor y
'
'
'
' ***** device capability masks *****
'
' device technologies
'
$$DT_PLOTTER = 0 ' Vector plotter
$$DT_RASDISPLAY = 1 ' Raster display
$$DT_RASPRINTER = 2 ' Raster printer
$$DT_RASCAMERA = 3 ' Raster camera
$$DT_CHARSTREAM = 4 ' Character-stream, PLP
$$DT_METAFILE = 5 ' Metafile, VDM
$$DT_DISPFILE = 6 ' Display-file
'
' curve capabilities
'
$$CC_NONE = 0 ' Curves not supported
$$CC_CIRCLES = 1 ' Can do circles
$$CC_PIE = 2 ' Can do pie wedges
$$CC_CHORD = 4 ' Can do chord arcs
$$CC_ELLIPSES = 8 ' Can do ellipese
$$CC_WIDE = 16 ' Can do wide lines
$$CC_STYLED = 32 ' Can do styled lines
$$CC_WIDESTYLED = 64 ' Can do wide styled lines
$$CC_INTERIORS = 128 ' Can do interiors
$$CC_ROUNDRECT = 256 '
'
' line capabilities
'
$$LC_NONE = 0 ' Lines not supported
$$LC_POLYLINE = 2 ' Can do polylines
$$LC_MARKER = 4 ' Can do markers
$$LC_POLYMARKER = 8 ' Can do polymarkers
$$LC_WIDE = 16 ' Can do wide lines
$$LC_STYLED = 32 ' Can do styled lines
$$LC_WIDESTYLED = 64 ' Can do wide styled lines
$$LC_INTERIORS = 128 ' Can do interiors
'
' polygonal capabilities
'
$$PC_NONE = 0 ' Polygonals not supported
$$PC_POLYGON = 1 ' Can do polygons
$$PC_RECTANGLE = 2 ' Can do rectangles
$$PC_WINDPOLYGON = 4 ' Can do winding polygons
$$PC_TRAPEZOID = 4 ' Can do trapezoids
$$PC_SCANLINE = 8 ' Can do scanlines
$$PC_WIDE = 16 ' Can do wide borders
$$PC_STYLED = 32 ' Can do styled borders
$$PC_WIDESTYLED = 64 ' Can do wide styled borders
$$PC_INTERIORS = 128 ' Can do interiors
'
' polygonal capabilities
'
$$CP_NONE = 0 ' No clipping of output
$$CP_RECTANGLE = 1 ' Output clipped to rects
$$CP_REGION = 2 '
'
' text capabilities
'
$$TC_OP_CHARACTER = 0x0000001 ' can do OutputPrecision CHARACTER
$$TC_OP_STROKE = 0x0000002 ' can do OutputPrecision STROKE
$$TC_CP_STROKE = 0x0000004 ' can do ClipPrecision STROKE
$$TC_CR_90 = 0x0000008 ' can do CharRotAbility 90
$$TC_CR_ANY = 0x0000010 ' can do CharRotAbility ANY
$$TC_SF_X_YINDEP = 0x0000020 ' can do ScaleFreedom X_YINDEPENDENT
$$TC_SA_DOUBLE = 0x0000040 ' can do ScaleAbility DOUBLE
$$TC_SA_INTEGER = 0x0000080 ' can do ScaleAbility INTEGER
$$TC_SA_CONTIN = 0x0000100 ' can do ScaleAbility CONTINUOUS
$$TC_EA_DOUBLE = 0x0000200 ' can do EmboldenAbility DOUBLE
$$TC_IA_ABLE = 0x0000400 ' can do ItalisizeAbility ABLE
$$TC_UA_ABLE = 0x0000800 ' can do UnderlineAbility ABLE
$$TC_SO_ABLE = 0x0001000 ' can do StrikeOutAbility ABLE
$$TC_RA_ABLE = 0x0002000 ' can do RasterFontAble ABLE
$$TC_VA_ABLE = 0x0004000 ' can do VectorFontAble ABLE
$$TC_RESERVED = 0x0008000 '
$$TC_SCROLLBLT = 0x0010000 ' do text scroll with blt
'
' raster capabilities
'
$$RC_NONE = 0x0000000
$$RC_BITBLT = 0x0000001 ' can do standard BLT.
$$RC_BANDING = 0x0000002 ' device requires banding support
$$RC_SCALING = 0x0000004 ' device requires scaling support
$$RC_BITMAP64 = 0x0000008 ' device can support >64K bitmap
$$RC_GDI20_OUTPUT = 0x0000010 ' has 2.0 output calls
$$RC_GDI20_STATE = 0x0000020
$$RC_SAVEBITMAP = 0x0000040
$$RC_DI_BITMAP = 0x0000080 ' supports DIB to memory
$$RC_PALETTE = 0x0000100 ' supports a palette
$$RC_DIBTODEV = 0x0000200 ' supports DIBitsToDevice
$$RC_BIGFONT = 0x0000400 ' supports >64K fonts
$$RC_STRETCHBLT = 0x0000800 ' supports StretchBlt
$$RC_FLOODFILL = 0x0001000 ' supports FloodFill
$$RC_STRETCHDIB = 0x0002000 ' supports StretchDIBits
$$RC_OP_DX_OUTPUT = 0x0004000
$$RC_DEVBITS = 0x0008000
'
' DIB color table identifiers
'
$$DIB_RGB_COLORS = 0 ' color table in RGBs
$$DIB_PAL_COLORS = 1 ' color table in palette indices
$$DIB_PAL_INDICES = 2 ' no color table indices into surf palette
$$DIB_PAL_PHYSINDICES = 2 ' no color table indices into surf palette
$$DIB_PAL_LOGINDICES = 4 ' no color table indices into DC palette
'
' constants for Get/SetSystemPaletteUse()
'
$$SYSPAL_ERROR = 0
$$SYSPAL_STATIC = 1
$$SYSPAL_NOSTATIC = 2
'
' constants for CreateDIBitmap
'
$$CBM_CREATEDIB = 0x00000002 ' create DIB bitmap
$$CBM_INIT = 0x00000004 ' initialize bitmap