home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / mpconfig.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  5KB  |  129 lines

  1. //==========================================================================;
  2. //
  3. //  Copyright (c) 1997    Microsoft Corporation.    All Rights Reserved.
  4. //
  5. //--------------------------------------------------------------------------;
  6.  
  7. #ifndef __IMPConfig__
  8. #define __IMPConfig__
  9.  
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13.  
  14. typedef enum _AM_ASPECT_RATIO_MODE
  15. {
  16.     AM_ARMODE_STRETCHED,    // don't do any aspect ratio correction
  17.     AM_ARMODE_LETTER_BOX,    // letter box the video, paint background color in the excess region
  18.     AM_ARMODE_CROP,        // crop the video to the right aspect ratio
  19.     AM_ARMODE_STRETCHED_AS_PRIMARY
  20. } AM_ASPECT_RATIO_MODE;
  21.  
  22.  
  23. DECLARE_INTERFACE_(IMixerPinConfig, IUnknown)
  24. {
  25.     // this function sets the position of the stream in the display window, assuming 
  26.     // that the window coordinates are {0, 0, 10000, 10000}. Thus giving arguments
  27.     // (0, 0, 5000, 5000) will put the stream in the top-left quarter. Any value greater
  28.     // than 10000 is invalid.
  29.     STDMETHOD (SetRelativePosition)(THIS_ 
  30.                     IN DWORD dwLeft,
  31.                     IN DWORD dwTop,
  32.                     IN DWORD dwRight,
  33.                     IN DWORD dwBottom
  34.                    ) PURE;
  35.  
  36.     // this function gets the position of the stream in the display window, assuming 
  37.     // that the window coordinates are {0, 0, 10000, 10000}. Thus if the values returned
  38.     // are (0, 0, 5000, 5000), then it means that the stream is in the top-left quarter. 
  39.     STDMETHOD (GetRelativePosition)(THIS_ 
  40.                     OUT DWORD *pdwLeft,
  41.                     OUT DWORD *pdwTop,
  42.                     OUT DWORD *pdwRight,
  43.                     OUT DWORD *pdwBottom
  44.                    ) PURE;
  45.  
  46.     // this function sets the ZOrder of the stream. The ZOrder of 0 is the closest
  47.     // to the eyes of the user, and increasing values imply greater distance.
  48.     STDMETHOD (SetZOrder)(THIS_ 
  49.               IN DWORD dwZOrder
  50.              ) PURE;
  51.  
  52.  
  53.     // this function gets the ZOrder of the stream. The ZOrder of 0 is the closest
  54.     // to the eyes of the user, and increasing values imply greater distance.
  55.     STDMETHOD (GetZOrder)(THIS_ 
  56.               OUT DWORD *pdwZOrder
  57.              ) PURE;
  58.  
  59.     // this function sets the colorkey being used by the stream. Setting this value on the 
  60.     // primary stream sets the destination colorkey being used by the overlay surface. Setting
  61.     // this value on the secondary pin makes sense only if the stream is transparent. By default
  62.     // the destination colorkey is used as the colorkey for all transparent (secondary) streams.
  63.     STDMETHOD (SetColorKey)(THIS_ 
  64.                 IN COLORKEY *pColorKey
  65.                ) PURE;
  66.  
  67.     // this function gets the colorkey being used by the stream. Getting this value on the 
  68.     // primary stream gets the destination colorkey being used by the overlay surface. Getting
  69.     // this value on the secondary pin returns the colorkey being used by that particular stream.
  70.     // When using this method, you are allowed to pass NULL for either pColorKey or pColor but 
  71.     // not both.
  72.     STDMETHOD (GetColorKey)(THIS_ 
  73.                 OUT COLORKEY *pColorKey,
  74.                 OUT DWORD *pColor
  75.                ) PURE;
  76.  
  77.     // this function sets the blending parameter which in turn defines, how the secondary stream 
  78.     // is going to be blended with the primary stream. A value of 0 makes the secondary stream 
  79.     // invisible, a value of 255 makes the primary stream invisible (in that region only ofcourse),
  80.     // and any value inbetween, say x, blends the secondary and primary streams in the ratio x : (255-x).
  81.     // If no value is set, the default is 255.
  82.     // Any value less than 0 or greater than 255 is invalid. Calling this function on the primary
  83.     // stream would result in a return value of E_UNEXPECTED.
  84.     STDMETHOD (SetBlendingParameter)(THIS_ 
  85.                      IN DWORD dwBlendingParameter
  86.                     ) PURE;
  87.  
  88.     // this function gets the blending parameter which in turn defines, how the secondary stream 
  89.     // is currently being blended with the primary stream. 
  90.     STDMETHOD (GetBlendingParameter)(THIS_ 
  91.                      OUT DWORD *pdwBlendingParameter
  92.                     ) PURE;
  93.  
  94.  
  95.     // this function is used to set the Aspect Ratio Correction mode on the pin. 
  96.     // If the mode is set to letter box, black color is painted on the excess region 
  97.     STDMETHOD (SetAspectRatioMode)(THIS_ 
  98.                    IN AM_ASPECT_RATIO_MODE amAspectRatioMode
  99.                   ) PURE;
  100.  
  101.     // this function is used to get the Aspect Ratio Correction mode on the pin.  
  102.     STDMETHOD (GetAspectRatioMode)(THIS_ 
  103.                    OUT AM_ASPECT_RATIO_MODE* pamAspectRatioMode
  104.                   ) PURE;
  105.  
  106.     // this function sets the stream to be transparent. That means that the stream is not going
  107.     // to occupy the whole of the rectangle (specified by SetRelativePosition), some of the region
  108.     // is going to be transparent i.e. the stream underneath, is going to see through.
  109.     // Calling this function on the primary stream would result in a return value of E_UNEXPECTED.
  110.     STDMETHOD (SetStreamTransparent)(THIS_ 
  111.                      IN BOOL bStreamTransparent
  112.                     ) PURE;
  113.  
  114.     // this function is used to tell whether the stream is transparent or not. 
  115.     STDMETHOD (GetStreamTransparent)(THIS_ 
  116.                      OUT BOOL *pbStreamTransparent
  117.                     ) PURE;
  118.  
  119.  
  120. };
  121.  
  122. #ifdef __cplusplus
  123. }
  124. #endif
  125.  
  126.  
  127. #endif // #define __IMPConfig__
  128.  
  129.