1 { ColorSync- ColorSyncDeprecated.h
2 * Copyright (c) 2008 Apple Inc.
3 * All rights reserved.
4 }
5 { Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2007 }
6 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2009 }
7 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
8 {
9 Modified for use with Free Pascal
10 Version 308
11 Please report any bugs to <gpc@microbizz.nl>
12 }
13
14 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
15 {$mode macpas}
16 {$modeswitch cblocks}
17 {$packenum 1}
18 {$macro on}
19 {$inline on}
20 {$calling mwpascal}
21
22 unit ColorSyncDeprecated;
23 interface
24 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
25 {$setc GAP_INTERFACES_VERSION := $0308}
26
27 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
28 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
29 {$endc}
30
31 {$ifc defined CPUPOWERPC and defined CPUI386}
32 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
33 {$endc}
34 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
35 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
36 {$endc}
37
38 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
39 {$setc __ppc__ := 1}
40 {$elsec}
41 {$setc __ppc__ := 0}
42 {$endc}
43 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
44 {$setc __ppc64__ := 1}
45 {$elsec}
46 {$setc __ppc64__ := 0}
47 {$endc}
48 {$ifc not defined __i386__ and defined CPUI386}
49 {$setc __i386__ := 1}
50 {$elsec}
51 {$setc __i386__ := 0}
52 {$endc}
53 {$ifc not defined __x86_64__ and defined CPUX86_64}
54 {$setc __x86_64__ := 1}
55 {$elsec}
56 {$setc __x86_64__ := 0}
57 {$endc}
58 {$ifc not defined __arm__ and defined CPUARM}
59 {$setc __arm__ := 1}
60 {$elsec}
61 {$setc __arm__ := 0}
62 {$endc}
63 {$ifc not defined __arm64__ and defined CPUAARCH64}
64 {$setc __arm64__ := 1}
65 {$elsec}
66 {$setc __arm64__ := 0}
67 {$endc}
68
69 {$ifc defined cpu64}
70 {$setc __LP64__ := 1}
71 {$elsec}
72 {$setc __LP64__ := 0}
73 {$endc}
74
75
76 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
77 {$error Conflicting definitions for __ppc__ and __i386__}
78 {$endc}
79
80 {$ifc defined __ppc__ and __ppc__}
81 {$setc TARGET_CPU_PPC := TRUE}
82 {$setc TARGET_CPU_PPC64 := FALSE}
83 {$setc TARGET_CPU_X86 := FALSE}
84 {$setc TARGET_CPU_X86_64 := FALSE}
85 {$setc TARGET_CPU_ARM := FALSE}
86 {$setc TARGET_CPU_ARM64 := FALSE}
87 {$setc TARGET_OS_MAC := TRUE}
88 {$setc TARGET_OS_IPHONE := FALSE}
89 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
90 {$setc TARGET_OS_EMBEDDED := FALSE}
91 {$elifc defined __ppc64__ and __ppc64__}
92 {$setc TARGET_CPU_PPC := FALSE}
93 {$setc TARGET_CPU_PPC64 := TRUE}
94 {$setc TARGET_CPU_X86 := FALSE}
95 {$setc TARGET_CPU_X86_64 := FALSE}
96 {$setc TARGET_CPU_ARM := FALSE}
97 {$setc TARGET_CPU_ARM64 := FALSE}
98 {$setc TARGET_OS_MAC := TRUE}
99 {$setc TARGET_OS_IPHONE := FALSE}
100 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
101 {$setc TARGET_OS_EMBEDDED := FALSE}
102 {$elifc defined __i386__ and __i386__}
103 {$setc TARGET_CPU_PPC := FALSE}
104 {$setc TARGET_CPU_PPC64 := FALSE}
105 {$setc TARGET_CPU_X86 := TRUE}
106 {$setc TARGET_CPU_X86_64 := FALSE}
107 {$setc TARGET_CPU_ARM := FALSE}
108 {$setc TARGET_CPU_ARM64 := FALSE}
109 {$ifc defined iphonesim}
110 {$setc TARGET_OS_MAC := FALSE}
111 {$setc TARGET_OS_IPHONE := TRUE}
112 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
113 {$elsec}
114 {$setc TARGET_OS_MAC := TRUE}
115 {$setc TARGET_OS_IPHONE := FALSE}
116 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
117 {$endc}
118 {$setc TARGET_OS_EMBEDDED := FALSE}
119 {$elifc defined __x86_64__ and __x86_64__}
120 {$setc TARGET_CPU_PPC := FALSE}
121 {$setc TARGET_CPU_PPC64 := FALSE}
122 {$setc TARGET_CPU_X86 := FALSE}
123 {$setc TARGET_CPU_X86_64 := TRUE}
124 {$setc TARGET_CPU_ARM := FALSE}
125 {$setc TARGET_CPU_ARM64 := FALSE}
126 {$ifc defined iphonesim}
127 {$setc TARGET_OS_MAC := FALSE}
128 {$setc TARGET_OS_IPHONE := TRUE}
129 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
130 {$elsec}
131 {$setc TARGET_OS_MAC := TRUE}
132 {$setc TARGET_OS_IPHONE := FALSE}
133 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
134 {$endc}
135 {$setc TARGET_OS_EMBEDDED := FALSE}
136 {$elifc defined __arm__ and __arm__}
137 {$setc TARGET_CPU_PPC := FALSE}
138 {$setc TARGET_CPU_PPC64 := FALSE}
139 {$setc TARGET_CPU_X86 := FALSE}
140 {$setc TARGET_CPU_X86_64 := FALSE}
141 {$setc TARGET_CPU_ARM := TRUE}
142 {$setc TARGET_CPU_ARM64 := FALSE}
143 {$setc TARGET_OS_MAC := FALSE}
144 {$setc TARGET_OS_IPHONE := TRUE}
145 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
146 {$setc TARGET_OS_EMBEDDED := TRUE}
147 {$elifc defined __arm64__ and __arm64__}
148 {$setc TARGET_CPU_PPC := FALSE}
149 {$setc TARGET_CPU_PPC64 := FALSE}
150 {$setc TARGET_CPU_X86 := FALSE}
151 {$setc TARGET_CPU_X86_64 := FALSE}
152 {$setc TARGET_CPU_ARM := FALSE}
153 {$setc TARGET_CPU_ARM64 := TRUE}
154 {$ifc defined ios}
155 {$setc TARGET_OS_MAC := FALSE}
156 {$setc TARGET_OS_IPHONE := TRUE}
157 {$setc TARGET_OS_EMBEDDED := TRUE}
158 {$elsec}
159 {$setc TARGET_OS_MAC := TRUE}
160 {$setc TARGET_OS_IPHONE := FALSE}
161 {$setc TARGET_OS_EMBEDDED := FALSE}
162 {$endc}
163 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
164 {$elsec}
165 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
166 {$endc}
167
168 {$ifc defined __LP64__ and __LP64__ }
169 {$setc TARGET_CPU_64 := TRUE}
170 {$elsec}
171 {$setc TARGET_CPU_64 := FALSE}
172 {$endc}
173
174 {$ifc defined FPC_BIG_ENDIAN}
175 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
176 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
177 {$elifc defined FPC_LITTLE_ENDIAN}
178 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
179 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
180 {$elsec}
181 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
182 {$endc}
183 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
184 {$setc CALL_NOT_IN_CARBON := FALSE}
185 {$setc OLDROUTINENAMES := FALSE}
186 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
187 {$setc OPAQUE_UPP_TYPES := TRUE}
188 {$setc OTCARBONAPPLICATION := TRUE}
189 {$setc OTKERNEL := FALSE}
190 {$setc PM_USE_SESSION_APIS := TRUE}
191 {$setc TARGET_API_MAC_CARBON := TRUE}
192 {$setc TARGET_API_MAC_OS8 := FALSE}
193 {$setc TARGET_API_MAC_OSX := TRUE}
194 {$setc TARGET_CARBON := TRUE}
195 {$setc TARGET_CPU_68K := FALSE}
196 {$setc TARGET_CPU_MIPS := FALSE}
197 {$setc TARGET_CPU_SPARC := FALSE}
198 {$setc TARGET_OS_UNIX := FALSE}
199 {$setc TARGET_OS_WIN32 := FALSE}
200 {$setc TARGET_RT_MAC_68881 := FALSE}
201 {$setc TARGET_RT_MAC_CFM := FALSE}
202 {$setc TARGET_RT_MAC_MACHO := TRUE}
203 {$setc TYPED_FUNCTION_POINTERS := TRUE}
204 {$setc TYPE_BOOL := FALSE}
205 {$setc TYPE_EXTENDED := FALSE}
206 {$setc TYPE_LONGLONG := TRUE}
207 uses MacTypes,Files,QDCMCommon,CFBase,CFData,CFDictionary;
208 {$endc} {not MACOSALLINCLUDE}
209
210
211 {$ifc TARGET_OS_MAC}
212
213 //#pragma mark --- CMBase.h ---
214
215 //#pragma mark --- CMICCProfile.h ----
216
217 {$ALIGN MAC68K}
218
219 { ICC Profile version constants }
220 const
221 cmICCProfileVersion4 = $04000000;
222 cmICCProfileVersion2 = $02000000;
223 cmICCProfileVersion21 = $02100000;
224 cmCS2ProfileVersion = cmICCProfileVersion2;
225 cmCS1ProfileVersion = $00000100; { ColorSync 1.0 profile version }
226
227 { Current Major version number }
228 const
229 cmProfileMajorVersionMask = $FF000000;
230 cmCurrentProfileMajorVersion = $02000000;
231
232 { magic cookie number for anonymous file ID }
233 const
234 cmMagicNumber = FourCharCode('acsp');
235
236
237 {**********************************************************************}
238 {************** ColorSync 2.0 profile specification *******************}
239 {**********************************************************************}
240 {*** flags field ***}
241 const
242 cmICCReservedFlagsMask = $0000FFFF; { these bits of the flags field are defined and reserved by ICC }
243 cmEmbeddedMask = $00000001; { if bit 0 is 0 then not embedded profile, if 1 then embedded profile }
244 cmEmbeddedUseMask = $00000002; { if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only }
245 cmBlackPointCompensationMask = $00000004; { if bit 2 is 1 then CMM will enable Black Point Compensation if applicable}
246 cmCMSReservedFlagsMask = $FFFF0000; { these bits of the flags field are defined and reserved by CMS vendor }
247 cmQualityMask = $00030000; { if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best }
248 cmInterpolationMask = $00040000; { if bit 18 is 0 then interpolation, if 1 then lookup only }
249 cmGamutCheckingMask = $00080000; { if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info }
250
251 { copyright-protection flag options }
252 const
253 cmEmbeddedProfile = 0; { 0 is not embedded profile, 1 is embedded profile }
254 cmEmbeddedUse = 1; { 0 is to use anywhere, 1 is to use as embedded profile only }
255
256 { speed and quality flag options }
257 const
258 cmNormalMode = 0; { it uses the least significent two bits in the high word of flag }
259 cmDraftMode = 1; { it should be evaulated like this: right shift 16 bits first, mask off the }
260 cmBestMode = 2; { high 14 bits, and then compare with the enum to determine the option value }
261
262 { black point compensation flag option }
263 const
264 cmBlackPointCompensation = 1; { 0 do not apply Black Point Compensation, 1 apply }
265
266
267 {*** deviceAttributes fields ***}
268 { deviceAttributes[0] is defined by and reserved for device vendors }
269 { deviceAttributes[1] is defined by and reserved for ICC }
270 { The following bits of deviceAttributes[1] are currently defined }
271 const
272 cmReflectiveTransparentMask = $00000001; { if bit 0 is 0 then reflective media, if 1 then transparency media }
273 cmGlossyMatteMask = $00000002; { if bit 1 is 0 then glossy, if 1 then matte }
274
275 { device/media attributes element values }
276 const
277 cmReflective = 0; { if bit 0 is 0 then reflective media, if 1 then transparency media }
278 cmGlossy = 1; { if bit 1 is 0 then glossy, if 1 then matte }
279
280
281 {*** renderingIntent field ***}
282 const
283 cmPerceptual = 0; { Photographic images }
284 cmRelativeColorimetric = 1; { Logo Colors }
285 cmSaturation = 2; { Business graphics }
286 cmAbsoluteColorimetric = 3; { Logo Colors }
287
288
289 { data type element values }
290 const
291 cmAsciiData = 0;
292 cmBinaryData = 1;
293
294 { screen encodings }
295 const
296 cmPrtrDefaultScreens = 0; { Use printer default screens. 0 is false, 1 is ture }
297 cmLinesPer = 1; { 0 is LinesPerCm, 1 is LinesPerInch }
298
299 { 2.0 tag type information }
300 const
301 cmNumHeaderElements = 10;
302
303 { public tags }
304 const
305 cmAToB0Tag = FourCharCode('A2B0');
306 cmAToB1Tag = FourCharCode('A2B1');
307 cmAToB2Tag = FourCharCode('A2B2');
308 cmBlueColorantTag = FourCharCode('bXYZ');
309 cmBlueTRCTag = FourCharCode('bTRC');
310 cmBToA0Tag = FourCharCode('B2A0');
311 cmBToA1Tag = FourCharCode('B2A1');
312 cmBToA2Tag = FourCharCode('B2A2');
313 cmCalibrationDateTimeTag = FourCharCode('calt');
314 cmChromaticAdaptationTag = FourCharCode('chad');
315 cmCharTargetTag = FourCharCode('targ');
316 cmCopyrightTag = FourCharCode('cprt');
317 cmDeviceMfgDescTag = FourCharCode('dmnd');
318 cmDeviceModelDescTag = FourCharCode('dmdd');
319 cmGamutTag = FourCharCode('gamt');
320 cmGrayTRCTag = FourCharCode('kTRC');
321 cmGreenColorantTag = FourCharCode('gXYZ');
322 cmGreenTRCTag = FourCharCode('gTRC');
323 cmLuminanceTag = FourCharCode('lumi');
324 cmMeasurementTag = FourCharCode('meas');
325 cmMediaBlackPointTag = FourCharCode('bkpt');
326 cmMediaWhitePointTag = FourCharCode('wtpt');
327 cmNamedColorTag = FourCharCode('ncol');
328 cmNamedColor2Tag = FourCharCode('ncl2');
329 cmPreview0Tag = FourCharCode('pre0');
330 cmPreview1Tag = FourCharCode('pre1');
331 cmPreview2Tag = FourCharCode('pre2');
332 cmProfileDescriptionTag = FourCharCode('desc');
333 cmProfileSequenceDescTag = FourCharCode('pseq');
334 cmPS2CRD0Tag = FourCharCode('psd0');
335 cmPS2CRD1Tag = FourCharCode('psd1');
336 cmPS2CRD2Tag = FourCharCode('psd2');
337 cmPS2CRD3Tag = FourCharCode('psd3');
338 cmPS2CSATag = FourCharCode('ps2s');
339 cmPS2RenderingIntentTag = FourCharCode('ps2i');
340 cmRedColorantTag = FourCharCode('rXYZ');
341 cmRedTRCTag = FourCharCode('rTRC');
342 cmScreeningDescTag = FourCharCode('scrd');
343 cmScreeningTag = FourCharCode('scrn');
344 cmTechnologyTag = FourCharCode('tech');
345 cmUcrBgTag = FourCharCode('bfd ');
346 cmViewingConditionsDescTag = FourCharCode('vued');
347 cmViewingConditionsTag = FourCharCode('view');
348
349 { custom tags }
350 const
351 cmPS2CRDVMSizeTag = FourCharCode('psvm');
352 cmVideoCardGammaTag = FourCharCode('vcgt');
353 cmMakeAndModelTag = FourCharCode('mmod');
354 cmProfileDescriptionMLTag = FourCharCode('dscm');
355 cmNativeDisplayInfoTag = FourCharCode('ndin');
356
357 { public type signatures }
358 const
359 cmSigCrdInfoType = FourCharCode('crdi');
360 cmSigCurveType = FourCharCode('curv');
361 cmSigDataType = FourCharCode('data');
362 cmSigDateTimeType = FourCharCode('dtim');
363 cmSigLut16Type = FourCharCode('mft2');
364 cmSigLut8Type = FourCharCode('mft1');
365 cmSigMeasurementType = FourCharCode('meas');
366 cmSigMultiFunctA2BType = FourCharCode('mAB ');
367 cmSigMultiFunctB2AType = FourCharCode('mBA ');
368 cmSigNamedColorType = FourCharCode('ncol');
369 cmSigNamedColor2Type = FourCharCode('ncl2');
370 cmSigParametricCurveType = FourCharCode('para');
371 cmSigProfileDescriptionType = FourCharCode('desc');
372 cmSigProfileSequenceDescType = FourCharCode('pseq');
373 cmSigScreeningType = FourCharCode('scrn');
374 cmSigS15Fixed16Type = FourCharCode('sf32');
375 cmSigSignatureType = FourCharCode('sig ');
376 cmSigTextType = FourCharCode('text');
377 cmSigU16Fixed16Type = FourCharCode('uf32');
378 cmSigU1Fixed15Type = FourCharCode('uf16');
379 cmSigUInt8Type = FourCharCode('ui08');
380 cmSigUInt16Type = FourCharCode('ui16');
381 cmSigUInt32Type = FourCharCode('ui32');
382 cmSigUInt64Type = FourCharCode('ui64');
383 cmSigUcrBgType = FourCharCode('bfd ');
384 cmSigUnicodeTextType = FourCharCode('utxt');
385 cmSigViewingConditionsType = FourCharCode('view');
386 cmSigXYZType = FourCharCode('XYZ ');
387
388 { custom type signatures }
389 const
390 cmSigPS2CRDVMSizeType = FourCharCode('psvm');
391 cmSigVideoCardGammaType = FourCharCode('vcgt');
392 cmSigMakeAndModelType = FourCharCode('mmod');
393 cmSigNativeDisplayInfoType = FourCharCode('ndin');
394 cmSigMultiLocalizedUniCodeType = FourCharCode('mluc');
395
396
397 { technology tag descriptions }
398 const
399 cmTechnologyDigitalCamera = FourCharCode('dcam');
400 cmTechnologyFilmScanner = FourCharCode('fscn');
401 cmTechnologyReflectiveScanner = FourCharCode('rscn');
402 cmTechnologyInkJetPrinter = FourCharCode('ijet');
403 cmTechnologyThermalWaxPrinter = FourCharCode('twax');
404 cmTechnologyElectrophotographicPrinter = FourCharCode('epho');
405 cmTechnologyElectrostaticPrinter = FourCharCode('esta');
406 cmTechnologyDyeSublimationPrinter = FourCharCode('dsub');
407 cmTechnologyPhotographicPaperPrinter = FourCharCode('rpho');
408 cmTechnologyFilmWriter = FourCharCode('fprn');
409 cmTechnologyVideoMonitor = FourCharCode('vidm');
410 cmTechnologyVideoCamera = FourCharCode('vidc');
411 cmTechnologyProjectionTelevision = FourCharCode('pjtv');
412 cmTechnologyCRTDisplay = FourCharCode('CRT ');
413 cmTechnologyPMDisplay = FourCharCode('PMD ');
414 cmTechnologyAMDisplay = FourCharCode('AMD ');
415 cmTechnologyPhotoCD = FourCharCode('KPCD');
416 cmTechnologyPhotoImageSetter = FourCharCode('imgs');
417 cmTechnologyGravure = FourCharCode('grav');
418 cmTechnologyOffsetLithography = FourCharCode('offs');
419 cmTechnologySilkscreen = FourCharCode('silk');
420 cmTechnologyFlexography = FourCharCode('flex');
421
422
423 { Measurement type encodings }
424 { Measurement Flare }
425 const
426 cmFlare0 = $00000000;
427 cmFlare100 = $00000001;
428
429 { Measurement Geometry }
430 const
431 cmGeometryUnknown = $00000000;
432 cmGeometry045or450 = $00000001;
433 cmGeometry0dord0 = $00000002;
434
435 { Standard Observer }
436 const
437 cmStdobsUnknown = $00000000;
438 cmStdobs1931TwoDegrees = $00000001;
439 cmStdobs1964TenDegrees = $00000002;
440
441 { Standard Illuminant }
442 const
443 cmIlluminantUnknown = $00000000;
444 cmIlluminantD50 = $00000001;
445 cmIlluminantD65 = $00000002;
446 cmIlluminantD93 = $00000003;
447 cmIlluminantF2 = $00000004;
448 cmIlluminantD55 = $00000005;
449 cmIlluminantA = $00000006;
450 cmIlluminantEquiPower = $00000007;
451 cmIlluminantF8 = $00000008;
452
453 { Spot Function Value }
454 const
455 cmSpotFunctionUnknown = 0;
456 cmSpotFunctionDefault = 1;
457 cmSpotFunctionRound = 2;
458 cmSpotFunctionDiamond = 3;
459 cmSpotFunctionEllipse = 4;
460 cmSpotFunctionLine = 5;
461 cmSpotFunctionSquare = 6;
462 cmSpotFunctionCross = 7;
463
464 { Color Space Signatures }
465 const
466 cmXYZData = FourCharCode('XYZ ');
467 cmLabData = FourCharCode('Lab ');
468 cmLuvData = FourCharCode('Luv ');
469 cmYCbCrData = FourCharCode('YCbr');
470 cmYxyData = FourCharCode('Yxy ');
471 cmRGBData = FourCharCode('RGB ');
472 cmSRGBData = FourCharCode('sRGB');
473 cmGrayData = FourCharCode('GRAY');
474 cmHSVData = FourCharCode('HSV ');
475 cmHLSData = FourCharCode('HLS ');
476 cmCMYKData = FourCharCode('CMYK');
477 cmCMYData = FourCharCode('CMY ');
478 cmMCH5Data = FourCharCode('MCH5');
479 cmMCH6Data = FourCharCode('MCH6');
480 cmMCH7Data = FourCharCode('MCH7');
481 cmMCH8Data = FourCharCode('MCH8');
482 cm3CLRData = FourCharCode('3CLR');
483 cm4CLRData = FourCharCode('4CLR');
484 cm5CLRData = FourCharCode('5CLR');
485 cm6CLRData = FourCharCode('6CLR');
486 cm7CLRData = FourCharCode('7CLR');
487 cm8CLRData = FourCharCode('8CLR');
488 cm9CLRData = FourCharCode('9CLR');
489 cm10CLRData = FourCharCode('ACLR');
490 cm11CLRData = FourCharCode('BCLR');
491 cm12CLRData = FourCharCode('CCLR');
492 cm13CLRData = FourCharCode('DCLR');
493 cm14CLRData = FourCharCode('ECLR');
494 cm15CLRData = FourCharCode('FCLR');
495 cmNamedData = FourCharCode('NAME');
496
497 { profileClass enumerations }
498 const
499 cmInputClass = FourCharCode('scnr');
500 cmDisplayClass = FourCharCode('mntr');
501 cmOutputClass = FourCharCode('prtr');
502 cmLinkClass = FourCharCode('link');
503 cmAbstractClass = FourCharCode('abst');
504 cmColorSpaceClass = FourCharCode('spac');
505 cmNamedColorClass = FourCharCode('nmcl');
506
507 { platform enumerations }
508 const
509 cmMacintosh = FourCharCode('APPL');
510 cmMicrosoft = FourCharCode('MSFT');
511 cmSolaris = FourCharCode('SUNW');
512 cmSiliconGraphics = FourCharCode('SGI ');
513 cmTaligent = FourCharCode('TGNT');
514
515 { parametric curve type enumerations }
516 const
517 cmParametricType0 = 0; { Y = X^gamma }
518 cmParametricType1 = 1; { Y = (aX+b)^gamma [X>=-b/a], Y = 0 [X<-b/a] }
519 cmParametricType2 = 2; { Y = (aX+b)^gamma + c [X>=-b/a], Y = c [X<-b/a] }
520 cmParametricType3 = 3; { Y = (aX+b)^gamma [X>=d], Y = cX [X<d] }
521 cmParametricType4 = 4; { Y = (aX+b)^gamma + e [X>=d], Y = cX+f [X<d] }
522
523
524 { ColorSync 1.0 elements }
525 const
526 cmCS1ChromTag = FourCharCode('chrm');
527 cmCS1TRCTag = FourCharCode('trc ');
528 cmCS1NameTag = FourCharCode('name');
529 cmCS1CustTag = FourCharCode('cust');
530
531 { General element data types }
532 type
533 CMDateTimePtr = ^CMDateTime;
534 CMDateTime = record
535 year: UInt16;
536 month: UInt16;
537 dayOfTheMonth: UInt16;
538 hours: UInt16;
539 minutes: UInt16;
540 seconds: UInt16;
541 end;
542
543 type
544 CMFixedXYColorPtr = ^CMFixedXYColor;
545 CMFixedXYColor = record
546 x: Fixed;
547 y: Fixed;
548 end;
549
550 type
551 CMFixedXYZColorPtr = ^CMFixedXYZColor;
552 CMFixedXYZColor = record
553 X: Fixed;
554 Y: Fixed;
555 Z: Fixed;
556 end;
557
558 type
559 CMXYZComponent = UInt16;
560
561 type
562 CMXYZColorPtr = ^CMXYZColor;
563 CMXYZColor = record
564 X: CMXYZComponent;
565 Y: CMXYZComponent;
566 Z: CMXYZComponent;
567 end;
568
569 { Typedef for Profile MD5 message digest }
570 { Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm }
571
572 CMProfileMD5 = packed array[0..15] of UInt8;
573 CMProfileMD5Ptr = ^CMProfileMD5;
574
575 {
576 * CMProfileMD5AreEqual()
577 *
578 * Availability: available as macro/inline
579 }
580 // #define CMProfileMD5AreEqual(a, b) (\
581 // ((long*)a)[0]==((long*)b)[0] && ((long*)a)[1]==((long*)b)[1] && \
582 // ((long*)a)[2]==((long*)b)[2] && ((long*)a)[3]==((long*)b)[3])
583
584
585 type
586 CM2HeaderPtr = ^CM2Header;
587 CM2Header = record
588 size: UInt32; { This is the total size of the Profile }
589 CMMType: OSType; { CMM signature, Registered with CS2 consortium }
590 profileVersion: UInt32; { Version of CMProfile format }
591 profileClass: OSType; { input, display, output, devicelink, abstract, or color conversion profile type }
592 dataColorSpace: OSType; { color space of data }
593 profileConnectionSpace: OSType; { profile connection color space }
594 dateTime: CMDateTime; { date and time of profile creation }
595 CS2profileSignature: OSType; { 'acsp' constant ColorSync 2.0 file ID }
596 platform: OSType; { primary profile platform, Registered with CS2 consortium }
597 flags: UInt32; { profile flags }
598 deviceManufacturer: OSType; { Registered with ICC consortium }
599 deviceModel: UInt32; { Registered with ICC consortium }
600 deviceAttributes: array [0..1] of UInt32; { Attributes[0] is for device vendors, [1] is for ICC }
601 renderingIntent: UInt32; { preferred rendering intent of tagged object }
602 white: CMFixedXYZColor; { profile illuminant }
603 creator: OSType; { profile creator }
604 reserved: array [0..43] of SInt8; { reserved for future use }
605 end;
606
607 type
608 CM4HeaderPtr = ^CM4Header;
609 CM4Header = record
610 size: UInt32; { This is the total size of the Profile }
611 CMMType: OSType; { CMM signature, Registered with CS2 consortium }
612 profileVersion: UInt32; { Version of CMProfile format }
613 profileClass: OSType; { input, display, output, devicelink, abstract, or color conversion profile type }
614 dataColorSpace: OSType; { color space of data }
615 profileConnectionSpace: OSType; { profile connection color space }
616 dateTime: CMDateTime; { date and time of profile creation }
617 CS2profileSignature: OSType; { 'acsp' constant ColorSync 2.0 file ID }
618 platform: OSType; { primary profile platform, Registered with CS2 consortium }
619 flags: UInt32; { profile flags }
620 deviceManufacturer: OSType; { Registered with ICC consortium }
621 deviceModel: UInt32; { Registered with ICC consortium }
622 deviceAttributes: array [0..1] of UInt32; { Attributes[0] is for device vendors, [1] is for ICC }
623 renderingIntent: UInt32; { preferred rendering intent of tagged object }
624 white: CMFixedXYZColor; { profile illuminant }
625 creator: OSType; { profile creator }
626 digest: CMProfileMD5; { Profile message digest }
627 reserved: array [0..27] of SInt8; { reserved for future use }
628 end;
629
630 type
631 CMTagRecordPtr = ^CMTagRecord;
632 CMTagRecord = record
633 tag: OSType; { Registered with CS2 consortium }
634 elementOffset: UInt32; { Relative to start of CMProfile }
635 elementSize: UInt32;
636 end;
637
638 type
639 CMTagElemTablePtr = ^CMTagElemTable;
640 CMTagElemTable = record
641 count: UInt32;
642 tagList: array [0..0] of CMTagRecord; { variable size, determined by count }
643 end;
644
645 type
646 CM2ProfilePtr = ^CM2Profile;
647 CM2Profile = record
648 header: CM2Header;
649 tagTable: CMTagElemTable;
650 elemData: SInt8; { variable size data for tagged element storage }
651 end;
652
653 CM2ProfileHandle = ^CM2ProfilePtr;
654 { Tag Type Definitions }
655 type
656 CMAdaptationMatrixTypePtr = ^CMAdaptationMatrixType;
657 CMAdaptationMatrixType = record
658 typeDescriptor: OSType; { 'sf32' = cmSigS15Fixed16Type }
659 reserved: UInt32; { fill with 0x00 }
660 adaptationMatrix: array [0..8] of Fixed; { fixed size of nine matrix entries }
661 end;
662
663 CMCurveTypePtr = ^CMCurveType;
664 CMCurveType = record
665 typeDescriptor: OSType; { 'curv' = cmSigCurveType }
666 reserved: UInt32; { fill with 0x00 }
667 countValue: UInt32; { number of entries in table that follows }
668 data: array [0..0] of UInt16; { variable size, determined by countValue }
669 end;
670
671 type
672 CMDataTypePtr = ^CMDataType;
673 CMDataType = record
674 typeDescriptor: OSType; { 'data' = cmSigDataType}
675 reserved: UInt32; { fill with 0x00 }
676 dataFlag: UInt32; { 0 = ASCII, 1 = binary }
677 data: array [0..0] of char; { variable size, determined by tag element size }
678 end;
679
680 type
681 CMDateTimeTypePtr = ^CMDateTimeType;
682 CMDateTimeType = record
683 typeDescriptor: OSType; { 'dtim' = cmSigDateTimeType }
684 reserved: UInt32; { fill with 0x00 }
685 dateTime: CMDateTime; { }
686 end;
687
688 type
689 CMLut16TypePtr = ^CMLut16Type;
690 CMLut16Type = record
691 typeDescriptor: OSType; { 'mft2' = cmSigLut16Type }
692 reserved: UInt32; { fill with 0x00 }
693 inputChannels: UInt8; { Number of input channels }
694 outputChannels: UInt8; { Number of output channels }
695 gridPoints: UInt8; { Number of clutTable grid points }
696 reserved2: UInt8; { fill with 0x00 }
697 matrix: array [0..2,0..2] of Fixed; { }
698 inputTableEntries: UInt16; { Number of entries in 1-D input luts }
699 outputTableEntries: UInt16; { Number of entries in 1-D output luts }
700 inputTable: array [0..0] of UInt16; { variable size, determined by inputChannels*inputTableEntries }
701 end;
702
703 type
704 CMLut8TypePtr = ^CMLut8Type;
705 CMLut8Type = record
706 typeDescriptor: OSType; { 'mft1' = cmSigLut8Type }
707 reserved: UInt32; { fill with 0x00 }
708 inputChannels: UInt8; { Number of input channels }
709 outputChannels: UInt8; { Number of output channels }
710 gridPoints: UInt8; { Number of clutTable grid points }
711 reserved2: UInt8; { fill with 0x00 }
712 matrix: array [0..2,0..2] of Fixed; { }
713 inputTable: array [0..0] of UInt8; { variable size, determined by inputChannels*256 }
714 end;
715
716 type
717 CMMultiFunctLutTypePtr = ^CMMultiFunctLutType;
718 CMMultiFunctLutType = record
719 typeDescriptor: OSType; { 'mAB ' = cmSigMultiFunctA2BType or 'mBA ' = cmSigMultiFunctB2AType }
720 reserved: UInt32; { fill with 0x00 }
721 inputChannels: UInt8; { Number of input channels }
722 outputChannels: UInt8; { Number of output channels }
723 reserved2: UInt16; { fill with 0x00 }
724 offsetBcurves: UInt32; { offset to first "B" curve }
725 offsetMatrix: UInt32; { offset to 3x4 matrix }
726 offsetMcurves: UInt32; { offset to first "M" curve }
727 offsetCLUT: UInt32; { offset to multi-dimensional LUT of type CMMultiFunctCLUTType }
728 offsetAcurves: UInt32; { offset to first "A" curve }
729 data: array [0..0] of UInt8; { variable size }
730 end;
731
732 CMMultiFunctLutA2BType = CMMultiFunctLutType;
733 CMMultiFunctLutA2BTypePtr = ^CMMultiFunctLutA2BType;
734 CMMultiFunctLutB2AType = CMMultiFunctLutType;
735 CMMultiFunctLutB2ATypePtr = ^CMMultiFunctLutB2AType;
736
737 CMMultiFunctCLUTTypePtr = ^CMMultiFunctCLUTType;
738 CMMultiFunctCLUTType = record
739 gridPoints: packed array[0..15] of UInt8; { grigpoints for each input channel dimension (remaining are 0) }
740 entrySize: SInt8; { bytes per lut enrty (1 or 2) }
741 reserved: array[0..2] of SInt8; { fill with 0x00 }
742 data: SInt8; { variable size, determined by above }
743 pad: SInt8; { pad byte needed for correct record size. Critical to accessing CMMultiFunctLutType's variable sized data field contents. }
744 end;
745
746 type
747 CMMeasurementTypePtr = ^CMMeasurementType;
748 CMMeasurementType = record
749 typeDescriptor: OSType; { 'meas' = cmSigMeasurementType }
750 reserved: UInt32; { fill with 0x00 }
751 standardObserver: UInt32; { cmStdobsUnknown, cmStdobs1931TwoDegrees, cmStdobs1964TenDegrees }
752 backingXYZ: CMFixedXYZColor; { absolute XYZ values of backing }
753 geometry: UInt32; { cmGeometryUnknown, cmGeometry045or450 (0/45), cmGeometry0dord0 (0/d or d/0) }
754 flare: UInt32; { cmFlare0, cmFlare100 }
755 illuminant: UInt32; { cmIlluminantUnknown, cmIlluminantD50, ... }
756 end;
757
758 type
759 CMNamedColorTypePtr = ^CMNamedColorType;
760 CMNamedColorType = record
761 typeDescriptor: OSType; { 'ncol' = cmSigNamedColorType }
762 reserved: UInt32; { fill with 0x00 }
763 vendorFlag: UInt32; { }
764 count: UInt32; { count of named colors in array that follows }
765 prefixName: array [0..0] of UInt8; { variable size, max = 32 }
766 end;
767
768 type
769 CMNamedColor2EntryTypePtr = ^CMNamedColor2EntryType;
770 CMNamedColor2EntryType = record
771 rootName: packed array [0..31] of UInt8; { 32 byte field. 7 bit ASCII null terminated }
772 PCSColorCoords: array [0..2] of UInt16; { Lab or XYZ color }
773 DeviceColorCoords: array [0..0] of UInt16; { variable size }
774 end;
775
776 type
777 CMNamedColor2TypePtr = ^CMNamedColor2Type;
778 CMNamedColor2Type = record
779 typeDescriptor: OSType; { 'ncl2' = cmSigNamedColor2Type }
780 reserved: UInt32; { fill with 0x00 }
781 vendorFlag: UInt32; { lower 16 bits reserved for ICC use }
782 count: UInt32; { count of named colors in array that follows }
783 deviceChannelCount: UInt32; { number of device channels, 0 indicates no device value available }
784 prefixName: packed array [0..31] of UInt8; { Fixed 32 byte size. 7 bit ASCII null terminated }
785 suffixName: packed array [0..31] of UInt8; { Fixed 32 byte size. 7 bit ASCII null terminated }
786 data: SInt8; { variable size data for CMNamedColor2EntryType }
787 end;
788
789 type
790 CMNativeDisplayInfoPtr = ^CMNativeDisplayInfo;
791 CMNativeDisplayInfo = record
792 dataSize: UInt32; { Size of this structure }
793 redPhosphor: CMFixedXYColor; { Phosphors - native cromaticity values of the display }
794 greenPhosphor: CMFixedXYColor;
795 bluePhosphor: CMFixedXYColor;
796 whitePoint: CMFixedXYColor;
797 redGammaValue: Fixed; { Gammas - native gamma values of the display }
798 greenGammaValue: Fixed;
799 blueGammaValue: Fixed;
800 { Gamma tables - if if gammaChannels is not zero, }
801 { native gamma tables are preferred over values }
802 { redGammaValue, greenGammaValue, blueGammaValue }
803 gammaChannels: UInt16; { # of gamma channels (1 or 3) }
804 gammaEntryCount: UInt16; { 1-based number of entries per channel }
805 gammaEntrySize: UInt16; { size in bytes of each entry }
806 gammaData: array [0..0] of SInt8; { variable size, determined by channels*entryCount*entrySize }
807 end;
808
809 type
810 CMNativeDisplayInfoTypePtr = ^CMNativeDisplayInfoType;
811 CMNativeDisplayInfoType = record
812 typeDescriptor: OSType; { 'ndin' = cmSigNativeDisplayInfoType }
813 reserved: UInt32; { fill with 0x00 }
814 nativeDisplayInfo: CMNativeDisplayInfo; { data of type CMNativeDisplayInfo }
815 end;
816
817 type
818 CMParametricCurveTypePtr = ^CMParametricCurveType;
819 CMParametricCurveType = record
820 typeDescriptor: OSType; { 'para' = cmSigParametricCurveType }
821 reserved: UInt32; { fill with 0x00 }
822 functionType: UInt16; { cmParametricType0, cmParametricType1, etc. }
823 reserved2: UInt16; { fill with 0x00 }
824 value: array [0..0] of Fixed; { variable size, determined by functionType }
825 end;
826
827 type
828 CMTextDescriptionType = packed record
829 typeDescriptor: OSType; { 'desc' = cmSigProfileDescriptionType }
830 reserved: UInt32; { fill with 0x00 }
831 ASCIICount: UInt32; { Count of bytes (including null terminator) }
832 ASCIIName: packed array [0..1] of UInt8; { variable size, determined by ASCIICount. 7 bit ASCII null terminated }
833 end;
834
835 type
836 CMTextTypePtr = ^CMTextType;
837 CMTextType = record
838 typeDescriptor: OSType; { 'text' = cmSigTextType }
839 reserved: UInt32; { fill with 0x00 }
840 text: array [0..0] of UInt8; { variable size, determined by tag element size }
841 end;
842
843 type
844 CMUnicodeTextTypePtr = ^CMUnicodeTextType;
845 CMUnicodeTextType = record
846 typeDescriptor: OSType; { 'utxt' = cmSigUnicodeTextType }
847 reserved: UInt32; { fill with 0x00 }
848 text: array [0..0] of UniChar; { variable size, determined by tag element size }
849 end;
850
851 type
852 CMScreeningChannelRecPtr = ^CMScreeningChannelRec;
853 CMScreeningChannelRec = record
854 frequency: Fixed;
855 angle: Fixed;
UInt32null856 spotFunction: UInt32;
857 end;
858
859 type
860 CMScreeningTypePtr = ^CMScreeningType;
861 CMScreeningType = record
862 typeDescriptor: OSType; { 'scrn' = cmSigScreeningType }
863 reserved: UInt32; { fill with 0x00 }
864 screeningFlag: UInt32; { bit 0 : use printer default screens, bit 1 : inch/cm }
865 channelCount: UInt32; { }
866 channelInfo: array [0..0] of CMScreeningChannelRec; { variable size, determined by channelCount }
867 end;
868
869 type
870 CMSignatureTypePtr = ^CMSignatureType;
871 CMSignatureType = record
872 typeDescriptor: OSType; { 'sig ' = cmSigSignatureType }
873 reserved: UInt32; { fill with 0x00 }
874 signature: OSType;
875 end;
876
877 type
878 CMS15Fixed16ArrayTypePtr = ^CMS15Fixed16ArrayType;
879 CMS15Fixed16ArrayType = record
880 typeDescriptor: OSType; { 'sf32' = cmSigS15Fixed16Type }
881 reserved: UInt32; { fill with 0x00 }
882 value: array [0..0] of Fixed; { variable size, determined by tag element size }
883 end;
884
885 type
886 CMU16Fixed16ArrayTypePtr = ^CMU16Fixed16ArrayType;
887 CMU16Fixed16ArrayType = record
888 typeDescriptor: OSType; { 'uf32' = cmSigU16Fixed16Type }
889 reserved: UInt32; { fill with 0x00 }
890 value: array [0..0] of UInt32; { variable size, determined by tag element size }
891 end;
892
893 type
894 CMUInt8ArrayTypePtr = ^CMUInt8ArrayType;
895 CMUInt8ArrayType = record
896 typeDescriptor: OSType; { 'ui08' = cmSigUInt8Type }
897 reserved: UInt32; { fill with 0x00 }
898 value: array [0..0] of UInt8; { variable size, determined by tag element size }
899 end;
900
901 type
902 CMUInt16ArrayTypePtr = ^CMUInt16ArrayType;
903 CMUInt16ArrayType = record
904 typeDescriptor: OSType; { 'ui16' = cmSigUInt16Type }
905 reserved: UInt32; { fill with 0x00 }
906 value: array [0..0] of UInt16; { variable size, determined by tag element size }
907 end;
908
909 type
910 CMUInt32ArrayTypePtr = ^CMUInt32ArrayType;
911 CMUInt32ArrayType = record
912 typeDescriptor: OSType; { 'ui32' = cmSigUInt32Type }
913 reserved: UInt32; { fill with 0x00 }
914 value: array [0..0] of UInt32; { variable size, determined by tag element size }
915 end;
916
917 type
918 CMUInt64ArrayTypePtr = ^CMUInt64ArrayType;
919 CMUInt64ArrayType = record
920 typeDescriptor: OSType; { 'ui64' = cmSigUInt64Type }
921 reserved: UInt32; { fill with 0x00 }
922 value: array [0..0] of UInt32; { variable size, determined by tag element size }
923 end;
924
925 type
926 CMViewingConditionsTypePtr = ^CMViewingConditionsType;
927 CMViewingConditionsType = record
928 typeDescriptor: OSType; { 'view' = cmSigViewingConditionsType }
929 reserved: UInt32; { fill with 0x00 }
930 illuminant: CMFixedXYZColor; { absolute XYZs of illuminant in cd/m^2 }
931 surround: CMFixedXYZColor; { absolute XYZs of surround in cd/m^2 }
932 stdIlluminant: UInt32; { see definitions of std illuminants }
933 end;
934
935 type
936 CMXYZTypePtr = ^CMXYZType;
937 CMXYZType = record
938 typeDescriptor: OSType; { 'XYZ ' = cmSigXYZType }
939 reserved: UInt32; { fill with 0x00 }
940 XYZ: array [0..0] of CMFixedXYZColor; { variable size, determined by tag element size }
941 end;
942
943 type
944 CMProfileSequenceDescTypePtr = ^CMProfileSequenceDescType;
945 CMProfileSequenceDescType = record
946 typeDescriptor: OSType; { 'pseq' = cmProfileSequenceDescTag }
947 reserved: UInt32; { fill with 0x00 }
948 count: UInt32; { Number of descriptions }
949 data: array [0..0] of SInt8; { variable size data explained in ICC spec }
950 end;
951
952 type
953 CMUcrBgTypePtr = ^CMUcrBgType;
954 CMUcrBgType = record
955 typeDescriptor: OSType; { 'bfd ' = cmSigUcrBgType }
956 reserved: UInt32; { fill with 0x00 }
957 ucrCount: UInt32; { Number of UCR entries }
958 ucrValues: array [0..0] of UInt16; { variable size, determined by ucrCount }
959 end;
960
961 type
962 { Private Tag Type Definitions }
963 CMIntentCRDVMSizePtr = ^CMIntentCRDVMSize;
964 CMIntentCRDVMSize = record
965 renderingIntent: UInt32; { rendering intent }
966 VMSize: UInt32; { VM size taken up by the CRD }
967 end;
968
969 type
970 CMPS2CRDVMSizeTypePtr = ^CMPS2CRDVMSizeType;
971 CMPS2CRDVMSizeType = record
972 typeDescriptor: OSType; { 'psvm' = cmSigPS2CRDVMSizeType }
973 reserved: UInt32; { fill with 0x00 }
974 count: UInt32; { number of intent entries }
975 intentCRD: array [0..0] of CMIntentCRDVMSize; { variable size, determined by count }
976 end;
977
978
979 const
980 cmVideoCardGammaTableType = 0;
981 cmVideoCardGammaFormulaType = 1;
982
983 type
984 CMVideoCardGammaTablePtr = ^CMVideoCardGammaTable;
985 CMVideoCardGammaTable = record
986 channels: UInt16; { # of gamma channels (1 or 3) }
987 entryCount: UInt16; { 1-based number of entries per channel }
988 entrySize: UInt16; { size in bytes of each entry }
989 data: array [0..0] of SInt8; { variable size, determined by channels*entryCount*entrySize }
990 end;
991
992 type
993 CMVideoCardGammaFormulaPtr = ^CMVideoCardGammaFormula;
994 CMVideoCardGammaFormula = record
995 redGamma: Fixed; { must be > 0.0 }
996 redMin: Fixed; { must be > 0.0 and < 1.0 }
997 redMax: Fixed; { must be > 0.0 and < 1.0 }
998 greenGamma: Fixed; { must be > 0.0 }
999 greenMin: Fixed; { must be > 0.0 and < 1.0 }
1000 greenMax: Fixed; { must be > 0.0 and < 1.0 }
1001 blueGamma: Fixed; { must be > 0.0 }
1002 blueMin: Fixed; { must be > 0.0 and < 1.0 }
1003 blueMax: Fixed; { must be > 0.0 and < 1.0 }
1004 end;
1005
1006 type
1007 CMVideoCardGammaPtr = ^CMVideoCardGamma;
1008 CMVideoCardGamma = record
1009 tagType: UInt32;
1010 case SInt16 of
1011 0: (
1012 table: CMVideoCardGammaTable;
1013 );
1014 1: (
1015 formula: CMVideoCardGammaFormula;
1016 );
1017 end;
1018
1019 type
1020 CMVideoCardGammaTypePtr = ^CMVideoCardGammaType;
1021 CMVideoCardGammaType = record
1022 typeDescriptor: OSType; { 'vcgt' = cmSigVideoCardGammaType }
1023 reserved: UInt32; { fill with 0x00 }
1024 gamma: CMVideoCardGamma;
1025 end;
1026
1027 type
1028 CMMakeAndModelPtr = ^CMMakeAndModel;
1029 CMMakeAndModel = record
1030 manufacturer: OSType;
1031 model: UInt32;
1032 serialNumber: UInt32;
1033 manufactureDate: UInt32;
1034 reserved1: UInt32; { fill with 0x00 }
1035 reserved2: UInt32; { fill with 0x00 }
1036 reserved3: UInt32; { fill with 0x00 }
1037 reserved4: UInt32; { fill with 0x00 }
1038 end;
1039
1040 type
1041 CMMakeAndModelTypePtr = ^CMMakeAndModelType;
1042 CMMakeAndModelType = record
1043 typeDescriptor: OSType; { 'mmod' = cmSigMakeAndModelType }
1044 reserved: UInt32; { fill with 0x00 }
1045 makeAndModel: CMMakeAndModel;
1046 end;
1047
1048 type
1049 CMMultiLocalizedUniCodeEntryRecPtr = ^CMMultiLocalizedUniCodeEntryRec;
1050 CMMultiLocalizedUniCodeEntryRec = record
1051 languageCode: packed array [0..1] of char; { language code from ISO-639 }
1052 regionCode: packed array [0..1] of char; { region code from ISO-3166 }
1053 textLength: UInt32; { the length in bytes of the string }
1054 textOffset: UInt32; { the offset from the start of tag in bytes }
1055 end;
1056
1057 type
1058 CMMultiLocalizedUniCodeTypePtr = ^CMMultiLocalizedUniCodeType;
1059 CMMultiLocalizedUniCodeType = record
1060 typeDescriptor: OSType; { 'mluc' = cmSigMultiLocalizedUniCodeType }
1061 reserved: UInt32; { fill with 0x00 }
1062 entryCount: UInt32; { 1-based number of name records that follow }
1063 entrySize: UInt32; { size in bytes of name records that follow }
1064 { variable-length data for storage of CMMultiLocalizedUniCodeEntryRec }
1065 { variable-length data for storage of Unicode strings}
1066 end;
1067
1068 {$ifc not TARGET_CPU_64}
1069 {**********************************************************************}
1070 {************** ColorSync 1.0 profile specification *******************}
1071 {**********************************************************************}
1072 const
1073 cmGrayResponse = 0;
1074 cmRedResponse = 1;
1075 cmGreenResponse = 2;
1076 cmBlueResponse = 3;
1077 cmCyanResponse = 4;
1078 cmMagentaResponse = 5;
1079 cmYellowResponse = 6;
1080 cmUcrResponse = 7;
1081 cmBgResponse = 8;
1082 cmOnePlusLastResponse = 9;
1083
1084
1085 { Device types }
1086 const
1087 cmMonitorDevice = FourCharCode('mntr');
1088 cmScannerDevice = FourCharCode('scnr');
1089 cmPrinterDevice = FourCharCode('prtr');
1090
1091
1092 type
1093 CMIStringPtr = ^CMIString;
1094 CMIString = record
1095 theScript: ScriptCode;
1096 theString: Str63;
1097 end;
1098
1099 { Profile options }
1100 const
1101 cmPerceptualMatch = $0000; { Default. For photographic images }
1102 cmColorimetricMatch = $0001; { Exact matching when possible }
1103 cmSaturationMatch = $0002; { For solid colors }
1104
1105 { Profile flags }
1106 const
1107 cmNativeMatchingPreferred = $00000001; { Default to native not preferred }
1108 cmTurnOffCache = $00000002; { Default to turn on CMM cache }
1109
1110
1111 type
1112 CMMatchOption = SInt32;
1113 CMMatchFlag = SInt32;
1114 type
1115 CMHeaderPtr = ^CMHeader;
1116 CMHeader = record
1117 CMMType: OSType;
1118 applProfileVersion: UInt32;
1119 dataType: OSType;
1120 deviceType: OSType;
1121 deviceManufacturer: OSType;
1122 deviceModel: UInt32;
1123 deviceAttributes: array [0..1] of UInt32;
1124 profileNameOffset: UInt32;
1125 customDataOffset: UInt32;
1126 flags: CMMatchFlag;
1127 options: CMMatchOption;
1128 white: CMXYZColor;
1129 black: CMXYZColor;
1130 end;
1131
1132 type
1133 CMProfileChromaticitiesPtr = ^CMProfileChromaticities;
1134 CMProfileChromaticities = record
1135 red: CMXYZColor;
1136 green: CMXYZColor;
1137 blue: CMXYZColor;
1138 cyan: CMXYZColor;
1139 magenta: CMXYZColor;
1140 yellow: CMXYZColor;
1141 end;
1142
1143 type
1144 CMProfileResponsePtr = ^CMProfileResponse;
1145 CMProfileResponse = record
1146 counts: array [0..8] of UInt16;
1147 data: array [0..0] of UInt16; { Variable size }
1148 end;
1149
1150 type
1151 CMProfilePtr = ^CMProfile;
1152 CMProfile = record
1153 header: CMHeader;
1154 profile: CMProfileChromaticities;
1155 response: CMProfileResponse;
1156 profileName: CMIString;
1157 customData: array [0..0] of SInt8; { Variable size }
1158 end;
1159
1160 CMProfileHandle = ^CMProfilePtr;
1161
1162 {$endc} {not TARGET_CPU_64}
1163
1164 // #pragma mark --- CMTypes.h ----
1165
1166 type
1167 CMError = OSStatus;
1168 { Abstract data type for memory-based Profile }
1169 OpaqueCMProfileRef = record end;
1170 CMProfileRef = ^OpaqueCMProfileRef; { an opaque type }
1171 CMProfileRefPtr = ^CMProfileRef; { when a var xx:CMProfileRef parameter can be nil, it is changed to xx: CMProfileRefPtr }
1172
1173 {$ifc not TARGET_CPU_64}
1174 { Abstract data type for Profile search result }
1175 OpaqueCMProfileSearchRef = record end;
1176 CMProfileSearchRef = ^OpaqueCMProfileSearchRef; { an opaque type }
1177 CMProfileSearchRefPtr = ^CMProfileSearchRef; { when a var xx:CMProfileSearchRef parameter can be nil, it is changed to xx: CMProfileSearchRefPtr }
1178
1179 { Abstract data type for BeginMatching(�) reference }
1180 OpaqueCMMatchRef = record end;
1181 CMMatchRef = ^OpaqueCMMatchRef; { an opaque type }
1182 CMMatchRefPtr = ^CMMatchRef; { when a var xx:CMMatchRef parameter can be nil, it is changed to xx: CMMatchRefPtr }
1183 {$endc} {not TARGET_CPU_64}
1184
1185 { Abstract data type for ColorWorld reference }
1186 OpaqueCMWorldRef = record end;
1187 CMWorldRef = ^OpaqueCMWorldRef; { an opaque type }
1188 CMWorldRefPtr = ^CMWorldRef; { when a var xx:CMWorldRef parameter can be nil, it is changed to xx: CMWorldRefPtr }
1189
1190 { Data type for ColorSync DisplayID reference }
1191 { On 8 & 9 this is a AVIDType }
1192 { On X this is a CGSDisplayID }
1193 CMDisplayIDType = UInt32;
1194 CMChromaticAdaptation = UInt32;
1195 const
1196 cmLinearChromaticAdaptation = 1;
1197 cmVonKriesChromaticAdaptation = 2;
1198 cmBradfordChromaticAdaptation = 3;
1199
1200
1201 type
ommandnull1202 CMFlattenProcPtr = function(command: SInt32; var size: SIGNEDLONG; data: UnivPtr; refCon: UnivPtr): OSErr;
1203
1204 { Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines }
rogressnull1205 CMConcatCallBackProcPtr = function(progress: SInt32; refCon: UnivPtr): boolean;
1206
1207 { Caller-supplied filter function for Profile search }
rofnull1208 CMProfileFilterProcPtr = function(prof: CMProfileRef; refCon: UnivPtr): boolean;
1209
1210 { Caller-supplied function for profile access }
ommandnull1211 CMProfileAccessProcPtr = function(command: SInt32; offset: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr): OSErr;
1212
1213 CMFlattenUPP = CMFlattenProcPtr;
1214 CMConcatCallBackUPP = CMConcatCallBackProcPtr;
1215 CMProfileFilterUPP = CMProfileFilterProcPtr;
1216 CMProfileAccessUPP = CMProfileAccessProcPtr;
1217
1218 {
1219 * NewCMFlattenUPP()
1220 *
1221 * Availability:
1222 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1223 * CarbonLib: in CarbonLib 1.0 and later
1224 * Non-Carbon CFM: available as macro/inline
1225 }
NewCMFlattenUPPnull1226 function NewCMFlattenUPP(userRoutine: CMFlattenProcPtr): CMFlattenUPP; external name '_NewCMFlattenUPP';
1227 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1228
1229 {
1230 * NewCMConcatCallBackUPP()
1231 *
1232 * Availability:
1233 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1234 * CarbonLib: in CarbonLib 1.0 and later
1235 * Non-Carbon CFM: available as macro/inline
1236 }
NewCMConcatCallBackUPPnull1237 function NewCMConcatCallBackUPP(userRoutine: CMConcatCallBackProcPtr): CMConcatCallBackUPP; external name '_NewCMConcatCallBackUPP';
1238 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1239
1240 {
1241 * NewCMProfileFilterUPP()
1242 *
1243 * Availability:
1244 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1245 * CarbonLib: in CarbonLib 1.0 and later
1246 * Non-Carbon CFM: available as macro/inline
1247 }
NewCMProfileFilterUPPnull1248 function NewCMProfileFilterUPP(userRoutine: CMProfileFilterProcPtr): CMProfileFilterUPP; external name '_NewCMProfileFilterUPP';
1249 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1250
1251 {
1252 * NewCMProfileAccessUPP()
1253 *
1254 * Availability:
1255 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1256 * CarbonLib: in CarbonLib 1.0 and later
1257 * Non-Carbon CFM: available as macro/inline
1258 }
NewCMProfileAccessUPPnull1259 function NewCMProfileAccessUPP(userRoutine: CMProfileAccessProcPtr): CMProfileAccessUPP; external name '_NewCMProfileAccessUPP';
1260 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1261
1262 {
1263 * DisposeCMFlattenUPP()
1264 *
1265 * Availability:
1266 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1267 * CarbonLib: in CarbonLib 1.0 and later
1268 * Non-Carbon CFM: available as macro/inline
1269 }
1270 procedure DisposeCMFlattenUPP(userUPP: CMFlattenUPP); external name '_DisposeCMFlattenUPP';
1271 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1272
1273 {
1274 * DisposeCMConcatCallBackUPP()
1275 *
1276 * Availability:
1277 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1278 * CarbonLib: in CarbonLib 1.0 and later
1279 * Non-Carbon CFM: available as macro/inline
1280 }
1281 procedure DisposeCMConcatCallBackUPP(userUPP: CMConcatCallBackUPP); external name '_DisposeCMConcatCallBackUPP';
1282 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1283
1284 {
1285 * DisposeCMProfileFilterUPP()
1286 *
1287 * Availability:
1288 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1289 * CarbonLib: in CarbonLib 1.0 and later
1290 * Non-Carbon CFM: available as macro/inline
1291 }
1292 procedure DisposeCMProfileFilterUPP(userUPP: CMProfileFilterUPP); external name '_DisposeCMProfileFilterUPP';
1293 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1294
1295 {
1296 * DisposeCMProfileAccessUPP()
1297 *
1298 * Availability:
1299 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1300 * CarbonLib: in CarbonLib 1.0 and later
1301 * Non-Carbon CFM: available as macro/inline
1302 }
1303 procedure DisposeCMProfileAccessUPP(userUPP: CMProfileAccessUPP); external name '_DisposeCMProfileAccessUPP';
1304 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1305
1306 {
1307 * InvokeCMFlattenUPP()
1308 *
1309 * Availability:
1310 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1311 * CarbonLib: in CarbonLib 1.0 and later
1312 * Non-Carbon CFM: available as macro/inline
1313 }
InvokeCMFlattenUPPnull1314 function InvokeCMFlattenUPP(command: SInt32; var size: SIGNEDLONG; data: UnivPtr; refCon: UnivPtr; userRoutine: CMFlattenUPP): OSErr; external name '_InvokeCMFlattenUPP';
1315 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1316
1317 {
1318 * InvokeCMConcatCallBackUPP()
1319 *
1320 * Availability:
1321 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1322 * CarbonLib: in CarbonLib 1.0 and later
1323 * Non-Carbon CFM: available as macro/inline
1324 }
InvokeCMConcatCallBackUPPnull1325 function InvokeCMConcatCallBackUPP(progress: SInt32; refCon: UnivPtr; userRoutine: CMConcatCallBackUPP): boolean; external name '_InvokeCMConcatCallBackUPP';
1326 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1327
1328 {
1329 * InvokeCMProfileFilterUPP()
1330 *
1331 * Availability:
1332 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1333 * CarbonLib: in CarbonLib 1.0 and later
1334 * Non-Carbon CFM: available as macro/inline
1335 }
InvokeCMProfileFilterUPPnull1336 function InvokeCMProfileFilterUPP(prof: CMProfileRef; refCon: UnivPtr; userRoutine: CMProfileFilterUPP): boolean; external name '_InvokeCMProfileFilterUPP';
1337 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1338
1339 {
1340 * InvokeCMProfileAccessUPP()
1341 *
1342 * Availability:
1343 * Mac OS X: in version 10.0 and later in ApplicationServices.framework
1344 * CarbonLib: in CarbonLib 1.0 and later
1345 * Non-Carbon CFM: available as macro/inline
1346 }
InvokeCMProfileAccessUPPnull1347 function InvokeCMProfileAccessUPP(command: SInt32; offset: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr; userRoutine: CMProfileAccessUPP): OSErr; external name '_InvokeCMProfileAccessUPP';
1348 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1349
1350
1351 //#pragma mark --- CMApplication.h ----
1352
1353
1354 {$setc _DECLARE_CS_QD_API_ := 0} { Mac OS X ColorSync QuickDraw API are located in QuickDraw.p[.pas] }
1355
1356 {$ifc not TARGET_CPU_64}
1357 {$ALIGN MAC68K}
1358 {$elsec}
1359 {$packrecords c}
1360 {$endc}
1361
1362
1363 const
1364 kDefaultCMMSignature = FourCharCode('appl');
1365
1366 {$ifc not TARGET_CPU_64}
1367 { PicComment IDs }
1368 const
1369 cmBeginProfile = 220;
1370 cmEndProfile = 221;
1371 cmEnableMatching = 222;
1372 cmDisableMatching = 223;
1373 cmComment = 224;
1374
1375 { PicComment selectors for cmComment }
1376 const
1377 cmBeginProfileSel = 0;
1378 cmContinueProfileSel = 1;
1379 cmEndProfileSel = 2;
1380 cmProfileIdentifierSel = 3;
1381
1382 { Defines for version 1.0 CMProfileSearchRecord.fieldMask }
1383 const
1384 cmMatchCMMType = $00000001;
1385 cmMatchApplProfileVersion = $00000002;
1386 cmMatchDataType = $00000004;
1387 cmMatchDeviceType = $00000008;
1388 cmMatchDeviceManufacturer = $00000010;
1389 cmMatchDeviceModel = $00000020;
1390 cmMatchDeviceAttributes = $00000040;
1391 cmMatchFlags = $00000080;
1392 cmMatchOptions = $00000100;
1393 cmMatchWhite = $00000200;
1394 cmMatchBlack = $00000400;
1395
1396 { Defines for version 2.0 CMSearchRecord.searchMask }
1397 const
1398 cmMatchAnyProfile = $00000000;
1399 cmMatchProfileCMMType = $00000001;
1400 cmMatchProfileClass = $00000002;
1401 cmMatchDataColorSpace = $00000004;
1402 cmMatchProfileConnectionSpace = $00000008;
1403 cmMatchManufacturer = $00000010;
1404 cmMatchModel = $00000020;
1405 cmMatchAttributes = $00000040;
1406 cmMatchProfileFlags = $00000080;
1407
1408 {$endc} {not TARGET_CPU_64}
1409
1410 { Flags for PostScript-related functions }
1411 const
1412 cmPS7bit = 1;
1413 cmPS8bit = 2;
1414
1415 {$ifc not TARGET_CPU_64}
1416 { Flags for profile embedding functions }
1417 const
1418 cmEmbedWholeProfile = $00000000;
1419 cmEmbedProfileIdentifier = $00000001;
1420 {$endc} {not TARGET_CPU_64}
1421
1422 { Commands for CMFlattenUPP() }
1423 const
1424 cmOpenReadSpool = 1;
1425 cmOpenWriteSpool = 2;
1426 cmReadSpool = 3;
1427 cmWriteSpool = 4;
1428 cmCloseSpool = 5;
1429
1430 { Commands for CMAccessUPP() }
1431 const
1432 cmOpenReadAccess = 1;
1433 cmOpenWriteAccess = 2;
1434 cmReadAccess = 3;
1435 cmWriteAccess = 4;
1436 cmCloseAccess = 5;
1437 cmCreateNewAccess = 6;
1438 cmAbortWriteAccess = 7;
1439 cmBeginAccess = 8;
1440 cmEndAccess = 9;
1441
1442 { Use types for CMGet/SetDefaultProfileByUse() }
1443 const
1444 cmInputUse = FourCharCode('inpt');
1445 cmOutputUse = FourCharCode('outp');
1446 cmDisplayUse = FourCharCode('dply');
1447 cmProofUse = FourCharCode('pruf');
1448
1449
1450 { Union of 1.0 2.0, and 4.0 profile header variants }
1451 type
1452 CMAppleProfileHeaderPtr = ^CMAppleProfileHeader;
1453 CMAppleProfileHeader = record
1454 case SInt16 of
1455 {$ifc not TARGET_CPU_64}
1456 0: (
1457 cm1: CMHeader;
1458 );
1459 {$endc} {not TARGET_CPU_64}
1460 1: (
1461 cm2: CM2Header;
1462 );
1463 2: (
1464 cm4: CM4Header;
1465 );
1466 end;
1467
1468 { CWConcatColorWorld() definitions }
1469 type
1470 CMConcatProfileSetPtr = ^CMConcatProfileSet;
1471 CMConcatProfileSet = record
1472 keyIndex: UInt16; { Zero-based }
1473 count: UInt16; { Min 1 }
1474 profileSet: array [0..0] of CMProfileRef; { Variable. Ordered from Source -> Dest }
1475 end;
1476
1477 { NCWConcatColorWorld() definitions }
1478 type
1479 NCMConcatProfileSpecPtr = ^NCMConcatProfileSpec;
1480 NCMConcatProfileSpec = record
1481 renderingIntent: UInt32; { renderingIntent override }
1482 transformTag: UInt32; { transform enumerations defined below }
1483 profile: CMProfileRef; { profile }
1484 end;
1485
1486 type
1487 NCMConcatProfileSetPtr = ^NCMConcatProfileSet;
1488 NCMConcatProfileSet = record
1489 cmm: OSType; { e.g. 'KCMS', 'appl', ... uniquely ids the cmm, or 0000 }
1490 flags: UInt32; { specify quality, lookup only, no gamut checking ... }
1491 flagsMask: UInt32; { which bits of 'flags' to use to override profile }
1492 profileCount: UInt32; { how many ProfileSpecs in the following set }
1493 profileSpecs: array [0..0] of NCMConcatProfileSpec; { Variable. Ordered from Source -> Dest }
1494 end;
1495
1496 const
1497 kNoTransform = 0; { Not used }
1498 kUseAtoB = 1; { Use 'A2B*' tag from this profile or equivalent }
1499 kUseBtoA = 2; { Use 'B2A*' tag from this profile or equivalent }
1500 kUseBtoB = 3; { Use 'pre*' tag from this profile or equivalent }
1501 { For typical device profiles the following synonyms may be useful }
1502 kDeviceToPCS = kUseAtoB; { Device Dependent to Device Independent }
1503 kPCSToDevice = kUseBtoA; { Device Independent to Device Dependent }
1504 kPCSToPCS = kUseBtoB; { Independent, through device's gamut }
1505 kUseProfileIntent = -1; { For renderingIntent in NCMConcatProfileSpec }
1506
1507
1508 { ColorSync color data types }
1509 type
1510 CMRGBColorPtr = ^CMRGBColor;
1511 CMRGBColor = record
1512 red: UInt16; { 0..65535 }
1513 green: UInt16;
1514 blue: UInt16;
1515 end;
1516
1517 type
1518 CMCMYKColorPtr = ^CMCMYKColor;
1519 CMCMYKColor = record
1520 cyan: UInt16; { 0..65535 }
1521 magenta: UInt16;
1522 yellow: UInt16;
1523 black: UInt16;
1524 end;
1525
1526 type
1527 CMCMYColorPtr = ^CMCMYColor;
1528 CMCMYColor = record
1529 cyan: UInt16; { 0..65535 }
1530 magenta: UInt16;
1531 yellow: UInt16;
1532 end;
1533
1534 type
1535 CMHLSColorPtr = ^CMHLSColor;
1536 CMHLSColor = record
1537 hue: UInt16; { 0..65535. Fraction of circle. Red at 0 }
1538 lightness: UInt16; { 0..65535 }
1539 saturation: UInt16; { 0..65535 }
1540 end;
1541
1542 type
1543 CMHSVColorPtr = ^CMHSVColor;
1544 CMHSVColor = record
1545 hue: UInt16; { 0..65535. Fraction of circle. Red at 0 }
1546 saturation: UInt16; { 0..65535 }
1547 value: UInt16; { 0..65535 }
1548 end;
1549
1550 type
1551 CMLabColorPtr = ^CMLabColor;
1552 CMLabColor = record
1553 L: UInt16; { 0..65535 maps to 0..100 }
1554 a: UInt16; { 0..65535 maps to -128..127.996 }
1555 b: UInt16; { 0..65535 maps to -128..127.996 }
1556 end;
1557
1558 type
1559 CMLuvColorPtr = ^CMLuvColor;
1560 CMLuvColor = record
1561 L: UInt16; { 0..65535 maps to 0..100 }
1562 u: UInt16; { 0..65535 maps to -128..127.996 }
1563 v: UInt16; { 0..65535 maps to -128..127.996 }
1564 end;
1565
1566 type
1567 CMYxyColorPtr = ^CMYxyColor;
1568 CMYxyColor = record
1569 capY: UInt16; { 0..65535 maps to 0..1 }
1570 x: UInt16; { 0..65535 maps to 0..1 }
1571 y: UInt16; { 0..65535 maps to 0..1 }
1572 end;
1573
1574 type
1575 CMGrayColorPtr = ^CMGrayColor;
1576 CMGrayColor = record
1577 gray: UInt16; { 0..65535 }
1578 end;
1579
1580 type
1581 CMMultichannel5ColorPtr = ^CMMultichannel5Color;
1582 CMMultichannel5Color = record
1583 components: packed array [0..4] of UInt8; { 0..255 }
1584 pad: UInt8; {pad byte so record size equals Apple gcc struct size}
1585 end;
1586
1587 type
1588 CMMultichannel6ColorPtr = ^CMMultichannel6Color;
1589 CMMultichannel6Color = record
1590 components: packed array [0..5] of UInt8; { 0..255 }
1591 end;
1592
1593 type
1594 CMMultichannel7ColorPtr = ^CMMultichannel7Color;
1595 CMMultichannel7Color = record
1596 components: packed array [0..6] of UInt8; { 0..255 }
1597 pad: UInt8; {pad byte so record size equals Apple gcc struct size}
1598 end;
1599
1600 type
1601 CMMultichannel8ColorPtr = ^CMMultichannel8Color;
1602 CMMultichannel8Color = record
1603 components: packed array [0..7] of UInt8; { 0..255 }
1604 end;
1605
1606 type
1607 CMNamedColorPtr = ^CMNamedColor;
1608 CMNamedColor = record
1609 namedColorIndex: UInt32; { 0..a lot }
1610 end;
1611
1612 CMColorPtr = ^CMColor;
1613 CMColor = record
1614 case SInt16 of
1615 0: (
1616 rgb: CMRGBColor;
1617 );
1618 1: (
1619 hsv: CMHSVColor;
1620 );
1621 2: (
1622 hls: CMHLSColor;
1623 );
1624 3: (
1625 XYZ: CMXYZColor;
1626 );
1627 4: (
1628 Lab: CMLabColor;
1629 );
1630 5: (
1631 Luv: CMLuvColor;
1632 );
1633 6: (
1634 Yxy: CMYxyColor;
1635 );
1636 7: (
1637 cmyk: CMCMYKColor;
1638 );
1639 8: (
1640 cmy: CMCMYColor;
1641 );
1642 9: (
1643 gray: CMGrayColor;
1644 );
1645 10: (
1646 mc5: CMMultichannel5Color;
1647 );
1648 11: (
1649 mc6: CMMultichannel6Color;
1650 );
1651 12: (
1652 mc7: CMMultichannel7Color;
1653 );
1654 13: (
1655 mc8: CMMultichannel8Color;
1656 );
1657 14: (
1658 namedColor: CMNamedColor;
1659 );
1660 end;
1661
1662 {$ifc not TARGET_CPU_64}
1663 { GetIndexedProfile() search definition}
1664 type
1665 CMProfileSearchRecordPtr = ^CMProfileSearchRecord;
1666 CMProfileSearchRecord = record
1667 header: CMHeader;
1668 fieldMask: UInt32;
1669 reserved: array [0..1] of UInt32;
1670 end;
1671
1672 CMProfileSearchRecordHandle = ^CMProfileSearchRecordPtr;
1673
1674 type
1675 { CMNewProfileSearch() search definition }
1676 CMSearchRecordPtr = ^CMSearchRecord;
1677 CMSearchRecord = record
1678 CMMType: OSType;
1679 profileClass: OSType;
1680 dataColorSpace: OSType;
1681 profileConnectionSpace: OSType;
1682 deviceManufacturer: UInt32;
1683 deviceModel: UInt32;
1684 deviceAttributes: array [0..1] of UInt32;
1685 profileFlags: UInt32;
1686 searchMask: UInt32;
1687 filter: CMProfileFilterUPP;
1688 end;
1689 {$endc} {not TARGET_CPU_64}
1690
1691 { CMMIterateUPP() structure }
1692 type
1693 CMMInfoPtr = ^CMMInfo;
1694 CMMInfo = record
1695 dataSize: size_t; { Size of this structure - compatibility}
1696 CMMType: OSType; { Signature, e.g. 'appl', 'HDM ' or 'KCMS'}
1697 CMMMfr: OSType; { Vendor, e.g. 'appl'}
1698 CMMVersion: UInt32; { CMM version number}
1699 ASCIIName: packed array [0..31] of UInt8; { pascal string - name}
1700 ASCIIDesc: packed array [0..255] of UInt8; { pascal string - description or copyright}
1701 UniCodeNameCount: UniCharCount; { count of UniChars in following array}
1702 UniCodeName: array [0..31] of UniChar; { the name in UniCode chars}
1703 UniCodeDescCount: UniCharCount; { count of UniChars in following array}
1704 UniCodeDesc: array [0..255] of UniChar; { the description in UniCode chars}
1705 end;
1706
1707 { GetCWInfo() structures }
1708
1709 {$ifc not TARGET_CPU_64}
1710
1711 type
1712 CMMInfoRecordPtr = ^CMMInfoRecord;
1713 CMMInfoRecord = record
1714 CMMType: OSType;
1715 CMMVersion: SIGNEDLONG;
1716 end;
1717
1718 type
1719 CMCWInfoRecordPtr = ^CMCWInfoRecord;
1720 CMCWInfoRecord = record
1721 cmmCount: UInt32;
1722 cmmInfo: array [0..1] of CMMInfoRecord;
1723 end;
1724
1725 { profile identifier structures }
1726 type
1727 CMProfileIdentifierPtr = ^CMProfileIdentifier;
1728 CMProfileIdentifier = record
1729 profileHeader: CM2Header;
1730 calibrationDate: CMDateTime;
1731 ASCIIProfileDescriptionLen: UInt32;
1732 ASCIIProfileDescription: array [0..0] of char; { variable length }
1733 end;
1734 {$endc} {not TARGET_CPU_64}
1735
1736 { colorspace masks }
1737 const
1738 cmColorSpaceSpaceMask = $0000003F;
1739 cmColorSpacePremulAlphaMask = $00000040;
1740 cmColorSpaceAlphaMask = $00000080;
1741 cmColorSpaceSpaceAndAlphaMask = $000000FF;
1742 cmColorSpacePackingMask = $0000FF00;
1743 cmColorSpaceEncodingMask = $000F0000;
1744 cmColorSpaceReservedMask = $FFF00000;
1745
1746 { packing formats }
1747 const
1748 cmNoColorPacking = $0000;
1749 cmWord5ColorPacking = $0500;
1750 cmWord565ColorPacking = $0600;
1751 cmLong8ColorPacking = $0800;
1752 cmLong10ColorPacking = $0A00;
1753 cmAlphaFirstPacking = $1000;
1754 cmOneBitDirectPacking = $0B00;
1755 cmAlphaLastPacking = $0000;
1756 cm8_8ColorPacking = $2800;
1757 cm16_8ColorPacking = $2000;
1758 cm24_8ColorPacking = $2100;
1759 cm32_8ColorPacking = cmLong8ColorPacking;
1760 cm40_8ColorPacking = $2200;
1761 cm48_8ColorPacking = $2300;
1762 cm56_8ColorPacking = $2400;
1763 cm64_8ColorPacking = $2500;
1764 cm32_16ColorPacking = $2600;
1765 cm48_16ColorPacking = $2900;
1766 cm64_16ColorPacking = $2A00;
1767 cm32_32ColorPacking = $2700;
1768 cmLittleEndianPacking = $4000;
1769 cmReverseChannelPacking = $8000;
1770
1771 { channel encoding format }
1772 const
1773 cmSRGB16ChannelEncoding = $00010000; { used for sRGB64 encoding ( �3.12 format)}
1774
1775 { general colorspaces }
1776 const
1777 cmNoSpace = $0000;
1778 cmRGBSpace = $0001;
1779 cmCMYKSpace = $0002;
1780 cmHSVSpace = $0003;
1781 cmHLSSpace = $0004;
1782 cmYXYSpace = $0005;
1783 cmXYZSpace = $0006;
1784 cmLUVSpace = $0007;
1785 cmLABSpace = $0008;
1786 cmReservedSpace1 = $0009;
1787 cmGraySpace = $000A;
1788 cmReservedSpace2 = $000B;
1789 cmGamutResultSpace = $000C;
1790 cmNamedIndexedSpace = $0010;
1791 cmMCFiveSpace = $0011;
1792 cmMCSixSpace = $0012;
1793 cmMCSevenSpace = $0013;
1794 cmMCEightSpace = $0014;
1795 cmAlphaPmulSpace = $0040;
1796 cmAlphaSpace = $0080;
1797 cmRGBASpace = cmRGBSpace + cmAlphaSpace;
1798 cmGrayASpace = cmGraySpace + cmAlphaSpace;
1799 cmRGBAPmulSpace = cmRGBASpace + cmAlphaPmulSpace;
1800 cmGrayAPmulSpace = cmGrayASpace + cmAlphaPmulSpace;
1801
1802 { supported CMBitmapColorSpaces - Each of the following is a }
1803 { combination of a general colospace and a packing formats. }
1804 { Each can also be or'd with cmReverseChannelPacking. }
1805 const
1806 cmGray8Space = cmGraySpace + cm8_8ColorPacking;
1807 cmGray16Space = cmGraySpace;
1808 cmGray16LSpace = cmGraySpace + cmLittleEndianPacking;
1809 cmGrayA16Space = cmGrayASpace + cm16_8ColorPacking;
1810 cmGrayA32Space = cmGrayASpace;
1811 cmGrayA32LSpace = cmGrayASpace + cmLittleEndianPacking;
1812 cmGrayA16PmulSpace = cmGrayAPmulSpace + cm16_8ColorPacking;
1813 cmGrayA32PmulSpace = cmGrayAPmulSpace;
1814 cmGrayA32LPmulSpace = cmGrayAPmulSpace + cmLittleEndianPacking;
1815 cmRGB16Space = cmRGBSpace + cmWord5ColorPacking;
1816 cmRGB16LSpace = cmRGBSpace + cmWord5ColorPacking + cmLittleEndianPacking;
1817 cmRGB565Space = cmRGBSpace + cmWord565ColorPacking;
1818 cmRGB565LSpace = cmRGBSpace + cmWord565ColorPacking + cmLittleEndianPacking;
1819 cmRGB24Space = cmRGBSpace + cm24_8ColorPacking;
1820 cmRGB32Space = cmRGBSpace + cm32_8ColorPacking;
1821 cmRGB48Space = cmRGBSpace + cm48_16ColorPacking;
1822 cmRGB48LSpace = cmRGBSpace + cm48_16ColorPacking + cmLittleEndianPacking;
1823 cmARGB32Space = cmRGBASpace + cm32_8ColorPacking + cmAlphaFirstPacking;
1824 cmARGB64Space = cmRGBASpace + cm64_16ColorPacking + cmAlphaFirstPacking;
1825 cmARGB64LSpace = cmRGBASpace + cm64_16ColorPacking + cmAlphaFirstPacking + cmLittleEndianPacking;
1826 cmRGBA32Space = cmRGBASpace + cm32_8ColorPacking + cmAlphaLastPacking;
1827 cmRGBA64Space = cmRGBASpace + cm64_16ColorPacking + cmAlphaLastPacking;
1828 cmRGBA64LSpace = cmRGBASpace + cm64_16ColorPacking + cmAlphaLastPacking + cmLittleEndianPacking;
1829 cmARGB32PmulSpace = cmRGBAPmulSpace + cm32_8ColorPacking + cmAlphaFirstPacking;
1830 cmARGB64PmulSpace = cmRGBAPmulSpace + cm64_16ColorPacking + cmAlphaFirstPacking;
1831 cmARGB64LPmulSpace = cmRGBAPmulSpace + cm64_16ColorPacking + cmAlphaFirstPacking + cmLittleEndianPacking;
1832 cmRGBA32PmulSpace = cmRGBAPmulSpace + cm32_8ColorPacking + cmAlphaLastPacking;
1833 cmRGBA64PmulSpace = cmRGBAPmulSpace + cm64_16ColorPacking + cmAlphaLastPacking;
1834 cmRGBA64LPmulSpace = cmRGBAPmulSpace + cm64_16ColorPacking + cmAlphaLastPacking + cmLittleEndianPacking;
1835 cmCMYK32Space = cmCMYKSpace + cm32_8ColorPacking;
1836 cmCMYK64Space = cmCMYKSpace + cm64_16ColorPacking;
1837 cmCMYK64LSpace = cmCMYKSpace + cm64_16ColorPacking + cmLittleEndianPacking;
1838 cmHSV32Space = cmHSVSpace + cmLong10ColorPacking;
1839 cmHLS32Space = cmHLSSpace + cmLong10ColorPacking;
1840 cmYXY32Space = cmYXYSpace + cmLong10ColorPacking;
1841 cmXYZ24Space = cmXYZSpace + cm24_8ColorPacking;
1842 cmXYZ32Space = cmXYZSpace + cmLong10ColorPacking;
1843 cmXYZ48Space = cmXYZSpace + cm48_16ColorPacking;
1844 cmXYZ48LSpace = cmXYZSpace + cm48_16ColorPacking + cmLittleEndianPacking;
1845 cmLUV32Space = cmLUVSpace + cmLong10ColorPacking;
1846 cmLAB24Space = cmLABSpace + cm24_8ColorPacking;
1847 cmLAB32Space = cmLABSpace + cmLong10ColorPacking;
1848 cmLAB48Space = cmLABSpace + cm48_16ColorPacking;
1849 cmLAB48LSpace = cmLABSpace + cm48_16ColorPacking + cmLittleEndianPacking;
1850 cmGamutResult1Space = cmOneBitDirectPacking + cmGamutResultSpace;
1851 cmNamedIndexed32Space = cm32_32ColorPacking + cmNamedIndexedSpace;
1852 cmNamedIndexed32LSpace = cm32_32ColorPacking + cmNamedIndexedSpace + cmLittleEndianPacking;
1853 cmMCFive8Space = cm40_8ColorPacking + cmMCFiveSpace;
1854 cmMCSix8Space = cm48_8ColorPacking + cmMCSixSpace;
1855 cmMCSeven8Space = cm56_8ColorPacking + cmMCSevenSpace;
1856 cmMCEight8Space = cm64_8ColorPacking + cmMCEightSpace;
1857
1858
1859 type
1860 CMBitmapColorSpace = UInt32;
1861
1862 type
1863 CMBitmapPtr = ^CMBitmap;
1864 CMBitmap = record
1865 image: CStringPtr;
1866 width: size_t;
1867 height: size_t;
1868 rowBytes: size_t;
1869 pixelSize: size_t;
1870 space: CMBitmapColorSpace;
1871 user1: UInt32;
1872 user2: UInt32;
1873 end;
1874
1875
1876 { Profile Locations }
1877
1878 const
1879 {$ifc not TARGET_CPU_64}
1880 CS_MAX_PATH = 256;
1881 {$elsec}
1882 CS_MAX_PATH = 1024;
1883 {$endc} {not TARGET_CPU_64}
1884
1885
1886 const
1887 cmNoProfileBase = 0;
1888 {$ifc not TARGET_CPU_64}
1889 cmFileBasedProfile = 1;
1890 cmHandleBasedProfile = 2;
1891 cmPtrBasedProfile = 3;
1892 cmProcedureBasedProfile = 4;
1893 {$endc} {not TARGET_CPU_64}
1894 cmPathBasedProfile = 5;
1895 cmBufferBasedProfile = 6;
1896
1897
1898 {$ifc not TARGET_CPU_64}
1899 { This structure is deprecated in Mac OS X 10.5. Use CMPathLocation instead.}
1900 type
1901 CMFileLocationPtr = ^CMFileLocation;
1902 CMFileLocation = record
1903 spec: FSSpec;
1904 end;
1905 {$endc} {not TARGET_CPU_64}
1906
1907 type
1908 CMHandleLocationPtr = ^CMHandleLocation;
1909 CMHandleLocation = record
1910 h: Handle;
1911 end;
1912
1913 {$ifc not TARGET_CPU_64}
1914 { This structure is deprecated in Mac OS X 10.5. Use CMBufferLocation instead.}
1915 type
1916 CMPtrLocationPtr = ^CMPtrLocation;
1917 CMPtrLocation = record
1918 p: Ptr;
1919 end;
1920
1921 { This structure is deprecated in Mac OS X 10.5.}
1922 type
1923 CMProcedureLocationPtr = ^CMProcedureLocation;
1924 CMProcedureLocation = record
1925 proc: CMProfileAccessUPP;
1926 refCon: UnivPtr;
1927 end;
1928 {$endc} {not TARGET_CPU_64}
1929
1930 type
1931 CMPathLocationPtr = ^CMPathLocation;
1932 CMPathLocation = record
1933 path: packed array [0..CS_MAX_PATH] of char;
1934 end;
1935
1936 type
1937 CMBufferLocationPtr = ^CMBufferLocation;
1938 CMBufferLocation = record
1939 buffer: UnivPtr;
1940 size: UInt32;
1941 end;
1942
1943 type
1944 CMProfLocPtr = ^CMProfLoc;
1945 CMProfLoc = record
1946 case SInt16 of
1947 {$ifc not TARGET_CPU_64}
1948 0: (
1949 fileLoc: CMFileLocation;
1950 );
1951 {$endc} {not TARGET_CPU_64}
1952 1: (
1953 handleLoc: CMHandleLocation;
1954 );
1955 {$ifc not TARGET_CPU_64}
1956 2: (
1957 ptrLoc: CMPtrLocation;
1958 );
1959 3: (
1960 procLoc: CMProcedureLocation;
1961 );
1962 {$endc} {not TARGET_CPU_64}
1963 4: (
1964 pathLoc: CMPathLocation;
1965 );
1966 5: (
1967 bufferLoc: CMBufferLocation;
1968 );
1969 end;
1970
1971 type
1972 CMProfileLocationPtr = ^CMProfileLocation;
1973 CMProfileLocation = record
1974 locType: SInt16;
1975 u: CMProfLoc;
1976 end;
1977
1978 const
1979 cmOriginalProfileLocationSize = 72;
1980 cmCurrentProfileLocationSize = SizeOf(CMProfileLocation);
1981
1982
1983 { Struct and enums used for Profile iteration }
1984
1985 const
1986 cmProfileIterateDataVersion1 = $00010000;
1987 cmProfileIterateDataVersion2 = $00020000; { Added makeAndModel}
1988 cmProfileIterateDataVersion3 = $00030000; { Added MD5 digest}
1989 cmProfileIterateDataVersion4 = $00040000; { Only path based locations}
1990
1991 type
1992 CMProfileIterateDataPtr = ^CMProfileIterateData;
1993 CMProfileIterateData = record
1994 dataVersion: UInt32; { cmProfileIterateDataVersion2 }
1995 header: CM2Header;
1996 code: ScriptCode;
1997 name: Str255;
1998 location: CMProfileLocation;
1999 uniCodeNameCount: UniCharCount;
2000 uniCodeName: UniCharPtr;
2001 asciiName: UInt8Ptr;
2002 makeAndModel: CMMakeAndModelPtr;
2003 digest: CMProfileMD5Ptr; { Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm }
2004 end;
2005
2006
2007 { Caller-supplied callback function for Profile iteration }
2008
2009 type
varnull2010 CMProfileIterateProcPtr = function( var iterateData: CMProfileIterateData; refCon: UnivPtr ): OSErr;
2011
2012 type
2013 CMProfileIterateUPP = CMProfileIterateProcPtr;
2014
2015
NewCMProfileIterateUPPnull2016 function NewCMProfileIterateUPP( userRoutine: CMProfileIterateProcPtr ): CMProfileIterateUPP; external name '_NewCMProfileIterateUPP';
2017 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2018
InvokeCMProfileIterateUPPnull2019 function InvokeCMProfileIterateUPP( var iterateData: CMProfileIterateData; refCon: UnivPtr; userUPP: CMProfileIterateUPP ): OSErr; external name '_InvokeCMProfileIterateUPP';
2020 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2021
2022 procedure DisposeCMProfileIterateUPP( userUPP: CMProfileIterateUPP ); external name '_DisposeCMProfileIterateUPP';
2023 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2024
2025 { Caller-supplied callback function for CMM iteration }
2026
2027 type
varnull2028 CMMIterateProcPtr = function( var iterateData: CMMInfo; refCon: UnivPtr ): OSErr;
2029
2030 type
2031 CMMIterateUPP = CMMIterateProcPtr;
2032
NewCMMIterateUPPnull2033 function NewCMMIterateUPP( userRoutine: CMMIterateProcPtr ): CMMIterateUPP; external name '_NewCMMIterateUPP';
2034 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2035
InvokeCMMIterateUPPnull2036 function InvokeCMMIterateUPP( var iterateData: CMMInfo; refCon: UnivPtr; userUPP: CMMIterateUPP ): OSErr; external name '_InvokeCMMIterateUPP';
2037 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2038
2039 procedure DisposeCMMIterateUPP( userUPP: CMMIterateUPP ); external name '_DisposeCMMIterateUPP';
2040 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2041
2042
2043 type
2044 CMLabToLabProcPtr = procedure( var L: Float32; var a: Float32; var b: Float32; refcon: UnivPtr );
2045
2046
2047 { Creating Profiles }
2048
CMNewProfilenull2049 function CMNewProfile( var prof: CMProfileRef; const (*var*) theProfile: CMProfileLocation ): CMError; external name '_CMNewProfile';
2050 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2051
2052
2053 {$ifc not TARGET_CPU_64}
2054 { This function is deprecated in Mac OS X 10.5. Use NCWNewLinkProfile instead.}
CWNewLinkProfilenull2055 function CWNewLinkProfile( var prof: CMProfileRef; const (*var*) targetLocation: CMProfileLocation; var profileSet: CMConcatProfileSet ): CMError; external name '_CWNewLinkProfile';
2056 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2057 {$endc} {not TARGET_CPU_64}
2058
2059
NCWNewLinkProfilenull2060 function NCWNewLinkProfile( var prof: CMProfileRef; const (*var*) targetLocation: CMProfileLocation; var profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UnivPtr ): CMError; external name '_NCWNewLinkProfile';
2061 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2062
2063
2064 {!
2065 @function CMMakeProfile
2066 @abstract Make a display or abstract profile.
2067 @discussion Adds appropriate tags to a profile to make display or abstract
2068 profile based on an specification dictionary.
2069 One key in the specification dictionary must be "profileType"
2070 which must have a CFString value of "abstractLab", "displayRGB"
2071 or "displayID". It can also contain the keys/values:
2072 <PRE>
2073 "description" CFString (optional)
2074 "copyright" CFString (optional)
2075 </PRE>
2076 For profileType of "abstractLab", the dictionary
2077 should also contain the keys/values:
2078 <PRE>
2079 "gridPoints" CFNumber(SInt32) (should be odd)
2080 "proc" CFNumber(SInt64) (coerced from a LabToLabProcPtr)
2081 "refcon" CFNumber(SInt64) (coerced from a void*) (optional)
2082 </PRE>
2083 For profileType of "displayRGB", the dictionary
2084 should also contain the keys/values:
2085 <PRE>
2086 "targetGamma" CFNumber(Float) (e.g. 1.8) (optional)
2087 "targetWhite" CFNumber(SInt32) (e.g. 6500) (optional)
2088 "gammaR" CFNumber(Float) (e.g. 2.5)
2089 "gammaG" CFNumber(Float) (e.g. 2.5)
2090 "gammaB" CFNumber(Float) (e.g. 2.5)
2091 "tableChans" CFNumber(SInt32) (1 or 3) (optional)
2092 "tableEntries" CFNumber(SInt32) (e.g 16 or 255) (optional)
2093 "tableEntrySize" CFNumber(SInt32) (1 or 2) (optional)
2094 "tableData" CFData (lut in RRRGGGBBB order) (optional)
2095
2096 either
2097 "phosphorRx" CFNumber(Float)
2098 "phosphorRy" CFNumber(Float)
2099 "phosphorGx" CFNumber(Float)
2100 "phosphorGy" CFNumber(Float)
2101 "phosphorBx" CFNumber(Float)
2102 "phosphorBy" CFNumber(Float)
2103 or
2104 "phosphorSet" CFString ("WideRGB", "700/525/450nm", "P22-EBU", "HDTV",
2105 "CCIR709", "sRGB", "AdobeRGB98" or "Trinitron")
2106 either
2107 "whitePointx" CFNumber(Float)
2108 "whitePointy" CFNumber(Float)
2109 or
2110 "whiteTemp" CFNumber(SInt32) (e.g. 5000, 6500, 9300)
2111 </PRE>
2112 For profileType of "displayID", the dictionary
2113 should also contain the keys/values:
2114 <PRE>
2115 "targetGamma" CFNumber(Float) (e.g. 1.8) (optional)
2116 "targetWhite" CFNumber(SInt32) (e.g. 6500) (optional)
2117 "displayID CFNumber(SInt32)
2118 Optionally, the keys/values for "displayRGB" can be
2119 provided to override the values from the display.
2120 </PRE>
2121
2122 @param prof (in) the profile to modify
2123 @param spec (in) specification dictionary
2124 }
CMMakeProfilenull2125 function CMMakeProfile( prof: CMProfileRef; spec: CFDictionaryRef ): CMError; external name '_CMMakeProfile';
2126 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2127
2128
2129 { Accessing Profiles }
2130
CMOpenProfilenull2131 function CMOpenProfile( var prof: CMProfileRef; const (*var*) theProfile: CMProfileLocation ): CMError; external name '_CMOpenProfile';
2132 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2133
2134
CMCloseProfilenull2135 function CMCloseProfile( prof: CMProfileRef ): CMError; external name '_CMCloseProfile';
2136 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2137
2138
CMUpdateProfilenull2139 function CMUpdateProfile( prof: CMProfileRef ): CMError; external name '_CMUpdateProfile';
2140 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2141
2142
CMCopyProfilenull2143 function CMCopyProfile( var targetProf: CMProfileRef; const (*var*) targetLocation: CMProfileLocation; srcProf: CMProfileRef ): CMError; external name '_CMCopyProfile';
2144 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2145
2146
CMValidateProfilenull2147 function CMValidateProfile( prof: CMProfileRef; var valid: Boolean; var preferredCMMnotfound: Boolean ): CMError; external name '_CMValidateProfile';
2148 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2149
2150
2151 {$ifc not TARGET_CPU_64}
2152 { This function is deprecated in Mac OS X 10.5. Use NCMGetProfileLocation instead.}
CMGetProfileLocationnull2153 function CMGetProfileLocation( prof: CMProfileRef; var location: CMProfileLocation ): CMError; external name '_CMGetProfileLocation';
2154 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2155 {$endc} {not TARGET_CPU_64}
2156
2157
NCMGetProfileLocationnull2158 function NCMGetProfileLocation( prof: CMProfileRef; var theProfile: CMProfileLocation; var locationSize: UInt32 ): CMError; external name '_NCMGetProfileLocation';
2159 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2160
2161
2162 {!
2163 @function CMProfileCopyICCData
2164 @abstract Return a copy of the icc data specified by `prof'.
2165 @param allocator (in) The object to be used to allocate memory for the data
2166 @param prof (in) The profile to query
2167 }
CMProfileCopyICCDatanull2168 function CMProfileCopyICCData( allocator: CFAllocatorRef; prof: CMProfileRef ): CFDataRef; external name '_CMProfileCopyICCData';
2169 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2170
2171
2172 {$ifc not TARGET_CPU_64}
2173 { This function is deprecated in Mac OS X 10.5. Use CMCopyProfile instead.}
CMFlattenProfilenull2174 function CMFlattenProfile( prof: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: Boolean ): CMError; external name '_CMFlattenProfile';
2175 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2176 {$endc} {not TARGET_CPU_64}
2177
2178
2179 {$ifc not TARGET_CPU_64}
2180 { This function is deprecated in Mac OS X 10.5.}
NCMUnflattenProfilenull2181 function NCMUnflattenProfile( var targetLocation: CMProfileLocation; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: Boolean ): CMError; external name '_NCMUnflattenProfile';
2182 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2183 {$endc} {not TARGET_CPU_64}
2184
2185
CMGetProfileHeadernull2186 function CMGetProfileHeader( prof: CMProfileRef; var header: CMAppleProfileHeader ): CMError; external name '_CMGetProfileHeader';
2187 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2188
2189
CMSetProfileHeadernull2190 function CMSetProfileHeader( prof: CMProfileRef; const (*var*) header: CMAppleProfileHeader ): CMError; external name '_CMSetProfileHeader';
2191 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2192
2193
CMCloneProfileRefnull2194 function CMCloneProfileRef( prof: CMProfileRef ): CMError; external name '_CMCloneProfileRef';
2195 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2196
2197
CMGetProfileRefCountnull2198 function CMGetProfileRefCount( prof: CMProfileRef; var count: SIGNEDLONG ): CMError; external name '_CMGetProfileRefCount';
2199 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2200
2201
CMProfileModifiednull2202 function CMProfileModified( prof: CMProfileRef; var modified: Boolean ): CMError; external name '_CMProfileModified';
2203 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2204
2205
CMGetProfileMD5null2206 function CMGetProfileMD5( prof: CMProfileRef; digest: CMProfileMD5 ): CMError; external name '_CMGetProfileMD5';
2207 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2208
2209
2210 { Accessing Profile Elements }
2211
CMCountProfileElementsnull2212 function CMCountProfileElements( prof: CMProfileRef; var elementCount: UInt32 ): CMError; external name '_CMCountProfileElements';
2213 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2214
2215
CMProfileElementExistsnull2216 function CMProfileElementExists( prof: CMProfileRef; tag: OSType; var found: Boolean ): CMError; external name '_CMProfileElementExists';
2217 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2218
2219
CMGetProfileElementnull2220 function CMGetProfileElement( prof: CMProfileRef; tag: OSType; var elementSize: UInt32; elementData: UnivPtr ): CMError; external name '_CMGetProfileElement';
2221 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2222
2223
CMSetProfileElementnull2224 function CMSetProfileElement( prof: CMProfileRef; tag: OSType; elementSize: UInt32; elementData: {const} UnivPtr ): CMError; external name '_CMSetProfileElement';
2225 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2226
2227
CMSetProfileElementSizenull2228 function CMSetProfileElementSize( prof: CMProfileRef; tag: OSType; elementSize: UInt32 ): CMError; external name '_CMSetProfileElementSize';
2229 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2230
2231
CMSetProfileElementReferencenull2232 function CMSetProfileElementReference( prof: CMProfileRef; elementTag: OSType; referenceTag: OSType ): CMError; external name '_CMSetProfileElementReference';
2233 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2234
2235
CMGetPartialProfileElementnull2236 function CMGetPartialProfileElement( prof: CMProfileRef; tag: OSType; offset: UInt32; var byteCount: UInt32; elementData: UnivPtr ): CMError; external name '_CMGetPartialProfileElement';
2237 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2238
2239
CMSetPartialProfileElementnull2240 function CMSetPartialProfileElement( prof: CMProfileRef; tag: OSType; offset: UInt32; byteCount: UInt32; elementData: {const} UnivPtr ): CMError; external name '_CMSetPartialProfileElement';
2241 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2242
2243
CMGetIndProfileElementInfonull2244 function CMGetIndProfileElementInfo( prof: CMProfileRef; index: UInt32; var tag: OSType; var elementSize: UInt32; var refs: Boolean ): CMError; external name '_CMGetIndProfileElementInfo';
2245 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2246
2247
CMGetIndProfileElementnull2248 function CMGetIndProfileElement( prof: CMProfileRef; index: UInt32; var elementSize: UInt32; elementData: UnivPtr ): CMError; external name '_CMGetIndProfileElement';
2249 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2250
2251
CMRemoveProfileElementnull2252 function CMRemoveProfileElement( prof: CMProfileRef; tag: OSType ): CMError; external name '_CMRemoveProfileElement';
2253 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2254
2255
2256 { Accessing Profile Descriptions }
2257
2258 {$ifc not TARGET_CPU_64}
2259 { This function is deprecated in Mac OS X 10.5. Use CMCopyProfileDescriptionString instead.}
CMGetScriptProfileDescriptionnull2260 function CMGetScriptProfileDescription( prof: CMProfileRef; var name: Str255; var code: ScriptCode ): CMError; external name '_CMGetScriptProfileDescription';
2261 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2262 {$endc} {not TARGET_CPU_64}
2263
2264
CMGetProfileDescriptionsnull2265 function CMGetProfileDescriptions( prof: CMProfileRef; aName: CStringPtr; var aCount: UInt32; var mName: Str255; var mCode: ScriptCode; var uName: UniChar; var uCount: UniCharCount ): CMError; external name '_CMGetProfileDescriptions';
2266 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2267
2268
CMSetProfileDescriptionsnull2269 function CMSetProfileDescriptions( prof: CMProfileRef; aName: ConstCStringPtr; aCount: UInt32; const (*var*) mName: Str255; mCode: ScriptCode; uName: ConstUniCharPtr; uCount: UniCharCount ): CMError; external name '_CMSetProfileDescriptions';
2270 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2271
2272
CMCopyProfileLocalizedStringDictionarynull2273 function CMCopyProfileLocalizedStringDictionary( prof: CMProfileRef; tag: OSType; var theDict: CFDictionaryRef ): CMError; external name '_CMCopyProfileLocalizedStringDictionary';
2274 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2275
2276
CMSetProfileLocalizedStringDictionarynull2277 function CMSetProfileLocalizedStringDictionary( prof: CMProfileRef; tag: OSType; theDict: CFDictionaryRef ): CMError; external name '_CMSetProfileLocalizedStringDictionary';
2278 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2279
CMCopyProfileLocalizedStringnull2280 function CMCopyProfileLocalizedString( prof: CMProfileRef; tag: OSType; reqLocale: CFStringRef; var locale: CFStringRef; var str: CFStringRef ): CMError; external name '_CMCopyProfileLocalizedString';
2281 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2282
2283 {!
2284 @function CMCopyProfileDescriptionString
2285 @abstract Returns the name of a profile as a CFString.
2286 @discussion If the profile is multi-localized, the best localized name for the current process is returned.
2287 @param prof (in) the profile to query
2288 @param str (out) returns the name
2289 }
CMCopyProfileDescriptionStringnull2290 function CMCopyProfileDescriptionString( prof: CMProfileRef; var str: CFStringRef ): CMError; external name '_CMCopyProfileDescriptionString';
2291 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2292
2293 { Accessing Name-Class Profiles }
2294
CMGetNamedColorInfonull2295 function CMGetNamedColorInfo( prof: CMProfileRef; var deviceChannels: UInt32; var deviceColorSpace: OSType; var PCSColorSpace: OSType; var count: UInt32; prefix: StringPtr; suffix: StringPtr ): CMError; external name '_CMGetNamedColorInfo';
2296 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2297
2298
CMGetNamedColorValuenull2299 function CMGetNamedColorValue( prof: CMProfileRef; name: StringPtr; var deviceColor: CMColor; var PCSColor: CMColor ): CMError; external name '_CMGetNamedColorValue';
2300 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2301
2302
CMGetIndNamedColorValuenull2303 function CMGetIndNamedColorValue( prof: CMProfileRef; index: UInt32; var deviceColor: CMColor; var PCSColor: CMColor ): CMError; external name '_CMGetIndNamedColorValue';
2304 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2305
2306
CMGetNamedColorIndexnull2307 function CMGetNamedColorIndex( prof: CMProfileRef; name: StringPtr; var index: UInt32 ): CMError; external name '_CMGetNamedColorIndex';
2308 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2309
2310
CMGetNamedColorNamenull2311 function CMGetNamedColorName( prof: CMProfileRef; index: UInt32; name: StringPtr ): CMError; external name '_CMGetNamedColorName';
2312 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2313
2314
2315 { Working with ColorWorlds }
2316
NCWNewColorWorldnull2317 function NCWNewColorWorld( var cw: CMWorldRef; src: CMProfileRef; dst: CMProfileRef ): CMError; external name '_NCWNewColorWorld';
2318 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2319
2320
2321 {$ifc not TARGET_CPU_64}
CWConcatColorWorldnull2322 function CWConcatColorWorld( var cw: CMWorldRef; var profileSet: CMConcatProfileSet ): CMError; external name '_CWConcatColorWorld';
2323 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2324 {$endc} {not TARGET_CPU_64}
2325
2326
NCWConcatColorWorldnull2327 function NCWConcatColorWorld( var cw: CMWorldRef; var profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UnivPtr ): CMError; external name '_NCWConcatColorWorld';
2328 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2329
2330
2331 {$ifc not TARGET_CPU_64}
2332 { This function is deprecated in Mac OS X 10.5.}
CMGetCWInfonull2333 function CMGetCWInfo( cw: CMWorldRef; var info: CMCWInfoRecord ): CMError; external name '_CMGetCWInfo';
2334 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2335 {$endc} {not TARGET_CPU_64}
2336
2337
2338 procedure CWDisposeColorWorld( cw: CMWorldRef ); external name '_CWDisposeColorWorld';
2339 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2340
2341
CWMatchColorsnull2342 function CWMatchColors( cw: CMWorldRef; var myColors: CMColor; count: size_t ): CMError; external name '_CWMatchColors';
2343 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2344
2345
CWCheckColorsnull2346 function CWCheckColors( cw: CMWorldRef; var myColors: CMColor; count: size_t; var result: UInt8 ): CMError; external name '_CWCheckColors';
2347 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2348
2349 {$ifc not _DECLARE_CS_QD_API_}
2350
CWMatchBitmapnull2351 function CWMatchBitmap( cw: CMWorldRef; var bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var matchedBitmap: CMBitmap ): CMError; external name '_CWMatchBitmap';
2352 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2353
2354
CWCheckBitmapnull2355 function CWCheckBitmap( cw: CMWorldRef; const (*var*) bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var resultBitmap: CMBitmap ): CMError; external name '_CWCheckBitmap';
2356 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2357
2358 {$endc} {not _DECLARE_CS_QD_API_}
2359
CWGetCMMSignaturenull2360 function CWGetCMMSignature( cw: CMWorldRef ): UInt32; external name '_CWGetCMMSignature';
2361 (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2362
2363 { OpenGL support }
2364 const
2365 cmTextureRGBtoRGBX8 = 0; { RGB to 8-bit RGBx texture}
2366 cmTextureRGBtoRGBX16 = 1; { RGB to 16-bit RGBx texture}
2367 cmTextureRGBtoRGBXFloat32 = 2; { RGB to 32-bit float RGBx texture }
2368
2369 {!
2370 @function CWFillLookupTexture
2371 @abstract Fills a 3d lookup texture from a colorworld.
2372 @discussion The resulting table is suitable for use in OpenGL to
2373 accelerate color management in hardware.
2374 @param cw (in) the colorworld to use
2375 @param gridPoints (in) number of grid points per channel in the texture
2376 @param format (in) format of pixels in texture (e.g. cmTextureRGBtoRGBX8)
2377 @param dataSize (in) size in bytes of texture data to fill
2378 @param data (in/out) pointer to texture data to fill
2379 }
CWFillLookupTexturenull2380 function CWFillLookupTexture( cw: CMWorldRef; gridPoints: UInt32; format: UInt32; dataSize: UInt32; data: UnivPtr ): CMError; external name '_CWFillLookupTexture';
2381 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2382
2383
2384 { Accessing Special Profiles }
2385
CMGetSystemProfilenull2386 function CMGetSystemProfile( var prof: CMProfileRef ): CMError; external name '_CMGetSystemProfile';
2387 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2388
2389
2390 {$ifc not TARGET_CPU_64}
2391 { This function is deprecated in Mac OS X 10.5. Use CMSetProfileByAVID instead.}
CMSetSystemProfilenull2392 function CMSetSystemProfile( const (*var*) profileFileSpec: FSSpec ): CMError; external name '_CMSetSystemProfile';
2393 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2394 {$endc} {not TARGET_CPU_64}
2395
2396
2397 {$ifc not TARGET_CPU_64}
2398 { This function is deprecated in Mac OS X 10.5. Use CMSetProfileByAVID instead.}
NCMSetSystemProfilenull2399 function NCMSetSystemProfile( const (*var*) profLoc: CMProfileLocation ): CMError; external name '_NCMSetSystemProfile';
2400 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2401 {$endc} {not TARGET_CPU_64}
2402
2403
CMGetDefaultProfileBySpacenull2404 function CMGetDefaultProfileBySpace( dataColorSpace: OSType; var prof: CMProfileRef ): CMError; external name '_CMGetDefaultProfileBySpace';
2405 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2406
2407
2408 {$ifc not TARGET_CPU_64}
2409 { This function is deprecated in Mac OS X 10.5.}
CMSetDefaultProfileBySpacenull2410 function CMSetDefaultProfileBySpace( dataColorSpace: OSType; prof: CMProfileRef ): CMError; external name '_CMSetDefaultProfileBySpace';
2411 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2412 {$endc} {not TARGET_CPU_64}
2413
2414
CMGetDefaultProfileByUsenull2415 function CMGetDefaultProfileByUse( use: OSType; var prof: CMProfileRef ): CMError; external name '_CMGetDefaultProfileByUse';
2416 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2417
2418
2419 {$ifc not TARGET_CPU_64}
2420 { This function is deprecated in Mac OS X 10.5.}
CMSetDefaultProfileByUsenull2421 function CMSetDefaultProfileByUse( use: OSType; prof: CMProfileRef ): CMError; external name '_CMSetDefaultProfileByUse';
2422 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2423 {$endc} {not TARGET_CPU_64}
2424
2425
CMGetProfileByAVIDnull2426 function CMGetProfileByAVID( theID: CMDisplayIDType; var prof: CMProfileRef ): CMError; external name '_CMGetProfileByAVID';
2427 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2428
2429
CMSetProfileByAVIDnull2430 function CMSetProfileByAVID( theID: CMDisplayIDType; prof: CMProfileRef ): CMError; external name '_CMSetProfileByAVID';
2431 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2432
2433
CMGetGammaByAVIDnull2434 function CMGetGammaByAVID( theID: CMDisplayIDType; var gamma: CMVideoCardGamma; var size: UInt32 ): CMError; external name '_CMGetGammaByAVID';
2435 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2436
2437
CMSetGammaByAVIDnull2438 function CMSetGammaByAVID( theID: CMDisplayIDType; var gamma: CMVideoCardGamma ): CMError; external name '_CMSetGammaByAVID';
2439 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2440
2441
2442 { Searching for Profiles }
2443
CMIterateColorSyncFoldernull2444 function CMIterateColorSyncFolder( proc: CMProfileIterateUPP; var seed: UInt32; var count: UInt32; refCon: UnivPtr ): CMError; external name '_CMIterateColorSyncFolder';
2445 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2446
2447
2448 {$ifc not TARGET_CPU_64}
2449
2450 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
CMGetColorSyncFolderSpecnull2451 function CMGetColorSyncFolderSpec( vRefNum: SInt16; createFolder: Boolean; var foundVRefNum: SInt16; var foundDirID: SIGNEDLONG ): CMError; external name '_CMGetColorSyncFolderSpec';
2452 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2453
2454
2455 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
CMNewProfileSearchnull2456 function CMNewProfileSearch( var searchSpec: CMSearchRecord; refCon: UnivPtr; var count: UInt32; var searchResult: CMProfileSearchRef ): CMError; external name '_CMNewProfileSearch';
2457 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2458
2459
2460 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
CMUpdateProfileSearchnull2461 function CMUpdateProfileSearch( search: CMProfileSearchRef; refCon: UnivPtr; var count: UInt32 ): CMError; external name '_CMUpdateProfileSearch';
2462 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2463
2464
2465 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
2466 procedure CMDisposeProfileSearch( search: CMProfileSearchRef ); external name '_CMDisposeProfileSearch';
2467 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2468
2469
2470 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
CMSearchGetIndProfilenull2471 function CMSearchGetIndProfile( search: CMProfileSearchRef; index: UInt32; var prof: CMProfileRef ): CMError; external name '_CMSearchGetIndProfile';
2472 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2473
2474
2475 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
CMSearchGetIndProfileFileSpecnull2476 function CMSearchGetIndProfileFileSpec( search: CMProfileSearchRef; index: UInt32; var spec: FSSpec ): CMError; external name '_CMSearchGetIndProfileFileSpec';
2477 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2478
2479
2480 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
CMCreateProfileIdentifiernull2481 function CMCreateProfileIdentifier( prof: CMProfileRef; ident: CMProfileIdentifierPtr; var size: UInt32 ): CMError; external name '_CMCreateProfileIdentifier';
2482 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2483
2484
2485 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
CMProfileIdentifierFolderSearchnull2486 function CMProfileIdentifierFolderSearch( ident: CMProfileIdentifierPtr; var matchedCount: UInt32; var searchResult: CMProfileSearchRef ): CMError; external name '_CMProfileIdentifierFolderSearch';
2487 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2488
2489
2490 { This function is deprecated in Mac OS X 10.5. Use CMIterateColorSyncFolder instead.}
CMProfileIdentifierListSearchnull2491 function CMProfileIdentifierListSearch( ident: CMProfileIdentifierPtr; var profileList: CMProfileRef; listSize: UInt32; var matchedCount: UInt32; var matchedList: CMProfileRef ): CMError; external name '_CMProfileIdentifierListSearch';
2492 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2493
2494 {$endc} {not TARGET_CPU_64}
2495
2496
2497 { Utilities }
2498
2499 {$ifc not TARGET_CPU_64}
2500
CMGetPreferredCMMnull2501 function CMGetPreferredCMM( var cmmType: OSType; var prefCMMnotfound: Boolean ): CMError; external name '_CMGetPreferredCMM';
2502 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2503
2504
CMSetPreferredCMMnull2505 function CMSetPreferredCMM( cmmType: OSType ): CMError; external name '_CMSetPreferredCMM';
2506 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2507
2508 {$endc} {not TARGET_CPU_64}
2509
CMIterateCMMInfonull2510 function CMIterateCMMInfo( proc: CMMIterateUPP; var count: UInt32; refCon: UnivPtr ): CMError; external name '_CMIterateCMMInfo';
2511 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2512
2513
CMGetColorSyncVersionnull2514 function CMGetColorSyncVersion( var version: UInt32 ): CMError; external name '_CMGetColorSyncVersion';
2515 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2516
2517
CMLaunchControlPanelnull2518 function CMLaunchControlPanel( flags: UInt32 ): CMError; external name '_CMLaunchControlPanel';
2519 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2520
2521
2522 { Converting Colors }
2523
2524 {$ifc not TARGET_CPU_64}
2525
2526 { This function is deprecated in Mac OS X 10.5. Use CMConvertXYZFloatBitmap instead.}
CMConvertXYZToLabnull2527 function CMConvertXYZToLab( const (*var*) src: CMColor; const (*var*) white: CMXYZColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertXYZToLab';
2528 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2529
2530
2531 { This function is deprecated in Mac OS X 10.5. Use CMConvertXYZFloatBitmap instead.}
CMConvertLabToXYZnull2532 function CMConvertLabToXYZ( const (*var*) src: CMColor; const (*var*) white: CMXYZColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertLabToXYZ';
2533 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2534
2535
2536 { This function is deprecated in Mac OS X 10.5. Use CMConvertXYZFloatBitmap instead.}
CMConvertXYZToLuvnull2537 function CMConvertXYZToLuv( const (*var*) src: CMColor; const (*var*) white: CMXYZColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertXYZToLuv';
2538 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2539
2540
2541 { This function is deprecated in Mac OS X 10.5. Use CMConvertXYZFloatBitmap instead.}
CMConvertLuvToXYZnull2542 function CMConvertLuvToXYZ( const (*var*) src: CMColor; const (*var*) white: CMXYZColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertLuvToXYZ';
2543 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2544
2545
2546 { This function is deprecated in Mac OS X 10.5. Use CMConvertXYZFloatBitmap instead.}
CMConvertXYZToYxynull2547 function CMConvertXYZToYxy( const (*var*) src: CMColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertXYZToYxy';
2548 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2549
2550
2551 { This function is deprecated in Mac OS X 10.5. Use CMConvertXYZFloatBitmap instead.}
CMConvertYxyToXYZnull2552 function CMConvertYxyToXYZ( const (*var*) src: CMColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertYxyToXYZ';
2553 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2554
2555
2556 { This function is deprecated in Mac OS X 10.5. Use CMConvertRGBFloatBitmap instead.}
CMConvertRGBToHLSnull2557 function CMConvertRGBToHLS( const (*var*) src: CMColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertRGBToHLS';
2558 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2559
2560
2561 { This function is deprecated in Mac OS X 10.5. Use CMConvertRGBFloatBitmap instead.}
CMConvertHLSToRGBnull2562 function CMConvertHLSToRGB( const (*var*) src: CMColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertHLSToRGB';
2563 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2564
2565
2566 { This function is deprecated in Mac OS X 10.5. Use CMConvertRGBFloatBitmap instead.}
CMConvertRGBToHSVnull2567 function CMConvertRGBToHSV( const (*var*) src: CMColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertRGBToHSV';
2568 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2569
2570
2571 { This function is deprecated in Mac OS X 10.5. Use CMConvertRGBFloatBitmap instead.}
CMConvertHSVToRGBnull2572 function CMConvertHSVToRGB( const (*var*) src: CMColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertHSVToRGB';
2573 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2574
2575
2576 { This function is deprecated in Mac OS X 10.5. Use CMConvertRGBFloatBitmap instead.}
CMConvertRGBToGraynull2577 function CMConvertRGBToGray( const (*var*) src: CMColor; var dst: CMColor; count: size_t ): CMError; external name '_CMConvertRGBToGray';
2578 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2579
2580
2581 { This function is deprecated in Mac OS X 10.5.}
CMConvertXYZToFixedXYZnull2582 function CMConvertXYZToFixedXYZ( const (*var*) src: CMXYZColor; var dst: CMFixedXYZColor; count: size_t ): CMError; external name '_CMConvertXYZToFixedXYZ';
2583 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2584
2585
2586 { This function is deprecated in Mac OS X 10.5.}
CMConvertFixedXYZToXYZnull2587 function CMConvertFixedXYZToXYZ( const (*var*) src: CMFixedXYZColor; var dst: CMXYZColor; count: size_t ): CMError; external name '_CMConvertFixedXYZToXYZ';
2588 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2589
2590
2591 { This function is deprecated in Mac OS X 10.5. Use CMConvertXYZFloatBitmap instead.}
CMConvertXYZToXYZnull2592 function CMConvertXYZToXYZ( const (*var*) src: CMColor; const (*var*) srcIlluminant: CMXYZColor; var dst: CMColor; const (*var*) dstIlluminant: CMXYZColor; method: CMChromaticAdaptation; count: size_t ): CMError; external name '_CMConvertXYZToXYZ';
2593 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2594
2595 {$endc} {not TARGET_CPU_64}
2596
2597
2598 { Working with PostScript }
2599
CMGetPS2ColorSpacenull2600 function CMGetPS2ColorSpace( srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: Boolean ): CMError; external name '_CMGetPS2ColorSpace';
2601 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2602
2603
CMGetPS2ColorRenderingIntentnull2604 function CMGetPS2ColorRenderingIntent( srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: Boolean ): CMError; external name '_CMGetPS2ColorRenderingIntent';
2605 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2606
2607
CMGetPS2ColorRenderingnull2608 function CMGetPS2ColorRendering( srcProf: CMProfileRef; dstProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: Boolean ): CMError; external name '_CMGetPS2ColorRendering';
2609 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2610
2611
CMGetPS2ColorRenderingVMSizenull2612 function CMGetPS2ColorRenderingVMSize( srcProf: CMProfileRef; dstProf: CMProfileRef; var vmSize: UInt32; var preferredCMMnotfound: Boolean ): CMError; external name '_CMGetPS2ColorRenderingVMSize';
2613 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2614
2615
2616 { Notifications }
2617
2618 {
2619 * Clients can register for notifications of ColorSync preference changes by
2620 * using the kCMPrefsChangedNotification key. This notification will be sent
2621 * if the user changes ColorSync preferences such as:
2622 * the default profile by colors space, (CMSetDefaultProfileBySpace)
2623 * the default profile by device useage, (CMSetDefaultProfileByUse)
2624 * or the preferred CMM.
2625 * See <CMDeviceIntegration.h> for more notifications that can be sent.
2626 }
2627 {$ifc USE_CFSTR_CONSTANT_MACROS}
2628 {$definec kCMPrefsChangedNotification CFSTRP('AppleColorSyncPreferencesChangedNotification')}
2629 {$endc}
2630
2631
2632 //#pragma mark --- CMFloatBitmap.h ----
2633
2634 {$ifc not TARGET_CPU_64}
2635 {$ALIGN POWER}
2636 {$endc} {not TARGET_CPU_64}
2637
2638
2639 type
2640 CMFloatBitmapFlags = SInt32;
2641 const
2642 kCMFloatBitmapFlagsNone = 0;
2643 kCMFloatBitmapFlagsAlpha = 1;
2644 kCMFloatBitmapFlagsAlphaPremul = 2;
2645 kCMFloatBitmapFlagsRangeClipped = 4;
2646
2647 {!
2648 @struct CMFloatBitmap
2649 @abstract A new struture that defines and arbritrary map of float color values.
2650 @discussion The struture defines a pixel array of dimensions [height][width][chans]
2651 where 'chans' is the number of channels in the colorspace plus an optional one for alpha.
2652 The actual memory pointed to by the structure can contain a variety of possible arrangements.
2653 The actual data values can be chuncky or planar. The channels can by in any order.
2654 <PRE>
2655
2656 Examples:
2657 a) float* p contains a 640w by 480h bitmap of chunky RGB data
2658 CMFloatBitmap map = ( 0, // version
2659 (p, p+1, p+2), // base addrs of R,G,B
2660 480, 640, // height, width
2661 640*3, // rowStride
2662 3, // colStride
2663 cmRGBData,
2664 kCMFloatBitmapFlagsNone);
2665 b) float* p contains a 640w by 480h bitmap of chunky BGRA data
2666 CMFloatBitmap map = ( 0, // version
2667 (p+2, p+1, p, p+3), // base addrs of R,G,B,A
2668 480, 640, // height, width
2669 640*4, // rowStride
2670 3, // colStride
2671 cmRGBData,
2672 kCMFloatBitmapFlagsAlpha);
2673 c) float* p contains a 640w by 480h bitmap of planar CMYK data
2674 CMFloatBitmap map = ( 0, // version
2675 (p, p+640*480 , p+2*640*480 , p+3*640*480),
2676 480, 640, // height, width
2677 640, // rowStride
2678 1, // colStride
2679 cmCMYKData,
2680 kCMFloatBitmapFlagsNone);
2681 </PRE>
2682
2683 @field version The version number of this structure to allow for future expansion.
2684 Should contain 0 for now.
2685
2686 @field buffers The base address for each channel in canonical order.
2687 The canonical order for RGB is R,G,B. CMYK is C,M,Y,K etc.
2688 A maximum of sixteen channels is supported.
2689 Another way to think of this is
2690 buffers[c] = &(pixelArray[0][0][c])
2691
2692 @field height The height (in pixels) of the bitmap.
2693
2694 @field width The width (in pixels) of the bitmap.
2695
2696 @field rowStride The number of floats to skip to move from one row to the next.
2697 This is typically (width*chans) for chunky pixel buffers or (width) for planar.
2698 Can be negative if the image is vertically flipped.
2699
2700 @field colStride The number of floats to skip to move from one column to the next.
2701 This is typically (chans) for chunky pixel buffers or (1) for planar.
2702 Can be negative if the image is horizontally flipped.
2703
2704 @field space The colorspace of the data (e.g cmRGBdata cmCMYKData)
2705
2706 @field flags Holds bits to specify the alpha type of the data.
2707 The remaining bits are reserved for future use.
2708
2709 }
2710 type
2711 CMFloatBitmapPtr = ^CMFloatBitmap;
2712 CMFloatBitmap = record
2713 version: UNSIGNEDLONG;
2714 buffers: array [0..15] of Float32Ptr;
2715 height: size_t;
2716 width: size_t;
2717 rowStride: SIGNEDLONG;
2718 colStride: SIGNEDLONG;
2719 space: OSType;
2720 flags: CMFloatBitmapFlags;
2721 end;
2722
2723 type
2724 IlluminantArray = array [0..2] of Float32;
2725
2726 { D50 illuminant (0.9642, 1.0000, 0.8249) }
2727 var kCMIlluminantD50: IlluminantArray; external name '_kCMIlluminantD50'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2728
2729
2730 { D65 illuminant (0.9504, 1.0000, 1.0889)}
2731 var kCMIlluminantD65: IlluminantArray; external name '_kCMIlluminantD65'; (* attribute const *)
2732 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2733
2734
2735
2736 {!
2737 @function CMFloatBitmapMakeChunky
2738 @abstract A handy funtion to fill in a CMFloatBitmap.
2739 @discussion Returns a filled in CMFloatBitmap structure given a single buffer of chunky data with no alpha.
2740 @param buffer (in) address of interleaved data
2741 @param height (in) height of bitmap in pixels
2742 @param width (in) width of bitmap in pixels
2743 @param space (in) colorsapce of the data
2744 @result a filled in CMFloatBitmap
2745 }
CMFloatBitmapMakeChunkynull2746 function CMFloatBitmapMakeChunky( var buffer: Float32; height: size_t; width: size_t; space: OSType ): CMFloatBitmap; external name '_CMFloatBitmapMakeChunky';
2747 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2748
2749
2750 {!
2751 @function CMConvertXYZFloatBitmap
2752 @abstract Used to convert CMFloatBitmaps between the related colorspaces XYZ, Yxy, Lab, and Luv.
2753 @discussion The buffer data from the source CMFloatBitmap is converted into the buffer data
2754 specified the destination CMFloatBitmap. Converion "in-place" is allowed.
2755 @param src (in) description of source data buffer to convert from
2756 @param srcIlluminantXYZ (in) required if src->space is XYZ or Yxy
2757 @param dst (in,out) description of destination data buffer to convert to
2758 @param dstIlluminantXYZ (in) required if dst->space is XYZ or Yxy
2759 @param method (in) the chromatic adaptation method to use
2760 }
CMConvertXYZFloatBitmapnull2761 function CMConvertXYZFloatBitmap( const (*var*) src: CMFloatBitmap; const (*var*) srcIlluminantXYZ: IlluminantArray; var dst: CMFloatBitmap; const (*var*) dstIlluminantXYZ: IlluminantArray; method: CMChromaticAdaptation ): CMError; external name '_CMConvertXYZFloatBitmap';
2762 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2763
2764
2765 {!
2766 @function CMConvertRGBFloatBitmap
2767 @abstract Used to convert CMFloatBitmaps between the related colorspaces RGB, HSV, and HLS.
2768 @discussion The buffer data from the source CMFloatBitmap is converted into the buffer data
2769 specified the destination CMFloatBitmap. Converion "in-place" is allowed.
2770 @param src (in) description of source data buffer to convert from
2771 @param dst (in,out) description of destination data buffer to convert to
2772 }
CMConvertRGBFloatBitmapnull2773 function CMConvertRGBFloatBitmap( const (*var*) src: CMFloatBitmap; var dst: CMFloatBitmap ): CMError; external name '_CMConvertRGBFloatBitmap';
2774 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2775
2776
2777 {!
2778 @function CMMatchFloatBitmap
2779 @abstract Used to convert CMFloatBitmaps using a CMWorldRef.
2780 @discussion The buffer data from the source CMFloatBitmap is converted into the buffer data
2781 specified the destination CMFloatBitmap. Converion "in-place" is allowed.
2782 @param cw (in) the CMWorldRef to convert with
2783 @param src (in) description of source data buffer to convert from
2784 @param dst (in,out) description of destination data buffer to convert to
2785 }
CMMatchFloatBitmapnull2786 function CMMatchFloatBitmap( cw: CMWorldRef; const (*var*) src: CMFloatBitmap; var dst: CMFloatBitmap ): CMError; external name '_CMMatchFloatBitmap';
2787 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2788
2789
2790 // #pragma mark --- CMMComponent.h ----
2791
2792
2793 procedure CWColorWorldSetProperty( cw: CMWorldRef; key: CFStringRef; value: CFTypeRef ); external name '_CWColorWorldSetProperty';
2794 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2795
2796
CWColorWorldGetPropertynull2797 function CWColorWorldGetProperty( cw: CMWorldRef; key: CFStringRef ): UnivPtr; external name '_CWColorWorldGetProperty';
2798 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2799
2800 {
2801 The following declarations specify the calling conventions for CMM entry-points on Mac OS X.
2802 }
2803
2804 { Required }
CMM_ConcatColorWorldnull2805 function CMM_ConcatColorWorld( cw: CMWorldRef; var profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UnivPtr ): CMError; external name '_CMM_ConcatColorWorld';
2806 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2807
CMM_MatchColorsnull2808 function CMM_MatchColors( cw: CMWorldRef; var colors: CMColor; count: UInt32 ): CMError; external name '_CMM_MatchColors';
2809 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2810
CMM_CheckColorsnull2811 function CMM_CheckColors( cw: CMWorldRef; var colors: CMColor; count: UInt32; var result: UInt8 ): CMError; external name '_CMM_CheckColors';
2812 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2813
2814 { Optional }
2815
CMM_ValidateProfilenull2816 function CMM_ValidateProfile( prof: CMProfileRef; var valid: Boolean ): CMError; external name '_CMM_ValidateProfile';
2817 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2818
2819 {$ifc not _DECLARE_CS_QD_API_}
2820
CMM_MatchBitmapnull2821 function CMM_MatchBitmap( cw: CMWorldRef; var bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var matchedBitmap: CMBitmap ): CMError; external name '_CMM_MatchBitmap';
2822 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2823
CMM_CheckBitmapnull2824 function CMM_CheckBitmap( cw: CMWorldRef; const (*var*) bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var resultBitmap: CMBitmap ): CMError; external name '_CMM_CheckBitmap';
2825 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2826
2827 {$endc} {not _DECLARE_CS_QD_API_}
2828
CMM_MatchFloatBitmapnull2829 function CMM_MatchFloatBitmap( cw: CMWorldRef; const (*var*) bitmap: CMFloatBitmap; var resultBitmap: CMFloatBitmap ): CMError; external name '_CMM_MatchFloatBitmap';
2830 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2831
CMM_CreateLinkProfilenull2832 function CMM_CreateLinkProfile( prof: CMProfileRef; var profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UnivPtr ): CMError; external name '_CMM_CreateLinkProfile';
2833 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2834
CMM_GetPropertynull2835 function CMM_GetProperty( cw: CMWorldRef; requestedKey: CFStringRef ): CFTypeRef; external name '_CMM_GetProperty';
2836 (* DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER *)
2837
2838
2839 //#pragma mark --- CMScriptingPlugin.h ----
2840
2841 {$ifc not TARGET_CPU_64}
2842
2843
2844 const
2845 { ColorSync Scripting Errors }
2846 cmspInvalidImageFile = -4220; { Plugin cannot handle this image file type }
2847 cmspInvalidImageSpace = -4221; { Plugin cannot create an image file of this colorspace }
2848 cmspInvalidProfileEmbed = -4222; { Specific invalid profile errors }
2849 cmspInvalidProfileSource = -4223;
2850 cmspInvalidProfileDest = -4224;
2851 cmspInvalidProfileProof = -4225;
2852 cmspInvalidProfileLink = -4226;
2853
2854
2855 {*** embedFlags field ***}
2856 { reserved for future use: currently 0 }
2857
2858 {*** matchFlags field ***}
2859 const
2860 cmspFavorEmbeddedMask = $00000001; { if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present}
2861
2862
CMValidImagenull2863 function CMValidImage( const (*var*) spec: FSSpec ): CMError; external name '_CMValidImage';
2864 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2865
2866
CMGetImageSpacenull2867 function CMGetImageSpace( const (*var*) spec: FSSpec; var space: OSType ): CMError; external name '_CMGetImageSpace';
2868 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2869
2870
CMEmbedImagenull2871 function CMEmbedImage( const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: Boolean; embProf: CMProfileRef ): CMError; external name '_CMEmbedImage';
2872 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2873
2874
CMUnembedImagenull2875 function CMUnembedImage( const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: Boolean ): CMError; external name '_CMUnembedImage';
2876 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2877
2878
CMMatchImagenull2879 function CMMatchImage( const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: Boolean; qual: UInt32; srcProf: CMProfileRef; srcIntent: UInt32; dstProf: CMProfileRef ): CMError; external name '_CMMatchImage';
2880 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2881
2882
CMProofImagenull2883 function CMProofImage( const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: Boolean; qual: UInt32; srcProf: CMProfileRef; srcIntent: UInt32; dstProf: CMProfileRef; prfProf: CMProfileRef ): CMError; external name '_CMProofImage';
2884 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2885
2886
CMLinkImagenull2887 function CMLinkImage( const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: Boolean; qual: UInt32; lnkProf: CMProfileRef; lnkIntent: UInt32 ): CMError; external name '_CMLinkImage';
2888 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2889
2890
CMCountImageProfilesnull2891 function CMCountImageProfiles( const (*var*) spec: FSSpec; var count: UInt32 ): CMError; external name '_CMCountImageProfiles';
2892 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2893
2894
CMGetIndImageProfilenull2895 function CMGetIndImageProfile( const (*var*) spec: FSSpec; index: UInt32; var prof: CMProfileRef ): CMError; external name '_CMGetIndImageProfile';
2896 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2897
2898
CMSetIndImageProfilenull2899 function CMSetIndImageProfile( const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: Boolean; index: UInt32; prof: CMProfileRef ): CMError; external name '_CMSetIndImageProfile';
2900 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
2901
2902
2903 {$endc} {not TARGET_CPU_64}
2904
2905 //#pragma mark -- CMDeviceIntegration.h
2906
2907
2908 {$ifc not TARGET_CPU_64}
2909 {$ALIGN MAC68K}
2910 {$elsec}
2911 {$packrecords c}
2912 {$endc} {not TARGET_CPU_64}
2913 {
2914 The current versions of the data structure
2915 containing information on registered devices.
2916 }
2917 const
2918 cmDeviceInfoVersion1 = $00010000;
2919 cmDeviceProfileInfoVersion1 = $00010000;
2920 cmDeviceProfileInfoVersion2 = $00020000;
2921
2922 const
2923 cmCurrentDeviceInfoVersion = cmDeviceInfoVersion1;
2924 cmCurrentProfileInfoVersion = cmDeviceProfileInfoVersion1;
2925
2926 {
2927 Certain APIs require a device ID or profile ID.
2928 In some cases, a "default ID" can be used.
2929 }
2930 const
2931 cmDefaultDeviceID = 0;
2932 cmDefaultProfileID = 0;
2933
2934 {
2935 Possible values for device states accessible by the
2936 CMGetDeviceState() and CMSetDeviceState() APIs.
2937 }
2938 const
2939 cmDeviceStateDefault = $00000000;
2940 cmDeviceStateOffline = $00000001;
2941 cmDeviceStateBusy = $00000002;
2942 cmDeviceStateForceNotify = $80000000;
2943 cmDeviceStateDeviceRsvdBits = $00FF0000;
2944 cmDeviceStateAppleRsvdBits = $FF00FFFF;
2945
2946 {
2947 Possible values for flags passed to the
2948 CMIterateDeviceProfiles() API.
2949
2950 "Factory" profiles are registered via the
2951 CMSetDeviceFactoryProfiles() API.
2952
2953 "Custom" profiles are those which are meant to take
2954 the place of the factory profiles, as a result of
2955 customization or calibration. These profiles are
2956 registered via the CMSetDeviceProfiles() API.
2957
2958 To retrieve all of the the former for all devices,
2959 use cmIterateFactoryDeviceProfiles as the flags
2960 value when calling CMIterateDeviceProfiles().
2961
2962 To retrieve only the latter for all devices, use
2963 the cmIterateCustomDeviceProfiles, as the flags
2964 value when calling CMIterateDeviceProfiles().
2965
2966 To get the profiles in use for all devices, use
2967 cmIterateCurrentDeviceProfiles as the flags value.
2968 This will replace the factory profiles with any
2969 overrides, yielding the currently used set.
2970
2971 To get all profiles, without replacement, use
2972 cmIterateAllDeviceProfiles.
2973 }
2974 const
2975 cmIterateFactoryDeviceProfiles = $00000001;
2976 cmIterateCustomDeviceProfiles = $00000002;
2977 cmIterateCurrentDeviceProfiles = $00000003;
2978 cmIterateAllDeviceProfiles = $00000004;
2979 cmIterateDeviceProfilesMask = $0000000F;
2980
2981 {
2982 Errors returned by CMDeviceIntegration APIs
2983 }
2984 const
2985 cmDeviceDBNotFoundErr = -4227; { Prefs not found/loaded }
2986 cmDeviceAlreadyRegistered = -4228; { Re-registration of device }
2987 cmDeviceNotRegistered = -4229; { Device not found }
2988 cmDeviceProfilesNotFound = -4230; { Profiles not found }
2989 cmInternalCFErr = -4231; { CoreFoundation failure }
2990 cmPrefsSynchError = -4232; { CFPreferencesSynchronize failed }
2991
2992
2993 {
2994 Clients can register for notifications of device changes:
2995 Notification Description Sent by API
2996 ---------------- ----------- -----------
2997 DeviceRegistered a device was registered CMRegisterColorDevice()
2998 DeviceUnregistered a device was unregistered CMUnregisterColorDevice()
2999 DeviceOnline a device's state changed to Online CMSetDeviceState()
3000 DeviceOffline a device's state changed to Offline CMSetDeviceState()
3001 DeviceState a device's state changed CMSetDeviceState()
3002 DefaultDevice a class' default device changed CMSetDefaultDevice()
3003 DeviceProfiles a device's profiles changed CMSetDeviceFactoryProfiles(), CMSetDeviceProfiles()
3004 DefaultDeviceProfile a device's default profile ID changed CMSetDeviceDefaultProfileID()
3005 DisplayDeviceProfiles a display device's profiles changed CMSetDeviceFactoryProfiles(), CMSetDeviceProfiles()
3006 }
3007 {$ifc USE_CFSTR_CONSTANT_MACROS}
3008 {$definec kCMDeviceRegisteredNotification CFSTRP('CMDeviceRegisteredNotification')}
3009 {$endc}
3010 {$ifc USE_CFSTR_CONSTANT_MACROS}
3011 {$definec kCMDeviceUnregisteredNotification CFSTRP('CMDeviceUnregisteredNotification')}
3012 {$endc}
3013 {$ifc USE_CFSTR_CONSTANT_MACROS}
3014 {$definec kCMDeviceOnlineNotification CFSTRP('CMDeviceOnlineNotification')}
3015 {$endc}
3016 {$ifc USE_CFSTR_CONSTANT_MACROS}
3017 {$definec kCMDeviceOfflineNotification CFSTRP('CMDeviceOfflineNotification')}
3018 {$endc}
3019 {$ifc USE_CFSTR_CONSTANT_MACROS}
3020 {$definec kCMDeviceStateNotification CFSTRP('CMDeviceStateNotification')}
3021 {$endc}
3022 {$ifc USE_CFSTR_CONSTANT_MACROS}
3023 {$definec kCMDefaultDeviceNotification CFSTRP('CMDefaultDeviceNotification')}
3024 {$endc}
3025 {$ifc USE_CFSTR_CONSTANT_MACROS}
3026 {$definec kCMDeviceProfilesNotification CFSTRP('CMDeviceProfilesNotification')}
3027 {$endc}
3028 {$ifc USE_CFSTR_CONSTANT_MACROS}
3029 {$definec kCMDefaultDeviceProfileNotification CFSTRP('CMDefaultDeviceProfileNotification')}
3030 {$endc}
3031 {$ifc USE_CFSTR_CONSTANT_MACROS}
3032 {$definec kCMDisplayDeviceProfilesNotification CFSTRP('CMDisplayDeviceProfilesNotification')}
3033 {$endc}
3034
3035 {
3036 Device state data.
3037 }
3038 type
3039 CMDeviceState = UInt32;
3040
3041 {
3042 A CMDeviceID must be unique within a device's class.
3043 }
3044
3045 type
3046 CMDeviceID = UInt32;
3047
3048 {
3049 A CMDeviceProfileID must only be unique per device.
3050 }
3051 type
3052 CMDeviceProfileID = UInt32;
3053 CMDeviceProfileIDPtr = ^CMDeviceProfileID;
3054 {
3055 DeviceClass type.
3056 }
3057 const
3058 cmScannerDeviceClass = FourCharCode('scnr');
3059 cmCameraDeviceClass = FourCharCode('cmra');
3060 cmDisplayDeviceClass = FourCharCode('mntr');
3061 cmPrinterDeviceClass = FourCharCode('prtr');
3062 cmProofDeviceClass = FourCharCode('pruf');
3063
3064 type
3065 CMDeviceClass = OSType;
3066
3067 {
3068 CMDeviceScope
3069 Structure specifying a device's or a device setting's scope.
3070 }
3071 type
3072 CMDeviceScopePtr = ^CMDeviceScope;
3073 CMDeviceScope = record
3074 deviceUser: CFStringRef; { kCFPreferencesCurrentUser | _AnyUser }
3075 deviceHost: CFStringRef; { kCFPreferencesCurrentHost | _AnyHost }
3076 end;
3077 CMDeviceProfileScope = CMDeviceScope;
3078 CMDeviceProfileScopePtr = ^CMDeviceProfileScope;
3079
3080 {
3081 CMDeviceInfo
3082 Structure containing information on a given device.
3083 }
3084 type
3085 CMDeviceInfoPtr = ^CMDeviceInfo;
3086 CMDeviceInfo = record
3087 dataVersion: UInt32; { cmDeviceInfoVersion1 }
3088 deviceClass: CMDeviceClass; { device class }
3089 deviceID: CMDeviceID; { device ID }
3090 deviceScope: CMDeviceScope; { device's scope }
3091 deviceState: CMDeviceState; { Device State flags }
3092 defaultProfileID: CMDeviceProfileID; { Can change }
3093 deviceName: CFDictionaryRefPtr; { Ptr to storage for CFDictionary of }
3094 { localized device names (could be nil) }
3095 profileCount: UInt32; { Count of registered profiles }
3096 reserved: UInt32; { Reserved for use by ColorSync }
3097 end;
3098
3099 {
3100 CMDeviceProfileInfo
3101 Structure containing information on a device profile.
3102 }
3103 type
3104 CMDeviceProfileInfoPtr = ^CMDeviceProfileInfo;
3105 CMDeviceProfileInfo = record
3106 dataVersion: UInt32; { cmDeviceProfileInfoVersion1 }
3107 profileID: CMDeviceProfileID; { The identifier for this profile }
3108 profileLoc: CMProfileLocation; { The profile's location }
3109 profileName: CFDictionaryRef; { CFDictionary of localized profile names }
3110 reserved: UInt32; { Reserved for use by ColorSync }
3111 end;
3112
3113 type
3114 NCMDeviceProfileInfoPtr = ^NCMDeviceProfileInfo;
3115 NCMDeviceProfileInfo = record
3116 dataVersion: UInt32; { cmDeviceProfileInfoVersion2 }
3117 profileID: CMDeviceProfileID; { The identifier for this profile }
3118 profileLoc: CMProfileLocation; { The profile's location }
3119 profileName: CFDictionaryRef; { CFDictionary of localized profile names }
3120 profileScope: CMDeviceProfileScope; { The scope this profile applies to }
3121 reserved: UInt32; { Reserved for use by ColorSync }
3122 end;
3123
3124
3125 {
3126 CMDeviceProfileArray
3127 Structure containing the profiles for a device.
3128 }
3129
3130 type
3131 CMDeviceProfileArrayPtr = ^CMDeviceProfileArray;
3132 CMDeviceProfileArray = record
3133 profileCount: UInt32; { Count of profiles in array }
3134 profiles: array [0..0] of CMDeviceProfileInfo; { The profile info records }
3135 end;
3136
3137 {
3138 Caller-supplied iterator functions
3139 }
3140
3141 type
constnull3142 CMIterateDeviceInfoProcPtr = function( const (*var*) deviceInfo: CMDeviceInfo; refCon: UnivPtr ): OSErr;
constnull3143 CMIterateDeviceProfileProcPtr = function( const (*var*) deviceInfo: CMDeviceInfo; const (*var*) profileInfo: NCMDeviceProfileInfo; refCon: UnivPtr ): OSErr;
3144
3145
3146 {
3147 Device Registration
3148 }
3149
3150 {!
3151 @function CMRegisterColorDevice
3152 @abstract Registers a device with ColorSync
3153 @discussion For a device to be recognized by ColorSync it needs to register itself
3154 via this API. After calling this API, the CMSetDeviceFactoryProfiles
3155 API should be called to specify the initial modes and profiles for the
3156 device. Registration need only happen once, when the device is installed.
3157 @param deviceClass (in) Device class to add
3158 @param deviceID (in) Device id to add
3159 @param deviceName (in) Dictionary containing localized names
3160 @param deviceScope (in) Scope where information should be stored
3161 }
CMRegisterColorDevicenull3162 function CMRegisterColorDevice( deviceClass: CMDeviceClass; deviceID: CMDeviceID; deviceName: CFDictionaryRef; const (*var*) deviceScope: CMDeviceScope ): CMError; external name '_CMRegisterColorDevice';
3163 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3164
3165
3166 {!
3167 @function CMUnregisterColorDevice
3168 @abstract Unregisters a device with ColorSync
3169 @discussion When a device is no longer to be used on a system (as opposed to
3170 just being offline), it should be unregistered. If a device is
3171 temporariy shut down or disconnected it need not be unregistered
3172 unless the device driver knows that it will not be used (e.g. being
3173 deinstalled) or cannot access the device profiles without the device.
3174 @param deviceClass (in) Device class to remove
3175 @param deviceID (in) Device id to remove
3176 }
CMUnregisterColorDevicenull3177 function CMUnregisterColorDevice( deviceClass: CMDeviceClass; deviceID: CMDeviceID ): CMError; external name '_CMUnregisterColorDevice';
3178 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3179
3180 {
3181 Default Device accessors
3182 }
3183
3184 {!
3185 @function CMSetDefaultDevice
3186 @abstract Specifeis the default device of a class
3187 @param deviceClass (in) Device class to modify
3188 @param deviceID (in) Device id to make default
3189 }
CMSetDefaultDevicenull3190 function CMSetDefaultDevice( deviceClass: CMDeviceClass; deviceID: CMDeviceID ): CMError; external name '_CMSetDefaultDevice';
3191 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3192
3193
3194 {!
3195 @function CMGetDefaultDevice
3196 @abstract Returns the default device of a class
3197 @param deviceClass (in) Device class to query
3198 @param deviceID (out) Returns default device for class
3199 }
CMGetDefaultDevicenull3200 function CMGetDefaultDevice( deviceClass: CMDeviceClass; var deviceID: CMDeviceID ): CMError; external name '_CMGetDefaultDevice';
3201 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3202
3203
3204 {
3205 Device Profile Registration & Access
3206 }
3207
3208 {!
3209 @function CMSetDeviceFactoryProfiles
3210 @abstract Registers a device's factory profiles with ColorSync
3211 @discussion This API establishes the profiles used by a particular device for
3212 it's various modes. It is meant to be called once, right after
3213 device registration to notify ColorSync of the device's profiles.
3214 @param deviceClass (in) Device class to modify
3215 @param deviceID (in) Device id to modify
3216 @param defaultProfID (in) The id of the default profile
3217 @param deviceProfiles (in) List of profile IDs, names, and locations
3218 }
CMSetDeviceFactoryProfilesnull3219 function CMSetDeviceFactoryProfiles( deviceClass: CMDeviceClass; deviceID: CMDeviceID; defaultProfID: CMDeviceProfileID; const (*var*) deviceProfiles: CMDeviceProfileArray ): CMError; external name '_CMSetDeviceFactoryProfiles';
3220 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3221
3222 {!
3223 @function CMGetDeviceFactoryProfiles
3224 @abstract Returns all the device's factory profiles
3225 @discussion This API allows the caller to retrieve the original profiles for a device.
3226 These may differ from the profiles currently in use for that device in the
3227 case where factory profiles have been overriden with custom profiles.
3228 @param deviceClass (in) Device class to query
3229 @param deviceID (in) Device id to query (can be cmDefaultDeviceID)
3230 @param defaultProfID (out) Returns id of default mode (optional)
3231 @param arraySize (in/out) Size of buffer passed in / Returns size of array in bytes
3232 @param deviceProfiles (out) Returns list of profile IDs, names, and locations
3233 }
CMGetDeviceFactoryProfilesnull3234 function CMGetDeviceFactoryProfiles( deviceClass: CMDeviceClass; deviceID: CMDeviceID; defaultProfID: CMDeviceProfileIDPtr { can be NULL }; var arraySize: UInt32; var deviceProfiles: CMDeviceProfileArray ): CMError; external name '_CMGetDeviceFactoryProfiles';
3235 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3236
3237 {!
3238 @function CMSetDeviceProfiles
3239 @abstract Specifies custom overide profiles for a device
3240 @discussion This API provides a way to overide the factory profiles of a device for
3241 a particular mode or modes. To set custom profiles, the profileScope and
3242 deviceProfiles params must be valid. To remove all custom profiles of a
3243 device, pass in nil for the profileScope and deviceProfiles parameters.
3244 @param deviceClass (in) Device class to change
3245 @param deviceID (in) Device id to change (can be cmDefaultDeviceID)
3246 @param profileScope (in) Scope where information should be stored (or nil to remove all)
3247 @param deviceProfiles (in) Profiles to set (or nil to remove all)
3248 }
3249 {$ifc not TARGET_CPU_64}
CMSetDeviceProfilesnull3250 function CMSetDeviceProfiles( deviceClass: CMDeviceClass; deviceID: CMDeviceID; {const} profileScope: CMDeviceProfileScopePtr { can be NULL }; {const} deviceProfiles: CMDeviceProfileArrayPtr { can be NULL } ): CMError; external name '_CMSetDeviceProfiles';
3251 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
3252 {$endc} {not TARGET_CPU_64}
3253
3254
3255 {!
3256 @function CMGetDeviceProfiles
3257 @abstract Returns all the device's current profiles
3258 @discussion This API allows the caller to retrieve the current profiles for a device.
3259 @param deviceClass (in) Device class to query
3260 @param deviceID (in) Device id to query (can be cmDefaultDeviceID)
3261 @param arraySize (in/out) Size of buffer passed in / Returns size of array in bytes
3262 @param deviceProfiles (out) Returns list of profile IDs, names, and locations
3263 }
3264 {$ifc not TARGET_CPU_64}
CMGetDeviceProfilesnull3265 function CMGetDeviceProfiles( deviceClass: CMDeviceClass; deviceID: CMDeviceID; var arraySize: UInt32; var deviceProfiles: CMDeviceProfileArray ): CMError; external name '_CMGetDeviceProfiles';
3266 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
3267 {$endc} {not TARGET_CPU_64}
3268
3269
3270 {!
3271 @function CMSetDeviceDefaultProfileID
3272 @abstract Specifies a device's default profile mode
3273 @discussion This API allows the caller to change the default profile ID for a device.
3274 The initial default is established when CMSetDeviceFactoryProfiles is called.
3275 @param deviceClass (in) Device class to modify
3276 @param deviceID (in) Device id to modify (can be cmDefaultDeviceID)
3277 @param defaultProfID (in) New device default
3278 }
CMSetDeviceDefaultProfileIDnull3279 function CMSetDeviceDefaultProfileID( deviceClass: CMDeviceClass; deviceID: CMDeviceID; defaultProfID: CMDeviceProfileID ): CMError; external name '_CMSetDeviceDefaultProfileID';
3280 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3281
3282 {!
3283 @function CMGetDeviceDefaultProfileID
3284 @abstract Returns the default profile ID for a device
3285 @param deviceClass (in) Device class to query
3286 @param deviceID (in) Device id to query (can be cmDefaultDeviceID)
3287 @param defaultProfID (out) Returns id of default profile
3288 }
CMGetDeviceDefaultProfileIDnull3289 function CMGetDeviceDefaultProfileID( deviceClass: CMDeviceClass; deviceID: CMDeviceID; var defaultProfID: CMDeviceProfileID ): CMError; external name '_CMGetDeviceDefaultProfileID';
3290 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3291
3292 {!
3293 @function CMSetDeviceProfile
3294 @abstract Specifies a custom overide profile for a device
3295 @discussion This API provides a way to change one of the profiles used by a
3296 device for a particular mode. It can be called after
3297 device registration by calibration applications to reset a device's
3298 profile from its factory default to a custom calibrated profile.
3299 @param deviceClass (in) Device class to modify
3300 @param deviceID (in) Device id to modify (can be cmDefaultDeviceID)
3301 @param profileScope (in) Scope where information should be stored
3302 @param profileID (in) Profile id to modify (can be cmDefaultProfileID)
3303 @param profileLoc (in) New profile location
3304 }
CMSetDeviceProfilenull3305 function CMSetDeviceProfile( deviceClass: CMDeviceClass; deviceID: CMDeviceID; const (*var*) profileScope: CMDeviceProfileScope; profileID: CMDeviceProfileID; const (*var*) profileLoc: CMProfileLocation ): CMError; external name '_CMSetDeviceProfile';
3306 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3307
3308 {!
3309 @function CMGetDeviceProfile
3310 @abstract Returns the location of the current profile for a
3311 given device class, device ID, and profile ID
3312 @param deviceClass (in) Device class to query
3313 @param deviceID (in) Device id to query (can be cmDefaultDeviceID)
3314 @param profileID (in) Profile id to query (can be cmDefaultDeviceID)
3315 @param profileLoc (out) Returns profile location
3316 }
CMGetDeviceProfilenull3317 function CMGetDeviceProfile( deviceClass: CMDeviceClass; deviceID: CMDeviceID; profileID: CMDeviceProfileID; var profileLoc: CMProfileLocation ): CMError; external name '_CMGetDeviceProfile';
3318 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3319
3320 {
3321 Other Device State/Info accessors
3322 }
3323
3324 {!
3325 @function CMSetDeviceState
3326 @abstract Specifies the state of a device
3327 @discussion This API provides access for the device management layer to
3328 update the state of a particular device. For example, a device
3329 can be offline, busy, calibrated, etc. The state data passed in
3330 replaces the old state data with the new value.
3331 @param deviceClass (in) Device class to modify
3332 @param deviceID (in) Device id to modify (can be cmDefaultDeviceID)
3333 @param deviceState (in) New device state
3334 }
CMSetDeviceStatenull3335 function CMSetDeviceState( deviceClass: CMDeviceClass; deviceID: CMDeviceID; deviceState: CMDeviceState ): CMError; external name '_CMSetDeviceState';
3336 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3337
3338 {!
3339 @function CMGetDeviceState
3340 @abstract Returns the state of a device.
3341 @param deviceClass (in) Device class to query
3342 @param deviceID (in) Device id to query (can be cmDefaultDeviceID)
3343 @param deviceState (out) Returns device state
3344 }
CMGetDeviceStatenull3345 function CMGetDeviceState( deviceClass: CMDeviceClass; deviceID: CMDeviceID; var deviceState: CMDeviceState ): CMError; external name '_CMGetDeviceState';
3346 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3347
3348 {!
3349 @function CMGetDeviceInfo
3350 @abstract Returns information about a device.
3351 @discussion This API returns information about a registered device.
3352 If, on input, deviceInfo->deviceName is nil then the name is not returned.
3353 If the caller wants the device name dictionary returned, then the caller
3354 should provide in deviceInfo->deviceName the address where this API should
3355 store the CFDictionaryRef. The caller is responsible for disposing of the
3356 name dictionary.
3357 @param deviceClass (in) Device class to query
3358 @param deviceID (in) Device id to query (can be cmDefaultDeviceID)
3359 @param deviceInfo (in/out) Returns device information
3360 }
CMGetDeviceInfonull3361 function CMGetDeviceInfo( deviceClass: CMDeviceClass; deviceID: CMDeviceID; var deviceInfo: CMDeviceInfo ): CMError; external name '_CMGetDeviceInfo';
3362 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3363
3364 {
3365 Device Info & Profile Iterators
3366 }
3367
3368 {!
3369 @function CMIterateColorDevices
3370 @abstract Returns information about all devices to a callback procedure.
3371 @discussion This API allows the caller to get device information about all
3372 registered color devices. If provided, the supplied proceedure will be
3373 called once for each registered device, passing in the device info and
3374 the supplied refcon.
3375 If the caller passes in a pointer to a seed value that is the same as
3376 the current seed value, then the callback proc is not called.
3377 @param proc (in) Client callback proc (optional)
3378 @param seed (in/out) seed value (optional)
3379 @param count (out) Returns count of devices (optional)
3380 @param refCon (in) Passed to callback proc (optional)
3381 }
CMIterateColorDevicesnull3382 function CMIterateColorDevices( proc: CMIterateDeviceInfoProcPtr { can be NULL }; seed: UInt32Ptr { can be NULL }; count: UInt32Ptr { can be NULL }; refCon: UnivPtr { can be NULL } ): CMError; external name '_CMIterateColorDevices';
3383 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3384
3385 {!
3386 @function CMIterateDeviceProfiles
3387 @abstract Returns information about profiles of all devices to a callback procedure.
3388 @discussion This API allows the caller to get device information about profiles of all
3389 registered color devices. If provided, the supplied proceedure will be
3390 called once for each registered device, passing in the device info, the
3391 profile info and the supplied refcon.
3392 If the caller passes in a pointer to a seed value that is the same as
3393 the current seed value, then the callback proc is not called.
3394 @param proc (in) Client callback proc (optional)
3395 @param seed (in/out) seed value (optional)
3396 @param count (out) Returns count of devices (optional)
3397 @param flags (in) Options for which set of profiles are to be iterated.
3398 It can have the following possible values:
3399 cmIterateFactoryDeviceProfiles, cmIterateCustomDeviceProfiles,
3400 cmIterateCurrentDeviceProfiles, cmIterateAllDeviceProfiles or 0.
3401 The flag value 0 behaves like cmIterateCurrentDeviceProfiles.
3402 @param refCon (in) Passed to callback proc (optional)
3403 }
CMIterateDeviceProfilesnull3404 function CMIterateDeviceProfiles( proc: CMIterateDeviceProfileProcPtr { can be NULL }; seed: UInt32Ptr { can be NULL }; count: UInt32Ptr { can be NULL }; flags: UInt32; refCon: UnivPtr { can be NULL } ): CMError; external name '_CMIterateDeviceProfiles';
3405 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3406 {$endc} {TARGET_OS_MAC}
3407
3408 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
3409
3410 end.
3411 {$endc} {not MACOSALLINCLUDE}
3412