/*  %kw # %v    %n    %d    %t # */
/* Version # 22    METCONST.H    7-Dec-95    11:03:56 # */
/***************************************************************** 
 *  METCONST.H  -  MetaWINDOW 'Constant' and 'Type' Definitions  *
 *  Copyright (c) 1985-1993  Metagraphics Software Corporation   * 
 *****************************************************************/

#ifndef  MS_DOS
!!!Error!!!  You must use METAWNDO.H include file
#endif /*MS_DOS*/

#define  Byte    unsigned char  /* "Byte" type (8 bits)      */
#define  Word    unsigned short /* "Word" type (16 bits)     */


/* Graphics Adaptor Definitions          */

/*=======================================*/
/* Metagraphics Software Corp            */  
/*=======================================*/
#define cMET                0x0000
#define cNODEVICE          (cMET+0)      /* no graphics device required   */
#define cMEMORY            (cMET+1)      /* Conventional Memory grafMap   */
#define cEMS               (cMET+2)      /* Expanded Memory (EMS) grafMap */
#define cUSER              (cMET+3)      /* User Defined grafmap          */   
#define cDISK              (cMET+4)      /* Disk Based grafMap            */
#define cXMS               (cMET+5)      /* Extended Memory (XMS) grafMap */

/*=======================================*/
/*   Video Electronics Standards Assoc.  */
/*=======================================*/
#define cVESA                   0x1A00
/* SuperVGA */
#define VESA800x600        (cVESA+0x11)  /* VESA VGA 800x600   16-color  */
#define VESA1024x768       (cVESA+0x21)  /* VESA VGA 1024x768  16-color  */
#define VESA640x480X       (cVESA+0x12)  /* VESA VGA 640x480   256-color */
#define VESA800x600X       (cVESA+0x22)  /* VESA VGA 800x600   256-color */
#define VESA1024x768X      (cVESA+0x32)  /* VESA VGA 1024x768  256-color */
#define VESA1280x1024X		(cVESA+0x33)  /* VESA VGA 1280x1024 256-color */
#define VESA640x480Y       (cVESA+0x43)  /* VESA VGA 640x480   32K-color */
#define VESA640x480YY      (cVESA+0x44)  /* VESA VGA 640x480   64K-color */
#define VESA800x600Y       (cVESA+0x41)  /* VESA VGA 800x600   32K-color */
#define VESA800x600YY      (cVESA+0x42)  /* VESA VGA 800x600   64K-color */
#define VESA1024x768Y      (cVESA+0x45)  /* VESA VGA 1024x768  32K-color */
#define VESA1024x768YY     (cVESA+0x46)  /* VESA VGA 1024x768  64K-color */
#define VESA1280x1024Y     (cVESA+0x47)  /* VESA VGA 1280x1024 32K-color */
#define VESA1280x1024YY    (cVESA+0x48)  /* VESA VGA 1280x1024 64K-color */
#define VESA640x480Z       (cVESA+0x71)  /* VESA VGA 640x480   16M-color */
#define VESA800x600Z       (cVESA+0x72)  /* VESA VGA 800x600   16M-color */


/*========================================*/
/*   IBM 8514/A Register Level Compatible */
/*   Including the ATI Graphics Ultra     */
/*========================================*/
/* 8514 */
#define V8514A1024x768x8I  (cVESA+0x52)  /* 1024x768  256-color,intlacd */
#define V8514A1024x768x8N  (cVESA+0x62)  /* 1024x768  256-color,non-inl */

/*=======================================*/
/*            ATI Technologies           */
/*=======================================*/
#define  cATI                  0x0100
#define ATI800x600         (cATI+0x11)   /* ATI VGA Wonder board        */
#define ATI640x480X        (cATI+0x13)  
#define ATI1024x768        (cATI+0x12)   /* 1024x768 16-color, banked   */
                                         /*  new ATI-Wonder boards only */
#define ATI800x600X        (cATI+0x23)   /* 800x600  256 color (XL)     */
#define ATI1024x768X       (cATI+0x33)   /* 1024x768 256 color (XL)     */
#define ATI640x480Y        (cATI+0x14)   /* 640x480 32K color (XL)      */

#define  cATIUP                0x2200    /* ATI Graphics Ultra Pro      */      
#define ATIUP640x480X    (cATIUP+0x13)   /* 640x480  256 color          */
#define ATIUP800x600X    (cATIUP+0x23)   /* 800x600  256 color          */
#define ATIUP1024x768X   ( cVESA+0x62)   /* 1024x768  256 color (8514)  */
#define ATIUP1280x1024X  (cATIUP+0x43)   /* 1280x1024  256 color        */

/*=======================================*/
/*                AT & T                 */
/*=======================================*/
#define cATT                   0x0200
#define ATT640x400         (cATT+0x11)   /* 640x400 monochrome          */
#define DEB640x200         (cATT+0x12)   /* 640x200 16-color (DEB card) */
#define DEB640x400         (cATT+0x22)   /* 640x400 16-color (DEB card) */


/*=======================================*/ 
/*         Compaq Computer Corp          */
/*=======================================*/
#define cCPQ                   0x0400
#define CPQ640x400         (cCPQ+0x11)   /* Compaq Plasma Screen (AT&T) */
#define CPQ800x600         (cCPQ+0x13)   /* Compaq Advanced VGA         */
#define CPQ640x480X        (cCPQ+0x22)   /* Compaq Advanced VGA         */
#define CPQ1024x768X       (cCPQ+0x23)   /* Compaq QVision VGA          */
 
/*=======================================*/
/*           Cornerstone                 */
/*=======================================*/ 
#define cCOR                   0x0500
#define DP2048x1538        (cCOR+0xA2)   /* Dual Page 150               */  
#define DP2048x1538A       (cCOR+0xB2)   /*   - alternate setting       */  

/*=======================================*/
/*              Everex                   */
/*=======================================*/
#define cEVX                   0x0600    /* Everex Edge Adaptors        */
#define EVX800x600         (cEVX+0x12)   /* Everex EVGA #673 Adaptor    */

/*=======================================*/
/*                Genoa                  */
/*=======================================*/
#define cGEN                   0x0800
                                         /* SuperEGA HiRes+ (4880-9)    */
#define GEN640x480         (cGEN+0x11)   /* 640x480 16 color            */
#define GEN800x600         (cGEN+0x21)   /* 800x600 16-color            */
                                         /* SuperVGA HiRes 5000/6000sers*/
#define GEN800x600V        (cGEN+0x12)   /* 800x600 16-color            */
                                         /* SuperVGA HiRes - 5000 series*/
#define GEN1024x768        (cGEN+0x32)   /* 5000 banked                 */
#define GEN640x350X        (cGEN+0x42)   /* 640x350 256-color           */
#define GEN640x480X        (cGEN+0x52)   /* 640x480 256-color           */
                                         /* SuperVGA HiRes - 6000 series*/
#define GEN61024x768       (cGEN+0x13)   /* 6000 banked                 */
#define GEN6640x480X       (cGEN+0x23)   /* 6000 640x480 256-color      */

/*=======================================*/
/*               Hercules                */
/*=======================================*/
#define cHERC                 0x0A00
#define HER720x348        (cHERC+0x11)   /* 720x348 monochrome          */

/*=======================================*/
/*           IBM and compatibles         */
/*=======================================*/
#define cIBM                  0x0C00
#define CGA640x200         (cIBM+0x21)   /* CGA 640x200 2-color         */
#define EGA320x200         (cIBM+0x12)   /* EGA 320x200 16-color        */
#define EGA640x200         (cIBM+0x22)   /* EGA 640x200 16-color        */
#define EGA640x350         (cIBM+0x32)   /* EGA 640x350 16-color (128k) */
#define EGAMono            (cIBM+0x42)   /* EGA 640x350 (monochrome)    */
#define EGA640x350MP       (cIBM+0x52)   /* EGA as a multiplane device  */
#define EGA640x3502        (cIBM+0x62)   /* EGA 640x350  2-color (128k) */
#define VGA320x200         (cIBM+0x13)   /* VGA 320x200 16-color        */
#define VGA640x200         (cIBM+0x23)   /* VGA 640x200 16-color        */
#define VGA640x350         (cIBM+0x33)   /* VGA 640x350 16-color        */
#define VGA640x480         (cIBM+0x43)   /* VGA 640x480 16-color        */
#define VGA640x4802        (cIBM+0x53)   /* VGA 640x480 2-color (MCGA)  */
#define VGA320x200X        (cIBM+0x63)   /* VGA 320x200 256-color (PS2) */
#define TTS720x350         (cIBM+0x14)   /* IBM 3270 PC  720x350 mono   */

/*=======================================*/
/*        Micro Display Systems          */
/*=======================================*/
#define cMDS                  0x0D00
#define MDS736x1008        (cMDS+0x11)   /* 736x1008 monochrome         */

/*=======================================*/
/*               NSI Logic               */
/*=======================================*/
#define cNSI                  0x1D00
#define NSI800x600         (cNSI+0x11)   /* 800x600 16-color            */

/*=======================================*/
/*   Oak Technologies OTI 067 chipset    */
/*=======================================*/
#define cOAK                  0x1F00
#define OAK800x600         (cOAK+0x11)
#define OAK1024x768        (cOAK+0x31)   /* Planar, Bank Select         */
#define OAK640x480X        (cOAK+0x51)     

/*=======================================*/
/*          Orchid Technologies          */
/*=======================================*/
#define cORCD                 0x1100
/* VGA Designer - Uses STB Extra/EM      */
/* VGA ProDesigner II -Uses 4000 chipset */

/*=======================================*/
/*      Western Digital - Paradise       */
/*=======================================*/
#define cPAR                  0x1200     /* EGA AutoSwitch              */
#define PAR640x480         (cPAR+0x11)   /* 640x480 16-color            */
#define PAR800x600         (cPAR+0x12)   /* VGA 800x600 16-color        */
#define PAR1024x768        (cPAR+0x32)   /* 1024x768 16-color, banked   */
#define PAR640x480X        (cPAR+0x42)   /* 640x480 256-color           */

/*=======================================*/
/*             S3 Incorporated           */
/*=======================================*/
#define cS3I                  0x2100
#define S3I640x480X        (cS3I+0x14)   /* 640x480 256-color */
#define S3I800x600X        (cS3I+0x24)   /* 800x600 256-color */
#define S3I1024x768X       (cS3I+0x34)   /* 1024x768 256-color */
#define S3I1280x1024X      (cS3I+0x44)   /* 1280x1024 256-color */

/*=======================================*/
/*             Sigma Designs             */
/*=======================================*/
#define cSIG                  0x1400
#define SIG1664x1200       (cSIG+0x11)   /* Laserview 1664x1200 2 clr   */
#define SIG1664x1200A      (cSIG+0x21)   /*               - ALT setting */

/*=======================================*/
/*             STB Corp                  */
/*=======================================*/
#define cSTB                  0x1500
/*STB VGA Extra/EM - Uses Tseng Labs 3000 chip set & matching BIOS calls*/
#define STB800x600         (cSTB+0x11)   /* VGA 800x600x16              */
#define STB1024x768        (cSTB+0x31)   /* VGAExtra 1024x768x16, banked*/
#define STB640x350X        (cSTB+0x41)   /* VGAExtra 640x350x256        */
#define STB640x480X        (cSTB+0x51)   /* VGAExtra 640x480x256        */
/*STB VGA EM-16/PLUS - Uses TsengLabs 4000 & matching BIOS calls        */

/*=======================================*/
/*              Tecmar graphics          */
/*=======================================*/
#define cTEC                  0x1600     /* Tecmar VGA/AD               */ 
#define TEC800x600         (cTEC+0x11)   /* 800x600x16-color            */
#define TEC1024x768        (cTEC+0x31)   /* 1024x768x16-color - banked  */
#define TEC640x350X        (cTEC+0x41)   /* 640x350x256-color           */
#define TEC640x480X        (cTEC+0x51)   /* 640x480x256-color           */

/*=======================================*/
/*               Toshiba                 */
/*=======================================*/
#define cTOS                  0x1700
#define TOS640x400         (cTOS+0x11)   /* 640x400 monochrome          */

/*=======================================*/
/*             Trident                   */
/*=======================================*/
#define cTRIDENT              0x2000
#define TRI800x600      (cTRIDENT+0x11)  /*  800x600  16-color          */
#define TRI1024x768     (cTRIDENT+0x31)  /* 1024x768  16-color, banked  */
#define TRI640x480X     (cTRIDENT+0x41)  /*  640x480 256-color          */
#define TRI800x600X     (cTRIDENT+0x51)  /*  800x600 256-color          */
#define TRI1024x768X    (cTRIDENT+0x71)  /* 1024x768 256-color          */

/*=======================================*/
/*              Tseng Labs               */
/*=======================================*/
#define cTSENG                0x1900
#define EVA640x480        (cTSENG+0x13)  /* EGA EVA/480 board           */
                                         /*     TSENG 4000 Series       */
#define TS4800x600        (cTSENG+0x12)  /*  800x600  16-color          */
#define TS41024x768       (cTSENG+0x22)  /* 1024x768  16-color, banked  */
#define TS4640x350X       (cTSENG+0x32)  /*  640x350 256-color          */
#define TS4640x480X       (cTSENG+0x42)  /*  640x480 256-color          */
#define TS4800x600X       (cTSENG+0x52)  /*  800x600 256-color          */
#define TS41024x768X      (cTSENG+0x72)  /* 1024x768 256-color          */
#define TS4640x480Y       (cTSENG+0x14)  /*  640x480 64K-color          */
#define TS4800x600Y       (cTSENG+0x24)  /*  800x600 64K-color          */

/*=======================================*/
/*    Video Seven/Headland               */
/*=======================================*/
#define cV7                   0x1B00
                                         /* VEGA VGA                    */
#define V7800x600          (cV7+0x41)    /*    800x600 16-color         */
                                         /* VRAM, FastWrite, 1024i      */
#define V7640x480X         (cV7+0x12)    /*    640x480 256-color        */
#define V71024x768         (cV7+0x22)    /*   1024x768 16-color banked  */
#define V71024x768x2       (cV7+0x32)    /*   1024x768 2-color          */
                                         /* VRAM II, Radius Multiview   */
#define V72640x480X        (cV7+0x14)    /*    640x480 256-color        */
#define V72800x600X        (cV7+0x24)    /*    800x600 256-color        */
#define V721024x768X       (cV7+0x34)    /*    1024x768 256-color       */

/*=======================================*/
/*             Wyse                      */
/*=======================================*/
#define cWYSE                 0x1C00 
#define WYS640x400         (cWYSE+0x11)  /*  640x400 monochrome         */
#define WYS1280x400        (cWYSE+0x21)  /* 1280x400 monochrome         */
#define WYS1280x800        (cWYSE+0x31)  /* 1280x800 monochrome         */

/*=======================================*/
/*     Input Device Definitions          */
/*=======================================*/
#define MsDriver           0x01          /*  Mouse Driver Ver. 6.0 or >  */
#define MoCOM1             0x11          /*  Mouse Systems/Logitec COM1  */
#define MoCOM2             0x21          /*  Mouse Systems/Logitec COM2  */
#define MsCOM1             0x31          /*  Microsoft Serial Mouse COM1 */
#define MsCOM2             0x41          /*  Microsoft Serial Mouse COM2 */
#define JoyStick           0x04          /*  Joystick on game port       */



/* ----- RASTEROP, PENMODE & TEXTMODE Pixel Operations ----- */

#define zREPz          0   /*       src                      */
#define zORz           1   /*       src     OR      dst      */
#define zXORz          2   /*       src     XOR     dst      */
#define zNANDz         3   /*    (NOT src)  AND     dst      */
#define zNREPz         4   /*    (NOT src)                   */
#define zNORz          5   /*    (NOT src)  OR      dst      */
#define zNXORz         6   /*    (NOT src)  XOR     dst      */
#define zANDz          7   /*       src     AND     dst      */
#define zCLEARz        8   /*               0s               */
#define zORNz          9   /*       src     OR   (NOT dst)   */
#define zNOPz         10   /*                       dst      */
#define zANDNz        11   /*       src     AND  (NOT dst)   */
#define zSETz         12   /*               1s               */
#define zNORNz        13   /*    (NOT src)  OR   (NOT dst)   */
#define zINVERTz      14   /*                    (NOT dst)   */
#define zNANDNz       15   /*    (NOT src)  AND  (NOT dst)   */

/* Source monochrome "Transparent" rasterOp Operations */
#define xREPx         16   /*    (!0src)                     */
#define xORx          17   /*    (!0src)    OR      dst      */
#define xXORx         18   /*    (!0src)    XOR     dst      */
#define xNANDx        19   /*  (NOT !0src)  AND     dst      */
#define xNREPx        20   /*  (NOT !0src)                   */
#define xNORx         21   /*  (NOT !0src)  OR      dst      */
#define xNXORx        22   /*  (NOT !0src)  XOR     dst      */
#define xANDx         23   /*    (!0src)    AND     dst      */
#define xCLEARx       24   /*                       dst      */
#define xORNx         25   /*    (!0src)    OR   (NOT dst)   */
#define xNOPx         26   /*                       dst      */
#define xANDNx        27   /*    (!0src)    AND  (NOT dst)   */
#define xSETx         28   /*               1s               */
#define xNORNx        29   /*  (NOT !0src)  OR   (NOT dst)   */
#define xINVERTx      30   /*                    (NOT dst)   */
#define xNANDNx       31   /*  (NOT !0src)  AND  (NOT dst)   */
        

/* ----------------------- Text System Defines ------------- */

#define cNormal         0  /* "TextFace" definitions         */
#define cBold           1
#define cItalic         2
#define cUnderline      4
#define cStrikeout      8
#define cHalftone      16
#define cMirrorX       32
#define cMirrorY       64
#define cProportional 128

#define alignLeft       0  /* "TextAlign" - Horizontal       */
#define alignCenter     1
#define alignRight      2

#define alignBaseline   0  /* "TextAlign" - Vertical         */
#define alignBottom     1
#define alignMiddle     2
#define alignTop        3

#define pathRight       0  /* "TextPath" definitions         */
#define pathUp        900
#define pathLeft     1800
#define pathDown     2700


/* ---------------- System structures & defines ------------ */

#define True            1
#define False           0

#define Black           0
#define Blue            1
#define Green           2
#define Cyan            3
#define Red             4
#define Magenta         5
#define Brown           6
#define LtGray          7
#define Gray            8
#define LtBlue          9
#define LtGreen        10
#define LtCyan         11
#define LtRed          12
#define LtMagenta      13
#define Yellow         14
#define White          -1

#define TextPg          0
#define TextPg0         0
#define GrafPg        256
#define GrafPg0       256
#define GrafPg1       257
#define GrafPgAll     255

#define enterRetrace    1
#define enterVideo      2
#define inRetrace       3
#define inVideo         4

#define upperLeft       1
#define lowerLeft       0

typedef struct _point      /* "Point" structure type         */
   {short    X;              /* X coordinate                 */
    short    Y;              /* Y coordinate                 */
   }  point;

typedef struct _rect       /* "Rectangle" structure type     */
   {short    Xmin;           /* minimum X                    */
    short    Ymin;           /* minimum Y                    */
    short    Xmax;           /* maximum X                    */
    short    Ymax;           /* maximum Y                    */
   }  rect;

/* ------------------- Polygon defines --------------------- */

typedef struct _polyHead   /* Polygon "header" structure     */
   {Word     polyBgn;        /* beginning index              */
    Word     polyEnd;        /* ending index                 */
    rect     polyRect;       /* boundry limits               */
   }  polyHead;

#define shapeConvex     0   /* "FillPolygon" type definitions */
#define shapeNonconvex  1
#define shapeComplex    2
#define coordRel        1   /* "FillPolygon" coordinate type defs */
#define coordAbs        0
#define ruleWinding     1   /* polygon fill rule defs */
#define ruleOddEven     0

/* ---------------------- Pen Defines ---------------------- */

#define shapeRect       0    /* PenShape() definitions       */
#define shapeOval       1    /*                              */
#define penThin       0,0    /* PenSize() thin lines         */

#define dashOnOff       0    /* On-off style dashing         */
#define dashDouble      1    /* Double dashing               */

typedef struct _dashRcd    /* Dash Style Record              */
   {short     dashSize;      /* # of elements in dashList    */
    short     dashRsvd;      /*  (reserved for future use)   */
    Byte     *dashList;      /* ptr to list of on/off counts */
   } dashRcd;

typedef struct _dashes     /* List of Dash Records           */
   {dashRcd   dash[8];       /* List of 8 dash records       */
   } dashes;

/* --------------- Images, Patterns, Cursor ---------------- */

typedef unsigned char image;    /* "image" data type equate  */

typedef struct _imageHeader/* Image Header record structure  */
   {short    imWidth;        /* Pixel width (X)              */
    short    imHeight;       /* Pixel height (Y)             */
    char     imAlign;        /* Image alignment              */
    char     imFlags;        /* Image flags                  */
    short    imRowBytes;     /* Bytes per row                */
    short    imBits;         /* Bits per pixel               */
    short    imPlanes;       /* Planes per pixel             */
/*  image    imData[]; */    /* (image data, variable length)*/
   } imageHeader;

typedef struct _patRcd     /* Pattern Image definition       */
   {short    patWidth;       /* must be 1..31                */
    short    patHeight;      /* must be 1..31                */
    char     patAlign;       /* must be zero                 */
    char     patFlags;       /* must be zero                 */
    short    patRowBytes;    /* must be widthxbits rounded up*/
    short    patBits;        /* value of 1 or match dest     */
    short    patPlanes;      /* value of 1 or match dest     */
/*  image    patData[]; */   /* pattern data bytes (variable)*/
   }  patRcd;

typedef struct _patList    /* Pattern List structure         */
   {patRcd  *patPtr[32];     /* pointers to pattern images   */
    char     patAlignX[32];  /* pattern X alignments         */
    char     patAlignY[32];  /* pattern Y alignments         */
   }  patList;

typedef struct _cursor     /* Cursor Image definition        */
   {short    curWidth;       /* must be 16 or 32             */
    short    curHeight;      /* must be 16 or 32             */
    char     curAlign;       /* must be 0                    */
    char     curFlags;       /* must be 0                    */
    short    curRowBytes;    /* must be 2 or 4               */
    short    curBits;        /* must be 1                    */
    short    curPlanes;      /* must be 1                    */
/*  image    curData[]; */   /* cursor data bytes (variable) */
   }  cursor;

typedef struct _cursorRcd  /* Cursor Record definition       */
   {short    hotX;           /* cursor align point X         */
    short    hotY;           /* cursor align point Y         */
    cursor   scrnMask;       /* cursor background image      */
    cursor   cursMask;       /* cursor foreground image      */
   }  cursorRcd;


typedef struct _segPts     /* (Poly-) Segment structure      */
   {short    sX1;            /* start X                      */
    short    sY1;            /* start Y                      */
    short    sX2;            /* end X                        */
    short    sY2;            /* end Y                        */
    short    sCap;           /* cap style                    */
   }  segPts;

#define capBoth        0   /* "Segment" cap styles           */
#define capNotFirst   -1
#define capNotLast     1


/* ---------------- RGB Palette Programming ---------------- */
 
typedef struct _palData    /* Palette data structure         */
   {Word     palRed;         /* red intensity                */
    Word     palGreen;       /* green intensity              */
    Word     palBlue;        /* blue intensity               */
   } palData;



/* --------------- Input device and Event system ----------- */

typedef struct _mwEvent    /* Event record structure         */
   {short    eventTime;      /* System time stamp            */
    Byte     eventType;      /* Event type flags             */
    Byte     eventSource;    /* Event source device ID       */
    short    eventChar;      /* Keyboard Character code      */ 
    short    eventScan;      /* Keyboard Scan code           */
    short    eventState;     /* Keyboard State info          */
    short    eventButtons;   /* Positional device buttons    */
    short    eventX;         /* Positional device X          */
    short    eventY;         /* Positional device Y          */
    short    eventUser[2];   /* User defined event data      */
   }  mwEvent;

                           /* Event Type and Mask flags      */
#define evntNONE    0x00     /* no events pending            */
#define evntMOVE    0x01     /* input movement               */
#define evntPRESS   0x02     /* button press                 */
#define evntRELEASE 0x04     /* button release               */
#define evntKEYDN   0x08     /* key press                    */
#define evntKEYUP   0x10     /* key release                  */
#define evntUSER1   0x20     /* user program event 1         */
#define evntUSER2   0x40     /* user program event 2         */
#define evntALL     0xFF     /* MaskEvent() - enable all     */

                          
                           /* "eventButtons" mouse buttons   */
#define swLeft         1 
#define swRight        2 
#define swMiddle       4     /* (not on 2 button mice)       */
#define swAll          7


/* ------------------- FileQuery record -------------------- */
typedef struct _dirRec     /* FileQuery - directory record   */
   {short    fileTime;       /* File create time             */
    short    fileDate;       /* File create date             */
    long     fileSize;       /* File size (bytes)            */
    char     fileAttr;       /* File attribute               */
    char     fileName[15];   /* "FILENAME.EXT\0"             */
   }  dirRec;


/* ------------------- HardCopy record -------------------- */

typedef struct _HCInfoRec
   {short    hcPins;         /* Number of elements in print swath      */
    short    hcInlen;        /* Number of bytes in "hcInit" string     */
    Byte     hcInit[32];     /*   Sent to init printer for output      */
    short    hcRslen;        /* Number of bytes in "hcReset" string    */
    Byte     hcReset[16];    /*   Sent to reset after output complete  */
    short    hcHdlen;        /* Number of bytes in "hcHeader" string   */
    Byte     hcHeader[16];   /*   Sent before every line               */
    short    hcPstlen;       /* Number of bytes in "hcPstam" string    */
    Byte     hcPstam[16];    /*   Sent after length specification      */
    short    hcTrlen;        /* Number of bytes in "hcTrailer" string  */
    Byte     hcTrailer[16];  /*   Sent after every line                */
    short    hcMode;         /* Operational mode bits                  */
    Byte     hcSIG[2];       /* Set to 'HC' for validity check         */
    short    hcXlatCount;    /* Number of entries in "hcXlatTable"     */
    int     *hcXlatTable;    /* Pointer to color translation table     */
   } HCInfoRec;              /*  (required if hcXlatCount is non-zero) */

                           /*   Defines for .hcMode bit field          */
#define HC_ROT 0x01          /* Rotate picture 90-degrees CCW          */
#define HC_FG  0x02          /* XlatTable is list to print(1)/mask(0)  */  
#define HC_INV 0x04          /* Invert output picture image colors     */
#define HC_ASC 0x10          /* Emit ASCII length instead of hex       */


/* ------------------------- regions ----------------------- */

typedef struct _region     /* "Region" structure type        */
   {long     rgnAlloc;       /* Space allocated for rgnList  */
    long     rgnSize;        /* Space used in rgnList        */
    long     rgnFlags;       /* Region "flags"               */
    rect     rgnRect;        /* Bounding limits of region    */
    rect    *rgnList;        /* Pointers to first and last   */
    rect    *rgnListEnd;     /*   entries in region list.    */
   }  region;


/* --------- Extended Pen Definitions for Oval Pen --------- */

#define capFlat        0   /* "PenCap()" definitions         */
#define capSquare      2
#define capRound       3

#define joinRound      0   /* "PenJoin()" definitions        */
#define joinBevel      1
#define joinMiter      2


/*  ------- Defines for custom input impementations -------  */
typedef struct _mouseRcd   /* Input device record            */
   {mwEvent  mrEvent;           /* this devices event entry  */
    Word     mrEventMask;       /* devices event types mask  */
    Word     mrFlags;           /* device flags              */
    rect     mrLimits;          /* limit rectangle           */
    Word     mrScale[2];        /* x,y scaling factors       */
    void     ( *mrInputMgr )(); /* vector to input manager   */
    void     ( *mrCallBack )(); /* system event handler      */
    Word     mrUsr[10];	        /* used by input managers    */
   } mouseRcd ;


typedef struct _fxdpnt     /* Fixed point math type          */
   {short    fr;             /* fractional part              */
    short    wh;             /* whole part                   */
   }  fxdpnt;

/* End of File - METCONST.H */
