ColorSyncProfile.pas 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. {
  2. * ColorSync - ColorSyncProfile.h
  3. * Copyright (c) 2008 Apple Inc.
  4. * All rights reserved.
  5. }
  6. { Pascal Translation: Jonas Maebe, <[email protected]>, October 2009 }
  7. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  8. {
  9. Modified for use with Free Pascal
  10. Version 308
  11. Please report any bugs to <[email protected]>
  12. }
  13. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  14. {$mode macpas}
  15. {$packenum 1}
  16. {$macro on}
  17. {$inline on}
  18. {$calling mwpascal}
  19. unit ColorSyncProfile;
  20. interface
  21. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  22. {$setc GAP_INTERFACES_VERSION := $0308}
  23. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  24. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  25. {$endc}
  26. {$ifc defined CPUPOWERPC and defined CPUI386}
  27. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  28. {$endc}
  29. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  30. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  31. {$endc}
  32. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  33. {$setc __ppc__ := 1}
  34. {$elsec}
  35. {$setc __ppc__ := 0}
  36. {$endc}
  37. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  38. {$setc __ppc64__ := 1}
  39. {$elsec}
  40. {$setc __ppc64__ := 0}
  41. {$endc}
  42. {$ifc not defined __i386__ and defined CPUI386}
  43. {$setc __i386__ := 1}
  44. {$elsec}
  45. {$setc __i386__ := 0}
  46. {$endc}
  47. {$ifc not defined __x86_64__ and defined CPUX86_64}
  48. {$setc __x86_64__ := 1}
  49. {$elsec}
  50. {$setc __x86_64__ := 0}
  51. {$endc}
  52. {$ifc not defined __arm__ and defined CPUARM}
  53. {$setc __arm__ := 1}
  54. {$elsec}
  55. {$setc __arm__ := 0}
  56. {$endc}
  57. {$ifc defined cpu64}
  58. {$setc __LP64__ := 1}
  59. {$elsec}
  60. {$setc __LP64__ := 0}
  61. {$endc}
  62. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  63. {$error Conflicting definitions for __ppc__ and __i386__}
  64. {$endc}
  65. {$ifc defined __ppc__ and __ppc__}
  66. {$setc TARGET_CPU_PPC := TRUE}
  67. {$setc TARGET_CPU_PPC64 := FALSE}
  68. {$setc TARGET_CPU_X86 := FALSE}
  69. {$setc TARGET_CPU_X86_64 := FALSE}
  70. {$setc TARGET_CPU_ARM := FALSE}
  71. {$setc TARGET_OS_MAC := TRUE}
  72. {$setc TARGET_OS_IPHONE := FALSE}
  73. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  74. {$setc TARGET_OS_EMBEDDED := FALSE}
  75. {$elifc defined __ppc64__ and __ppc64__}
  76. {$setc TARGET_CPU_PPC := FALSE}
  77. {$setc TARGET_CPU_PPC64 := TRUE}
  78. {$setc TARGET_CPU_X86 := FALSE}
  79. {$setc TARGET_CPU_X86_64 := FALSE}
  80. {$setc TARGET_CPU_ARM := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_IPHONE := FALSE}
  83. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  84. {$setc TARGET_OS_EMBEDDED := FALSE}
  85. {$elifc defined __i386__ and __i386__}
  86. {$setc TARGET_CPU_PPC := FALSE}
  87. {$setc TARGET_CPU_PPC64 := FALSE}
  88. {$setc TARGET_CPU_X86 := TRUE}
  89. {$setc TARGET_CPU_X86_64 := FALSE}
  90. {$setc TARGET_CPU_ARM := FALSE}
  91. {$ifc defined(iphonesim)}
  92. {$setc TARGET_OS_MAC := FALSE}
  93. {$setc TARGET_OS_IPHONE := TRUE}
  94. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  95. {$elsec}
  96. {$setc TARGET_OS_MAC := TRUE}
  97. {$setc TARGET_OS_IPHONE := FALSE}
  98. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  99. {$endc}
  100. {$setc TARGET_OS_EMBEDDED := FALSE}
  101. {$elifc defined __x86_64__ and __x86_64__}
  102. {$setc TARGET_CPU_PPC := FALSE}
  103. {$setc TARGET_CPU_PPC64 := FALSE}
  104. {$setc TARGET_CPU_X86 := FALSE}
  105. {$setc TARGET_CPU_X86_64 := TRUE}
  106. {$setc TARGET_CPU_ARM := FALSE}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$setc TARGET_OS_EMBEDDED := FALSE}
  111. {$elifc defined __arm__ and __arm__}
  112. {$setc TARGET_CPU_PPC := FALSE}
  113. {$setc TARGET_CPU_PPC64 := FALSE}
  114. {$setc TARGET_CPU_X86 := FALSE}
  115. {$setc TARGET_CPU_X86_64 := FALSE}
  116. {$setc TARGET_CPU_ARM := TRUE}
  117. { will require compiler define when/if other Apple devices with ARM cpus ship }
  118. {$setc TARGET_OS_MAC := FALSE}
  119. {$setc TARGET_OS_IPHONE := TRUE}
  120. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  121. {$setc TARGET_OS_EMBEDDED := TRUE}
  122. {$elsec}
  123. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  124. {$endc}
  125. {$ifc defined __LP64__ and __LP64__ }
  126. {$setc TARGET_CPU_64 := TRUE}
  127. {$elsec}
  128. {$setc TARGET_CPU_64 := FALSE}
  129. {$endc}
  130. {$ifc defined FPC_BIG_ENDIAN}
  131. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  132. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  133. {$elifc defined FPC_LITTLE_ENDIAN}
  134. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  135. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  136. {$elsec}
  137. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  138. {$endc}
  139. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  140. {$setc CALL_NOT_IN_CARBON := FALSE}
  141. {$setc OLDROUTINENAMES := FALSE}
  142. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  143. {$setc OPAQUE_UPP_TYPES := TRUE}
  144. {$setc OTCARBONAPPLICATION := TRUE}
  145. {$setc OTKERNEL := FALSE}
  146. {$setc PM_USE_SESSION_APIS := TRUE}
  147. {$setc TARGET_API_MAC_CARBON := TRUE}
  148. {$setc TARGET_API_MAC_OS8 := FALSE}
  149. {$setc TARGET_API_MAC_OSX := TRUE}
  150. {$setc TARGET_CARBON := TRUE}
  151. {$setc TARGET_CPU_68K := FALSE}
  152. {$setc TARGET_CPU_MIPS := FALSE}
  153. {$setc TARGET_CPU_SPARC := FALSE}
  154. {$setc TARGET_OS_UNIX := FALSE}
  155. {$setc TARGET_OS_WIN32 := FALSE}
  156. {$setc TARGET_RT_MAC_68881 := FALSE}
  157. {$setc TARGET_RT_MAC_CFM := FALSE}
  158. {$setc TARGET_RT_MAC_MACHO := TRUE}
  159. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  160. {$setc TYPE_BOOL := FALSE}
  161. {$setc TYPE_EXTENDED := FALSE}
  162. {$setc TYPE_LONGLONG := TRUE}
  163. uses MacTypes,CFBase,CFArray,CFData,CFDictionary,CFError,CFUUID;
  164. {$endc} {not MACOSALLINCLUDE}
  165. {$ifc TARGET_OS_MAC}
  166. {$ALIGN POWER}
  167. type
  168. ColorSyncProfileRef = ^OpaqueColorSyncProfileRef; { an opaque type }
  169. OpaqueColorSyncProfileRef = record end;
  170. type
  171. ColorSyncProfile_ = record end;
  172. ColorSyncMutableProfileRef = ^ColorSyncProfile_;
  173. var kColorSyncGenericGrayProfile: CFStringRef; external name '_kColorSyncGenericGrayProfile'; (* attribute const *) { com.apple.ColorSync.GenericGray }
  174. var kColorSyncGenericGrayGamma22Profile: CFStringRef; external name '_kColorSyncGenericGrayGamma22Profile'; (* attribute const *) { com.apple.ColorSync.GenericGrayGamma2.2 }
  175. var kColorSyncGenericRGBProfile: CFStringRef; external name '_kColorSyncGenericRGBProfile'; (* attribute const *) { com.apple.ColorSync.GenericRGB }
  176. var kColorSyncGenericCMYKProfile: CFStringRef; external name '_kColorSyncGenericCMYKProfile'; (* attribute const *) { com.apple.ColorSync.GenericCMYK }
  177. var kColorSyncSRGBProfile: CFStringRef; external name '_kColorSyncSRGBProfile'; (* attribute const *) { com.apple.ColorSync.sRGB }
  178. var kColorSyncAdobeRGB1998Profile: CFStringRef; external name '_kColorSyncAdobeRGB1998Profile'; (* attribute const *) { com.apple.ColorSync.AdobeRGB1998 }
  179. var kColorSyncGenericLabProfile: CFStringRef; external name '_kColorSyncGenericLabProfile'; (* attribute const *) { com.apple.ColorSync.GenericLab }
  180. var kColorSyncGenericXYZProfile: CFStringRef; external name '_kColorSyncGenericXYZProfile'; (* attribute const *) { com.apple.ColorSync.GenericXYZ }
  181. var kColorSyncProfileHeader: CFStringRef; external name '_kColorSyncProfileHeader'; (* attribute const *) { com.apple.ColorSync.ProfileHeader }
  182. var kColorSyncProfileClass: CFStringRef; external name '_kColorSyncProfileClass'; (* attribute const *) { com.apple.ColorSync.ProfileClass }
  183. var kColorSyncProfileColorSpace: CFStringRef; external name '_kColorSyncProfileColorSpace'; (* attribute const *) { com.apple.ColorSync.ProfileColorSpace }
  184. var kColorSyncProfilePCS: CFStringRef; external name '_kColorSyncProfilePCS'; (* attribute const *) { com.apple.ColorSync.PCS }
  185. var kColorSyncProfileURL: CFStringRef; external name '_kColorSyncProfileURL'; (* attribute const *) { com.apple.ColorSync.ProfileURL }
  186. var kColorSyncProfileDescription: CFStringRef; external name '_kColorSyncProfileDescription'; (* attribute const *) { com.apple.ColorSync.ProfileDescription }
  187. var kColorSyncProfileMD5Digest: CFStringRef; external name '_kColorSyncProfileMD5Digest'; (* attribute const *) { com.apple.ColorSync.ProfileMD5Digest }
  188. function ColorSyncProfileGetTypeID: CFTypeID; external name '_ColorSyncProfileGetTypeID';
  189. {
  190. * returns the CFTypeID for ColorSyncProfiles.
  191. }
  192. function ColorSyncProfileCreate( data: CFDataRef; var error: CFErrorRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreate';
  193. {
  194. * data - profile data
  195. * error - (optional) pointer to the error that will be returned in case of failure
  196. *
  197. * returns ColorSyncProfileRef or NULL in case of failure
  198. }
  199. function ColorSyncProfileCreateWithURL( url: CFURLRef; var error: CFErrorRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateWithURL';
  200. {
  201. * url - URL to the profile data (caller needs to have privileges to read url).
  202. * error - (optional) pointer to the error that will be returned in case of failure
  203. *
  204. * returns ColorSyncProfileRef or NULL in case of failure
  205. }
  206. function ColorSyncProfileCreateWithName( name: CFStringRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateWithName';
  207. {
  208. * name - predefined profile name
  209. *
  210. * returns ColorSyncProfileRef or NULL in case of failure
  211. }
  212. function ColorSyncProfileCreateWithDisplayID( displayID: UInt32 ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateWithDisplayID';
  213. {
  214. * displayID - system-wide unique display ID (defined by IOKIt); pass 0 for main display.
  215. *
  216. * returns ColorSyncProfileRef or NULL in case of failure
  217. }
  218. function ColorSyncProfileCreateDeviceProfile( deviceClass: CFStringRef; deviceID: CFUUIDRef; profileID: CFTypeRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateDeviceProfile';
  219. {
  220. * deviceClass - ColorSync device class
  221. * deviceID - deviceID registered with ColorSync
  222. * profileID - profileID registered with ColorSync; pass kColorSyncDeviceDefaultProfileID to get the default profile.
  223. *
  224. * See ColorSyncDevice.h for more info on deviceClass, deviceID and profileID
  225. *
  226. * returns ColorSyncProfileRef or NULL in case of failure
  227. }
  228. function ColorSyncProfileCreateMutable: ColorSyncMutableProfileRef; external name '_ColorSyncProfileCreateMutable';
  229. {
  230. * returns empty ColorSyncMutableProfileRef or NULL in case of failure
  231. }
  232. function ColorSyncProfileCreateMutableCopy( prof: ColorSyncProfileRef ): ColorSyncMutableProfileRef; external name '_ColorSyncProfileCreateMutableCopy';
  233. {
  234. * prof - profile from which profile data will be copied to the created profile.
  235. *
  236. * returns ColorSyncMutableProfileRef or NULL in case of failure
  237. }
  238. function ColorSyncProfileCreateLink( profileInfo: CFArrayRef; options: CFDictionaryRef ): ColorSyncProfileRef; external name '_ColorSyncProfileCreateLink';
  239. {
  240. * profileInfo - array of dictionaries, each one containing a profile object and the
  241. * information on the usage of the profile in the transform.
  242. *
  243. * Required keys:
  244. * ==============
  245. * kColorSyncProfile : ColorSyncProfileRef
  246. * kColorSyncRenderingIntent : CFStringRef defining rendering intent
  247. * kColorSyncTransformTag : CFStringRef defining which tags to use
  248. * Optional key:
  249. * =============
  250. * kColorSyncBlackPointCompensation : CFBooleanRef to enable/disable BPC
  251. *
  252. * options - dictionary with additional public global options (e.g. preferred CMM, quality,
  253. * etc... It can also contain custom options that are CMM specific.
  254. *
  255. * returns ColorSyncProfileRef or NULL in case of failure
  256. }
  257. function ColorSyncProfileVerify( prof: ColorSyncProfileRef; var errors: CFErrorRef; var warnings: CFErrorRef ): CBool; external name '_ColorSyncProfileVerify';
  258. {
  259. * prof - profile to be verified
  260. *
  261. * errors - returns error strings in case problems are found which
  262. * would prevent use of the profile.
  263. *
  264. * warnings - returns warning strings indicating problems due to lack of
  265. * conformance with the ICC specification, but not preventing
  266. * use of the profile.
  267. *
  268. * returns true if profile can be used or false otherwise
  269. }
  270. function ColorSyncProfileEstimateGammaWithDisplayID( {const} displayID: SInt32; var error: CFErrorRef ): Float32; external name '_ColorSyncProfileEstimateGammaWithDisplayID';
  271. {
  272. * displayID - system-wide unique display ID (defined by IOKIt)
  273. * error - (optional) pointer to the error that will be returned in
  274. * case of failure
  275. *
  276. * returns non-zero value if success or 0.0 in case of error.
  277. }
  278. function ColorSyncProfileEstimateGamma( prof: ColorSyncProfileRef; var error: CFErrorRef ): Float32; external name '_ColorSyncProfileEstimateGamma';
  279. {
  280. * prof - profile to perform estimation on
  281. * error - (optional) pointer to the error that will be returned in
  282. * case of failure
  283. *
  284. * returns non-zero value if success or 0.0 in case of error
  285. }
  286. const
  287. COLORSYNC_MD5_LENGTH = 16;
  288. type
  289. ColorSyncMD5 = record
  290. digest: array [0..COLORSYNC_MD5_LENGTH-1] of UInt8;
  291. end;
  292. function ColorSyncProfileGetMD5( prof: ColorSyncProfileRef ): ColorSyncMD5; external name '_ColorSyncProfileGetMD5';
  293. {
  294. * returns MD5 digest for the profile calculated as defined by
  295. * ICC specification or a "zero" signature (filled with zeros)
  296. * in case of failure
  297. }
  298. function ColorSyncProfileCopyData( prof: ColorSyncProfileRef; var error: CFErrorRef ): CFDataRef; external name '_ColorSyncProfileCopyData';
  299. {
  300. * prof - profile to copy the flattened data from
  301. * error - (optional) pointer to the error that will be returned in case of failure
  302. *
  303. * returns CFDataRef if success or NULL in case of failure
  304. }
  305. function ColorSyncProfileGetURL( prof: ColorSyncProfileRef; var error: CFErrorRef ): CFURLRef; external name '_ColorSyncProfileGetURL';
  306. {
  307. * prof - profile to get URL from
  308. * error - (optional) pointer to the error that will be returned in case of failure
  309. *
  310. * returns CFURLRef if success or NULL in case of failure
  311. }
  312. function ColorSyncProfileCopyHeader( prof: ColorSyncProfileRef ): CFDataRef; external name '_ColorSyncProfileCopyHeader';
  313. {
  314. * prof - profile from which to copy the header
  315. *
  316. * returns CFDataRef containing profile header (in host endianess) or NULL in case of failure
  317. }
  318. procedure ColorSyncProfileSetHeader( prof: ColorSyncMutableProfileRef; header: CFDataRef ); external name '_ColorSyncProfileSetHeader';
  319. {
  320. * prof - profile in which to set the header
  321. * header - CFDataRef containing the header data (must be in host endianess)
  322. }
  323. function ColorSyncProfileCopyDescriptionString( prof: ColorSyncProfileRef ): CFStringRef; external name '_ColorSyncProfileCopyDescriptionString';
  324. {
  325. * prof - profile from which to copy description string
  326. *
  327. * returns CFStringRef containing profile description localized to current locale
  328. }
  329. function ColorSyncProfileCopyTagSignatures( prof: ColorSyncProfileRef ): CFArrayRef; external name '_ColorSyncProfileCopyTagSignatures';
  330. {
  331. * prof - profile from which to copy tag signatures
  332. *
  333. * returns CFArray with signatures (CFStringRef) of tags in the profile
  334. }
  335. function ColorSyncProfileContainsTag( prof: ColorSyncProfileRef; signature: CFStringRef ): CBool; external name '_ColorSyncProfileContainsTag';
  336. {
  337. * prof - profile in which to search for the tag
  338. * signature - signature of the tag to be searched for
  339. *
  340. * returns true if tag exists or false if does not
  341. }
  342. function ColorSyncProfileCopyTag( prof: ColorSyncProfileRef; signature: CFStringRef ): CFDataRef; external name '_ColorSyncProfileCopyTag';
  343. {
  344. * prof - profile from which to copy the tag
  345. * signature - signature of the tag to be copied
  346. *
  347. * returns CFDataRef containing tag data or NULL in case of failure
  348. }
  349. procedure ColorSyncProfileSetTag( prof: ColorSyncMutableProfileRef; signature: CFStringRef; data: CFDataRef ); external name '_ColorSyncProfileSetTag';
  350. {
  351. * prof - profile in which to set the tag
  352. * signature - signature of the tag to be set in the profile
  353. * data - CFDataRef containing the tag data
  354. }
  355. procedure ColorSyncProfileRemoveTag( prof: ColorSyncMutableProfileRef; signature: CFStringRef ); external name '_ColorSyncProfileRemoveTag';
  356. {
  357. * prof - profile from which to remove the tag
  358. * signature - signature of the tag to be removed
  359. *
  360. * returns true if success or false in case of failure
  361. }
  362. 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';
  363. (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
  364. {
  365. * An utility function converting vcgt tag (if vcgt tag exists in the profile and conversion possible)
  366. * to formula components used by CGSetDisplayTransferByFormula.
  367. }
  368. function ColorSyncProfileCreateDisplayTransferTablesFromVCGT( profile: ColorSyncProfileRef; var nSamplesPerChannel: size_t ): CFDataRef; external name '_ColorSyncProfileCreateDisplayTransferTablesFromVCGT';
  369. (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
  370. {
  371. * An utility function creating three tables of floats (redTable, greenTable, blueTable)
  372. * each of size nSamplesPerChannel, packed into contiguous memory contained in the CFDataRef
  373. * to be returned from the vcgt tag of the profile (if vcgt tag exists in the profile).
  374. * Used by CGSetDisplayTransferByTable.
  375. }
  376. type
  377. ColorSyncProfileIterateCallback = function( profileInfo: CFDictionaryRef; userInfo: UnivPtr ): CBool;
  378. {
  379. * Notes:
  380. * 1. Only validated profiles will be passed to the caller
  381. * 2. if the ColorSyncProfileIterateCallback returns false, the iteration stops
  382. }
  383. procedure ColorSyncIterateInstalledProfiles( callBack: ColorSyncProfileIterateCallback; seed: UInt32Ptr; userInfo: UnivPtr; var error: CFErrorRef ); external name '_ColorSyncIterateInstalledProfiles';
  384. {
  385. * callBack - pointer to a client provided function (can be NULL)
  386. * seed - pointer to a cache seed owned by the client (can be NULL)
  387. * error - (optional) pointer to the error that will be returned in case of failure
  388. *
  389. }
  390. {$endc} {TARGET_OS_MAC}
  391. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  392. end.
  393. {$endc} {not MACOSALLINCLUDE}