Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

523 lines
13 KiB

  1. /*
  2. File: CMMComponent.h
  3. Contains: ColorSync CMM Component API
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __CMMCOMPONENT__
  11. #define __CMMCOMPONENT__
  12. #ifndef __QUICKDRAW__
  13. #include <Quickdraw.h>
  14. #endif
  15. #ifndef __COMPONENTS__
  16. #include <Components.h>
  17. #endif
  18. #ifndef __CMAPPLICATION__
  19. #include <CMApplication.h>
  20. #endif
  21. #if PRAGMA_ONCE
  22. #pragma once
  23. #endif
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. #if PRAGMA_IMPORT
  28. #pragma import on
  29. #endif
  30. /* Component-based CMM interface version */
  31. enum {
  32. CMMInterfaceVersion = 1
  33. };
  34. /* Component-based CMM function selectors */
  35. enum {
  36. /* Required */
  37. kCMMOpen = -1, /* kComponentOpenSelect,*/
  38. kCMMClose = -2, /* kComponentCloseSelect,*/
  39. kCMMGetInfo = -4, /* kComponentVersionSelect*/
  40. kNCMMInit = 6,
  41. kCMMMatchColors = 1,
  42. kCMMCheckColors = 2,
  43. /* Optional */
  44. kCMMValidateProfile = 8,
  45. kCMMMatchBitmap = 9,
  46. kCMMCheckBitmap = 10,
  47. kCMMConcatenateProfiles = 5,
  48. kCMMConcatInit = 7,
  49. kCMMNewLinkProfile = 16,
  50. kNCMMConcatInit = 18,
  51. kNCMMNewLinkProfile = 19,
  52. kCMMGetPS2ColorSpace = 11,
  53. kCMMGetPS2ColorRenderingIntent = 12,
  54. kCMMGetPS2ColorRendering = 13,
  55. kCMMGetPS2ColorRenderingVMSize = 17,
  56. /* obsolete with ColorSync 2.5 */
  57. kCMMFlattenProfile = 14,
  58. kCMMUnflattenProfile = 15,
  59. /* obsolete with ColorSync 2.6 */
  60. kCMMInit = 0,
  61. kCMMGetNamedColorInfo = 70,
  62. kCMMGetNamedColorValue = 71,
  63. kCMMGetIndNamedColorValue = 72,
  64. kCMMGetNamedColorIndex = 73,
  65. kCMMGetNamedColorName = 74,
  66. /* obsolete with ColorSync 3.0 */
  67. kCMMMatchPixMap = 3,
  68. kCMMCheckPixMap = 4
  69. };
  70. #if TARGET_API_MAC_OS8
  71. typedef ComponentInstance CMMComponentInst;
  72. #if CALL_NOT_IN_CARBON
  73. /*
  74. * NCMMInit()
  75. *
  76. * Availability:
  77. * Non-Carbon CFM: not available
  78. * CarbonLib: not available
  79. * Mac OS X: not available
  80. */
  81. EXTERN_API( CMError )
  82. NCMMInit(
  83. CMMComponentInst cmm,
  84. CMProfileRef srcProfile,
  85. CMProfileRef dstProfile) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
  86. /*
  87. * CMMInit()
  88. *
  89. * Availability:
  90. * Non-Carbon CFM: not available
  91. * CarbonLib: not available
  92. * Mac OS X: not available
  93. */
  94. EXTERN_API( CMError )
  95. CMMInit(
  96. CMMComponentInst cmm,
  97. CMProfileHandle srcProfile,
  98. CMProfileHandle dstProfile) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
  99. /*
  100. * CMMMatchColors()
  101. *
  102. * Availability:
  103. * Non-Carbon CFM: not available
  104. * CarbonLib: not available
  105. * Mac OS X: not available
  106. */
  107. EXTERN_API( CMError )
  108. CMMMatchColors(
  109. CMMComponentInst cmm,
  110. CMColor * colors,
  111. UInt32 count) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  112. /*
  113. * CMMCheckColors()
  114. *
  115. * Availability:
  116. * Non-Carbon CFM: not available
  117. * CarbonLib: not available
  118. * Mac OS X: not available
  119. */
  120. EXTERN_API( CMError )
  121. CMMCheckColors(
  122. CMMComponentInst cmm,
  123. CMColor * colors,
  124. UInt32 count,
  125. UInt32 * result) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
  126. /*
  127. * CMMValidateProfile()
  128. *
  129. * Availability:
  130. * Non-Carbon CFM: not available
  131. * CarbonLib: not available
  132. * Mac OS X: not available
  133. */
  134. EXTERN_API( CMError )
  135. CMMValidateProfile(
  136. CMMComponentInst cmm,
  137. CMProfileRef prof,
  138. Boolean * valid) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  139. /*
  140. * CMMFlattenProfile()
  141. *
  142. * Availability:
  143. * Non-Carbon CFM: not available
  144. * CarbonLib: not available
  145. * Mac OS X: not available
  146. */
  147. EXTERN_API( CMError )
  148. CMMFlattenProfile(
  149. CMMComponentInst cmm,
  150. CMProfileRef prof,
  151. UInt32 flags,
  152. CMFlattenUPP proc,
  153. void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000E, 0x7000, 0xA82A);
  154. /*
  155. * CMMUnflattenProfile()
  156. *
  157. * Availability:
  158. * Non-Carbon CFM: not available
  159. * CarbonLib: not available
  160. * Mac OS X: not available
  161. */
  162. EXTERN_API( CMError )
  163. CMMUnflattenProfile(
  164. CMMComponentInst cmm,
  165. FSSpec * resultFileSpec,
  166. CMFlattenUPP proc,
  167. void * refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
  168. /*
  169. * CMMMatchBitmap()
  170. *
  171. * Availability:
  172. * Non-Carbon CFM: not available
  173. * CarbonLib: not available
  174. * Mac OS X: not available
  175. */
  176. EXTERN_API( CMError )
  177. CMMMatchBitmap(
  178. CMMComponentInst cmm,
  179. CMBitmap * bitmap,
  180. CMBitmapCallBackUPP progressProc,
  181. void * refCon,
  182. CMBitmap * matchedBitmap) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
  183. /*
  184. * CMMCheckBitmap()
  185. *
  186. * Availability:
  187. * Non-Carbon CFM: not available
  188. * CarbonLib: not available
  189. * Mac OS X: not available
  190. */
  191. EXTERN_API( CMError )
  192. CMMCheckBitmap(
  193. CMMComponentInst cmm,
  194. const CMBitmap * bitmap,
  195. CMBitmapCallBackUPP progressProc,
  196. void * refCon,
  197. CMBitmap * resultBitmap) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
  198. /*
  199. * CMMMatchPixMap()
  200. *
  201. * Availability:
  202. * Non-Carbon CFM: not available
  203. * CarbonLib: not available
  204. * Mac OS X: not available
  205. */
  206. EXTERN_API( CMError )
  207. CMMMatchPixMap(
  208. CMMComponentInst cmm,
  209. PixMap * pixMap,
  210. CMBitmapCallBackUPP progressProc,
  211. void * refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
  212. /*
  213. * CMMCheckPixMap()
  214. *
  215. * Availability:
  216. * Non-Carbon CFM: not available
  217. * CarbonLib: not available
  218. * Mac OS X: not available
  219. */
  220. EXTERN_API( CMError )
  221. CMMCheckPixMap(
  222. CMMComponentInst cmm,
  223. const PixMap * pixMap,
  224. CMBitmapCallBackUPP progressProc,
  225. BitMap * bitMap,
  226. void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
  227. /*
  228. * CMMConcatInit()
  229. *
  230. * Availability:
  231. * Non-Carbon CFM: not available
  232. * CarbonLib: not available
  233. * Mac OS X: not available
  234. */
  235. EXTERN_API( CMError )
  236. CMMConcatInit(
  237. CMMComponentInst cmm,
  238. CMConcatProfileSet * profileSet) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  239. /*
  240. * NCMMConcatInit()
  241. *
  242. * Availability:
  243. * Non-Carbon CFM: not available
  244. * CarbonLib: not available
  245. * Mac OS X: not available
  246. */
  247. EXTERN_API( CMError )
  248. NCMMConcatInit(
  249. CMMComponentInst cmm,
  250. NCMConcatProfileSet * profileSet,
  251. CMConcatCallBackUPP proc,
  252. void * refCon) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0012, 0x7000, 0xA82A);
  253. /*
  254. * CMMNewLinkProfile()
  255. *
  256. * Availability:
  257. * Non-Carbon CFM: not available
  258. * CarbonLib: not available
  259. * Mac OS X: not available
  260. */
  261. EXTERN_API( CMError )
  262. CMMNewLinkProfile(
  263. CMMComponentInst cmm,
  264. CMProfileRef * prof,
  265. const CMProfileLocation * targetLocation,
  266. CMConcatProfileSet * profileSet) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
  267. /*
  268. * NCMMNewLinkProfile()
  269. *
  270. * Availability:
  271. * Non-Carbon CFM: not available
  272. * CarbonLib: not available
  273. * Mac OS X: not available
  274. */
  275. EXTERN_API( CMError )
  276. NCMMNewLinkProfile(
  277. CMMComponentInst cmm,
  278. CMProfileRef prof,
  279. NCMConcatProfileSet * profileSet,
  280. CMConcatCallBackUPP proc,
  281. void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0013, 0x7000, 0xA82A);
  282. /*
  283. * CMMGetPS2ColorSpace()
  284. *
  285. * Availability:
  286. * Non-Carbon CFM: not available
  287. * CarbonLib: not available
  288. * Mac OS X: not available
  289. */
  290. EXTERN_API( CMError )
  291. CMMGetPS2ColorSpace(
  292. CMMComponentInst cmm,
  293. CMProfileRef srcProf,
  294. UInt32 flags,
  295. CMFlattenUPP proc,
  296. void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
  297. /*
  298. * CMMGetPS2ColorRenderingIntent()
  299. *
  300. * Availability:
  301. * Non-Carbon CFM: not available
  302. * CarbonLib: not available
  303. * Mac OS X: not available
  304. */
  305. EXTERN_API( CMError )
  306. CMMGetPS2ColorRenderingIntent(
  307. CMMComponentInst cmm,
  308. CMProfileRef srcProf,
  309. UInt32 flags,
  310. CMFlattenUPP proc,
  311. void * refCon) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000C, 0x7000, 0xA82A);
  312. /*
  313. * CMMGetPS2ColorRendering()
  314. *
  315. * Availability:
  316. * Non-Carbon CFM: not available
  317. * CarbonLib: not available
  318. * Mac OS X: not available
  319. */
  320. EXTERN_API( CMError )
  321. CMMGetPS2ColorRendering(
  322. CMMComponentInst cmm,
  323. CMProfileRef srcProf,
  324. CMProfileRef dstProf,
  325. UInt32 flags,
  326. CMFlattenUPP proc,
  327. void * refCon) FIVEWORDINLINE(0x2F3C, 0x0014, 0x000D, 0x7000, 0xA82A);
  328. /*
  329. * CMMGetPS2ColorRenderingVMSize()
  330. *
  331. * Availability:
  332. * Non-Carbon CFM: not available
  333. * CarbonLib: not available
  334. * Mac OS X: not available
  335. */
  336. EXTERN_API( CMError )
  337. CMMGetPS2ColorRenderingVMSize(
  338. CMMComponentInst cmm,
  339. CMProfileRef srcProf,
  340. CMProfileRef dstProf,
  341. UInt32 * vmSize) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
  342. /*
  343. * CMMConcatenateProfiles()
  344. *
  345. * Availability:
  346. * Non-Carbon CFM: not available
  347. * CarbonLib: not available
  348. * Mac OS X: not available
  349. */
  350. EXTERN_API( CMError )
  351. CMMConcatenateProfiles(
  352. CMMComponentInst cmm,
  353. CMProfileHandle thru,
  354. CMProfileHandle dst,
  355. CMProfileHandle * newDst) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
  356. /*
  357. * CMMGetNamedColorInfo()
  358. *
  359. * Availability:
  360. * Non-Carbon CFM: not available
  361. * CarbonLib: not available
  362. * Mac OS X: not available
  363. */
  364. EXTERN_API( CMError )
  365. CMMGetNamedColorInfo(
  366. CMMComponentInst cmm,
  367. CMProfileRef srcProf,
  368. UInt32 * deviceChannels,
  369. OSType * deviceColorSpace,
  370. OSType * PCSColorSpace,
  371. UInt32 * count,
  372. StringPtr prefix,
  373. StringPtr suffix) FIVEWORDINLINE(0x2F3C, 0x001C, 0x0046, 0x7000, 0xA82A);
  374. /*
  375. * CMMGetNamedColorValue()
  376. *
  377. * Availability:
  378. * Non-Carbon CFM: not available
  379. * CarbonLib: not available
  380. * Mac OS X: not available
  381. */
  382. EXTERN_API( CMError )
  383. CMMGetNamedColorValue(
  384. CMMComponentInst cmm,
  385. CMProfileRef prof,
  386. StringPtr name,
  387. CMColor * deviceColor,
  388. CMColor * PCSColor) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0047, 0x7000, 0xA82A);
  389. /*
  390. * CMMGetIndNamedColorValue()
  391. *
  392. * Availability:
  393. * Non-Carbon CFM: not available
  394. * CarbonLib: not available
  395. * Mac OS X: not available
  396. */
  397. EXTERN_API( CMError )
  398. CMMGetIndNamedColorValue(
  399. CMMComponentInst cmm,
  400. CMProfileRef prof,
  401. UInt32 index,
  402. CMColor * deviceColor,
  403. CMColor * PCSColor) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0048, 0x7000, 0xA82A);
  404. /*
  405. * CMMGetNamedColorIndex()
  406. *
  407. * Availability:
  408. * Non-Carbon CFM: not available
  409. * CarbonLib: not available
  410. * Mac OS X: not available
  411. */
  412. EXTERN_API( CMError )
  413. CMMGetNamedColorIndex(
  414. CMMComponentInst cmm,
  415. CMProfileRef prof,
  416. StringPtr name,
  417. UInt32 * index) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0049, 0x7000, 0xA82A);
  418. /*
  419. * CMMGetNamedColorName()
  420. *
  421. * Availability:
  422. * Non-Carbon CFM: not available
  423. * CarbonLib: not available
  424. * Mac OS X: not available
  425. */
  426. EXTERN_API( CMError )
  427. CMMGetNamedColorName(
  428. CMMComponentInst cmm,
  429. CMProfileRef prof,
  430. UInt32 index,
  431. StringPtr name) FIVEWORDINLINE(0x2F3C, 0x000C, 0x004A, 0x7000, 0xA82A);
  432. #endif /* CALL_NOT_IN_CARBON */
  433. #endif /* TARGET_API_MAC_OS8 */
  434. #ifdef PRAGMA_IMPORT_OFF
  435. #pragma import off
  436. #elif PRAGMA_IMPORT
  437. #pragma import reset
  438. #endif
  439. #ifdef __cplusplus
  440. }
  441. #endif
  442. #endif /* __CMMCOMPONENT__ */