2004-10-07 19:12:41 +00:00
|
|
|
/*
|
|
|
|
* MSCMS - Color Management System for Wine
|
|
|
|
*
|
2005-02-14 20:53:59 +00:00
|
|
|
* Copyright 2004, 2005 Hans Leidekker
|
2004-10-07 19:12:41 +00:00
|
|
|
*
|
|
|
|
* 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
|
2006-05-18 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2004-10-07 19:12:41 +00:00
|
|
|
*/
|
|
|
|
|
2005-07-18 15:10:36 +00:00
|
|
|
#ifdef HAVE_LCMS
|
2004-10-07 19:12:41 +00:00
|
|
|
|
|
|
|
/* These basic Windows types are defined in lcms.h when compiling on
|
2004-11-30 21:06:14 +00:00
|
|
|
* a non-Windows platform (why?), so they would normally not conflict
|
2004-10-07 19:12:41 +00:00
|
|
|
* 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
|
|
|
|
|
2004-11-23 17:33:55 +00:00
|
|
|
#ifdef HAVE_LCMS_LCMS_H
|
|
|
|
#include <lcms/lcms.h>
|
|
|
|
#else
|
2004-10-07 19:12:41 +00:00
|
|
|
#include <lcms.h>
|
2004-11-23 17:33:55 +00:00
|
|
|
#endif
|
2004-10-07 19:12:41 +00:00
|
|
|
|
2006-10-04 09:19:38 +00:00
|
|
|
/* Funny thing is lcms.h defines DWORD as an 'unsigned long' whereas Wine
|
|
|
|
* defines it as an 'unsigned int'. To avoid compiler warnings we use a
|
2006-10-15 15:05:01 +00:00
|
|
|
* preprocessor define for DWORD and LPDWORD to get back Wine's original
|
2006-10-04 09:19:38 +00:00
|
|
|
* (typedef) definitions.
|
|
|
|
*/
|
|
|
|
|
2007-03-13 11:42:40 +00:00
|
|
|
#undef BOOL
|
2006-10-04 09:19:38 +00:00
|
|
|
#undef DWORD
|
|
|
|
#undef LPDWORD
|
|
|
|
|
2007-03-13 11:42:40 +00:00
|
|
|
#define BOOL BOOL
|
2006-10-04 09:19:38 +00:00
|
|
|
#define DWORD DWORD
|
|
|
|
#define LPDWORD LPDWORD
|
|
|
|
|
2005-02-14 20:53:59 +00:00
|
|
|
extern DWORD MSCMS_hprofile2access( HPROFILE );
|
2004-11-30 21:06:14 +00:00
|
|
|
extern HPROFILE MSCMS_handle2hprofile( HANDLE file );
|
2004-10-07 19:12:41 +00:00
|
|
|
extern HPROFILE MSCMS_cmsprofile2hprofile( cmsHPROFILE cmsprofile );
|
2007-05-28 17:11:29 +00:00
|
|
|
extern HPROFILE MSCMS_iccprofile2hprofile( const icProfile *iccprofile );
|
2004-10-07 19:12:41 +00:00
|
|
|
extern HANDLE MSCMS_hprofile2handle( HPROFILE profile );
|
2004-11-30 21:06:14 +00:00
|
|
|
extern cmsHPROFILE MSCMS_hprofile2cmsprofile( HPROFILE profile );
|
|
|
|
extern icProfile *MSCMS_hprofile2iccprofile( HPROFILE profile );
|
2004-10-07 19:12:41 +00:00
|
|
|
|
2005-02-14 20:53:59 +00:00
|
|
|
extern HPROFILE MSCMS_create_hprofile_handle( HANDLE file, icProfile *iccprofile,
|
|
|
|
cmsHPROFILE cmsprofile, DWORD access );
|
2004-10-07 19:12:41 +00:00
|
|
|
extern void MSCMS_destroy_hprofile_handle( HPROFILE profile );
|
|
|
|
|
2005-02-21 18:38:15 +00:00
|
|
|
extern cmsHTRANSFORM MSCMS_htransform2cmstransform( HTRANSFORM transform );
|
|
|
|
extern HTRANSFORM MSCMS_create_htransform_handle( cmsHTRANSFORM cmstransform );
|
|
|
|
extern void MSCMS_destroy_htransform_handle( HTRANSFORM transform );
|
|
|
|
|
2007-05-28 17:11:29 +00:00
|
|
|
extern DWORD MSCMS_get_tag_count( const icProfile *iccprofile );
|
2004-12-07 14:42:47 +00:00
|
|
|
extern void MSCMS_get_tag_by_index( icProfile *iccprofile, DWORD index, icTag *tag );
|
2007-05-28 17:11:29 +00:00
|
|
|
extern void MSCMS_get_tag_data( const icProfile *iccprofile, const icTag *tag, DWORD offset, void *buffer );
|
|
|
|
extern void MSCMS_set_tag_data( icProfile *iccprofile, const icTag *tag, DWORD offset, const void *buffer );
|
|
|
|
extern void MSCMS_get_profile_header( const icProfile *iccprofile, PROFILEHEADER *header );
|
|
|
|
extern void MSCMS_set_profile_header( icProfile *iccprofile, const PROFILEHEADER *header );
|
|
|
|
extern DWORD MSCMS_get_profile_size( const icProfile *iccprofile );
|
2004-12-07 14:42:47 +00:00
|
|
|
|
2005-07-18 15:10:36 +00:00
|
|
|
#endif /* HAVE_LCMS */
|