home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / mpconfig.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  5.9 KB  |  144 lines

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