00001 #ifndef __AIDocument__
00002 #define __AIDocument__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __AITypes__
00031 #include "AITypes.h"
00032 #endif
00033
00034 #ifndef __AIRealMath__
00035 #include "AIRealMath.h"
00036 #endif
00037
00038 #ifndef __AIFileFormat__
00039 #include "AIFileFormat.h"
00040 #endif
00041
00042 #ifndef __ATESuites__
00043 #include "ATETypesDef.h"
00044 #endif
00045
00046 #ifdef __cplusplus
00047 using ATE::TextRangesRef;
00048 using ATE::StoriesRef;
00049 using ATE::StoryRef;
00050 using ATE::DocumentTextResourcesRef;
00051 #endif
00052
00053 #include "AIHeaderBegin.h"
00054
00057
00058
00059
00060
00061
00062
00063 #define kAIDocumentSuite "AI Document Suite"
00064 #define kAIDocumentSuiteVersion16 AIAPI_VERSION(16)
00065
00066
00067 #define kAIDocumentSuiteVersion kAIDocumentSuiteVersion16
00068 #define kAIDocumentVersion kAIDocumentSuiteVersion
00069
00072 #define kAIDocumentChangedNotifier "AI Document Changed Notifier"
00073
00075 #define kAIDocumentAboutToCloseNotifier "AI Document About To Close Notifier"
00076
00078 #define kAIDocumentClosedNotifier "AI Document Closed Notifier"
00079
00081 #define kAIDocumentOpenedNotifier "AI Document Opened Notifier"
00082
00084 #define kAIDocumentSavedNotifier "AI Document Saved Notifier"
00085
00087 #define kAIDocumentNewNotifier "AI Document New Notifier"
00088
00090 #define kAIDocumentClrMdlChangedNotifier "AI Document Color Model Changed Notifier"
00091
00093 #define kAIDocumentProfilesChangedNotifier "AI Document Profiles Changed Notifier"
00094
00098 #define kAIDocumentSpotColorModeChangedNotifier "AI Document Spot Color Mode Changed Notifier"
00099
00101 #define kAIDocumentRulerUnitChangedNotifier "AI Document Ruler Unit Changed Notifier"
00102
00107 #define kAIDocumentWritePreprocessNotifier "AI Document Write Preprocess Notifier"
00108
00112 #define kAIDocumentWritePostprocessNotifier "AI Document Write Postprocess Notifier"
00113
00115 #define kAIDocumentCropAreaModifiedNotifier "AI Document Crop Area Modified Notifier"
00116
00118 #define kAIDocumentRulerOriginChangedNotifier "AI Document Ruler Origin Changed Notifier"
00119
00121 #define kAIDocumentBleedsChangedNotifier "AI Document Bleed Value Changed Notifier"
00122
00124 #define kAIDocumentTransparencyGridNotifier "AI Document Transparency Grid Notifier"
00125
00127 enum AIDocumentRulerUnitValue {
00128 kUnknownUnits = 0,
00130 kInchesUnits,
00132 kCentimetersUnits,
00134 kPointsUnits,
00136 kPicasUnits,
00138 kMillimetersUnits,
00140 kPixelsUnits,
00142 kQUnits
00143 };
00144
00147 enum AIDocumentColorModelValue {
00148 kDocUnknownColor = -1,
00149 kDocGrayColor = 0,
00150 kDocRGBColor,
00151 kDocCMYKColor
00152 };
00153
00156 enum {
00157 kDocTargetGroups,
00158 kDocTargetLeaves,
00159 kDocTargetPainted,
00160 kDocTargetExplicit
00161 };
00162
00177 enum AISpotColorMode {
00180 kAILegacySpotColorMode = 0,
00183 kAIStandardSpotColorMode = 1,
00184 kAIDummySpotColorMode = 0xFFFFFFFF
00185 };
00186
00187
00188
00189
00190
00191
00192
00194 typedef struct {
00196 AIReal width, height;
00198 AIBoolean showPlacedImages;
00201 AIReal outputResolution;
00205 AIBoolean splitLongPaths;
00210 AIBoolean useDefaultScreen;
00215 AIBoolean compatibleGradients;
00219 AIBoolean printTiles;
00225 AIBoolean tileFullPages;
00226
00227 } AIDocumentSetup;
00228
00230 typedef enum {
00231 kStandardCropStyle,
00232 kJapaneseCropStyle
00233 } AICropMarkStyle;
00234
00235
00237 typedef void *AIDocumentPlatformPrintRecord;
00238
00239
00240 #define kAIDocumentMiPrintRecordVersion 1
00241
00245 typedef struct AIDocumentMiPrintRecord
00246 {
00247 ai::int32 version;
00248 ai::int32 recordSize;
00249 AIRect paperRect;
00250 AIRect imageRect;
00251 } *AIDocumentMiPrintRecordPtr;
00252
00256 typedef struct
00257 {
00258 AIVersion aiVersion;
00259 } AIDocumentVersionInfo;
00260
00261
00263 typedef void *AIDocumentFileFormatParameters;
00264
00266 typedef struct _t_AIDocument *AIDocumentHandle;
00267
00268
00269
00270
00271
00272
00273
00284 struct AIDocumentSuite {
00285
00289 AIAPI AIErr (*GetDocumentFileSpecification) ( ai::FilePath &file );
00290
00295 AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin );
00296
00303 AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin );
00304
00311 AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin );
00312
00317 AIAPI AIErr (*GetDocumentRulerUnits) ( ai::int16 *units );
00318
00325 AIAPI AIErr (*SetDocumentRulerUnits) ( ai::int16 units );
00326
00332 AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle );
00333
00337 AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle );
00338
00340 AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print );
00341
00343 AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print );
00344
00349 AIAPI AIErr (*GetDocumentSetup) ( AIDocumentSetup *setup );
00350
00355 AIAPI AIErr (*SetDocumentSetup) ( AIDocumentSetup *setup );
00356
00362 AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified );
00363
00369 AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified );
00370
00379 AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat );
00380
00385 AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat );
00386
00394 AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters );
00395
00405 AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters );
00406
00410 AIAPI AIErr (*RedrawDocument) ( void );
00411
00416 AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document );
00417
00427 AIAPI AIErr (*WriteDocument) ( const ai::FilePath &file, const char *fileFormatName, AIBoolean askForParms);
00428
00433 AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print );
00434
00436 AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print );
00437
00444 AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin );
00445
00450 AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething );
00451
00456 AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max );
00457
00463 AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds );
00464
00470 AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists );
00471
00481 AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary );
00482
00487 AIAPI AIErr (*GetDocumentColorModel) ( ai::int16 *colorModel);
00488
00496 AIAPI AIErr (*SetDocumentColorModel) ( ai::int16 colorModel);
00497
00503 AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile* rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile );
00504
00510 AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile );
00511
00518 AIAPI AIErr (*Copy) ();
00519
00526 AIAPI AIErr (*Cut) ();
00527
00534 AIAPI AIErr (*Paste) ();
00535
00541 AIAPI AIErr (*SyncDocument) ( void );
00542
00544 AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget );
00546 AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget );
00547
00558 AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary );
00559
00566 AIAPI int (*GetAIVersion) ();
00567
00575 AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint );
00576
00582 AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt );
00583
00584
00585
00600 AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, ai::int32* pNAlternates, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType);
00601
00609 AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit);
00610
00615 AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL);
00616
00621 AIAPI AIErr (*GetDocumentXAP)(const char **xap);
00622
00628 AIAPI AIErr (*SetDocumentXAP)(const char *xap);
00629
00642 AIAPI AIErr (*SuspendTextReflow)();
00643
00648 AIAPI AIErr (*ResumeTextReflow)();
00649
00673 AIAPI AIErr (*GetTextSelection)( TextRangesRef* pTextSelection );
00674
00678 AIAPI AIErr (*HasTextFocus)( AIBoolean *focus);
00679
00685 AIAPI AIErr (*HasTextCaret)( AIBoolean *caret);
00686
00694 AIAPI AIErr (*GetTextFocus)( StoryRef* pStory);
00695
00700 AIAPI AIErr (*SetTextFocus)( StoryRef story);
00701
00703 AIAPI AIErr (*LoseTextFocus)();
00704
00716 AIAPI AIErr (*GetDocumentTextResources)( DocumentTextResourcesRef* pDocResources);
00717
00724 AIAPI AIErr (*WriteDocumentMacInformationResource)( const ai::FilePath &file );
00725
00737 AIAPI AIErr (*WriteDocumentWithOptions) (const ai::FilePath &file, const char *fileFormatName,
00738 ai::int32 fileFormatOptions, AIDictionaryRef additionalOptionsDict, AIBoolean askForParms);
00739
00745 AIAPI AIErr (*DocumentHasOverprint)(AIBoolean *hasOverprint);
00746
00758 AIAPI AIErr (*DocumentHasManagedLinks)(AIDocumentHandle document, AIBoolean *hasManagedLinks);
00759
00767 AIAPI AIErr (*GetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode *mode);
00768
00779 AIAPI AIErr (*SetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode mode,
00780 AIBoolean convert, AIBoolean* converted);
00781
00787 AIAPI AIErr (*Undo) ();
00788
00794 AIAPI AIErr (*Redo) ();
00801 AIAPI AIErr (*DocumentRasterAttributes) (AIBoolean *hasDeviceNRasters, AIBoolean *hasOverprint);
00802
00808 AIAPI AIErr (*GetDocumentStartupProfile) (AIDocumentHandle document, AIDocumentStartupProfile *startupProfile );
00809
00814 AIAPI AIErr (*GetDocumentBleeds) (AIRealRect *bleedOffset);
00815
00820 AIAPI AIErr (*SetDocumentBleeds) (const AIRealRect& bleedOffset);
00821
00826 AIAPI AIErr (*SetDocumentPixelPerfectStatus)(AIBoolean isPixelPerfect);
00827
00832 AIAPI AIBoolean (*GetDocumentPixelPerfectStatus)();
00833
00840 AIAPI AIErr (*DeleteSelection)();
00841
00849 AIAPI AIErr(*SetAutoAssignUIDOnArtCreation)(ai::int16 artType, AIBoolean autoAssignUIDOnArtCreation);
00850
00858 AIAPI AIErr(*GetAutoAssignUIDOnArtCreation)(ai::int16 artType, AIBoolean &outAutoAssignUIDOnArtCreation);
00859 };
00860
00861
00862 #include "AIHeaderEnd.h"
00863
00864
00865 #endif