Mac OS 9
CMMComponent.h
Go to the documentation of this file.
1 
19 #ifndef __CMMCOMPONENT__
20 #define __CMMCOMPONENT__
21 
22 #ifndef __CMAPPLICATION__
23 #include <CMApplication.h>
24 #endif
25 
26 #ifndef __QUICKDRAW__
27 #include <Quickdraw.h>
28 #endif
29 
30 #ifndef __COMPONENTS__
31 #include <Components.h>
32 #endif
33 
34 #if PRAGMA_ONCE
35 #pragma once
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 #if PRAGMA_IMPORT
44 #pragma import on
45 #endif
46 
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align = mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
50 #pragma pack(push, 2)
51 #elif PRAGMA_STRUCT_PACK
52 #pragma pack(2)
53 #endif
54 
55  /* Component-based CMM interface version */
56  enum
57  {
58  CMMInterfaceVersion = 1
59  };
60 
61  /* Component-based CMM function selectors */
62  enum
63  {
64  /* Required */
65  kCMMOpen = -1, /* kComponentOpenSelect,*/
66  kCMMClose = -2, /* kComponentCloseSelect,*/
67  kCMMGetInfo = -4, /* kComponentVersionSelect*/
68  kNCMMInit = 6,
69  kCMMMatchColors = 1,
70  kCMMCheckColors = 2,
71 
72  /* Optional */
73  kCMMValidateProfile = 8,
74  kCMMMatchBitmap = 9,
75  kCMMCheckBitmap = 10,
76  kCMMConcatenateProfiles = 5,
77  kCMMConcatInit = 7,
78  kCMMNewLinkProfile = 16,
79  kNCMMConcatInit = 18,
80  kNCMMNewLinkProfile = 19,
81  kCMMGetPS2ColorSpace = 11,
82  kCMMGetPS2ColorRenderingIntent = 12,
83  kCMMGetPS2ColorRendering = 13,
84  kCMMGetPS2ColorRenderingVMSize = 17,
85 
86  /* obsolete with ColorSync 2.5 */
87  kCMMFlattenProfile = 14,
88  kCMMUnflattenProfile = 15,
89 
90  /* obsolete with ColorSync 2.6 */
91  kCMMInit = 0,
92  kCMMGetNamedColorInfo = 70,
93  kCMMGetNamedColorValue = 71,
94  kCMMGetIndNamedColorValue = 72,
95  kCMMGetNamedColorIndex = 73,
96  kCMMGetNamedColorName = 74,
97 
98  /* obsolete with ColorSync 3.0 */
99  kCMMMatchPixMap = 3,
100  kCMMCheckPixMap = 4
101  };
102 
103 #if TARGET_API_MAC_OS8
104  typedef ComponentInstance CMMComponentInst;
105 #if CALL_NOT_IN_CARBON
114  CMError
115  NCMMInit(CMMComponentInst cmm, CMProfileRef srcProfile, CMProfileRef dstProfile);
116 
125  CMError
126  CMMInit(CMMComponentInst cmm, CMProfileHandle srcProfile,
127  CMProfileHandle dstProfile);
128 
137  CMError
138  CMMMatchColors(CMMComponentInst cmm, CMColor *colors, UInt32 count);
139 
148  CMError
149  CMMCheckColors(CMMComponentInst cmm, CMColor *colors, UInt32 count,
150  UInt32 *result);
151 
160  CMError
161  CMMValidateProfile(CMMComponentInst cmm, CMProfileRef prof, Boolean *valid);
162 
171  CMError
172  CMMFlattenProfile(CMMComponentInst cmm, CMProfileRef prof, UInt32 flags,
173  CMFlattenUPP proc, void *refCon);
174 
183  CMError
184  CMMUnflattenProfile(CMMComponentInst cmm, FSSpec *resultFileSpec,
185  CMFlattenUPP proc, void *refCon);
186 
195  CMError
196  CMMMatchBitmap(CMMComponentInst cmm, CMBitmap *bitmap,
197  CMBitmapCallBackUPP progressProc, void *refCon,
198  CMBitmap *matchedBitmap);
199 
208  CMError
209  CMMCheckBitmap(CMMComponentInst cmm, const CMBitmap *bitmap,
210  CMBitmapCallBackUPP progressProc, void *refCon,
211  CMBitmap *resultBitmap);
212 
221  CMError
222  CMMMatchPixMap(CMMComponentInst cmm, PixMap *pixMap,
223  CMBitmapCallBackUPP progressProc, void *refCon);
224 
233  CMError
234  CMMCheckPixMap(CMMComponentInst cmm, const PixMap *pixMap,
235  CMBitmapCallBackUPP progressProc, BitMap *bitMap, void *refCon);
236 
245  CMError
246  CMMConcatInit(CMMComponentInst cmm, CMConcatProfileSet *profileSet);
247 
256  CMError
257  NCMMConcatInit(CMMComponentInst cmm, NCMConcatProfileSet *profileSet,
258  CMConcatCallBackUPP proc, void *refCon);
259 
268  CMError
269  CMMNewLinkProfile(CMMComponentInst cmm, CMProfileRef *prof,
270  const CMProfileLocation *targetLocation,
271  CMConcatProfileSet *profileSet);
272 
281  CMError
282  NCMMNewLinkProfile(CMMComponentInst cmm, CMProfileRef prof,
283  NCMConcatProfileSet *profileSet, CMConcatCallBackUPP proc,
284  void *refCon);
285 
294  CMError
295  CMMGetPS2ColorSpace(CMMComponentInst cmm, CMProfileRef srcProf, UInt32 flags,
296  CMFlattenUPP proc, void *refCon);
297 
306  CMError
307  CMMGetPS2ColorRenderingIntent(CMMComponentInst cmm, CMProfileRef srcProf,
308  UInt32 flags, CMFlattenUPP proc, void *refCon);
309 
318  CMError
319  CMMGetPS2ColorRendering(CMMComponentInst cmm, CMProfileRef srcProf,
320  CMProfileRef dstProf, UInt32 flags, CMFlattenUPP proc,
321  void *refCon);
322 
331  CMError
332  CMMGetPS2ColorRenderingVMSize(CMMComponentInst cmm, CMProfileRef srcProf,
333  CMProfileRef dstProf, UInt32 *vmSize);
334 
343  CMError
344  CMMConcatenateProfiles(CMMComponentInst cmm, CMProfileHandle thru,
345  CMProfileHandle dst, CMProfileHandle *newDst);
346 
355  CMError
356  CMMGetNamedColorInfo(CMMComponentInst cmm, CMProfileRef srcProf,
357  UInt32 *deviceChannels, OSType *deviceColorSpace,
358  OSType *PCSColorSpace, UInt32 *count, StringPtr prefix,
359  StringPtr suffix);
360 
369  CMError
370  CMMGetNamedColorValue(CMMComponentInst cmm, CMProfileRef prof, StringPtr name,
371  CMColor *deviceColor, CMColor *PCSColor);
372 
381  CMError
382  CMMGetIndNamedColorValue(CMMComponentInst cmm, CMProfileRef prof, UInt32 index,
383  CMColor *deviceColor, CMColor *PCSColor);
384 
393  CMError
394  CMMGetNamedColorIndex(CMMComponentInst cmm, CMProfileRef prof, StringPtr name,
395  UInt32 *index);
396 
405  CMError
406  CMMGetNamedColorName(CMMComponentInst cmm, CMProfileRef prof, UInt32 index,
407  StringPtr name);
408 
409 #endif /* CALL_NOT_IN_CARBON */
410 
411 #endif /* TARGET_API_MAC_OS8 */
412 
413 #if PRAGMA_STRUCT_ALIGN
414 #pragma options align = reset
415 #elif PRAGMA_STRUCT_PACKPUSH
416 #pragma pack(pop)
417 #elif PRAGMA_STRUCT_PACK
418 #pragma pack()
419 #endif
420 
421 #ifdef PRAGMA_IMPORT_OFF
422 #pragma import off
423 #elif PRAGMA_IMPORT
424 #pragma import reset
425 #endif
426 
427 #ifdef __cplusplus
428 }
429 #endif
430 
431 #endif /* __CMMCOMPONENT__ */
Color Matching Interfaces.
Component Manager Interfaces.
unsigned char * StringPtr
Definition: MacTypes.h:477
unsigned char Boolean
Definition: MacTypes.h:318
Interface to Quickdraw Graphics.
Definition: Quickdraw.h:279
Definition: CMApplication.h:554
Definition: CMApplication.h:203
Definition: CMApplication.h:636
Definition: CMICCProfile.h:821
Definition: Components.h:220
Definition: CMApplication.h:218
Definition: Quickdraw.h:2064
Definition: CMApplication.h:330