home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource1
/
program3
/
pmddi.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-11-23
|
18KB
|
749 lines
{| Unit: pmddi
| Version: 1.00
| translated from file pmddi.H
| Original translation: Peter Sawatzki (ps)
| Contributing:
| (fill in)
|
| change history:
| Date: Ver: Author:
| 11/13/93 1.00 ps original translation by ps
}
Unit pmddi;
Interface
Uses
Os2Def,
PmGpi,
BseDos;
{**************************************************************************\
*
* Module Name: PMDDI.H
*
* OS/2 Presentation Manager Graphics Engine entry point, macro and type
* declarations.
*
* Copyright
*
* =========================================================================
*
* Further defines must be made to specify which of the GRE function macros
* should be defined. INCL_GREALL causes all of them to be defined.
*
* INCL_GRE_ARCS - Arcs functions
* INCL_GRE_LINES - Line functions
* INCL_GRE_MARKERS - etc.
* INCL_GRE_SCANS
* INCL_GRE_BITMAPS
* INCL_GRE_STRINGS
* INCL_GRE_PATHS
* INCL_GRE_PICK
* INCL_GRE_CLIP
* INCL_GRE_REGIONS
* INCL_GRE_XFORMS
* INCL_GRE_DEVMISC
* INCL_GRE_COLORTABLE
* INCL_GRE_DEVICE
* INCL_GRE_DCS
* INCL_GRE_SETID
* INCL_GRE_FONTS
* INCL_GRE_JOURNALING
* INCL_GRE_LCID
* INCL_GRE_DEVSUPPORT
\**************************************************************************}
{ exported Engine DDI functions }
Function SetDriverInfo (Par1: ULONG; Par2: LHANDLE; Par3: ULONG; hDC: HDC): ULONG;
Function GetDriverInfo (Par1: LHANDLE; Par2: ULONG; hDC: HDC): ULONG;
Function PostDeviceModes (Par1: PDRIVDATA; Par2, Par3, Par4: PSZ; Par5: ULONG): ULONG;
Function GreInitialize: BOOL;
{ define common types in the Engine and DDI }
Type
RECTS = Record { rcs }
pts1,
pts2: POINTS
End;
pRECTS = ^RECTS;
POINTFX = Record { ptfx }
x,
y: FIXED
End;
pPOINTFX = ^POINTFX;
RECTFX = Record { rcfx }
ptfx1,
ptfx2: POINTFX
End;
pRECTFX = ^PRECTFX;
XFORM = Record { xform }
fxM11,
fxM12,
fxM21,
fxM22: FIXED;
lM41,
lM42: LongInt
End;
pXFORM = ^PXFORM;
LCID = LONG; { locally-coded id }
pLCID = ^LCID;
PHID = LONG; { path id }
{ get GRE function macros }
{ have INCL_GREALL defined to get all of these }
{ Command Flags for high word of FunN }
Const
COM_DRAW = $0001;
COM_BOUND = $0002;
COM_CORRELATE = $0004;
COM_ALT_BOUND = $0008;
COM_AREA = $0010;
COM_PATH = $0020;
COM_TRANSFORM = $0040;
COM_RECORDING = $0080;
COM_DEVICE = $0100;
{ BoxBoundary }
{ BoxInterior }
{ BoxBoth }
Type
BOXPARAMS = Record { boxp }
ptl: POINTL;
sizl: SIZEL
End;
pBOXPARAMS = ^BOXPARAMS;
{ CopyClipRegion }
Const
COPYCRGN_ALLINTERSECT = 0 ;
COPYCRGN_VISRGN = 1 ;
COPYCRGN_CLIPRGN = 2 ;
{ SetupDC }
SETUPDC_VISRGN = $00000001 ;
SETUPDC_ORIGIN = $00000002 ;
SETUPDC_ACCUMBOUNDSON = $00000004 ;
SETUPDC_ACCUMBOUNDSOFF = $00000008 ;
SETUPDC_RECALCCLIP = $00000010 ;
SETUPDC_SETOWNER = $00000020 ;
SETUPDC_CLEANDC = $00000040 ;
{ QueryViewportSize }
Type
VIEWPORTSIZE = Record { vs }
cx,
cy: ULONG
End;
pVIEWPORTSIZE = ^VIEWPORTSIZE;
{ Constants for GreInitializeAttributes }
Const
INAT_DEFAULTATTRIBUTES = 1 ;
INAT_CURRENTATTRIBUTES = 2 ;
{ InvalidateVisRegion }
Type
DC_BLOCK = Record { ivr }
hdc,
hddc: ULONG
End;
pDC_BLOCK = ^DC_BLOCK;
{ Display information resource structure }
DISPLAYINFO = Record { dspinfo }
cb: USHORT;
cxIcon,
cyIcon,
cxPointer,
cyPointer,
cxBorder,
cyBorder,
cxHSlider,
cyVSlider,
cxSizeBorder,
cySizeBorder,
cxDeviceAlign,
cyDeviceAlign: SHORT
End;
pDISPLAYINFO = ^DISPLAYINFO;
{ Parameters for the DC Enable function }
DENPARAMS = Record { den }
ulStateInfo,
ulType,
ulHDC: ULONG
End;
pDENPARAMS = ^DENPARAMS;
STYLERATIO = Record { sr }
dx,
dy: BYTE
End;
pSTYLERATIO = ^STYLERATIO;
{ Options flags for SetGlobalAttribute }
Const
GATTR_DEFAULT = 1 ;
{ Attribute Types for SetGlobalAttribute }
ATYPE_COLOR = 1 ;
ATYPE_BACK_COLOR = 2 ;
ATYPE_MIX_MODE = 3 ;
ATYPE_BACK_MIX_MODE = 4 ;
{ Options for CharStringPos }
CHS_START_XY = $00000020 ;
CHS_ATTR_INFO = $00000040 ;
Type
CSP_INFO = Record { csp }
cSize,
lColor,
lBackColor: LongInt
End;
pCSP_INFO = ^CSP_INFO;
{ Set/GetProcessControl }
Const
PCTL_DRAW = $00000001 ;
PCTL_BOUND = $00000002 ;
PCTL_CORRELATE = $00000004 ;
PCTL_USERBOUNDS = $00000008 ;
PCTL_AREA = $00000010 ;
{ ResetBounds }
RB_GPI = $00000001 ;
RB_USER = $00000002 ;
{ GetBoundsData }
GBD_GPI = 0 ;
GBD_USER = 1 ;
{ EndArea Cancel Option }
EA_DRAW = $00000000 ;
EA_CANCEL = $00000001 ;
{ Bitblt Style }
BLTMODE_SRC_BITMAP = $00010000 ;
BLTMODE_ATTRS_PRES = $00020000 ;
BBO_TARGWORLD = $00000100 ;
Type
BITBLTPARAMETERS = Record { bbp }
rclTarg,
rclSrc: RECTL
End;
pBITBLTPARAMETERS = ^BITBLTPARAMETERS;
BITBLTATTRS = Record { bba }
cSize,
lColor,
lBackColor: LongInt
End;
pBITBLTATTRS = ^BITBLTATTRS;
{ LCIDs }
Const
LCID_AVIO_1 = (-2 );
LCID_AVIO_2 = (-3 );
LCID_AVIO_3 = (-4 );
LCID_RANGE_GPI = 1 ;
LCID_RANGE_AVIO = 2 ;
LCID_RANGE_BOTH = 3 ;
LCID_GRAPHICS_MIN = 1;
LCID_GRAPHICS_MAX = 254;
{ ResetDC }
RDC_RGBMODE = $1 ;
RDC_SETOWNERTOSHELL = $2 ;
{ SetRandomXform }
SX_UNITY = 0 ;
SX_CAT_AFTER = 1 ;
SX_CAT_BEFORE = 2 ;
SX_OVERWRITE = 3 ;
{ Transform accelerators }
{ These bits are only valid if the MATRIX_SIMPLE bit is set. }
{ The X and Y negate flags are only meaningful if MATRIX_UNITS is set. }
MATRIX_SIMPLE = $0001 ; { two entries are zero }
MATRIX_UNITS = $0002 ; { all entries are +1 or -1 }
MATRIX_XY_EXCHANGE = $0004 ; { zeros are on the diagonal }
MATRIX_X_NEGATE = $0008 ; { X is hit by negative }
MATRIX_Y_NEGATE = $0010 ; { Y is hit by negative }
MATRIX_TRANSLATION = $0020 ; { non-zero translation }
{ NotifyClipChange }
NCC_CLEANDC = $0002 ; { clear DC dirty bit }
{ NotifyTransformChange }
Type
NOTIFYTRANSFORMDATA = Record { ntd }
usType: USHORT;
xform: XFORM
End;
pNOTIFYTRANSFORMDATA = ^NOTIFYTRANSFORMDATA;
{ ColorTable }
Const
LCOL_SYSCOLORS = $0010 ;
{ query device caps }
Type
QCDARRAY