CMTypes.pas 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. {
  2. File: CMTypes.p
  3. Contains: xxx put contents here xxx
  4. Version: Technology: ColorSync 3
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  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. { Caller-supplied flatten function }
  113. {$ifc TYPED_FUNCTION_POINTERS}
  114. CMFlattenProcPtr = function(command: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr): OSErr;
  115. {$elsec}
  116. CMFlattenProcPtr = ProcPtr;
  117. {$endc}
  118. { Caller-supplied progress function for Bitmap & PixMap matching routines }
  119. {$ifc TYPED_FUNCTION_POINTERS}
  120. CMBitmapCallBackProcPtr = function(progress: SInt32; refCon: UnivPtr): boolean;
  121. {$elsec}
  122. CMBitmapCallBackProcPtr = ProcPtr;
  123. {$endc}
  124. { Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines }
  125. {$ifc TYPED_FUNCTION_POINTERS}
  126. CMConcatCallBackProcPtr = function(progress: SInt32; refCon: UnivPtr): boolean;
  127. {$elsec}
  128. CMConcatCallBackProcPtr = ProcPtr;
  129. {$endc}
  130. { Caller-supplied filter function for Profile search }
  131. {$ifc TYPED_FUNCTION_POINTERS}
  132. CMProfileFilterProcPtr = function(prof: CMProfileRef; refCon: UnivPtr): boolean;
  133. {$elsec}
  134. CMProfileFilterProcPtr = ProcPtr;
  135. {$endc}
  136. { Caller-supplied function for profile access }
  137. {$ifc TYPED_FUNCTION_POINTERS}
  138. CMProfileAccessProcPtr = function(command: SInt32; offset: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr): OSErr;
  139. {$elsec}
  140. CMProfileAccessProcPtr = ProcPtr;
  141. {$endc}
  142. {$ifc OPAQUE_UPP_TYPES}
  143. CMFlattenUPP = ^SInt32; { an opaque UPP }
  144. {$elsec}
  145. CMFlattenUPP = UniversalProcPtr;
  146. {$endc}
  147. {$ifc OPAQUE_UPP_TYPES}
  148. CMBitmapCallBackUPP = ^SInt32; { an opaque UPP }
  149. {$elsec}
  150. CMBitmapCallBackUPP = UniversalProcPtr;
  151. {$endc}
  152. {$ifc OPAQUE_UPP_TYPES}
  153. CMConcatCallBackUPP = ^SInt32; { an opaque UPP }
  154. {$elsec}
  155. CMConcatCallBackUPP = UniversalProcPtr;
  156. {$endc}
  157. {$ifc OPAQUE_UPP_TYPES}
  158. CMProfileFilterUPP = ^SInt32; { an opaque UPP }
  159. {$elsec}
  160. CMProfileFilterUPP = UniversalProcPtr;
  161. {$endc}
  162. {$ifc OPAQUE_UPP_TYPES}
  163. CMProfileAccessUPP = ^SInt32; { an opaque UPP }
  164. {$elsec}
  165. CMProfileAccessUPP = UniversalProcPtr;
  166. {$endc}
  167. const
  168. uppCMFlattenProcInfo = $00003FE0;
  169. uppCMBitmapCallBackProcInfo = $000003D0;
  170. uppCMConcatCallBackProcInfo = $000003D0;
  171. uppCMProfileFilterProcInfo = $000003D0;
  172. uppCMProfileAccessProcInfo = $0000FFE0;
  173. {
  174. * NewCMFlattenUPP()
  175. *
  176. * Availability:
  177. * Non-Carbon CFM: available as macro/inline
  178. * CarbonLib: in CarbonLib 1.0 and later
  179. * Mac OS X: in 3.0 and later
  180. }
  181. function NewCMFlattenUPP(userRoutine: CMFlattenProcPtr): CMFlattenUPP; external name '_NewCMFlattenUPP'; { old name was NewCMFlattenProc }
  182. {
  183. * NewCMBitmapCallBackUPP()
  184. *
  185. * Availability:
  186. * Non-Carbon CFM: available as macro/inline
  187. * CarbonLib: in CarbonLib 1.0 and later
  188. * Mac OS X: in 3.0 and later
  189. }
  190. function NewCMBitmapCallBackUPP(userRoutine: CMBitmapCallBackProcPtr): CMBitmapCallBackUPP; external name '_NewCMBitmapCallBackUPP'; { old name was NewCMBitmapCallBackProc }
  191. {
  192. * NewCMConcatCallBackUPP()
  193. *
  194. * Availability:
  195. * Non-Carbon CFM: available as macro/inline
  196. * CarbonLib: in CarbonLib 1.0 and later
  197. * Mac OS X: in 3.0 and later
  198. }
  199. function NewCMConcatCallBackUPP(userRoutine: CMConcatCallBackProcPtr): CMConcatCallBackUPP; external name '_NewCMConcatCallBackUPP'; { old name was NewCMConcatCallBackProc }
  200. {
  201. * NewCMProfileFilterUPP()
  202. *
  203. * Availability:
  204. * Non-Carbon CFM: available as macro/inline
  205. * CarbonLib: in CarbonLib 1.0 and later
  206. * Mac OS X: in 3.0 and later
  207. }
  208. function NewCMProfileFilterUPP(userRoutine: CMProfileFilterProcPtr): CMProfileFilterUPP; external name '_NewCMProfileFilterUPP'; { old name was NewCMProfileFilterProc }
  209. {
  210. * NewCMProfileAccessUPP()
  211. *
  212. * Availability:
  213. * Non-Carbon CFM: available as macro/inline
  214. * CarbonLib: in CarbonLib 1.0 and later
  215. * Mac OS X: in 3.0 and later
  216. }
  217. function NewCMProfileAccessUPP(userRoutine: CMProfileAccessProcPtr): CMProfileAccessUPP; external name '_NewCMProfileAccessUPP'; { old name was NewCMProfileAccessProc }
  218. {
  219. * DisposeCMFlattenUPP()
  220. *
  221. * Availability:
  222. * Non-Carbon CFM: available as macro/inline
  223. * CarbonLib: in CarbonLib 1.0 and later
  224. * Mac OS X: in 3.0 and later
  225. }
  226. procedure DisposeCMFlattenUPP(userUPP: CMFlattenUPP); external name '_DisposeCMFlattenUPP';
  227. {
  228. * DisposeCMBitmapCallBackUPP()
  229. *
  230. * Availability:
  231. * Non-Carbon CFM: available as macro/inline
  232. * CarbonLib: in CarbonLib 1.0 and later
  233. * Mac OS X: in 3.0 and later
  234. }
  235. procedure DisposeCMBitmapCallBackUPP(userUPP: CMBitmapCallBackUPP); external name '_DisposeCMBitmapCallBackUPP';
  236. {
  237. * DisposeCMConcatCallBackUPP()
  238. *
  239. * Availability:
  240. * Non-Carbon CFM: available as macro/inline
  241. * CarbonLib: in CarbonLib 1.0 and later
  242. * Mac OS X: in 3.0 and later
  243. }
  244. procedure DisposeCMConcatCallBackUPP(userUPP: CMConcatCallBackUPP); external name '_DisposeCMConcatCallBackUPP';
  245. {
  246. * DisposeCMProfileFilterUPP()
  247. *
  248. * Availability:
  249. * Non-Carbon CFM: available as macro/inline
  250. * CarbonLib: in CarbonLib 1.0 and later
  251. * Mac OS X: in 3.0 and later
  252. }
  253. procedure DisposeCMProfileFilterUPP(userUPP: CMProfileFilterUPP); external name '_DisposeCMProfileFilterUPP';
  254. {
  255. * DisposeCMProfileAccessUPP()
  256. *
  257. * Availability:
  258. * Non-Carbon CFM: available as macro/inline
  259. * CarbonLib: in CarbonLib 1.0 and later
  260. * Mac OS X: in 3.0 and later
  261. }
  262. procedure DisposeCMProfileAccessUPP(userUPP: CMProfileAccessUPP); external name '_DisposeCMProfileAccessUPP';
  263. {
  264. * InvokeCMFlattenUPP()
  265. *
  266. * Availability:
  267. * Non-Carbon CFM: available as macro/inline
  268. * CarbonLib: in CarbonLib 1.0 and later
  269. * Mac OS X: in 3.0 and later
  270. }
  271. function InvokeCMFlattenUPP(command: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr; userRoutine: CMFlattenUPP): OSErr; external name '_InvokeCMFlattenUPP'; { old name was CallCMFlattenProc }
  272. {
  273. * InvokeCMBitmapCallBackUPP()
  274. *
  275. * Availability:
  276. * Non-Carbon CFM: available as macro/inline
  277. * CarbonLib: in CarbonLib 1.0 and later
  278. * Mac OS X: in 3.0 and later
  279. }
  280. function InvokeCMBitmapCallBackUPP(progress: SInt32; refCon: UnivPtr; userRoutine: CMBitmapCallBackUPP): boolean; external name '_InvokeCMBitmapCallBackUPP'; { old name was CallCMBitmapCallBackProc }
  281. {
  282. * InvokeCMConcatCallBackUPP()
  283. *
  284. * Availability:
  285. * Non-Carbon CFM: available as macro/inline
  286. * CarbonLib: in CarbonLib 1.0 and later
  287. * Mac OS X: in 3.0 and later
  288. }
  289. function InvokeCMConcatCallBackUPP(progress: SInt32; refCon: UnivPtr; userRoutine: CMConcatCallBackUPP): boolean; external name '_InvokeCMConcatCallBackUPP'; { old name was CallCMConcatCallBackProc }
  290. {
  291. * InvokeCMProfileFilterUPP()
  292. *
  293. * Availability:
  294. * Non-Carbon CFM: available as macro/inline
  295. * CarbonLib: in CarbonLib 1.0 and later
  296. * Mac OS X: in 3.0 and later
  297. }
  298. function InvokeCMProfileFilterUPP(prof: CMProfileRef; refCon: UnivPtr; userRoutine: CMProfileFilterUPP): boolean; external name '_InvokeCMProfileFilterUPP'; { old name was CallCMProfileFilterProc }
  299. {
  300. * InvokeCMProfileAccessUPP()
  301. *
  302. * Availability:
  303. * Non-Carbon CFM: available as macro/inline
  304. * CarbonLib: in CarbonLib 1.0 and later
  305. * Mac OS X: in 3.0 and later
  306. }
  307. function InvokeCMProfileAccessUPP(command: SInt32; offset: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr; userRoutine: CMProfileAccessUPP): OSErr; external name '_InvokeCMProfileAccessUPP'; { old name was CallCMProfileAccessProc }
  308. {$ALIGN MAC68K}
  309. end.