home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1995 December / SOFM_Dec1995.bin / pc / os2 / vpascal / source / rtl / os2def.pas < prev    next >
Pascal/Delphi Source File  |  1995-10-31  |  9KB  |  341 lines

  1. {█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█}
  2. {█                                                       █}
  3. {█      Virtual Pascal Runtime Library.  Version 1.0.    █}
  4. {█      OS/2 Common Definitions                          █}
  5. {█      ─────────────────────────────────────────────────█}
  6. {█      Copyright (C) 1995 B&M&T Corporation             █}
  7. {█      ─────────────────────────────────────────────────█}
  8. {█      Written by Vitaly Miryanov                       █}
  9. {█                                                       █}
  10. {▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀}
  11.  
  12. {$AlignRec-}
  13.  
  14. unit Os2Def;
  15.  
  16. interface
  17.  
  18. type
  19.   ApiRet  = Longint;
  20.   ApiRet16 = Word;
  21.   SHandle = Word;
  22.   LHandle = Longint;
  23.   ULong   = Longint;
  24.   Long    = Longint;
  25.   Bool    = LongBool;
  26.   UShort  = Word;
  27.   PULong  = ^ULong;
  28.   PLong   = ^Long;
  29.   PFn     = Pointer;
  30.  
  31. { Quad-word }
  32.   PQWord = ^QWord;
  33.   QWord = record
  34.    Lo: ULong;
  35.    Hi: ULong;
  36.  end;
  37.  
  38. const
  39.   hNull   = 0;          { Null handle }
  40.   ulFalse = 0;
  41.   ulTrue  = 1;
  42.  
  43. { cchMaxPath is the maximum fully qualified path name length including  }
  44. { the drive letter, colon, backslashes and terminating #0 symbol.       }
  45.   cchMaxPath                    = 260;
  46.  
  47. { cchMaxPathComp is the maximum individual path component name length   }
  48. { including a terminating #0 symbol.                                    }
  49.   cchMaxPathComp                = 256;
  50.  
  51. type
  52. {  Common Error definitions }
  53.   PErrorId = ^ErrorId;
  54.   ErrorId = ULong;
  55.  
  56. { Severity codes }
  57. const
  58.   severity_NoError              = $0000;
  59.   severity_Warning              = $0004;
  60.   severity_Error                = $0008;
  61.   severity_Severe               = $000C;
  62.   severity_Unrecoverable        = $0010;
  63.  
  64. { Base component error values }
  65.  
  66. winerr_Base                     = $1000;  { Window Manager                    }
  67. gpierr_Base                     = $2000;  { Graphics Presentation Interface   }
  68. deverr_Base                     = $3000;  { Device Manager                    }
  69. splerr_Base                     = $4000;  { Spooler                           }
  70.  
  71. { Common types used across components }
  72.  
  73. { Common DOS types }
  74. type
  75.   HModule = LHandle;
  76.   Pid     = LHandle;
  77.   Tid     = LHandle;
  78.   Sgid    = Word;
  79.  
  80.   PHmodule = ^HModule;
  81.   PPid     = ^Pid;
  82.   PTid     = ^Tid;
  83.  
  84. { Common SUP types }
  85.   Hab = LHandle;
  86.   PHab = ^Hab;
  87.  
  88. { Common GPI/DEV types }
  89.   Hps = LHandle;
  90.   PHps = ^Hps;
  91.  
  92.   Hdc = LHandle;
  93.   PHdc = ^Hdc;
  94.  
  95.   HRgn = LHandle;
  96.   PHRgn = ^HRgn;
  97.  
  98.   HBitMap = LHandle;
  99.   PHbitMap = ^HBitMap;
  100.  
  101.   Hmf = LHandle;
  102.   PHmf = ^Hmf;
  103.  
  104.   HPal = LHandle;
  105.   PHPal = ^HPal;
  106.  
  107.   Color = Long;
  108.   PColor = ^Color;
  109.  
  110.   PPointL  = ^PointL;
  111.   NPPointL = ^PointL;
  112.   PointL   = record
  113.     X: Long;
  114.     Y: Long;
  115.   end;
  116.  
  117.   PPointS = ^PointS;
  118.   PointS  = record
  119.     X: Word;
  120.     Y: Word;
  121.   end;
  122.  
  123.   PRectL  = ^RectL;
  124.   NPRectL = ^RectL;
  125.   RectL   = record
  126.     xLeft:   Long;
  127.     yBottom: Long;
  128.     xRight:  Long;
  129.     yTop:    Long;
  130.   end;
  131.  
  132.   Str8 = array[0..7] of Char;
  133.   PStr8 = ^Str8;
  134.  
  135. { Common DEV/SPL types }
  136.  
  137.   PDrivData = ^DrivData;
  138.   DrivData  = record            { Record for for Device Driver data }
  139.     cb:         Long;
  140.     lVersion:   Long;
  141.     szDeviceName: array[0..31] of Char;
  142.     abGeneralData: Char;
  143.   end;
  144.  
  145.  { Array indices for array parameter for DevOpenDC, SplQmOpen or SplQpOpen }
  146.  
  147. const
  148.   Address                       = 0;
  149.   Driver_Name                   = 1;
  150.   Driver_Data                   = 2;
  151.   Data_Type                     = 3;
  152.   Comment                       = 4;
  153.   Proc_Name                     = 5;
  154.   Proc_Params                   = 6;
  155.   Spl_Params                    = 7;
  156.   Network_Params                = 8;
  157.  
  158.  { Record definition as an alternative of the array parameter }
  159.  
  160. type
  161.  PDevOpenStruc = ^DevOpenStruc;
  162.  DevOpenStruc = record
  163.    pszLogAddress:       PChar;
  164.    pszDriverName:       PChar;
  165.    pDriv:               PDrivData;
  166.    pszDataType:         PChar;
  167.    pszComment:          PChar;
  168.    pszQueueProcName:    PChar;
  169.    pszQueueProcParams:  PChar;
  170.    pszSpoolerParams:    PChar;
  171.    pszNetworkParams:    PChar;
  172.  end;
  173.  
  174. { Common PMWP object and PMSTDDLG drag data }
  175.  
  176.   PPrintDest = ^PrintDest;
  177.   PrintDest =  record
  178.     cb:          ULong;
  179.     lType:       Long;
  180.     pszToken:    PChar;
  181.     lCount:      Long;
  182.     pdopData:    PChar;
  183.     fl:          ULong;
  184.     pszPrinter:  PChar;
  185.   end;
  186.  
  187. const
  188.   pd_job_Property               = $0001;        { Flags for .fl field }
  189.  
  190. { Common AVIO/GPI types }
  191.  
  192. { Values of fsSelection field of FATTRS structure }
  193.   fattr_Sel_Italic               = $0001;
  194.   fattr_Sel_Underscore           = $0002;
  195.   fattr_Sel_Outline              = $0008;
  196.   fattr_Sel_Strikeout            = $0010;
  197.   fattr_Sel_Bold                 = $0020;
  198.  
  199. { Values of fsType field of FATTRS structure }
  200.   fattr_Type_Kerning            = $0004;
  201.   fattr_Type_Mbcs               = $0008;
  202.   fattr_Type_Dbcs               = $0010;
  203.   fattr_Type_Antialiased        = $0020;
  204.  
  205. { Values of fsFontUse field of FATTRS structure }
  206.   fattr_FontUse_NoMix           = $0002;
  207.   fattr_FontUse_Outline         = $0004;
  208.   fattr_FontUse_Transformable   = $0008;
  209.  
  210. { Size for fields in the font structures }
  211.   FaceSize                      = 32;
  212.  
  213. { Font struct for Vio/GpiCreateLogFont }
  214.  
  215. type
  216.   PFAttrs = ^FAttrs;
  217.   FAttrs  = record
  218.     usRecordLength:         Word;
  219.     fsSelection:            Word;
  220.     lMatch:                 Long;
  221.     szFacename: array [0..FACESIZE-1] of Char;
  222.     idRegistry:             Word;
  223.     usCodePage:             Word;
  224.     lMaxBaselineExt:        Long;
  225.     lAveCharWidth:          Long;
  226.     fsType:                 Word;
  227.     fsFontUse:              Word;
  228.   end;
  229.  
  230. { Values of fsType field of FONTMETRICS structure }
  231. const
  232.   fm_Type_Fixed                 = $0001;
  233.   fm_Type_Licensed              = $0002;
  234.   fm_Type_Kerning               = $0004;
  235.   fm_Type_Dbcs                  = $0010;
  236.   fm_Type_Mbcs                  = $0018;
  237.   fm_Type_64k                   = $8000;
  238.   fm_Type_Atoms                 = $4000;
  239.   fm_Type_FamTrunc              = $2000;
  240.   fm_Type_FaceTrunc             = $1000;
  241.  
  242. { Values of fsDefn field of FONTMETRICS structure }
  243.   fm_Defn_Outline               = $0001;
  244.   fm_Defn_Ifi                   = $0002;
  245.   fm_Defn_Win                   = $0004;
  246.   fm_Defn_Generic               = $8000;
  247.  
  248. { Values of fsSelection field of FONTMETRICS structure }
  249.   fm_Sel_Italic                 = $0001;
  250.   fm_Sel_Underscore             = $0002;
  251.   fm_Sel_Negative               = $0004;
  252.   fm_Sel_Outline                = $0008;
  253.   fm_Sel_StrikeOut              = $0010;
  254.   fm_Sel_Bold                   = $0020;
  255.  
  256. { Values of fsCapabilities field of FONTMETRICS structure }
  257.   fm_Cap_NoMix                  = $0001;
  258.  
  259. { Font metrics returned by GpiQueryFonts and others }
  260. type
  261.   Panose  = record
  262.     bFamilyType:        Byte;
  263.     bSerifStyle:        Byte;
  264.     bWeight:            Byte;
  265.     bProportion:        Byte;
  266.     bContrast:          Byte;
  267.     bStrokeVariation:   Byte;
  268.     bArmStyle:          Byte;
  269.     bLetterform:        Byte;
  270.     bMidline:           Byte;
  271.     bXHeight:           Byte;
  272.     abReserved: array[0..1] of Byte;
  273.   end;
  274.  
  275.   PFontMetrics = ^FontMetrics;
  276.   FontMetrics  = record
  277.     szFamilyname: array[0..FACESIZE-1] of Char;
  278.     szFacename:   array[0..FACESIZE-1] of Char;
  279.     idRegistry:             Word;
  280.     usCodePage:             Word;
  281.     lEmHeight:              Long;
  282.     lXHeight:               Long;
  283.     lMaxAscender:           Long;
  284.     lMaxDescender:          Long;
  285.     lLowerCaseAscent:       Long;
  286.     lLowerCaseDescent:      Long;
  287.     lInternalLeading:       Long;
  288.     lExternalLeading:       Long;
  289.     lAveCharWidth:          Long;
  290.     lMaxCharInc:            Long;
  291.     lEmInc:                 Long;
  292.     lMaxBaselineExt:        Long;
  293.     sCharSlope:             Integer;
  294.     sInlineDir:             Integer;
  295.     sCharRot:               Integer;
  296.     usWeightClass:          Word;
  297.     usWidthClass:           Word;
  298.     sXDeviceRes:            Integer;
  299.     sYDeviceRes:            Integer;
  300.     sFirstChar:             Integer;
  301.     sLastChar:              Integer;
  302.     sDefaultChar:           Integer;
  303.     sBreakChar:             Integer;
  304.     sNominalPointSize:      Integer;
  305.     sMinimumPointSize:      Integer;
  306.     sMaximumPointSize:      Integer;
  307.     fsType:                 Word;
  308.     fsDefn:                 Word;
  309.     fsSelection:            Word;
  310.     fsCapabilities:         Word;
  311.     lSubscriptXSize:        Long;
  312.     lSubscriptYSize:        Long;
  313.     lSubscriptXOffset:      Long;
  314.     lSubscriptYOffset:      Long;
  315.     lSuperscriptXSize:      Long;
  316.     lSuperscriptYSize:      Long;
  317.     lSuperscriptXOffset:    Long;
  318.     lSuperscriptYOffset:    Long;
  319.     lUnderscoreSize:        Long;
  320.     lUnderscorePosition:    Long;
  321.     lStrikeoutSize:         Long;
  322.     lStrikeoutPosition:     Long;
  323.     sKerningPairs:          Integer;
  324.     sFamilyClass:           Integer;
  325.     lMatch:                 Long;
  326.     FamilyNameAtom:         Long;
  327.     FaceNameAtom:           Long;
  328.     FmPanose:               Panose;
  329.   end;
  330.  
  331. { Common WIN types }
  332.   HWnd = LHandle;
  333.   PHWnd = ^HWnd;
  334.  
  335.   HMQ = LHandle;
  336.   PHMQ = ^HMQ;
  337.  
  338. implementation
  339.  
  340. end.
  341.