home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dive1.zip / ENDIVEDR.H < prev    next >
Text File  |  1996-03-06  |  10KB  |  168 lines

  1. /*****************************************************************************/
  2. /*                           IBM Confidential                                */
  3. /*                                                                           */
  4. /*                    Copyright (c) IBM Corporation 1991                     */
  5. /*                           All Rights Reserved                             */
  6. /*                                                                           */
  7. /* SOURCE FILE NAME:  EnDIVE.H                                               */
  8. /*                                                                           */
  9. /* DESCRIPTIVE NAME:  Enhanced Direct Interface for Video extensions         */
  10. /*                                                                           */
  11. /* FUNCTION: This file defines any values and external varaibles specific    */
  12. /*           to the video stream stream handler.                             */
  13. /*                                                                           */
  14. /*****************************************************************************/
  15.  
  16. #define VRAM_ALLOCATE                      1
  17. #define VRAM_DEALLOCATE                    2
  18. #define VRAM_QUERY                         3
  19.  
  20. #define ENDIVE_REQUEST_UNAVAILABLE    0x0001
  21. #define ENDIVE_REQUEST_RELOCATED      0x0002
  22.  
  23. #define ENDIVE_ALLOC_SHARED           0x0001       /* in/out                 */
  24. #define ENDIVE_ALLOC_RECTANGLE        0x0002       /* in/out                 */
  25. #define ENDIVE_ALLOC_WORKBUFFER       0x0004       /* out flag               */
  26. #define ENDIVE_ALLOC_NEWBUFFER        0x0008       /* out flag               */
  27.  
  28. #define ENDIVE_SETUP_CANT_HANDLE      0x0001       /* HW can't handle current*/
  29.                                                    /* setup for some reason  */
  30.  
  31. /* Endive DevEscape functions                                                */
  32. #define DEVESC_REGISTER               34000L
  33. #define DEVESC_HWREQUEST              34010L
  34. #define DEVESC_VRAMALLOC              34020L
  35. #define DEVESC_EXTPUT                 34030L
  36. #define DEVESC_EXTGET                 34040L
  37. #define DEVESC_EXTQUERY               34050L
  38. #define DEVESC_QUERYFB                34060L       /* Not endive specific.   */
  39. #define DEVESC_SETUPBLITTERNOTIFY     34070L
  40. #define DEVESC_VIDEOHIDDEN            34080L
  41.  
  42.  
  43. /*
  44.  *  Defines for the ulFlags field of the PUTIMAGEBUF data structure.
  45.  */
  46. #define PIF_Y_ORG_BOTTOM       0x0001    /* Set if origin @ bottom           */
  47. #define PIF_X_ORG_RIGHT        0x0002    /* Set of origin @ right            */
  48.  
  49. /*
  50. ** NOTE: This flag can be used as an optimization for 8 bpp images
  51. **       for the following two conditions:
  52. **
  53. **       1.) The HW has support for cached custom palettes and the
  54. **           client application is playing frames using the same
  55. **           palette. (The driver will return IMG_CAPS_PAL_CACHING
  56. **           if it has this support).
  57. **
  58. **       2.) The screen is in 256 color mode and the source image
  59. **           bits have already been translated to the current
  60. **           hardware palette.
  61. */
  62. #define IBF_IGNORE_CUST_PAL    0x0002  /* Ignore the custom palette */
  63.  
  64.  
  65.  
  66.  
  67. #define ENDIVE_REGISTER_HANDLE    0x0001  /* reg & init accelerator          */
  68. #define ENDIVE_REGISTER_VRAMONLY  0x1000  /* AllocVram only no acceleration  */
  69.  
  70. /* DEVESC_REGISTER input data struct.                                        */
  71. typedef struct _VRAMREGISTERIN {
  72.    ULONG          ulLength;               /* struct length                   */
  73.    ULONG          ulHandle;               /* de-registering handle           */
  74.    ULONG          ulFlags;                /* reg/dereg & vramonly flags      */
  75.    } VRAMREGISTERIN, *PVRAMREGISTERIN;
  76.  
  77. /* DEVESC_REGISTER output data struct.                                       */
  78. typedef struct _VRAMREGISTEROUT {
  79.    ULONG          ulLength;               /* struct length                   */
  80.    ULONG          ulFlags;                /* return flags for errors/status  */
  81.    ULONG          ulHandle;               /* handle returned                 */
  82.    } VRAMREGISTEROUT, *PVRAMREGISTEROUT;
  83.  
  84. /* DEVESC_HWREQUEST input data structure                                     */
  85. typedef struct _VRAMHWREQUESTIN {
  86.    ULONG          ulLength;               /* length of this structure        */
  87.    ULONG          ulHandle;               /* instance handle from register   */
  88.    ULONG          ulID;                   /* Buffer ID for off screen vram   */
  89.    PACQUIREFB     pAcquireFB;             /* old DIVE data structure         */
  90.    BOOL           fRequest;               /* True => requests frame buffer   */
  91.    } VRAMHWREQUESTIN, *PVRAMHWREQUESTIN;
  92.  
  93. /* DEVESC_HWREQUEST output data structure                                    */
  94. typedef struct _VRAMHWREQUESTOUT {
  95.    ULONG          ulLength;               /* structure length                */
  96.    ULONG          ulFlags;                /* VRAM_REQ_RELOCATED,UNAVAIL      */
  97.    POINTL         ptlStart;               /* vram location/wborg             */
  98.    ULONG          cWBBytes;               /* Work buffer size                */
  99.    PVOID          pSysMem;                /* SSAlloc'd memory by driver      */
  100.    ULONG          ulScanLineBytes;        /* new scanline size Contig/rect   */
  101.    } VRAMHWREQUESTOUT, *PVRAMHWREQUESTOUT;
  102.  
  103. /* DEVESC_VRAMALLOC input data structure                                     */
  104. typedef struct _VRAMALLOCIN {
  105.    ULONG          ulLength;               /* structure length                */
  106.    ULONG          ulFlags;                /* returned flags see above        */
  107.    ULONG          ulID;                   /* used to dealloc the buffer ID   */
  108.    ULONG          ulFunction;             /* VRAM_ALLOCATE/_DEALLOC/_QUERY   */
  109.    ULONG          ulHandle;               /* VRAMREGISTER instance handle    */
  110.    ULONG          ulSize;                 /* size in bytes to allocate       */
  111.    ULONG          ulWidth;                /* width of the movie in pixels    */
  112.    ULONG          ulHeight;               /* movie height in scanlines       */
  113.    } VRAMALLOCIN, *PVRAMALLOCIN;
  114.  
  115. /* DEVESC_VRAMALLOC output data structure                                    */
  116. typedef struct _VRAMALLOCOUT {
  117.    ULONG          ulLength;
  118.    ULONG          ulFlags;                /* returned flags WORKBUFFER...    */
  119.    ULONG          ulID;                   /* dive alloc'd buffer ID          */
  120.    POINTL         ptlStart;               /* X,Y point offset into the vram  */
  121.    ULONG          ulSize;                 /* byte size generally = requested */
  122.    ULONG          ulScanLineBytes;        /* scanline size in bytes          */
  123.    } VRAMALLOCOUT, *PVRAMALLOCOUT;
  124.  
  125. /* DEVESC_VRAMALLOC output data structure                                    */
  126. typedef struct _VRAMALLOCOUT2 {
  127.    ULONG          ulLength;
  128.    ULONG          ulFlags;                /* returned flags WORKBUFFER...    */
  129.    ULONG          ulID;                   /* dive alloc'd buffer ID          */
  130.    POINTL         ptlStart;               /* X,Y point offset into the vram  */
  131.    ULONG          ulSize;                 /* byte size generally = requested */
  132.    ULONG          ulScanLineBytes;        /* scanline size in bytes          */
  133.    PVOID          pNewBuffer;             /* pointer to new buffer           */
  134.    } VRAMALLOCOUT2, *PVRAMALLOCOUT2;
  135.  
  136. /* DEVESC_SETUPBLITTERNOTIFY input data structure                            */
  137. /* The display driver, if it supports this function, should indicate         */
  138. /* whether it can handle the current image blitting parameters.              */
  139. /* If the display driver does not                                            */
  140. /* support this function, it is assumed the hardware can handle the blitter  */
  141. /* operation being set.                                                      */
  142. typedef struct _SETUPBLITTERNOTIFYIN {
  143.    ULONG          ulLength;               /* length of this structure        */
  144.    ULONG          ulHandle;               /* instance handle from register   */
  145.    ULONG          ulInversionFlags;       /* current image inversion flags   */
  146.                                           /* 0x1 = vertical, 0x2 = horizontal*/
  147.    FOURCC         fccSrc;                 /* source color format             */
  148.    ULONG          ulSrcWidth;             /* source image width in pixels    */
  149.    ULONG          ulSrcHeight;            /* source image height in pixels   */
  150.    ULONG          ulSrcPosX;              /* src image X offset for blitting */
  151.    ULONG          ulSrcPosY;              /* src image Y offset for blitting */
  152.    FOURCC         fccDst;                 /* destination color format        */
  153.    ULONG          ulDstWidth;             /* destination image width in pels */
  154.    ULONG          ulDstHeight;            /* destination image height in pels*/
  155.    LONG           lScreenPosX;            /* destination screen X position   */
  156.    LONG           lScreenPosY;            /* destination screen Y position   */
  157.    ULONG          ulNumDstRects;          /* number of visible rectangles    */
  158.    PRECTL         pVisDstRects;           /* ptr to visible rectangle array  */
  159.                                           /* (in screen coordinates)         */
  160.  
  161.    } SETUPBLITTERNOTIFYIN, *PSETUPBLITTERNOTIFYIN;
  162.  
  163. /* DEVESC_SETUPBLITTERNOTIFY output data structure                           */
  164. typedef struct _SETUPBLITTERNOTIFYOUT {
  165.    ULONG          ulLength;               /* structure length                */
  166.    ULONG          ulFlags;                /* 0 => HW can handle, SETUP_CANT_HANDLE */
  167.    } SETUPBLITTERNOTIFYOUT, *PSETUPBLITTERNOTIFYOUT;
  168.