InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICMSUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Matt Phillips
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 __ICMSUtils__
25 #define __ICMSUtils__
26 
27 #include "ColorMgmtID.h"
28 #include "IPMUnknown.h"
29 #include "Utils.h"
30 
31 #include "ICMSManager.h" // for ICMSManager::CMSPolicy
32 #include "ICMSSettings.h"
33 #include "ICMSProofing.h"
34 
35 #include "ScriptData.h"
36 
37 // Flags for command wrappers (cmdFlags):
38 
40 const uint32 kCMSCmdAutoUndo = (1L<<1);
41 
42 // Flags for Query operations (cmsQueryFlags):
43 
48 const int32 kCMSQueryNoAutoCreate = (1L<<0);
49 
50 class ICMSProfileList;
52 class ICommand;
53 class IScriptRequestData;
54 class UIDList;
55 
56 
59 class ICMSUtils : public IPMUnknown
60 {
61 public:
62  enum { kDefaultIID = IID_ICMSUTILS };
63 
69  virtual ICMSProfileList *QueryCMSProfileList(IDocument *doc, uint32 cmsQueryFlags = 0) = 0;
70 
76  virtual ICMSProfileList *QueryCMSProfileList(const UIDRef& docRef, uint32 cmsQueryFlags = 0) = 0;
77 
84  virtual ICMSManager *QueryCMSManager(ClassID whichCMSMgr = kInvalidClass, uint32 cmsQueryFlags = 0) = 0;
85 
90 
93  virtual bool16 IsEmulating1xCMSOffState() = 0;
94 
102  (
103  IDocument *doc,
104  uint32 cmsQueryFlags = 0
105  ) = 0;
106 
114  (
115  const UIDRef& docRef,
116  uint32 cmsQueryFlags = 0
117  ) = 0;
118 
126  (
127  IDocument *doc,
128  uint32 cmsQueryFlags = 0
129  ) = 0;
130 
138  (
139  const UIDRef& docRef,
140  uint32 cmsQueryFlags = 0
141  ) = 0;
142 
152  virtual bool16 DoTurnCMSOnOrOff
153  (
154  bool16 turnItOn,
155  const UIDList& itemlist,
156  uint32 cmdFlags = 0,
157  ClassID cmsMgrID = kInvalidClass
158  ) = 0;
159 
167  virtual bool16 DoCMMChoice
168  (
169  const PMString& cmmChoice,
170  IDocument *doc,
171  uint32 cmdFlags = 0,
172  ClassID cmsMgrID = kInvalidClass
173  ) = 0;
174 
184  virtual bool16 DoDocUseProfileCmd
185  (
186  const PMString& profileName,
187  IDocument *doc,
188  ICMSProfile::profileCategory which,
189  uint32 cmdFlags = 0,
190  ClassID cmsMgrID = kInvalidClass,
191  bool16 installDefaultFlag = kFalse
192  ) = 0;
193 
201  virtual bool16 DoItemUseExternalProfileCmd
202  (
203  const UIDRef& itemUIDRef,
204  const PMString& profileName,
205  uint32 cmdFlags = 0,
206  ClassID cmsMgrID = kInvalidClass
207  ) = 0;
208 
219  virtual bool16 DoItemUseEmbeddedProfileCmd
220  (
221  const UIDRef& itemUIDRef,
222  void *pProfileData = nil,
223  int32 dataSize = 0,
224  PMString *pName = nil,
225  uint32 cmdFlags = 0,
226  ClassID cmsMgrID = kInvalidClass
227  ) = 0;
228 
235  virtual bool16 DoItemUseDocDefaultProfileCmd
236  (
237  const UIDRef& itemUIDRef,
238  uint32 cmdFlags = 0,
239  ClassID cmsMgrID = kInvalidClass
240  ) = 0;
241 
248  virtual bool16 DoesProfileExist
249  (
250  const PMString& profileName,
251  IDataBase *db,
252  ClassID cmsMgrID = kInvalidClass
253  ) = 0;
254 
261  virtual bool16 DoSetRenderingIntent
262  (
263  const UIDRef& itemRef,
264  ICMSSettings::renderingIntent choice,
265  uint32 cmdFlags = 0
266  ) = 0;
267 
274  virtual bool16 DoSetRenderingIntent
275  (
276  const UIDList& itemList,
277  ICMSSettings::renderingIntent choice,
278  uint32 cmdFlags = 0
279  ) = 0;
280 
290  virtual bool16 DoCopyCMSSettingsCmd
291  (
292  UIDRef srcItem,
293  UIDRef dstItem,
294  uint32 cmdFlags = 0,
295  ClassID cmsMgrID = kInvalidClass
296  ) = 0;
297 
305  virtual bool16 DoRemoveCMSSetup
306  (
307  UIDRef theItem,
308  uint32 cmdFlags = 0,
309  ClassID cmsMgrID = kInvalidClass
310  ) = 0;
311 
320  virtual bool16 ColorXFormChange
321  (
322  IDataBase* iDataBase,
323  ICommand *cmdChangedBy,
324  int32 changeFlags
325  ) = 0;
326 
351  virtual bool16 DoColorPresetsSettingsSetCmd(bool16 emulate1xCMSOff,
352  bool16 isCustom,
353  const PMString &presetName,
354  const PMString &presetPath,
355  const PMString &description,
356  ICMSProfile *workingRGB,
357  const PMString &workingRGBName,
358  ICMSProfile::profileCode workingRGBCode,
359  ICMSProfile *workingCMYK,
360  const PMString &workingCMYKName,
361  ICMSProfile::profileCode workingCMYKCode,
362  ICMSManager::CMSPolicy policyRGB,
363  ICMSManager::CMSPolicy policyCMYK,
364  bool16 mismatchAskOpening,
365  bool16 mismatchAskPasting,
366  bool16 missingAskOpening,
367  uint32 engineCMS,
368  uint32 engineCMM,
369  ICMSSettings::renderingIntent intent,
370  bool16 kpc,
371  int32 nFlags = 0) = 0;
372 
383  virtual ErrorCode DoCMSSetProofingCmd
384  (
385  ICMSProofing *iCMSProofing,
386  bool16 isProofingOn,
387  ICMSProofing::ProofingType proofingType,
388  ICMSProfile *iCMSProfile,
389  bool32 paperWhite,
390  bool32 inkBlack,
391  bool32 preserveNumbers = kTrue
392  ) = 0;
393 
404  virtual ErrorCode DoCMSSetProofingCmd
405  (
406  ICMSProofing *iCMSProofing,
407  bool16 isProofingOn,
408  ICMSProofing::ProofingType proofingType,
409  PMString &name,
410  bool32 paperWhite,
411  bool32 inkBlack,
412  bool32 preserveNumbers = kTrue
413  ) = 0;
414 
425  virtual ErrorCode DoConvertToProfileCmd
426  (
427  IDocument *doc,
428  ICMSProfile::profileCategory category,
429  const PMString &name,
430  uint32 engineCMS = 0,
431  uint32 engineCMM = 0,
432  ICMSSettings::renderingIntent intent = ICMSSettings::kImage,
433  bool16 useKPC = kTrue
434  ) = 0;
435 
442  virtual ICMSSettings::renderingIntent ResolveIntent
443  (
444  IDocument* iDoc,
445  ICMSSettings::renderingIntent ri
446  ) = 0;
447 
448 #ifdef DEBUG
449  virtual void DumpCMSManager(IDocument* document) = 0;
450 #endif
451 
457  virtual bool32 BuildScriptableProfileArray
458  (
459  CMSAvailableProfileList* plistSource,
460  ScriptListData& plistTarget
461  ) = 0;
462 
468  virtual bool32 SetupImageFilter
469  (
470  UIDRef uidImage,
471  CMSMgrProfileFilter& filter
472  ) = 0;
473 
481  virtual ICMSSettings::renderingIntent ScriptIntentToCMSIntent
482  (
483  IDocument* pDoc,
484  ScriptID nScriptIntent,
485  ICMSSettings::renderingIntent nIntentType,
486  ErrorCode& nError
487  ) = 0;
488 
493  virtual ScriptID CMSIntentToScriptIntent(ICMSSettings::renderingIntent nCMSIntent) = 0;
494 
503  virtual int32 AccessCMSProfileList
504  (
505  IScriptRequestData*data,
506  IScript*script,
507  ICMSProfile::profileCategory profileCategory,
508  ScriptID propID
509  ) = 0;
510 
521  virtual int32 AccessCMSProfile
522  (
523  IDocument* pDoc,
524  IScriptRequestData*data,
525  IScript*script,
526  ICMSProfile::profileCategory nProfileType,
527  ScriptID propID
528  ) = 0;
529 
535  virtual bool16 CanFindProfile( const PMString& strName ) = 0;
536 
542  virtual void GetProfileProofingSupport
543  (
544  const PMString& strName,
545  bool16& bSupportsInkBlack,
546  bool16& bSupportsPaperWhite
547  ) = 0;
548 
553  virtual void CopyColorProfiles
554  (
555  IDataBase* pSrc,
556  IDataBase* pDst
557  ) = 0;
558 
559 };
560 
561 
562 #endif // __ICMSUtils__