home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / graddh.zip / GRADD.H
Text File  |  2000-01-21  |  21KB  |  557 lines

  1. /*****************************************************************************
  2.  *
  3.  * SOURCE FILE NAME = GRADD.H
  4.  *
  5.  * DESCRIPTIVE NAME = Structures and defines for the GRADD Architecture
  6.  *
  7.  * Copyright : COPYRIGHT IBM CORPORATION, 1996
  8.  *             LICENSED MATERIAL - PROGRAM PROPERTY OF IBM
  9.  *             REFER TO COPYRIGHT INSTRUCTION FORM#G120-2083
  10.  *
  11.  * ==========================================================================
  12.  *
  13.  * VERSION = 1.0
  14.  *
  15.  * DESCRIPTION
  16.  *      This file contains all of the defines and
  17.  *      data structures that are shared between the
  18.  *      video manager and the translation layers.
  19.  *
  20.  * FUNCTIONS
  21.  *
  22.  * NOTES
  23.  *
  24.  * STRUCTURES
  25.  *
  26.  * EXTERNAL REFERENCES
  27.  *
  28.  * EXTERNAL FUNCTIONS
  29.  *
  30.  * CHANGE ACTIVITY =
  31.  *  DATE      FLAG        APAR   CHANGE DESCRIPTION
  32.  *  --------  ----------  -----  --------------------------------------
  33.  *  mm/dd/yy  @Vr.mpppxx  xxxxx  xxxxxxx
  34.  *
  35.  ****************************************************************************/
  36.  
  37. #ifndef  GRADD_INCLUDED
  38.   #define GRADD_INCLUDED
  39.  
  40.   #include <ddi.h>
  41.   /*
  42.   **  Prototype declarations for low level driver function call table.
  43.   */
  44.   typedef ULONG CID;             /* Chain ID */
  45.   typedef ULONG GID;             /* Gradd ID */
  46.  
  47.   #define GID_DONTCARE           0xffffffff
  48.  
  49.   typedef ULONG  (EXPENTRY FNHWCMD)(PVOID, PVOID);
  50.   typedef ULONG  (EXPENTRY FNHWENTRY)(GID, ULONG, PVOID, PVOID);
  51.   typedef ULONG  (EXPENTRY FNSDBITBLT)(PVOID, PVOID);
  52.   typedef ULONG  (EXPENTRY FNSDLINE)(PVOID, PVOID);
  53.  
  54.   typedef FNHWENTRY * PFNHWENTRY;
  55.  
  56.   #define FOURCC( ch0, ch1, ch2, ch3 )                      \
  57.     ( (ULONG)(BYTE)(ch0) | ( (ULONG)(BYTE)(ch1) << 8 ) |    \
  58.     ( (ULONG)(BYTE)(ch2) << 16 ) | ((ULONG)(BYTE)(ch3) << 24 ) )
  59.  
  60.   #define FOURCC_LUT8 FOURCC('L','U','T','8')  /* 8-bit palettized */
  61.   #define FOURCC_R565 FOURCC('R','5','6','5')  /* RGB 565 */
  62.   #define FOURCC_R555 FOURCC('R','5','5','5')  /* RGB 555 */
  63.   #define FOURCC_R666 FOURCC('R','6','6','6')  /* RGB 666 */
  64.   #define FOURCC_R664 FOURCC('R','6','6','4')  /* RGB 664 */
  65.   #define FOURCC_RGB3 FOURCC('R','G','B','3')  /* RGB 24 in 3 bytes */
  66.   #define FOURCC_BGR3 FOURCC('B','G','R','3')  /* BGR 24 in 3 bytes */
  67.   #define FOURCC_RGB4 FOURCC('R','G','B','4')  /* RGB 24 in 4 bytes */
  68.   #define FOURCC_BGR4 FOURCC('B','G','R','4')  /* BGR 24 in 4 bytes */
  69.   #define FOURCC_Y888 FOURCC('Y','8','8','8')  /* YUV 24 */
  70.   #define FOURCC_Y411 FOURCC('Y','4','1','1')  /* YUV 411 interleaved 4 by 1 subsampled*/
  71.   #define FOURCC_Y422 FOURCC('Y','4','2','2')  /* YUV 422 (CCIR601) */
  72.   #define FOURCC_YUV9 FOURCC('Y','U','V','9')  /* YUV9 */
  73.   #define FOURCC_Y2X2 FOURCC('Y','2','X','2')  /* YUV 2 by 2 subsampled multi-plane */
  74.   #define FOURCC_Y4X4 FOURCC('Y','4','X','4')  /* YUV 4 by 4 subsampled multi-plane */
  75.  
  76.   typedef struct _GDDMODEINFO {     /* gddmodeinfo */
  77.      ULONG  ulLength;
  78.      ULONG  ulModeId;               /* used to make SETMODE request     */
  79.      ULONG  ulBpp;                  /* no of colors (bpp)               */
  80.      ULONG  ulHorizResolution;      /* horizontal pels                  */
  81.      ULONG  ulVertResolution;       /* vertical scan lines              */
  82.      ULONG  ulRefreshRate;          /* in Hz (0 if not available)       */
  83.      PBYTE  pbVRAMPhys;             /* physical address of VRAM         */
  84.      ULONG  ulApertureSize;         /* Current bank size                */
  85.      ULONG  ulScanLineSize;         /* size (in bytes) of one scan line */
  86.      ULONG  fccColorEncoding;       /* Pel format (defines above        */
  87.      ULONG  ulTotalVRAMSize;        /* Total size of VRAM in bytes      */
  88.      ULONG  cColors;                /* Total number of colors           */
  89.   } GDDMODEINFO;
  90.   typedef GDDMODEINFO *PGDDMODEINFO;
  91.  
  92.   /*
  93.   **  Structure for HWEntry router, see gdddata.c for array.
  94.   */
  95.   typedef struct _HWCMD {           /* hwcmd */
  96.           FNHWCMD * pfnHWCmd;
  97.           ULONG     ulRc;           /* return code if pfnHWCmd is NULL */
  98.                                     /* ring change otherwise           */
  99.   } HWCMD;
  100.   typedef HWCMD *PHWCMD;
  101.  
  102.   /*
  103.   ** Ring change codes
  104.   */
  105.   #define DONTCARE   0
  106.   #define RING2      2
  107.  
  108.   /*
  109.   **  Prototype declarations for low level driver routines
  110.   */
  111.   FNHWENTRY HWEntry;
  112.  
  113.   /*
  114.   **  Graphics Hardware Interface (GHI) commands for
  115.   **  the Base Function class.
  116.   */
  117.   #define BASE_FUNCTION_CLASS    "Base Function"
  118.  
  119.   #define GHI_CMD_INIT           0
  120.   #define GHI_CMD_INITPROC       1
  121.   #define GHI_CMD_TERM           2
  122.   #define GHI_CMD_TERMPROC       3
  123.   #define GHI_CMD_QUERYCAPS      4
  124.   #define GHI_CMD_QUERYMODES     5
  125.   #define GHI_CMD_SETMODE        6
  126.   #define GHI_CMD_PALETTE        7
  127.   #define GHI_CMD_BITBLT         8
  128.   #define GHI_CMD_LINE           9
  129.   #define GHI_CMD_MOVEPTR        10
  130.   #define GHI_CMD_SETPTR         11
  131.   #define GHI_CMD_SHOWPTR        12
  132.   #define GHI_CMD_VRAM           13
  133.   #define GHI_CMD_REQUESTHW      14
  134.   #define GHI_CMD_EVENT          15
  135.   #define GHI_CMD_EXTENSION      16
  136.   #define GHI_CMD_BANK           17
  137.   #define GHI_CMD_TEXT           18
  138.   #define GHI_CMD_USERCAPS       19
  139.   #define GHI_CMD_POLYGON        20
  140.   #define GHI_CMD_MAX            21
  141.  
  142.   /*
  143.   **  Defines and structures for the GHI_CMD_INIT DDI
  144.   */
  145.   typedef struct _GDDINITIN {         /* gddinitin */
  146.      ULONG        ulLength;
  147.      PFNHWENTRY   pfnChainedHWEntry;
  148.   } GDDINITIN;
  149.   typedef GDDINITIN  *PGDDINITIN;
  150.  
  151.   typedef struct _GDDINITOUT {        /* gddinitout */
  152.      ULONG        ulLength;
  153.      ULONG        cFunctionClasses;
  154.   } GDDINITOUT;
  155.   typedef GDDINITOUT  *PGDDINITOUT;
  156.  
  157.   /*
  158.   **  Defines and structures for the GHI_CMD_INITPROC DDI
  159.   */
  160.   typedef struct _INITPROCOUT {         /* initprocout */
  161.      ULONG        ulLength;
  162.      ULONG        ulVRAMVirt;
  163.   } INITPROCOUT;
  164.   typedef INITPROCOUT  *PINITPROCOUT;
  165.  
  166.   /*
  167.   **  Defines and structures for the GHI_CMD_QUERYCAPS DDI
  168.   */
  169.   typedef struct _CAPSINFO {          /* capsinfo */
  170.      ULONG        ulLength;           /* sizeof CAPSINFO structure      */
  171.      PSZ          pszFunctionClassID; /* Name describing function set   */
  172.      ULONG        ulFCFlags;          /* Function class specific flags  */
  173.   } CAPSINFO;
  174.   typedef CAPSINFO  *PCAPSINFO;
  175.  
  176.   /*
  177.   ** Defines for ulFCFlags field of the CAPSINFO data structure
  178.   ** NOTE: The flags below are GRADD Caps for the base function class.
  179.   */
  180.   #define GC_SEND_MEM_TO_MEM         0x00000001     // GRADD wants to see M2M blits
  181.   #define GC_SIM_SRC_PAT_ROPS        0x00000002     // GRADD wants to simulate 3way rops as sequence of 2way rops.
  182.   //RESERVED - NOT USED NOW
  183.   #define GC_ALPHA_SUPPORT           0x00000004     // GRADD supports alpha blending rules and
  184.                                                     // ALPHABITBLTINFO.
  185.                                                     // If this flag is not returned,
  186.                                                     // VMAN will never call the Gradd for
  187.                                                     // Alpha Blending.
  188.   // SHOULD match DS2_* in pmddi.h
  189.   #define GC_SRC_STRETCH             0x00000008     // GRADD handles stretchblts
  190.   #define GC_POLYGON_SIZE_ANY        0x00000010     // GRADD can handle polygon(concave or convex)
  191.                                                     // of any size.
  192.                                                     // GC_POLYGON_FILL must be set
  193.   #define GC_CLIP                    0x00000020     // GRADD can handle single clip rect of
  194.                                                     // polygons for pfnPolygon and
  195.                                                     // source bitmap for pfnBitblt with
  196.                                                     // GC_SRC_STRETCH set.
  197.                                                     // see GC_CLP_COMPLEX
  198.   #define GC_CLIP_COMPLEX            0x00000040     // GRADD can handle clipping
  199.                                                     // with more than one clip rect
  200.                                                     // GC_CLIP must be set.
  201.  
  202.  
  203.  
  204.   /* following defines GC_* SHOULD match DS_* in pmddi.h */
  205.   #define GC_TEXTBLT_DOWNLOADABLE    0x00002000     // Downloadable Fonts
  206.   #define GC_TEXTBLT_CLIPABLE        0x00004000     // CLIPPABLE    Fonts
  207.   #define GC_TEXTBLT_DS_DEVICE_FONTS 0x00008000     // Device has Hardware Fonts
  208.   #define GC_SIMPLE_LINES            0x00800000     // Device handles LINEINFO2.
  209.   // For compatibility with old source code retain old definitions
  210.   #define TEXTBLT_DOWNLOADABLE       GC_TEXTBLT_DOWNLOADABLE
  211.   #define TEXTBLT_CLIPABLE           GC_TEXTBLT_CLIPABLE
  212.   #define TEXTBLT_DS_DEVICE_FONTS    GC_TEXTBLT_DS_DEVICE_FONTS
  213. #ifndef DS_SIMPLE_LINES
  214.   #define DS_SIMPLE_LINES            GC_SIMPLE_LINES
  215. #endif
  216.   //RESERVED - NOT USED NOW
  217.   #define GC_SRC_CONVERT             0x02000000     // send Device independent bitmaps
  218.                                                     // without converting to device internal format.
  219.                                                     // Gradd will convert during blts or
  220.                                                     // call softdraw to simulate.
  221.                                                     // If not set, GRE will convert DIB in a temporary buffer.
  222.                                                     // Gradd should set this based on performance.
  223.   #define GC_POLYGON_FILL            0x08000000     // GRADD can handle polygon(triangle and quad)
  224.                                                     // fills and POLYGONINFO. see GC_POLYGON_SIZE_ANY
  225.                                                     // if set, Graphics Engine call pfnPolygon
  226.                                                     // for fills instead of pfnBitBlt.
  227.  
  228.  
  229.  
  230.  
  231.   /*
  232.   **  Defines and structures for the GHI_CMD_QUERYMODES and GHI_CMD_SETMODE
  233.   */
  234.   #define QUERYMODE_NUM_MODES     0x0001
  235.   #define QUERYMODE_MODE_DATA     0x0002
  236.   #define QUERYMODE_VALID         (QUERYMODE_NUM_MODES|QUERYMODE_MODE_DATA)
  237.  
  238.   /*
  239.   **  Defines and structures for the GHI_CMD_VRAM
  240.   */
  241.   typedef struct _VRAMIN {         /* vramin */
  242.      ULONG ulLength;
  243.      ULONG ulFunction;
  244.      PVOID pIn;
  245.   } VRAMIN;
  246.   typedef VRAMIN *PVRAMIN;
  247.  
  248.   /*
  249.   **  Defines for the ulFunction field of the VRAMIN data structure.
  250.   */
  251.   #define VRAM_ALLOCATE                1
  252.   #define VRAM_DEALLOCATE              2
  253.   #define VRAM_QUERY                   3
  254.   #define VRAM_REGISTER                4
  255.   #define VRAM_DEREGISTER              5
  256.  
  257.   typedef struct _VRAMREGISTERIN { /* vramregisterin */
  258.      ULONG ulLength;               /* sizeof(VRAMREGISTERIN) */
  259.      ULONG ulHandle;               /* de-registering handle  */
  260.      ULONG ulFlags;                /* Input flags            */
  261.   } VRAMREGISTERIN;
  262.   typedef VRAMREGISTERIN *PVRAMREGISTERIN;
  263.  
  264.   /*
  265.   **  Defines for the ulFlags field of the VRAMREGISTERIN data structure.
  266.   */
  267.   #define VRAM_REGISTER_HANDLE       0x0001   /* If this bit is set we have  */
  268.                                               /* a registration if it is off */
  269.                                               /* we have a deregistration    */
  270.  
  271.   #define VRAM_REGISTER_VRAMONLY     0x1000   /* If this flag is set the app */
  272.                                               /* is registering and telling  */
  273.                                               /* us that it does not intend  */
  274.                                               /* to use the accelerator      */
  275.  
  276.   typedef struct _VRAMREGISTEROUT {   /* vramregisterout */
  277.      ULONG ulLength;
  278.      ULONG ulFlags;                /* Returned flags (currently none def) */
  279.      ULONG ulHandle;               /* Returned handle                     */
  280.   } VRAMREGISTEROUT;
  281.   typedef VRAMREGISTEROUT *PVRAMREGISTEROUT;
  282.  
  283.   typedef struct _VRAMALLOCIN {    /* vramallocin */
  284.      ULONG ulLength;
  285.      ULONG ulFlags;
  286.      ULONG ulID;            /* Used for de-allocation */
  287.      ULONG ulFunction;
  288.      ULONG ulHandle;
  289.      ULONG ulSize;
  290.      ULONG ulWidth;
  291.      ULONG ulHeight;
  292.   } VRAMALLOCIN;
  293.   typedef VRAMALLOCIN *PVRAMALLOCIN;
  294.  
  295.   /*
  296.   **  Defines for the ulFlags field of the VRAMALLOCIN data structure.
  297.   */
  298.   #define VRAM_ALLOC_SHARED          0x0001
  299.   #define VRAM_ALLOC_RECTANGLE       0x0002
  300.   #define VRAM_ALLOC_WORKBUFFER      0x0004
  301.   #define VRAM_ALLOC_STATIC          0x1000
  302.  
  303.   /*
  304.   **  Defines for the ulFunction field of the VRAMALLOCIN data structure.
  305.   */
  306.   #define VRAM_ALLOCATE                1
  307.   #define VRAM_DEALLOCATE              2
  308.   #define VRAM_QUERY                   3
  309.  
  310.   typedef struct _VRAMALLOCOUT {   /* vramallocout */
  311.      ULONG ulLength;
  312.      ULONG ulFlags;
  313.      ULONG ulID;
  314.      POINTL ptlStart;
  315.      ULONG ulSize;
  316.      ULONG ulScanLineBytes;
  317.   } VRAMALLOCOUT;
  318.   typedef VRAMALLOCOUT *PVRAMALLOCOUT;
  319.  
  320.   /*
  321.   **  Defines and structures for the GHI_CMD_EVENT command
  322.   */
  323.   typedef struct _HWEVENTIN {      /* hweventin  */
  324.      ULONG  ulLength;
  325.      ULONG  ulEvent;               /* Event type                     */
  326.      PVOID  pEventData;            /* Pointer to event specific data */
  327.   } HWEVENTIN;
  328.   typedef HWEVENTIN *PHWEVENTIN;
  329.  
  330.   /*
  331.   **  Defines for the ulEvent field of the HWEVENTIN data structure.
  332.   */
  333.   #define EVENT_FOREGROUND             1
  334.   #define EVENT_BACKGROUND             2
  335.   #define EVENT_NEWCHAININFO           3
  336.  
  337.   /*
  338.   **  Defines and structures for the GHI_CMD_EXTENSION command
  339.   */
  340.   typedef struct _HWEXTENSION {          /* hwextension */
  341.      ULONG  ulLength;
  342.      ULONG  ulXSubFunction;
  343.      ULONG  cScrChangeRects;
  344.      PRECTL arectlScreen;
  345.      ULONG  ulXFlags;
  346.      PVOID  pXP1;
  347.   } HWEXTENSION;
  348.   typedef HWEXTENSION *PHWEXTENSION;
  349.  
  350.   /*
  351.   **  Defines for the ulXFlags field of the HWEXTENSION data structure.
  352.   */
  353.   #define X_REQUESTHW  1
  354.  
  355.  
  356.   /*
  357.   ** GRADD.SYS defines        
  358.   */
  359.  
  360.   #define GRADDPDD_IOCTL   0x10
  361.   #define GRADDPDD_LOCK       0
  362.   #define GRADDPDD_UNLOCK     1
  363.   #define GRADDPDD_SETMTRR    2
  364.  
  365.   typedef struct _MTRRIN 
  366.   {
  367.       ULONG     ulPhysAddr;            /* Starting Physical address              */
  368.       ULONG     ulLength;              /* Range to be enabled for WC             */
  369.       ULONG     ulFlags;               /* Flags as defined above. Bit 27 is      */
  370.                                        /* interrpreted as a Enable MTRR if set   */
  371.                                        /* and as a Disable MTRR if not set       */
  372.   } MTRRIN, *PMTRRIN;
  373.  
  374.   ULONG GHSetMTRR(PMTRRIN, BOOL);
  375.  
  376.   /*
  377.   ** The following are the possible values for the flags which are returned when
  378.   ** calling GRADDPDD_SETMTRR these are also defined in GRADDSYS.H for use by 
  379.   ** GRADD.SYS please make sure any updates are kept in synch.
  380.   **
  381.   ** The first(low order byte) is reserved for Processor Identification and is 
  382.   ** interpreted as a number.  The 2nd byte is reserved for future use. The
  383.   ** 3rd byte is interpreted as a set of flags indicating what support is 
  384.   ** available and the high order byte is interpreted as a number corresponding
  385.   ** to the command passed in to the SetMTRR function.
  386.   */
  387.   #define INTEL_PROCESSOR  0x00000001
  388.   #define AMD_PROCESSOR    0x00000002
  389.   #define CYRIX_PROCESSOR  0x00000003
  390.   #define CPUID_SUPPORT    0x00010000
  391.   #define MTRR_SUPPORT     0x00020000
  392.   #define MTRR_ENABLED     0x00040000
  393.   #define MTRR_AVAILABLE   0x00080000
  394.   #define WC_ENABLED       0x00100000
  395.  
  396.   #define VENDOR_MASK      0x000000FF
  397.   #define COMMAND_MASK     0xFF000000
  398.  
  399.   /*
  400.   ** Or one of the following into the ulFlags field of MTRRIN to 
  401.   ** enabled/disable WC
  402.   */
  403.   #define MTRR_DISABLE     0x00000000
  404.   #define MTRR_ENABLE      0x01000000
  405.   #define MTRR_QUERY       0x02000000
  406.   #define MTRR_CMD_MAX     MTRR_QUERY
  407.   
  408.  
  409.   /*
  410.   ** End of GRADD.SYS defines 
  411.   */
  412.  
  413.   /*
  414.   **  Prototype declarations for Video Manager Interface (VMI)
  415.   */
  416.  
  417.   typedef ULONG (EXPENTRY FNVMIENTRY)(GID, ULONG, PVOID, PVOID);
  418.  
  419.   /*
  420.   **  VMI commands which map directly to GRADD commands
  421.   */
  422.   #define VMI_CMD_INIT             GHI_CMD_INIT
  423.   #define VMI_CMD_INITPROC         GHI_CMD_INITPROC
  424.   #define VMI_CMD_TERM             GHI_CMD_TERM
  425.   #define VMI_CMD_TERMPROC         GHI_CMD_TERMPROC
  426.   #define VMI_CMD_QUERYCAPS        GHI_CMD_QUERYCAPS
  427.   #define VMI_CMD_QUERYMODES       GHI_CMD_QUERYMODES
  428.   #define VMI_CMD_SETMODE          GHI_CMD_SETMODE
  429.   #define VMI_CMD_PALETTE          GHI_CMD_PALETTE
  430.   #define VMI_CMD_BITBLT           GHI_CMD_BITBLT
  431.   #define VMI_CMD_LINE             GHI_CMD_LINE
  432.   #define VMI_CMD_MOVEPTR          GHI_CMD_MOVEPTR
  433.   #define VMI_CMD_SETPTR           GHI_CMD_SETPTR
  434.   #define VMI_CMD_SHOWPTR          GHI_CMD_SHOWPTR
  435.   #define VMI_CMD_VRAM             GHI_CMD_VRAM
  436.   #define VMI_CMD_REQUESTHW        GHI_CMD_REQUESTHW
  437.   #define VMI_CMD_EVENT            GHI_CMD_EVENT
  438.   #define VMI_CMD_EXTENSION        GHI_CMD_EXTENSION
  439.   #define VMI_CMD_BANK             GHI_CMD_BANK
  440.   #define VMI_CMD_TEXT             GHI_CMD_TEXT
  441.   #define VMI_CMD_USERCAPS         GHI_CMD_USERCAPS
  442.   #define VMI_CMD_POLYGON          GHI_CMD_POLYGON
  443.  
  444.   /*
  445.   **  VMI commands unique to the video manager
  446.   */
  447.   #define VMI_CMD_BASE             0x1000
  448.  
  449.   #define VMI_CMD_QUERYCHAININFO   VMI_CMD_BASE + 0
  450.   #define VMI_CMD_QUERYCURRENTMODE VMI_CMD_BASE + 1
  451.   #define VMI_CMD_EXCLUDEPTR       VMI_CMD_BASE + 2
  452.   #define VMI_CMD_UPDATECHAININFO  VMI_CMD_BASE + 3
  453.   #define VMI_CMD_MAX              VMI_CMD_BASE + 4
  454.  
  455.   /*
  456.   **  Defines and structures for VMI_CMD_QUERYCHAININFO
  457.   */
  458.   typedef struct _GRADDINFO {       /* graddinfo */
  459.           GID                   gid;
  460.           PSZ                   pszGraddName;
  461.           PFNHWENTRY            pGraddEntry;
  462.           PFNHWENTRY            pChainEntry;
  463.           ULONG                 cModes;
  464.           struct _GDDMODEINFO * pModeInfo;
  465.           struct _CAPSINFO *    pCapsInfo;
  466.           struct _GRADDINFO *   pNextGraddInfo;
  467.   } GRADDINFO ;
  468.   typedef GRADDINFO *PGRADDINFO;
  469.  
  470.   typedef struct _CHAININFO {       /* chaininfo */
  471.           CID                   cid;
  472.           PSZ                   pszChainName;
  473.           PFNHWENTRY            pChainHWEntry;
  474.           PGRADDINFO            pGraddList;
  475.           struct _CHAININFO *   pNextChainInfo;
  476.   } CHAININFO ;
  477.   typedef CHAININFO *PCHAININFO;
  478.  
  479.  
  480.   typedef struct _VMIQCI {          /* vmiqci */
  481.      ULONG        ulLength;
  482.      PCHAININFO   pciHead;                /* Head of the GRADD chain      */
  483.   } VMIQCI;
  484.   typedef VMIQCI  *PVMIQCI;
  485.  
  486.   /*
  487.   **  Defines and structures for VMI_CMD_EXCLUDEPTR
  488.   */
  489.   typedef struct _EXCLUDEPTRIN {       /* excludeptrin                    */
  490.      ULONG  ulLength;                  /* sizeof(EXCLUDEPTRIN)            */
  491.      BOOL   fAdd;                      /* TRUE - add, FASE - remove rects */
  492.      ULONG  cExcludeRects;             /* count of exclude rectangles     */
  493.      PRECTL apRectls;                  /* array of exclude rectangles     */
  494.   } EXCLUDEPTRIN;
  495.   typedef EXCLUDEPTRIN *PEXCLUDEPTRIN;
  496.  
  497.   /*
  498.   ** Video Helper services exported by VMAN
  499.   */
  500.   typedef struct _MEMINFO    {   /* meminfo */
  501.     ULONG       ulPhysAddr;
  502.     ULONG       ulMemLen;
  503.     ULONG       ulVirtAddr;
  504.     PVOID       pNextMI;
  505.   } MEMINFO;
  506.   typedef MEMINFO *PMEMINFO;
  507.  
  508.   ULONG VHMap(PVOID, ULONG);
  509.   ULONG VHMapVRAM(ULONG, ULONG, PBYTE *, PBYTE *);
  510.   ULONG VHLockMem(PVOID, ULONG, BOOL);
  511.   ULONG VHUnLockMem(ULONG);
  512.   PVOID VHAllocMem(ULONG);
  513.   ULONG VHFreeMem(PVOID);
  514.   ULONG VHPhysToVirt(PMEMINFO);
  515.   ULONG VHGetVRAMInfo(PMEMINFO);
  516.   ULONG VHSetMTRR(PMTRRIN, BOOL);
  517.   ULONG EXPENTRY VMIEntry(GID, ULONG, PVOID, PVOID);
  518.   ULONG EXPENTRY VHSortTriangle(PPOINTL pptl, PPOINTL pptlBounds);
  519.   ULONG EXPENTRY VHSortQuad(PPOINTL pptl, PPOINTL pptlBounds);
  520.  
  521.   // Defines for xxxxxx
  522.  
  523.   #define TRAPEZOID_COLLINEAR            0x0000
  524.   #define TRAPEZOID_TRIANGLE             0x0001
  525.   #define TRAPEZOID_TWO_TRIANGLES        0x0002
  526.   #define TRAPEZOID_DIAMOND              0x0004
  527.   #define TRAPEZOID_MINY_HORIZONTAL      0x0010
  528.   #define TRAPEZOID_MAXY_HORIZONTAL      0x0020
  529.   #define TRAPEZOID_LEFT_SPLIT           0x0040
  530.   #define TRAPEZOID_RIGHT_SPLIT          0x0080
  531.   #define TRAPEZOID_MIDY_HORIZONTAL      0x0100
  532.   #define TRAPEZOID_SECOND_SPLIT_LEFT    0x0200
  533.   #define TRAPEZOID_SECOND_SPLIT_RIGHT   0x0400
  534.  
  535.  
  536.   /*
  537.   **  Defines for the ulFlags field of the HEADER data structure.
  538.   */
  539.   #define SERIALIZE_REQUIRED           0x1
  540.  
  541.   #define QUERYCAPS                        1L
  542.   #define QUERYCAPSLIST                    2L
  543.   #define SETCAP                           3L
  544.  
  545.   typedef struct _USERCAPSIN
  546.   {
  547.      ULONG ulLength;
  548.      ULONG ulFunction;
  549.      ULONG ulSize;
  550.   } USERCAPSIN;
  551.   typedef USERCAPSIN *PUSERCAPSIN;
  552.  
  553.  
  554.  
  555.  
  556. #endif   /* ifndef GRADD_INCLUDED */
  557.