Adobe.com
Contents Suites Classes Class Index Member Index

AIArt.h

Go to the documentation of this file.
00001 #ifndef __AIArt__
00002 #define __AIArt__
00003 
00004 /*
00005  *        Name: AIArt.h
00006  *   $Revision: 25 $
00007  *      Author:
00008  *        Date:
00009  *     Purpose: Adobe Illustrator  Artwork Object Suite.
00010  *
00011  * ADOBE SYSTEMS INCORPORATED
00012  * Copyright 1986-2016 Adobe Systems Incorporated.
00013  * All rights reserved.
00014  *
00015  * NOTICE:  Adobe permits you to use, modify, and distribute this file
00016  * in accordance with the terms of the Adobe license agreement
00017  * accompanying it. If you have received this file from a source other
00018  * than Adobe, then your use, modification, or distribution of it
00019  * requires the prior written permission of Adobe.
00020  *
00021  */
00022 
00023 
00024 /*******************************************************************************
00025  **
00026  **     Imports
00027  **
00028  **/
00029 
00030 #include "AITypes.h"
00031 #include "AILayer.h"
00032 
00033 
00034 #include "AIHeaderBegin.h"
00035 
00038 /*******************************************************************************
00039  **
00040  **     Constants
00041  **
00042  **/
00043 
00044 #define kAIArtSuite                             "AI Art Suite"
00045 #define kAIArtSuiteVersion19    AIAPI_VERSION(19)
00046 #define kAIArtSuiteVersion              kAIArtSuiteVersion19
00047 #define kAIArtVersion                   kAIArtSuiteVersion
00048 
00049 
00057 #define kAIArtSelectionChangedNotifier          "AI Art Selection Changed Notifier"
00058 
00059 
00063 #define kAIDrawingModeChangedNotifier           "AI Drawing Mode Changed Notifier"
00064 
00070 #define kAIArtPropertiesChangedNotifier         "AI Art Properties Changed Notifier"
00071 
00079 #define kAIAlignmentKeyArtChangedNotifier       "AI Alignment Key Art Changed Notifier"
00080 
00082 enum AIDrawingMode
00083 {
00084         kAIDrawNormalMode = 0,
00085         kAIDrawBehindMode,
00086         kAIDrawInsideMode
00087 };
00088 
00091 enum AIArtType {
00094         kAnyArt = -1,
00100         kUnknownArt = 0,
00102         kGroupArt,
00104         kPathArt,
00106         kCompoundPathArt,
00109         kTextArtUnsupported,
00112         kTextPathArtUnsupported,
00115         kTextRunArtUnsupported,
00117         kPlacedArt,
00122         kMysteryPathArt,
00124         kRasterArt,
00126         kPluginArt,
00128         kMeshArt,
00130         kTextFrameArt,
00132         kSymbolArt,
00135         kForeignArt,
00137         kLegacyTextArt,
00139         kChartArt,
00140 };
00141 
00142 
00147 enum AIArtOrder {
00149         kUnknownOrder = 0,
00151         kFirstBeforeSecond = 1,
00153         kSecondAfterFirst = kFirstBeforeSecond,
00155         kFirstAfterSecond,
00157         kSecondBeforeFirst = kFirstAfterSecond,
00159         kFirstInsideSecond,
00161         kSecondInsideFirst
00162 };
00163 
00164 
00191 enum AIArtUserAttr {
00193         kArtSelected            = 0x00000001,
00195         kArtLocked                      = 0x00000002,
00197         kArtHidden                      = 0x00000004,
00203         kArtFullySelected       = 0x00000008,
00205         kArtExpanded            = 0x00000010,
00207         kArtTargeted            = 0x00000020,
00210         kArtIsClipMask          = 0x00001000,
00213         kArtIsTextWrap          = 0x00010000,
00214 
00216         kArtSelectedTopLevelGroups              = 0x00000040,
00218         kArtSelectedLeaves                              = 0x00000080,
00220         kArtSelectedTopLevelWithPaint   = 0x00000100,   // Top level groups that have a stroke or fill, or leaves
00221 
00225         kArtHasSimpleStyle      = 0x00000200,
00229         kArtHasActiveStyle      = 0x00000400,
00233         kArtPartOfCompound  = 0x00000800,       // notice that 0x00001000 is in use for kArtIsClipMask
00235         kMatchDictionaryArt     = 0x00002000,
00237         kMatchArtInGraphs       = 0x00004000,
00239         kMatchArtInResultGroups = 0x00008000, // notice that 0x00010000 is in use for kArtIsTextWrap
00240 
00242         kMatchTextPaths = 0x00020000,
00243 
00248         kArtStyleIsDirty = 0x00040000,
00249 
00251         kMatchArtNotIntoPluginGroups = 0x00080000,
00252 
00254         kMatchArtInCharts = 0x00100000
00255 };
00256 
00263 enum AIArtBoundsOptions {
00266         kVisibleBounds                          = 0x0000,
00269         kControlBounds                          = 0x0001,
00272         kNoStrokeBounds                         = 0x0002,
00275         kNoExtendedBounds                       = 0x0004,
00279         kWStrokeDependsOnPreference     = 0x0008,
00281         kExcludeHiddenObjectBounds      = 0x0010,
00283         kExcludeUnpaintedObjectBounds = 0x0020,
00285         kExcludeGuideBounds                     = 0x0040
00286 };
00287 
00290 enum AIArtTargettingAction {
00292         kReplaceAction                          = 0x0001,
00294         kAppendAction                           = 0x0002,
00296         kRemoveAction                           = 0x0003,
00298         kUpAction                                       = 0x0004,
00300         kDownAction                                     = 0x0005,
00302         kDownToLeafAction                       = 0x0006,
00304         kUpToLayersAction                       = 0x0007
00305 };
00306 
00310 enum AIArtTransferAttrsOptions {
00312         kTransferID                                             = 1 << 0,
00314         kTransferStyle                                  = 1 << 1,
00318         kTransferOpacityMask                    = 1 << 2,
00321         kTransferTextWrapProperties             = 1 << 3,
00324         kTransferCompoundShapeMode              = 1 << 4,
00333         kTransferSavedSelections                = 1 << 5,
00337         kTransferSlicingAttributes              = 1 << 6,
00339         kTransferArtLocked                              = 1 << 7,
00341         kTransferArtHidden                              = 1 << 8,
00344         kTransferSVGProperties                  = 1 << 9,
00350         kTransferLivePaintPathTags              = 1 << 10,
00354         kTransferPixelPerfectAttribute  = 1 << 11,
00358         kTransferLiveShapeProperties    = 1 << 12,
00362         kTransferAll                                    = 0xFFFFFFFF
00363 };
00364 
00366 typedef struct _t_AICopyScopeOpaque* AICopyScopeHandle;
00367 
00369 enum AICopyScopeKind {
00372         kAICopyScopeForDuplicate = 0,
00379         kAICopyScopeForRetarget,
00381         kDummyScopeKind = 0xffffffff
00382 };
00383 
00384 enum AIPathPolarity
00385 {
00386         kAIPolarPath,
00387         kAINonPolarPath
00388 
00389 };
00390 
00391 enum AIArtTimeStampOptions
00392 {
00393         kAITimeStampOfArt = 1,
00394         // Example Usecase: Hiding/Showing a Layer in Layer Panel does not update the thumbnail of that Layer because timestamp of Layer's group art changes but that of its children does not.
00395         kAITimeStampOfChildren = kAITimeStampOfArt << 1,
00396         // Example Usecase: Thumbnail of Assets contained in Export Assets Panel are in sync with the visibility of that art on the document. 
00397         //                                      So if a group, added as an asset in Export Assets Panel, is shown/hidden (or its children are shown/hidden) then the thumbnail of that group in Asset Panel updates accordingly.
00398         kAITimeStampMaxFromArtAndChildren = kAITimeStampOfChildren << 1
00399 };
00400 
00403 #define kUnknownArtTypeErr                      'ART?'
00404 
00407 #define kUnknownPaintOrderTypeErr       'ORD?'
00408 
00411 #define kUntouchableArtObjectErr        'ELIO'
00412 
00415 #define kTooDeepNestingErr                      'NEST'
00416 
00419 #define kUntouchableLayerErr            'NESS'
00420 
00424 #define kInvalidArtTypeForDestErr       '~VAT'
00425 
00426 
00427 /*******************************************************************************
00428  **
00429  **     Suite
00430  **
00431  **/
00432 
00433 
00454 typedef struct AIArtSuite {
00455 
00485         AIAPI AIErr (*NewArt) ( ai::int16 type, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt );
00486 
00491         AIAPI AIErr (*DisposeArt) ( AIArtHandle art );
00492 
00499         AIAPI AIErr (*ReorderArt) ( AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep );
00500 
00508         AIAPI AIErr (*DuplicateArt) ( AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt );
00509 
00515         AIAPI AIErr (*GetFirstArtOfLayer) ( AILayerHandle layer, AIArtHandle *art );
00516 
00535         AIAPI AIErr (*GetLayerOfArt) ( AIArtHandle art, AILayerHandle *layer );
00536 
00556         AIAPI AIErr (*GetArtType) ( AIArtHandle art, short *type );
00557 
00583         AIAPI AIErr (*GetArtUserAttr) ( AIArtHandle art, ai::int32 whichAttr, ai::int32 *attr );
00584 
00601         AIAPI AIErr (*SetArtUserAttr) ( AIArtHandle art, ai::int32 whichAttr, ai::int32 attr );
00602 
00620         AIAPI AIErr (*GetArtParent) ( AIArtHandle art, AIArtHandle *parent );
00621 
00642         AIAPI AIErr (*GetArtFirstChild) ( AIArtHandle art, AIArtHandle *child );
00643 
00662         AIAPI AIErr (*GetArtSibling) ( AIArtHandle art, AIArtHandle *sibling );
00663 
00681         AIAPI AIErr (*GetArtPriorSibling) ( AIArtHandle art, AIArtHandle *sibling );
00682 
00683 
00692         AIAPI AIErr (*GetArtBounds) ( AIArtHandle art, AIRealRect *bounds );
00693 
00698         AIAPI AIErr (*SetArtBounds) ( AIArtHandle art );
00699 
00713         AIAPI AIErr (*GetArtCenterPointVisible) ( AIArtHandle art, AIBoolean *visible );
00714 
00719         AIAPI AIErr (*SetArtCenterPointVisible) ( AIArtHandle art, AIBoolean visible );
00720 
00733         AIAPI AIErr (*GetArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIRealRect *bounds );
00734 
00735         /* Introduced in Illustrator 7.0 */
00736 
00745         AIAPI AIErr (*UpdateArtworkLink) ( AIArtHandle art, AIBoolean force, AIBoolean *updated );
00746 
00747         /* Introduced in Illustrator 8.0 */
00748 
00756         AIAPI AIBoolean (*ValidArt) ( AIArtHandle art, AIBoolean searchAllLayerLists );
00757 
00766         AIAPI AIErr (*GetArtOrder) ( AIArtHandle art1, AIArtHandle art2, short *order );
00767 
00780         AIAPI AIErr (*SelectNamedArtOfLayer) ( AILayerHandle layer, const ai::UnicodeString& name,
00781                 AIBoolean matchWholeWord, AIBoolean caseSensitive );
00782 
00792         AIAPI AIErr (*GetArtRotatedBounds) ( AIArtHandle art, AIReal angle, ai::int32 flags, AIRealRect *bounds );
00793 
00801         AIAPI AIBoolean (*ArtHasFill) ( AIArtHandle art );
00802 
00811         AIAPI AIBoolean (*ArtHasStroke) ( AIArtHandle art );
00812 
00822         AIAPI AIBoolean (*ArtsHaveEqualPaths) ( AIArtHandle art1, AIArtHandle art2 );
00823 
00825         AIAPI AIErr (*ArtCopyFillStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt );
00827         AIAPI AIErr (*ArtCopyStrokeStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt );
00828 
00829         /* New in Illustrator 9.0 */
00830 
00841         AIAPI AIErr (*GetInsertionPoint) ( AIArtHandle *art, short *paintorder, AIBoolean *editable );
00842 
00855         AIAPI AIErr (*SetInsertionPoint) ( AIArtHandle art );
00856 
00861         AIAPI AIErr (*GetKeyArt) ( AIArtHandle *art );
00862 
00863 
00868         AIAPI AIErr (*CancelKeyArt) (void);
00869 
00889         AIAPI AIErr (*GetDictionary) ( AIArtHandle art, struct _AIDictionary** dictionary );
00890 
00902         AIAPI AIBoolean (*HasDictionary) ( AIArtHandle art );
00903 
00915         AIAPI AIBoolean (*IsDictionaryEmpty) ( AIArtHandle art );
00916 
00922         AIAPI AIErr (*SetArtName) (AIArtHandle art, const ai::UnicodeString& name);
00923 
00931         AIAPI AIErr (*GetArtName) (AIArtHandle art, ai::UnicodeString& name, ASBoolean *isDefaultName);
00932 
00937         AIAPI AIErr (*IsArtLayerGroup) (AIArtHandle art, ASBoolean *isLayerGroup);
00938 
00953         AIAPI AIErr (*ReleaseToLayers) (const AIArtHandle art, ASBoolean build);
00954 
00960         AIAPI AIErr (*ModifyTargetedArtSet) (AIArtHandle *list, ai::int32 count, ai::int32 action);
00961 
00967         AIAPI AIBoolean (*IsArtStyledArt) (AIArtHandle art);
00968 
00977         AIAPI AIBoolean (*IsArtClipping) (AIArtHandle art);
00978 
00979 
00980         /* Introduced in Illustrator 10.0 */
00981 
00988         AIAPI AIErr (*TransferAttributes) (AIArtHandle srcart, AIArtHandle dstart, ai::uint32 which);
00989 
00990         /* Introduced in Illustrator 11.0 */
00991 
00998         AIAPI AIErr (*GetArtLastChild) ( AIArtHandle art, AIArtHandle *child );
00999 
01011         AIAPI AIErr (*SetArtTextWrapProperty) ( AIArtHandle art, AIReal offset, AIBoolean invert );
01012 
01024         AIAPI AIErr (*GetArtTextWrapProperty) ( AIArtHandle art, AIReal *offset, AIBoolean *invert );
01025 
01033         AIAPI AIErr (*CreateCopyScope) (enum AICopyScopeKind kind, AICopyScopeHandle* scope);
01034 
01039         AIAPI AIErr (*DestroyCopyScope) (AICopyScopeHandle scope);
01040 
01041         /* Introduced in Illustrator 12.0 */
01042 
01050         AIAPI AIErr (*InsertionPointBadForArtType) (ai::int16 paintOrder, AIArtHandle prep, ai::int16 artType);
01051 
01062         AIAPI AIErr (*PreinsertionFlightCheck) (AIArtHandle candidateArt, ai::int16 paintOrder, AIArtHandle prep);
01063 
01070         AIAPI AIErr (*SetNote) (AIArtHandle art, const ai::UnicodeString& inNote);
01071 
01078         AIAPI AIErr (*GetNote) (AIArtHandle art, ai::UnicodeString& outNote);
01079 
01083         AIAPI AIBoolean (*HasNote) (AIArtHandle art);
01084 
01087         AIAPI void (*DeleteNote) (AIArtHandle art);
01088 
01093         AIAPI AIErr (*GetArtXMPSize)(AIArtHandle art, size_t* size);
01094 
01101         AIAPI AIErr (*GetArtXMP)(AIArtHandle art, char *xmp, size_t size);
01102 
01108         AIAPI AIErr (*SetArtXMP)(AIArtHandle art, const char *xmp);
01109 
01120         AIAPI AIErr (*GetPreciseArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIDoubleRect *bounds );
01121 
01127         AIAPI AIErr (*UncheckedDisposeArt) ( AIArtHandle art );
01128 
01129         /* Introduced in Illustrator 13.0 */
01130 
01138         AIAPI AIErr (*ArtIsGraph)(AIArtHandle art, AIBoolean *artisgraph);
01139 
01140         /* Introduced in Illustrator 14.0 */
01141 
01149         AIAPI AIErr (*SetKeyArt)(AIArtHandle art);
01150 
01151         /* New in Illustrator 15.0 */
01152 
01156         AIAPI AIErr (*GetDrawingMode)(ai::int32* mode);
01157 
01161         AIAPI AIErr (*SetDrawingMode)(ai::int32 mode);
01162 
01173         AIAPI AIErr (*GetInsertionPointForDrawingMode) (ai::int32 mode, AIArtHandle *art, short *paintorder, AIBoolean *editable);
01174 
01184         AIAPI AIErr (*GetInsertionPointForCurrentDrawingMode) (AIArtHandle *art, short *paintorder, AIBoolean *editable);
01192         AIAPI AIErr (*GetPathPolarity) (AIArtHandle art, ai::int32* polarity);
01193 
01199         AIAPI AIBoolean (*IsPixelPerfect) (AIArtHandle art);
01200 
01205         AIAPI AIErr (*SetPixelPerfect) (AIArtHandle art, AIBoolean isPixelPerfect);
01206 
01223         AIAPI AIBoolean (*ObjectsAreEquivalent) ( AIArtHandle art1, AIArtHandle art2 );
01224 
01232         AIAPI AIErr (*IsArtALayerInSymbol) ( AIArtHandle art, AIBoolean* isLayerInSymbol );
01233 
01239         AIAPI AIErr (*GetArtTimeStamp) ( AIArtHandle art, enum AIArtTimeStampOptions option, size_t* timeStamp );
01240 
01241         /*  Retrieves the global art edit timestamp. This value is a counter that is incremented on each art edit (0 at the beginning
01242                 of the session). A comparison between the global timestamp and an art timestamp could reveal when the art was edited last.
01243                 @return The global art edit time stamp for this session.
01244         */
01245         AIAPI size_t (*GetGlobalTimeStamp) ();
01246 
01247         AIAPI AIErr (*ConvertPointTypeToAreaType) ( AIArtHandle art, AIArtHandle* newArtHandle );
01248 
01249         AIAPI AIErr (*ConvertAreaTypeToPointType) ( AIArtHandle art, AIArtHandle* newArtHandle );
01250 
01254         AIAPI AIErr (*MarkDirty) ( AIArtHandle art );
01255 
01256 } AIArtSuite;
01257 
01258 #include "AIHeaderEnd.h" // __cplusplus
01259 
01260 #endif // __AIArt__
01261 


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks