wordpad: Add Lithuanian translation.
[wine.git] / include / wincodec.idl
blobabb4d0881008e56f74c37660ecc69e45ca814ff1
1 /*
2 * Copyright 2009 Vincent Povirk for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 import "wtypes.idl";
20 import "propidl.idl";
21 import "objidl.idl";
22 import "ocidl.idl";
24 #define CODEC_FORCE_DWORD 0x7fffffff
26 typedef enum WICDecodeOptions {
27 WICDecodeMetadataCacheOnDemand = 0x00000000,
28 WICDecodeMetadataCacheOnLoad = 0x00000001,
29 WICMETADATACACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
30 } WICDecodeOptions;
32 typedef enum WICBitmapCreateCacheOption {
33 WICBitmapNoCache = 0x00000000,
34 WICBitmapCacheOnDemand = 0x00000001,
35 WICBitmapCacheOnLoad = 0x00000002,
36 WICBITMAPCREATECACHEOPTION_FORCE_DWORD = CODEC_FORCE_DWORD
37 } WICBitmapCreateCacheOption;
39 typedef enum WICBitmapAlphaChannelOption {
40 WICBitmapUseAlpha = 0x00000000,
41 WICBitmapUsePremultipliedAlpha = 0x00000001,
42 WICBitmapIgnoreAlpha = 0x00000002,
43 WICBITMAPALPHACHANNELOPTIONS_FORCE_DWORD = CODEC_FORCE_DWORD
44 } WICBitmapAlphaChannelOption;
46 typedef GUID WICPixelFormatGUID;
47 typedef REFGUID REFWICPixelFormatGUID;
49 typedef struct WICRect {
50 INT X;
51 INT Y;
52 INT Width;
53 INT Height;
54 } WICRect;
56 interface IWICBitmap;
57 interface IWICComponentInfo;
58 interface IWICBitmapEncoder;
59 interface IWICPalette;
60 interface IWICFormatConverter;
61 interface IWICBitmapScaler;
62 interface IWICBitmapClipper;
63 interface IWICBitmapFlipRotator;
64 interface IWICStream;
65 interface IWICColorContext;
66 interface IWICColorTransform;
67 interface IWICFastMetadataEncoder;
68 interface IWICMetadataQueryReader;
69 interface IWICMetadataQueryWriter;
70 interface IWICBitmapDecoderInfo;
73 object,
74 uuid(00000120-a8f2-4877-ba0a-fd2b6645fb94)
76 interface IWICBitmapSource : IUnknown
78 HRESULT GetSize(
79 [out] UINT *puiWidth,
80 [out] UINT *puiHeight);
82 HRESULT GetPixelFormat(
83 [out] WICPixelFormatGUID *pPixelFormat);
85 HRESULT GetResolution(
86 [out] double *pDpiX,
87 [out] double *pDpiY);
89 HRESULT CopyPalette(
90 [in] IWICPalette *pIPalette);
92 HRESULT CopyPixels(
93 [in] const WICRect *prc,
94 [in] UINT cbStride,
95 [in] UINT cbBufferSize,
96 [out, size_is(cbBufferSize)] BYTE *pbBuffer);
100 object,
101 uuid(3b16811b-6a43-4ec9-a813-3d930c13b940)
103 interface IWICBitmapFrameDecode : IWICBitmapSource
105 HRESULT GetMetadataQueryReader(
106 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
108 HRESULT GetColorContexts(
109 [in] UINT cCount,
110 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
111 [out] UINT *pcActualCount);
113 HRESULT GetThumbnail(
114 [out] IWICBitmapSource **ppIThumbnail);
118 object,
119 uuid(9edde9e7-8dee-47ea-99df-e6faf2ed44bf)
121 interface IWICBitmapDecoder : IUnknown
123 HRESULT QueryCapability(
124 [in] IStream *pIStream,
125 [out] DWORD *pdwCapability);
127 HRESULT Initialize(
128 [in] IStream *pIStream,
129 [in] WICDecodeOptions cacheOptions);
131 HRESULT GetContainerFormat(
132 [out] GUID *pguidContainerFormat);
134 HRESULT GetDecoderInfo(
135 [out] IWICBitmapDecoderInfo **ppIDecoderInfo);
137 HRESULT CopyPalette(
138 [in] IWICPalette *pIPalette);
140 HRESULT GetMetadataQueryReader(
141 [out] IWICMetadataQueryReader **ppIMetadataQueryReader);
143 HRESULT GetPreview(
144 [out] IWICBitmapSource **ppIBitmapSource);
146 HRESULT GetColorContexts(
147 [in] UINT cCount,
148 [in, out, unique, size_is(cCount)] IWICColorContext **ppIColorContexts,
149 [out] UINT *pcActualCount);
151 HRESULT GetThumbnail(
152 [out] IWICBitmapSource **ppIThumbnail);
154 HRESULT GetFrameCount(
155 [out] UINT *pCount);
157 HRESULT GetFrame(
158 [in] UINT index,
159 [out] IWICBitmapFrameDecode **ppIBitmapFrame);
162 cpp_quote("DEFINE_GUID(CLSID_WICImagingFactory, 0xcacaf262,0x9370,0x4615,0xa1,0x3b,0x9f,0x55,0x39,0xda,0x4c,0x0a);")
165 object,
166 uuid(ec5ec8a9-c395-4314-9c77-54d7a935ff70)
168 interface IWICImagingFactory : IUnknown
170 HRESULT CreateDecoderFromFilename(
171 [in] LPCWSTR wzFilename,
172 [in, unique] const GUID *pguidVendor,
173 [in] DWORD dwDesiredAccess,
174 [in] WICDecodeOptions metadataOptions,
175 [out, retval] IWICBitmapDecoder **ppIDecoder);
177 HRESULT CreateDecoderFromStream(
178 [in] IStream *pIStream,
179 [in, unique] const GUID *pguidVendor,
180 [in] WICDecodeOptions metadataOptions,
181 [out, retval] IWICBitmapDecoder **ppIDecoder);
183 HRESULT CreateDecoderFromFileHandle(
184 [in] ULONG_PTR hFile,
185 [in, unique] const GUID *pguidVendor,
186 [in] WICDecodeOptions metadataOptions,
187 [out, retval] IWICBitmapDecoder **ppIDecoder);
189 HRESULT CreateComponentInfo(
190 [in] REFCLSID clsidComponent,
191 [out] IWICComponentInfo **ppIInfo);
193 HRESULT CreateDecoder(
194 [in] REFGUID guidContainerFormat,
195 [in, unique] const GUID *pguidVendor,
196 [out, retval] IWICBitmapDecoder **ppIDecoder);
198 HRESULT CreateEncoder(
199 [in] REFGUID guidContainerFormat,
200 [in, unique] const GUID *pguidVendor,
201 [out, retval] IWICBitmapEncoder **ppIEncoder);
203 HRESULT CreatePalette(
204 [out] IWICPalette **ppIPalette);
206 HRESULT CreateFormatConverter(
207 [out] IWICFormatConverter **ppIFormatConverter);
209 HRESULT CreateBitmapScaler(
210 [out] IWICBitmapScaler **ppIBitmapScaler);
212 HRESULT CreateBitmapClipper(
213 [out] IWICBitmapClipper **ppIBitmapClipper);
215 HRESULT CreateBitmapFlipRotator(
216 [out] IWICBitmapFlipRotator **ppIBitmapFlipRotator);
218 HRESULT CreateStream(
219 [out] IWICStream **ppIWICStream);
221 HRESULT CreateColorContext(
222 [out] IWICColorContext **ppIWICColorContext);
224 HRESULT CreateColorTransformer(
225 [out] IWICColorTransform **ppIWICColorTransform);
227 HRESULT CreateBitmap(
228 [in] UINT uiWidth,
229 [in] UINT uiHeight,
230 [in] REFWICPixelFormatGUID pixelFormat,
231 [in] WICBitmapCreateCacheOption option,
232 [out] IWICBitmap **ppIBitmap);
234 HRESULT CreateBitmapFromSource(
235 [in] IWICBitmapSource *piBitmapSource,
236 [in] WICBitmapCreateCacheOption option,
237 [out] IWICBitmap **ppIBitmap);
239 HRESULT CreateBitmapFromSourceRect(
240 [in] IWICBitmapSource *piBitmapSource,
241 [in] UINT x,
242 [in] UINT y,
243 [in] UINT width,
244 [in] UINT height,
245 [out] IWICBitmap **ppIBitmap);
247 HRESULT CreateBitmapFromMemory(
248 [in] UINT uiWidth,
249 [in] UINT uiHeight,
250 [in] REFWICPixelFormatGUID pixelFormat,
251 [in] UINT cbStride,
252 [in] UINT cbBufferSize,
253 [in, size_is(cbBufferSize)] BYTE *pbBuffer,
254 [out] IWICBitmap **ppIBitmap);
256 HRESULT CreateBitmapFromHBITMAP(
257 [in] HBITMAP hBitmap,
258 [in, unique] HPALETTE hPalette,
259 [in] WICBitmapAlphaChannelOption options,
260 [out] IWICBitmap **ppIBitmap);
262 HRESULT CreateBitmapFromHICON(
263 [in] HICON hIcon,
264 [out] IWICBitmap **ppIBitmap);
266 HRESULT CreateComponentEnumerator(
267 [in] DWORD componentTypes,
268 [in] DWORD options,
269 [out] IEnumUnknown **ppIEnumUnknown);
271 HRESULT CreateFastMetadataEncoderFromDecoder(
272 [in] IWICBitmapDecoder *pIDecoder,
273 [out] IWICFastMetadataEncoder **ppIFastEncoder);
275 HRESULT CreateFastMetadataEncoderFromFrameDecode(
276 [in] IWICBitmapFrameDecode *pIFrameDecoder,
277 [out] IWICFastMetadataEncoder **ppIFastEncoder);
279 HRESULT CreateQueryWriter(
280 [in] REFGUID guidMetadataFormat,
281 [in, unique] const GUID *pguidVendor,
282 [out] IWICMetadataQueryWriter **ppIQueryWriter);
284 HRESULT CreateQueryWriterFromReader(
285 [in] IWICMetadataQueryReader *pIQueryReader,
286 [in, unique] const GUID *pguidVendor,
287 [out] IWICMetadataQueryWriter **ppIQueryWriter);
290 cpp_quote("DEFINE_GUID(CLSID_WICBmpDecoder, 0x6b462062,0x7cbf,0x400d,0x9f,0xdb,0x81,0x3d,0xd1,0x0f,0x27,0x78);")
291 cpp_quote("DEFINE_GUID(CLSID_WICPngDecoder, 0x389ea17b,0x5078,0x4cde,0xb6,0xef,0x25,0xc1,0x51,0x75,0xc7,0x51);")
292 cpp_quote("DEFINE_GUID(CLSID_WICIcoDecoder, 0xc61bfcdf,0x2e0f,0x4aad,0xa8,0xd7,0xe0,0x6b,0xaf,0xeb,0xcd,0xfe);")
293 cpp_quote("DEFINE_GUID(CLSID_WICJpegDecoder, 0x9456a480,0xe88b,0x43ea,0x9e,0x73,0x0b,0x2d,0x9b,0x71,0xb1,0xca);")
294 cpp_quote("DEFINE_GUID(CLSID_WICGifDecoder, 0x381dda3c,0x9ce9,0x4834,0xa2,0x3e,0x1f,0x98,0xf8,0xfc,0x52,0xbe);")
295 cpp_quote("DEFINE_GUID(CLSID_WICTiffDecoder, 0xb54e85d9,0xfe23,0x499f,0x8b,0x88,0x6a,0xce,0xa7,0x13,0x75,0x2b);")
296 cpp_quote("DEFINE_GUID(CLSID_WICWmpDecoder, 0xa26cec36,0x234c,0x4950,0xae,0x16,0xe3,0x4a,0xac,0xe7,0x1d,0x0d);")
298 cpp_quote("DEFINE_GUID(GUID_ContainerFormatBmp, 0x0af1d87e,0xfcfe,0x4188,0xbd,0xeb,0xa7,0x90,0x64,0x71,0xcb,0xe3);")
299 cpp_quote("DEFINE_GUID(GUID_ContainerFormatPng, 0x1b7cfaf4,0x713f,0x473c,0xbb,0xcd,0x61,0x37,0x42,0x5f,0xae,0xaf);")
300 cpp_quote("DEFINE_GUID(GUID_ContainerFormatIco, 0xa3a860c4,0x338f,0x4c17,0x91,0x9a,0xfb,0xa4,0xb5,0x62,0x8f,0x21);")
301 cpp_quote("DEFINE_GUID(GUID_ContainerFormatJpeg, 0x19e4a5aa,0x5662,0x4fc5,0xa0,0xc0,0x17,0x58,0x02,0x8e,0x10,0x57);")
302 cpp_quote("DEFINE_GUID(GUID_ContainerFormatTiff, 0x163bcc30,0xe2e9,0x4f0b,0x96,0x1d,0xa3,0xe9,0xfd,0xb7,0x88,0xa3);")
303 cpp_quote("DEFINE_GUID(GUID_ContainerFormatGif, 0x1f8a5601,0x7d4d,0x4cbd,0x9c,0x82,0x1b,0xc8,0xd4,0xee,0xb9,0xa5);")
304 cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x6b,0xf1,0x83,0xc5,0x09,0x3a,0x4b);")