ocmm.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:7k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+------------------------------------------------------------------------
  2. //
  3. //  Filter and Bitmap Surface interfaces
  4. //
  5. //  Copyright (C) Microsoft Corporation, 1996-1998.
  6. //
  7. //  File:       ocmm.idl
  8. //
  9. //-------------------------------------------------------------------------
  10. import "oaidl.idl";
  11. import "oleidl.idl";
  12. #ifdef UNIX
  13. interface IViewFilter;
  14. interface IViewFilterSite;
  15. cpp_quote("// GetStatusBits Flags")
  16. cpp_quote("#define FILTER_STATUS_OPAQUE    (0x00000001)")
  17. cpp_quote("#define FILTER_STATUS_INVISIBLE (0x00000002)")
  18. cpp_quote("#define FILTER_STATUS_SURFACE   (0x00000004)")
  19. cpp_quote("#define FILTER_STATUS_3DSURFACE (0x00000008)")
  20. [
  21.     object,
  22.     uuid(3050f2f1-98b5-11cf-bb82-00aa00bdce0b),
  23.     pointer_default(unique),
  24. local
  25. ]
  26. interface IViewFilter : IUnknown
  27. {
  28.     HRESULT SetSource([in] IViewFilter *pFilter);
  29.     HRESULT GetSource([out] IViewFilter **ppFilter);
  30.     HRESULT SetSite([in] IViewFilterSite *pSink);
  31.     HRESULT GetSite([out] IViewFilterSite **ppSink);
  32.     HRESULT SetPosition(LPCRECT prc);
  33.     HRESULT Draw([in] HDC hdc, [in] LPCRECT prcBounds);
  34.     HRESULT GetStatusBits([out] DWORD *pdwFlags);
  35. }
  36. [
  37.     object,
  38.     uuid(3050f372-98b5-11cf-bb82-00aa00bdce0b),
  39.     pointer_default(unique),
  40. local
  41. ]
  42. interface IViewTransition : IViewFilter
  43. {
  44.     HRESULT Initialize([in] HDC, LPCRECT prc);
  45.     HRESULT Go([in] VARIANT vtimeDuration);
  46. }
  47. [
  48.     object,
  49.     uuid(3050f2f4-98b5-11cf-bb82-00aa00bdce0b),
  50.     pointer_default(unique),
  51. local
  52. ]
  53. interface IViewFilterSite : IUnknown
  54. {
  55.     HRESULT GetDC([in] LPCRECT prc, [in] DWORD dwFlags, [out] HDC *phdc);
  56.     HRESULT ReleaseDC([in] HDC hdc);
  57.     HRESULT InvalidateRect([in] LPCRECT prc, [in] BOOL fErase);
  58.     HRESULT InvalidateRgn([in] HRGN hrgn, [in] BOOL fErase);
  59.     HRESULT OnStatusBitsChange([in] DWORD dwFlags);
  60. }
  61. [
  62.     object,
  63.     uuid(3050f373-98b5-11cf-bb82-00aa00bdce0b),
  64.     pointer_default(unique),
  65. local
  66. ]
  67. interface IViewTransitionSite : IViewFilterSite
  68. {
  69.     HRESULT OnComplete();
  70. }
  71. #endif // UNIX
  72. cpp_quote("#define SURFACE_LOCK_EXCLUSIVE        0x01")
  73. cpp_quote("#define SURFACE_LOCK_ALLOW_DISCARD    0x02")
  74. cpp_quote("#define SURFACE_LOCK_WAIT             0x04")
  75. cpp_quote("")
  76. // NOTE: DEFINING NEW ERROR AND STATUS CODES. WHAT'S THE GENERAL PROCEDURE
  77. // FOR THIS? WHAT'S OUR FACILITY CODE?
  78. // FACILITY CODE FOR SUFACE WILL BE 12 (NOT USED IN WINERROR)
  79. cpp_quote("#define E_SURFACE_NOSURFACE             0x8000C000L")
  80. cpp_quote("#define E_SURFACE_UNKNOWN_FORMAT        0x8000C001L")
  81. cpp_quote("#define E_SURFACE_NOTMYPOINTER          0x8000C002L")
  82. cpp_quote("#define E_SURFACE_DISCARDED             0x8000C003L")
  83. cpp_quote("#define E_SURFACE_NODC                  0x8000C004L")
  84. cpp_quote("#define E_SURFACE_NOTMYDC               0x8000C005L")
  85. cpp_quote("#define S_SURFACE_DISCARDED             0x0000C003L")        // Success code
  86. cpp_quote("")
  87. typedef GUID BFID;
  88. cpp_quote("#ifndef RGBQUAD_DEFINED")
  89. cpp_quote("#define RGBQUAD_DEFINED")
  90. typedef struct tagRGBQUAD RGBQUAD;
  91. cpp_quote("#endif")
  92. cpp_quote("EXTERN_C const GUID BFID_MONOCHROME;")
  93. cpp_quote("EXTERN_C const GUID BFID_RGB_4;")
  94. cpp_quote("EXTERN_C const GUID BFID_RGB_8;")
  95. cpp_quote("EXTERN_C const GUID BFID_RGB_555;")
  96. cpp_quote("EXTERN_C const GUID BFID_RGB_565;")
  97. cpp_quote("EXTERN_C const GUID BFID_RGB_24;")
  98. cpp_quote("EXTERN_C const GUID BFID_RGB_32;")
  99. cpp_quote("EXTERN_C const GUID BFID_RGBA_32;")
  100. cpp_quote("EXTERN_C const GUID BFID_GRAY_8;")
  101. cpp_quote("EXTERN_C const GUID BFID_GRAY_16;")
  102. cpp_quote("")
  103. cpp_quote("#define SID_SDirectDraw3 IID_IDirectDraw3")
  104. cpp_quote("")
  105. cpp_quote("#define COLOR_NO_TRANSPARENT 0xFFFFFFFF")
  106. cpp_quote("")
  107. cpp_quote("#define IMGDECODE_EVENT_PROGRESS 0x01")
  108. cpp_quote("#define IMGDECODE_EVENT_PALETTE 0x02")
  109. cpp_quote("#define IMGDECODE_EVENT_BEGINBITS 0x04")
  110. cpp_quote("#define IMGDECODE_EVENT_BITSCOMPLETE 0x08")
  111. cpp_quote("#define IMGDECODE_EVENT_USEDDRAW 0x10")
  112. cpp_quote("")
  113. cpp_quote("#define IMGDECODE_HINT_TOPDOWN 0x01")
  114. cpp_quote("#define IMGDECODE_HINT_BOTTOMUP 0x02")
  115. cpp_quote("#define IMGDECODE_HINT_FULLWIDTH 0x04")
  116. cpp_quote("")
  117. cpp_quote("#define MAPMIME_DEFAULT 0")
  118. cpp_quote("#define MAPMIME_CLSID 1")
  119. cpp_quote("#define MAPMIME_DISABLE 2")
  120. cpp_quote("#define MAPMIME_DEFAULT_ALWAYS 3")
  121. cpp_quote("")
  122. cpp_quote("#define BFID_INDEXED_RGB_8 BFID_RGB_8")
  123. cpp_quote("#define BFID_INDEXED_RGB_4 BFID_RGB_4")
  124. cpp_quote("#define BFID_INDEXED_RGB_1 BFID_MONOCHROME")
  125. cpp_quote("")
  126. cpp_quote("EXTERN_C const GUID CLSID_IImageDecodeFilter;")
  127. cpp_quote("")
  128. //
  129. // TIMER SERVICES
  130. //
  131. cpp_quote("EXTERN_C const GUID NAMEDTIMER_DRAW;")   // in guids.c
  132. cpp_quote("")
  133. interface ITimerService;
  134. interface ITimer;
  135. interface ITimerSink;
  136. [
  137.     object,
  138.     uuid(3050f35f-98b5-11cf-bb82-00aa00bdce0b),
  139.     pointer_default(unique)
  140. ]
  141. interface ITimerService : IUnknown
  142. {
  143.     HRESULT CreateTimer ( [in] ITimer *pReferenceTimer,
  144.                           [out] ITimer **ppNewTimer );
  145.     HRESULT GetNamedTimer ( [in] REFGUID rguidName, [out] ITimer **ppTimer );
  146.     HRESULT SetNamedTimerReference ( [in] REFGUID rguidName,
  147.                      [in] ITimer *pReferenceTimer );
  148. }
  149. [
  150.     object,
  151.     uuid(3050f360-98b5-11cf-bb82-00aa00bdce0b),
  152.     pointer_default(unique)
  153. ]
  154. interface ITimer : IUnknown
  155. {
  156.     HRESULT Advise( [in] VARIANT vtimeMin, [in] VARIANT vtimeMax, [in] VARIANT vtimeInterval,
  157.                        [in] DWORD dwFlags, [in] ITimerSink *pTimerSink, [out] DWORD *pdwCookie);
  158.     HRESULT Unadvise( [in] DWORD dwCookie );
  159.     HRESULT Freeze( [in] BOOL fFreeze );
  160.     HRESULT GetTime( [out] VARIANT *pvtime );
  161. }
  162. [
  163.     object,
  164.     uuid(3050f361-98b5-11cf-bb82-00aa00bdce0b),
  165.     pointer_default(unique)
  166. ]
  167. interface ITimerSink : IUnknown
  168. {
  169.     HRESULT OnTimer ( [in] VARIANT vtimeAdvise );
  170. }
  171. cpp_quote("#define SID_STimerService IID_ITimerService")
  172. cpp_quote("")
  173. interface IMapMIMEToCLSID;
  174. interface IImageDecodeFilter;
  175. interface IImageDecodeEventSink;
  176. [
  177.     object,
  178.     uuid( D9E89500-30FA-11d0-B724-00AA006C1A01 ),
  179. //    helpstring( "IMapMIMEToCLSID Interface" ),
  180.     pointer_default( unique )
  181. ]
  182. interface IMapMIMEToCLSID : IUnknown
  183. {
  184.    HRESULT EnableDefaultMappings( BOOL bEnable );
  185.    HRESULT MapMIMEToCLSID( LPCOLESTR pszMIMEType, CLSID* pCLSID );
  186.    HRESULT SetMapping( LPCOLESTR pszMIMEType, DWORD dwMapMode,
  187.       REFCLSID clsid );
  188. };
  189. [
  190.     object,
  191.     uuid( A3CCEDF3-2DE2-11D0-86F4-00A0C913F750 ),
  192. //    helpstring( "IImageDecodeFilter Interface" ),
  193.     pointer_default( unique )
  194. ]
  195. interface IImageDecodeFilter : IUnknown
  196. {
  197.    HRESULT Initialize( IImageDecodeEventSink* pEventSink );
  198.    HRESULT Process( IStream* pStream );
  199.    HRESULT Terminate( HRESULT hrStatus );
  200. };
  201. [
  202.     object,
  203.     uuid( BAA342A0-2DED-11d0-86F4-00A0C913F750 ),
  204. //    helpstring( "IImageDecodeEventSink Interface" ),
  205.     pointer_default( unique )
  206. ]
  207. interface IImageDecodeEventSink : IUnknown
  208. {
  209.    HRESULT GetSurface( [in] LONG nWidth, [in] LONG nHeight, [in] REFGUID bfid,
  210.       [in] ULONG nPasses, [in] DWORD dwHints,
  211.       [out] IUnknown** ppSurface );
  212.    HRESULT OnBeginDecode( [out] DWORD* pdwEvents, [out] ULONG* pnFormats,
  213.       [out, size_is(,*pnFormats)] BFID** ppFormats );
  214.    HRESULT OnBitsComplete();
  215.    HRESULT OnDecodeComplete( [in] HRESULT hrStatus );
  216.    HRESULT OnPalette();
  217.    HRESULT OnProgress( [in] RECT* pBounds, [in] BOOL bComplete );
  218. };