comparison dstep/applicationservices/colorsync/CMICCProfile.d @ 12:9f0b49a2f64e

Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
author Jacob Carlborg <doob@me.com>
date Mon, 03 Aug 2009 14:00:21 +0200
parents
children
comparison
equal deleted inserted replaced
11:07194b026fa4 12:9f0b49a2f64e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Aug 1, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.applicationservices.colorsync.CMICCProfile;
8
9 //import dstep.AvailabilityMacros;
10 import dstep.applicationservices.colorsync.CMBase;
11 import dstep.coreservices.CoreServices;
12 import dstep.objc.bridge.TypeEncoding;
13
14 alias ushort CMXYZComponent;
15 alias ubyte[16] CMProfileMD5;
16 alias CMProfileMD5* CMProfileMD5Ptr;
17 alias uint CMMatchOption;
18 alias uint CMMatchFlag;
19
20 // This is needed otherwise the enums will fail compiling with gdc
21 version (GNU)
22 {
23 private
24 {
25 const __cmMagicNumber = getOSType!("acsp");
26 const __cmAToB0Tag = getOSType!("A2B0");
27 const __cmAToB1Tag = getOSType!("A2B1");
28 const __cmAToB2Tag = getOSType!("A2B2");
29 const __cmBlueColorantTag = getOSType!("bXYZ");
30 const __cmBlueTRCTag = getOSType!("bTRC");
31 const __cmBToA0Tag = getOSType!("B2A0");
32 const __cmBToA1Tag = getOSType!("B2A1");
33 const __cmBToA2Tag = getOSType!("B2A2");
34 const __cmCalibrationDateTimeTag = getOSType!("calt");
35 const __cmChromaticAdaptationTag = getOSType!("chad");
36 const __cmCharTargetTag = getOSType!("targ");
37 const __cmCopyrightTag = getOSType!("cprt");
38 const __cmDeviceMfgDescTag = getOSType!("dmnd");
39 const __cmDeviceModelDescTag = getOSType!("dmdd");
40 const __cmGamutTag = getOSType!("gamt");
41 const __cmGrayTRCTag = getOSType!("kTRC");
42 const __cmGreenColorantTag = getOSType!("gXYZ");
43 const __cmGreenTRCTag = getOSType!("gTRC");
44 const __cmLuminanceTag = getOSType!("lumi");
45 const __cmMeasurementTag = getOSType!("meas");
46 const __cmMediaBlackPointTag = getOSType!("bkpt");
47 const __cmMediaWhitePointTag = getOSType!("wtpt");
48 const __cmNamedColorTag = getOSType!("ncol");
49 const __cmNamedColor2Tag = getOSType!("ncl2");
50 const __cmPreview0Tag = getOSType!("pre0");
51 const __cmPreview1Tag = getOSType!("pre1");
52 const __cmPreview2Tag = getOSType!("pre2");
53 const __cmProfileDescriptionTag = getOSType!("desc");
54 const __cmProfileSequenceDescTag = getOSType!("pseq");
55 const __cmPS2CRD0Tag = getOSType!("psd0");
56 const __cmPS2CRD1Tag = getOSType!("psd1");
57 const __cmPS2CRD2Tag = getOSType!("psd2");
58 const __cmPS2CRD3Tag = getOSType!("psd3");
59 const __cmPS2CSATag = getOSType!("ps2s");
60 const __cmPS2RenderingIntentTag = getOSType!("ps2i");
61 const __cmRedColorantTag = getOSType!("rXYZ");
62 const __cmRedTRCTag = getOSType!("rTRC");
63 const __cmScreeningDescTag = getOSType!("scrd");
64 const __cmScreeningTag = getOSType!("scrn");
65 const __cmTechnologyTag = getOSType!("tech");
66 const __cmUcrBgTag = getOSType!("bfd ");
67 const __cmViewingConditionsDescTag = getOSType!("vued");
68 const __cmViewingConditionsTag = getOSType!("view");
69 const __cmPS2CRDVMSizeTag = getOSType!("psvm");
70 const __cmVideoCardGammaTag = getOSType!("vcgt");
71 const __cmMakeAndModelTag = getOSType!("mmod");
72 const __cmProfileDescriptionMLTag = getOSType!("dscm");
73 const __cmNativeDisplayInfoTag = getOSType!("ndin");
74 const __cmSigCrdInfoType = getOSType!("crdi");
75 const __cmSigCurveType = getOSType!("curv");
76 const __cmSigDataType = getOSType!("data");
77 const __cmSigDateTimeType = getOSType!("dtim");
78 const __cmSigLut16Type = getOSType!("mft2");
79 const __cmSigLut8Type = getOSType!("mft1");
80 const __cmSigMeasurementType = getOSType!("meas");
81 const __cmSigMultiFunctA2BType = getOSType!("mAB ");
82 const __cmSigMultiFunctB2AType = getOSType!("mBA ");
83 const __cmSigNamedColorType = getOSType!("ncol");
84 const __cmSigNamedColor2Type = getOSType!("ncl2");
85 const __cmSigParametricCurveType = getOSType!("para");
86 const __cmSigProfileDescriptionType = getOSType!("desc");
87 const __cmSigProfileSequenceDescType = getOSType!("pseq");
88 const __cmSigScreeningType = getOSType!("scrn");
89 const __cmSigS15Fixed16Type = getOSType!("sf32");
90 const __cmSigSignatureType = getOSType!("sig ");
91 const __cmSigTextType = getOSType!("text");
92 const __cmSigU16Fixed16Type = getOSType!("uf32");
93 const __cmSigU1Fixed15Type = getOSType!("uf16");
94 const __cmSigUInt8Type = getOSType!("ui08");
95 const __cmSigUInt16Type = getOSType!("ui16");
96 const __cmSigUInt32Type = getOSType!("ui32");
97 const __cmSigUInt64Type = getOSType!("ui64");
98 const __cmSigUcrBgType = getOSType!("bfd ");
99 const __cmSigUnicodeTextType = getOSType!("utxt");
100 const __cmSigViewingConditionsType = getOSType!("view");
101 const __cmSigXYZType = getOSType!("XYZ ");
102 const __cmSigPS2CRDVMSizeType = getOSType!("psvm");
103 const __cmSigVideoCardGammaType = getOSType!("vcgt");
104 const __cmSigMakeAndModelType = getOSType!("mmod");
105 const __cmSigNativeDisplayInfoType = getOSType!("ndin");
106 const __cmSigMultiLocalizedUniCodeType = getOSType!("mluc");
107 const __cmTechnologyDigitalCamera = getOSType!("dcam");
108 const __cmTechnologyFilmScanner = getOSType!("fscn");
109 const __cmTechnologyReflectiveScanner = getOSType!("rscn");
110 const __cmTechnologyInkJetPrinter = getOSType!("ijet");
111 const __cmTechnologyThermalWaxPrinter = getOSType!("twax");
112 const __cmTechnologyElectrophotographicPrinter = getOSType!("epho");
113 const __cmTechnologyElectrostaticPrinter = getOSType!("esta");
114 const __cmTechnologyDyeSublimationPrinter = getOSType!("dsub");
115 const __cmTechnologyPhotographicPaperPrinter = getOSType!("rpho");
116 const __cmTechnologyFilmWriter = getOSType!("fprn");
117 const __cmTechnologyVideoMonitor = getOSType!("vidm");
118 const __cmTechnologyVideoCamera = getOSType!("vidc");
119 const __cmTechnologyProjectionTelevision = getOSType!("pjtv");
120 const __cmTechnologyCRTDisplay = getOSType!("CRT ");
121 const __cmTechnologyPMDisplay = getOSType!("PMD ");
122 const __cmTechnologyAMDisplay = getOSType!("AMD ");
123 const __cmTechnologyPhotoCD = getOSType!("KPCD");
124 const __cmTechnologyPhotoImageSetter = getOSType!("imgs");
125 const __cmTechnologyGravure = getOSType!("grav");
126 const __cmTechnologyOffsetLithography = getOSType!("offs");
127 const __cmTechnologySilkscreen = getOSType!("silk");
128 const __cmTechnologyFlexography = getOSType!("flex");
129 const __cmXYZData = getOSType!("XYZ ");
130 const __cmLabData = getOSType!("Lab ");
131 const __cmLuvData = getOSType!("Luv ");
132 const __cmYCbCrData = getOSType!("YCbr");
133 const __cmYxyData = getOSType!("Yxy ");
134 const __cmRGBData = getOSType!("RGB ");
135 const __cmSRGBData = getOSType!("sRGB");
136 const __cmGrayData = getOSType!("GRAY");
137 const __cmHSVData = getOSType!("HSV ");
138 const __cmHLSData = getOSType!("HLS ");
139 const __cmCMYKData = getOSType!("CMYK");
140 const __cmCMYData = getOSType!("CMY ");
141 const __cmMCH5Data = getOSType!("MCH5");
142 const __cmMCH6Data = getOSType!("MCH6");
143 const __cmMCH7Data = getOSType!("MCH7");
144 const __cmMCH8Data = getOSType!("MCH8");
145 const __cm3CLRData = getOSType!("3CLR");
146 const __cm4CLRData = getOSType!("4CLR");
147 const __cm5CLRData = getOSType!("5CLR");
148 const __cm6CLRData = getOSType!("6CLR");
149 const __cm7CLRData = getOSType!("7CLR");
150 const __cm8CLRData = getOSType!("8CLR");
151 const __cm9CLRData = getOSType!("9CLR");
152 const __cm10CLRData = getOSType!("ACLR");
153 const __cm11CLRData = getOSType!("BCLR");
154 const __cm12CLRData = getOSType!("CCLR");
155 const __cm13CLRData = getOSType!("DCLR");
156 const __cm14CLRData = getOSType!("ECLR");
157 const __cm15CLRData = getOSType!("FCLR");
158 const __cmNamedData = getOSType!("NAME");
159 const __cmInputClass = getOSType!("scnr");
160 const __cmDisplayClass = getOSType!("mntr");
161 const __cmOutputClass = getOSType!("prtr");
162 const __cmLinkClass = getOSType!("link");
163 const __cmAbstractClass = getOSType!("abst");
164 const __cmColorSpaceClass = getOSType!("spac");
165 const __cmNamedColorClass = getOSType!("nmcl");
166 const __cmMacintosh = getOSType!("APPL");
167 const __cmMicrosoft = getOSType!("MSFT");
168 const __cmSolaris = getOSType!("SUNW");
169 const __cmSiliconGraphics = getOSType!("SGI ");
170 const __cmTaligent = getOSType!("TGNT");
171 const __cmCS1ChromTag = getOSType!("chrm");
172 const __cmCS1TRCTag = getOSType!("trc ");
173 const __cmCS1NameTag = getOSType!("name");
174 const __cmCS1CustTag = getOSType!("cust");
175 }
176 }
177
178 enum
179 {
180 cmICCProfileVersion4 = 0x04000000,
181 cmICCProfileVersion2 = 0x02000000,
182 cmICCProfileVersion21 = 0x02100000,
183 cmCS2ProfileVersion = cmICCProfileVersion2,
184 cmCS1ProfileVersion = 0x00000100
185 }
186
187 enum
188 {
189 cmProfileMajorVersionMask = cast(int)0xFF000000,
190 cmCurrentProfileMajorVersion = 0x02000000
191 }
192
193 enum
194 {
195 cmMagicNumber = getOSType!("acsp")
196 }
197
198 enum
199 {
200 cmICCReservedFlagsMask = 0x0000FFFF,
201 cmEmbeddedMask = 0x00000001,
202 cmEmbeddedUseMask = 0x00000002,
203 cmBlackPointCompensationMask = 0x00000004,
204 cmCMSReservedFlagsMask = cast(int)0xFFFF0000,
205 cmQualityMask = 0x00030000,
206 cmInterpolationMask = 0x00040000,
207 cmGamutCheckingMask = 0x00080000
208 }
209
210 enum
211 {
212 cmEmbeddedProfile = 0,
213 cmEmbeddedUse = 1
214 }
215
216 enum
217 {
218 cmNormalMode = 0,
219 cmDraftMode = 1,
220 cmBestMode = 2
221 }
222
223 enum
224 {
225 cmBlackPointCompensation = 1
226 }
227
228 enum
229 {
230 cmReflectiveTransparentMask = 0x00000001,
231 cmGlossyMatteMask = 0x00000002
232 }
233
234 enum
235 {
236 cmReflective = 0,
237 cmGlossy = 1
238 }
239
240 enum
241 {
242 cmPerceptual = 0,
243 cmRelativeColorimetric = 1,
244 cmSaturation = 2,
245 cmAbsoluteColorimetric = 3
246 }
247
248 enum
249 {
250 cmAsciiData = 0,
251 cmBinaryData = 1
252 }
253
254 enum
255 {
256 cmPrtrDefaultScreens = 0,
257 cmLinesPer = 1
258 }
259
260 enum
261 {
262 cmNumHeaderElements = 10
263 }
264
265 enum
266 {
267 cmAToB0Tag = getOSType!("A2B0"),
268 cmAToB1Tag = getOSType!("A2B1"),
269 cmAToB2Tag = getOSType!("A2B2"),
270 cmBlueColorantTag = getOSType!("bXYZ"),
271 cmBlueTRCTag = getOSType!("bTRC"),
272 cmBToA0Tag = getOSType!("B2A0"),
273 cmBToA1Tag = getOSType!("B2A1"),
274 cmBToA2Tag = getOSType!("B2A2"),
275 cmCalibrationDateTimeTag = getOSType!("calt"),
276 cmChromaticAdaptationTag = getOSType!("chad"),
277 cmCharTargetTag = getOSType!("targ"),
278 cmCopyrightTag = getOSType!("cprt"),
279 cmDeviceMfgDescTag = getOSType!("dmnd"),
280 cmDeviceModelDescTag = getOSType!("dmdd"),
281 cmGamutTag = getOSType!("gamt"),
282 cmGrayTRCTag = getOSType!("kTRC"),
283 cmGreenColorantTag = getOSType!("gXYZ"),
284 cmGreenTRCTag = getOSType!("gTRC"),
285 cmLuminanceTag = getOSType!("lumi"),
286 cmMeasurementTag = getOSType!("meas"),
287 cmMediaBlackPointTag = getOSType!("bkpt"),
288 cmMediaWhitePointTag = getOSType!("wtpt"),
289 cmNamedColorTag = getOSType!("ncol"),
290 cmNamedColor2Tag = getOSType!("ncl2"),
291 cmPreview0Tag = getOSType!("pre0"),
292 cmPreview1Tag = getOSType!("pre1"),
293 cmPreview2Tag = getOSType!("pre2"),
294 cmProfileDescriptionTag = getOSType!("desc"),
295 cmProfileSequenceDescTag = getOSType!("pseq"),
296 cmPS2CRD0Tag = getOSType!("psd0"),
297 cmPS2CRD1Tag = getOSType!("psd1"),
298 cmPS2CRD2Tag = getOSType!("psd2"),
299 cmPS2CRD3Tag = getOSType!("psd3"),
300 cmPS2CSATag = getOSType!("ps2s"),
301 cmPS2RenderingIntentTag = getOSType!("ps2i"),
302 cmRedColorantTag = getOSType!("rXYZ"),
303 cmRedTRCTag = getOSType!("rTRC"),
304 cmScreeningDescTag = getOSType!("scrd"),
305 cmScreeningTag = getOSType!("scrn"),
306 cmTechnologyTag = getOSType!("tech"),
307 cmUcrBgTag = getOSType!("bfd "),
308 cmViewingConditionsDescTag = getOSType!("vued"),
309 cmViewingConditionsTag = getOSType!("view")
310 }
311
312 enum
313 {
314 cmPS2CRDVMSizeTag = getOSType!("psvm"),
315 cmVideoCardGammaTag = getOSType!("vcgt"),
316 cmMakeAndModelTag = getOSType!("mmod"),
317 cmProfileDescriptionMLTag = getOSType!("dscm"),
318 cmNativeDisplayInfoTag = getOSType!("ndin")
319 }
320
321 enum
322 {
323 cmSigCrdInfoType = getOSType!("crdi"),
324 cmSigCurveType = getOSType!("curv"),
325 cmSigDataType = getOSType!("data"),
326 cmSigDateTimeType = getOSType!("dtim"),
327 cmSigLut16Type = getOSType!("mft2"),
328 cmSigLut8Type = getOSType!("mft1"),
329 cmSigMeasurementType = getOSType!("meas"),
330 cmSigMultiFunctA2BType = getOSType!("mAB "),
331 cmSigMultiFunctB2AType = getOSType!("mBA "),
332 cmSigNamedColorType = getOSType!("ncol"),
333 cmSigNamedColor2Type = getOSType!("ncl2"),
334 cmSigParametricCurveType = getOSType!("para"),
335 cmSigProfileDescriptionType = getOSType!("desc"),
336 cmSigProfileSequenceDescType = getOSType!("pseq"),
337 cmSigScreeningType = getOSType!("scrn"),
338 cmSigS15Fixed16Type = getOSType!("sf32"),
339 cmSigSignatureType = getOSType!("sig "),
340 cmSigTextType = getOSType!("text"),
341 cmSigU16Fixed16Type = getOSType!("uf32"),
342 cmSigU1Fixed15Type = getOSType!("uf16"),
343 cmSigUInt8Type = getOSType!("ui08"),
344 cmSigUInt16Type = getOSType!("ui16"),
345 cmSigUInt32Type = getOSType!("ui32"),
346 cmSigUInt64Type = getOSType!("ui64"),
347 cmSigUcrBgType = getOSType!("bfd "),
348 cmSigUnicodeTextType = getOSType!("utxt"),
349 cmSigViewingConditionsType = getOSType!("view"),
350 cmSigXYZType = getOSType!("XYZ ")
351 }
352
353 enum
354 {
355 cmSigPS2CRDVMSizeType = getOSType!("psvm"),
356 cmSigVideoCardGammaType = getOSType!("vcgt"),
357 cmSigMakeAndModelType = getOSType!("mmod"),
358 cmSigNativeDisplayInfoType = getOSType!("ndin"),
359 cmSigMultiLocalizedUniCodeType = getOSType!("mluc")
360 }
361
362 enum
363 {
364 cmTechnologyDigitalCamera = getOSType!("dcam"),
365 cmTechnologyFilmScanner = getOSType!("fscn"),
366 cmTechnologyReflectiveScanner = getOSType!("rscn"),
367 cmTechnologyInkJetPrinter = getOSType!("ijet"),
368 cmTechnologyThermalWaxPrinter = getOSType!("twax"),
369 cmTechnologyElectrophotographicPrinter = getOSType!("epho"),
370 cmTechnologyElectrostaticPrinter = getOSType!("esta"),
371 cmTechnologyDyeSublimationPrinter = getOSType!("dsub"),
372 cmTechnologyPhotographicPaperPrinter = getOSType!("rpho"),
373 cmTechnologyFilmWriter = getOSType!("fprn"),
374 cmTechnologyVideoMonitor = getOSType!("vidm"),
375 cmTechnologyVideoCamera = getOSType!("vidc"),
376 cmTechnologyProjectionTelevision = getOSType!("pjtv"),
377 cmTechnologyCRTDisplay = getOSType!("CRT "),
378 cmTechnologyPMDisplay = getOSType!("PMD "),
379 cmTechnologyAMDisplay = getOSType!("AMD "),
380 cmTechnologyPhotoCD = getOSType!("KPCD"),
381 cmTechnologyPhotoImageSetter = getOSType!("imgs"),
382 cmTechnologyGravure = getOSType!("grav"),
383 cmTechnologyOffsetLithography = getOSType!("offs"),
384 cmTechnologySilkscreen = getOSType!("silk"),
385 cmTechnologyFlexography = getOSType!("flex")
386 }
387
388 enum
389 {
390 cmFlare0 = 0x00000000,
391 cmFlare100 = 0x00000001
392 }
393
394 enum
395 {
396 cmGeometryUnknown = 0x00000000,
397 cmGeometry045or450 = 0x00000001,
398 cmGeometry0dord0 = 0x00000002
399 }
400
401 enum
402 {
403 cmStdobsUnknown = 0x00000000,
404 cmStdobs1931TwoDegrees = 0x00000001,
405 cmStdobs1964TenDegrees = 0x00000002
406 }
407
408 enum
409 {
410 cmIlluminantUnknown = 0x00000000,
411 cmIlluminantD50 = 0x00000001,
412 cmIlluminantD65 = 0x00000002,
413 cmIlluminantD93 = 0x00000003,
414 cmIlluminantF2 = 0x00000004,
415 cmIlluminantD55 = 0x00000005,
416 cmIlluminantA = 0x00000006,
417 cmIlluminantEquiPower = 0x00000007,
418 cmIlluminantF8 = 0x00000008
419 }
420
421 enum
422 {
423 cmSpotFunctionUnknown = 0,
424 cmSpotFunctionDefault = 1,
425 cmSpotFunctionRound = 2,
426 cmSpotFunctionDiamond = 3,
427 cmSpotFunctionEllipse = 4,
428 cmSpotFunctionLine = 5,
429 cmSpotFunctionSquare = 6,
430 cmSpotFunctionCross = 7
431 }
432
433 enum
434 {
435 cmXYZData = getOSType!("XYZ "),
436 cmLabData = getOSType!("Lab "),
437 cmLuvData = getOSType!("Luv "),
438 cmYCbCrData = getOSType!("YCbr"),
439 cmYxyData = getOSType!("Yxy "),
440 cmRGBData = getOSType!("RGB "),
441 cmSRGBData = getOSType!("sRGB"),
442 cmGrayData = getOSType!("GRAY"),
443 cmHSVData = getOSType!("HSV "),
444 cmHLSData = getOSType!("HLS "),
445 cmCMYKData = getOSType!("CMYK"),
446 cmCMYData = getOSType!("CMY "),
447 cmMCH5Data = getOSType!("MCH5"),
448 cmMCH6Data = getOSType!("MCH6"),
449 cmMCH7Data = getOSType!("MCH7"),
450 cmMCH8Data = getOSType!("MCH8"),
451 cm3CLRData = getOSType!("3CLR"),
452 cm4CLRData = getOSType!("4CLR"),
453 cm5CLRData = getOSType!("5CLR"),
454 cm6CLRData = getOSType!("6CLR"),
455 cm7CLRData = getOSType!("7CLR"),
456 cm8CLRData = getOSType!("8CLR"),
457 cm9CLRData = getOSType!("9CLR"),
458 cm10CLRData = getOSType!("ACLR"),
459 cm11CLRData = getOSType!("BCLR"),
460 cm12CLRData = getOSType!("CCLR"),
461 cm13CLRData = getOSType!("DCLR"),
462 cm14CLRData = getOSType!("ECLR"),
463 cm15CLRData = getOSType!("FCLR"),
464 cmNamedData = getOSType!("NAME")
465 }
466
467 enum
468 {
469 cmInputClass = getOSType!("scnr"),
470 cmDisplayClass = getOSType!("mntr"),
471 cmOutputClass = getOSType!("prtr"),
472 cmLinkClass = getOSType!("link"),
473 cmAbstractClass = getOSType!("abst"),
474 cmColorSpaceClass = getOSType!("spac"),
475 cmNamedColorClass = getOSType!("nmcl")
476 }
477
478 enum
479 {
480 cmMacintosh = getOSType!("APPL"),
481 cmMicrosoft = getOSType!("MSFT"),
482 cmSolaris = getOSType!("SUNW"),
483 cmSiliconGraphics = getOSType!("SGI "),
484 cmTaligent = getOSType!("TGNT")
485 }
486
487 enum
488 {
489 cmParametricType0 = 0,
490 cmParametricType1 = 1,
491 cmParametricType2 = 2,
492 cmParametricType3 = 3,
493 cmParametricType4 = 4
494 }
495
496 enum
497 {
498 cmCS1ChromTag = getOSType!("chrm"),
499 cmCS1TRCTag = getOSType!("trc "),
500 cmCS1NameTag = getOSType!("name"),
501 cmCS1CustTag = getOSType!("cust")
502 }
503
504 enum
505 {
506 cmVideoCardGammaTableType = 0,
507 cmVideoCardGammaFormulaType = 1
508 }
509
510 struct CMDateTime
511 {
512 ushort year;
513 ushort month;
514 ushort dayOfTheMonth;
515 ushort hours;
516 ushort minutes;
517 ushort seconds;
518 }
519
520
521 struct CMFixedXYColor
522 {
523 int x;
524 int y;
525 }
526
527
528 struct CMFixedXYZColor
529 {
530 int X;
531 int Y;
532 int Z;
533 }
534
535
536 struct CMXYZColor
537 {
538 ushort X;
539 ushort Y;
540 ushort Z;
541 }
542
543 struct CMHeader
544 {
545 uint size;
546 OSType CMMType;
547 uint applProfileVersion;
548 OSType dataType;
549 OSType deviceType;
550 OSType deviceManufacturer;
551 uint deviceModel;
552 uint[2] deviceAttributes;
553 uint profileNameOffset;
554 uint customDataOffset;
555 CMMatchFlag flags;
556 CMMatchOption options;
557 CMXYZColor white;
558 CMXYZColor black;
559 }
560
561 struct CM2Header
562 {
563 uint size;
564 uint CMMType;
565 uint profileVersion;
566 uint profileClass;
567 uint dataColorSpace;
568 uint profileConnectionSpace;
569 CMDateTime dateTime;
570 uint CS2profileSignature;
571 uint platform;
572 uint flags;
573 uint deviceManufacturer;
574 uint deviceModel;
575 UInt32* deviceAttributes;
576 uint renderingIntent;
577 CMFixedXYZColor white;
578 uint creator;
579 char* reserved;
580 }
581
582
583 struct CM4Header
584 {
585 uint size;
586 uint CMMType;
587 uint profileVersion;
588 uint profileClass;
589 uint dataColorSpace;
590 uint profileConnectionSpace;
591 CMDateTime dateTime;
592 uint CS2profileSignature;
593 uint platform;
594 uint flags;
595 uint deviceManufacturer;
596 uint deviceModel;
597 UInt32* deviceAttributes;
598 uint renderingIntent;
599 CMFixedXYZColor white;
600 uint creator;
601 ubyte[16] digest;
602 char* reserved;
603 }
604
605
606 struct CMTagRecord
607 {
608 uint tag;
609 uint elementOffset;
610 uint elementSize;
611 }
612
613
614 struct CMTagElemTable
615 {
616 uint count;
617 CMTagRecord* tagList;
618 }
619
620
621 struct CM2Profile
622 {
623 CM2Header header;
624 CMTagElemTable tagTable;
625 char* elemData;
626 }
627
628
629 struct CMAdaptationMatrixType
630 {
631 uint typeDescriptor;
632 uint reserved;
633 Fixed* adaptationMatrix;
634 }
635
636
637 struct CMCurveType
638 {
639 uint typeDescriptor;
640 uint reserved;
641 uint countValue;
642 UInt16* data;
643 }
644
645
646 struct CMDataType
647 {
648 uint typeDescriptor;
649 uint reserved;
650 uint dataFlag;
651 char* data;
652 }
653
654
655 struct CMDateTimeType
656 {
657 uint typeDescriptor;
658 uint reserved;
659 CMDateTime dateTime;
660 }
661
662
663 struct CMLut16Type
664 {
665 uint typeDescriptor;
666 uint reserved;
667 ubyte inputChannels;
668 ubyte outputChannels;
669 ubyte gridPoints;
670 ubyte reserved2;
671 Fixed* matrix;
672 ushort inputTableEntries;
673 ushort outputTableEntries;
674 UInt16* inputTable;
675 }
676
677
678 struct CMLut8Type
679 {
680 uint typeDescriptor;
681 uint reserved;
682 ubyte inputChannels;
683 ubyte outputChannels;
684 ubyte gridPoints;
685 ubyte reserved2;
686 Fixed* matrix;
687 char* inputTable;
688 }
689
690
691 struct CMMultiFunctLutType
692 {
693 uint typeDescriptor;
694 uint reserved;
695 ubyte inputChannels;
696 ubyte outputChannels;
697 ushort reserved2;
698 uint offsetBcurves;
699 uint offsetMatrix;
700 uint offsetMcurves;
701 uint offsetCLUT;
702 uint offsetAcurves;
703 char* data;
704 }
705
706
707 struct CMMultiFunctCLUTType
708 {
709 char* gridPoints;
710 ubyte entrySize;
711 char* reserved;
712 char* data;
713 }
714
715
716 struct CMMeasurementType
717 {
718 uint typeDescriptor;
719 uint reserved;
720 uint standardObserver;
721 CMFixedXYZColor backingXYZ;
722 uint geometry;
723 uint flare;
724 uint illuminant;
725 }
726
727
728 struct CMNamedColorType
729 {
730 uint typeDescriptor;
731 uint reserved;
732 uint vendorFlag;
733 uint count;
734 char* prefixName;
735 }
736
737
738 struct CMNamedColor2EntryType
739 {
740 char* rootName;
741 UInt16* PCSColorCoords;
742 UInt16* DeviceColorCoords;
743 }
744
745
746 struct CMNamedColor2Type
747 {
748 uint typeDescriptor;
749 uint reserved;
750 uint vendorFlag;
751 uint count;
752 uint deviceChannelCount;
753 char* prefixName;
754 char* suffixName;
755 char* data;
756 }
757
758
759 struct CMNativeDisplayInfo
760 {
761 uint dataSize;
762 CMFixedXYColor redPhosphor;
763 CMFixedXYColor greenPhosphor;
764 CMFixedXYColor bluePhosphor;
765 CMFixedXYColor whitePoint;
766 int redGammaValue;
767 int greenGammaValue;
768 int blueGammaValue;
769 ushort gammaChannels;
770 ushort gammaEntryCount;
771 ushort gammaEntrySize;
772 char* gammaData;
773 }
774
775
776 struct CMNativeDisplayInfoType
777 {
778 uint typeDescriptor;
779 uint reserved;
780 CMNativeDisplayInfo nativeDisplayInfo;
781 }
782
783
784 struct CMParametricCurveType
785 {
786 uint typeDescriptor;
787 uint reserved;
788 ushort functionType;
789 ushort reserved2;
790 Fixed* value;
791 }
792
793
794 struct CMTextDescriptionType
795 {
796 uint typeDescriptor;
797 uint reserved;
798 uint ASCIICount;
799 char* ASCIIName;
800 }
801
802
803 struct CMTextType
804 {
805 uint typeDescriptor;
806 uint reserved;
807 char* text;
808 }
809
810
811 struct CMUnicodeTextType
812 {
813 uint typeDescriptor;
814 uint reserved;
815 wchar* text;
816 }
817
818
819 struct CMScreeningChannelRec
820 {
821 int frequency;
822 int angle;
823 uint spotFunction;
824 }
825
826
827 struct CMScreeningType
828 {
829 uint typeDescriptor;
830 uint reserved;
831 uint screeningFlag;
832 uint channelCount;
833 CMScreeningChannelRec* channelInfo;
834 }
835
836
837 struct CMSignatureType
838 {
839 uint typeDescriptor;
840 uint reserved;
841 uint signature;
842 }
843
844
845 struct CMS15Fixed16ArrayType
846 {
847 uint typeDescriptor;
848 uint reserved;
849 Fixed* value;
850 }
851
852
853 struct CMU16Fixed16ArrayType
854 {
855 uint typeDescriptor;
856 uint reserved;
857 UInt32* value;
858 }
859
860
861 struct CMUInt8ArrayType
862 {
863 uint typeDescriptor;
864 uint reserved;
865 char* value;
866 }
867
868
869 struct CMUInt16ArrayType
870 {
871 uint typeDescriptor;
872 uint reserved;
873 UInt16* value;
874 }
875
876
877 struct CMUInt32ArrayType
878 {
879 uint typeDescriptor;
880 uint reserved;
881 UInt32* value;
882 }
883
884
885 struct CMUInt64ArrayType
886 {
887 uint typeDescriptor;
888 uint reserved;
889 UInt32* value;
890 }
891
892
893 struct CMViewingConditionsType
894 {
895 uint typeDescriptor;
896 uint reserved;
897 CMFixedXYZColor illuminant;
898 CMFixedXYZColor surround;
899 uint stdIlluminant;
900 }
901
902
903 struct CMXYZType
904 {
905 uint typeDescriptor;
906 uint reserved;
907 CMFixedXYZColor* XYZ;
908 }
909
910
911 struct CMProfileSequenceDescType
912 {
913 uint typeDescriptor;
914 uint reserved;
915 uint count;
916 char* data;
917 }
918
919
920 struct CMUcrBgType
921 {
922 uint typeDescriptor;
923 uint reserved;
924 uint ucrCount;
925 UInt16* ucrValues;
926 }
927
928
929 struct CMIntentCRDVMSize
930 {
931 uint renderingIntent;
932 uint VMSize;
933 }
934
935
936 struct CMPS2CRDVMSizeType
937 {
938 uint typeDescriptor;
939 uint reserved;
940 uint count;
941 CMIntentCRDVMSize* intentCRD;
942 }
943
944
945 struct CMVideoCardGammaTable
946 {
947 ushort channels;
948 ushort entryCount;
949 ushort entrySize;
950 char* data;
951 }
952
953
954 struct CMVideoCardGammaFormula
955 {
956 int redGamma;
957 int redMin;
958 int redMax;
959 int greenGamma;
960 int greenMin;
961 int greenMax;
962 int blueGamma;
963 int blueMin;
964 int blueMax;
965 }
966
967
968 struct CMVideoCardGamma
969 {
970 uint tagType;
971
972 union
973 {
974 CMVideoCardGammaTable table;
975 CMVideoCardGammaFormula formula;
976 }
977 }
978
979 struct CMVideoCardGammaType
980 {
981 uint typeDescriptor;
982 UInt32 reserved;
983 CMVideoCardGamma gamma;
984 }
985
986
987 struct CMMakeAndModel
988 {
989 uint manufacturer;
990 uint model;
991 uint serialNumber;
992 uint manufactureDate;
993 uint reserved1;
994 uint reserved2;
995 uint reserved3;
996 UInt32 reserved4;
997 }
998
999
1000 struct CMMakeAndModelType
1001 {
1002 uint typeDescriptor;
1003 UInt32 reserved;
1004 CMMakeAndModel makeAndModel;
1005 }
1006
1007
1008 struct CMMultiLocalizedUniCodeEntryRec
1009 {
1010 char* languageCode;
1011 uint regionCode;
1012 uint textLength;
1013 UInt32 textOffset;
1014 }
1015
1016
1017 struct CMMultiLocalizedUniCodeType
1018 {
1019 uint typeDescriptor;
1020 uint reserved;
1021 uint entryCount;
1022 UInt32 entrySize;
1023 }
1024