Module: wine Branch: master Commit: 27c4648507df9e7105de05d62973db7d87f0920b URL: https://source.winehq.org/git/wine.git/?a=commit;h=27c4648507df9e7105de05d62...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Apr 21 19:02:57 2020 +0200
windowscodecs: Provide UUIDs in importlib.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Vincent Povirk vincent@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/windowscodecs/Makefile.in | 5 +++-- dlls/windowscodecs/clsfactory.c | 2 ++ dlls/windowscodecs/tests/Makefile.in | 2 +- dlls/windowscodecs/tests/bitmap.c | 12 ------------ dlls/windowscodecs/tests/bmpformat.c | 1 - dlls/windowscodecs/tests/info.c | 3 --- dlls/windowscodecs/uuid.c | 36 ++++++++++++++++++++++++++++++++++ dlls/windowscodecs/wincodecs_private.h | 12 ++++++------ 8 files changed, 48 insertions(+), 25 deletions(-)
diff --git a/dlls/windowscodecs/Makefile.in b/dlls/windowscodecs/Makefile.in index 37ac771c8f..fac90344fa 100644 --- a/dlls/windowscodecs/Makefile.in +++ b/dlls/windowscodecs/Makefile.in @@ -1,6 +1,6 @@ MODULE = windowscodecs.dll IMPORTLIB = windowscodecs -IMPORTS = uuid ole32 oleaut32 propsys rpcrt4 shlwapi user32 gdi32 advapi32 +IMPORTS = windowscodecs uuid ole32 oleaut32 propsys rpcrt4 shlwapi user32 gdi32 advapi32 EXTRAINCL = $(JPEG_CFLAGS) $(PNG_CFLAGS) $(TIFF_CFLAGS) EXTRALIBS = $(APPLICATIONSERVICES_LIBS)
@@ -33,7 +33,8 @@ C_SRCS = \ stream.c \ tgaformat.c \ tiffformat.c \ - ungif.c + ungif.c \ + uuid.c
RC_SRCS = version.rc
diff --git a/dlls/windowscodecs/clsfactory.c b/dlls/windowscodecs/clsfactory.c index 2a0d26352d..d3cd9f34aa 100644 --- a/dlls/windowscodecs/clsfactory.c +++ b/dlls/windowscodecs/clsfactory.c @@ -27,6 +27,8 @@ #include "winreg.h" #include "objbase.h" #include "ocidl.h" +#include "wincodec.h" +#include "wincodecsdk.h" #include "initguid.h"
#include "wincodecs_private.h" diff --git a/dlls/windowscodecs/tests/Makefile.in b/dlls/windowscodecs/tests/Makefile.in index 1450f056e9..315e975a09 100644 --- a/dlls/windowscodecs/tests/Makefile.in +++ b/dlls/windowscodecs/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = windowscodecs.dll -IMPORTS = windowscodecs propsys oleaut32 ole32 user32 gdi32 shlwapi +IMPORTS = windowscodecs propsys oleaut32 ole32 user32 gdi32 shlwapi uuid
C_SRCS = \ bitmap.c \ diff --git a/dlls/windowscodecs/tests/bitmap.c b/dlls/windowscodecs/tests/bitmap.c index 278c8a8f8d..dd31bf88f3 100644 --- a/dlls/windowscodecs/tests/bitmap.c +++ b/dlls/windowscodecs/tests/bitmap.c @@ -30,24 +30,12 @@ #include "wincodec.h" #include "wine/test.h"
-#include "initguid.h" -DEFINE_GUID(IID_IMILUnknown,0x0ccd7824,0xdc16,0x4d09,0xbc,0xa8,0x6b,0x09,0xc4,0xef,0x55,0x35); - -#ifdef _MSC_VER extern IID IID_IMILBitmap; extern IID IID_IMILBitmapSource; extern IID IID_IMILBitmapLock; extern IID IID_IMILBitmapScaler; extern IID IID_IMILFormatConverter; extern IID IID_IMILPalette; -#else -DEFINE_GUID(IID_IMILBitmap,0xb1784d3f,0x8115,0x4763,0x13,0xaa,0x32,0xed,0xdb,0x68,0x29,0x4a); -DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe); -DEFINE_GUID(IID_IMILBitmapLock,0xa67b2b53,0x8fa1,0x4155,0x8f,0x64,0x0c,0x24,0x7a,0x8f,0x84,0xcd); -DEFINE_GUID(IID_IMILBitmapScaler,0xa767b0f0,0x1c8c,0x4aef,0x56,0x8f,0xad,0xf9,0x6d,0xcf,0xd5,0xcb); -DEFINE_GUID(IID_IMILFormatConverter,0x7e2a746f,0x25c5,0x4851,0xb3,0xaf,0x44,0x3b,0x79,0x63,0x9e,0xc0); -DEFINE_GUID(IID_IMILPalette,0xca8e206f,0xf22c,0x4af7,0x6f,0xba,0x7b,0xed,0x5e,0xb1,0xc9,0x2f); -#endif
#undef INTERFACE #define INTERFACE IMILBitmapSource diff --git a/dlls/windowscodecs/tests/bmpformat.c b/dlls/windowscodecs/tests/bmpformat.c index 183fc46100..0e36f644c6 100644 --- a/dlls/windowscodecs/tests/bmpformat.c +++ b/dlls/windowscodecs/tests/bmpformat.c @@ -22,7 +22,6 @@ #define COBJMACROS
#include "windef.h" -#include "initguid.h" #include "objbase.h" #include "wincodec.h" #include "wincodecsdk.h" diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c index ee95784166..af2532efb4 100644 --- a/dlls/windowscodecs/tests/info.c +++ b/dlls/windowscodecs/tests/info.c @@ -28,9 +28,6 @@ #include "wincodecsdk.h" #include "wine/test.h"
-#include "initguid.h" -DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); - static HRESULT get_component_info(const GUID *clsid, IWICComponentInfo **result) { IWICImagingFactory *factory; diff --git a/dlls/windowscodecs/uuid.c b/dlls/windowscodecs/uuid.c new file mode 100644 index 0000000000..74de280634 --- /dev/null +++ b/dlls/windowscodecs/uuid.c @@ -0,0 +1,36 @@ +/* + * Copyright 2009 Vincent Povirk for CodeWeavers + * Copyright 2020 Jacek Caban 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 + */ + +#if 0 +#pragma makedep implib +#endif + +#include "windows.h" +#include "ocidl.h" +#include "propidl.h" +#include "initguid.h" +#include "wincodec.h" +#include "wincodecsdk.h" + +DEFINE_GUID(IID_IMILBitmap,0xb1784d3f,0x8115,0x4763,0x13,0xaa,0x32,0xed,0xdb,0x68,0x29,0x4a); +DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe); +DEFINE_GUID(IID_IMILBitmapLock,0xa67b2b53,0x8fa1,0x4155,0x8f,0x64,0x0c,0x24,0x7a,0x8f,0x84,0xcd); +DEFINE_GUID(IID_IMILBitmapScaler,0xa767b0f0,0x1c8c,0x4aef,0x56,0x8f,0xad,0xf9,0x6d,0xcf,0xd5,0xcb); +DEFINE_GUID(IID_IMILFormatConverter,0x7e2a746f,0x25c5,0x4851,0xb3,0xaf,0x44,0x3b,0x79,0x63,0x9e,0xc0); +DEFINE_GUID(IID_IMILPalette,0xca8e206f,0xf22c,0x4af7,0x6f,0xba,0x7b,0xed,0x5e,0xb1,0xc9,0x2f); diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index e03cde4eb2..48b9b06469 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -33,12 +33,12 @@ DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47
DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
-DEFINE_GUID(IID_IMILBitmap,0xb1784d3f,0x8115,0x4763,0x13,0xaa,0x32,0xed,0xdb,0x68,0x29,0x4a); -DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe); -DEFINE_GUID(IID_IMILBitmapLock,0xa67b2b53,0x8fa1,0x4155,0x8f,0x64,0x0c,0x24,0x7a,0x8f,0x84,0xcd); -DEFINE_GUID(IID_IMILBitmapScaler,0xa767b0f0,0x1c8c,0x4aef,0x56,0x8f,0xad,0xf9,0x6d,0xcf,0xd5,0xcb); -DEFINE_GUID(IID_IMILFormatConverter,0x7e2a746f,0x25c5,0x4851,0xb3,0xaf,0x44,0x3b,0x79,0x63,0x9e,0xc0); -DEFINE_GUID(IID_IMILPalette,0xca8e206f,0xf22c,0x4af7,0x6f,0xba,0x7b,0xed,0x5e,0xb1,0xc9,0x2f); +extern IID IID_IMILBitmap; +extern IID IID_IMILBitmapSource; +extern IID IID_IMILBitmapLock; +extern IID IID_IMILBitmapScaler; +extern IID IID_IMILFormatConverter; +extern IID IID_IMILPalette;
#define INTERFACE IMILBitmapSource DECLARE_INTERFACE_(IMILBitmapSource,IUnknown)