Adobe.com
Contents Suites Classes Class Index Member Index

AIDictionary.h

Go to the documentation of this file.
00001 #ifndef __AIDict__
00002 #define __AIDict__
00003 
00004 /*
00005  *        Name: AIDictionary.h
00006  *              $Id $
00007  *      Author:
00008  *        Date:
00009  *     Purpose: Adobe Illustrator Dictionary Object Suite.
00010  *
00011  * ADOBE SYSTEMS INCORPORATED
00012  * Copyright 1999-2007 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 #ifndef __AIEntry__
00031 #include "AIEntry.h"
00032 #endif
00033 
00034 
00035 #include "IAIFilePath.hpp"
00036 
00037 #include "AIHeaderBegin.h"
00038 
00041 /*******************************************************************************
00042  **
00043  **     Constants
00044  **
00045  **/
00046 
00047 #define kAIDictionarySuite                                              "AI Dictionary Suite"
00048 #define kAIDictionarySuiteVersion10                             AIAPI_VERSION(10)
00049 #define kAIDictionarySuiteVersion                               kAIDictionarySuiteVersion10
00050 #define kAIDictionaryVersion                                    kAIDictionarySuiteVersion
00051 
00052 #define kAIDictionaryIteratorSuite                              "AI Dictionary Iterator Suite"
00053 #define kAIDictionaryIteratorSuiteVersion5              AIAPI_VERSION(5)
00054 #define kAIDictionaryIteratorSuiteVersion               kAIDictionaryIteratorSuiteVersion5
00055 #define kAIDictionaryIteratorVersion                    kAIDictionaryIteratorSuiteVersion
00056 
00057 
00059 #define kNoSuchKey                              'NOKY'
00060 
00061 
00062 /*******************************************************************************
00063  **
00064  **     Types
00065  **
00066  **/
00067 
00069 typedef const struct _t_AIDictKey *AIDictKey;
00070 
00071 
00074 typedef struct _AIDictionaryIterator*                   AIDictionaryIterator;
00075 
00076 
00078 typedef struct _AIDictionaryKeyChangedNotifyData {
00080         ai::int32 refStamp;
00082         AIDictionaryRef dictionary;
00084         AIDictKey key;
00085 } AIDictionaryKeyChangedNotifyData;
00086 
00087 
00088 /*******************************************************************************
00089  **
00090  **     Suite
00091  **
00092  **/
00093 
00116 struct AIDictionarySuite {
00117 
00123         AIAPI AIErr (*CreateDictionary) ( AIDictionaryRef* dictionary );
00124 
00133         AIAPI AIErr (*CreateDictionaryFromJSONFile) ( AIDictionaryRef* dictionary, const ai::FilePath &file );
00134 
00138         AIAPI ai::int32 (*AddRef) ( AIDictionaryRef dictionary );
00139 
00145         AIAPI ai::int32 (*Release) ( AIDictionaryRef dictionary );
00146 
00152         AIAPI AIErr (*Clone) ( ConstAIDictionaryRef src, AIDictionaryRef* dst );
00153 
00158         AIAPI AIErr (*Copy) ( AIDictionaryRef dict, ConstAIDictionaryRef src );
00159 
00165         AIAPI ai::uint32 (*Size) ( ConstAIDictionaryRef dict );
00166 
00173         AIAPI AIErr (*Begin) ( ConstAIDictionaryRef dict, AIDictionaryIterator* iterator );
00174 
00180         AIAPI AIDictKey (*Key) ( const char* keyString );
00181 
00187         AIAPI const char* (*GetKeyString) ( AIDictKey key );
00188 
00194         AIAPI AIBoolean (*IsKnown) ( ConstAIDictionaryRef dictionary, AIDictKey key );
00195 
00200         AIAPI AIErr (*DeleteEntry) ( AIDictionaryRef dictionary, AIDictKey key );
00201 
00208         AIAPI AIErr (*GetEntryType) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIEntryType* entryType );
00209 
00210 
00218         AIAPI AIErr (*CopyEntry) ( ConstAIDictionaryRef dictionary1, AIDictionaryRef dictionary2,
00219                         AIDictKey key1, AIDictKey key2 );
00220 
00228         AIAPI AIErr (*MoveEntry) ( AIDictionaryRef dictionary1, AIDictionaryRef dictionary2,
00229                         AIDictKey key1, AIDictKey key2 );
00230 
00238         AIAPI AIErr (*SwapEntries) ( AIDictionaryRef dictionary1, AIDictionaryRef dictionary2,
00239                         AIDictKey key1, AIDictKey key2 );
00240 
00241 
00247         AIAPI AIErr (*GetArtEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIArtHandle* art );
00248 
00254         AIAPI AIErr (*NewArtEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::int16 type );
00255 
00256 
00263         AIAPI AIErr (*MoveArtToEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art );
00264 
00275         AIAPI AIErr (*MoveEntryToArt) ( AIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder,
00276                         AIArtHandle prep, AIArtHandle* art );
00277 
00278 
00284         AIAPI AIErr (*CopyArtToEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art );
00285 
00295         AIAPI AIErr (*CopyEntryToArt) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder,
00296                         AIArtHandle prep, AIArtHandle* art );
00297 
00303         AIAPI AIErr (*SetEntryToLayer) ( AIDictionaryRef dictionary, AIDictKey key, AILayerHandle layer );
00304 
00316         AIAPI AIErr (*SetLayerToEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder,
00317                         AILayerHandle prep, AILayerHandle *layer );
00318 
00325         AIAPI AIEntryRef (*Get) ( ConstAIDictionaryRef dictionary, AIDictKey key );
00326 
00333         AIAPI AIErr (*Set) ( AIDictionaryRef dictionary, AIDictKey key, AIEntryRef entry );
00334 
00335 
00336         // the following are convenience APIs for getting and setting entries of the basic types
00342         AIAPI AIErr (*GetBooleanEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIBoolean* value );
00343 
00349         AIAPI AIErr (*SetBooleanEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIBoolean value );
00350 
00356         AIAPI AIErr (*GetIntegerEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int32* value );
00357 
00363         AIAPI AIErr (*SetIntegerEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::int32 value );
00364 
00370         AIAPI AIErr (*GetPointerEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::intptr* value );
00371 
00377         AIAPI AIErr (*SetPointerEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::intptr value );
00378 
00384         AIAPI AIErr (*GetRealEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIReal* value );
00385 
00391         AIAPI AIErr (*SetRealEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIReal value );
00392 
00398         AIAPI AIErr (*GetStringEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, const char** value );
00399 
00405         AIAPI AIErr (*SetStringEntry) ( AIDictionaryRef dictionary, AIDictKey key, const char* value );
00406 
00413         AIAPI AIErr (*GetBinaryEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, void* value, size_t* size );
00414 
00421         AIAPI AIErr (*SetBinaryEntry) ( AIDictionaryRef dictionary, AIDictKey key, void* value, size_t size );
00422 
00428         AIAPI AIErr (*GetDictEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef* value );
00429 
00435         AIAPI AIErr (*SetDictEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef value );
00436 
00442         AIAPI AIErr (*GetArrayEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIArrayRef* value );
00443 
00449         AIAPI AIErr (*SetArrayEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArrayRef value );
00450 
00456         AIAPI AIErr (*GetUnicodeStringEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::UnicodeString& value );
00457 
00463         AIAPI AIErr (*SetUnicodeStringEntry) ( AIDictionaryRef dictionary, AIDictKey key, const ai::UnicodeString& value );
00464 
00470         AIAPI AIErr (*TouchArt) ( ConstAIDictionaryRef dictionary );
00471 
00480         AIAPI AIErr(*Find) (ConstAIDictionaryRef dict, AIDictKey key, AIDictionaryIterator* iterator);
00481 
00482 
00483 };
00484 
00485 
00492 struct AIDictionaryIteratorSuite {
00493 
00497         AIAPI ai::int32 (*AddRef) ( AIDictionaryIterator iterator );
00498 
00504         AIAPI ai::int32 (*Release) ( AIDictionaryIterator iterator );
00505 
00511         AIAPI AIBoolean (*IsValid) ( AIDictionaryIterator iterator );
00512 
00517         AIAPI AIErr (*Copy) ( AIDictionaryIterator iterator, AIDictionaryIterator from );
00518 
00523         AIAPI AIErr (*Clone) ( AIDictionaryIterator iterator, AIDictionaryIterator* clone );
00524 
00531         AIAPI AIBoolean (*IsEqual) ( AIDictionaryIterator iterator1, AIDictionaryIterator iterator2 );
00532 
00538         AIAPI AIBoolean (*AtEnd) ( AIDictionaryIterator iterator );
00539 
00545         AIAPI void (*Next) ( AIDictionaryIterator iterator );
00546 
00552         AIAPI void (*Prev) ( AIDictionaryIterator iterator );
00553 
00559         AIAPI AIDictKey (*GetKey) ( AIDictionaryIterator iterator );
00560 
00566         AIAPI AIEntryRef(*GetEntry) (AIDictionaryIterator iterator);
00567 };
00568 
00569 
00570 #include "AIHeaderEnd.h"
00571 
00572 
00573 #endif


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