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
|
|
|
*/
|
|
|
|
|
2008-03-24 20:33:06 +00:00
|
|
|
/* A simple structure to tie together a pointer to an icc profile, an lcms
|
|
|
|
* color profile handle and a Windows file handle. If the profile is memory
|
|
|
|
* based the file handle field is set to INVALID_HANDLE_VALUE. The 'access'
|
|
|
|
* field records the access parameter supplied to an OpenColorProfile()
|
|
|
|
* call, i.e. PROFILE_READ or PROFILE_READWRITE.
|
|
|
|
*/
|
|
|
|
|
2021-10-19 09:25:14 +00:00
|
|
|
#include <lcms2.h>
|
|
|
|
|
2022-06-16 15:23:40 +00:00
|
|
|
enum object_type
|
2008-03-24 20:33:06 +00:00
|
|
|
{
|
2022-06-16 15:23:40 +00:00
|
|
|
OBJECT_TYPE_PROFILE,
|
|
|
|
OBJECT_TYPE_TRANSFORM,
|
2008-03-24 20:33:06 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 15:23:40 +00:00
|
|
|
struct object
|
|
|
|
{
|
|
|
|
enum object_type type;
|
|
|
|
LONG refs;
|
|
|
|
void (*close)( struct object * );
|
|
|
|
};
|
2008-03-24 20:33:06 +00:00
|
|
|
|
2022-06-16 15:23:40 +00:00
|
|
|
struct profile
|
|
|
|
{
|
|
|
|
struct object hdr;
|
|
|
|
HANDLE file;
|
|
|
|
DWORD access;
|
|
|
|
char *data;
|
|
|
|
DWORD size;
|
|
|
|
cmsHPROFILE cmsprofile;
|
|
|
|
};
|
2008-03-24 20:33:06 +00:00
|
|
|
|
2022-06-16 15:23:40 +00:00
|
|
|
struct transform
|
|
|
|
{
|
|
|
|
struct object hdr;
|
|
|
|
cmsHTRANSFORM cmstransform;
|
|
|
|
};
|
2008-03-24 20:33:06 +00:00
|
|
|
|
2023-07-10 08:59:29 +00:00
|
|
|
extern HANDLE alloc_handle( struct object *obj );
|
|
|
|
extern void free_handle( HANDLE );
|
2008-03-24 20:33:06 +00:00
|
|
|
|
2023-07-10 08:59:29 +00:00
|
|
|
struct object *grab_object( HANDLE, enum object_type );
|
|
|
|
void release_object( struct object * );
|
2005-02-21 18:38:15 +00:00
|
|
|
|
2020-11-10 11:40:09 +00:00
|
|
|
struct tag_entry
|
|
|
|
{
|
|
|
|
DWORD sig;
|
|
|
|
DWORD offset;
|
|
|
|
DWORD size;
|
|
|
|
};
|
|
|
|
|
2023-07-10 08:59:29 +00:00
|
|
|
extern DWORD get_tag_count( const struct profile * );
|
|
|
|
extern BOOL get_tag_entry( const struct profile *, DWORD, struct tag_entry * );
|
|
|
|
extern BOOL get_adjusted_tag( const struct profile *, TAGTYPE, struct tag_entry * );
|
|
|
|
extern BOOL get_tag_data( const struct profile *, TAGTYPE, DWORD, void *, DWORD *, BOOL * );
|
|
|
|
extern BOOL set_tag_data( const struct profile *, TAGTYPE, DWORD, const void *, DWORD * );
|
|
|
|
extern void get_profile_header( const struct profile *, PROFILEHEADER * );
|
|
|
|
extern void set_profile_header( const struct profile *, const PROFILEHEADER * );
|
2004-12-07 14:42:47 +00:00
|
|
|
|
2023-07-10 08:59:29 +00:00
|
|
|
extern const char *dbgstr_tag(DWORD);
|