include/mscvpdb.h: Use flexible array members for the rest of structures.
[wine.git] / dlls / mscms / mscms_priv.h
blobd5caa54b696bab20ec87c2fe4063b5f1fe203eb5
1 /*
2 * MSCMS - Color Management System for Wine
4 * Copyright 2004, 2005 Hans Leidekker
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 /* A simple structure to tie together a pointer to an icc profile, an lcms
22 * color profile handle and a Windows file handle. If the profile is memory
23 * based the file handle field is set to INVALID_HANDLE_VALUE. The 'access'
24 * field records the access parameter supplied to an OpenColorProfile()
25 * call, i.e. PROFILE_READ or PROFILE_READWRITE.
28 #include <lcms2.h>
30 enum object_type
32 OBJECT_TYPE_PROFILE,
33 OBJECT_TYPE_TRANSFORM,
36 struct object
38 enum object_type type;
39 LONG refs;
40 void (*close)( struct object * );
43 struct profile
45 struct object hdr;
46 HANDLE file;
47 DWORD access;
48 char *data;
49 DWORD size;
50 cmsHPROFILE cmsprofile;
53 struct transform
55 struct object hdr;
56 cmsHTRANSFORM cmstransform;
59 extern HANDLE alloc_handle( struct object *obj );
60 extern void free_handle( HANDLE );
62 struct object *grab_object( HANDLE, enum object_type );
63 void release_object( struct object * );
65 struct tag_entry
67 DWORD sig;
68 DWORD offset;
69 DWORD size;
72 extern DWORD get_tag_count( const struct profile * );
73 extern BOOL get_tag_entry( const struct profile *, DWORD, struct tag_entry * );
74 extern BOOL get_adjusted_tag( const struct profile *, TAGTYPE, struct tag_entry * );
75 extern BOOL get_tag_data( const struct profile *, TAGTYPE, DWORD, void *, DWORD *, BOOL * );
76 extern BOOL set_tag_data( const struct profile *, TAGTYPE, DWORD, const void *, DWORD * );
77 extern void get_profile_header( const struct profile *, PROFILEHEADER * );
78 extern void set_profile_header( const struct profile *, const PROFILEHEADER * );