CMTypes.pas 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. {
  2. File: ColorSync/CMTypes.h
  3. Contains: ColorSync types
  4. Version: ColorSync-174.1~229
  5. Copyright: © 2000-2006 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Gale R Paeper, <[email protected]>, 2007 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit CMTypes;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,MixedMode;
  92. { Standard type for ColorSync and other system error codes }
  93. {$ALIGN MAC68K}
  94. type
  95. CMError = SInt32;
  96. { Abstract data type for memory-based Profile }
  97. CMProfileRef = ^SInt32; { an opaque 32-bit type }
  98. CMProfileRefPtr = ^CMProfileRef; { when a var xx:CMProfileRef parameter can be nil, it is changed to xx: CMProfileRefPtr }
  99. { Abstract data type for Profile search result }
  100. CMProfileSearchRef = ^SInt32; { an opaque 32-bit type }
  101. CMProfileSearchRefPtr = ^CMProfileSearchRef; { when a var xx:CMProfileSearchRef parameter can be nil, it is changed to xx: CMProfileSearchRefPtr }
  102. { Abstract data type for BeginMatching(É) reference }
  103. CMMatchRef = ^SInt32; { an opaque 32-bit type }
  104. CMMatchRefPtr = ^CMMatchRef; { when a var xx:CMMatchRef parameter can be nil, it is changed to xx: CMMatchRefPtr }
  105. { Abstract data type for ColorWorld reference }
  106. CMWorldRef = ^SInt32; { an opaque 32-bit type }
  107. CMWorldRefPtr = ^CMWorldRef; { when a var xx:CMWorldRef parameter can be nil, it is changed to xx: CMWorldRefPtr }
  108. { Data type for ColorSync DisplayID reference }
  109. { On 8 & 9 this is a AVIDType }
  110. { On X this is a CGSDisplayID }
  111. CMDisplayIDType = UInt32;
  112. CMChromaticAdaptation = UInt32;
  113. const
  114. cmUseDefaultChromaticAdaptation = 0;
  115. cmLinearChromaticAdaptation = 1;
  116. cmVonKriesChromaticAdaptation = 2;
  117. cmBradfordChromaticAdaptation = 3;
  118. type
  119. { Caller-supplied flatten function }
  120. {$ifc TYPED_FUNCTION_POINTERS}
  121. CMFlattenProcPtr = function(command: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr): OSErr;
  122. {$elsec}
  123. CMFlattenProcPtr = ProcPtr;
  124. {$endc}
  125. { Caller-supplied progress function for Bitmap & PixMap matching routines }
  126. {$ifc TYPED_FUNCTION_POINTERS}
  127. CMBitmapCallBackProcPtr = function(progress: SInt32; refCon: UnivPtr): boolean;
  128. {$elsec}
  129. CMBitmapCallBackProcPtr = ProcPtr;
  130. {$endc}
  131. { Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines }
  132. {$ifc TYPED_FUNCTION_POINTERS}
  133. CMConcatCallBackProcPtr = function(progress: SInt32; refCon: UnivPtr): boolean;
  134. {$elsec}
  135. CMConcatCallBackProcPtr = ProcPtr;
  136. {$endc}
  137. { Caller-supplied filter function for Profile search }
  138. {$ifc TYPED_FUNCTION_POINTERS}
  139. CMProfileFilterProcPtr = function(prof: CMProfileRef; refCon: UnivPtr): boolean;
  140. {$elsec}
  141. CMProfileFilterProcPtr = ProcPtr;
  142. {$endc}
  143. { Caller-supplied function for profile access }
  144. {$ifc TYPED_FUNCTION_POINTERS}
  145. CMProfileAccessProcPtr = function(command: SInt32; offset: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr): OSErr;
  146. {$elsec}
  147. CMProfileAccessProcPtr = ProcPtr;
  148. {$endc}
  149. {$ifc OPAQUE_UPP_TYPES}
  150. CMFlattenUPP = ^SInt32; { an opaque UPP }
  151. {$elsec}
  152. CMFlattenUPP = UniversalProcPtr;
  153. {$endc}
  154. {$ifc OPAQUE_UPP_TYPES}
  155. CMBitmapCallBackUPP = ^SInt32; { an opaque UPP }
  156. {$elsec}
  157. CMBitmapCallBackUPP = UniversalProcPtr;
  158. {$endc}
  159. {$ifc OPAQUE_UPP_TYPES}
  160. CMConcatCallBackUPP = ^SInt32; { an opaque UPP }
  161. {$elsec}
  162. CMConcatCallBackUPP = UniversalProcPtr;
  163. {$endc}
  164. {$ifc OPAQUE_UPP_TYPES}
  165. CMProfileFilterUPP = ^SInt32; { an opaque UPP }
  166. {$elsec}
  167. CMProfileFilterUPP = UniversalProcPtr;
  168. {$endc}
  169. {$ifc OPAQUE_UPP_TYPES}
  170. CMProfileAccessUPP = ^SInt32; { an opaque UPP }
  171. {$elsec}
  172. CMProfileAccessUPP = UniversalProcPtr;
  173. {$endc}
  174. const
  175. uppCMFlattenProcInfo = $00003FE0;
  176. uppCMBitmapCallBackProcInfo = $000003D0;
  177. uppCMConcatCallBackProcInfo = $000003D0;
  178. uppCMProfileFilterProcInfo = $000003D0;
  179. uppCMProfileAccessProcInfo = $0000FFE0;
  180. {
  181. * NewCMFlattenUPP()
  182. *
  183. * Availability:
  184. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  185. * CarbonLib: in CarbonLib 1.0 and later
  186. * Non-Carbon CFM: available as macro/inline
  187. }
  188. function NewCMFlattenUPP(userRoutine: CMFlattenProcPtr): CMFlattenUPP; external name '_NewCMFlattenUPP';
  189. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  190. {
  191. * NewCMBitmapCallBackUPP()
  192. *
  193. * Availability:
  194. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  195. * CarbonLib: in CarbonLib 1.0 and later
  196. * Non-Carbon CFM: available as macro/inline
  197. }
  198. function NewCMBitmapCallBackUPP(userRoutine: CMBitmapCallBackProcPtr): CMBitmapCallBackUPP; external name '_NewCMBitmapCallBackUPP';
  199. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  200. {
  201. * NewCMConcatCallBackUPP()
  202. *
  203. * Availability:
  204. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  205. * CarbonLib: in CarbonLib 1.0 and later
  206. * Non-Carbon CFM: available as macro/inline
  207. }
  208. function NewCMConcatCallBackUPP(userRoutine: CMConcatCallBackProcPtr): CMConcatCallBackUPP; external name '_NewCMConcatCallBackUPP';
  209. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  210. {
  211. * NewCMProfileFilterUPP()
  212. *
  213. * Availability:
  214. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  215. * CarbonLib: in CarbonLib 1.0 and later
  216. * Non-Carbon CFM: available as macro/inline
  217. }
  218. function NewCMProfileFilterUPP(userRoutine: CMProfileFilterProcPtr): CMProfileFilterUPP; external name '_NewCMProfileFilterUPP';
  219. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  220. {
  221. * NewCMProfileAccessUPP()
  222. *
  223. * Availability:
  224. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  225. * CarbonLib: in CarbonLib 1.0 and later
  226. * Non-Carbon CFM: available as macro/inline
  227. }
  228. function NewCMProfileAccessUPP(userRoutine: CMProfileAccessProcPtr): CMProfileAccessUPP; external name '_NewCMProfileAccessUPP';
  229. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  230. {
  231. * DisposeCMFlattenUPP()
  232. *
  233. * Availability:
  234. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  235. * CarbonLib: in CarbonLib 1.0 and later
  236. * Non-Carbon CFM: available as macro/inline
  237. }
  238. procedure DisposeCMFlattenUPP(userUPP: CMFlattenUPP); external name '_DisposeCMFlattenUPP';
  239. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  240. {
  241. * DisposeCMBitmapCallBackUPP()
  242. *
  243. * Availability:
  244. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  245. * CarbonLib: in CarbonLib 1.0 and later
  246. * Non-Carbon CFM: available as macro/inline
  247. }
  248. procedure DisposeCMBitmapCallBackUPP(userUPP: CMBitmapCallBackUPP); external name '_DisposeCMBitmapCallBackUPP';
  249. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  250. {
  251. * DisposeCMConcatCallBackUPP()
  252. *
  253. * Availability:
  254. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  255. * CarbonLib: in CarbonLib 1.0 and later
  256. * Non-Carbon CFM: available as macro/inline
  257. }
  258. procedure DisposeCMConcatCallBackUPP(userUPP: CMConcatCallBackUPP); external name '_DisposeCMConcatCallBackUPP';
  259. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  260. {
  261. * DisposeCMProfileFilterUPP()
  262. *
  263. * Availability:
  264. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  265. * CarbonLib: in CarbonLib 1.0 and later
  266. * Non-Carbon CFM: available as macro/inline
  267. }
  268. procedure DisposeCMProfileFilterUPP(userUPP: CMProfileFilterUPP); external name '_DisposeCMProfileFilterUPP';
  269. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  270. {
  271. * DisposeCMProfileAccessUPP()
  272. *
  273. * Availability:
  274. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  275. * CarbonLib: in CarbonLib 1.0 and later
  276. * Non-Carbon CFM: available as macro/inline
  277. }
  278. procedure DisposeCMProfileAccessUPP(userUPP: CMProfileAccessUPP); external name '_DisposeCMProfileAccessUPP';
  279. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  280. {
  281. * InvokeCMFlattenUPP()
  282. *
  283. * Availability:
  284. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  285. * CarbonLib: in CarbonLib 1.0 and later
  286. * Non-Carbon CFM: available as macro/inline
  287. }
  288. function InvokeCMFlattenUPP(command: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr; userRoutine: CMFlattenUPP): OSErr; external name '_InvokeCMFlattenUPP';
  289. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  290. {
  291. * InvokeCMBitmapCallBackUPP()
  292. *
  293. * Availability:
  294. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  295. * CarbonLib: in CarbonLib 1.0 and later
  296. * Non-Carbon CFM: available as macro/inline
  297. }
  298. function InvokeCMBitmapCallBackUPP(progress: SInt32; refCon: UnivPtr; userRoutine: CMBitmapCallBackUPP): boolean; external name '_InvokeCMBitmapCallBackUPP';
  299. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  300. {
  301. * InvokeCMConcatCallBackUPP()
  302. *
  303. * Availability:
  304. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  305. * CarbonLib: in CarbonLib 1.0 and later
  306. * Non-Carbon CFM: available as macro/inline
  307. }
  308. function InvokeCMConcatCallBackUPP(progress: SInt32; refCon: UnivPtr; userRoutine: CMConcatCallBackUPP): boolean; external name '_InvokeCMConcatCallBackUPP';
  309. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  310. {
  311. * InvokeCMProfileFilterUPP()
  312. *
  313. * Availability:
  314. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  315. * CarbonLib: in CarbonLib 1.0 and later
  316. * Non-Carbon CFM: available as macro/inline
  317. }
  318. function InvokeCMProfileFilterUPP(prof: CMProfileRef; refCon: UnivPtr; userRoutine: CMProfileFilterUPP): boolean; external name '_InvokeCMProfileFilterUPP';
  319. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  320. {
  321. * InvokeCMProfileAccessUPP()
  322. *
  323. * Availability:
  324. * Mac OS X: in version 10.0 and later in ApplicationServices.framework
  325. * CarbonLib: in CarbonLib 1.0 and later
  326. * Non-Carbon CFM: available as macro/inline
  327. }
  328. function InvokeCMProfileAccessUPP(command: SInt32; offset: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr; userRoutine: CMProfileAccessUPP): OSErr; external name '_InvokeCMProfileAccessUPP';
  329. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  330. {$ALIGN MAC68K}
  331. end.