From 513e1441978d52f4526b7d5427ae5e4dd467a46b Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Tue, 29 Jan 2019 13:04:32 +0100 Subject: [PATCH] [MSCMS] Sync with Wine Staging 4.0. CORE-15682 --- dll/win32/mscms/mscms.spec | 44 ++++++++++++++++++++++++++++++++++++++ dll/win32/mscms/profile.c | 27 ++++++++++++++++++++--- media/doc/README.WINE | 2 +- 3 files changed, 69 insertions(+), 4 deletions(-) diff --git a/dll/win32/mscms/mscms.spec b/dll/win32/mscms/mscms.spec index dd404f10a7c..f521ac69698 100644 --- a/dll/win32/mscms/mscms.spec +++ b/dll/win32/mscms/mscms.spec @@ -3,6 +3,20 @@ @ stdcall CheckBitmapBits(ptr ptr ptr long long long ptr ptr long) @ stdcall CheckColors(ptr ptr long long ptr) @ stdcall CloseColorProfile(ptr) +@ stub CloseDisplay +@ stub ColorCplGetDefaultProfileScope +@ stub ColorCplGetDefaultRenderingIntentScope +@ stub ColorCplGetProfileProperties +@ stub ColorCplHasSystemWideAssociationListChanged +@ stub ColorCplInitialize +@ stub ColorCplLoadAssociationList +@ stub ColorCplMergeAssociationLists +@ stub ColorCplOverwritePerUserAssociationList +@ stub ColorCplReleaseProfileProperties +@ stub ColorCplResetSystemWideAssociationListChangedWarning +@ stub ColorCplSaveAssociationList +@ stub ColorCplSetUsePerUserProfiles +@ stub ColorCplUninitialize @ stdcall ConvertColorNameToIndex(ptr ptr ptr long) @ stdcall ConvertIndexToColorName(ptr ptr ptr long) @ stdcall CreateColorTransformA(ptr ptr ptr long) @@ -11,9 +25,17 @@ @ stdcall CreateMultiProfileTransform(ptr long ptr long long long) @ stdcall CreateProfileFromLogColorSpaceA(ptr ptr) @ stdcall CreateProfileFromLogColorSpaceW(ptr ptr) +@ stub DccwCreateDisplayProfileAssociationList +@ stub DccwGetDisplayProfileAssociationList +@ stub DccwGetGamutSize +@ stub DccwReleaseDisplayProfileAssociationList +@ stub DccwSetDisplayProfileAssociationList @ stdcall DeleteColorTransform(ptr) +@ stub DeviceRenameEvent @ stdcall DisassociateColorProfileFromDeviceA(str str str) @ stdcall DisassociateColorProfileFromDeviceW(wstr wstr wstr) +#@ stub DllCanUnloadNow +#@ stub DllGetClassObject @ stdcall EnumColorProfilesA(str ptr ptr ptr ptr) @ stdcall EnumColorProfilesW(wstr ptr ptr ptr ptr) @ stdcall GenerateCopyFilePaths(wstr wstr ptr long ptr ptr ptr ptr long) @@ -38,11 +60,14 @@ @ stub InternalGetPS2ColorRenderingDictionary @ stub InternalGetPS2ColorSpaceArray @ stub InternalGetPS2PreviewCRD +@ stub InternalRefreshCalibration @ stub InternalSetDeviceConfig +@ stub InternalWcsAssociateColorProfileWithDevice @ stdcall IsColorProfileTagPresent(ptr long ptr) @ stdcall IsColorProfileValid(ptr ptr) @ stdcall OpenColorProfileA(ptr long long long) @ stdcall OpenColorProfileW(ptr long long long) +@ stub OpenDisplay @ stdcall RegisterCMMA(str long str) @ stdcall RegisterCMMW(wstr long wstr) @ stdcall SelectCMM(long) @@ -59,3 +84,22 @@ @ stdcall UninstallColorProfileW(wstr wstr long) @ stdcall UnregisterCMMA(str long) @ stdcall UnregisterCMMW(wstr long) +@ stub WcsAssociateColorProfileWithDevice +@ stub WcsCheckColors +@ stub WcsCreateIccProfile +@ stub WcsDisassociateColorProfileFromDevice +@ stub WcsEnumColorProfiles +@ stdcall WcsEnumColorProfilesSize(long ptr ptr) +@ stub WcsGetCalibrationManagementState +@ stub WcsGetDefaultColorProfile +@ stub WcsGetDefaultColorProfileSize +@ stub WcsGetDefaultRenderingIntent +@ stdcall WcsGetUsePerUserProfiles(wstr long ptr) +@ stub WcsGpCanInstallOrUninstallProfiles +@ stub WcsOpenColorProfileA +@ stub WcsOpenColorProfileW +@ stub WcsSetCalibrationManagementState +@ stub WcsSetDefaultColorProfile +@ stub WcsSetDefaultRenderingIntent +@ stub WcsSetUsePerUserProfiles +@ stub WcsTranslateColors diff --git a/dll/win32/mscms/profile.c b/dll/win32/mscms/profile.c index f0c40877a17..a0b9d4133d7 100644 --- a/dll/win32/mscms/profile.c +++ b/dll/win32/mscms/profile.c @@ -295,7 +295,7 @@ BOOL WINAPI GetColorDirectoryW( PCWSTR machine, PWSTR buffer, PDWORD size ) if (machine || !size) return FALSE; - GetSystemDirectoryW( colordir, sizeof(colordir) / sizeof(WCHAR) ); + GetSystemDirectoryW( colordir, ARRAY_SIZE( colordir )); lstrcatW( colordir, colorsubdir ); len = lstrlenW( colordir ) * sizeof(WCHAR); @@ -668,9 +668,10 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi static BOOL header_from_file( LPCWSTR file, PPROFILEHEADER header ) { + static const WCHAR slash[] = {'\\',0}; BOOL ret; PROFILE profile; - WCHAR path[MAX_PATH], slash[] = {'\\',0}; + WCHAR path[MAX_PATH]; DWORD size = sizeof(path); HANDLE handle; @@ -953,8 +954,8 @@ exit: BOOL WINAPI EnumColorProfilesW( PCWSTR machine, PENUMTYPEW record, PBYTE buffer, PDWORD size, PDWORD number ) { + static const WCHAR spec[] = {'\\','*','i','c','m',0}; BOOL match, ret = FALSE; - WCHAR spec[] = {'\\','*','i','c','m',0}; WCHAR colordir[MAX_PATH], glob[MAX_PATH], **profiles = NULL; DWORD i, len = sizeof(colordir), count = 0, totalsize = 0; PROFILEHEADER header; @@ -1525,3 +1526,23 @@ BOOL WINAPI CloseColorProfile( HPROFILE profile ) #endif /* HAVE_LCMS2 */ return ret; } + +/****************************************************************************** + * WcsGetUsePerUserProfiles [MSCMS.@] + */ +BOOL WINAPI WcsGetUsePerUserProfiles( const WCHAR* name, DWORD class, BOOL* use_per_user_profile ) +{ + FIXME( "%s %s %p\n", debugstr_w(name), dbgstr_tag(class), use_per_user_profile ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/****************************************************************************** + * WcsEnumColorProfilesSize [MSCMS.@] + */ +BOOL WINAPI WcsEnumColorProfilesSize( WCS_PROFILE_MANAGEMENT_SCOPE scope, ENUMTYPEW *record, DWORD *size ) +{ + FIXME( "%d %p %p\n", scope, record, size ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 8910a723dc6..334d42d01a6 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -104,7 +104,7 @@ reactos/dll/win32/msacm32 # Synced to WineStaging-4.0 reactos/dll/win32/msacm32.drv # Synced to WineStaging-3.3 reactos/dll/win32/msadp32.acm # Synced to WineStaging-4.0 reactos/dll/win32/mscat32 # Synced to WineStaging-3.3 -reactos/dll/win32/mscms # Synced to WineStaging-3.3 +reactos/dll/win32/mscms # Synced to WineStaging-4.0 reactos/dll/win32/mscoree # Synced to Wine-1.5.4 reactos/dll/win32/msctf # Synced to WineStaging-3.9 reactos/dll/win32/msftedit # Synced to WineStaging-3.3 -- 2.17.1