1 {
2 * ColorSync - ColorSyncProfile.h
3 * Copyright (c) 2008 Apple Inc.
4 * All rights reserved.
5 }
6 { Pascal Translation: 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 ColorSyncProfile;
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,CFBase,CFArray,CFData,CFDictionary,CFError,CFUUID;
208 {$endc} {not MACOSALLINCLUDE}
209
210
211 {$ifc TARGET_OS_MAC}
212
213 {$ALIGN POWER}
214
215
216 type
217 ColorSyncProfileRef = ^OpaqueColorSyncProfileRef; { an opaque type }
218 OpaqueColorSyncProfileRef = record end;
219
220 type
221 ColorSyncProfile_ = record end;
222 ColorSyncMutableProfileRef = ^ColorSyncProfile_;
223
224 var kColorSyncGenericGrayProfile: CFStringRef; external name '_kColorSyncGenericGrayProfile'; (* attribute const *) { com.apple.ColorSync.GenericGray }
225 var kColorSyncGenericGrayGamma22Profile: CFStringRef; external name '_kColorSyncGenericGrayGamma22Profile'; (* attribute const *) { com.apple.ColorSync.GenericGrayGamma2.2 }
226 var kColorSyncGenericRGBProfile: CFStringRef; external name '_kColorSyncGenericRGBProfile'; (* attribute const *) { com.apple.ColorSync.GenericRGB }
227 var kColorSyncGenericCMYKProfile: CFStringRef; external name '_kColorSyncGenericCMYKProfile'; (* attribute const *) { com.apple.ColorSync.GenericCMYK }
228 var kColorSyncSRGBProfile: CFStringRef; external name '_kColorSyncSRGBProfile'; (* attribute const *) { com.apple.ColorSync.sRGB }
229 var kColorSyncAdobeRGB1998Profile: CFStringRef; external name '_kColorSyncAdobeRGB1998Profile'; (* attribute const *) { com.apple.ColorSync.AdobeRGB1998 }
230 var kColorSyncGenericLabProfile: CFStringRef; external name '_kColorSyncGenericLabProfile'; (* attribute const *) { com.apple.ColorSync.GenericLab }
231 var kColorSyncGenericXYZProfile: CFStringRef; external name '_kColorSyncGenericXYZProfile'; (* attribute const *) { com.apple.ColorSync.GenericXYZ }
232
233 var kColorSyncProfileHeader: CFStringRef; external name '_kColorSyncProfileHeader'; (* attribute const *) { com.apple.ColorSync.ProfileHeader }
234 var kColorSyncProfileClass: CFStringRef; external name '_kColorSyncProfileClass'; (* attribute const *) { com.apple.ColorSync.ProfileClass }
235 var kColorSyncProfileColorSpace: CFStringRef; external name '_kColorSyncProfileColorSpace'; (* attribute const *) { com.apple.ColorSync.ProfileColorSpace }
236 var kColorSyncProfilePCS: CFStringRef; external name '_kColorSyncProfilePCS'; (* attribute const *) { com.apple.ColorSync.PCS }
237 var kColorSyncProfileURL: CFStringRef; external name '_kColorSyncProfileURL'; (* attribute const *) { com.apple.ColorSync.ProfileURL }
238 var kColorSyncProfileDescription: CFStringRef; external name '_kColorSyncProfileDescription'; (* attribute const *) { com.apple.ColorSync.ProfileDescription }
239 var kColorSyncProfileMD5Digest: CFStringRef; external name '_kColorSyncProfileMD5Digest'; (* attribute const *) { com.apple.ColorSync.ProfileMD5Digest }
240
ColorSyncProfileGetTypeIDnull241 function ColorSyncProfileGetTypeID: CFTypeID; external name '_ColorSyncProfileGetTypeID';
242 {
243 * returns the CFTypeID for ColorSyncProfiles.
244 }
245
ColorSyncProfileCreatenull246 function ColorSyncProfileCreate( data: CFDataRef; var error: CFErrorRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreate';
247 {
248 * data - profile data
249 * error - (optional) pointer to the error that will be returned in case of failure
250 *
251 * returns ColorSyncProfileRef or NULL in case of failure
252 }
253
ColorSyncProfileCreateWithURLnull254 function ColorSyncProfileCreateWithURL( url: CFURLRef; var error: CFErrorRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateWithURL';
255 {
256 * url - URL to the profile data (caller needs to have privileges to read url).
257 * error - (optional) pointer to the error that will be returned in case of failure
258 *
259 * returns ColorSyncProfileRef or NULL in case of failure
260 }
261
ColorSyncProfileCreateWithNamenull262 function ColorSyncProfileCreateWithName( name: CFStringRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateWithName';
263 {
264 * name - predefined profile name
265 *
266 * returns ColorSyncProfileRef or NULL in case of failure
267 }
268
ColorSyncProfileCreateWithDisplayIDnull269 function ColorSyncProfileCreateWithDisplayID( displayID: UInt32 ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateWithDisplayID';
270 {
271 * displayID - system-wide unique display ID (defined by IOKIt); pass 0 for main display.
272 *
273 * returns ColorSyncProfileRef or NULL in case of failure
274 }
275
ColorSyncProfileCreateDeviceProfilenull276 function ColorSyncProfileCreateDeviceProfile( deviceClass: CFStringRef; deviceID: CFUUIDRef; profileID: CFTypeRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateDeviceProfile';
277 {
278 * deviceClass - ColorSync device class
279 * deviceID - deviceID registered with ColorSync
280 * profileID - profileID registered with ColorSync; pass kColorSyncDeviceDefaultProfileID to get the default profile.
281 *
282 * See ColorSyncDevice.h for more info on deviceClass, deviceID and profileID
283 *
284 * returns ColorSyncProfileRef or NULL in case of failure
285 }
286
ColorSyncProfileCreateMutablenull287 function ColorSyncProfileCreateMutable: ColorSyncMutableProfileRef; external name '_ColorSyncProfileCreateMutable';
288 {
289 * returns empty ColorSyncMutableProfileRef or NULL in case of failure
290 }
291
ColorSyncProfileCreateMutableCopynull292 function ColorSyncProfileCreateMutableCopy( prof: ColorSyncProfileRef ): ColorSyncMutableProfileRef; external name '_ColorSyncProfileCreateMutableCopy';
293 {
294 * prof - profile from which profile data will be copied to the created profile.
295 *
296 * returns ColorSyncMutableProfileRef or NULL in case of failure
297 }
298
ColorSyncProfileCreateLinknull299 function ColorSyncProfileCreateLink( profileInfo: CFArrayRef; options: CFDictionaryRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateLink';
300 {
301 * profileInfo - array of dictionaries, each one containing a profile object and the
302 * information on the usage of the profile in the transform.
303 *
304 * Required keys:
305 * ==============
306 * kColorSyncProfile : ColorSyncProfileRef
307 * kColorSyncRenderingIntent : CFStringRef defining rendering intent
308 * kColorSyncTransformTag : CFStringRef defining which tags to use
309 * Optional key:
310 * =============
311 * kColorSyncBlackPointCompensation : CFBooleanRef to enable/disable BPC
312 *
313 * options - dictionary with additional public global options (e.g. preferred CMM, quality,
314 * etc... It can also contain custom options that are CMM specific.
315 *
316 * returns ColorSyncProfileRef or NULL in case of failure
317 }
318
ColorSyncProfileVerifynull319 function ColorSyncProfileVerify( prof: ColorSyncProfileRef; var errors: CFErrorRef; var warnings: CFErrorRef ): CBool; external name '_ColorSyncProfileVerify';
320 {
321 * prof - profile to be verified
322 *
323 * errors - returns error strings in case problems are found which
324 * would prevent use of the profile.
325 *
326 * warnings - returns warning strings indicating problems due to lack of
327 * conformance with the ICC specification, but not preventing
328 * use of the profile.
329 *
330 * returns true if profile can be used or false otherwise
331 }
332
ColorSyncProfileEstimateGammaWithDisplayIDnull333 function ColorSyncProfileEstimateGammaWithDisplayID( {const} displayID: SInt32; var error: CFErrorRef ): Float32; external name '_ColorSyncProfileEstimateGammaWithDisplayID';
334 {
335 * displayID - system-wide unique display ID (defined by IOKIt)
336 * error - (optional) pointer to the error that will be returned in
337 * case of failure
338 *
339 * returns non-zero value if success or 0.0 in case of error.
340 }
341
ColorSyncProfileEstimateGammanull342 function ColorSyncProfileEstimateGamma( prof: ColorSyncProfileRef; var error: CFErrorRef ): Float32; external name '_ColorSyncProfileEstimateGamma';
343 {
344 * prof - profile to perform estimation on
345 * error - (optional) pointer to the error that will be returned in
346 * case of failure
347 *
348 * returns non-zero value if success or 0.0 in case of error
349 }
350
351 const
352 COLORSYNC_MD5_LENGTH = 16;
353
354 type
355 ColorSyncMD5 = record
356 digest: array [0..COLORSYNC_MD5_LENGTH-1] of UInt8;
357 end;
358
ColorSyncProfileGetMD5null359 function ColorSyncProfileGetMD5( prof: ColorSyncProfileRef ): ColorSyncMD5; external name '_ColorSyncProfileGetMD5';
360 {
361 * returns MD5 digest for the profile calculated as defined by
362 * ICC specification or a "zero" signature (filled with zeros)
363 * in case of failure
364 }
365
ColorSyncProfileCopyDatanull366 function ColorSyncProfileCopyData( prof: ColorSyncProfileRef; var error: CFErrorRef ): CFDataRef; external name '_ColorSyncProfileCopyData';
367 {
368 * prof - profile to copy the flattened data from
369 * error - (optional) pointer to the error that will be returned in case of failure
370 *
371 * returns CFDataRef if success or NULL in case of failure
372 }
373
ColorSyncProfileGetURLnull374 function ColorSyncProfileGetURL( prof: ColorSyncProfileRef; var error: CFErrorRef ): CFURLRef; external name '_ColorSyncProfileGetURL';
375 {
376 * prof - profile to get URL from
377 * error - (optional) pointer to the error that will be returned in case of failure
378 *
379 * returns CFURLRef if success or NULL in case of failure
380 }
381
ColorSyncProfileCopyHeadernull382 function ColorSyncProfileCopyHeader( prof: ColorSyncProfileRef ): CFDataRef; external name '_ColorSyncProfileCopyHeader';
383 {
384 * prof - profile from which to copy the header
385 *
386 * returns CFDataRef containing profile header (in host endianess) or NULL in case of failure
387 }
388
389 procedure ColorSyncProfileSetHeader( prof: ColorSyncMutableProfileRef; header: CFDataRef ); external name '_ColorSyncProfileSetHeader';
390 {
391 * prof - profile in which to set the header
392 * header - CFDataRef containing the header data (must be in host endianess)
393 }
394
ColorSyncProfileCopyDescriptionStringnull395 function ColorSyncProfileCopyDescriptionString( prof: ColorSyncProfileRef ): CFStringRef; external name '_ColorSyncProfileCopyDescriptionString';
396 {
397 * prof - profile from which to copy description string
398 *
399 * returns CFStringRef containing profile description localized to current locale
400 }
401
ColorSyncProfileCopyTagSignaturesnull402 function ColorSyncProfileCopyTagSignatures( prof: ColorSyncProfileRef ): CFArrayRef; external name '_ColorSyncProfileCopyTagSignatures';
403 {
404 * prof - profile from which to copy tag signatures
405 *
406 * returns CFArray with signatures (CFStringRef) of tags in the profile
407 }
408
ColorSyncProfileContainsTagnull409 function ColorSyncProfileContainsTag( prof: ColorSyncProfileRef; signature: CFStringRef ): CBool; external name '_ColorSyncProfileContainsTag';
410 {
411 * prof - profile in which to search for the tag
412 * signature - signature of the tag to be searched for
413 *
414 * returns true if tag exists or false if does not
415 }
416
ColorSyncProfileCopyTagnull417 function ColorSyncProfileCopyTag( prof: ColorSyncProfileRef; signature: CFStringRef ): CFDataRef; external name '_ColorSyncProfileCopyTag';
418 {
419 * prof - profile from which to copy the tag
420 * signature - signature of the tag to be copied
421 *
422 * returns CFDataRef containing tag data or NULL in case of failure
423 }
424
425 procedure ColorSyncProfileSetTag( prof: ColorSyncMutableProfileRef; signature: CFStringRef; data: CFDataRef ); external name '_ColorSyncProfileSetTag';
426 {
427 * prof - profile in which to set the tag
428 * signature - signature of the tag to be set in the profile
429 * data - CFDataRef containing the tag data
430 }
431
432 procedure ColorSyncProfileRemoveTag( prof: ColorSyncMutableProfileRef; signature: CFStringRef ); external name '_ColorSyncProfileRemoveTag';
433 {
434 * prof - profile from which to remove the tag
435 * signature - signature of the tag to be removed
436 *
437 * returns true if success or false in case of failure
438 }
439
ColorSyncProfileGetDisplayTransferFormulaFromVCGTnull440 function ColorSyncProfileGetDisplayTransferFormulaFromVCGT( profile: ColorSyncProfileRef; var redMin: Float32; var redMax: Float32; var redGamma: Float32; var greenMin: Float32; var greenMax: Float32; var greenGamma: Float32; var blueMin: Float32; var blueMax: Float32; var blueGamma: Float32 ): CBool; external name '_ColorSyncProfileGetDisplayTransferFormulaFromVCGT';
441 (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
442 {
443 * An utility function converting vcgt tag (if vcgt tag exists in the profile and conversion possible)
444 * to formula components used by CGSetDisplayTransferByFormula.
445 }
446
ColorSyncProfileCreateDisplayTransferTablesFromVCGTnull447 function ColorSyncProfileCreateDisplayTransferTablesFromVCGT( profile: ColorSyncProfileRef; var nSamplesPerChannel: size_t ): CFDataRef; external name '_ColorSyncProfileCreateDisplayTransferTablesFromVCGT';
448 (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
449 {
450 * An utility function creating three tables of floats (redTable, greenTable, blueTable)
451 * each of size nSamplesPerChannel, packed into contiguous memory contained in the CFDataRef
452 * to be returned from the vcgt tag of the profile (if vcgt tag exists in the profile).
453 * Used by CGSetDisplayTransferByTable.
454 }
455
456
457 type
profileInfonull458 ColorSyncProfileIterateCallback = function( profileInfo: CFDictionaryRef; userInfo: UnivPtr ): CBool;
459 {
460 * Notes:
461 * 1. Only validated profiles will be passed to the caller
462 * 2. if the ColorSyncProfileIterateCallback returns false, the iteration stops
463 }
464
465 procedure ColorSyncIterateInstalledProfiles( callBack: ColorSyncProfileIterateCallback; seed: UInt32Ptr; userInfo: UnivPtr; var error: CFErrorRef ); external name '_ColorSyncIterateInstalledProfiles';
466 {
467 * callBack - pointer to a client provided function (can be NULL)
468 * seed - pointer to a cache seed owned by the client (can be NULL)
469 * error - (optional) pointer to the error that will be returned in case of failure
470 *
471 }
472
473 {$endc} {TARGET_OS_MAC}
474 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
475
476 end.
477 {$endc} {not MACOSALLINCLUDE}
478