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 //-------------------------------------------------------------------
00026 #ifndef __PIGeneral_h__
00027 #define __PIGeneral_h__
00028 
00029 #pragma once
00030 
00031 // application specific
00032 #include "PITypes.h"
00033 #include "PIResDefines.h"
00034 
00035 #ifdef __PSWorld__
00036 #include "UGeometry.h"
00037 #include "PSWorldEnums.h"
00038 #endif
00039 
00040 #if PRAGMA_STRUCT_ALIGN
00041 #pragma options align=mac68k
00042 #endif
00043 
00044 #if defined(__BORLANDC__)
00045 #pragma option -a-
00046 #endif
00047 
00048 //-------------------------------------------------------------------------------
00049 //  Defines -- Photoshop signature -- '8BIM'
00050 //-------------------------------------------------------------------------------
00051 
00053 #define kPhotoshopSignature     0x3842494d
00054 
00055 //-------------------------------------------------------------------------------
00056 //  Defines -- General plug-in error codes.
00057 //-------------------------------------------------------------------------------
00058 
00060 
00061 
00063 #define errPlugInHostInsufficient           -30900
00064 
00066 #define errPlugInPropertyUndefined          -30901
00067 
00072 #define errHostDoesNotSupportColStep        -30902
00073 
00078 #define errInvalidSamplePoint               -30903
00079          
00084 #define errReportString                     -30904
00085 
00086 /* New in 8.0 */
00087 
00092 #define errHostVersionIncompatible          -30905
00093 
00094 
00095 //-------------------------------------------------------------------------------
00096 //  Defines -- Channel Port error codes.
00097 //-------------------------------------------------------------------------------
00098 
00100 
00101 #define errUnknownPort                      -30910    
00103 #define errUnsupportedRowBits               -30911    
00106 #define errUnsupportedColBits               -30912    
00109 #define errUnsupportedBitOffset             -30913    
00112 #define errUnsupportedDepth                 -30914    
00115 #define errUnsupportedDepthConversion       -30915    
00119 //-------------------------------------------------------------------------------
00120 //  Defines -- Scripting system error codes.
00121 //-------------------------------------------------------------------------------
00122 
00124 
00125 
00126 #define errWrongPlatformFilePath            -30916  
00128 #define errIllegalCharInID                  -30917  
00130 #define errMissingParameter                 -1715   
00133 //-------------------------------------------------------------------------------
00134 //
00135 //  General PiPL Properties
00136 //
00137 //  These properties are also defined by Suite Pea, so we must bracket their
00138 //  definition to make sure they are only defined once.
00139 //
00140 //-------------------------------------------------------------------------------
00141 
00142 
00143 #ifndef kGeneralPiPLPropertiesDefined
00144 #define kGeneralPiPLPropertiesDefined  
00167 typedef uint32 PIType;  
00169 //-------------------------------------------------------------------------------
00170 //  Defines -- Current PiPL version and code descriptor properties.
00171 //-------------------------------------------------------------------------------
00172 
00174 #define kCurrentPiPLVersion     0
00175 
00176 
00221 
00222 
00235 #define PIKindProperty          0x6b696e64L
00236 
00237 // DEPRECATED
00238 // 'm68k' <PI68KCodeDesc> 68k code descriptor. See struct below.
00239 // #define PI68KCodeProperty        0x6d36386bL
00240 
00241 
00242 // DEPRECATED
00243 // This property key reflects the \c CodePowerPC property in the PiPL resource file. 
00244 // See PIPowerPCMachOCodeProperty, PICodeMacIntel32Property, PICodeMacIntel64Property
00245 #define PIPowerPCCodeProperty   0x70777063L
00246 
00247 // DEPRECATED
00248 // This property key reflects the \c CodeCarbonPowerPC property in the PiPL resource file. 
00249 #define PIPowerPCCarbonCodeProperty 'ppcb'
00250 
00252 // 'mach' <PIMachOCodeDesc> PowerPC Mach-O code descriptor. 
00257 #define PIPowerPCMachOCodeProperty  'mach'
00258 
00259 // 'mi32' <PIMacIntelCodeDesc> Intel 32 Mach-O code descriptor. See struct below.
00260 #define PICodeMacIntel32Property    'mi32'
00261 
00262 // 'mi64' <PIMacIntelCodeDesc> Intel 64 Mach-O code descriptor. See struct below.
00263 #define PICodeMacIntel64Property    'mi64'
00264 
00266 // 'frag' <PIFragmentCodeDesc> PowerPC fragment descriptor.
00271 #define PICodeFragmentProperty  'frag'
00272 
00274 // 'frgc' <PIFragmentCodeDesc> PowerPC CARBON fragment descriptor. 
00279 #define PICarbonCodeFragmentProperty    'frgc'
00280 
00281 // '8664' <PIWin64X86CodeDesc> Win32 Intel code descriptor. See struct below.
00282 #define PIWin64X86CodeProperty  0x38363634L
00283 
00284 // 'wx86' <PIWin32X86CodeDesc> Win32 Intel code descriptor. See struct below.
00285 #define PIWin32X86CodeProperty  0x77783836L
00286 
00287 // DEPRECATED 'fx86' <PIWin16X86CodeDesc> Win16 Intel code descriptor. See struct below.
00288 #define PIWin16X86CodeProperty  0x66783836L
00289 
00290 //-------------------------------------------------------------------------------
00291 //  Structures -- PiPL entry definition.
00292 //-------------------------------------------------------------------------------
00294 
00299 typedef struct PIProperty
00300 {
00307     PIType vendorID;
00308     
00310     PIType propertyKey;
00311     
00314     int32  propertyID;
00315     
00318     int32  propertyLength;
00319     
00323     char   propertyData [1];
00324 
00325 } PIProperty;
00326 
00328 
00334 typedef struct PIPropertyList
00335 {
00337     int32 version;
00338 
00340     int32 count;
00341 
00343     PIProperty properties[1];
00344 
00345 } PIPropertyList;
00346 
00347 //-------------------------------------------------------------------------------
00348 //
00349 //  Structures -- PiPL types.
00350 //
00351 //  Below are structures describing types used in plug-in property lists.
00352 //  These structures obey Macintosh 68k alignment and padding rules though
00353 //  generally they are laid out so fields have natural alignment and any
00354 //  needed padding is explicit in the structure.
00355 //
00356 //  In addition to these structure types, simple types such as int32, int16,
00357 //  etc. are used. Two other examples are PString and FlagSet.
00358 //
00359 //  PString is like a rez pstring or a Str255 except that storage may not
00360 //  be present for all 255 characters.  The initial length byte is present
00361 //  in the property.
00362 //
00363 //  FlagSet is a variable length bitstring in which the first member is
00364 //  represented by the most significant bit of the first byte, the eighth
00365 //  member is in the least significant bit of the first byte, etc.
00366 //  The length of the set is in the property's length field.
00367 //
00368 //  Arrays are also used in places with bounds either taken from the
00369 //  property length or explicitly represented within the property.
00370 //
00371 //-------------------------------------------------------------------------------
00372 
00374 typedef struct PI68KCodeDesc
00375 {
00379     PIType fType;
00380 
00382     int16 fID;
00383 
00384 } PI68KCodeDesc;
00385 
00387 typedef struct PICFMCodeDesc
00388 {
00391     int32 fContainerOffset;
00392     
00396     int32 fContainerLength;
00397     
00405     unsigned char fEntryName[1];
00406 
00407 } PICFMCodeDesc;
00408 
00410 typedef struct PIMachOCodeDesc
00411 {
00414     int32 fContainerOffset;
00415     
00419     int32 fContainerLength;
00420     
00428     unsigned char fEntryName[1];
00429 
00430 } PIMachOCodeDesc;
00431 
00432 // For 'mi32' PICodeMacIntel32Property:
00433 // For 'mi64' PICodeMacIntel64Property:
00434 typedef struct PIMacIntelCodeDesc
00435 {
00436 
00437     // Name of entrypoint ("main", "ENTRYPOINT", "", etc.):
00438     unsigned char fEntryName[1];
00439 
00440 } PIMacIntelCodeDesc;
00441 
00444 typedef struct PIFragmentCodeDesc
00445 {
00447     int32 fFragmentResource;
00448     
00450     int32 fFragmentNumber;
00451     
00454     unsigned char fEntryName[1];
00455 
00456 } PIFragmentCodeDesc;
00457 
00462 typedef struct PIWin64X86CodeDesc
00463 {
00464     char fEntryName[1];
00465 } PIWin64X86CodeDesc;
00466 
00471 typedef struct PIWin32X86CodeDesc {
00472     char fEntryName[1];
00473 } PIWin32X86CodeDesc;
00474 
00477 typedef struct PIWin16X86CodeDesc {
00478     char fEntryName[1];
00479 } PIWin16X86CodeDesc;
00480 
00481 #endif // kGeneralPiPLPropertiesDefined
00482 
00483 //-------------------------------------------------------------------------------
00484 //
00485 //  Additional General PiPL Properties
00486 //
00487 //  These are properties that don't conflict with Suite Pea and are
00488 //  defined for Photoshop specifically.
00489 //
00490 //-------------------------------------------------------------------------------
00491 
00493 // 'vers' <int32> Major<int16>.Minor<int16> version number:
00508 #define PIVersionProperty       0x76657273L
00509 
00511 // 'prty' <int32> Load order priority:
00520 #define PIPriorityProperty      0x70727479L
00521 
00523 // 'cmpt' Component/Version ids:
00528 #define PIComponentProperty     0x636d7074L
00529 
00531 // 'mode' <FlagSet> Image modes supported flags. (bitmask):
00543 #define PIImageModesProperty    0x6d6f6465L
00544 
00546 // 'enbl' <CString> Enabling expression:
00557 #define PIEnableInfoProperty    0x656e626cL
00558 
00560 // 'wnsc' plug in wants scrap
00565 #define PIWantsScrapProperty    0x776E7363L
00566 
00568 // 'coco' plug in has Cocoa, Objective-C code and should never be unloaded
00574 #define PICocoaProperty     0x636F636FL
00575 
00577 // 'fbaw' plug in wants in the File Browser menu
00582 #define PIFileBrowserAwareProperty  0x66626177L
00583 
00585 // 'nabo' plug in does not want an about box menu entry
00590 #define PINoAboutBoxProperty    0x6E61626FL
00591 
00593 // 'lFGm' plug in should be hidden/shown by the Preference for legacy Filter Gallery menu entries 
00598 #define PILegacyFilterGalleryMenuItemProperty   0x6C46476DL
00599 
00601 // 'flly' plug in filter layer properties
00607 #define PIFilterLayerSupport    0x666c6c79L
00608 
00610 // 'host' <PIType> giving host required if any:
00617 #define PIRequiredHostProperty  0x686f7374L
00618 
00620 // 'catg' <PString> Category name that appears on top level menu:
00628 #define PICategoryProperty      0x63617467L
00629 
00631 // 'zcat' <PString> Category name that appears on top level menu:
00639 #define PIZCategoryProperty     0x7A636174L
00640 
00642 // 'name' <PString> Menu name:
00650 #define PINameProperty          0x6e616d65L
00651 
00653 // 'znam' <PString> Menu name:
00661 #define PIZNameProperty         0x7A6E616DL
00662 
00664 // 'prog' <PString> Progress text:
00673 #define PIProgressTextProperty  0x70726f67
00674 
00676 // 'zpro' <PString> Progress text:
00685 #define PIZProgressTextProperty 0x7A70726F
00686 
00688 // 'pnme' <CString> picker ID:
00700 #define PIPickerIDProperty      0x706e6d65L
00701 
00703 // '68fp' <PI68KCodeDesc> 68k w/FPU code descriptor. See struct below.
00708 #define PI68KFPUCodeProperty    0x36386670L
00709 
00711 // 'usp7' SPARC version 7:
00714 #define PIUnixSPARCV7CodeProperty   0x75737037
00715 
00717 // 'usp8' SPARC version 8:
00720 #define PIUnixSPARCV8CodeProperty   0x75737038
00721 
00723 // 'usp9' SPARC version 9:
00726 #define PIUnixSPARCV9CodeProperty   0x75737039
00727 
00729 
00731 #define PIUnixSPARCCodeProperty PIUnixSPARCV7CodeProperty
00732 
00734 // 'umr3' MIPS R3000:
00737 #define PIUnixMIPSR3000CodeProperty 0x756d7233
00738 
00740 // 'umr4' MIPS R4000:
00743 #define PIUnixMIPSR4000CodeProperty 0x756d7234
00744 
00746 // 'um4w' MIPS R4000 (can be 64 bit):
00749 #define PIUnixMIPSR400064BitCodeProperty    0x756d3477
00750 
00752 // 'umr8' MIPS R8000 (always 64 bit):
00755 #define PIUnixMIPSR8000CodeProperty 0x756d7238
00756 
00758 
00760 #define PIUnixMIPSCodeProperty  PIUnixMIPSR3000CodeProperty
00761 
00763 // 'piLU' plug-in supports load/unload selectors:
00767 #define PILoadUnloadProperty        0x70694c55
00768 
00770 // 'piPF' plug-in supports preferences dialog selectors:
00774 #define PIPreferencesProperty       0x70695046
00775 
00776 // 'feen' plug-in is not loaded unless this feature is enabled
00777 #define PIFeatureEnabledProperty    0x6665656e
00778 
00779 // 'posd' plug-in is position dependent
00780 #define PIPositionDependentProperty 0x706f7364
00781 
00782 
00783 //-------------------------------------------------------------------------------
00784 //
00785 //  Additional Structures -- PiPL types.
00786 //
00787 //  Below are structures describing types used in plug-in property lists.
00788 //  These structures obey Macintosh 68k alignment and padding rules though
00789 //  generally they are laid out so fields have natural alignment and any
00790 //  needed padding is explicit in the structure.
00791 //
00792 //  In addition to these structure types, simple types such as int32, int16,
00793 //  etc. are used. Two other examples are PString and FlagSet.
00794 //
00795 //  PString is like a rez pstring or a Str255 except that storage may not
00796 //  be present for all 255 characters.  The initial length byte is present
00797 //  in the property.
00798 //
00799 //  FlagSet is a variable length bitstring in which the first member is
00800 //  represented by the most significant bit of the first byte, the eighth
00801 //  member is in the least significant bit of the first byte, etc.
00802 //  The length of the set is in the property's length field.
00803 //
00804 //  Arrays are also used in places with bounds either taken from the
00805 //  property length or explicitly represented within the property.
00806 //
00807 //-------------------------------------------------------------------------------
00808 
00811 typedef PIPropertyList **PIPropertyListHandle;
00812 
00814 typedef struct TypeCreatorPair
00815 {
00816     PIType type;     
00817     PIType creator;  
00819 } TypeCreatorPair;
00820 
00821 
00825 typedef struct PlugInInfo
00826 {
00827 
00829     int16   version;
00830 
00832     int16   subVersion;
00833 
00835     int16   priority;
00836 
00838     int16   generalInfoSize;
00839 
00841     int16   typeInfoSize;
00842 
00844     int16   supportsMode;
00845 
00847     PIType  requireHost;
00848 
00849 } PlugInInfo;
00850 
00851 #if PRAGMA_STRUCT_ALIGN
00852     #pragma options align=reset
00853 #endif
00854 
00855 typedef struct PSBuffer *BufferID;
00856 
00857 #define kPIGeneralInfoSize 16          
00858 
00859 //-------------------------------------------------------------------------------
00860 //  Defines -- Image modes.
00861 //-------------------------------------------------------------------------------
00862 
00865 
00866 
00867 
00870 #define plugInModeBitmap            0
00871 #define plugInModeGrayScale         1
00872 #define plugInModeIndexedColor      2
00873 #define plugInModeRGBColor          3
00874 #define plugInModeCMYKColor         4
00875 #define plugInModeHSLColor          5
00876 #define plugInModeHSBColor          6
00877 #define plugInModeMultichannel      7
00878 #define plugInModeDuotone           8
00879 #define plugInModeLabColor          9
00880 #define plugInModeGray16            10
00881 #define plugInModeRGB48             11
00882 #define plugInModeLab48             12
00883 #define plugInModeCMYK64            13
00884 #define plugInModeDeepMultichannel  14
00885 #define plugInModeDuotone16         15
00886 #define plugInModeRGB96             16
00887 #define plugInModeGray32            17
00888  //end ingroup
00890 //-------------------------------------------------------------------------------
00891 //  Defines -- Blend modes.
00892 //-------------------------------------------------------------------------------
00893 
00894 /* Key for host supplied layer blend modes */
00895 #define kPIHostBlendModeSignature   '8BIM'
00896 
00898 
00899 #define PIBlendNormal           'norm'
00900 #define PIBlendDarken           'dark'
00901 #define PIBlendLighten          'lite'
00902 #define PIBlendHue              'hue '
00903 #define PIBlendSaturation       'sat '
00904 #define PIBlendColor            'colr'
00905 #define PIBlendLuminosity       'lum '
00906 #define PIBlendMultiply         'mul '
00907 #define PIBlendScreen           'scrn'
00908 #define PIBlendDissolve         'diss'
00909 #define PIBlendOverlay          'over'
00910 #define PIBlendHardLight        'hLit'
00911 #define PIBlendSoftLight        'sLit'
00912 #define PIBlendDifference       'diff'
00913 #define PIBlendExclusion        'smud'
00914 #define PIBlendColorDodge       'div '
00915 #define PIBlendColorBurn        'idiv'
00916 #define PIBlendLinearDodge      'lddg'
00917 #define PIBlendLinearBurn       'lbrn'
00918 #define PIBlendLinearLight      'lLit'
00919 #define PIBlendVividLight       'vLit'
00920 #define PIBlendPinLight         'pLit'
00921 #define PIBlendHardMix          'hMix'
00922 
00923 
00924 //-------------------------------------------------------------------------------
00925 //  Structures -- PiPL types.
00926 //-------------------------------------------------------------------------------
00927 
00931 typedef struct PIBlendMode
00932     {
00933     PIType signature;  /* kPIHostBlendModeSignature for built-in blend modes */
00934     PIType key;
00935     } PIBlendMode;
00936     
00937 //-------------------------------------------------------------------------------
00938 //
00939 //  Defines -- Moveable Modal Dialog Window.
00940 //
00941 //  This is the Window procID for a Moveable Modal dialog window that can be
00942 //  used for Mac OS System 6.  WDEF(128) is part of Photoshop.
00943 //
00944 //-------------------------------------------------------------------------------
00945 #define PSmovableDBoxProc   (128*16+5)
00946 
00947 //-------------------------------------------------------------------------------
00948 //  Structures -- General.
00949 //-------------------------------------------------------------------------------
00950 
00953 typedef int16 PlaneMap [16];
00954 
00959 typedef struct PlugInMonitor
00960 {
00961     Fixed gamma;      
00962     Fixed redX;       
00963     Fixed redY;       
00964     Fixed greenX;     
00965     Fixed greenY;     
00966     Fixed blueX;      
00967     Fixed blueY;      
00968     Fixed whiteX;     
00969     Fixed whiteY;     
00970     Fixed ambient;    
00974 } PlugInMonitor;
00975 
00976 //-------------------------------------------------------------------------------
00977 //  Structures -- PSPixelMap
00978 //-------------------------------------------------------------------------------
00980 typedef struct PSPixelMask
00981 {
00982     struct PSPixelMask *next;   
00983     void *maskData;             
00984     int32 rowBytes;             
00985     int32 colBytes;             
00986     int32 maskDescription;      
00990 } PSPixelMask;
00991 
00992 // Defines for maskDescription field:
00995 
00996 #define kSimplePSMask   0
00997 #define kBlackMatPSMask 1
00998 #define kGrayMatPSMask  2
00999 #define kWhiteMatPSMask 3
01000 #define kInvertPSMask   4
01001 
01002 
01004 typedef struct PSPixelOverlay
01005     {
01006     struct PSPixelOverlay *next;
01007     void *data;
01008     int32 rowBytes;
01009     int32 colBytes;
01010     unsigned8 r, g, b, opacity;
01011     int32 overlayAlgorithm; 
01013     } PSPixelOverlay;
01014 
01015 // Overlay algorithms.
01018 
01019 #define kStandardAlphaOverlay   0   
01020 #define kInvertedAlphaOverlay   1   
01022 
01023 // Colormanagement options:
01026 
01027 #define kViewAsMask             0xF 
01028 #define kViewAsStandardRGB      0   
01029 #define kViewAsMacRGB           1   
01030 #define kViewAsWindowsRGB       2   
01031 #define kViewAsUncompensated    3   
01033 
01034 
01038 typedef struct PSPixelMap
01039 {
01040     int32 version;      
01042     VRect bounds;       
01043     int32 imageMode;    
01048     int32 rowBytes;     
01049     int32 colBytes;     
01050     int32 planeBytes;   
01053     void *baseAddr;     
01055     //---------------------------------------------------------------------------
01056     // Fields new in version 1:
01057     //---------------------------------------------------------------------------   
01059 
01060     PSPixelMask *mat;   
01067     PSPixelMask *masks; 
01073     // Use to set the phase of the checkerboard:
01074     int32 maskPhaseRow; 
01075     int32 maskPhaseCol; 
01077     //---------------------------------------------------------------------------
01078     // Fields new in version 2:
01079     //---------------------------------------------------------------------------   
01081 
01082     
01083     PSPixelOverlay *pixelOverlays;
01084     unsigned32 colorManagementOptions; 
01087 } PSPixelMap;
01088 
01104 typedef struct PSPlatformContext
01105 {
01106     void *fCGContextRef;    // fCGContextRef is CoreGraphics' CGContextRef
01107     VRect fScreenRect;      // screen bounds that this DisplayPixels is targeted - for color management across monitors
01108 } PSPlatformContext;
01109 
01110 //-------------------------------------------------------------------------------
01111 //  Structures -- ColorServicesInfo.
01112 //-------------------------------------------------------------------------------
01113 
01115 typedef struct ColorServicesInfo
01116 {
01117     int32 infoSize;                 
01124     int16 selector;                  
01127     int16 sourceSpace;               
01135     int16 resultSpace;               
01142     Boolean resultGamutInfoValid;    
01146     Boolean resultInGamut;          
01150 
01151     void *reservedSourceSpaceInfo;  
01152     void *reservedResultSpaceInfo;  
01169     int16 colorComponents[4];       
01171     void *reserved;               
01173     union
01174     {
01175         Str255 *pickerPrompt;     
01178         Point *globalSamplePoint; 
01179         int32 specialColorID;     
01181     } selectorParameter;          
01185 } ColorServicesInfo;
01186 
01187 
01192 
01193 
01194 
01195 
01196 #define plugIncolorServicesChooseColor      0    
01197 #define plugIncolorServicesConvertColor     1    
01198 #define plugIncolorServicesSamplePoint      2    
01199 #define plugIncolorServicesGetSpecialColor  3    
01204 
01205 
01206 
01208 
01209 // Constants for resultSpace and sourceSpace fields:
01210 
01213 
01214 
01215 #define plugIncolorServicesRGBSpace     0    
01216 #define plugIncolorServicesHSBSpace     1    
01217 #define plugIncolorServicesCMYKSpace    2    
01218 #define plugIncolorServicesLabSpace     3    
01219 #define plugIncolorServicesGraySpace    4    
01220 #define plugIncolorServicesHSLSpace     5    
01221 #define plugIncolorServicesXYZSpace     6    
01222 #define plugIncolorServicesChosenSpace  -1   
01225 
01226 
01227 
01229 #define plugIncolorServicesForegroundColor 0   
01231 #define plugIncolorServicesBackgroundColor 1
01232 
01233 //-------------------------------------------------------------------------------
01234 //  Structures -- Resampling callbacks.
01235 //-------------------------------------------------------------------------------
01236 
01249 typedef struct PSImagePlane
01250 {
01251     void *data;      
01252     Rect bounds;     
01253     int32 rowBytes;  
01254     int32 colBytes;  
01256 } PSImagePlane;
01257 
01261 typedef struct PSImageMultiPlane
01262 {
01263     void *data;      
01264     Rect bounds;     
01265     int32 rowBytes;  
01266     int32 colBytes;  
01267     int16 activeChannels;   
01269 } PSImageMultiPlane;
01270 
01274 typedef struct PSImageMultiPlane32
01275 {
01276     void *data;            
01277     VRect bounds;          
01278     int32 rowBytes;        
01279     int32 colBytes;        
01280     int16 activeChannels;  
01281     int16 depth;           
01283 } PSImageMultiPlane32;
01284 
01285 //-------------------------------------------------------------------------------
01286 //  Structures -- Filter Layer Index -- Filter Layer support property indexes
01287 //-------------------------------------------------------------------------------
01288 #define PIFilteryLayersSupported        0
01289 
01290 
01291 //-------------------------------------------------------------------------------
01292 //  Structures -- Channel Ports.
01293 //-------------------------------------------------------------------------------
01335 typedef struct PixelMemoryDesc
01336 {
01337     void *data;         
01338     int32 rowBits;      
01341     int32 colBits;      
01343     int32 bitOffset;    
01344     int32 depth;        
01346 } PixelMemoryDesc;
01347 
01364 typedef struct PSScaling
01365 {
01366     VRect sourceRect;       
01367     VRect destinationRect;  
01369 } PSScaling;
01370 
01372 // We provide access to internal channels via the following abstract types:
01374 typedef struct _PIChannelPortDesc *PIChannelPort;
01375 
01376 // Old declarations. (4.0)
01378 typedef PIChannelPort ChannelReadPort;   
01380 typedef PIChannelPort ChannelWritePort;  
01382 //-------------------------------------------------------------------------------
01383 //  Structures -- Channel Ports -- Channel Types
01384 //-------------------------------------------------------------------------------
01385 
01388 
01389 #define ctUnspecified        0       
01390 #define ctRed                1       
01391 #define ctGreen              2       
01392 #define ctBlue               3       
01393 #define ctCyan               4       
01394 #define ctMagenta            5       
01395 #define ctYellow             6       
01396 #define ctBlack              7       
01397 #define ctL                  8       
01398 #define ctA                  9       
01399 #define ctB                 10       
01400 #define ctDuotone           11       
01401 #define ctIndex             12       
01402 #define ctBitmap            13       
01403 #define ctColorSelected     14       
01404 #define ctColorProtected    15       
01405 #define ctTransparency      16       
01406 #define ctLayerMask         17       
01407 #define ctInvertedLayerMask 18       
01408 #define ctSelectionMask     19       
01409 #define ctSpotColor         20       
01410 #define ctVectorMask        21
01411 #define ctSmartFilterMask   22
01412 
01413 
01414 //-------------------------------------------------------------------------------
01415 //  Structures -- Channel Ports -- WriteChannelDesc
01416 //-------------------------------------------------------------------------------
01417 
01419 #define kCurrentMinVersWriteChannelDesc 0    
01421 #define kCurrentMaxVersWriteChannelDesc 1    
01426 typedef struct WriteChannelDesc
01427 {
01428     
01429     int32 minVersion;   
01430     int32 maxVersion;   
01432     //---------------------------------------------------------------------------
01433     //  Version 0 fields:
01434     //---------------------------------------------------------------------------
01435     
01436     struct WriteChannelDesc *next;   
01439     ChannelWritePort port;  
01441     VRect bounds;           
01442     int32 depth;            
01444     VPoint tileSize;        
01445     VPoint tileOrigin;      
01447     int16 channelType;      
01449     int16 padding;          
01451     void *contextInfo;      
01453     const char *name;       
01455     //---------------------------------------------------------------------------
01456     //  Version 1 fields:
01457     //---------------------------------------------------------------------------
01459 
01460     const uint16 *unicodeName;      
01463 
01464   #ifdef __cplusplus
01465     WriteChannelDesc()
01466         : minVersion(0), maxVersion(0), next(NULL), port(NULL), depth(0),
01467         channelType(0), padding(0), contextInfo(NULL), name(NULL), unicodeName(NULL) {}   
01468   #endif // __cplusplus             
01469 } WriteChannelDesc;
01472 //-------------------------------------------------------------------------------
01473 //  Structures -- Channel Ports -- ReadChannelDesc
01474 //-------------------------------------------------------------------------------
01476 #define kCurrentMinVersReadChannelDesc  0  
01478 #define kCurrentMaxVersReadChannelDesc  5  
01483 typedef struct ReadChannelDesc
01484 {
01485     
01486     int32 minVersion;     
01487     int32 maxVersion;     
01489     //---------------------------------------------------------------------------
01490     //  Version 0 fields:
01491     //---------------------------------------------------------------------------
01492         
01493     struct ReadChannelDesc *next;   
01495     PIChannelPort port;     
01497     VRect bounds;           
01498     int32 depth;            
01500     VPoint tileSize;        
01503     VPoint tileOrigin;      
01505     Boolean target;         
01506     Boolean shown;          
01508     int16 channelType;      
01510     void *contextInfo;      
01512     const char *name;       
01514     //---------------------------------------------------------------------------
01515     //  Version 1 fields:
01516     //---------------------------------------------------------------------------
01518 
01519     PIChannelPort writePort; 
01523     //---------------------------------------------------------------------------
01524     //  Version 2 fields:
01525     //---------------------------------------------------------------------------
01527 
01528     unsigned32 alphaID;     
01531 
01533 
01534     const uint16 *unicodeName;      
01536 
01537     //---------------------------------------------------------------------------
01538     //  Version 4 fields: (added in Photoshop CS3/10)
01539     //---------------------------------------------------------------------------
01540 
01542 
01543     Boolean isEnabled;          
01546 
01547     //---------------------------------------------------------------------------
01548     //  Version 5 fields:
01549     //---------------------------------------------------------------------------
01551 
01552     VRect limitBounds;          
01554 
01555 
01556   #ifdef __cplusplus
01557     ReadChannelDesc() 
01558         : minVersion(0), maxVersion(0), next(NULL), port(NULL), depth(0),
01559         target(false), shown(false), channelType(0), contextInfo(NULL),
01560         name(NULL), writePort(NULL), alphaID(0), unicodeName(NULL), isEnabled(true) {}
01561   #endif // __cplusplus             
01563 } ReadChannelDesc;
01564 
01565 //-------------------------------------------------------------------------------
01566 //
01567 //  Structures -- Channel Ports -- ReadLayerDesc
01568 //
01569 //  We describe a layer as a collection of lists of read channels.
01570 //
01571 //-------------------------------------------------------------------------------
01573 #define kCurrentMinVersReadLayerDesc    0    
01575 #define kCurrentMaxVersReadLayerDesc    3    
01579 typedef struct ReadLayerDesc
01580 {
01581     
01582     int32 minVersion;     
01583     int32 maxVersion;     
01585     //---------------------------------------------------------------------------
01586     //  Version 0 fields:
01587     //---------------------------------------------------------------------------
01588     struct ReadLayerDesc *next;     
01590     ReadChannelDesc *compositeChannelsList;  
01592     ReadChannelDesc *transparency;  
01594     ReadChannelDesc *layerMask;     
01596     unsigned32 sheetID;             
01598     const char *name;               
01600     Boolean isPixelBased;           
01602     //---------------------------------------------------------------------------
01603     //  Version 1 fields:
01604     //---------------------------------------------------------------------------
01605     
01607 
01608     const uint16 *unicodeName;      
01610 
01611     //---------------------------------------------------------------------------
01612     //  Version 2 fields (added in Photoshop CS3/10)
01613     //---------------------------------------------------------------------------
01614 
01616 
01617     Boolean isVisible;      
01619     Boolean isAdjustor;     
01621     Boolean isContentGenerator; 
01623     Boolean isRendered;     
01625     unsigned8 opacity;      
01627     unsigned8 fillOpacity;  
01629     PIType  blendMode;      
01631     ReadChannelDesc *vectorMask; 
01633 
01634     //---------------------------------------------------------------------------
01635     //  Version 3 fields (added in Photoshop CS3/10)
01636     //---------------------------------------------------------------------------
01637     
01638     ReadChannelDesc *smartFilterMask; 
01641 
01642   #ifdef __cplusplus
01643     ReadLayerDesc()
01644         : minVersion(0), maxVersion(0), next(NULL), compositeChannelsList(NULL),
01645         transparency(NULL), layerMask(NULL), sheetID(0), name(NULL), 
01646         isPixelBased(true), unicodeName(NULL), isVisible(true), 
01647         isAdjustor(false), isContentGenerator(false), isRendered(false), 
01648         opacity(255), fillOpacity(255), blendMode(PIBlendNormal), 
01649         vectorMask(NULL), smartFilterMask(NULL) {}
01650   #endif // __cplusplus            
01652     } ReadLayerDesc;
01653 
01654 //-------------------------------------------------------------------------------
01655 //  Structures -- Channel Ports -- Document Types
01656 //-------------------------------------------------------------------------------
01659 // @{ 
01660 #define dtImageDocument     0      
01661 #define dtImageScrap        1      
01662 // @}
01663 //-------------------------------------------------------------------------------
01664 //
01665 //  Structures -- Channel Ports -- ImageDocumentDesc
01666 //
01667 //  We describe a document as a collection of lists of read channels.
01668 //
01669 //-------------------------------------------------------------------------------
01671 #define kCurrentMinVersReadImageDocDesc 0  
01673 #define kCurrentMaxVersReadImageDocDesc 5  
01682 typedef struct ReadImageDocumentDesc
01683 {
01684     
01685     int32 minVersion;      
01686     int32 maxVersion;      
01688     //---------------------------------------------------------------------------
01689     //  Version 0 fields:
01690     //---------------------------------------------------------------------------
01691     
01692     int32 imageMode;        
01693     int32 depth;            
01694     VRect bounds;           
01696     Fixed hResolution;      
01697     Fixed vResolution;      
01699     LookUpTable redLUT;     
01700     LookUpTable greenLUT;   
01701     LookUpTable blueLUT;    
01704     ReadChannelDesc *targetCompositeChannels;   
01706     ReadChannelDesc *targetTransparency;       
01708     ReadChannelDesc *targetLayerMask;          
01710     ReadChannelDesc *mergedCompositeChannels;  
01714     ReadChannelDesc *mergedTransparency;       
01716     ReadChannelDesc *alphaChannels;            
01718     ReadChannelDesc *selection;                
01720     // New with version 1.
01721     //---------------------------------------------------------------------------
01722     //  Version 1 fields
01723     //---------------------------------------------------------------------------
01725 
01726     struct SPPlatformFileSpecification_t *fileSpec;  
01728     
01730 
01731     ReadLayerDesc *layersDescriptor;           
01733     int32 documentType;                        
01735     struct ReadImageDocumentDesc *next;        
01737 
01738     //---------------------------------------------------------------------------
01739     //  Version 3 fields (added in Photoshop CS3/10)
01740     //---------------------------------------------------------------------------
01741 
01743 
01744     void *  iCCprofileData;     
01746     int32   iCCprofileSize;     
01748     int32   compositeChannelCount;  
01750     int32   layerCount;         
01753     int32   alphaChannelCount;  
01755 
01756     //---------------------------------------------------------------------------
01757     //  Version 4 fields (added in Photoshop CS3/10)
01758     //---------------------------------------------------------------------------
01759     
01760     // Layer mask for the target layer:
01761     ReadChannelDesc *targetSmartFilterMask;
01762                 
01763     //---------------------------------------------------------------------------
01764     //  Version 5 fields (added in Photoshop CS6/13)
01765     //---------------------------------------------------------------------------
01766     
01767     // The Unicode file specification, if any.
01768     struct SPPlatformFileSpecificationW *fileSpecW;
01769 
01770 
01771   #ifdef __cplusplus
01772     ReadImageDocumentDesc()
01773         : minVersion(0), maxVersion(0), imageMode(0), depth(0), 
01774           hResolution(0), vResolution(0), 
01775           targetCompositeChannels(NULL), targetTransparency(NULL), targetLayerMask(NULL),
01776           mergedCompositeChannels(NULL), mergedTransparency(NULL), alphaChannels(NULL),
01777           selection(NULL), fileSpec(NULL), layersDescriptor(NULL), documentType(0),
01778           next(NULL), iCCprofileData(NULL), iCCprofileSize(0), compositeChannelCount(0),
01779           layerCount(0), alphaChannelCount(0), targetSmartFilterMask(NULL), fileSpecW(NULL)
01780             {
01781             }
01782   #endif // __cplusplus
01783 
01784 } ReadImageDocumentDesc;
01786 //-------------------------------------------------------------------------------
01787 //  Defines -- Prototypes -- Callbacks.
01788 //-------------------------------------------------------------------------------
01789 #ifdef __cplusplus
01790 
01791 extern "C"
01792 {
01793 #endif
01794 
01795     // Direct callbacks:
01797 
01798 
01816     typedef MACPASCAL Boolean (*TestAbortProc) (void);
01817     
01818     
01829     typedef MACPASCAL void (*ProgressProc) (int32 done, int32 total);
01830     
01831     
01843     typedef MACPASCAL void (*HostProc) (int16 selector, intptr_t *data);
01844 
01845 
01853     typedef MACPASCAL int32 (*SpaceProc) (void);
01854 
01855 
01864     typedef MACPASCAL void (*ProcessEventProc) (void *event);
01865 
01866 
01890     typedef MACPASCAL OSErr (*DisplayPixelsProc) (const PSPixelMap *source,
01891                                                   const VRect *srcRect,
01892                                                   int32 dstRow,
01893                                                   int32 dstCol,
01894                                                   void *platformContext);
01895 
01896 
01926     typedef MACPASCAL OSErr (*AdvanceStateProc) (void);
01927 
01928 
01947     typedef MACPASCAL OSErr (*ColorServicesProc) (ColorServicesInfo *info);
01952 
01953     // Handle procs:
01955 
01956 
02026     typedef MACPASCAL Handle (*NewPIHandleProc) (int32 size);
02027 
02032     typedef MACPASCAL void (*DisposePIHandleProc) (Handle h);
02033 
02038     typedef MACPASCAL void (*DisposeRegularHandlePIHandleProc) (Handle h);
02039 
02045     typedef MACPASCAL int32 (*GetPIHandleSizeProc) (Handle h);
02046 
02053     typedef MACPASCAL OSErr (*SetPIHandleSizeProc) (Handle h, int32 newSize);
02054 
02062     typedef MACPASCAL Ptr (*LockPIHandleProc) (Handle h, Boolean moveHigh);
02063 
02070     typedef MACPASCAL void (*UnlockPIHandleProc) (Handle h);
02071 
02083     typedef MACPASCAL void (*RecoverSpaceProc) (int32 size);
02084 
02088 
02089 
02091 
02092 
02149     typedef MACPASCAL OSErr (*AllocateBufferProc) (int32 size, BufferID *bufferID);
02150 
02159     typedef MACPASCAL OSErr (*AllocateBufferProc64) (int64 size, BufferID *bufferID);
02160 
02166     typedef MACPASCAL Ptr (*LockBufferProc) (BufferID bufferID, Boolean moveHigh);
02167 
02171     typedef MACPASCAL void (*UnlockBufferProc) (BufferID bufferID);
02172 
02178     typedef MACPASCAL void (*FreeBufferProc) (BufferID bufferID);
02179 
02184     typedef MACPASCAL int32 (*BufferSpaceProc) (void);
02185     
02190     typedef MACPASCAL int64 (*BufferSpaceProc64) (void);
02191     
02199     typedef MACPASCAL OSErr (*ReserveSpaceProc) (int32 size);
02200   // end ingroup
02205 
02206 
02207 
02248     typedef MACPASCAL int16 (*CountPIResourcesProc) (ResType type);
02249     
02257     typedef MACPASCAL Handle (*GetPIResourceProc) (ResType type, int16 index);
02258     
02265     typedef MACPASCAL void (*DeletePIResourceProc) (ResType type, int16 index);
02266     
02274     typedef MACPASCAL OSErr (*AddPIResourceProc) (ResType type, Handle data);  // end ingroup
02279     // Property suite:
02280 
02282 
02283 
02342     typedef MACPASCAL OSErr (*GetPropertyProc) (PIType signature,
02343                                                 PIType key,
02344                                                 int32 index,
02345                                                 intptr_t *simpleProperty,
02346                                                 Handle *complexProperty);
02347 
02355     typedef MACPASCAL OSErr (*SetPropertyProc) (PIType signature,
02356                                                 PIType key,
02357                                                 int32 index,
02358                                                 intptr_t simpleProperty,
02359                                                 Handle complexProperty);
02360   // end defgroup
02365 
02366 
02368 
02369 
02463     typedef MACPASCAL OSErr (*PIResampleProc) (PSImagePlane *source,
02464                                                PSImagePlane *destination,
02465                                                Rect *area,
02466                                                Fixed *coords,
02467                                                int16 method);
02468 
02469     typedef MACPASCAL OSErr (*PIResampleMultiProc) (PSImageMultiPlane *source,
02470                                                    PSImageMultiPlane *destination,
02471                                                    Rect *area,
02472                                                    Fixed *coords,
02473                                                    int16 method);
02474 
02475     typedef MACPASCAL OSErr (*PIResampleMulti32Proc) (PSImageMultiPlane32 *source,
02476                                                    PSImageMultiPlane32 *destination,
02477                                                    VRect *area,
02478                                                    int64 *coords,   // s47.16 numbers
02479                                                    int16 method);
02480       // end defgroup
02485     
02486 // Channel ports suite:
02488 
02489 
02511     typedef MACPASCAL OSErr (*ReadPixelsProc) (ChannelReadPort port,
02512                                                const PSScaling *scaling,
02513                                                const VRect *writeRect,
02514                                                     /* Rectangle in destination coordinates. */
02515                                                const PixelMemoryDesc *destination,
02516                                                VRect *wroteRect);
02517 
02531     typedef MACPASCAL OSErr (*WriteBasePixelsProc) (ChannelWritePort port,
02532                                                     const VRect *writeRect,
02533                                                     const PixelMemoryDesc *source);
02534 
02541     typedef MACPASCAL OSErr (*ReadPortForWritePortProc) (ChannelReadPort *readPort,
02542                                                          ChannelWritePort writePort);
02543     
02545 #ifdef __cplusplus
02546 }
02547 #endif
02548 
02549 //-------------------------------------------------------------------------------
02550 //  Structures -- Buffer procs.
02551 //-------------------------------------------------------------------------------
02552 
02554 #define kCurrentBufferProcsVersion 2   
02556 
02557 #define kPIBufferSuite          "Photoshop Buffer Procs for Plug-ins"
02559 #define kPIBufferSuiteVersion   kCurrentBufferProcsVersion
02560 
02561 
02564 typedef struct BufferProcs
02565 {
02566 
02567     int16 bufferProcsVersion;       
02569     int16 numBufferProcs;           
02571     AllocateBufferProc allocateProc;    
02573     LockBufferProc lockProc;        
02575     UnlockBufferProc unlockProc;    
02577     FreeBufferProc freeProc;        
02579     BufferSpaceProc spaceProc;      
02581     ReserveSpaceProc reserveProc;   
02583     AllocateBufferProc64 allocateProc64;    
02585     BufferSpaceProc64 spaceProc64;      
02586 } BufferProcs;
02587 
02591 #define kCurrentBufferProcsCount \
02592     ((sizeof(BufferProcs) - offsetof(BufferProcs, allocateProc)) / sizeof(void *)) 
02593 
02594 //-------------------------------------------------------------------------------
02595 //  Structures -- Resource Procs.
02596 //-------------------------------------------------------------------------------
02597 
02599 #define kCurrentResourceProcsVersion 3  
02601 
02602 #define kPIResourceSuite            "Photoshop Resource Suite for Plug-ins"
02604 #define kPIResourceSuiteVersion     kCurrentResourceProcsVersion
02605 
02608 typedef struct ResourceProcs
02609 {
02610     
02611     int16 resourceProcsVersion;      
02613     int16 numResourceProcs;          
02615     CountPIResourcesProc countProc;  
02617     GetPIResourceProc getProc;       
02619     DeletePIResourceProc deleteProc; 
02621     AddPIResourceProc addProc;       
02623 } ResourceProcs;
02624 
02628 #define kCurrentResourceProcsCount \
02629     ((sizeof(ResourceProcs) - offsetof(ResourceProcs, countProc)) / sizeof(void *)) 
02630 
02631 // Reserved resource types:
02632 
02633 #define kDayStarColorMatchingResource 'DCSR'
02634 #define kPhotoDeluxeResource 'PHUT'
02635 
02636 //-------------------------------------------------------------------------------
02637 //  Structures -- Handle Procs.
02638 //-------------------------------------------------------------------------------
02639 
02641 #define kCurrentHandleProcsVersion 1   
02643 
02644 #define kPIHandleSuite              "Photoshop Handle Suite for Plug-ins"
02646 #define kPIHandleSuiteVersion       kCurrentHandleProcsVersion
02647 
02649 
02650 typedef struct HandleProcs
02651 {
02652     
02653     int16 handleProcsVersion;   
02655     int16 numHandleProcs;       
02657     NewPIHandleProc newProc;    
02659     DisposePIHandleProc disposeProc;    
02661     GetPIHandleSizeProc getSizeProc;    
02663     SetPIHandleSizeProc setSizeProc;    
02665     LockPIHandleProc lockProc;          
02667     UnlockPIHandleProc unlockProc;      
02669     RecoverSpaceProc recoverSpaceProc;  
02671     DisposeRegularHandlePIHandleProc disposeRegularHandleProc; 
02673 } HandleProcs;
02674 
02678 #define kCurrentHandleProcsCount \
02679     ((sizeof(HandleProcs) - offsetof(HandleProcs, newProc)) / sizeof(void *)) 
02680 
02681 //-------------------------------------------------------------------------------
02682 //  Structures -- Image Services suite.
02683 //-------------------------------------------------------------------------------
02684 
02686 #define kCurrentImageServicesProcsVersion 1   
02688 
02689 #define kPIImageServicesSuite               "Photoshop Image Services Suite for Plug-ins"
02691 #define kPIImageServicesSuiteVersion        kCurrentImageServicesProcsVersion
02692     
02695 typedef struct ImageServicesProcs
02696 {
02697     
02698     int16 imageServicesProcsVersion;        
02699     int16 numImageServicesProcs;            
02701     PIResampleProc interpolate1DProc;       
02702     PIResampleProc interpolate2DProc;       
02704     PIResampleMultiProc interpolate1DMultiProc;  
02705     PIResampleMultiProc interpolate2DMultiProc;  
02707     PIResampleMulti32Proc interpolate1DMulti32Proc;  
02708     PIResampleMulti32Proc interpolate2DMulti32Proc;  
02710 } ImageServicesProcs;
02711 
02715 #define kCurrentImageServicesProcsCount \
02716     ((sizeof(ImageServicesProcs) - offsetof(ImageServicesProcs, interpolate1DProc)) / sizeof(void *)) 
02717     
02718 //-------------------------------------------------------------------------------
02719 //  Structures -- Property procs.
02720 //-------------------------------------------------------------------------------
02721 
02723 #define kCurrentPropertyProcsVersion 1   
02726 
02727 #define kPIPropertySuite                "Photoshop Property Suite for Plug-ins"
02728 
02729 
02730 #define kPIPropertySuiteVersion         kCurrentPropertyProcsVersion
02731 
02734 typedef struct PropertyProcs
02735 {
02736     
02737     int16 propertyProcsVersion;        
02738     int16 numPropertyProcs;            
02740     GetPropertyProc getPropertyProc;   
02741     SetPropertyProc setPropertyProc;   
02743 } PropertyProcs;
02744 
02747 #define kCurrentPropertyProcsCount \
02748     ((sizeof(PropertyProcs) - offsetof(PropertyProcs, getPropertyProc)) / sizeof(void *))
02749 
02750 //-------------------------------------------------------------------------------
02751 //  Structures -- Channel Ports.
02752 //-------------------------------------------------------------------------------
02753 
02755 #define kCurrentChannelPortProcsVersion 1   
02758 
02759 #define kPIChannelPortSuite             "Photoshop Channel Ports Suite for Plug-ins"
02760 
02761 
02762 #define kPIChannelPortSuiteVersion      kCurrentChannelPortProcsVersion
02763 
02766 typedef struct ChannelPortProcs
02767 {
02768     
02769     int16 channelPortProcsVersion;      
02770     int16 numChannelPortProcs;          
02772     ReadPixelsProc readPixelsProc;      
02773     WriteBasePixelsProc writeBasePixelsProc;  
02774     ReadPortForWritePortProc readPortForWritePortProc;  
02776 } ChannelPortProcs;
02777 
02780 #define kCurrentChannelPortProcsCount \
02781     ((sizeof(ChannelPortProcs) - offsetof(ChannelPortProcs, readPixelsProc)) / sizeof(void *)) 
02782     
02783 //-------------------------------------------------------------------------------
02784 //  Suite - Matrix Math
02785 //-------------------------------------------------------------------------------
02786 
02811 
02812 #define kPSMatrixMathSuite          "9cfaa249-e6f1-11d2-b8eb-0060b0c1f95d"
02813 #define kPSMatrixMathSuiteVersion   1  
02816 typedef struct PSMatrixMathProcs
02817     {
02818     /* kPSMatrixMathSuiteVersion == 1 functions */
02819     
02826     // if result == NULL solution is put in m 
02827     SPAPI Boolean (*Inverse) (PIAffineMatrix *m,
02828                                 PIAffineMatrix *result);
02829     
02836     SPAPI Boolean (*Equals) (const PIAffineMatrix *m1,
02837                                 const PIAffineMatrix *m2);
02838 
02844     // works in-place if result == NULL
02845     SPAPI void (*ScalarMultiply) (const real64 scalar,
02846                                         PIAffineMatrix *m,
02847                                             PIAffineMatrix *result);
02848 
02855     // if result == NULL solution is put in m2 
02856     SPAPI void (*MatrixMultiply) (const PIAffineMatrix *m1,
02857                                         PIAffineMatrix *m2,
02858                                             PIAffineMatrix *result);
02859     
02866     // if result == NULL solution is put in m 
02867     SPAPI void (*PointMultiply) (PIFloatPoint *p,
02868                                         const PIAffineMatrix *m,
02869                                             PIFloatPoint *result);
02870     
02871     
02872     // if result == NULL solution is put in p 
02873     SPAPI void (*PointsMultiply) (PIFloatPoint *p,
02874                                             int32 count,
02875                                                 const PIAffineMatrix *m,
02876                                                     PIFloatPoint *result);
02877 
02878     } PSMatrixMathProcs;
02879 
02882 //-------------------------------------------------------------------------------
02883 //
02884 //  Defines -- Filter padding.
02885 //
02886 //  The following constants indicate what sort of padding to use.  Values 0
02887 //  through 255 specify a constant value.  Negative values imply special
02888 //  operations.
02889 //
02890 //  If the plug-in does not want padding and does not want errors, then
02891 //  exterior areas will contain arbitrary values.
02892 //
02893 //-------------------------------------------------------------------------------
02894 
02897 
02898 #define plugInWantsEdgeReplication          -1
02899 #define plugInDoesNotWantPadding            -2   
02900 #define plugInWantsErrorOnBoundsException   -3   
02902 
02903 //-------------------------------------------------------------------------------
02904 //  Defines -- Sampling flag
02905 //-------------------------------------------------------------------------------
02906 
02908 
02909 #define hostDoesNotSupportSampling      0    
02910 #define hostSupportsIntegralSampling    1    
02911 #define hostSupportsFractionalSampling  2    
02913 
02914 //-------------------------------------------------------------------------------
02915 //  Defines -- Layout values for filters and export modules.
02916 //-------------------------------------------------------------------------------
02917 
02918 // Traditional = Rows, columns, planes with colbytes = # planes:
02919 
02922 
02923 #define piLayoutTraditional             0
02924 #define piLayoutRowsColumnsPlanes       1
02925 #define piLayoutRowsPlanesColumns       2
02926 #define piLayoutColumnsRowsPlanes       3
02927 #define piLayoutColumnsPlanesRows       4
02928 #define piLayoutPlanesRowsColumns       5
02929 #define piLayoutPlanesColumnsRows       6
02930 
02931 
02932 //-------------------------------------------------------------------------------
02933 //  Defines -- Property suite -- PIInterface color property.
02934 //-------------------------------------------------------------------------------
02938 typedef struct PIInterfaceColor
02939 {
02940     RGBtuple color32;    
02941     RGBtuple color2;     
02943 } PIInterfaceColor;
02944 
02945 // Interface color selectors:
02948 
02949 #define kPIInterfaceButtonUpFill        1
02950 #define kPIInterfaceBevelShadow         2
02951 #define kPIInterfaceIconFillActive      3
02952 #define kPIInterfaceIconFillDimmed      4
02953 #define kPIInterfacePaletteFill         5
02954 #define kPIInterfaceIconFrameDimmed     6
02955 #define kPIInterfaceIconFrameActive     7
02956 #define kPIInterfaceBevelHighlight      8
02957 #define kPIInterfaceButtonDownFill      9
02958 #define kPIInterfaceIconFillSelected    10
02959 #define kPIInterfaceBorder              11
02960 #define kPIInterfaceButtonDarkShadow    12
02961 #define kPIInterfaceIconFrameSelected   13
02962 #define kPIInterfaceRed                 14
02963 
02964 //-------------------------------------------------------------------------------
02965 //  Defines -- Photoshop -- SuitePEA caller and selector strings for Photoshop.
02966 //-------------------------------------------------------------------------------
02968 
02969 
02970 #define kPSPhotoshopCaller          "PS Photoshop" 
02974 #define kPSDoIt                     "Do It"       
02980 
02981 //-------------------------------------------------------------------------------
02982 //  Action plug-in specific PiPL properties
02983 //-------------------------------------------------------------------------------
02984 
02986 // 'prst' -- Always stay loaded property:
02992 #define PIPersistentProperty        0x70727374L
02993 
02995 // 'reen' -- Allow reentrant:
03001 #define PIReentrantProperty         0x7265656EL
03002 
03003 //-------------------------------------------------------------------------------
03004 //  Defines -- Image Resources for Annotation.
03005 //-------------------------------------------------------------------------------
03006 
03007 /* Major & Minor version number */
03008 #define kPIAnnotMajorVersion    0x0002
03009 #define kPIAnnotMinorVersion    0x0001
03010 
03011 /* keys */
03012 #define PIAnnotTextPopup    'txtA' /* text with popup annotation */
03013 #define PIAnnotSound        'sndA' /* sound annotation */
03014 #define PIAnnotTextContent  'txtC' /* text as content */
03015 #define PIAnnotSoundFile    'sndF' /* content as a sound file */
03016 #define PIAnnotSoundMem     'sndM' /* content as a sound in memory */
03017 #define PIFilterFlate       'fltD' /* default parameters */
03018 #define PIFilterLZW         'lzwD' /* default parameters */
03019 #define PIFilterNone        'none' /* no compression */
03020 #define PIFilterUndef       '    ' /* treated as 'none' */
03021 
03022 #define PIMaxSize32Property  'ms32'     /* <VPoint> Max rows and cols supported by this plug-in.    */
03023 #define PIMinSize32Property  'mn32'     /* <VPoint> Min rows and cols supported by this plug-in.     */
03024 
03025 
03026 //-------------------------------------------------------------------------------
03027 //  stack renderer plug-in specific PiPL properties
03028 //-------------------------------------------------------------------------------
03035 
03036 
03043 #define PIStackRendererProperty     'sRnd'
03044 
03045 //-------------------------------------------------------------------------------
03046 //  stack renderer and file format plug-in specific PiPL properties
03047 //-------------------------------------------------------------------------------
03048 
03050 
03058 #define PIEditInPluginProperty              'ediP'
03059 
03061 
03070 #define PIPluginLaunchesEditorProperty      'piLe'
03071 
03072 //-------------------------------------------------------------------------------
03073 //-------------------------------------------------------------------------------
03074 //  Alignment.
03075 //-------------------------------------------------------------------------------
03076 #if defined(__BORLANDC__)
03077     #pragma option -a.
03078 #endif
03079 
03080 //-------------------------------------------------------------------------------
03081 
03082 #endif // __PIGeneral_h__