Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

185 lines
5.7 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Filter and Bitmap Surface interfaces
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996-1999.
  6. //
  7. // File: qmm.idl
  8. //
  9. //-------------------------------------------------------------------------
  10. import "oaidl.idl";
  11. import "oleidl.idl";
  12. cpp_quote("#define SURFACE_LOCK_EXCLUSIVE 0x01")
  13. cpp_quote("#define SURFACE_LOCK_ALLOW_DISCARD 0x02")
  14. cpp_quote("#define SURFACE_LOCK_WAIT 0x04")
  15. cpp_quote("")
  16. // BUGBUG: DEFINING NEW ERROR AND STATUS CODES. WHAT'S THE GENERAL PROCEDURE
  17. // FOR THIS? WHAT'S OUR FACILITY CODE? I'M MAKING THIS UP FOR NOW.
  18. // FACILITY CODE FOR SUFACE WILL BE 12 (NOT USED IN WINERROR)
  19. cpp_quote("#define E_SURFACE_NOSURFACE 0x8000C000L")
  20. cpp_quote("#define E_SURFACE_UNKNOWN_FORMAT 0x8000C001L")
  21. cpp_quote("#define E_SURFACE_NOTMYPOINTER 0x8000C002L")
  22. cpp_quote("#define E_SURFACE_DISCARDED 0x8000C003L")
  23. cpp_quote("#define E_SURFACE_NODC 0x8000C004L")
  24. cpp_quote("#define E_SURFACE_NOTMYDC 0x8000C005L")
  25. cpp_quote("#define S_SURFACE_DISCARDED 0x0000C003L") // Success code
  26. cpp_quote("")
  27. typedef GUID BFID;
  28. cpp_quote("#ifndef RGBQUAD_DEFINED")
  29. cpp_quote("#define RGBQUAD_DEFINED")
  30. typedef struct tagRGBQUAD RGBQUAD;
  31. cpp_quote("#endif")
  32. cpp_quote("EXTERN_C const GUID BFID_MONOCHROME;")
  33. cpp_quote("EXTERN_C const GUID BFID_RGB_4;")
  34. cpp_quote("EXTERN_C const GUID BFID_RGB_8;")
  35. cpp_quote("EXTERN_C const GUID BFID_RGB_555;")
  36. cpp_quote("EXTERN_C const GUID BFID_RGB_565;")
  37. cpp_quote("EXTERN_C const GUID BFID_RGB_24;")
  38. cpp_quote("EXTERN_C const GUID BFID_RGB_32;")
  39. cpp_quote("EXTERN_C const GUID BFID_RGBA_32;")
  40. cpp_quote("EXTERN_C const GUID BFID_GRAY_8;")
  41. cpp_quote("EXTERN_C const GUID BFID_GRAY_16;")
  42. cpp_quote("")
  43. cpp_quote("#define SID_SDirectDraw3 IID_IDirectDraw3")
  44. cpp_quote("")
  45. cpp_quote("#define COLOR_NO_TRANSPARENT 0xFFFFFFFF")
  46. cpp_quote("")
  47. cpp_quote("#define IMGDECODE_EVENT_PROGRESS 0x01")
  48. cpp_quote("#define IMGDECODE_EVENT_PALETTE 0x02")
  49. cpp_quote("#define IMGDECODE_EVENT_BEGINBITS 0x04")
  50. cpp_quote("#define IMGDECODE_EVENT_BITSCOMPLETE 0x08")
  51. cpp_quote("#define IMGDECODE_EVENT_USEDDRAW 0x10")
  52. cpp_quote("")
  53. cpp_quote("#define IMGDECODE_HINT_TOPDOWN 0x01")
  54. cpp_quote("#define IMGDECODE_HINT_BOTTOMUP 0x02")
  55. cpp_quote("#define IMGDECODE_HINT_FULLWIDTH 0x04")
  56. cpp_quote("")
  57. cpp_quote("#define MAPMIME_DEFAULT 0")
  58. cpp_quote("#define MAPMIME_CLSID 1")
  59. cpp_quote("#define MAPMIME_DISABLE 2")
  60. cpp_quote("#define MAPMIME_DEFAULT_ALWAYS 3")
  61. cpp_quote("")
  62. cpp_quote("#define BFID_INDEXED_RGB_8 BFID_RGB_8")
  63. cpp_quote("#define BFID_INDEXED_RGB_4 BFID_RGB_4")
  64. cpp_quote("#define BFID_INDEXED_RGB_1 BFID_MONOCHROME")
  65. cpp_quote("")
  66. cpp_quote("EXTERN_C const GUID CLSID_IImageDecodeFilter;")
  67. cpp_quote("")
  68. //
  69. // TIMER SERVICES
  70. //
  71. cpp_quote("EXTERN_C const GUID NAMEDTIMER_DRAW;") // in guids.c
  72. cpp_quote("")
  73. interface ITimerService;
  74. interface ITimer;
  75. interface ITimerSink;
  76. [
  77. object,
  78. uuid(4648212f-b251-11d2-a438-00c04fb177e3),
  79. pointer_default(unique)
  80. ]
  81. interface ITimerService : IUnknown
  82. {
  83. HRESULT CreateTimer ( [in] ITimer *pReferenceTimer,
  84. [out] ITimer **ppNewTimer );
  85. HRESULT GetNamedTimer ( [in] REFGUID rguidName, [out] ITimer **ppTimer );
  86. HRESULT SetNamedTimerReference ( [in] REFGUID rguidName,
  87. [in] ITimer *pReferenceTimer );
  88. }
  89. [
  90. object,
  91. uuid(46482130-b251-11d2-a438-00c04fb177e3),
  92. pointer_default(unique)
  93. ]
  94. interface ITimer : IUnknown
  95. {
  96. HRESULT Advise( [in] VARIANT vtimeMin, [in] VARIANT vtimeMax, [in] VARIANT vtimeInterval,
  97. [in] DWORD dwFlags, [in] ITimerSink *pTimerSink, [out] DWORD *pdwCookie);
  98. HRESULT Unadvise( [in] DWORD dwCookie );
  99. HRESULT Freeze( [in] BOOL fFreeze );
  100. HRESULT GetTime( [out] VARIANT *pvtime );
  101. }
  102. [
  103. object,
  104. uuid(4648303a-b251-11d2-a438-00c04fb177e3),
  105. pointer_default(unique)
  106. ]
  107. interface ITimerSink : IUnknown
  108. {
  109. HRESULT OnTimer ( [in] VARIANT vtimeAdvise );
  110. }
  111. cpp_quote("#define SID_STimerService IID_ITimerService")
  112. cpp_quote("")
  113. interface IMapMIMEToCLSID;
  114. interface IImageDecodeFilter;
  115. interface IImageDecodeEventSink;
  116. [
  117. object,
  118. uuid(46482131-b251-11d2-a438-00c04fb177e3),
  119. // helpstring( "IMapMIMEToCLSID Interface" ),
  120. pointer_default( unique )
  121. ]
  122. interface IMapMIMEToCLSID : IUnknown
  123. {
  124. HRESULT EnableDefaultMappings( BOOL bEnable );
  125. HRESULT MapMIMEToCLSID( LPCOLESTR pszMIMEType, CLSID* pCLSID );
  126. HRESULT SetMapping( LPCOLESTR pszMIMEType, DWORD dwMapMode,
  127. REFCLSID clsid );
  128. };
  129. [
  130. object,
  131. uuid(46482132-b251-11d2-a438-00c04fb177e3),
  132. // helpstring( "IImageDecodeFilter Interface" ),
  133. pointer_default( unique )
  134. ]
  135. interface IImageDecodeFilter : IUnknown
  136. {
  137. HRESULT Initialize( IImageDecodeEventSink* pEventSink );
  138. HRESULT Process( IStream* pStream );
  139. HRESULT Terminate( HRESULT hrStatus );
  140. };
  141. [
  142. object,
  143. uuid(46483039-b251-11d2-a438-00c04fb177e3),
  144. // helpstring( "IImageDecodeEventSink Interface" ),
  145. pointer_default( unique )
  146. ]
  147. interface IImageDecodeEventSink : IUnknown
  148. {
  149. HRESULT GetSurface( [in] LONG nWidth, [in] LONG nHeight, [in] REFGUID bfid,
  150. [in] ULONG nPasses, [in] DWORD dwHints,
  151. [out] IUnknown** ppSurface );
  152. HRESULT OnBeginDecode( [out] DWORD* pdwEvents, [out] ULONG* pnFormats,
  153. [out, size_is(,*pnFormats)] BFID** ppFormats );
  154. HRESULT OnBitsComplete();
  155. HRESULT OnDecodeComplete( [in] HRESULT hrStatus );
  156. HRESULT OnPalette();
  157. HRESULT OnProgress( [in] RECT* pBounds, [in] BOOL bComplete );
  158. };