xref: /reactos/dll/win32/mscms/mscms_priv.h (revision c2c66aff)
1*c2c66affSColin Finck /*
2*c2c66affSColin Finck  * MSCMS - Color Management System for Wine
3*c2c66affSColin Finck  *
4*c2c66affSColin Finck  * Copyright 2004, 2005 Hans Leidekker
5*c2c66affSColin Finck  *
6*c2c66affSColin Finck  * This library is free software; you can redistribute it and/or
7*c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
8*c2c66affSColin Finck  * License as published by the Free Software Foundation; either
9*c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
10*c2c66affSColin Finck  *
11*c2c66affSColin Finck  * This library is distributed in the hope that it will be useful,
12*c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*c2c66affSColin Finck  * Lesser General Public License for more details.
15*c2c66affSColin Finck  *
16*c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
17*c2c66affSColin Finck  * License along with this library; if not, write to the Free Software
18*c2c66affSColin Finck  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19*c2c66affSColin Finck  */
20*c2c66affSColin Finck 
21*c2c66affSColin Finck #ifdef HAVE_LCMS2
22*c2c66affSColin Finck #include <lcms2.h>
23*c2c66affSColin Finck 
24*c2c66affSColin Finck /*  A simple structure to tie together a pointer to an icc profile, an lcms
25*c2c66affSColin Finck  *  color profile handle and a Windows file handle. If the profile is memory
26*c2c66affSColin Finck  *  based the file handle field is set to INVALID_HANDLE_VALUE. The 'access'
27*c2c66affSColin Finck  *  field records the access parameter supplied to an OpenColorProfile()
28*c2c66affSColin Finck  *  call, i.e. PROFILE_READ or PROFILE_READWRITE.
29*c2c66affSColin Finck  */
30*c2c66affSColin Finck 
31*c2c66affSColin Finck struct profile
32*c2c66affSColin Finck {
33*c2c66affSColin Finck     HANDLE      file;
34*c2c66affSColin Finck     DWORD       access;
35*c2c66affSColin Finck     char       *data;
36*c2c66affSColin Finck     DWORD       size;
37*c2c66affSColin Finck     cmsHPROFILE cmsprofile;
38*c2c66affSColin Finck };
39*c2c66affSColin Finck 
40*c2c66affSColin Finck struct transform
41*c2c66affSColin Finck {
42*c2c66affSColin Finck     cmsHTRANSFORM cmstransform;
43*c2c66affSColin Finck };
44*c2c66affSColin Finck 
45*c2c66affSColin Finck extern HPROFILE create_profile( struct profile * ) DECLSPEC_HIDDEN;
46*c2c66affSColin Finck extern BOOL close_profile( HPROFILE ) DECLSPEC_HIDDEN;
47*c2c66affSColin Finck 
48*c2c66affSColin Finck extern HTRANSFORM create_transform( struct transform * ) DECLSPEC_HIDDEN;
49*c2c66affSColin Finck extern BOOL close_transform( HTRANSFORM ) DECLSPEC_HIDDEN;
50*c2c66affSColin Finck 
51*c2c66affSColin Finck struct profile *grab_profile( HPROFILE ) DECLSPEC_HIDDEN;
52*c2c66affSColin Finck struct transform *grab_transform( HTRANSFORM ) DECLSPEC_HIDDEN;
53*c2c66affSColin Finck 
54*c2c66affSColin Finck void release_profile( struct profile * ) DECLSPEC_HIDDEN;
55*c2c66affSColin Finck void release_transform( struct transform * ) DECLSPEC_HIDDEN;
56*c2c66affSColin Finck 
57*c2c66affSColin Finck extern void free_handle_tables( void ) DECLSPEC_HIDDEN;
58*c2c66affSColin Finck 
59*c2c66affSColin Finck extern BOOL get_tag_data( const struct profile *, TAGTYPE, DWORD, void *, DWORD * ) DECLSPEC_HIDDEN;
60*c2c66affSColin Finck extern BOOL set_tag_data( const struct profile *, TAGTYPE, DWORD, const void *, DWORD * ) DECLSPEC_HIDDEN;
61*c2c66affSColin Finck extern void get_profile_header( const struct profile *, PROFILEHEADER * ) DECLSPEC_HIDDEN;
62*c2c66affSColin Finck extern void set_profile_header( const struct profile *, const PROFILEHEADER * ) DECLSPEC_HIDDEN;
63*c2c66affSColin Finck 
64*c2c66affSColin Finck #endif /* HAVE_LCMS2 */
65*c2c66affSColin Finck 
66*c2c66affSColin Finck extern const char *dbgstr_tag(DWORD) DECLSPEC_HIDDEN;
67