Adobe.com
Contents Suites Classes Class Index Member Index

AISwatchLibraries.h

Go to the documentation of this file.
00001 #ifndef __AISwatchLibraries__
00002 #define __AISwatchLibraries__
00003 
00004 /*
00005  *        Name: AISwatchLibraries.h
00006  *      Author: Neal Tucker
00007  *        Date: 3/11/97
00008  *     Purpose: Adobe Illustrator Swatch Libraries Suite.
00009  *
00010  * ADOBE SYSTEMS INCORPORATED
00011  * Copyright 1986-2007 Adobe Systems Incorporated.
00012  * All rights reserved.
00013  *
00014  * NOTICE:  Adobe permits you to use, modify, and distribute this file 
00015  * in accordance with the terms of the Adobe license agreement 
00016  * accompanying it. If you have received this file from a source other 
00017  * than Adobe, then your use, modification, or distribution of it 
00018  * requires the prior written permission of Adobe.
00019  *
00020  */
00021 
00022 #ifndef __ASTypes__
00023 #include "ASTypes.h"
00024 #endif
00025 
00026 #ifndef __AIColor__
00027 #include "AIColor.h"
00028 #endif
00029 
00030 #ifndef __AISwatchList__
00031 #include "AISwatchList.h"
00032 #endif
00033 
00034 #include "AIHeaderBegin.h"
00035 
00038 // AISwatchLibs Suite
00039 #define kAISwatchLibrariesSuite                 "AI Swatch Libraries Suite"
00040 #define kAISwatchLibrariesSuiteVersion  AIAPI_VERSION(8)
00041 #define kAISwatchLibrariesVersion               kAISwatchLibrariesSuiteVersion
00042 
00046 #define kAISwatchLibsCaller                             "Swatch Libraries"
00047 
00048 /*******************************************************************************
00049  **
00050  **     Types
00051  **
00052  **/
00053 typedef struct _t_OS_MenuPtr* AIMenuPtr;
00054 
00059 #define kAISwatchLibraryChangedNotifier "AI Swatch Library Changed Notifier"
00060 
00064 typedef struct {
00066         AISwatchListRef swatchList;
00068         ai::int32 swatchLibraryID;
00069 } AISwatchLibraryChangedNotifierData;
00070 
00071 
00076 typedef enum {
00078         kAICurDocSwatch,
00080         kAINextDocSwatch,
00082         kAIPrevDocSwatch,
00084         kAISwatchInNextDocSwatchGroup,
00086         kAISwatchInPrevDocSwatchGroup
00087 } AIRelativeDocSwatchKind;
00088 
00092 typedef enum {
00094         kAIMainDocSwatches,
00098         kAIDocFillSwatches,
00102         kAIDocStrokeSwatches
00103 } AIWhichDocSwatchesPalette;
00104 
00105 
00109 typedef ai::uint32 AISwatchLibraryType;
00110 
00113 #define kAIPresetSwatches               1
00114 
00115 #define kAIPresetColorBooks             2
00116 
00117 #define kAIPresetGradients              4
00118 
00119 #define kAIPresetPatterns               8
00120 
00121 #define kAIUserWritableSwatches 16
00122 
00123 #define kAIOtherLibraries               32
00124 
00125 #define kAIAllSwatchLibraries   kAIPresetSwatches | kAIPresetColorBooks | kAIPresetGradients | kAIPresetPatterns | kAIUserWritableSwatches | kAIOtherLibraries
00126 
00129 #define kSwatchDoesNotExistErr          '!SNE'
00130 
00133 #define kNoActiveSwatchError            '!NAS'
00134 
00135 
00153 typedef struct
00154 {
00168         AIErr ASAPI (*CountLibraries)(ai::int32 *num);
00169 
00179         AIErr ASAPI (*GetNthLibrary)(ai::int32 num, AISwatchListRef *swatchlist);
00180 
00187         AIErr ASAPI (*GetNthLibraryName)(ai::int32 num, ai::UnicodeString& name);
00188 
00189         // Aggregate list access
00190 
00195         AIErr ASAPI (*CountLibrarySwatches)(ai::int32 *num);
00196 
00202         AIErr ASAPI (*GetNthLibrarySwatch)(ai::int32 num, AISwatchRef *swatch);
00203 
00208         AIErr ASAPI (*CountLibraryPatterns)(ai::int32 *num);
00209 
00215         AIErr ASAPI (*GetNthLibraryPattern)(ai::int32 num, AIPatternHandle *pattern);
00216 
00221         AIErr ASAPI (*CountLibraryGradients)(ai::int32 *num);
00222 
00228         AIErr ASAPI (*GetNthLibraryGradient)(ai::int32 num, AIGradientHandle *gradient);
00229 
00234         AIErr ASAPI (*CountLibraryCustomColors)(ai::int32 *num);
00235 
00241         AIErr ASAPI (*GetNthLibraryCustomColor)(ai::int32 num, AICustomColorHandle *ccolor);
00242 
00243         // Color book access, new in AI12 (CS2)
00244 
00254         AIBoolean ASAPI (*FindStandardBookColor)(const ai::UnicodeString& name, AICustomColor* color);
00255 
00263         AIBoolean ASAPI (*FindLegacyBookColor)(const ai::UnicodeString& name, AICustomColor* color);
00264 
00270         AIErr ASAPI (*MapLegacyColorName)(const ai::UnicodeString& src, ai::UnicodeString& dst);
00271 
00272         // Palette and Selection control, new for AI13 (CS3)
00273 
00282         AIErr ASAPI (*OpenNthLibrary)(ai::int32 num, AIBoolean showPalette, AISwatchListRef *swatchList );
00283 
00291         AIBoolean ASAPI (*NthLibraryIsOpen)( ai::int32 num , bool shouldBeVisible);
00292 
00293 
00303         AIBoolean ASAPI (*SelectNthDocumentSwatchIfVisible) ( ai::int32 index, AIBoolean deselectOthers );
00304 
00320         AIBoolean ASAPI (*SelectNthDocColorGroupIfVisible) ( ai::int32 index, AIBoolean deselectOthers );
00321 
00338         AIErr ASAPI (*BuildLibrariesList) ( AIMenuPtr librariesList, AISwatchLibraryType includeLibraryTypes, ai::int32 startIndex, ai::int32 *contentChangeStampRef, int *checkLibraryID);
00339 
00349         AIErr ASAPI (*GetActiveSwatchList) ( AISwatchListRef *swatchlist, ai::int32 activeLibraryID);
00350 
00356         ai::int32 ASAPI (*CountSelectedDocSwatches) ( );
00357 
00366         AIErr ASAPI (*GetSelectedDocSwatchColors) ( AIColor *colors, ai::int32 bufferSize );
00367 
00374         ai::int32 ASAPI (*CountSelectedDocSwatchGroups) ( );
00375 
00384         AIErr ASAPI (*GetSelectedDocSwatchGroups) ( AISwatchGroupRef *swatchGroups, ai::int32 bufferSize );
00385 
00410         AIErr ASAPI (*GetRelativeDocSwatch) ( AIRelativeDocSwatchKind selectKind, AIBoolean selectIt, AIBoolean wrap,
00411                                                                                         AIWhichDocSwatchesPalette targetPalette, AISwatchRef *relativeSwatch );
00412 
00421         AIErr ASAPI (*GetSelectedDocSwatchRefs) ( AISwatchRef *swatchRefs, ai::int32 bufferSize );
00422 
00423 
00432         AIBoolean ASAPI (*FindColorInBook)(const ai::UnicodeString& name, ai::int32 bookID, AICustomColor* color);
00433 
00440         ai::int32 ASAPI(*CountSelectedDocSwatchesNotInAnySelectedGroup) ();
00441 
00450         AIErr ASAPI(*GetSelectedDocSwatchRefsNotInAnySelectedGroup) (AISwatchRef *colors, ai::int32 bufferSize);
00451     
00457     AIErr ASAPI(*GetNthLibraryPath)(ai::int32 num, ai::FilePath& path);
00458     
00463     AIErr ASAPI(*OpenLibraryByPath)(const ai::FilePath& path);
00464 
00465 
00466 } AISwatchLibrariesSuite;
00467 
00468 
00469 
00470 #include "AIHeaderEnd.h"
00471 
00472 #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