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  *
00006  * ADOBE CONFIDENTIAL
00007  *
00008  * Copyright 1986 Adobe
00009  *
00010  * All Rights Reserved.
00011  *
00012  * NOTICE: Adobe permits you to use, modify, and distribute this file in
00013  * accordance with the terms of the Adobe license agreement accompanying
00014  * it. If you have received this file from a source other than Adobe,
00015  * then your use, modification, or distribution of it requires the prior
00016  * written permission of Adobe.
00017  *
00018  **************************************************************************/
00019 
00020 #pragma once
00021 
00022 
00023 /*******************************************************************************
00024  **
00025  **     Imports
00026  **
00027  **/
00028 
00029 #include "AITypes.h"
00030 #include "IAIAutoBuffer.h"
00031 #include "IAIUnicodeString.h"
00032 
00033 #include "AIHeaderBegin.h"
00034 
00037 /*******************************************************************************
00038  **
00039  **     Constants
00040  **
00041  **/
00042 
00043 #define kAIArtSuite                             "AI Art Suite"
00044 #define kAIArtSuiteVersion21    AIAPI_VERSION(21)
00045 #define kAIArtSuiteVersion              kAIArtSuiteVersion21
00046 #define kAIArtVersion                   kAIArtSuiteVersion
00047 
00048 
00056 #define kAIArtSelectionChangedNotifier          "AI Art Selection Changed Notifier"
00057 
00058 
00062 #define kAIDrawingModeChangedNotifier           "AI Drawing Mode Changed Notifier"
00063 
00069 #define kAIArtPropertiesChangedNotifier         "AI Art Properties Changed Notifier"
00070 
00078 #define kAIAlignmentKeyArtChangedNotifier       "AI Alignment Key Art Changed Notifier"
00079 
00104 #define kAIArtObjectsChangedNotifier        "AI Art Objects Changed Notifier"
00105 
00107 enum AIDrawingMode
00108 {
00109         kAIDrawNormalMode = 0,
00110         kAIDrawBehindMode,
00111         kAIDrawInsideMode
00112 };
00113 
00116 enum AIArtType {
00119         kAnyArt = -1,
00125         kUnknownArt = 0,
00127         kGroupArt,
00129         kPathArt,
00131         kCompoundPathArt,
00134         kTextArtUnsupported,
00137         kTextPathArtUnsupported,
00140         kTextRunArtUnsupported,
00142         kPlacedArt,
00147         kMysteryPathArt,
00149         kRasterArt,
00151         kPluginArt,
00153         kMeshArt,
00155         kTextFrameArt,
00157         kSymbolArt,
00160         kForeignArt,
00162         kLegacyTextArt,
00164         kChartArt,
00165     
00167     kRadialRepeatArt,
00169     kGridRepeatArt,
00171     kSymmetryArt,
00173     kConcentricRepeatArt,
00174     
00175     kLastArtType = kSymmetryArt,
00176 };
00177 
00178 
00183 enum AIArtOrder {
00185         kUnknownOrder = 0,
00187         kFirstBeforeSecond = 1,
00189         kSecondAfterFirst = kFirstBeforeSecond,
00191         kFirstAfterSecond,
00193         kSecondBeforeFirst = kFirstAfterSecond,
00195         kFirstInsideSecond,
00197         kSecondInsideFirst
00198 };
00199 
00200 
00227 enum AIArtUserAttr {
00229         kArtSelected            = 0x00000001,
00231         kArtLocked                      = 0x00000002,
00233         kArtHidden                      = 0x00000004,
00239         kArtFullySelected       = 0x00000008,
00241         kArtExpanded            = 0x00000010,
00243         kArtTargeted            = 0x00000020,
00246         kArtIsClipMask          = 0x00001000,
00249         kArtIsTextWrap          = 0x00010000,
00250 
00252         kArtSelectedTopLevelGroups              = 0x00000040,
00254         kArtSelectedLeaves                              = 0x00000080,
00256         kArtSelectedTopLevelWithPaint   = 0x00000100,   // Top level groups that have a stroke or fill, or leaves
00257 
00261         kArtHasSimpleStyle      = 0x00000200,
00265         kArtHasActiveStyle      = 0x00000400,
00269         kArtPartOfCompound  = 0x00000800,       // notice that 0x00001000 is in use for kArtIsClipMask
00271         kMatchDictionaryArt     = 0x00002000,
00273         kMatchArtInGraphs       = 0x00004000,
00275         kMatchArtInResultGroups = 0x00008000, // notice that 0x00010000 is in use for kArtIsTextWrap
00276 
00278         kMatchTextPaths = 0x00020000,
00279 
00284         kArtStyleIsDirty = 0x00040000,
00285 
00287         kMatchArtNotIntoPluginGroups = 0x00080000,
00288 
00290         kMatchArtInCharts = 0x00100000,
00291     
00293         kMatchArtIntoRepeats = 0x00200000
00294 };
00295 
00302 enum AIArtBoundsOptions {
00305         kVisibleBounds                          = 0x0000,
00308         kControlBounds                          = 0x0001,
00311         kNoStrokeBounds                         = 0x0002,
00314         kNoExtendedBounds                       = 0x0004,
00318         kWStrokeDependsOnPreference     = 0x0008,
00320         kExcludeHiddenObjectBounds      = 0x0010,
00322         kExcludeUnpaintedObjectBounds = 0x0020,
00324         kExcludeGuideBounds                     = 0x0040
00325 };
00326 
00329 enum AIArtTargettingAction {
00331         kReplaceAction                          = 0x0001,
00333         kAppendAction                           = 0x0002,
00335         kRemoveAction                           = 0x0003,
00337         kUpAction                                       = 0x0004,
00339         kDownAction                                     = 0x0005,
00341         kDownToLeafAction                       = 0x0006,
00343         kUpToLayersAction                       = 0x0007
00344 };
00345 
00349 enum AIArtTransferAttrsOptions {
00351         kTransferID                                             = 1 << 0,
00353         kTransferStyle                                  = 1 << 1,
00357         kTransferOpacityMask                    = 1 << 2,
00360         kTransferTextWrapProperties             = 1 << 3,
00363         kTransferCompoundShapeMode              = 1 << 4,
00372         kTransferSavedSelections                = 1 << 5,
00376         kTransferSlicingAttributes              = 1 << 6,
00378         kTransferArtLocked                              = 1 << 7,
00380         kTransferArtHidden                              = 1 << 8,
00383         kTransferSVGProperties                  = 1 << 9,
00389         kTransferLivePaintPathTags              = 1 << 10,
00393         kTransferPixelPerfectAttribute  = 1 << 11,
00397         kTransferLiveShapeProperties    = 1 << 12,
00401         kTransferAll                                    = 0xFFFFFFFF
00402 };
00403 
00405 typedef struct _t_AICopyScopeOpaque* AICopyScopeHandle;
00406 
00408 enum AICopyScopeKind {
00411         kAICopyScopeForDuplicate = 0,
00418         kAICopyScopeForRetarget,
00420         kDummyScopeKind = 0xffffffff
00421 };
00422 
00423 enum AIPathPolarity
00424 {
00425         kAIPolarPath,
00426         kAINonPolarPath
00427 
00428 };
00429 
00430 enum AIArtTimeStampOptions
00431 {
00432         kAITimeStampOfArt = 1,
00433         // 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.
00434         kAITimeStampOfChildren = kAITimeStampOfArt << 1,
00435         // Example Usecase: Thumbnail of Assets contained in Export Assets Panel are in sync with the visibility of that art on the document. 
00436         //                                      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.
00437         kAITimeStampMaxFromArtAndChildren = kAITimeStampOfChildren << 1
00438 };
00439 
00440 namespace ai
00441 {
00442         //Forward declaration
00443         class uuid;
00444 
00446         struct ArtObjectsChangedData
00447         {
00448                 AutoBuffer<uuid> insertedObjList;
00449                 AutoBuffer<uuid> removedObjList;
00450                 AutoBuffer<uuid> modifiedObjList;
00451         };
00452 
00454         struct ArtObjectsChangedNotifierData
00455         {
00456                 ArtObjectsChangedData artObjsChangedData;
00457                 size_t refStamp;
00458         };
00459 }
00460 
00463 #define kUnknownArtTypeErr                      'ART?'
00464 
00467 #define kUnknownPaintOrderTypeErr       'ORD?'
00468 
00471 #define kUntouchableArtObjectErr        'ELIO'
00472 
00475 #define kTooDeepNestingErr                      'NEST'
00476 
00479 #define kUntouchableLayerErr            'NESS'
00480 
00484 #define kInvalidArtTypeForDestErr       '~VAT'
00485 
00489 #define kAIArtHandleOutOfScopeErr               'AHOS'
00490 
00491 
00492 
00493 /*******************************************************************************
00494  **
00495  **     Suite
00496  **
00497  **/
00498 
00499 
00520 typedef struct AIArtSuite {
00521 
00551         AIAPI AIErr (*NewArt) ( ai::int16 type, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt );
00552 
00557         AIAPI AIErr (*DisposeArt) ( AIArtHandle art );
00558 
00565         AIAPI AIErr (*ReorderArt) ( AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep );
00566 
00574         AIAPI AIErr (*DuplicateArt) ( AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt );
00575 
00581         AIAPI AIErr (*GetFirstArtOfLayer) ( AILayerHandle layer, AIArtHandle *art );
00582 
00601         AIAPI AIErr (*GetLayerOfArt) ( AIArtHandle art, AILayerHandle *layer );
00602 
00622         AIAPI AIErr (*GetArtType) ( AIArtHandle art, short *type );
00623 
00649         AIAPI AIErr (*GetArtUserAttr) ( AIArtHandle art, ai::int32 whichAttr, ai::int32 *attr );
00650 
00667         AIAPI AIErr (*SetArtUserAttr) ( AIArtHandle art, ai::int32 whichAttr, ai::int32 attr );
00668 
00686         AIAPI AIErr (*GetArtParent) ( AIArtHandle art, AIArtHandle *parent );
00687 
00708         AIAPI AIErr (*GetArtFirstChild) ( AIArtHandle art, AIArtHandle *child );
00709 
00728         AIAPI AIErr (*GetArtSibling) ( AIArtHandle art, AIArtHandle *sibling );
00729 
00747         AIAPI AIErr (*GetArtPriorSibling) ( AIArtHandle art, AIArtHandle *sibling );
00748 
00749 
00758         AIAPI AIErr (*GetArtBounds) ( AIArtHandle art, AIRealRect *bounds );
00759 
00764         AIAPI AIErr (*SetArtBounds) ( AIArtHandle art );
00765 
00779         AIAPI AIErr (*GetArtCenterPointVisible) ( AIArtHandle art, AIBoolean *visible );
00780 
00785         AIAPI AIErr (*SetArtCenterPointVisible) ( AIArtHandle art, AIBoolean visible );
00786 
00799         AIAPI AIErr (*GetArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIRealRect *bounds );
00800 
00801         /* Introduced in Illustrator 7.0 */
00802 
00811         AIAPI AIErr (*UpdateArtworkLink) ( AIArtHandle art, AIBoolean force, AIBoolean *updated );
00812 
00813         /* Introduced in Illustrator 8.0 */
00814 
00822         AIAPI AIBoolean (*ValidArt) ( AIArtHandle art, AIBoolean searchAllLayerLists );
00823 
00832         AIAPI AIErr (*GetArtOrder) ( AIArtHandle art1, AIArtHandle art2, short *order );
00833 
00846         AIAPI AIErr (*SelectNamedArtOfLayer) ( AILayerHandle layer, const ai::UnicodeString& name,
00847                 AIBoolean matchWholeWord, AIBoolean caseSensitive );
00848 
00858         AIAPI AIErr (*GetArtRotatedBounds) ( AIArtHandle art, AIReal angle, ai::int32 flags, AIRealRect *bounds );
00859 
00867         AIAPI AIBoolean (*ArtHasFill) ( AIArtHandle art );
00868 
00877         AIAPI AIBoolean (*ArtHasStroke) ( AIArtHandle art );
00878 
00888         AIAPI AIBoolean (*ArtsHaveEqualPaths) ( AIArtHandle art1, AIArtHandle art2 );
00889 
00891         AIAPI AIErr (*ArtCopyFillStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt );
00893         AIAPI AIErr (*ArtCopyStrokeStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt );
00894 
00895         /* New in Illustrator 9.0 */
00896 
00907         AIAPI AIErr (*GetInsertionPoint) ( AIArtHandle *art, short *paintorder, AIBoolean *editable );
00908 
00921         AIAPI AIErr (*SetInsertionPoint) ( AIArtHandle art );
00922 
00927         AIAPI AIErr (*GetKeyArt) ( AIArtHandle *art );
00928 
00929 
00934         AIAPI AIErr (*CancelKeyArt) (void);
00935 
00955         AIAPI AIErr (*GetDictionary) ( AIArtHandle art, struct _AIDictionary** dictionary );
00956 
00968         AIAPI AIBoolean (*HasDictionary) ( AIArtHandle art );
00969 
00981         AIAPI AIBoolean (*IsDictionaryEmpty) ( AIArtHandle art );
00982 
00988         AIAPI AIErr (*SetArtName) (AIArtHandle art, const ai::UnicodeString& name);
00989 
00997         AIAPI AIErr (*GetArtName) (AIArtHandle art, ai::UnicodeString& name, ASBoolean *isDefaultName);
00998 
01003         AIAPI AIErr (*IsArtLayerGroup) (AIArtHandle art, ASBoolean *isLayerGroup);
01004 
01019         AIAPI AIErr (*ReleaseToLayers) (const AIArtHandle art, ASBoolean build);
01020 
01026         AIAPI AIErr (*ModifyTargetedArtSet) (AIArtHandle *list, ai::int32 count, ai::int32 action);
01027 
01033         AIAPI AIBoolean (*IsArtStyledArt) (AIArtHandle art);
01034 
01043         AIAPI AIBoolean (*IsArtClipping) (AIArtHandle art);
01044 
01045 
01046         /* Introduced in Illustrator 10.0 */
01047 
01054         AIAPI AIErr (*TransferAttributes) (AIArtHandle srcart, AIArtHandle dstart, ai::uint32 which);
01055 
01056         /* Introduced in Illustrator 11.0 */
01057 
01064         AIAPI AIErr (*GetArtLastChild) ( AIArtHandle art, AIArtHandle *child );
01065 
01077         AIAPI AIErr (*SetArtTextWrapProperty) ( AIArtHandle art, AIReal offset, AIBoolean invert );
01078 
01090         AIAPI AIErr (*GetArtTextWrapProperty) ( AIArtHandle art, AIReal *offset, AIBoolean *invert );
01091 
01099         AIAPI AIErr (*CreateCopyScope) (enum AICopyScopeKind kind, AICopyScopeHandle* scope);
01100 
01105         AIAPI AIErr (*DestroyCopyScope) (AICopyScopeHandle scope);
01106 
01107         /* Introduced in Illustrator 12.0 */
01108 
01116         AIAPI AIErr (*InsertionPointBadForArtType) (ai::int16 paintOrder, AIArtHandle prep, ai::int16 artType);
01117 
01128         AIAPI AIErr (*PreinsertionFlightCheck) (AIArtHandle candidateArt, ai::int16 paintOrder, AIArtHandle prep);
01129 
01136         AIAPI AIErr (*SetNote) (AIArtHandle art, const ai::UnicodeString& inNote);
01137 
01144         AIAPI AIErr (*GetNote) (AIArtHandle art, ai::UnicodeString& outNote);
01145 
01149         AIAPI AIBoolean (*HasNote) (AIArtHandle art);
01150 
01153         AIAPI void (*DeleteNote) (AIArtHandle art);
01154 
01159         AIAPI AIErr (*GetArtXMPSize)(AIArtHandle art, size_t* size);
01160 
01167         AIAPI AIErr (*GetArtXMP)(AIArtHandle art, char *xmp, size_t size);
01168 
01174         AIAPI AIErr (*SetArtXMP)(AIArtHandle art, const char *xmp);
01175 
01186         AIAPI AIErr (*GetPreciseArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIDoubleRect *bounds );
01187 
01193         AIAPI AIErr (*UncheckedDisposeArt) ( AIArtHandle art );
01194 
01195         /* Introduced in Illustrator 13.0 */
01196 
01204         AIAPI AIErr (*ArtIsGraph)(AIArtHandle art, AIBoolean *artisgraph);
01205 
01206         /* Introduced in Illustrator 14.0 */
01207 
01215         AIAPI AIErr (*SetKeyArt)(AIArtHandle art);
01216 
01217         /* New in Illustrator 15.0 */
01218 
01222         AIAPI AIErr (*GetDrawingMode)(ai::int32* mode);
01223 
01227         AIAPI AIErr (*SetDrawingMode)(ai::int32 mode);
01228 
01239         AIAPI AIErr (*GetInsertionPointForDrawingMode) (ai::int32 mode, AIArtHandle *art, short *paintorder, AIBoolean *editable);
01240 
01250         AIAPI AIErr (*GetInsertionPointForCurrentDrawingMode) (AIArtHandle *art, short *paintorder, AIBoolean *editable);
01258         AIAPI AIErr (*GetPathPolarity) (AIArtHandle art, ai::int32* polarity);
01259 
01265         AIAPI AIBoolean (*IsPixelPerfect) (AIArtHandle art);
01266 
01271         AIAPI AIErr (*SetPixelPerfect) (AIArtHandle art, AIBoolean isPixelPerfect);
01272 
01289         AIAPI AIBoolean (*ObjectsAreEquivalent) ( AIArtHandle art1, AIArtHandle art2 );
01290 
01298         AIAPI AIErr (*IsArtALayerInSymbol) ( AIArtHandle art, AIBoolean* isLayerInSymbol );
01299 
01305         AIAPI AIErr (*GetArtTimeStamp) ( AIArtHandle art, enum AIArtTimeStampOptions option, size_t* timeStamp );
01306 
01307         /*  Retrieves the global art edit timestamp. This value is a counter that is incremented on each art edit (0 at the beginning
01308                 of the session). A comparison between the global timestamp and an art timestamp could reveal when the art was edited last.
01309                 @return The global art edit time stamp for this session.
01310         */
01311         AIAPI size_t (*GetGlobalTimeStamp) ();
01312 
01313         AIAPI AIErr (*ConvertPointTypeToAreaType) ( AIArtHandle art, AIArtHandle* newArtHandle );
01314 
01315         AIAPI AIErr (*ConvertAreaTypeToPointType) ( AIArtHandle art, AIArtHandle* newArtHandle );
01316 
01321         AIAPI AIErr (*MarkDirty) ( AIArtHandle art, AIBoolean markStyleDirty );
01322 
01331         AIAPI  AIErr (*GetSafeArtHandle) ( AIArtHandle art, AISafeArtHandle* safeArt );
01332 
01342         AIAPI AIErr (*GetArtHandle) ( AISafeArtHandle safeArt, AIArtHandle* art );
01343 
01344 
01349         AIAPI AIErr (*GetArtDefaultName) ( AIArtHandle art, ai::UnicodeString &name );
01350 
01355         AIAPI AIErr (*GetDocumentOfArt) ( AIArtHandle art, AIDocumentHandle *document );
01356 
01357 } AIArtSuite;
01358 
01359 #include "AIHeaderEnd.h" // __cplusplus
01360 
01361 #endif // __AIArt__


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