[WINDOWSCODECS]

* Move some inclusions to the main header.
* Set the default debugging channel globally through the main header.
* Remove inclusions and definitions that already exist in the main header.
* Improve the GUIDs situation.
CORE-7716

svn path=/trunk/; revision=61477
This commit is contained in:
Amine Khaldi 2014-01-01 21:40:23 +00:00
parent 6e8b76a341
commit cea29aab6d
29 changed files with 73 additions and 510 deletions

View file

@ -51,6 +51,7 @@ list(APPEND SOURCE
tgaformat.c
tiffformat.c
ungif.c
guid.c
${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c
${CMAKE_CURRENT_BINARY_DIR}/windowscodecs_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/windowscodecs.def

View file

@ -16,27 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef struct BitmapImpl {
IWICBitmap IWICBitmap_iface;
LONG ref;

View file

@ -16,29 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <assert.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
//#include "winreg.h"
#include <wingdi.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <assert.h>
#include <wingdi.h>
typedef struct {
DWORD bc2Size;

View file

@ -16,28 +16,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
//#include "winreg.h"
#include <wingdi.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <wingdi.h>
struct bmp_pixelformat {
const WICPixelFormatGUID *guid;

View file

@ -16,21 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "wincodec.h"
#include "wincodecs_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef struct BitmapClipper {
IWICBitmapClipper IWICBitmapClipper_iface;
LONG ref;

View file

@ -16,30 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
//#include "winreg.h"
#include <objbase.h>
//#include "ocidl.h"
#include <initguid.h>
//#include "wincodec.h"
#include <wincodecsdk.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <initguid.h>
#include <wincodecsdk.h>
extern HRESULT WINAPI WIC_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN;

View file

@ -16,26 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
//#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include "wincodecs_private.h"
typedef struct ColorContext {
IWICColorContext IWICColorContext_iface;

View file

@ -16,26 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
//#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include "wincodecs_private.h"
typedef struct ColorTransform {
IWICColorTransform IWICColorTransform_iface;

View file

@ -16,27 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
struct FormatConverter;
enum pixelformat {

View file

@ -16,26 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
//#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include "wincodecs_private.h"
typedef struct FlipRotator {
IWICBitmapFlipRotator IWICBitmapFlipRotator_iface;

View file

@ -17,32 +17,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include "wincodecs_private.h"
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <ole2.h>
//#include "wincodec.h"
#include <wincodecsdk.h>
#include "ungif.h"
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
static LPWSTR strdupAtoW(const char *src)
{
int len = MultiByteToWideChar(CP_ACP, 0, src, -1, NULL, 0);

View file

@ -0,0 +1,20 @@
/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <initguid.h>
#include <wincodec.h>
DEFINE_GUID(CLSID_WineTgaDecoder, 0xb11fc79a,0x67cc,0x43e6,0xa9,0xce,0xe3,0xd5,0x49,0x45,0xd3,0x04);
DEFINE_GUID(CLSID_WICIcnsEncoder, 0x312fb6f1,0xb767,0x409d,0x8a,0x6d,0x0f,0xc1,0x54,0xd4,0xf0,0x5c);
DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22);
DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */

View file

@ -16,15 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
//#include "wine/port.h"
#include <stdarg.h>
#ifdef HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H
#define GetCurrentProcess GetCurrentProcess_Mac
#define GetCurrentThread GetCurrentThread_Mac
@ -82,19 +73,7 @@
#undef DPRINTF
#endif
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
//#include "wincodec.h"
//#include "wincodecs_private.h"
#include <wine/debug.h>
//#include "wine/library.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include "wincodecs_private.h"
#if defined(HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H) && \
MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4

View file

@ -16,26 +16,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <wingdi.h>
#include <pshpack1.h>

View file

@ -17,30 +17,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
//#include "winreg.h"
#include <objbase.h>
//#include "shellapi.h"
//#include "wincodec.h"
#include <wincodecsdk.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <wingdi.h>
#include <wincodecsdk.h>
typedef struct {
IWICComponentFactory IWICComponentFactory_iface;

View file

@ -17,31 +17,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include "wincodecs_private.h"
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <objbase.h>
//#include "wincodec.h"
#include <wincodecsdk.h>
//#include "wincodecs_private.h"
#include <wine/debug.h>
#include <wine/unicode.h>
#include <wine/list.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
static const WCHAR mimetypes_valuename[] = {'M','i','m','e','T','y','p','e','s',0};
static const WCHAR author_valuename[] = {'A','u','t','h','o','r',0};
static const WCHAR friendlyname_valuename[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};

View file

@ -16,19 +16,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <wine/port.h>
#include "wincodecs_private.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
//#include <stdarg.h>
#include <stdio.h>
//#include <string.h>
#include <setjmp.h>
#ifdef SONAME_LIBJPEG
@ -46,20 +40,8 @@
#undef boolean
#endif
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
#include <wine/library.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#ifdef SONAME_LIBJPEG
WINE_DECLARE_DEBUG_CHANNEL(jpeg);

View file

@ -16,26 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#include <config.h>
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
extern BOOL WINAPI WIC_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)

View file

@ -17,30 +17,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
//#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#define NONAMELESSUNION
#include <windef.h>
#include <winbase.h>
#include <winternl.h>
#include <objbase.h>
//#include "wincodec.h"
#include <wincodecsdk.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <stdio.h>
#include <winternl.h>
#include <wincodecsdk.h>
typedef struct MetadataHandler {
IWICMetadataWriter IWICMetadataWriter_iface;

View file

@ -17,27 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
//#include "winreg.h"
#include <objbase.h>
#include <wincodec.h>
//#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include "wincodecs_private.h"
typedef struct {
IWICPalette IWICPalette_iface;

View file

@ -16,35 +16,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <wine/port.h>
//#include <stdarg.h>
#include "wincodecs_private.h"
#ifdef HAVE_PNG_H
#include <png.h>
#endif
#define NONAMELESSUNION
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
//#include "wincodec.h"
#include <wincodecsdk.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
#include <wine/library.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
static HRESULT read_png_chunk(IStream *stream, BYTE *type, BYTE **data, ULONG *data_size)
{
BYTE header[8];

View file

@ -17,28 +17,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include "wincodecs_private.h"
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <ole2.h>
#include <wincodec.h>
#include <wine/unicode.h>
//#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef struct PropertyBag {
IPropertyBag2 IPropertyBag2_iface;
LONG ref;

View file

@ -18,28 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
//#include "wincodec.h"
#include <wincodecsdk.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <wincodecsdk.h>
HRESULT WINAPI IWICBitmapClipper_Initialize_Proxy_W(IWICBitmapClipper *iface,
IWICBitmapSource *pISource, const WICRect *prc)

View file

@ -16,34 +16,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define COBJMACROS
#include <stdarg.h>
//#include <string.h>
#include <windef.h>
#include <winbase.h>
//#include "wingdi.h"
//#include "winuser.h"
#include <winreg.h>
//#include "winerror.h"
#include <objbase.h>
//#include "ocidl.h"
//#include "wincodec.h"
#include <wincodecsdk.h>
#include <wine/debug.h>
#include <wine/unicode.h>
#include "wincodecs_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <winreg.h>
#include <objbase.h>
#include <wincodecsdk.h>
#include <wine/unicode.h>
/***********************************************************************
* interface for self-registering

View file

@ -16,27 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef struct BitmapScaler {
IWICBitmapScaler IWICBitmapScaler_iface;
LONG ref;

View file

@ -16,22 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <wine/debug.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <objbase.h>
#include <shlwapi.h>
#include <wincodec.h>
#include "wincodecs_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include <winreg.h>
#include <shlwapi.h>
/******************************************
* StreamOnMemory implementation

View file

@ -16,29 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include <config.h>
//#include "wine/port.h"
#include <stdarg.h>
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
//#include "wine/library.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#include "pshpack1.h"
typedef struct {

View file

@ -16,14 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#include "wincodecs_private.h"
#include <config.h>
#include <wine/port.h>
#include <stdarg.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -31,22 +25,11 @@
#include <tiffio.h>
#endif
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <oleauto.h>
//#include "wincodec.h"
#include <wincodecsdk.h>
#include "wincodecs_private.h"
#include <wine/debug.h>
#include <wine/library.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
#ifdef SONAME_LIBTIFF
/* Workaround for broken libtiff 4.x headers on some 64-bit hosts which

View file

@ -19,6 +19,27 @@
#ifndef WINCODECS_PRIVATE_H
#define WINCODECS_PRIVATE_H
#include <wine/config.h>
#include <wine/port.h>
#include <stdarg.h>
#define WIN32_NO_STATUS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define COBJMACROS
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <wincodec.h>
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
DEFINE_GUID(CLSID_WineTgaDecoder, 0xb11fc79a,0x67cc,0x43e6,0xa9,0xce,0xe3,0xd5,0x49,0x45,0xd3,0x04);
DEFINE_GUID(CLSID_WICIcnsEncoder, 0x312fb6f1,0xb767,0x409d,0x8a,0x6d,0x0f,0xc1,0x54,0xd4,0xf0,0x5c);