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.

164 lines
5.1 KiB

  1. // BitmapSurfaces.idl : IDL source for BitmapSurfaces.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (BitmapSurfaces.tlb) and marshalling code.
  5. cpp_quote( "#define SURFACE_LOCK_NORMAL 0x00" )
  6. cpp_quote( "#define SURFACE_LOCK_EXCLUSIVE 0x01" )
  7. cpp_quote( "#define SURFACE_LOCK_ALLOW_DISCARD 0x02" )
  8. cpp_quote( "#define SURFACE_LOCK_READ_ONLY 0x04" )
  9. cpp_quote( "#define SURFACE_LOCK_WAIT 0x08" )
  10. cpp_quote( "#define DECODE_EVENT_PROGRESS 0x01" )
  11. cpp_quote( "#define DECODE_EVENT_PALETTE 0x02" )
  12. cpp_quote( "#define DECODE_EVENT_BEGINBITS 0x04" )
  13. cpp_quote( "#define DECODE_EVENT_BITSCOMPLETE 0x08" )
  14. cpp_quote( "#define DECODE_HINT_TOPDOWN 0x01" )
  15. cpp_quote( "#define DECODE_HINT_BOTTOMUP 0x02" )
  16. cpp_quote( "#define DECODE_HINT_FULLWIDTH 0x04" )
  17. cpp_quote( "#define COLOR_NO_TRANSPARENT 0xffffffff" )
  18. cpp_quote( "#define MAP_DEFAULT 0" )
  19. cpp_quote( "#define MAP_CLSID 1" )
  20. cpp_quote( "#define MAP_DISABLE 2" )
  21. cpp_quote( "#define MAP_DEFAULT_ALWAYS 3" )
  22. cpp_quote( "EXTERN_C const GUID BFID_RGB_32;" )
  23. cpp_quote( "EXTERN_C const GUID BFID_RGB_555;" )
  24. cpp_quote( "EXTERN_C const GUID BFID_RGB_565;" )
  25. cpp_quote( "EXTERN_C const GUID BFID_RGB_24;" )
  26. cpp_quote( "EXTERN_C const GUID BFID_RGB_8;" )
  27. cpp_quote( "#define BFID_INDEXED_RGB_8 BFID_RGB_8" )
  28. cpp_quote( "EXTERN_C const GUID BFID_RGB_4;" )
  29. cpp_quote( "#define BFID_INDEXED_RGB_4 BFID_RGB_4" )
  30. cpp_quote( "EXTERN_C const GUID BFID_MONOCHROME;" )
  31. cpp_quote( "#define BFID_INDEXED_RGB_1 BFID_MONOCHROME" )
  32. cpp_quote( "EXTERN_C const GUID BFID_RGBA_32;" )
  33. cpp_quote( "EXTERN_C const GUID BFID_GRAY_8;" )
  34. cpp_quote( "EXTERN_C const GUID BFID_GRAY_16;" )
  35. typedef struct tagRGBQUAD RGBQUAD;
  36. interface IImageDecodeEventSink;
  37. interface IImageDecodeFilter;
  38. interface IBitmapSurface;
  39. interface IBitmapSurfaceFactory;
  40. [
  41. object,
  42. local,
  43. uuid( 3050f2ef-98b5-11cf-bb82-00aa00bdce0b ),
  44. helpstring( "IBitmapSurface Interface" ),
  45. pointer_default( unique )
  46. ]
  47. interface IBitmapSurface : IUnknown
  48. {
  49. import "oaidl.idl";
  50. HRESULT Clone( [out] IBitmapSurface** ppSurface );
  51. HRESULT GetFormat( [out] GUID* pBFID );
  52. HRESULT GetFactory( [out] IBitmapSurfaceFactory** ppFactory );
  53. HRESULT GetSize( LONG* pnWidth, LONG* pnHeight );
  54. HRESULT LockBits( [in] RECT* pBounds, [in] DWORD dwLockFlags,
  55. [out] void** ppBits, [out] LONG* pnPitch );
  56. HRESULT UnlockBits( [in] RECT* pBounds, [in] void* pBits );
  57. };
  58. [
  59. object,
  60. local,
  61. uuid( 3050f2f0-98b5-11cf-bb82-00aa00bdce0b ),
  62. helpstring( "IGdiSurface Interface" ),
  63. pointer_default( unique )
  64. ]
  65. interface IGdiSurface : IUnknown
  66. {
  67. HRESULT GetDC( [out] HDC* phDC, [in] DWORD dwLockFlags );
  68. HRESULT ReleaseDC( [in] HDC hDC );
  69. };
  70. [
  71. object,
  72. local,
  73. uuid( 3050f2f5-98b5-11cf-bb82-00aa00bdce0b ),
  74. helpstring( "IRGBColorTable Interface" ),
  75. pointer_default( unique )
  76. ]
  77. interface IRGBColorTable : IUnknown
  78. {
  79. HRESULT GetCount( [out] LONG* pnCount );
  80. HRESULT GetColors( [in] LONG iFirst, [in] LONG nCount,
  81. [out] RGBQUAD* pColors );
  82. HRESULT SetColors( [in] LONG iFirst, [in] LONG nCount,
  83. [in] RGBQUAD* pColors );
  84. HRESULT GetTransparentIndex( [out] LONG* piIndex );
  85. HRESULT SetTransparentIndex( [in] LONG iIndex );
  86. };
  87. [
  88. object,
  89. local,
  90. uuid( 3050f2f2-98b5-11cf-bb82-00aa00bdce0b ),
  91. helpstring( "IBitmapSurfaceFactory Interface" ),
  92. pointer_default( unique )
  93. ]
  94. interface IBitmapSurfaceFactory : IUnknown
  95. {
  96. HRESULT CreateBitmapSurface( [in] LONG nWidth, [in] LONG nHeight,
  97. [in] GUID* pBFID, [in] DWORD dwHintFlags,
  98. [out] IBitmapSurface** ppSurface );
  99. HRESULT GetSupportedFormatsCount( [out] LONG* pnFormats );
  100. HRESULT GetSupportedFormats( [in] LONG nFormats, [out] GUID* pBFIDs );
  101. };
  102. [
  103. object,
  104. local,
  105. uuid( D9E89500-30FA-11d0-B724-00AA006C1A01 ),
  106. helpstring( "IMapMIMEToCLSID Interface" ),
  107. pointer_default( unique )
  108. ]
  109. interface IMapMIMEToCLSID : IUnknown
  110. {
  111. HRESULT EnableDefaultMappings( BOOL bEnable );
  112. HRESULT MapMIMEToCLSID( LPCOLESTR pszMIMEType, GUID* pCLSID );
  113. HRESULT SetMapping( LPCOLESTR pszMIMEType, DWORD dwMapMode, REFGUID clsid );
  114. };
  115. [
  116. object,
  117. local,
  118. uuid( A3CCEDF3-2DE2-11D0-86F4-00A0C913F750 ),
  119. helpstring( "IImageDecodeFilter Interface" ),
  120. pointer_default( unique )
  121. ]
  122. interface IImageDecodeFilter : IUnknown
  123. {
  124. HRESULT Initialize( IImageDecodeEventSink* pEventSink );
  125. HRESULT Process( IStream* pStream );
  126. HRESULT Terminate( HRESULT hrStatus );
  127. };
  128. [
  129. object,
  130. local,
  131. uuid( BAA342A0-2DED-11d0-86F4-00A0C913F750 ),
  132. helpstring( "IImageDecodeEventSink Interface" ),
  133. pointer_default( unique )
  134. ]
  135. interface IImageDecodeEventSink : IUnknown
  136. {
  137. HRESULT GetSurface( [in] LONG nWidth, [in] LONG nHeight, [in] REFGUID bfid,
  138. [in] ULONG nPasses, [in] DWORD dwHints,
  139. [out] IBitmapSurface** ppSurface );
  140. HRESULT OnBeginDecode( [out] DWORD* pdwEvents, [out] ULONG* pnFormats,
  141. [out, size_is(,*pnFormats)] GUID** ppFormats );
  142. HRESULT OnBitsComplete();
  143. HRESULT OnDecodeComplete( [in] HRESULT hrStatus );
  144. HRESULT OnPalette();
  145. HRESULT OnProgress( [in] RECT* pBounds, [in] BOOL bComplete );
  146. };