Fix mscms test compliation on Windows
Francois Gouget
fgouget at free.fr
Fri Oct 22 11:37:11 CDT 2004
On Windows the mscms test fails to compile because one must include
winuser.h before including icm.h. The only reason why we don't need to
in Wine is because our icm.h is so incomplete.
So I fleshed it out a little to make sure I won't have to fix this
compilation error on Windows again and again (assuming people write more
mscms tests).
Changelog:
* dlls/mscms/tests/profile.c
include/icm.h
Flesh out the icm.h header (add COLORMATCHSETUP & co) so it is
necessary to first include winuser.h like on Windows.
Fix the mscms conformance test accordingly. Now it compiles on
Windows.
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
I haven't lost my mind, it's backed up on tape around here somewhere...
-------------- next part --------------
Index: dlls/mscms/tests/profile.c
===================================================================
RCS file: /var/cvs/wine/dlls/mscms/tests/profile.c,v
retrieving revision 1.1
diff -u -r1.1 profile.c
--- dlls/mscms/tests/profile.c 7 Oct 2004 19:12:41 -0000 1.1
+++ dlls/mscms/tests/profile.c 22 Oct 2004 12:13:37 -0000
@@ -25,6 +25,7 @@
#include "winnls.h"
#include "wingdi.h"
+#include "winuser.h"
#include "icm.h"
#include "wine/test.h"
Index: include/icm.h
===================================================================
RCS file: /var/cvs/wine/include/icm.h,v
retrieving revision 1.3
diff -u -r1.3 icm.h
--- include/icm.h 7 Oct 2004 19:12:41 -0000 1.3
+++ include/icm.h 22 Oct 2004 12:12:31 -0000
@@ -29,7 +29,8 @@
typedef DWORD TAGTYPE, *PTAGTYPE, *LPTAGTYPE;
-typedef enum {
+typedef enum
+{
BM_x555RGB = 0x00,
BM_565RGB = 0x01,
BM_RGBTRIPLETS = 0x02,
@@ -72,7 +73,8 @@
typedef BOOL (CALLBACK *PBMCALLBACKFN)(ULONG,ULONG,LPARAM);
typedef PBMCALLBACKFN LPPBMCALLBACKFN;
-typedef struct tagPROFILEHEADER {
+typedef struct tagPROFILEHEADER
+{
DWORD phSize;
DWORD phCMMType;
DWORD phVersion;
@@ -92,29 +94,84 @@
BYTE phReserved[44];
} PROFILEHEADER, *PPROFILEHEADER, *LPPROFILEHEADER;
-typedef struct tagPROFILE {
+typedef struct tagPROFILE
+{
DWORD dwType;
PVOID pProfileData;
DWORD cbDataSize;
} PROFILE, *PPROFILE, *LPPROFILE;
+
+struct _tagCOLORMATCHSETUPA;
+struct _tagCOLORMATCHSETUPW;
+
+typedef BOOL (WINAPI *PCMSCALLBACKA)(struct _tagCOLORMATCHSETUPA*,LPARAM);
+typedef BOOL (WINAPI *PCMSCALLBACKW)(struct _tagCOLORMATCHSETUPW*,LPARAM);
+
+typedef struct _tagCOLORMATCHSETUPA
+{
+ DWORD dwSize;
+ DWORD dwVersion;
+ DWORD dwFlags;
+ HWND hwndOwner;
+ PCSTR pSourceName;
+ PCSTR pDisplayName;
+ PCSTR pPrinterName;
+ DWORD dwRenderIntent;
+ DWORD dwProofingIntent;
+ PSTR pMonitorProfile;
+ DWORD ccMonitorProfile;
+ PSTR pPrinterProfile;
+ DWORD ccPrinterProfile;
+ PSTR pTargetProfile;
+ DWORD ccTargetProfile;
+ DLGPROC lpfnHook;
+ LPARAM lParam;
+ PCMSCALLBACKA lpfnApplyCallback;
+ LPARAM lParamApplyCallback;
+} COLORMATCHSETUPA, *PCOLORMATCHSETUPA, *LPCOLORMATCHSETUPA;
+
+typedef struct _tagCOLORMATCHSETUPW
+{
+ DWORD dwSize;
+ DWORD dwVersion;
+ DWORD dwFlags;
+ HWND hwndOwner;
+ PCWSTR pSourceName;
+ PCWSTR pDisplayName;
+ PCWSTR pPrinterName;
+ DWORD dwRenderIntent;
+ DWORD dwProofingIntent;
+ PWSTR pMonitorProfile;
+ DWORD ccMonitorProfile;
+ PWSTR pPrinterProfile;
+ DWORD ccPrinterProfile;
+ PWSTR pTargetProfile;
+ DWORD ccTargetProfile;
+ DLGPROC lpfnHook;
+ LPARAM lParam;
+ PCMSCALLBACKW lpfnApplyCallback;
+ LPARAM lParamApplyCallback;
+} COLORMATCHSETUPW, *PCOLORMATCHSETUPW, *LPCOLORMATCHSETUPW;
+
+
+BOOL WINAPI CloseColorProfile(HPROFILE);
BOOL WINAPI GetColorDirectoryA(PCSTR,PSTR,PDWORD);
BOOL WINAPI GetColorDirectoryW(PCWSTR,PWSTR,PDWORD);
#define GetColorDirectory WINELIB_NAME_AW(GetColorDirectory)
-
BOOL WINAPI InstallColorProfileA(PCSTR,PCSTR);
BOOL WINAPI InstallColorProfileW(PCWSTR,PCWSTR);
#define InstallColorProfile WINELIB_NAME_AW(InstallColorProfile)
-
-BOOL WINAPI UninstallColorProfileA(PCSTR,PCSTR,BOOL);
-BOOL WINAPI UninstallColorProfileW(PCWSTR,PCWSTR,BOOL);
-#define UninstallColorProfile WINELIB_NAME_AW(UninstallColorProfile)
-
HPROFILE WINAPI OpenColorProfileA(PPROFILE,DWORD,DWORD,DWORD);
HPROFILE WINAPI OpenColorProfileW(PPROFILE,DWORD,DWORD,DWORD);
#define OpenColorProfile WINELIB_NAME_AW(OpenColorProfile)
+BOOL WINAPI SetupColorMatchingA(PCOLORMATCHSETUPA);
+BOOL WINAPI SetupColorMatchingW(PCOLORMATCHSETUPW);
+#define SetupColorMatching WINELIB_NAME_AW(SetupColorMatching)
+BOOL WINAPI UninstallColorProfileA(PCSTR,PCSTR,BOOL);
+BOOL WINAPI UninstallColorProfileW(PCWSTR,PCWSTR,BOOL);
+#define UninstallColorProfile WINELIB_NAME_AW(UninstallColorProfile)
-BOOL WINAPI CloseColorProfile(HPROFILE);
#define PROFILE_FILENAME 1
#define PROFILE_MEMBUFFER 2
More information about the wine-patches
mailing list