InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IColorSpaceMgr.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 __IColorSpaceMgr__
25 #define __IColorSpaceMgr__
26 
27 #include "IPMUnknown.h"
28 #include "ICMSSettings.h"
29 #include "ICMSProfile.h"
30 #include "BravoForwardDecl.h"
31 
32 class PMString;
33 class IDocument;
34 class IColorXFormData;
35 class ICMSProfile;
36 class IColorData;
37 
38 const int32 kGetCSFlagForceCalibrated = (1L<<4); // I.e., ignore doc/obj cms on/off setting
39 const int32 kGetCSFlagForceUncalibrated = (1L<<5); // I.e., ignore doc/obj cms on/off setting
40 const int32 kGetCSFlagHasAlpha = (1L<<6);
41 const int32 kGetCSFlagDocDefaultCalibrated = (1L<<7); // By default doc default is uncalibrated.
42 
43 // Flags for GetAGMProfileForCategory
44 const int32 kCSMGetProfileNoSimulation = (1L<<2); // Don't include sim profile for monitor
45 const int32 kCSMGetProfileTryWeakly = (1L<<3); // If category not set up, don't force it
46 const int32 kCSMGetProfilePrefsIntent = (1L<<4); // Use rendering intent from prefs
47 
48 class IColorSpaceMgr : public IPMUnknown
49 {
50 public:
51 
52  enum gamutAbility { kDoesNotImplement=0, kSimpleYesNo, kDistance};
53 
71  virtual AGMColorSpace *GetColorSpace
72  (
73  uint32 csType,
74  IDocument *doc,
75  void *agmPrivateData=nil,
76  int32 getColorSpaceFlags = 0,
77  ICMSSettings::renderingIntent intent = ICMSSettings::kOther,
78  bool16 isHSB = kFalse
79  ) = 0;
80 
94  virtual AGMColorSpace *GetColorSpace
95  (
96  uint32 csType,
97  IPMUnknown* obj,
98  void *agmPrivateData=nil,
99  int32 getColorSpaceFlags = 0,
100  ICMSSettings::renderingIntent intent = ICMSSettings::kOther,
101  bool16 isHSB = kFalse
102  ) = 0;
103 
113  virtual AGMColorSpace *GetColorSpace
114  (
115  ICMSProfile* cmsProfile,
116  ICMSSettings::renderingIntent intent,
117  int32 getColorSpaceFlags = 0,
118  bool16 isHSB = kFalse
119  ) = 0;
120 
153  virtual AGMColorSpace *GetColorSpace
154  (
155  IDocument *doc,
156  ICMSProfile::profileCategory category,
157  ICMSSettings::renderingIntent intent = ICMSSettings::kUseGStateRI,
158  int32 getColorSpaceFlags = 0,
159  bool16 isHSB = kFalse
160  ) = 0;
161 
173  virtual AGMColorSpace *GetColorSpace
174  (
175  uint32 csType,
176  void *iccData,
177  int32 iccSize,
178  ICMSSettings::renderingIntent intent,
179  int32 getColorSpaceFlags = 0,
180  bool16 isHSB = kFalse
181  ) = 0;
182 
188  virtual void ColorSpaceRelease
189  (
190  AGMColorSpace *cs
191  ) = 0;
192 
203  virtual const void *GetProfileData
204  (
205  AGMColorSpace *cs,
206  uint32 *profileSize = nil
207  ) = 0;
208 
212  virtual void ReleaseProfileData
213  (
214  void *profileData
215  ) = 0;
216 
245  virtual bool8 GamutTest
246  (
247  IColorData* colorIn,
248  IColorData* colorOut,
249  IColorData *colorNearest,
250  IDocument *doc,
251  IColorSpaceMgr::gamutAbility& doesImplement
252  ) = 0;
253 
269  virtual AGMColorProfile *GetAGMProfileForCategory
270  (
271  IDocument *doc,
272  ICMSProfile::profileCategory category,
273  int32 flags = 0,
274  ICMSSettings::renderingIntent intent = ICMSSettings::kOther
275  ) = 0;
276 
280  virtual void ReleaseAGMProfile(AGMColorProfile *pAGMProfile) = 0;
281 
285  virtual bool16 SetScreenIntentMode(bool16 bUseScreenIntent) = 0;
286 
290  virtual bool16 GetScreenIntentMode() = 0;
291 
292 #ifdef DEBUG
293  virtual void DumpToDebugWindow() = 0;
294  virtual void Test1() = 0;
295 #endif
296 
297 };
298 
299 #endif