2009-06-01 20:32:41 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2009 Vincent Povirk for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WINCODECS_PRIVATE_H
|
|
|
|
#define WINCODECS_PRIVATE_H
|
|
|
|
|
2010-06-07 21:36:35 +02:00
|
|
|
DEFINE_GUID(CLSID_WineTgaDecoder, 0xb11fc79a,0x67cc,0x43e6,0xa9,0xce,0xe3,0xd5,0x49,0x45,0xd3,0x04);
|
|
|
|
|
2010-08-24 09:43:54 +02:00
|
|
|
DEFINE_GUID(CLSID_WICIcnsEncoder, 0x312fb6f1,0xb767,0x409d,0x8a,0x6d,0x0f,0xc1,0x54,0xd4,0xf0,0x5c);
|
|
|
|
|
2010-06-07 21:36:35 +02:00
|
|
|
DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22);
|
|
|
|
|
2010-09-06 04:24:53 +02:00
|
|
|
DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
|
|
|
|
|
2013-10-14 05:07:06 +02:00
|
|
|
DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe);
|
|
|
|
#define INTERFACE IMILBitmapSource
|
|
|
|
DECLARE_INTERFACE_(IMILBitmapSource,IUnknown)
|
|
|
|
{
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
|
|
|
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
|
|
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
|
|
|
/*** IMILBitmapSource methods ***/
|
|
|
|
STDMETHOD_(HRESULT,GetSize)(THIS_ UINT *,UINT *);
|
|
|
|
STDMETHOD_(HRESULT,GetPixelFormat)(THIS_ int *);
|
|
|
|
STDMETHOD_(HRESULT,GetResolution)(THIS_ double *,double *);
|
|
|
|
STDMETHOD_(HRESULT,CopyPalette)(THIS_ IWICPalette *);
|
|
|
|
STDMETHOD_(HRESULT,CopyPixels)(THIS_ const WICRect *,UINT,UINT,BYTE *);
|
|
|
|
STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void **);
|
|
|
|
};
|
|
|
|
#undef INTERFACE
|
|
|
|
|
|
|
|
#define INTERFACE IMILUnknown1
|
|
|
|
DECLARE_INTERFACE_(IMILUnknown1,IUnknown)
|
|
|
|
{
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
|
|
|
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
|
|
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
|
|
|
};
|
|
|
|
#undef INTERFACE
|
|
|
|
|
|
|
|
#define INTERFACE IMILUnknown2
|
|
|
|
DECLARE_INTERFACE_(IMILUnknown2,IUnknown)
|
|
|
|
{
|
|
|
|
/*** IUnknown methods ***/
|
|
|
|
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
|
|
|
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
|
|
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
|
|
|
/*** unknown methods ***/
|
|
|
|
STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void *, void *) PURE;
|
|
|
|
};
|
|
|
|
#undef INTERFACE
|
|
|
|
|
2014-01-14 12:18:11 +01:00
|
|
|
extern HRESULT FormatConverter_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT ComponentFactory_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT BmpDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT BmpEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT DibDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT GifDecoder_CreateInstance(REFIID riid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT IcoDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT JpegDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT TiffDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT TiffEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT IcnsEncoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT TgaDecoder_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
2010-09-16 20:40:55 +02:00
|
|
|
|
2012-08-14 20:39:15 +02:00
|
|
|
extern HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight,
|
2013-01-04 11:05:30 +01:00
|
|
|
UINT stride, UINT datasize, BYTE *bits,
|
2012-08-14 20:39:15 +02:00
|
|
|
REFWICPixelFormatGUID pixelFormat, WICBitmapCreateCacheOption option,
|
|
|
|
IWICBitmap **ppIBitmap) DECLSPEC_HIDDEN;
|
2012-02-28 20:45:32 +01:00
|
|
|
extern HRESULT BitmapScaler_Create(IWICBitmapScaler **scaler) DECLSPEC_HIDDEN;
|
2011-04-29 10:11:52 +02:00
|
|
|
extern HRESULT FlipRotator_Create(IWICBitmapFlipRotator **fliprotator) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT PaletteImpl_Create(IWICPalette **palette) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT StreamImpl_Create(IWICStream **stream) DECLSPEC_HIDDEN;
|
2012-11-15 14:06:25 +01:00
|
|
|
extern HRESULT ColorContext_Create(IWICColorContext **context) DECLSPEC_HIDDEN;
|
2013-02-06 13:52:09 +01:00
|
|
|
extern HRESULT ColorTransform_Create(IWICColorTransform **transform) DECLSPEC_HIDDEN;
|
2013-07-18 15:30:54 +02:00
|
|
|
extern HRESULT BitmapClipper_Create(IWICBitmapClipper **clipper) DECLSPEC_HIDDEN;
|
2009-07-03 00:09:47 +02:00
|
|
|
|
2009-07-01 22:48:56 +02:00
|
|
|
extern HRESULT copy_pixels(UINT bpp, const BYTE *srcbuffer,
|
|
|
|
UINT srcwidth, UINT srcheight, INT srcstride,
|
2011-04-29 10:11:52 +02:00
|
|
|
const WICRect *rc, UINT dststride, UINT dstbuffersize, BYTE *dstbuffer) DECLSPEC_HIDDEN;
|
2009-07-01 22:48:56 +02:00
|
|
|
|
2011-04-29 10:11:52 +02:00
|
|
|
extern void reverse_bgr8(UINT bytesperpixel, LPBYTE bits, UINT width, UINT height, INT stride) DECLSPEC_HIDDEN;
|
2011-01-10 22:23:17 +01:00
|
|
|
|
2012-06-13 19:56:10 +02:00
|
|
|
extern HRESULT get_pixelformat_bpp(const GUID *pixelformat, UINT *bpp) DECLSPEC_HIDDEN;
|
|
|
|
|
2013-01-29 19:50:36 +01:00
|
|
|
extern HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count,
|
|
|
|
IPropertyBag2 **property) DECLSPEC_HIDDEN;
|
2009-08-11 23:10:12 +02:00
|
|
|
|
2011-04-29 10:11:52 +02:00
|
|
|
extern HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT CreateComponentEnumerator(DWORD componentTypes, DWORD options, IEnumUnknown **ppIEnumUnknown) DECLSPEC_HIDDEN;
|
2009-07-15 00:50:28 +02:00
|
|
|
|
2011-01-10 22:36:14 +01:00
|
|
|
typedef struct BmpDecoder BmpDecoder;
|
|
|
|
|
2011-04-29 10:11:52 +02:00
|
|
|
extern HRESULT IcoDibDecoder_CreateInstance(BmpDecoder **ppDecoder) DECLSPEC_HIDDEN;
|
|
|
|
extern void BmpDecoder_GetWICDecoder(BmpDecoder *This, IWICBitmapDecoder **ppDecoder) DECLSPEC_HIDDEN;
|
|
|
|
extern void BmpDecoder_FindIconMask(BmpDecoder *This, ULONG *mask_offset, int *topdown) DECLSPEC_HIDDEN;
|
2010-09-16 20:40:55 +02:00
|
|
|
|
2012-01-11 23:03:24 +01:00
|
|
|
typedef struct _MetadataItem
|
|
|
|
{
|
|
|
|
PROPVARIANT schema;
|
|
|
|
PROPVARIANT id;
|
|
|
|
PROPVARIANT value;
|
|
|
|
} MetadataItem;
|
|
|
|
|
|
|
|
typedef struct _MetadataHandlerVtbl
|
|
|
|
{
|
|
|
|
int is_writer;
|
|
|
|
const CLSID *clsid;
|
|
|
|
HRESULT (*fnLoad)(IStream *stream, const GUID *preferred_vendor,
|
|
|
|
DWORD persist_options, MetadataItem **items, DWORD *item_count);
|
|
|
|
HRESULT (*fnSave)(IStream *stream, DWORD persist_options,
|
|
|
|
const MetadataItem *items, DWORD item_count);
|
|
|
|
HRESULT (*fnGetSizeMax)(const MetadataItem *items, DWORD item_count,
|
|
|
|
ULARGE_INTEGER *size);
|
|
|
|
} MetadataHandlerVtbl;
|
|
|
|
|
2014-01-14 12:18:11 +01:00
|
|
|
extern HRESULT MetadataReader_Create(const MetadataHandlerVtbl *vtable, REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
2012-09-11 00:01:15 +02:00
|
|
|
|
2014-01-14 12:18:11 +01:00
|
|
|
extern HRESULT UnknownMetadataReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT IfdMetadataReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT PngTextReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT LSDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT IMDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT GCEReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT APEReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
|
|
|
extern HRESULT GifCommentReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN;
|
2012-09-11 00:01:15 +02:00
|
|
|
|
2013-02-06 13:53:21 +01:00
|
|
|
extern HRESULT stream_initialize_from_filehandle(IWICStream *iface, HANDLE hfile) DECLSPEC_HIDDEN;
|
|
|
|
|
2009-06-01 20:32:41 +02:00
|
|
|
#endif /* WINCODECS_PRIVATE_H */
|