InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICMSProfile.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: fhaberma
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ICMSProfile__
25 #define __ICMSProfile__
26 
27 #if PRAGMA_ONCE
28 #endif
29 
30 #include "IPMUnknown.h"
31 #include "ColorMgmtID.h" // IID_ICMSPROFILE
32 
33 class PMString;
34 
35 class ICMSProfile : public IPMUnknown
36 {
37 public:
38  enum { kDefaultIID = IID_ICMSPROFILE };
39 
40  // There are three ways used to categorize profiles:
41  // - profileSpace identifies the space of the profile (RGB, CMYK, etc).
42  // - profileClass identifies the device class of the profile (Printer, Monitor, etc).
43  // - profileCategory identifies the application's use of the profile in terms of
44  // which 'slot' it might appear in (monitor, sep printer, comp, etc).
45 
46  enum profileSpace {
47  kSpaceUnknown,
48  kSpaceGray,
49  kSpaceRGB,
50  kSpaceCMYK,
51  kSpaceLAB,
52  kSpaceXYZ,
53  kSpaceHiFi2,
54  kSpaceHiFi3,
55  kSpaceHiFi4,
56  kSpaceHiFi5,
57  kSpaceHiFi6,
58  kSpaceHiFi7,
59  kSpaceHiFi8
60  };
61 
62  enum profileClass {
63  kClassUnknown,
64  kClassPrinter,
65  kClassScanner,
66  kClassMonitor,
67  kClassGeneric, // Not associated with a particular class; like abstract.
68  kClassNamedColor,
69  // The following are used when searching for profiles:
70  kClassAnyInput, // Matches any input capable profile
71  kClassAnyOutput, // Matches any output capable profile
72  kClassSimulation // Matches any profile capable of simulation
73  };
74 
75  // Note: While not used in this class, the following enum is used by other
76  // interfaces which refer to ICMSProfile. This seems like the most logical
77  // place to put it so that all the other code has access to the enum.
78  enum profileCategory {
79  kRGBSource=0,
80  kCMYKSource,
81  kLABSource,
82  kMonitorDestination,
83  kObsolete1, // was composite
84  kObsolete2, // was separations
85  kOther
86  };
87 
88  enum profileSourceType {
89  kSourceTypeInvalid = 0, // Unknown or invalid
90  kSourceTypeFromDisk, // Directly pulled from system
91  kSourceTypeEmbeddedInImage, // Comes from an image
92  kSourceTypeEmbeddedInDocument, // Was on system, now embedded in doc
93  kSourceTypeBuiltInGray, // Provided by application
94  kSourceTypeBuiltInRGB, // Provided by application
95  kSourceTypeBuiltInCMYK, // Provided by application
96  kSourceTypeBuiltInLAB, // Provided by application
97  kSourceTypeVirtual // Created on-the-fly
98  };
99 
100  enum profileCode
101  {
102  kProfileCodeNull = 0,
103 
104  kProfileCodeMonitor = 'mRGB',
105 
106  kProfileCodeSystemRGB = 'sysR',
107  kProfileCodeSystemCMYK = 'sysC',
108  kProfileCodeSystemGray = 'sysG',
109 
110  kProfileCodeMaxEnum = 0xFFFFFFFFL // Force enum to be 32-bits wide.
111  };
112 
113  // These methods get basic info about the profile that most clients would require.
114  virtual void GetName(PMString& name) = 0;
115  virtual profileSpace GetColorSpace() = 0;
116  virtual profileClass GetClass() = 0;
117 
118  // These methods deal with the source data for the profile. These are typically
119  // used by internal code and preflighting plugins.
120  virtual profileSourceType GetSourceType() = 0;
121  virtual void GetFileName(PMString& fileName) = 0;
122  virtual void GetFullPathFileName(PMString& filePath) = 0;
123  virtual void *GetProfileData(uint32 *pLength = nil) = 0;
124  virtual void ReleaseProfileData(void* data) = 0;
125  virtual void SetImageProfileUID(const UID uid) = 0;
126  virtual UID GetImageProfileUID() = 0;
127 
128 #ifdef DEBUG
129 virtual void DumpToDebugWindow() = 0;
130 #endif
131 
132 };
133 
134 #endif // __ICMSProfile__
135 
136 // End, ICMSProfile.h.