PIGeneral.h
Go to the documentation of this file.
00001 // ADOBE SYSTEMS INCORPORATED
00002 // (c) Copyright  1991 - 2007 Adobe Systems Incorporated
00003 // All Rights Reserved
00004 //
00005 // NOTICE:  Adobe permits you to use, modify, and distribute this 
00006 // file in accordance with the terms of the Adobe license agreement
00007 // accompanying it.  If you have received this file from a source
00008 // other than Adobe, then your use, modification, or distribution
00009 // of it requires the prior written permission of Adobe.
00010 //-------------------------------------------------------------------
00139 #ifndef __PIGeneral_h__
00140 #define __PIGeneral_h__
00141 
00142 #pragma once
00143 
00144 // application specific
00145 #include "PITypes.h"
00146 #include "PIResDefines.h"
00147 #include "SPFiles.h"    // SPPlatformFileSpecificationW and XPlatFileSpec
00148 
00149 #ifdef __PSWorld__
00150 #include "UGeometry.h"
00151 #include "PSWorldEnums.h"
00152 #endif
00153 
00154 #if PRAGMA_STRUCT_ALIGN
00155 #pragma options align=mac68k
00156 #endif
00157 
00158 //-------------------------------------------------------------------------------
00159 //  Defines -- Photoshop signature -- '8BIM'
00160 //-------------------------------------------------------------------------------
00161 
00163 #define kPhotoshopSignature     0x3842494d
00164 
00165 //-------------------------------------------------------------------------------
00166 //  Defines -- General plug-in error codes.
00167 //-------------------------------------------------------------------------------
00168 
00170 
00171 
00173 #define errPlugInHostInsufficient           -30900
00174 
00176 #define errPlugInPropertyUndefined          -30901
00177 
00182 #define errHostDoesNotSupportColStep        -30902
00183 
00188 #define errInvalidSamplePoint               -30903
00189          
00194 #define errReportString                     -30904
00195 
00196 /* New in 8.0 */
00197 
00202 #define errHostVersionIncompatible          -30905
00203 
00204 
00205 //-------------------------------------------------------------------------------
00206 //  Defines -- Channel Port error codes.
00207 //-------------------------------------------------------------------------------
00208 
00210 
00211 #define errUnknownPort                      -30910    
00213 #define errUnsupportedRowBits               -30911    
00216 #define errUnsupportedColBits               -30912    
00219 #define errUnsupportedBitOffset             -30913    
00222 #define errUnsupportedDepth                 -30914    
00225 #define errUnsupportedDepthConversion       -30915    
00229 //-------------------------------------------------------------------------------
00230 //  Defines -- Scripting system error codes.
00231 //-------------------------------------------------------------------------------
00232 
00234 
00235 
00236 #define errWrongPlatformFilePath            -30916  
00238 #define errIllegalCharInID                  -30917  
00240 #define errMissingParameter                 -1715   
00243 //-------------------------------------------------------------------------------
00244 //
00245 //  General PiPL Properties
00246 //
00247 //  These properties are also defined by Suite Pea, so we must bracket their
00248 //  definition to make sure they are only defined once.
00249 //
00250 //-------------------------------------------------------------------------------
00251 
00252 
00253 #ifndef kGeneralPiPLPropertiesDefined
00254 #define kGeneralPiPLPropertiesDefined  
00277 typedef uint32 PIType;  
00279 //-------------------------------------------------------------------------------
00280 //  Defines -- Current PiPL version and code descriptor properties.
00281 //-------------------------------------------------------------------------------
00282 
00284 #define kCurrentPiPLVersion     0
00285 
00286 
00331 
00332 
00345 #define PIKindProperty          0x6b696e64L
00346 
00348 // 'mi64' <PIMacCodeDesc> Intel 64 Mach-O code descriptor. See struct below.
00349 #define PICodeMacIntel64Property    'mi64'
00350 
00351 // 'ma64' <PIMacCodeDesc> ARM 64 Mach-O code descriptor. See struct below.
00352 #define PICodeMacARM64Property  'ma64'
00353 
00355 
00356 // '8664' <PIWin64CodeDesc> Win32 Intel code descriptor. See struct below.
00357 #define PIWin64X86CodeProperty  0x38363634L
00358 
00359 // 'wa86' <PIWin64CodeDesc> Win32 ARM code descriptor. See struct below.
00360 #define PIWin64ARMCodeProperty  0x77613634L
00361 
00362 //-------------------------------------------------------------------------------
00363 //  Structures -- PiPL entry definition.
00364 //-------------------------------------------------------------------------------
00366 
00371 typedef struct PIProperty
00372 {
00379     PIType vendorID;
00380     
00382     PIType propertyKey;
00383     
00386     int32  propertyID;
00387     
00390     int32  propertyLength;
00391     
00395     char   propertyData [1];
00396 
00397 } PIProperty;
00398 
00400 
00406 typedef struct PIPropertyList
00407 {
00409     int32 version;
00410 
00412     int32 count;
00413 
00415     PIProperty properties[1];
00416 
00417 } PIPropertyList;
00418 
00419 //-------------------------------------------------------------------------------
00420 //
00421 //  Structures -- PiPL types.
00422 //
00423 //  Below are structures describing types used in plug-in property lists.
00424 //  These structures obey Macintosh 68k alignment and padding rules though
00425 //  generally they are laid out so fields have natural alignment and any
00426 //  needed padding is explicit in the structure.
00427 //
00428 //  In addition to these structure types, simple types such as int32, int16,
00429 //  etc. are used. Two other examples are PString and FlagSet.
00430 //
00431 //  PString is like a rez pstring or a Str255 except that storage may not
00432 //  be present for all 255 characters.  The initial length byte is present
00433 //  in the property.
00434 //
00435 //  FlagSet is a variable length bitstring in which the first member is
00436 //  represented by the most significant bit of the first byte, the eighth
00437 //  member is in the least significant bit of the first byte, etc.
00438 //  The length of the set is in the property's length field.
00439 //
00440 //  Arrays are also used in places with bounds either taken from the
00441 //  property length or explicitly represented within the property.
00442 //
00443 //-------------------------------------------------------------------------------
00444 
00445 // For 'mi64' PICodeMacIntel64Property:
00446 // For 'ma64' PICodeMacARM64Property:
00447 typedef struct PIMacCodeDesc
00448 {
00449 
00450     // Name of entrypoint ("main", "ENTRYPOINT", "", etc.):
00451     unsigned char fEntryName[1];
00452 
00453 } PIMacCodeDesc;
00454 
00455 // For compatibilty with previous name for PIMacCodeDesc
00456 typedef PIMacCodeDesc PIMacIntelCodeDesc;
00457 
00462 typedef struct PIWin64CodeDesc
00463 {
00464     char fEntryName[1];
00465 } PIWin64CodeDesc;
00466 
00467 // For compatibility with previous name of PIWin64CodeDesc
00468 typedef PIWin64CodeDesc PIWin64X86CodeDesc;
00469 
00470 #endif // kGeneralPiPLPropertiesDefined
00471 
00472 //-------------------------------------------------------------------------------
00473 //
00474 //  Additional General PiPL Properties
00475 //
00476 //  These are properties that don't conflict with Suite Pea and are
00477 //  defined for Photoshop specifically.
00478 //
00479 //-------------------------------------------------------------------------------
00480 
00482 // 'vers' <int32> Major<int16>.Minor<int16> version number:
00497 #define PIVersionProperty       0x76657273L
00498 
00500 // 'prty' <int32> Load order priority:
00509 #define PIPriorityProperty      0x70727479L
00510 
00512 // 'cmpt' Component/Version ids:
00517 #define PIComponentProperty     0x636d7074L
00518 
00520 // 'mode' <FlagSet> Image modes supported flags. (bitmask):
00532 #define PIImageModesProperty    0x6d6f6465L
00533 
00535 // 'enbl' <CString> Enabling expression:
00546 #define PIEnableInfoProperty    0x656e626cL
00547 
00549 // 'wnsc' plug in wants scrap
00554 #define PIWantsScrapProperty    0x776E7363L
00555 
00557 // 'coco' plug in has Cocoa, Objective-C code and should never be unloaded
00563 #define PICocoaProperty     0x636F636FL
00564 
00566 // 'fbaw' plug in wants in the File Browser menu
00571 #define PIFileBrowserAwareProperty  0x66626177L
00572 
00574 // 'nabo' plug in does not want an about box menu entry
00579 #define PINoAboutBoxProperty    0x6E61626FL
00580 
00582 // 'lFGm' plug in should be hidden/shown by the Preference for legacy Filter Gallery menu entries 
00587 #define PILegacyFilterGalleryMenuItemProperty   0x6C46476DL
00588 
00590 // 'flly' plug in filter layer properties
00596 #define PIFilterLayerSupport    0x666c6c79L
00597 
00599 // 'host' <PIType> giving host required if any:
00606 #define PIRequiredHostProperty  0x686f7374L
00607 
00609 // 'catg' <PString> Category name that appears on top level menu:
00617 #define PICategoryProperty      0x63617467L
00618 
00620 // 'zcat' <PString> Category name that appears on top level menu:
00628 #define PIZCategoryProperty     0x7A636174L
00629 
00631 // 'name' <PString> Menu name:
00639 #define PINameProperty          0x6e616d65L
00640 
00642 // 'znam' <PString> Menu name:
00650 #define PIZNameProperty         0x7A6E616DL
00651 
00653 // 'prog' <PString> Progress text:
00662 #define PIProgressTextProperty  0x70726f67
00663 
00665 // 'zpro' <PString> Progress text:
00674 #define PIZProgressTextProperty 0x7A70726F
00675 
00677 // 'pnme' <CString> picker ID:
00689 #define PIPickerIDProperty      0x706e6d65L
00690 
00692 // 'piLU' plug-in supports load/unload selectors:
00696 #define PILoadUnloadProperty        0x70694c55
00697 
00699 // 'piPF' plug-in supports preferences dialog selectors:
00703 #define PIPreferencesProperty       0x70695046
00704 
00705 // 'feen' plug-in is not loaded unless this feature is enabled
00706 #define PIFeatureEnabledProperty    0x6665656e
00707 
00708 // 'posd' plug-in is position dependent
00709 #define PIPositionDependentProperty 0x706f7364
00710 
00711 // 'pmsa' plug-in is UI scaling aware for each monitor
00712 #define PIPerMonitorScalingAware    0x706d7361
00713 
00714 //-------------------------------------------------------------------------------
00715 //
00716 //  Additional Structures -- PiPL types.
00717 //
00718 //  Below are structures describing types used in plug-in property lists.
00719 //  These structures obey Macintosh 68k alignment and padding rules though
00720 //  generally they are laid out so fields have natural alignment and any
00721 //  needed padding is explicit in the structure.
00722 //
00723 //  In addition to these structure types, simple types such as int32, int16,
00724 //  etc. are used. Two other examples are PString and FlagSet.
00725 //
00726 //  PString is like a rez pstring or a Str255 except that storage may not
00727 //  be present for all 255 characters.  The initial length byte is present
00728 //  in the property.
00729 //
00730 //  FlagSet is a variable length bitstring in which the first member is
00731 //  represented by the most significant bit of the first byte, the eighth
00732 //  member is in the least significant bit of the first byte, etc.
00733 //  The length of the set is in the property's length field.
00734 //
00735 //  Arrays are also used in places with bounds either taken from the
00736 //  property length or explicitly represented within the property.
00737 //
00738 //-------------------------------------------------------------------------------
00739 
00742 typedef PIPropertyList **PIPropertyListHandle;
00743 
00745 typedef struct TypeCreatorPair
00746 {
00747     PIType type;     
00748     PIType creator;  
00750 } TypeCreatorPair;
00751 
00752 
00756 typedef struct PlugInInfo
00757 {
00758 
00760     int16   version;
00761 
00763     int16   subVersion;
00764 
00766     int16   priority;
00767 
00769     int16   generalInfoSize;
00770 
00772     int16   typeInfoSize;
00773 
00775     int16   supportsMode;
00776 
00778     PIType  requireHost;
00779 
00780 } PlugInInfo;
00781 
00782 #if PRAGMA_STRUCT_ALIGN
00783     #pragma options align=reset
00784 #endif
00785 
00786 typedef struct PSBuffer *BufferID;
00787 
00788 #define kPIGeneralInfoSize 16          
00789 
00790 //-------------------------------------------------------------------------------
00791 //  Defines -- Image modes.
00792 //-------------------------------------------------------------------------------
00793 
00796 
00797 
00798 
00801 #define plugInModeBitmap            0
00802 #define plugInModeGrayScale         1
00803 #define plugInModeIndexedColor      2
00804 #define plugInModeRGBColor          3
00805 #define plugInModeCMYKColor         4
00806 #define plugInModeHSLColor          5
00807 #define plugInModeHSBColor          6
00808 #define plugInModeMultichannel      7
00809 #define plugInModeDuotone           8
00810 #define plugInModeLabColor          9
00811 #define plugInModeGray16            10
00812 #define plugInModeRGB48             11
00813 #define plugInModeLab48             12
00814 #define plugInModeCMYK64            13
00815 #define plugInModeDeepMultichannel  14
00816 #define plugInModeDuotone16         15
00817 #define plugInModeRGB96             16
00818 #define plugInModeGray32            17
00819  //end ingroup
00821 //-------------------------------------------------------------------------------
00822 //  Defines -- Blend modes.
00823 //-------------------------------------------------------------------------------
00824 
00825 /* Key for host supplied layer blend modes */
00826 #define kPIHostBlendModeSignature   '8BIM'
00827 
00829 
00830 #define PIBlendNormal           'norm'
00831 #define PIBlendDarken           'dark'
00832 #define PIBlendLighten          'lite'
00833 #define PIBlendHue              'hue '
00834 #define PIBlendSaturation       'sat '
00835 #define PIBlendColor            'colr'
00836 #define PIBlendLuminosity       'lum '
00837 #define PIBlendMultiply         'mul '
00838 #define PIBlendScreen           'scrn'
00839 #define PIBlendDissolve         'diss'
00840 #define PIBlendOverlay          'over'
00841 #define PIBlendHardLight        'hLit'
00842 #define PIBlendSoftLight        'sLit'
00843 #define PIBlendDifference       'diff'
00844 #define PIBlendExclusion        'smud'
00845 #define PIBlendColorDodge       'div '
00846 #define PIBlendColorBurn        'idiv'
00847 #define PIBlendLinearDodge      'lddg'
00848 #define PIBlendLinearBurn       'lbrn'
00849 #define PIBlendLinearLight      'lLit'
00850 #define PIBlendVividLight       'vLit'
00851 #define PIBlendPinLight         'pLit'
00852 #define PIBlendHardMix          'hMix'
00853 
00854 
00855 //-------------------------------------------------------------------------------
00856 //  Structures -- PiPL types.
00857 //-------------------------------------------------------------------------------
00858 
00862 typedef struct PIBlendMode
00863     {
00864     PIType signature;  /* kPIHostBlendModeSignature for built-in blend modes */
00865     PIType key;
00866     } PIBlendMode;
00867     
00868 //-------------------------------------------------------------------------------
00869 //
00870 //  Defines -- Moveable Modal Dialog Window.
00871 //
00872 //  This is the Window procID for a Moveable Modal dialog window that can be
00873 //  used for Mac OS System 6.  WDEF(128) is part of Photoshop.
00874 //
00875 //-------------------------------------------------------------------------------
00876 //#define PSmovableDBoxProc (128*16+5)
00877 // We don't support System 6 any longer
00878 
00879 //-------------------------------------------------------------------------------
00880 //  Structures -- General.
00881 //-------------------------------------------------------------------------------
00882 
00885 typedef int16 PlaneMap [16];
00886 
00891 typedef struct PlugInMonitor
00892 {
00893     Fixed gamma;      
00894     Fixed redX;       
00895     Fixed redY;       
00896     Fixed greenX;     
00897     Fixed greenY;     
00898     Fixed blueX;      
00899     Fixed blueY;      
00900     Fixed whiteX;     
00901     Fixed whiteY;     
00902     Fixed ambient;    
00906 } PlugInMonitor;
00907 
00908 //-------------------------------------------------------------------------------
00909 //  Structures -- PSPixelMap
00910 //-------------------------------------------------------------------------------
00914 typedef struct PSPixelMask
00915 {
00916     struct PSPixelMask *next;   
00917     void *maskData;             
00918     int32 rowBytes;             
00919     int32 colBytes;             
00920     int32 maskDescription;      
00924 } PSPixelMask;
00925 
00926 // Defines for maskDescription field:
00929 
00930 #define kSimplePSMask   0
00931 #define kBlackMatPSMask 1
00932 #define kGrayMatPSMask  2
00933 #define kWhiteMatPSMask 3
00934 #define kInvertPSMask   4
00935 
00936 
00940 typedef struct PSPixelOverlay
00941     {
00942     struct PSPixelOverlay *next;
00943     void *data;
00944     int32 rowBytes;
00945     int32 colBytes;
00946     unsigned8 r, g, b, opacity;
00947     int32 overlayAlgorithm; 
00949     } PSPixelOverlay;
00950 
00951 // Overlay algorithms.
00954 
00955 #define kStandardAlphaOverlay   0   
00956 #define kInvertedAlphaOverlay   1   
00958 
00959 // Color management options:
00962 
00963 #define kViewAsMask             0xF 
00964 #define kViewAsStandardRGB      0   
00965 #define kViewAsMacRGB           1   
00966 #define kViewAsWindowsRGB       2   
00967 #define kViewAsUncompensated    3   
00969 
00970 
00975 typedef struct PSPixelMap
00976 {
00977     int32 version;      
00979     VRect bounds;       
00980     int32 imageMode;    
00985     int32 rowBytes;     
00986     int32 colBytes;     
00987     int32 planeBytes;   
00990     void *baseAddr;     
00992     //---------------------------------------------------------------------------
00993     // Fields new in version 1:
00994     //---------------------------------------------------------------------------   
00995     // New in version 1 
00996 
00997     PSPixelMask *mat;   
01005     PSPixelMask *masks; 
01012     // Use to set the phase of the checkerboard:
01013     int32 maskPhaseRow; 
01014     int32 maskPhaseCol; 
01016     //---------------------------------------------------------------------------
01017     // Fields new in version 2:
01018     //---------------------------------------------------------------------------   
01019     // New in version 2 
01020     
01021     PSPixelOverlay *pixelOverlays;      /* Depth of data in the overlay must match the depth in the color channels */
01022     unsigned32 colorManagementOptions; 
01024     //---------------------------------------------------------------------------
01025     // Fields new in version 3:
01026     //---------------------------------------------------------------------------   
01027     // New in version 3
01028     
01029     int16   depth;      
01031 } PSPixelMap;
01032 
01048 typedef struct PSPlatformContext
01049 {
01050     void *fCGContextRef;    // fCGContextRef is CoreGraphics' CGContextRef
01051     VRect fScreenRect;      // screen bounds that this DisplayPixels is targeted - for color management across monitors
01052 } PSPlatformContext;
01053 
01054 //-------------------------------------------------------------------------------
01055 //  Structures -- ColorServicesInfo.
01056 //-------------------------------------------------------------------------------
01057 
01059 typedef struct ColorServicesInfo
01060 {
01061     int32 infoSize;                 
01068     int16 selector;                  
01071     int16 sourceSpace;               
01079     int16 resultSpace;               
01086     Boolean resultGamutInfoValid;    
01090     Boolean resultInGamut;          
01094 
01095     void *reservedSourceSpaceInfo;  
01096     void *reservedResultSpaceInfo;  
01113     int16 colorComponents[4];       
01115     void *reserved;               
01117     union
01118     {
01119         Str255 *pickerPrompt;     
01122         Point *globalSamplePoint; 
01123         int32 specialColorID;     
01125     } selectorParameter;          
01129 } ColorServicesInfo;
01130 
01131 
01136 
01137 
01138 
01139 
01140 #define plugIncolorServicesChooseColor      0    
01141 #define plugIncolorServicesConvertColor     1    
01142 #define plugIncolorServicesSamplePoint      2    
01143 #define plugIncolorServicesGetSpecialColor  3    
01148 
01149 
01150 
01151 
01152 
01153 // Constants for resultSpace and sourceSpace fields:
01157 
01158 
01159 #define plugIncolorServicesRGBSpace     0    
01160 #define plugIncolorServicesHSBSpace     1    
01161 #define plugIncolorServicesCMYKSpace    2    
01162 #define plugIncolorServicesLabSpace     3    
01163 #define plugIncolorServicesGraySpace    4    
01164 #define plugIncolorServicesHSLSpace     5    
01165 #define plugIncolorServicesXYZSpace     6    
01166 #define plugIncolorServicesChosenSpace  -1   
01169 
01170 
01171 
01172 
01173 #define plugIncolorServicesForegroundColor 0   
01174 
01175 #define plugIncolorServicesBackgroundColor 1
01176 
01177 //-------------------------------------------------------------------------------
01178 //  Structures -- Resampling callbacks.
01179 //-------------------------------------------------------------------------------
01180 
01193 typedef struct PSImagePlane
01194 {
01195     void *data;      
01196     Rect bounds;     
01197     int32 rowBytes;  
01198     int32 colBytes;  
01200 } PSImagePlane;
01201 
01205 typedef struct PSImageMultiPlane
01206 {
01207     void *data;      
01208     Rect bounds;     
01209     int32 rowBytes;  
01210     int32 colBytes;  
01211     int16 activeChannels;   
01213 } PSImageMultiPlane;
01214 
01218 typedef struct PSImageMultiPlane32
01219 {
01220     void *data;            
01221     VRect bounds;          
01222     int32 rowBytes;        
01223     int32 colBytes;        
01224     int16 activeChannels;  
01225     int16 depth;           
01227 } PSImageMultiPlane32;
01228 
01229 //-------------------------------------------------------------------------------
01230 //  Structures -- Filter Layer Index -- Filter Layer support property indexes
01231 //-------------------------------------------------------------------------------
01232 #define PIFilteryLayersSupported        0
01233 
01234 
01235 //-------------------------------------------------------------------------------
01236 //  Structures -- Channel Ports.
01237 //-------------------------------------------------------------------------------
01279 typedef struct PixelMemoryDesc
01280 {
01281     void *data;         
01282     int32 rowBits;      
01285     int32 colBits;      
01287     int32 bitOffset;    
01288     int32 depth;        
01290 } PixelMemoryDesc;
01291 
01308 typedef struct PSScaling
01309 {
01310     VRect sourceRect;       
01311     VRect destinationRect;  
01313 } PSScaling;
01314 
01316 // We provide access to internal channels via the following abstract types:
01318 typedef struct _PIChannelPortDesc *PIChannelPort;
01319 
01320 // Old declarations. (4.0)
01322 typedef PIChannelPort ChannelReadPort;   
01324 typedef PIChannelPort ChannelWritePort;  
01326 //-------------------------------------------------------------------------------
01327 //  Structures -- Channel Ports -- Channel Types
01328 //-------------------------------------------------------------------------------
01329 
01332 
01333 #define ctUnspecified        0       
01334 #define ctRed                1       
01335 #define ctGreen              2       
01336 #define ctBlue               3       
01337 #define ctCyan               4       
01338 #define ctMagenta            5       
01339 #define ctYellow             6       
01340 #define ctBlack              7       
01341 #define ctL                  8       
01342 #define ctA                  9       
01343 #define ctB                 10       
01344 #define ctDuotone           11       
01345 #define ctIndex             12       
01346 #define ctBitmap            13       
01347 #define ctColorSelected     14       
01348 #define ctColorProtected    15       
01349 #define ctTransparency      16       
01350 #define ctLayerMask         17       
01351 #define ctInvertedLayerMask 18       
01352 #define ctSelectionMask     19       
01353 #define ctSpotColor         20       
01354 #define ctVectorMask        21
01355 #define ctSmartFilterMask   22
01356 
01357 
01358 //-------------------------------------------------------------------------------
01359 //  Structures -- Channel Ports -- WriteChannelDesc
01360 //-------------------------------------------------------------------------------
01361 
01363 #define kCurrentMinVersWriteChannelDesc 0    
01365 #define kCurrentMaxVersWriteChannelDesc 1    
01370 typedef struct WriteChannelDesc
01371 {
01372     
01373     int32 minVersion;   
01374     int32 maxVersion;   
01376     //---------------------------------------------------------------------------
01377     //  Version 0 fields:
01378     //---------------------------------------------------------------------------
01379     
01380     struct WriteChannelDesc *next;   
01383     ChannelWritePort port;  
01385     VRect bounds;           
01386     int32 depth;            
01388     VPoint tileSize;        
01389     VPoint tileOrigin;      
01391     int16 channelType;      
01393     int16 padding;          
01395     void *contextInfo;      
01397     const char *name;       
01399     //---------------------------------------------------------------------------
01400     //  Version 1 fields:
01401     //---------------------------------------------------------------------------
01402     // New in version 1 
01403 
01404     const uint16 *unicodeName;      
01407   #ifdef __cplusplus
01408     WriteChannelDesc()
01409         : minVersion(0), maxVersion(0), next(NULL), port(NULL), depth(0),
01410         channelType(0), padding(0), contextInfo(NULL), name(NULL), unicodeName(NULL) {}   
01411   #endif // __cplusplus             
01412 } WriteChannelDesc;
01415 //-------------------------------------------------------------------------------
01416 //  Structures -- Channel Ports -- ReadChannelDesc
01417 //-------------------------------------------------------------------------------
01419 #define kCurrentMinVersReadChannelDesc  0  
01421 #define kCurrentMaxVersReadChannelDesc  5  
01426 typedef struct ReadChannelDesc
01427 {
01428     
01429     int32 minVersion;     
01430     int32 maxVersion;     
01432     //---------------------------------------------------------------------------
01433     //  Version 0 fields:
01434     //---------------------------------------------------------------------------
01435         
01436     struct ReadChannelDesc *next;   
01438     PIChannelPort port;     
01440     VRect bounds;           
01441     int32 depth;            
01443     VPoint tileSize;        
01446     VPoint tileOrigin;      
01448     Boolean target;         
01449     Boolean shown;          
01451     int16 channelType;      
01453     void *contextInfo;      
01455     const char *name;       
01457     //---------------------------------------------------------------------------
01458     //  Version 1 fields:
01459     //---------------------------------------------------------------------------
01460     // New in version 1 
01461 
01462     PIChannelPort writePort; 
01465     //---------------------------------------------------------------------------
01466     //  Version 2 fields:
01467     //---------------------------------------------------------------------------
01468     // New in version 2 
01469 
01470     unsigned32 alphaID;     
01473     // New in version 3 
01474 
01475     const uint16 *unicodeName;      
01477     //---------------------------------------------------------------------------
01478     //  Version 4 fields: (added in Photoshop CS3/10)
01479     //---------------------------------------------------------------------------
01480 
01481     // New in version 4 
01482 
01483     Boolean isEnabled;          
01486     //---------------------------------------------------------------------------
01487     //  Version 5 fields:
01488     //---------------------------------------------------------------------------
01489     // New in version 5 
01490 
01491     VRect limitBounds;          
01494   #ifdef __cplusplus
01495     ReadChannelDesc() 
01496         : minVersion(0), maxVersion(0), next(NULL), port(NULL), depth(0),
01497         target(false), shown(false), channelType(0), contextInfo(NULL),
01498         name(NULL), writePort(NULL), alphaID(0), unicodeName(NULL), isEnabled(true) {}
01499   #endif // __cplusplus             
01501 } ReadChannelDesc;
01502 
01503 //-------------------------------------------------------------------------------
01504 //
01505 //  Structures -- Channel Ports -- ReadLayerDesc
01506 //
01507 //  We describe a layer as a collection of lists of read channels.
01508 //
01509 //-------------------------------------------------------------------------------
01511 #define kCurrentMinVersReadLayerDesc    0    
01513 #define kCurrentMaxVersReadLayerDesc    3    
01517 typedef struct ReadLayerDesc
01518 {
01519     
01520     int32 minVersion;     
01521     int32 maxVersion;     
01523     //---------------------------------------------------------------------------
01524     //  Version 0 fields:
01525     //---------------------------------------------------------------------------
01526     struct ReadLayerDesc *next;     
01528     ReadChannelDesc *compositeChannelsList;  
01530     ReadChannelDesc *transparency;  
01532     ReadChannelDesc *layerMask;     
01534     unsigned32 sheetID;             
01536     const char *name;               
01538     Boolean isPixelBased;           
01540     //---------------------------------------------------------------------------
01541     //  Version 1 fields:
01542     //---------------------------------------------------------------------------
01543     
01544     // New in version 1 
01545 
01546     const uint16 *unicodeName;      
01548     //---------------------------------------------------------------------------
01549     //  Version 2 fields (added in Photoshop CS3/10)
01550     //---------------------------------------------------------------------------
01551 
01552     // New in version 2 
01553 
01554     Boolean isVisible;      
01556     Boolean isAdjustor;     
01558     Boolean isContentGenerator; 
01560     Boolean isRendered;     
01562     unsigned8 opacity;      
01564     unsigned8 fillOpacity;  
01566     PIType  blendMode;      
01568     ReadChannelDesc *vectorMask; 
01570     //---------------------------------------------------------------------------
01571     //  Version 3 fields (added in Photoshop CS3/10)
01572     //---------------------------------------------------------------------------
01573     
01574     ReadChannelDesc *smartFilterMask; 
01577 
01578   #ifdef __cplusplus
01579     ReadLayerDesc()
01580         : minVersion(0), maxVersion(0), next(NULL), compositeChannelsList(NULL),
01581         transparency(NULL), layerMask(NULL), sheetID(0), name(NULL), 
01582         isPixelBased(true), unicodeName(NULL), isVisible(true), 
01583         isAdjustor(false), isContentGenerator(false), isRendered(false), 
01584         opacity(255), fillOpacity(255), blendMode(PIBlendNormal), 
01585         vectorMask(NULL), smartFilterMask(NULL) {}
01586   #endif // __cplusplus            
01588     } ReadLayerDesc;
01589 
01590 //-------------------------------------------------------------------------------
01591 //  Structures -- Channel Ports -- Document Types
01592 //-------------------------------------------------------------------------------
01595 // @{ 
01596 #define dtImageDocument     0      
01597 #define dtImageScrap        1      
01598 // @}
01599 //-------------------------------------------------------------------------------
01600 //
01601 //  Structures -- Channel Ports -- ImageDocumentDesc
01602 //
01603 //  We describe a document as a collection of lists of read channels.
01604 //
01605 //-------------------------------------------------------------------------------
01607 #define kCurrentMinVersReadImageDocDesc 0  
01609 #define kCurrentMaxVersReadImageDocDesc 6  
01618 typedef struct ReadImageDocumentDesc
01619 {
01620     
01621     int32 minVersion;      
01622     int32 maxVersion;      
01624     //---------------------------------------------------------------------------
01625     //  Version 0 fields:
01626     //---------------------------------------------------------------------------
01627     
01628     int32 imageMode;        
01629     int32 depth;            
01630     VRect bounds;           
01632     Fixed hResolution;      
01633     Fixed vResolution;      
01635     LookUpTable redLUT;     
01636     LookUpTable greenLUT;   
01637     LookUpTable blueLUT;    
01640     ReadChannelDesc *targetCompositeChannels;   
01642     ReadChannelDesc *targetTransparency;       
01644     ReadChannelDesc *targetLayerMask;          
01646     ReadChannelDesc *mergedCompositeChannels;  
01650     ReadChannelDesc *mergedTransparency;       
01652     ReadChannelDesc *alphaChannels;            
01654     ReadChannelDesc *selection;                
01656     // New with version 1.
01657     //---------------------------------------------------------------------------
01658     //  Version 1 fields
01659     //---------------------------------------------------------------------------
01660     // New in version 1 
01661 
01662     struct SPPlatformFileSpecification_t *fileSpec;  
01664     // New in version 2
01665 
01666     ReadLayerDesc *layersDescriptor;           
01668     int32 documentType;                        
01670     struct ReadImageDocumentDesc *next;        
01672     //---------------------------------------------------------------------------
01673     //  Version 3 fields (added in Photoshop CS3/10)
01674     //---------------------------------------------------------------------------
01675 
01676     // New in version 3
01677 
01678     void *  iCCprofileData;     
01680     int32   iCCprofileSize;     
01682     int32   compositeChannelCount;  
01684     int32   layerCount;         
01687     int32   alphaChannelCount;  
01689     //---------------------------------------------------------------------------
01690     //  Version 4 fields (added in Photoshop CS3/10)
01691     //---------------------------------------------------------------------------
01692     
01693     // Layer mask for the target layer:
01694     ReadChannelDesc *targetSmartFilterMask;
01695                 
01696     //---------------------------------------------------------------------------
01697     //  Version 5 fields (added in Photoshop CS6/13)
01698     //---------------------------------------------------------------------------
01699     
01700     // The Unicode file specification, if any.
01701     struct SPPlatformFileSpecificationW *fileSpecW;
01702 
01703     //---------------------------------------------------------------------------
01704     //  Version 6 fields (added in Photoshop CC 2015.5 (17.0))
01705     //---------------------------------------------------------------------------
01706     // The file specification, if any.
01707     struct XPlatFileSpec *fileSpecX;
01708 
01709 
01710   #ifdef __cplusplus
01711     ReadImageDocumentDesc()
01712         : minVersion(0), maxVersion(0), imageMode(0), depth(0), 
01713           hResolution(0), vResolution(0), 
01714           targetCompositeChannels(NULL), targetTransparency(NULL), targetLayerMask(NULL),
01715           mergedCompositeChannels(NULL), mergedTransparency(NULL), alphaChannels(NULL),
01716           selection(NULL), fileSpec(NULL), layersDescriptor(NULL), documentType(0),
01717           next(NULL), iCCprofileData(NULL), iCCprofileSize(0), compositeChannelCount(0),
01718           layerCount(0), alphaChannelCount(0), targetSmartFilterMask(NULL), fileSpecW(NULL),
01719           fileSpecX(0)
01720             {
01721             }
01722   #endif // __cplusplus
01723 
01724 } ReadImageDocumentDesc;
01726 //-------------------------------------------------------------------------------
01727 //  Defines -- Prototypes -- Callbacks.
01728 //-------------------------------------------------------------------------------
01729 #ifdef __cplusplus
01730 
01731 extern "C"
01732 {
01733 #endif
01734 
01735     // Direct callbacks:
01737 
01738 
01756     typedef MACPASCAL Boolean (*TestAbortProc) (void);
01757     
01758     
01769     typedef MACPASCAL void (*ProgressProc) (int32 done, int32 total);
01770     
01771     
01783     typedef MACPASCAL void (*HostProc) (int16 selector, intptr_t *data);
01784 
01785 
01793     typedef MACPASCAL int32 (*SpaceProc) (void);
01794 
01795 
01804     typedef MACPASCAL void (*ProcessEventProc) (void *event);
01805 
01806 
01830     typedef MACPASCAL OSErr (*DisplayPixelsProc) (const PSPixelMap *source,
01831                                                   const VRect *srcRect,
01832                                                   int32 dstRow,
01833                                                   int32 dstCol,
01834                                                   void *platformContext);
01835 
01836 
01866     typedef MACPASCAL OSErr (*AdvanceStateProc) (void);
01867 
01868 
01887     typedef MACPASCAL OSErr (*ColorServicesProc) (ColorServicesInfo *info);
01892 
01893     // Handle procs:
01895 
01896 
01966     typedef MACPASCAL Handle (*NewPIHandleProc) (int32 size);
01967 
01972     typedef MACPASCAL void (*DisposePIHandleProc) (Handle h);
01973 
01978     typedef MACPASCAL void (*DisposeRegularHandlePIHandleProc) (Handle h);
01979 
01985     typedef MACPASCAL int32 (*GetPIHandleSizeProc) (Handle h);
01986 
01993     typedef MACPASCAL OSErr (*SetPIHandleSizeProc) (Handle h, int32 newSize);
01994 
02002     typedef MACPASCAL Ptr (*LockPIHandleProc) (Handle h, Boolean moveHigh);
02003 
02010     typedef MACPASCAL void (*UnlockPIHandleProc) (Handle h);
02011 
02023     typedef MACPASCAL void (*RecoverSpaceProc) (int32 size);
02024 
02028 
02029 
02031 
02032 
02089     typedef MACPASCAL OSErr (*AllocateBufferProc) (int32 size, BufferID *bufferID);
02090 
02099     typedef MACPASCAL OSErr (*AllocateBufferProc64) (int64 size, BufferID *bufferID);
02100 
02106     typedef MACPASCAL Ptr (*LockBufferProc) (BufferID bufferID, Boolean moveHigh);
02107 
02111     typedef MACPASCAL void (*UnlockBufferProc) (BufferID bufferID);
02112 
02118     typedef MACPASCAL void (*FreeBufferProc) (BufferID bufferID);
02119 
02124     typedef MACPASCAL int32 (*BufferSpaceProc) (void);
02125     
02130     typedef MACPASCAL int64 (*BufferSpaceProc64) (void);
02131     
02139     typedef MACPASCAL OSErr (*ReserveSpaceProc) (int32 size);
02140   // end ingroup
02145 
02146 
02147 
02188     typedef MACPASCAL int16 (*CountPIResourcesProc) (ResType type);
02189     
02197     typedef MACPASCAL Handle (*GetPIResourceProc) (ResType type, int16 index);
02198     
02205     typedef MACPASCAL void (*DeletePIResourceProc) (ResType type, int16 index);
02206     
02214     typedef MACPASCAL OSErr (*AddPIResourceProc) (ResType type, Handle data);  // end ingroup
02219     // Property suite:
02220 
02222 
02223 
02281     typedef MACPASCAL OSErr (*GetPropertyProc) (PIType signature,
02282                                                 PIType key,
02283                                                 int32 index,
02284                                                 intptr_t *simpleProperty,
02285                                                 Handle *complexProperty);
02286 
02294     typedef MACPASCAL OSErr (*SetPropertyProc) (PIType signature,
02295                                                 PIType key,
02296                                                 int32 index,
02297                                                 intptr_t simpleProperty,
02298                                                 Handle complexProperty);
02299   // end defgroup
02304 
02305 
02307 
02308 
02402     typedef MACPASCAL OSErr (*PIResampleProc) (PSImagePlane *source,
02403                                                PSImagePlane *destination,
02404                                                Rect *area,
02405                                                Fixed *coords,
02406                                                int16 method);
02407 
02408     typedef MACPASCAL OSErr (*PIResampleMultiProc) (PSImageMultiPlane *source,
02409                                                    PSImageMultiPlane *destination,
02410                                                    Rect *area,
02411                                                    Fixed *coords,
02412                                                    int16 method);
02413 
02414     typedef MACPASCAL OSErr (*PIResampleMulti32Proc) (PSImageMultiPlane32 *source,
02415                                                    PSImageMultiPlane32 *destination,
02416                                                    VRect *area,
02417                                                    int64 *coords,   // s47.16 numbers
02418                                                    int16 method);
02419       // end defgroup
02424     
02425 // Channel ports suite:
02427 
02428 
02450     typedef MACPASCAL OSErr (*ReadPixelsProc) (ChannelReadPort port,
02451                                                const PSScaling *scaling,
02452                                                const VRect *writeRect,
02453                                                     /* Rectangle in destination coordinates. */
02454                                                const PixelMemoryDesc *destination,
02455                                                VRect *wroteRect);
02456 
02470     typedef MACPASCAL OSErr (*WriteBasePixelsProc) (ChannelWritePort port,
02471                                                     const VRect *writeRect,
02472                                                     const PixelMemoryDesc *source);
02473 
02480     typedef MACPASCAL OSErr (*ReadPortForWritePortProc) (ChannelReadPort *readPort,
02481                                                          ChannelWritePort writePort);
02482     
02484 #ifdef __cplusplus
02485 }
02486 #endif
02487 
02488 //-------------------------------------------------------------------------------
02489 //  Structures -- Buffer procs.
02490 //-------------------------------------------------------------------------------
02491 
02493 #define kCurrentBufferProcsVersion 2   
02495 
02496 #define kPIBufferSuite          "Photoshop Buffer Procs for Plug-ins"
02497 
02498 #define kPIBufferSuiteVersion   kCurrentBufferProcsVersion
02499 
02500 
02503 typedef struct BufferProcs
02504 {
02505 
02506     int16 bufferProcsVersion;       
02508     int16 numBufferProcs;           
02510     AllocateBufferProc allocateProc;    
02512     LockBufferProc lockProc;        
02514     UnlockBufferProc unlockProc;    
02516     FreeBufferProc freeProc;        
02518     BufferSpaceProc spaceProc;      
02520     ReserveSpaceProc reserveProc;   
02522     AllocateBufferProc64 allocateProc64;    
02524     BufferSpaceProc64 spaceProc64;      
02525 } BufferProcs;
02526 
02530 #define kCurrentBufferProcsCount \
02531     ((sizeof(BufferProcs) - offsetof(BufferProcs, allocateProc)) / sizeof(void *)) 
02532 
02533 //-------------------------------------------------------------------------------
02534 //  Structures -- Resource Procs.
02535 //-------------------------------------------------------------------------------
02536 
02538 #define kCurrentResourceProcsVersion 3  
02540 
02541 #define kPIResourceSuite            "Photoshop Resource Suite for Plug-ins"
02542 
02543 #define kPIResourceSuiteVersion     kCurrentResourceProcsVersion
02544 
02547 typedef struct ResourceProcs
02548 {
02549     
02550     int16 resourceProcsVersion;      
02552     int16 numResourceProcs;          
02554     CountPIResourcesProc countProc;  
02556     GetPIResourceProc getProc;       
02558     DeletePIResourceProc deleteProc; 
02560     AddPIResourceProc addProc;       
02562 } ResourceProcs;
02563 
02567 #define kCurrentResourceProcsCount \
02568     ((sizeof(ResourceProcs) - offsetof(ResourceProcs, countProc)) / sizeof(void *)) 
02569 
02570 // Reserved resource types:
02571 
02572 #define kDayStarColorMatchingResource 'DCSR'
02573 #define kPhotoDeluxeResource 'PHUT'
02574 
02575 //-------------------------------------------------------------------------------
02576 //  Structures -- Handle Procs.
02577 //-------------------------------------------------------------------------------
02578 
02580 #define kCurrentHandleProcsVersion 1   
02582 
02583 #define kPIHandleSuite              "Photoshop Handle Suite for Plug-ins"
02584 
02585 #define kPIHandleSuiteVersion       kCurrentHandleProcsVersion
02586 
02588 
02589 typedef struct HandleProcs
02590 {
02591     
02592     int16 handleProcsVersion;   
02594     int16 numHandleProcs;       
02596     NewPIHandleProc newProc;    
02598     DisposePIHandleProc disposeProc;    
02600     GetPIHandleSizeProc getSizeProc;    
02602     SetPIHandleSizeProc setSizeProc;    
02604     LockPIHandleProc lockProc;          
02606     UnlockPIHandleProc unlockProc;      
02608     RecoverSpaceProc recoverSpaceProc;  
02610     DisposeRegularHandlePIHandleProc disposeRegularHandleProc; 
02612 } HandleProcs;
02613 
02617 #define kCurrentHandleProcsCount \
02618     ((sizeof(HandleProcs) - offsetof(HandleProcs, newProc)) / sizeof(void *)) 
02619 
02620 //-------------------------------------------------------------------------------
02621 //  Structures -- Image Services suite.
02622 //-------------------------------------------------------------------------------
02623 
02625 #define kCurrentImageServicesProcsVersion 1   
02627 
02628 #define kPIImageServicesSuite               "Photoshop Image Services Suite for Plug-ins"
02629 
02630 #define kPIImageServicesSuiteVersion        kCurrentImageServicesProcsVersion
02631     
02634 typedef struct ImageServicesProcs
02635 {
02636     
02637     int16 imageServicesProcsVersion;        
02638     int16 numImageServicesProcs;            
02640     PIResampleProc interpolate1DProc;       
02641     PIResampleProc interpolate2DProc;       
02643     PIResampleMultiProc interpolate1DMultiProc;  
02644     PIResampleMultiProc interpolate2DMultiProc;  
02646     PIResampleMulti32Proc interpolate1DMulti32Proc;  
02647     PIResampleMulti32Proc interpolate2DMulti32Proc;  
02649 } ImageServicesProcs;
02650 
02654 #define kCurrentImageServicesProcsCount \
02655     ((sizeof(ImageServicesProcs) - offsetof(ImageServicesProcs, interpolate1DProc)) / sizeof(void *)) 
02656     
02657 //-------------------------------------------------------------------------------
02658 //  Structures -- Property procs.
02659 //-------------------------------------------------------------------------------
02660 
02662 #define kCurrentPropertyProcsVersion 1   
02665 
02666 #define kPIPropertySuite                "Photoshop Property Suite for Plug-ins"
02667 
02668 
02669 #define kPIPropertySuiteVersion         kCurrentPropertyProcsVersion
02670 
02673 typedef struct PropertyProcs
02674 {
02675     
02676     int16 propertyProcsVersion;        
02677     int16 numPropertyProcs;            
02679     GetPropertyProc getPropertyProc;   
02680     SetPropertyProc setPropertyProc;   
02682 } PropertyProcs;
02683 
02686 #define kCurrentPropertyProcsCount \
02687     ((sizeof(PropertyProcs) - offsetof(PropertyProcs, getPropertyProc)) / sizeof(void *))
02688 
02689 //-------------------------------------------------------------------------------
02690 //  Structures -- Channel Ports.
02691 //-------------------------------------------------------------------------------
02692 
02694 #define kCurrentChannelPortProcsVersion 1   
02697 
02698 #define kPIChannelPortSuite             "Photoshop Channel Ports Suite for Plug-ins"
02699 
02700 
02701 #define kPIChannelPortSuiteVersion      kCurrentChannelPortProcsVersion
02702 
02705 typedef struct ChannelPortProcs
02706 {
02707     
02708     int16 channelPortProcsVersion;      
02709     int16 numChannelPortProcs;          
02711     ReadPixelsProc readPixelsProc;      
02712     WriteBasePixelsProc writeBasePixelsProc;  
02713     ReadPortForWritePortProc readPortForWritePortProc;  
02715 } ChannelPortProcs;
02716 
02719 #define kCurrentChannelPortProcsCount \
02720     ((sizeof(ChannelPortProcs) - offsetof(ChannelPortProcs, readPixelsProc)) / sizeof(void *)) 
02721     
02722 //-------------------------------------------------------------------------------
02723 //  Suite - Matrix Math
02724 //-------------------------------------------------------------------------------
02725 
02750 
02751 #define kPSMatrixMathSuite          "9cfaa249-e6f1-11d2-b8eb-0060b0c1f95d"
02752 #define kPSMatrixMathSuiteVersion   1  
02755 typedef struct PSMatrixMathProcs
02756     {
02757     /* kPSMatrixMathSuiteVersion == 1 functions */
02758     
02765     // if result == NULL solution is put in m 
02766     SPAPI Boolean (*Inverse) (PIAffineMatrix *m,
02767                                 PIAffineMatrix *result);
02768     
02775     SPAPI Boolean (*Equals) (const PIAffineMatrix *m1,
02776                                 const PIAffineMatrix *m2);
02777 
02783     // works in-place if result == NULL
02784     SPAPI void (*ScalarMultiply) (const real64 scalar,
02785                                         PIAffineMatrix *m,
02786                                             PIAffineMatrix *result);
02787 
02794     // if result == NULL solution is put in m2 
02795     SPAPI void (*MatrixMultiply) (const PIAffineMatrix *m1,
02796                                         PIAffineMatrix *m2,
02797                                             PIAffineMatrix *result);
02798     
02805     // if result == NULL solution is put in m 
02806     SPAPI void (*PointMultiply) (PIFloatPoint *p,
02807                                         const PIAffineMatrix *m,
02808                                             PIFloatPoint *result);
02809     
02810     
02811     // if result == NULL solution is put in p 
02812     SPAPI void (*PointsMultiply) (PIFloatPoint *p,
02813                                             int32 count,
02814                                                 const PIAffineMatrix *m,
02815                                                     PIFloatPoint *result);
02816 
02817     } PSMatrixMathProcs;
02818 
02821 //-------------------------------------------------------------------------------
02822 //
02823 //  Defines -- Filter padding.
02824 //
02825 //  The following constants indicate what sort of padding to use.  Values 0
02826 //  through 255 specify a constant value.  Negative values imply special
02827 //  operations.
02828 //
02829 //  If the plug-in does not want padding and does not want errors, then
02830 //  exterior areas will contain arbitrary values.
02831 //
02832 //-------------------------------------------------------------------------------
02833 
02836 
02837 #define plugInWantsEdgeReplication          -1
02838 #define plugInDoesNotWantPadding            -2   
02839 #define plugInWantsErrorOnBoundsException   -3   
02841 
02842 //-------------------------------------------------------------------------------
02843 //  Defines -- Sampling flag
02844 //-------------------------------------------------------------------------------
02845 
02847 
02848 #define hostDoesNotSupportSampling      0    
02849 #define hostSupportsIntegralSampling    1    
02850 #define hostSupportsFractionalSampling  2    
02852 
02853 //-------------------------------------------------------------------------------
02854 //  Defines -- Layout values for filters and export modules.
02855 //-------------------------------------------------------------------------------
02856 
02857 // Traditional = Rows, columns, planes with colbytes = # planes:
02858 
02861 
02862 #define piLayoutTraditional             0
02863 #define piLayoutRowsColumnsPlanes       1
02864 #define piLayoutRowsPlanesColumns       2
02865 #define piLayoutColumnsRowsPlanes       3
02866 #define piLayoutColumnsPlanesRows       4
02867 #define piLayoutPlanesRowsColumns       5
02868 #define piLayoutPlanesColumnsRows       6
02869 
02870 
02871 //-------------------------------------------------------------------------------
02872 //  Defines -- Property suite -- PIInterface color property.
02873 //-------------------------------------------------------------------------------
02877 typedef struct PIInterfaceColor
02878 {
02879     RGBtuple color32;    
02880     RGBtuple color2;     
02882 } PIInterfaceColor;
02883 
02884 // Interface color selectors:
02887 
02888 #define kPIInterfaceButtonUpFill        1
02889 #define kPIInterfaceBevelShadow         2
02890 #define kPIInterfaceIconFillActive      3
02891 #define kPIInterfaceIconFillDimmed      4
02892 #define kPIInterfacePaletteFill         5
02893 #define kPIInterfaceIconFrameDimmed     6
02894 #define kPIInterfaceIconFrameActive     7
02895 #define kPIInterfaceBevelHighlight      8
02896 #define kPIInterfaceButtonDownFill      9
02897 #define kPIInterfaceIconFillSelected    10
02898 #define kPIInterfaceBorder              11
02899 #define kPIInterfaceButtonDarkShadow    12
02900 #define kPIInterfaceIconFrameSelected   13
02901 #define kPIInterfaceRed                 14
02902 
02903 //-------------------------------------------------------------------------------
02904 //  Defines -- Photoshop -- SuitePEA caller and selector strings for Photoshop.
02905 //-------------------------------------------------------------------------------
02907 
02908 
02909 #define kPSPhotoshopCaller          "PS Photoshop" 
02913 #define kPSDoIt                     "Do It"       
02919 
02920 //-------------------------------------------------------------------------------
02921 //  Action plug-in specific PiPL properties
02922 //-------------------------------------------------------------------------------
02923 
02925 // 'prst' -- Always stay loaded property:
02931 #define PIPersistentProperty        0x70727374L
02932 
02934 // 'reen' -- Allow reentrant:
02940 #define PIReentrantProperty         0x7265656EL
02941 
02943 // 'adll' -- use altered search path when loading the plug-in (Windows only):
02950 #define PILoadWithAlteredSearchPath     0x61646C6CL
02951 
02952 //-------------------------------------------------------------------------------
02953 //  Defines -- Image Resources for Annotation.
02954 //-------------------------------------------------------------------------------
02955 
02956 /* Major & Minor version number */
02957 #define kPIAnnotMajorVersion    0x0002
02958 #define kPIAnnotMinorVersion    0x0001
02959 
02960 /* keys */
02961 #define PIAnnotTextPopup    'txtA' /* text with popup annotation */
02962 #define PIAnnotSound        'sndA' /* sound annotation */
02963 #define PIAnnotTextContent  'txtC' /* text as content */
02964 #define PIAnnotSoundFile    'sndF' /* content as a sound file */
02965 #define PIAnnotSoundMem     'sndM' /* content as a sound in memory */
02966 #define PIFilterFlate       'fltD' /* default parameters */
02967 #define PIFilterLZW         'lzwD' /* default parameters */
02968 #define PIFilterNone        'none' /* no compression */
02969 #define PIFilterUndef       '    ' /* treated as 'none' */
02970 
02971 #define PIMaxSize32Property  'ms32'     /* <VPoint> Max rows and cols supported by this plug-in.    */
02972 #define PIMinSize32Property  'mn32'     /* <VPoint> Min rows and cols supported by this plug-in.     */
02973 
02974 
02975 //-------------------------------------------------------------------------------
02976 //  stack renderer plug-in specific PiPL properties
02977 //-------------------------------------------------------------------------------
02984 
02985 
02992 #define PIStackRendererProperty     'sRnd'
02993 
02994 //-------------------------------------------------------------------------------
02995 //  stack renderer and file format plug-in specific PiPL properties
02996 //-------------------------------------------------------------------------------
02997 
02999 
03007 #define PIEditInPluginProperty              'ediP'
03008 
03010 
03019 #define PIPluginLaunchesEditorProperty      'piLe'
03020 
03021 //-------------------------------------------------------------------------------
03022 
03023 #endif // __PIGeneral_h__