Commit 081b2507 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

Implement color profile handles.

Implement OpenColorProfile{A,W} and CloseColorProfile. Implement GetColorDirectory{A,W} and InstallColorProfile{A,W}. Implement UninstallColorProfile{A,W}. Dynamically load liblcms. Add tests.
parent 493d60fe
......@@ -631,15 +631,6 @@ AC_CHECK_HEADERS(libaudioio.h,
[AUDIOIOLIBS="-laudioio"
AC_DEFINE(HAVE_LIBAUDIOIO, 1, [Define if you have libaudioIO])])])
dnl **** Check for lcms ****
AC_CHECK_HEADERS(lcms.h,
[AC_CHECK_LIB(lcms,cmsOpenProfileFromFile,
[AC_DEFINE(HAVE_LCMS,1,[Define if you have lcms libs and headers])
AC_SUBST(LCMSLIBS,"-llcms")
])
])
dnl **** Check for capi4linux ****
AC_CHECK_HEADERS(capi20.h,[
......@@ -1047,6 +1038,7 @@ then
WINE_GET_SONAME(jpeg,jpeg_start_decompress)
WINE_GET_SONAME(ungif,DGifOpen)
WINE_GET_SONAME(gif,DGifOpen)
WINE_GET_SONAME(lcms,cmsOpenProfileFromFile)
fi
......@@ -1131,6 +1123,7 @@ AC_CHECK_HEADERS(\
io.h \
jack/jack.h \
jpeglib.h \
lcms.h \
libio.h \
libutil.h \
link.h \
......@@ -1619,6 +1612,7 @@ dlls/msacm/msg711/Makefile
dlls/msacm/winemp3/Makefile
dlls/msacm/tests/Makefile
dlls/mscms/Makefile
dlls/mscms/tests/Makefile
dlls/msdmo/Makefile
dlls/mshtml/Makefile
dlls/msi/Makefile
......
......@@ -4,10 +4,13 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = mscms.dll
IMPORTS = kernel32
EXTRALIBS = @LCMSLIBS@
C_SRCS = \
mscms_main.c
handle.c \
mscms_main.c \
profile.c
SUBDIRS = tests
@MAKE_DLL_RULES@
......
/*
* MSCMS - Color Management System for Wine
*
* Copyright 2004 Hans Leidekker
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "icm.h"
#include "mscms_priv.h"
#ifdef HAVE_LCMS_H
static CRITICAL_SECTION MSCMS_handle_cs;
static CRITICAL_SECTION_DEBUG MSCMS_handle_cs_debug =
{
0, 0, &MSCMS_handle_cs,
{ &MSCMS_handle_cs_debug.ProcessLocksList,
&MSCMS_handle_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": MSCMS_handle_cs") }
};
static CRITICAL_SECTION MSCMS_handle_cs = { &MSCMS_handle_cs_debug, -1, 0, 0, 0, 0 };
/* A simple structure to tie together Windows file handles and lcms color
* profile handles. Windows color profile handles are built from indexes
* into an array of these structures. The 'file' field is set to NULL in
* case of a memory based profile
*/
struct handlemap
{
HANDLE file;
cmsHPROFILE cmsprofile;
};
#define CMSMAXHANDLES 0x80
static struct handlemap handlemaptable[CMSMAXHANDLES];
HPROFILE MSCMS_cmsprofile2hprofile( cmsHPROFILE cmsprofile )
{
HPROFILE ret = NULL;
unsigned int i;
if (!cmsprofile) return ret;
EnterCriticalSection( &MSCMS_handle_cs );
for (i = 0; i <= CMSMAXHANDLES; i++)
{
if (handlemaptable[i].cmsprofile == cmsprofile)
{
ret = (HPROFILE)(i + 1); goto out;
}
}
out:
LeaveCriticalSection( &MSCMS_handle_cs );
return ret;
}
cmsHPROFILE MSCMS_hprofile2cmsprofile( HPROFILE profile )
{
HANDLE ret;
unsigned int i;
EnterCriticalSection( &MSCMS_handle_cs );
i = (unsigned int)profile - 1;
ret = handlemaptable[i].cmsprofile;
LeaveCriticalSection( &MSCMS_handle_cs );
return ret;
}
HANDLE MSCMS_hprofile2handle( HPROFILE profile )
{
HANDLE ret;
unsigned int i;
EnterCriticalSection( &MSCMS_handle_cs );
i = (unsigned int)profile - 1;
ret = handlemaptable[i].file;
LeaveCriticalSection( &MSCMS_handle_cs );
return ret;
}
HPROFILE MSCMS_create_hprofile_handle( HANDLE file, cmsHPROFILE cmsprofile )
{
HPROFILE ret = NULL;
unsigned int i;
if (!cmsprofile) return ret;
EnterCriticalSection( &MSCMS_handle_cs );
for (i = 0; i <= CMSMAXHANDLES; i++)
{
if (handlemaptable[i].cmsprofile == 0)
{
handlemaptable[i].file = file;
handlemaptable[i].cmsprofile = cmsprofile;
ret = (HPROFILE)(i + 1); goto out;
}
}
out:
LeaveCriticalSection( &MSCMS_handle_cs );
return ret;
}
void MSCMS_destroy_hprofile_handle( HPROFILE profile )
{
unsigned int i;
if (profile)
{
EnterCriticalSection( &MSCMS_handle_cs );
i = (unsigned int)profile - 1;
memset( &handlemaptable[i], 0, sizeof(struct handlemap) );
LeaveCriticalSection( &MSCMS_handle_cs );
}
}
#endif /* HAVE_LCMS_H */
/*
* MSCMS - Color Management System for Wine
*
* Copyright 2004 Hans Leidekker
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "mscms_priv.h"
#ifndef LCMS_API_FUNCTION
#error "This file should be included with LCMS_API_FUNCTION defined!"
#endif
#ifdef HAVE_LCMS_H
LCMS_API_FUNCTION(cmsCloseProfile)
LCMS_API_FUNCTION(cmsOpenProfileFromFile)
LCMS_API_FUNCTION(cmsOpenProfileFromMem)
#ifndef LCMS_API_NO_REDEFINE
#define cmsCloseProfile pcmsCloseProfile
#define cmsOpenProfileFromFile pcmsOpenProfileFromFile
#define cmsOpenProfileFromMem pcmsOpenProfileFromMem
#endif /* LCMS_API_NO_REDEFINE */
#endif /* HAVE_LCMS_H */
......@@ -18,8 +18,8 @@
@ stub EnumColorProfilesW
@ stub GenerateCopyFilePaths
@ stub GetCMMInfo
@ stub GetColorDirectoryA
@ stub GetColorDirectoryW
@ stdcall GetColorDirectoryA(ptr ptr long)
@ stdcall GetColorDirectoryW(ptr ptr long)
@ stub GetColorProfileElement
@ stub GetColorProfileElementTag
@ stub GetColorProfileFromHandle
......@@ -31,8 +31,8 @@
@ stub GetPS2ColorSpaceArray
@ stub GetStandardColorSpaceProfileA
@ stub GetStandardColorSpaceProfileW
@ stub InstallColorProfileA
@ stub InstallColorProfileW
@ stdcall InstallColorProfileA(ptr ptr)
@ stdcall InstallColorProfileW(ptr ptr)
@ stub InternalGetDeviceConfig
@ stub InternalGetPS2CSAFromLCS
@ stub InternalGetPS2ColorRenderingDictionary
......@@ -55,7 +55,7 @@
@ stub SpoolerCopyFileEvent
@ stub TranslateBitmapBits
@ stub TranslateColors
@ stub UninstallColorProfileA
@ stub UninstallColorProfileW
@ stdcall UninstallColorProfileA(ptr ptr long)
@ stdcall UninstallColorProfileW(ptr ptr long)
@ stub UnregisterCMMA
@ stub UnregisterCMMW
......@@ -20,77 +20,113 @@
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "wine/library.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "icm.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(mscms);
#ifdef HAVE_LCMS
#define LCMS_API_NO_REDEFINE
#define LCMS_API_FUNCTION(f) typeof(f) * p##f;
#include "lcms_api.h"
#undef LCMS_API_FUNCTION
/* These basic Windows types are defined in lcms.h when compiling on
* a non-Windows platforms (why?), so they would normally not conflict
* with anything included earlier. But since we are building Wine they
* most certainly will have been defined before we include lcms.h.
* The preprocessor comes to the rescue.
*/
#define BYTE LCMS_BYTE
#define LPBYTE LCMS_LPBYTE
#define WORD LCMS_WORD
#define LPWORD LCMS_LPWORD
#define DWORD LCMS_DWORD
#define LPDWORD LCMS_LPDWORD
#define BOOL LCMS_BOOL
#define LPSTR LCMS_LPSTR
#define LPVOID LCMS_LPVOID
#undef cdecl
#undef FAR
#undef ZeroMemory
#undef CopyMemory
WINE_DEFAULT_DEBUG_CHANNEL(mscms);
#undef LOWORD
#undef MAX_PATH
#ifdef HAVE_LCMS_H
#ifndef SONAME_LIBLCMS
#define SONAME_LIBLCMS "liblcms.so"
#endif
#include <lcms.h>
static void *lcmshandle = NULL;
#endif /* HAVE_LCMS_H */
/* Funny thing is lcms.h defines DWORD as an 'unsigned int' whereas Wine
* defines it as an 'unsigned long'. To avoid compiler warnings we use a
* preprocessor define for DWORD and LPDWORD to get back Wine's orginal
* (typedef) definitions.
*/
static BOOL MSCMS_init_lcms()
{
#ifdef HAVE_LCMS_H
/* dynamically load lcms if not yet loaded */
if (!lcmshandle)
{
lcmshandle = wine_dlopen( SONAME_LIBLCMS, RTLD_NOW, NULL, 0 );
/* We can't really do anything useful without liblcms */
if (!lcmshandle)
{
WINE_MESSAGE(
"Wine cannot find the LittleCMS library. To enable Wine to use color\n"
"management functions please install a version of LittleCMS greater\n"
"than or equal to 1.13.\n"
"http://www.littlecms.com\n" );
return FALSE;
}
}
#define LOAD_FUNCPTR(f) \
if ((p##f = wine_dlsym( lcmshandle, #f, NULL, 0 )) == NULL) \
goto sym_not_found;
LOAD_FUNCPTR(cmsCloseProfile);
LOAD_FUNCPTR(cmsOpenProfileFromFile);
LOAD_FUNCPTR(cmsOpenProfileFromMem);
#undef LOAD_FUNCPTR
return TRUE;
sym_not_found:
WINE_MESSAGE(
"Wine cannot find certain functions that it needs inside the LittleCMS\n"
"library. To enable Wine to use LittleCMS for color management please\n"
"upgrade liblcms to at least version 1.13.\n"
"http://www.littlecms.com\n" );
wine_dlclose( lcmshandle, NULL, 0 );
lcmshandle = NULL;
#undef DWORD
#undef LPDWORD
return FALSE;
#define DWORD DWORD
#define LPDWORD LPDWORD
#endif /* HAVE_LCMS_H */
WINE_MESSAGE(
"This version of Wine was compiled without support for color management\n"
"functions. This means many color functions are empty stubs and you should\n"
"expect your application to fail. To enable Wine to use LittleCMS for color\n"
"management please install a liblcms development package version 1.13 or\n"
"higher and rebuild Wine.\n"
"http://www.littlecms.com\n" );
#endif
return TRUE;
}
HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation )
static void MSCMS_deinit_lcms()
{
FIXME("( %p, %lx, %lx, %lx ) stub!\n", profile, access, sharing, creation );
return NULL;
#ifdef HAVE_LCMS_H
if (lcmshandle)
{
wine_dlclose( lcmshandle, NULL, 0 );
lcmshandle = NULL;
}
#endif /* HAVE_LCMS_H */
}
HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation )
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{
FIXME("( %p, %lx, %lx, %lx ) stub!\n", profile, access, sharing, creation );
TRACE( "(%p, 0x%08lx, %p)\n", hinst, reason, reserved );
return NULL;
}
switch (reason)
{
case DLL_PROCESS_ATTACH:
return MSCMS_init_lcms();
BOOL WINAPI CloseColorProfile( HPROFILE profile )
{
FIXME("( %p ) stub!\n", profile );
case DLL_PROCESS_DETACH:
MSCMS_deinit_lcms();
break;
}
return FALSE;
return TRUE;
}
/*
* MSCMS - Color Management System for Wine
*
* Copyright 2004 Hans Leidekker
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef HAVE_LCMS_H
/* These basic Windows types are defined in lcms.h when compiling on
* a non-Windows platforms (why?), so they would normally not conflict
* with anything included earlier. But since we are building Wine they
* most certainly will have been defined before we include lcms.h.
* The preprocessor comes to the rescue.
*/
#define BYTE LCMS_BYTE
#define LPBYTE LCMS_LPBYTE
#define WORD LCMS_WORD
#define LPWORD LCMS_LPWORD
#define DWORD LCMS_DWORD
#define LPDWORD LCMS_LPDWORD
#define BOOL LCMS_BOOL
#define LPSTR LCMS_LPSTR
#define LPVOID LCMS_LPVOID
#undef cdecl
#undef FAR
#undef ZeroMemory
#undef CopyMemory
#undef LOWORD
#undef MAX_PATH
#include <lcms.h>
/* Funny thing is lcms.h defines DWORD as an 'unsigned int' whereas Wine
* defines it as an 'unsigned long'. To avoid compiler warnings we use a
* preprocessor define for DWORD and LPDWORD to get back Wine's orginal
* (typedef) definitions.
*/
#undef DWORD
#undef LPDWORD
#define DWORD DWORD
#define LPDWORD LPDWORD
extern HPROFILE MSCMS_cmsprofile2hprofile( cmsHPROFILE cmsprofile );
extern cmsHPROFILE MSCMS_hprofile2cmsprofile( HPROFILE profile );
extern HANDLE MSCMS_hprofile2handle( HPROFILE profile );
extern HPROFILE MSCMS_create_hprofile_handle( HANDLE file, cmsHPROFILE cmsprofile );
extern void MSCMS_destroy_hprofile_handle( HPROFILE profile );
#endif /* HAVE_LCMS_H */
/*
* MSCMS - Color Management System for Wine
*
* Copyright 2004 Hans Leidekker
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/debug.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wingdi.h"
#include "icm.h"
#define LCMS_API_FUNCTION(f) extern typeof(f) * p##f;
#include "lcms_api.h"
#undef LCMS_API_FUNCTION
WINE_DEFAULT_DEBUG_CHANNEL(mscms);
BOOL WINAPI GetColorDirectoryA( PCSTR machine, PSTR buffer, PDWORD size )
{
INT len;
LPWSTR bufferW;
BOOL ret = FALSE;
DWORD sizeW = *size * sizeof(WCHAR);
TRACE( "( %p, %ld )\n", buffer, *size );
if (machine || !buffer) return FALSE;
bufferW = HeapAlloc( GetProcessHeap(), 0, sizeW );
if (bufferW)
{
ret = GetColorDirectoryW( NULL, bufferW, &sizeW );
*size = sizeW / sizeof(WCHAR);
if (ret)
{
len = WideCharToMultiByte( CP_ACP, 0, bufferW, *size, buffer, *size, NULL, NULL );
if (!len) ret = FALSE;
}
HeapFree( GetProcessHeap(), 0, bufferW );
}
return ret;
}
BOOL WINAPI GetColorDirectoryW( PCWSTR machine, PWSTR buffer, PDWORD size )
{
/* FIXME: Get this directory from the registry? */
static const WCHAR colordir[] =
{ 'c',':','\\','w','i','n','d','o','w','s','\\', 's','y','s','t','e','m','3','2',
'\\','s','p','o','o','l','\\','d','r','i','v','e','r','s','\\','c','o','l','o','r',0 };
DWORD len;
TRACE( "( %p, %ld )\n", buffer, *size );
if (machine || !buffer) return FALSE;
len = lstrlenW( colordir ) * sizeof(WCHAR);
if (len <= *size)
{
lstrcatW( buffer, colordir );
return TRUE;
}
*size = len;
return FALSE;
}
BOOL WINAPI InstallColorProfileA( PCSTR machine, PCSTR profile )
{
UINT len;
LPWSTR profileW;
BOOL ret = FALSE;
TRACE( "( %s )\n", debugstr_a(profile) );
if (machine || !profile) return FALSE;
len = MultiByteToWideChar( CP_ACP, 0, profile, -1, NULL, 0 );
profileW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
if (profileW)
{
MultiByteToWideChar( CP_ACP, 0, profile, -1, profileW, len );
ret = InstallColorProfileW( NULL, profileW );
HeapFree( GetProcessHeap(), 0, profileW );
}
return ret;
}
BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
{
FIXME( "( %s ) stub\n", debugstr_w(profile) );
if (machine || !profile) return FALSE;
return FALSE;
}
BOOL WINAPI UninstallColorProfileA( PCSTR machine, PCSTR profile, BOOL delete )
{
if (machine || !profile) return FALSE;
if (delete)
return DeleteFileA( profile );
return TRUE;
}
BOOL WINAPI UninstallColorProfileW( PCWSTR machine, PCWSTR profile, BOOL delete )
{
if (machine || !profile) return FALSE;
if (delete)
return DeleteFileW( profile );
return TRUE;
}
HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation )
{
HPROFILE handle = NULL;
TRACE( "( %p, %lx, %lx, %lx )\n", profile, access, sharing, creation );
if (!profile || !profile->pProfileData) return NULL;
/* No AW conversion needed for memory based profiles */
if (profile->dwType & PROFILE_MEMBUFFER)
return OpenColorProfileW( profile, access, sharing, creation );
if (profile->dwType & PROFILE_FILENAME)
{
UINT len;
PROFILE profileW;
profileW.dwType = profile->dwType;
len = MultiByteToWideChar( CP_ACP, 0, profile->pProfileData, -1, NULL, 0 );
profileW.pProfileData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
if (profileW.pProfileData)
{
profileW.cbDataSize = len * sizeof(WCHAR);
MultiByteToWideChar( CP_ACP, 0, profile->pProfileData, -1, profileW.pProfileData, len );
handle = OpenColorProfileW( &profileW, access, sharing, creation );
HeapFree( GetProcessHeap(), 0, profileW.pProfileData );
}
}
return handle;
}
/******************************************************************************
* OpenColorProfileW [MSCMS.@]
*
* Open a color profile.
*
* PARAMS
* profile [I] Pointer to a color profile structure
* access [I] Desired access
* sharing [I] Sharing mode
* creation [I] Creation mode
*
* RETURNS
* Success: Handle to the opened profile
* Failure: NULL
*
* NOTES
* Values for access: PROFILE_READ or PROFILE_READWRITE
* Values for sharing: 0 (no sharing), FILE_SHARE_READ and/or FILE_SHARE_WRITE
* Values for creation: one of CREATE_NEW, CREATE_ALWAYS, OPEN_EXISTING,
* OPEN_ALWAYS, TRUNCATE_EXISTING.
*/
HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation )
{
#ifdef HAVE_LCMS_H
cmsHPROFILE cmsprofile = NULL;
HANDLE handle = NULL;
TRACE( "( %p, %lx, %lx, %lx )\n", profile, access, sharing, creation );
if (!profile || !profile->pProfileData) return NULL;
if (profile->dwType & PROFILE_MEMBUFFER)
{
FIXME( "Memory based profile not yet supported.\n" ); return NULL;
}
if (profile->dwType & PROFILE_FILENAME)
{
char *unixname;
DWORD flags = 0;
TRACE("profile file: %s\n", debugstr_w( (WCHAR *)profile->pProfileData ));
if (access & PROFILE_READ) flags = GENERIC_READ;
if (access & PROFILE_READWRITE) flags = GENERIC_READ|GENERIC_WRITE;
if (!flags) return NULL;
handle = CreateFileW( profile->pProfileData, flags, sharing, NULL, creation, 0, NULL );
if (handle == INVALID_HANDLE_VALUE) return NULL;
unixname = wine_get_unix_file_name( (WCHAR *)profile->pProfileData );
if (unixname)
{
cmsprofile = cmsOpenProfileFromFile( unixname, flags & GENERIC_READ ? "r" : "w" );
HeapFree( GetProcessHeap(), 0, unixname );
}
}
if (cmsprofile) return MSCMS_create_hprofile_handle( handle, cmsprofile );
#endif /* HAVE_LCMS_H */
return NULL;
}
BOOL WINAPI CloseColorProfile( HPROFILE profile )
{
BOOL ret1, ret2 = FALSE;
TRACE( "( %p )\n", profile );
#ifdef HAVE_LCMS_H
ret1 = cmsCloseProfile( MSCMS_hprofile2cmsprofile( profile ) );
ret2 = CloseHandle( MSCMS_hprofile2handle( profile ) );
MSCMS_destroy_hprofile_handle( profile );
#endif /* HAVE_LCMS_H */
return ret1 && ret2;
}
Makefile
profile.ok
testlist.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = mscms.dll
IMPORTS = mscms kernel32
CTESTS = \
profile.c
@MAKE_TEST_RULES@
### Dependencies:
......@@ -245,9 +245,6 @@
/* Define to 1 if you have the <jpeglib.h> header file. */
#undef HAVE_JPEGLIB_H
/* Define if you have lcms libs and headers */
#undef HAVE_LCMS
/* Define to 1 if you have the <lcms.h> header file. */
#undef HAVE_LCMS_H
......@@ -905,6 +902,9 @@
/* Define to the soname of the libjpeg library. */
#undef SONAME_LIBJPEG
/* Define to the soname of the liblcms library. */
#undef SONAME_LIBLCMS
/* Define to the soname of the libncurses library. */
#undef SONAME_LIBNCURSES
......
......@@ -98,14 +98,30 @@ typedef struct tagPROFILE {
DWORD cbDataSize;
} PROFILE, *PPROFILE, *LPPROFILE;
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 CloseColorProfile(HPROFILE);
#define PROFILE_FILENAME 1
#define PROFILE_MEMBUFFER 2
#define PROFILE_READ 1
#define PROFILE_READWRITE 2
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment