home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / os2def.h < prev    next >
C/C++ Source or Header  |  1999-05-12  |  20KB  |  733 lines

  1. /****************************** Module Header ******************************\
  2. *
  3. * Module Name: OS2DEF.H
  4. *
  5. * OS/2 Common Definitions file
  6. *
  7. * Copyright (c) International Business Machines Corporation 1981, 1988-1992
  8. *
  9. * ===========================================================================
  10. *
  11. * Comments at the end of each typedef line give the name tags used in
  12. * the assembler include version of this file.
  13. *
  14. * The assembler include version of this file excludes lines between NOINC
  15. * and INC comments.
  16. *
  17. \***************************************************************************/
  18.  
  19. /* NOINC */
  20. #if __IBMC__ || __IBMCPP__
  21.    #pragma info( none )
  22.       #ifndef __CHKHDR__
  23.          #pragma info( none )
  24.       #endif
  25.    #pragma info( restore )
  26. #endif
  27. #ifdef __cplusplus
  28.       extern "C" {
  29. #endif
  30. /* INC */
  31.  
  32. #ifndef __OS2DEF__
  33. /* NOINC */
  34. #define __OS2DEF__
  35. /* INC */
  36.  
  37. #define OS2DEF_INCLUDED
  38.  
  39.  
  40.  
  41. /* NOINC */
  42. #define FAR         /* this will be deleted shortly */
  43. #define NEAR        /* this will be deleted shortly */
  44.  
  45. #define APIENTRY    _System
  46. #define EXPENTRY    _System
  47.  
  48. #define APIENTRY16  _Far16 _Pascal
  49. #define PASCAL16    _Far16 _Pascal
  50. #define CDECL16     _Far16 _Cdecl
  51.  
  52. #define VOID        void
  53. /* INC */
  54.  
  55. typedef unsigned long  APIRET;
  56. typedef unsigned short APIRET16;
  57. typedef unsigned long  APIRET32;
  58.  
  59. #ifndef FALSE
  60.    #define FALSE   0
  61. #endif
  62.  
  63. #ifndef TRUE
  64.    #define TRUE    1
  65. #endif
  66.  
  67. #ifndef NULL
  68.    #ifdef __cplusplus
  69.       #define NULL 0
  70.    #else
  71.      #define NULL ((void *)0)
  72.    #endif
  73. #endif
  74.  
  75. typedef unsigned short   SHANDLE;
  76. typedef unsigned long    LHANDLE;
  77.  
  78. #define NULLHANDLE    ( (LHANDLE) 0)
  79. #define NULLSHANDLE   ( (SHANDLE) 0)
  80.  
  81. /* NOINC */
  82. #define CHAR    char            /* ch  */
  83. #define SHORT   short           /* s   */
  84. #define LONG    long            /* l   */
  85.  
  86. #ifndef INCL_SAADEFS
  87.    #define INT  int             /* i   */
  88. #endif /* !INCL_SAADEFS */
  89. /* INC */
  90.  
  91. typedef unsigned char  UCHAR;   /* uch */
  92. typedef unsigned short USHORT;  /* us  */
  93. typedef unsigned long  ULONG;   /* ul  */
  94.  
  95. #ifndef INCL_SAADEFS
  96.    typedef unsigned int UINT;   /* ui  */
  97. #endif /* !INCL_SAADEFS */
  98.  
  99. typedef UCHAR     * _Seg16 PUCHAR16;
  100. typedef CHAR      * _Seg16 PCHAR16;
  101.  
  102. typedef char BYTE;    /* b   */
  103.  
  104. typedef char *PSZ;
  105. typedef char *NPSZ;
  106.  
  107. typedef char *PCH;
  108. typedef char *NPCH;
  109. typedef const char *PCSZ;
  110.  
  111. typedef int ( APIENTRY _PFN)  ();
  112. typedef _PFN    *PFN;
  113. typedef int ( APIENTRY _NPFN)  ();
  114. typedef _NPFN   *NPFN;
  115.  
  116.  
  117. typedef BYTE *PBYTE;
  118. typedef BYTE *NPBYTE;
  119.  
  120. typedef CHAR *PCHAR;
  121. typedef SHORT *PSHORT;
  122. typedef LONG *PLONG;
  123.  
  124. #ifndef INCL_SAADEFS
  125.    typedef INT *PINT;
  126. #endif /* !INCL_SAADEFS */
  127.  
  128. typedef UCHAR *PUCHAR;
  129. typedef USHORT *PUSHORT;
  130. typedef ULONG *PULONG;
  131.  
  132. #ifndef INCL_SAADEFS
  133.    typedef UINT *PUINT;
  134. #endif /* !INCL_SAADEFS */
  135.  
  136. typedef VOID   *PVOID;
  137. typedef PVOID  *PPVOID;
  138. typedef VOID   * _Seg16  PVOID16;
  139.  
  140. typedef unsigned long BOOL;     /* f   */
  141. typedef BOOL *PBOOL;
  142.  
  143. typedef unsigned short  BOOL16;
  144. typedef BOOL16     * _Seg16 PBOOL16;
  145.  
  146. /* NOINC */
  147. #define BOOL32    BOOL
  148. #define PBOOL32   PBOOL
  149. /* INC */
  150.  
  151. /* Quad-word */
  152. /* NOINC */
  153. typedef struct _QWORD          /* qword */
  154. {
  155.    ULONG   ulLo;
  156.    ULONG   ulHi;
  157. } QWORD;
  158. typedef QWORD *PQWORD;
  159. /* INC */
  160.  
  161. #ifndef INCL_SAADEFS
  162.    typedef unsigned short SEL;     /* sel */
  163.    typedef SEL *PSEL;
  164.  
  165.    /*** Useful Helper Macros */
  166.  
  167.    /* Create untyped far pointer from selector and offset */
  168.    #define MAKEP( sel,off ) (( void * )( void * _Seg16 )( (sel) << 16 | (off) ))
  169.    #define MAKE16P( sel,off ) (( void * _Seg16 )( (sel) << 16 | (off) ))
  170.  
  171.    /* Extract selector or offset from far pointer */
  172.    /* Warning:the selectorof macro should not be used*/
  173.    /* for 32 bit objects                             */
  174.    #define SELECTOROF(ptr)     ((((ULONG)(ptr))>>13)|7)
  175.    #define OFFSETOF(p)         (((PUSHORT)&(p))[0])
  176. #endif  /* !INCL_SAADEFS */
  177.  
  178. /* Cast any variable to an instance of the specified type. */
  179. #define MAKETYPE(v, type)   (*((type *)&v))
  180.  
  181. /* Calculate the byte offset of a field in a structure of type type. */
  182. #define FIELDOFFSET(type, field)    ((SHORT)&(((type *)0)->field))
  183.  
  184. /* Combine l & h to form a 32 bit quantity. */
  185. #define MAKEULONG(l, h)  ((ULONG)(((USHORT)(l)) | ((ULONG)((USHORT)(h))) << 16))
  186. #define MAKELONG(l, h)   ((LONG)MAKEULONG(l, h))
  187.  
  188. /* Combine l & h to form a 16 bit quantity. */
  189. #define MAKEUSHORT(l, h) (((USHORT)(l)) | ((USHORT)(h)) << 8)
  190. #define MAKESHORT(l, h)  ((SHORT)MAKEUSHORT(l, h))
  191.  
  192. /* Extract high and low order parts of 16 and 32 bit quantity */
  193. #define LOBYTE(w)       LOUCHAR(w)
  194. #define HIBYTE(w)       HIUCHAR(w)
  195. #define LOUCHAR(w)      ((UCHAR)(w))
  196. #define HIUCHAR(w)      ((UCHAR)(((USHORT)(w) >> 8) & 0xff))
  197. #define LOUSHORT(l)     ((USHORT)((ULONG)l))
  198. #define HIUSHORT(l)     ((USHORT)(((ULONG)(l) >> 16) & 0xffff))
  199.  
  200. /*** Common Error definitions ****/
  201.  
  202. typedef ULONG ERRORID;  /* errid */
  203. typedef ERRORID *PERRORID;
  204.  
  205. /* Combine severity and error code to produce ERRORID */
  206. #define MAKEERRORID(sev, error) (ERRORID)(MAKEULONG((error), (sev)))
  207.  
  208. /* Extract error number from an errorid */
  209. #define ERRORIDERROR(errid)            (LOUSHORT(errid))
  210.  
  211. /* Extract severity from an errorid */
  212. #define ERRORIDSEV(errid)              (HIUSHORT(errid))
  213.  
  214. /* Severity codes */
  215. #define SEVERITY_NOERROR                    0x0000
  216. #define SEVERITY_WARNING                    0x0004
  217. #define SEVERITY_ERROR                      0x0008
  218. #define SEVERITY_SEVERE                     0x000C
  219. #define SEVERITY_UNRECOVERABLE              0x0010
  220.  
  221. /* Base component error values */
  222.  
  223. #define WINERR_BASE     0x1000  /* Window Manager                  */
  224. #define GPIERR_BASE     0x2000  /* Graphics Presentation Interface */
  225. #define DEVERR_BASE     0x3000  /* Device Manager                  */
  226. #define SPLERR_BASE     0x4000  /* Spooler                         */
  227.  
  228. /*** Common types used across components */
  229.  
  230. /*** Common DOS types */
  231.  
  232. typedef LHANDLE HMODULE;        /* hmod */
  233. typedef LHANDLE PID;            /* pid  */
  234. typedef LHANDLE TID;            /* tid  */
  235. typedef LHANDLE HFILE;          /* hf   */
  236. typedef HFILE   *PHFILE;
  237.  
  238. #ifndef INCL_SAADEFS
  239.    typedef USHORT  SGID;        /* sgid */
  240. #endif  /* !INCL_SAADEFS */
  241.  
  242. typedef HMODULE *PHMODULE;
  243. typedef PID *PPID;
  244. typedef TID *PTID;
  245.  
  246. #ifndef INCL_SAADEFS
  247.    #ifndef __HSEM__
  248. /* NOINC */
  249.        #define __HSEM__
  250. /* INC */
  251.        typedef VOID *HSEM;      /* hsem */
  252.        typedef HSEM *PHSEM;
  253.    #endif
  254. #endif  /* !INCL_SAADEFS */
  255.  
  256. /*** Common SUP types */
  257.  
  258. typedef LHANDLE   HAB;         /* hab  */
  259. typedef HAB *PHAB;
  260.  
  261. /*** Common GPI/DEV types */
  262.  
  263. typedef LHANDLE   HPS;         /* hps  */
  264. typedef HPS *PHPS;
  265.  
  266. typedef LHANDLE   HDC;         /* hdc  */
  267. typedef HDC *PHDC;
  268.  
  269. typedef LHANDLE   HRGN;        /* hrgn */
  270. typedef HRGN *PHRGN;
  271.  
  272. typedef LHANDLE   HBITMAP;     /* hbm  */
  273. typedef HBITMAP *PHBITMAP;
  274.  
  275. typedef LHANDLE   HMF;         /* hmf  */
  276. typedef HMF *PHMF;
  277.  
  278. typedef LHANDLE   HPAL;        /* hpal */
  279. typedef HPAL *PHPAL;
  280.  
  281. typedef LONG     COLOR;        /* clr  */
  282. typedef COLOR *PCOLOR;
  283.  
  284. typedef struct _POINTL         /* ptl  */
  285. {
  286.    LONG  x;
  287.    LONG  y;
  288. } POINTL;
  289. typedef POINTL *PPOINTL;
  290. typedef POINTL *NPPOINTL;
  291.  
  292. typedef struct _POINTS         /* pts */
  293. {
  294.    SHORT x;
  295.    SHORT y;
  296. } POINTS;
  297. typedef POINTS *PPOINTS;
  298.  
  299. typedef struct _RECTL          /* rcl */
  300. {
  301.    LONG  xLeft;
  302.    LONG  yBottom;
  303.    LONG  xRight;
  304.    LONG  yTop;
  305. } RECTL;
  306. typedef RECTL *PRECTL;
  307. typedef RECTL *NPRECTL;
  308.  
  309. /* fixed point number - implicit binary point between 2 and 3 hex digits */
  310. typedef  LONG FIXED;     /* fx */
  311. typedef  FIXED *PFIXED;
  312.  
  313. typedef struct _MATRIXLF       /* matlf */
  314. {
  315.    FIXED fxM11;
  316.    FIXED fxM12;
  317.    LONG  lM13;
  318.    FIXED fxM21;
  319.    FIXED fxM22;
  320.    LONG  lM23;
  321.    LONG  lM31;
  322.    LONG  lM32;
  323.    LONG  lM33;
  324. } MATRIXLF;
  325. typedef MATRIXLF *PMATRIXLF;
  326.  
  327. typedef CHAR STR8[8];          /* str8 */
  328. typedef STR8 *PSTR8;
  329.  
  330. /*** common DEV/SPL types */
  331.  
  332. /* structure for Device Driver data */
  333.  
  334. typedef struct _DRIVDATA       /* driv */
  335. {
  336.    LONG    cb;
  337.    LONG    lVersion;
  338.    CHAR    szDeviceName[32];
  339.    CHAR    abGeneralData[1];
  340. } DRIVDATA;
  341. typedef DRIVDATA *PDRIVDATA;
  342.  
  343. /* pointer data for DevOpenDC */
  344.  
  345. typedef PSZ *PDEVOPENDATA;
  346.  
  347. /* array indices for array parameter for DevOpenDC, SplQmOpen or SplQpOpen */
  348.  
  349. #define ADDRESS          0
  350. #ifndef INCL_SAADEFS
  351.    #define DRIVER_NAME      1
  352.    #define DRIVER_DATA      2
  353.    #define DATA_TYPE        3
  354.    #define COMMENT          4
  355.    #define PROC_NAME        5
  356.    #define PROC_PARAMS      6
  357.    #define SPL_PARAMS       7
  358.    #define NETWORK_PARAMS   8
  359.  
  360.    /* structure definition as an alternative of the array parameter */
  361.  
  362.    typedef struct _DEVOPENSTRUC      /* dop */
  363.    {
  364.       PSZ        pszLogAddress;
  365.       PSZ        pszDriverName;
  366.       PDRIVDATA  pdriv;
  367.       PSZ        pszDataType;
  368.       PSZ        pszComment;
  369.       PSZ        pszQueueProcName;
  370.       PSZ        pszQueueProcParams;
  371.       PSZ        pszSpoolerParams;
  372.       PSZ        pszNetworkParams;
  373.    } DEVOPENSTRUC;
  374.    typedef DEVOPENSTRUC *PDEVOPENSTRUC;
  375. #endif  /* !INCL_SAADEFS */
  376.  
  377. /* common PMWP object and PMSTDDLG drag data */
  378.  
  379. typedef struct _PRINTDEST     /* prntdst */
  380. {
  381.    ULONG        cb;
  382.    LONG         lType;
  383.    PSZ          pszToken;
  384.    LONG         lCount;
  385.    PDEVOPENDATA pdopData;
  386.    ULONG        fl;
  387.    PSZ          pszPrinter;
  388. } PRINTDEST;
  389. typedef PRINTDEST *PPRINTDEST;
  390.  
  391. #define PD_JOB_PROPERTY   0x0001      /* Flags for .fl field           */
  392.  
  393. /*** common AVIO/GPI types */
  394.  
  395. /* values of fsSelection field of FATTRS structure */
  396. #define FATTR_SEL_ITALIC               0x0001
  397. #define FATTR_SEL_UNDERSCORE           0x0002
  398. #define FATTR_SEL_OUTLINE              0x0008
  399. #define FATTR_SEL_STRIKEOUT            0x0010
  400. #define FATTR_SEL_BOLD                 0x0020
  401. #define FATTR_SEL_MUST_COLOR           0x0100 /* fail if cant use color */
  402. #define FATTR_SEL_MUST_MIXEDMODES      0x0200 /* fail if cant use mixed modes */
  403. #define FATTR_SEL_MUST_HOLLOW          0x0400 /* fail if cant do outline */
  404.  
  405.  
  406. /* values of fsType field of FATTRS structure */
  407. #define FATTR_TYPE_KERNING      0x0004
  408. #define FATTR_TYPE_MBCS         0x0008
  409. #define FATTR_TYPE_DBCS         0x0010
  410. #define FATTR_TYPE_ANTIALIASED  0x0020
  411.  
  412. /* values of fsFontUse field of FATTRS structure */
  413. #define FATTR_FONTUSE_NOMIX         0x0002
  414. #define FATTR_FONTUSE_OUTLINE       0x0004
  415. #define FATTR_FONTUSE_TRANSFORMABLE 0x0008
  416. /* size for fields in the font structures */
  417.  
  418. #define FACESIZE 32
  419.  
  420. /* font struct for Vio/GpiCreateLogFont */
  421.  
  422. typedef struct _FATTRS            /* fat */
  423. {
  424.    USHORT  usRecordLength;
  425.    USHORT  fsSelection;
  426.    LONG    lMatch;
  427.    CHAR    szFacename[FACESIZE];
  428.    USHORT  idRegistry;
  429.    USHORT  usCodePage;
  430.    LONG    lMaxBaselineExt;
  431.    LONG    lAveCharWidth;
  432.    USHORT  fsType;
  433.    USHORT  fsFontUse;
  434. } FATTRS;
  435. typedef FATTRS *PFATTRS;
  436.  
  437. /* values of fsType field of FONTMETRICS structure */
  438. #define FM_TYPE_FIXED           0x0001
  439. #define FM_TYPE_LICENSED        0x0002
  440. #define FM_TYPE_KERNING         0x0004
  441. #define FM_TYPE_DBCS            0x0010
  442. #define FM_TYPE_MBCS            0x0018
  443. #define FM_TYPE_UNICODE         0x0040
  444. #define FM_TYPE_64K             0x8000
  445. #define FM_TYPE_ATOMS           0x4000
  446. #define FM_TYPE_FAMTRUNC        0x2000
  447. #define FM_TYPE_FACETRUNC       0x1000
  448.  
  449. /* values of fsDefn field of FONTMETRICS structure */
  450. #define FM_DEFN_OUTLINE         0x0001
  451. #define FM_DEFN_IFI             0x0002
  452. #define FM_DEFN_WIN             0x0004
  453. #define FM_DEFN_GENERIC         0x8000
  454.  
  455. /* Bitmask for character sets in fonts */
  456. #define FM_DEFN_LATIN1          0x0010   /* Base latin character set     */
  457. #define FM_DEFN_PC              0x0020   /* PC characters                */
  458. #define FM_DEFN_LATIN2          0x0040   /* Extended latin character set */
  459. #define FM_DEFN_CYRILLIC        0x0080   /* Cyrillic character set       */
  460. #define FM_DEFN_HEBREW          0x0100   /* Base Hebrew characters       */
  461. #define FM_DEFN_GREEK           0x0200   /* Base Greek characters        */
  462. #define FM_DEFN_ARABIC          0x0400   /* Base Arabic characters       */
  463. #define FM_DEFN_UGLEXT          0x0800   /* Additional UGL chars         */
  464. #define FM_DEFN_KANA            0x1000   /* Katakana and hiragana chars  */
  465. #define FM_DEFN_THAI            0x2000   /* Thai characters              */
  466.  
  467. #define FM_DEFN_UGL383          0x0070   /* Chars in OS/2 2.1            */
  468. #define FM_DEFN_UGL504          0x00F0   /* Chars in OS/2 Warp 4         */
  469. #define FM_DEFN_UGL767          0x0FF0   /* Chars in ATM fonts           */
  470. #define FM_DEFN_UGL1105         0x3FF0   /* Chars in bitmap fonts        */
  471.  
  472. /* values of fsSelection field of FONTMETRICS structure */
  473. #define FM_SEL_ITALIC           0x0001
  474. #define FM_SEL_UNDERSCORE       0x0002
  475. #define FM_SEL_NEGATIVE         0x0004
  476. #define FM_SEL_OUTLINE          0x0008          /* Hollow Outline Font */
  477. #define FM_SEL_STRIKEOUT        0x0010
  478. #define FM_SEL_BOLD             0x0020
  479. #define FM_SEL_ISO9241_TESTED   0x0040
  480.  
  481. /* DBCS font encoding */
  482. #define FM_SEL_JAPAN            0x1000
  483. #define FM_SEL_TAIWAN           0x2000
  484. #define FM_SEL_CHINA            0x4000
  485. #define FM_SEL_KOREA            0x8000
  486. #define FM_SEL_DBCSMASK         0xF000
  487.  
  488. /* ISO 9241 is an international standard covering health and safety      */
  489. /* in the work place for users of visual display terminals. Part 3 of    */
  490. /* this standard covers clarity and legibility of text displayed on      */
  491. /* computer screens, it places requirements on minimum sizes and         */
  492. /* luminance contrast. The presence of FM_SEL_ISO9241_TESTED flag in the */
  493. /* font metrics indicates that the font has been tested for compliance   */
  494. /* to the standard. The FM_ISO_XXX flags indicate the results of the     */
  495. /* test on the IBM 9515, 9517 and 9518 color displays at the supported   */
  496. /* dimensions of 640x480 and 1024x768. To ensure compliance the          */
  497. /* sXDeviceRes and sYDeviceRes must also match the target display        */
  498. /* resolution.                                                           */
  499.  
  500. /* values of fbPassed/FailedISO field in the PANOSE structure */
  501. #define FM_ISO_9518_640        0x01
  502. #define FM_ISO_9515_640        0x02
  503. #define FM_ISO_9515_1024       0x04
  504. #define FM_ISO_9517_640        0x08
  505. #define FM_ISO_9517_1024       0x10
  506.  
  507. /* values of fsCapabilities field of FONTMETRICS structure */
  508. #define FM_CAP_NOMIX            0x0001
  509. #define FM_CAP_NO_COLOR         0x0002
  510. #define FM_CAP_NO_MIXEDMODES    0x0004
  511. #define FM_CAP_NO_HOLLOW        0x0008
  512.  
  513.  
  514. /* font metrics returned by GpiQueryFonts and others */
  515.  
  516. typedef struct _PANOSE   /* panose */
  517. {
  518.    BYTE    bFamilyType;
  519.    BYTE    bSerifStyle;
  520.    BYTE    bWeight;
  521.    BYTE    bProportion;
  522.    BYTE    bContrast;
  523.    BYTE    bStrokeVariation;
  524.    BYTE    bArmStyle;
  525.    BYTE    bLetterform;
  526.    BYTE    bMidline;
  527.    BYTE    bXHeight;
  528.    BYTE    fbPassedISO;
  529.    BYTE    fbFailedISO;
  530. } PANOSE;
  531.  
  532. typedef struct _FONTMETRICS     /* fm */
  533. {
  534.    CHAR    szFamilyname[FACESIZE];
  535.    CHAR    szFacename[FACESIZE];
  536.    USHORT  idRegistry;
  537.    USHORT  usCodePage;
  538.    LONG    lEmHeight;
  539.    LONG    lXHeight;
  540.    LONG    lMaxAscender;
  541.    LONG    lMaxDescender;
  542.    LONG    lLowerCaseAscent;
  543.    LONG    lLowerCaseDescent;
  544.    LONG    lInternalLeading;
  545.    LONG    lExternalLeading;
  546.    LONG    lAveCharWidth;
  547.    LONG    lMaxCharInc;
  548.    LONG    lEmInc;
  549.    LONG    lMaxBaselineExt;
  550.    SHORT   sCharSlope;
  551.    SHORT   sInlineDir;
  552.    SHORT   sCharRot;
  553.    USHORT  usWeightClass;
  554.    USHORT  usWidthClass;
  555.    SHORT   sXDeviceRes;
  556.    SHORT   sYDeviceRes;
  557.    SHORT   sFirstChar;
  558.    SHORT   sLastChar;
  559.    SHORT   sDefaultChar;
  560.    SHORT   sBreakChar;
  561.    SHORT   sNominalPointSize;
  562.    SHORT   sMinimumPointSize;
  563.    SHORT   sMaximumPointSize;
  564.    USHORT  fsType;
  565.    USHORT  fsDefn;
  566.    USHORT  fsSelection;
  567.    USHORT  fsCapabilities;
  568.    LONG    lSubscriptXSize;
  569.    LONG    lSubscriptYSize;
  570.    LONG    lSubscriptXOffset;
  571.    LONG    lSubscriptYOffset;
  572.    LONG    lSuperscriptXSize;
  573.    LONG    lSuperscriptYSize;
  574.    LONG    lSuperscriptXOffset;
  575.    LONG    lSuperscriptYOffset;
  576.    LONG    lUnderscoreSize;
  577.    LONG    lUnderscorePosition;
  578.    LONG    lStrikeoutSize;
  579.    LONG    lStrikeoutPosition;
  580.    SHORT   sKerningPairs;
  581.    SHORT   sFamilyClass;
  582.    LONG    lMatch;
  583.    LONG    FamilyNameAtom;
  584.    LONG    FaceNameAtom;
  585.    PANOSE  panose;
  586. } FONTMETRICS;
  587. typedef FONTMETRICS *PFONTMETRICS;
  588.  
  589. /*** Common WIN types */
  590.  
  591. typedef VOID *MPARAM;      /* mp    */
  592. typedef MPARAM *PMPARAM;   /* pmp   */
  593. typedef VOID *MRESULT;     /* mres  */
  594. typedef MRESULT *PMRESULT; /* pmres */
  595.  
  596. typedef LHANDLE HWND;      /* hwnd */
  597. typedef HWND *PHWND;
  598.  
  599. typedef LHANDLE HMQ;       /* hmq */
  600. typedef LHANDLE *PHMQ;
  601.  
  602. /* NOINC */
  603. #define WRECT RECTL
  604. #define PWRECT PRECTL
  605. #define NPWRECT NPRECTL
  606.  
  607. #define WPOINT POINTL
  608. #define PWPOINT PPOINTL
  609. #define NPWPOINT NPPOINTL
  610. /* INC */
  611.  
  612. typedef struct _ICONINFO {  /* icninf */
  613.    ULONG   cb;                  /* size of ICONINFO structure */
  614.    ULONG   fFormat;
  615.    PSZ     pszFileName;         /* use when fFormat = ICON_FILE */
  616.    HMODULE hmod;                /* use when fFormat = ICON_RESOURCE */
  617.    ULONG   resid;               /* use when fFormat = ICON_RESOURCE */
  618.    ULONG   cbIconData;          /* use when fFormat = ICON_DATA     */
  619.    PVOID   pIconData;           /* use when fFormat = ICON_DATA     */
  620. } ICONINFO;
  621. typedef ICONINFO FAR *PICONINFO;
  622.  
  623. #define ICON_FILE     1         /* flags for fFormat */
  624. #define ICON_RESOURCE 2
  625. #define ICON_DATA     3
  626. #define ICON_CLEAR    4
  627.  
  628. #pragma pack(2) /* force structure alignment packing */
  629.  
  630. /* Binary resources may be bound into application executables or */
  631. /* passed as a parameter when creating a window or dialog        */
  632. /* Currently they must be the same for both 16-bit and 32-bit    */
  633. /* so we pack the structures.                                    */
  634. typedef struct _ACCEL    /* acc */
  635. {
  636.    USHORT  fs;
  637.    USHORT  key;
  638.    USHORT  cmd;
  639. } ACCEL;
  640. typedef ACCEL *PACCEL;
  641.  
  642. #pragma pack()  /* restore packing to default */
  643.  
  644. typedef LHANDLE HPOINTER;
  645.  
  646. #endif /* __OS2DEF__ */
  647.  
  648. /* Large File Support >2GB     */
  649. /* 2GB Definition for LONGLONG */
  650. /* this section of assembly code is here to work around deficienciey */
  651. /* in MASM for handling structures */
  652. /* the structure must be defined on both passes of the assembler, but */
  653. /* checks need to be in place to protect against multiple includes */
  654. /* ASM
  655.  
  656. ifdef @Version
  657. if @Version lt 600
  658.  
  659. if1
  660. ifndef LONGLONG_PASS1
  661. LONGLONG_PASS1       EQU     1
  662. INCLUDEIT = 1
  663. endif
  664. endif
  665. if2
  666. ifndef LONGLONG_PASS2
  667. LONGLONG_PASS2       EQU     1
  668. INCLUDEIT = 1
  669. endif
  670. endif
  671.  
  672. else
  673. ifndef INCLUDEIT
  674. INCLUDEIT = 1
  675. endif
  676. endif
  677.  
  678. else
  679. ifndef INCLUDEIT
  680. INCLUDEIT = 1
  681. endif
  682. endif
  683. */
  684.  
  685. /* NOINC */
  686. #ifndef LONGLONG_INCLUDED
  687. #define LONGLONG_INCLUDED 1
  688. /* INC */
  689.  
  690.   #ifndef INCL_LONGLONG
  691. /* ASM if INCLUDEIT */
  692.     typedef struct _LONGLONG {  /* LONGLONG */
  693.         ULONG ulLo;
  694.         LONG ulHi;
  695.     }LONGLONG;
  696.     typedef LONGLONG *PLONGLONG;
  697.  
  698.     typedef struct _ULONGLONG {  /* ULONGLONG */
  699.         ULONG ulLo;
  700.         ULONG ulHi;
  701.     }ULONGLONG;
  702.     typedef ULONGLONG *PULONGLONG;
  703. /* ASM
  704. INCLUDEIT = 0
  705. endif
  706. */
  707. /* NOINC */
  708.   #else
  709.     typedef long long LONGLONG;
  710.     typedef LONGLONG * PLONGLONG;
  711.     typedef unsigned long long ULONGLONG;
  712.     typedef ULONGLONG * PULONGLONG;
  713. /* INC */
  714.   #endif /* longlong */
  715. /* NOINC */
  716. #endif
  717. /* INC */
  718.  
  719.  
  720. /* NOINC */
  721. #ifdef __cplusplus
  722.         }
  723. #endif
  724. #if __IBMC__ || __IBMCPP__
  725.    #pragma info( none )
  726.       #ifndef __CHKHDR__
  727.          #pragma info( restore )
  728.       #endif
  729.    #pragma info( restore )
  730. #endif
  731. /* INC */
  732. /**************************** end of file **********************************/
  733.