00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00026 #ifndef __PIGeneral_h__
00027 #define __PIGeneral_h__
00028
00029 #pragma once
00030
00031
00032
00033
00034 #include "PITypes.h"
00035
00036 #if PRAGMA_STRUCT_ALIGN
00037 #pragma options align=mac68k
00038 #endif
00039
00040 #if defined(__BORLANDC__)
00041 #pragma option -a-
00042 #endif
00043
00044 #include "PIResDefines.h"
00045
00046
00047
00048
00049
00051 #define kPhotoshopSignature 0x3842494dL
00052
00053
00054
00055
00056
00058
00059
00061 #define errPlugInHostInsufficient -30900
00062
00064 #define errPlugInPropertyUndefined -30901
00065
00070 #define errHostDoesNotSupportColStep -30902
00071
00076 #define errInvalidSamplePoint -30903
00077
00082 #define errReportString -30904
00083
00084
00085
00090 #define errHostVersionIncompatible -30905
00091
00092
00093
00094
00095
00096
00098
00099 #define errUnknownPort -30910
00101 #define errUnsupportedRowBits -30911
00104 #define errUnsupportedColBits -30912
00107 #define errUnsupportedBitOffset -30913
00110 #define errUnsupportedDepth -30914
00113 #define errUnsupportedDepthConversion -30915
00117 //-------------------------------------------------------------------------------
00118
00119
00120
00122
00123
00124 #define errWrongPlatformFilePath -30916
00126 #define errIllegalCharInID -30917
00128 #define errMissingParameter -1715
00131 //-------------------------------------------------------------------------------
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141 #ifndef kGeneralPiPLPropertiesDefined
00142 #define kGeneralPiPLPropertiesDefined
00165 typedef unsigned long PIType;
00167 //-------------------------------------------------------------------------------
00168
00169
00170
00172 #define kCurrentPiPLVersion 0
00173
00174
00219
00220
00233 #define PIKindProperty 0x6b696e64L
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243 #define PIPowerPCCodeProperty 0x70777063L
00244
00245
00246
00247 #define PIPowerPCCarbonCodeProperty 'ppcb'
00248
00250
00255 #define PIPowerPCMachOCodeProperty 'mach'
00256
00257
00258 #define PICodeMacIntel32Property 'mi32'
00259
00260
00261 #define PICodeMacIntel64Property 'mi64'
00262
00264
00269 #define PICodeFragmentProperty 'frag'
00270
00272
00277 #define PICarbonCodeFragmentProperty 'frgc'
00278
00279
00280 #define PIWin64X86CodeProperty 0x38363634L
00281
00282
00283 #define PIWin32X86CodeProperty 0x77783836L
00284
00285
00286 #define PIWin16X86CodeProperty 0x66783836L
00287
00288
00289
00290
00292
00297 typedef struct PIProperty
00298 {
00305 PIType vendorID;
00306
00308 PIType propertyKey;
00309
00312 int32 propertyID;
00313
00316 int32 propertyLength;
00317
00321 char propertyData [1];
00322
00323 } PIProperty;
00324
00326
00332 typedef struct PIPropertyList
00333 {
00335 int32 version;
00336
00338 int32 count;
00339
00341 PIProperty properties[1];
00342
00343 } PIPropertyList;
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00372 typedef struct PI68KCodeDesc
00373 {
00377 PIType fType;
00378
00380 int16 fID;
00381
00382 } PI68KCodeDesc;
00383
00385 typedef struct PICFMCodeDesc
00386 {
00389 long fContainerOffset;
00390
00394 long fContainerLength;
00395
00403 unsigned char fEntryName[1];
00404
00405 } PICFMCodeDesc;
00406
00408 typedef struct PIMachOCodeDesc
00409 {
00412 long fContainerOffset;
00413
00417 long fContainerLength;
00418
00426 unsigned char fEntryName[1];
00427
00428 } PIMachOCodeDesc;
00429
00430
00431
00432 typedef struct PIMacIntelCodeDesc
00433 {
00434
00435
00436 unsigned char fEntryName[1];
00437
00438 } PIMacIntelCodeDesc;
00439
00442 typedef struct PIFragmentCodeDesc
00443 {
00445 long fFragmentResource;
00446
00448 long fFragmentNumber;
00449
00452 unsigned char fEntryName[1];
00453
00454 } PIFragmentCodeDesc;
00455
00460 typedef struct PIWin64X86CodeDesc
00461 {
00462 char fEntryName[1];
00463 } PIWin64X86CodeDesc;
00464
00469 typedef struct PIWin32X86CodeDesc {
00470 char fEntryName[1];
00471 } PIWin32X86CodeDesc;
00472
00475 typedef struct PIWin16X86CodeDesc {
00476 char fEntryName[1];
00477 } PIWin16X86CodeDesc;
00478
00479 #endif // kGeneralPiPLPropertiesDefined
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00491
00506 #define PIVersionProperty 0x76657273L
00507
00509
00518 #define PIPriorityProperty 0x70727479L
00519
00521
00526 #define PIComponentProperty 0x636d7074L
00527
00529
00541 #define PIImageModesProperty 0x6d6f6465L
00542
00544
00555 #define PIEnableInfoProperty 0x656e626cL
00556
00558
00563 #define PIWantsScrapProperty 0x776E7363L
00564
00566
00571 #define PIFileBrowserAwareProperty 0x66626177L
00572
00574
00579 #define PINoAboutBoxProperty 0x6E61626FL
00580
00582
00588 #define PIFilterLayerSupport 0x666c6c79L
00589
00591
00598 #define PIRequiredHostProperty 0x686f7374L
00599
00601
00609 #define PICategoryProperty 0x63617467L
00610
00612
00620 #define PIZCategoryProperty 0x7A636174L
00621
00623
00631 #define PINameProperty 0x6e616d65L
00632
00634
00642 #define PIZNameProperty 0x7A6E616DL
00643
00645
00654 #define PIProgressTextProperty 0x70726f67
00655
00657
00666 #define PIZProgressTextProperty 0x7A70726F
00667
00669
00681 #define PIPickerIDProperty 0x706e6d65L
00682
00684
00689 #define PI68KFPUCodeProperty 0x36386670L
00690
00692
00695 #define PIUnixSPARCV7CodeProperty 0x75737037
00696
00698
00701 #define PIUnixSPARCV8CodeProperty 0x75737038
00702
00704
00707 #define PIUnixSPARCV9CodeProperty 0x75737039
00708
00710
00712 #define PIUnixSPARCCodeProperty PIUnixSPARCV7CodeProperty
00713
00715
00718 #define PIUnixMIPSR3000CodeProperty 0x756d7233
00719
00721
00724 #define PIUnixMIPSR4000CodeProperty 0x756d7234
00725
00727
00730 #define PIUnixMIPSR400064BitCodeProperty 0x756d3477
00731
00733
00736 #define PIUnixMIPSR8000CodeProperty 0x756d7238
00737
00739
00741 #define PIUnixMIPSCodeProperty PIUnixMIPSR3000CodeProperty
00742
00744
00748 #define PILoadUnloadProperty 0x70694c55
00749
00751
00755 #define PIPreferencesProperty 0x70695046
00756
00757
00758 #define PIFeatureEnabledProperty 0x6665656e
00759
00760
00761 #define PIPositionDependentProperty 0x706f7364
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00792 typedef PIPropertyList **PIPropertyListHandle;
00793
00795 typedef struct TypeCreatorPair
00796 {
00797 PIType type;
00798 PIType creator;
00800 } TypeCreatorPair;
00801
00802
00806 typedef struct PlugInInfo
00807 {
00808
00810 int16 version;
00811
00813 int16 subVersion;
00814
00816 int16 priority;
00817
00819 int16 generalInfoSize;
00820
00822 int16 typeInfoSize;
00823
00825 int16 supportsMode;
00826
00828 PIType requireHost;
00829
00830 } PlugInInfo;
00831
00832 #if PRAGMA_STRUCT_ALIGN
00833 #pragma options align=reset
00834 #endif
00835
00836 typedef struct PSBuffer *BufferID;
00837
00838 #define kPIGeneralInfoSize 16
00839
00840
00841
00842
00843
00846
00847
00848
00851 #define plugInModeBitmap 0
00852 #define plugInModeGrayScale 1
00853 #define plugInModeIndexedColor 2
00854 #define plugInModeRGBColor 3
00855 #define plugInModeCMYKColor 4
00856 #define plugInModeHSLColor 5
00857 #define plugInModeHSBColor 6
00858 #define plugInModeMultichannel 7
00859 #define plugInModeDuotone 8
00860 #define plugInModeLabColor 9
00861 #define plugInModeGray16 10
00862 #define plugInModeRGB48 11
00863 #define plugInModeLab48 12
00864 #define plugInModeCMYK64 13
00865 #define plugInModeDeepMultichannel 14
00866 #define plugInModeDuotone16 15
00867 #define plugInModeRGB96 16
00868 #define plugInModeGray32 17
00869
00871
00872
00873
00874
00875
00876 #define kPIHostBlendModeSignature '8BIM'
00877
00879
00880 #define PIBlendNormal 'norm'
00881 #define PIBlendDarken 'dark'
00882 #define PIBlendLighten 'lite'
00883 #define PIBlendHue 'hue '
00884 #define PIBlendSaturation 'sat '
00885 #define PIBlendColor 'colr'
00886 #define PIBlendLuminosity 'lum '
00887 #define PIBlendMultiply 'mul '
00888 #define PIBlendScreen 'scrn'
00889 #define PIBlendDissolve 'diss'
00890 #define PIBlendOverlay 'over'
00891 #define PIBlendHardLight 'hLit'
00892 #define PIBlendSoftLight 'sLit'
00893 #define PIBlendDifference 'diff'
00894 #define PIBlendExclusion 'smud'
00895 #define PIBlendColorDodge 'div '
00896 #define PIBlendColorBurn 'idiv'
00897 #define PIBlendLinearDodge 'lddg'
00898 #define PIBlendLinearBurn 'lbrn'
00899 #define PIBlendLinearLight 'lLit'
00900 #define PIBlendVividLight 'vLit'
00901 #define PIBlendPinLight 'pLit'
00902 #define PIBlendHardMix 'hMix'
00903
00904
00905
00906
00907
00908
00912 typedef struct PIBlendMode
00913 {
00914 PIType signature;
00915 PIType key;
00916 } PIBlendMode;
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926 #define PSmovableDBoxProc (128*16+5)
00927
00928
00929
00930
00931
00934 typedef int16 PlaneMap [16];
00935
00940 typedef struct PlugInMonitor
00941 {
00942 Fixed gamma;
00943 Fixed redX;
00944 Fixed redY;
00945 Fixed greenX;
00946 Fixed greenY;
00947 Fixed blueX;
00948 Fixed blueY;
00949 Fixed whiteX;
00950 Fixed whiteY;
00951 Fixed ambient;
00955 } PlugInMonitor;
00956
00957
00958
00959
00961 typedef struct PSPixelMask
00962 {
00963 struct PSPixelMask *next;
00964 void *maskData;
00965 int32 rowBytes;
00966 int32 colBytes;
00967 int32 maskDescription;
00971 } PSPixelMask;
00972
00973
00976
00977 #define kSimplePSMask 0
00978 #define kBlackMatPSMask 1
00979 #define kGrayMatPSMask 2
00980 #define kWhiteMatPSMask 3
00981 #define kInvertPSMask 4
00982
00983
00985 typedef struct PSPixelOverlay
00986 {
00987 struct PSPixelOverlay *next;
00988 void *data;
00989 int32 rowBytes;
00990 int32 colBytes;
00991 unsigned8 r, g, b, opacity;
00992 int32 overlayAlgorithm;
00994 } PSPixelOverlay;
00995
00996
00999
01000 #define kStandardAlphaOverlay 0
01001 #define kInvertedAlphaOverlay 1
01003
01004
01007
01008 #define kViewAsMask 0xF
01009 #define kViewAsStandardRGB 0
01010 #define kViewAsMacRGB 1
01011 #define kViewAsWindowsRGB 2
01012 #define kViewAsUncompensated 3
01014
01015
01019 typedef struct PSPixelMap
01020 {
01021 int32 version;
01023 VRect bounds;
01024 int32 imageMode;
01029 int32 rowBytes;
01030 int32 colBytes;
01031 int32 planeBytes;
01034 void *baseAddr;
01036
01037
01038
01040
01041 PSPixelMask *mat;
01048 PSPixelMask *masks;
01054
01055 int32 maskPhaseRow;
01056 int32 maskPhaseCol;
01058
01059
01060
01062
01063
01064 PSPixelOverlay *pixelOverlays;
01065 unsigned32 colorManagementOptions;
01068 } PSPixelMap;
01069
01070
01071
01072
01073
01075 typedef struct ColorServicesInfo
01076 {
01077 int32 infoSize;
01084 int16 selector;
01087 int16 sourceSpace;
01095 int16 resultSpace;
01102 Boolean resultGamutInfoValid;
01106 Boolean resultInGamut;
01110
01111 void *reservedSourceSpaceInfo;
01112 void *reservedResultSpaceInfo;
01129 int16 colorComponents[4];
01131 void *reserved;
01133 union
01134 {
01135 Str255 *pickerPrompt;
01138 Point *globalSamplePoint;
01139 int32 specialColorID;
01141 } selectorParameter;
01145 } ColorServicesInfo;
01146
01147
01152
01153
01154
01155
01156 #define plugIncolorServicesChooseColor 0
01157 #define plugIncolorServicesConvertColor 1
01158 #define plugIncolorServicesSamplePoint 2
01159 #define plugIncolorServicesGetSpecialColor 3
01164
01165
01166
01168
01169 // Constants for resultSpace and sourceSpace fields:
01170
01173
01174
01175 #define plugIncolorServicesRGBSpace 0
01176 #define plugIncolorServicesHSBSpace 1
01177 #define plugIncolorServicesCMYKSpace 2
01178 #define plugIncolorServicesLabSpace 3
01179 #define plugIncolorServicesGraySpace 4
01180 #define plugIncolorServicesHSLSpace 5
01181 #define plugIncolorServicesXYZSpace 6
01182 #define plugIncolorServicesChosenSpace -1
01185
01186
01187
01189 #define plugIncolorServicesForegroundColor 0
01191 #define plugIncolorServicesBackgroundColor 1
01192
01193
01194
01195
01196
01209 typedef struct PSImagePlane
01210 {
01211 void *data;
01212 Rect bounds;
01213 int32 rowBytes;
01214 int32 colBytes;
01216 } PSImagePlane;
01217
01221 typedef struct PSImageMultiPlane
01222 {
01223 void *data;
01224 Rect bounds;
01225 int32 rowBytes;
01226 int32 colBytes;
01227 int16 activeChannels;
01229 } PSImageMultiPlane;
01230
01234 typedef struct PSImageMultiPlane32
01235 {
01236 void *data;
01237 VRect bounds;
01238 int32 rowBytes;
01239 int32 colBytes;
01240 int16 activeChannels;
01241 int16 depth;
01243 } PSImageMultiPlane32;
01244
01245
01246
01247
01248 #define PIFilteryLayersSupported 0
01249
01250
01251
01252
01253
01294 typedef struct PixelMemoryDesc
01295 {
01296 void *data;
01297 int32 rowBits;
01300 int32 colBits;
01302 int32 bitOffset;
01303 int32 depth;
01305 } PixelMemoryDesc;
01306
01323 typedef struct PSScaling
01324 {
01325 VRect sourceRect;
01326 VRect destinationRect;
01328 } PSScaling;
01329
01331
01333 typedef struct _PIChannelPortDesc *PIChannelPort;
01334
01335
01337 typedef PIChannelPort ChannelReadPort;
01339 typedef PIChannelPort ChannelWritePort;
01341
01342
01343
01344
01347
01348 #define ctUnspecified 0
01349 #define ctRed 1
01350 #define ctGreen 2
01351 #define ctBlue 3
01352 #define ctCyan 4
01353 #define ctMagenta 5
01354 #define ctYellow 6
01355 #define ctBlack 7
01356 #define ctL 8
01357 #define ctA 9
01358 #define ctB 10
01359 #define ctDuotone 11
01360 #define ctIndex 12
01361 #define ctBitmap 13
01362 #define ctColorSelected 14
01363 #define ctColorProtected 15
01364 #define ctTransparency 16
01365 #define ctLayerMask 17
01366 #define ctInvertedLayerMask 18
01367 #define ctSelectionMask 19
01368 #define ctSpotColor 20
01369 #define ctVectorMask 21
01370 #define ctSmartFilterMask 22
01371
01372
01373
01374
01375
01376
01378 #define kCurrentMinVersWriteChannelDesc 0
01380 #define kCurrentMaxVersWriteChannelDesc 1
01385 typedef struct WriteChannelDesc
01386 {
01387
01388 int32 minVersion;
01389 int32 maxVersion;
01391
01392
01393
01394
01395 struct WriteChannelDesc *next;
01398 ChannelWritePort port;
01400 VRect bounds;
01401 int32 depth;
01403 VPoint tileSize;
01404 VPoint tileOrigin;
01406 int16 channelType;
01408 int16 padding;
01410 void *contextInfo;
01412 const char *name;
01414
01415
01416
01418
01419 const uint16 *unicodeName;
01422
01423 #ifdef __cplusplus
01424 WriteChannelDesc()
01425 : minVersion(0), maxVersion(0), next(NULL), port(NULL), depth(0),
01426 channelType(0), padding(0), contextInfo(NULL), name(NULL), unicodeName(NULL) {}
01427 #endif // __cplusplus
01428 } WriteChannelDesc;
01431
01432
01433
01435 #define kCurrentMinVersReadChannelDesc 0
01437 #define kCurrentMaxVersReadChannelDesc 5
01442 typedef struct ReadChannelDesc
01443 {
01444
01445 int32 minVersion;
01446 int32 maxVersion;
01448
01449
01450
01451
01452 struct ReadChannelDesc *next;
01454 PIChannelPort port;
01456 VRect bounds;
01457 int32 depth;
01459 VPoint tileSize;
01462 VPoint tileOrigin;
01464 Boolean target;
01465 Boolean shown;
01467 int16 channelType;
01469 void *contextInfo;
01471 const char *name;
01473
01474
01475
01477
01478 PIChannelPort writePort;
01482
01483
01484
01486
01487 unsigned32 alphaID;
01490
01492
01493 const uint16 *unicodeName;
01495
01496
01497
01498
01499
01501
01502 Boolean isEnabled;
01505
01506
01507
01508
01510
01511 VRect limitBounds;
01513
01514
01515 #ifdef __cplusplus
01516 ReadChannelDesc()
01517 : minVersion(0), maxVersion(0), next(NULL), port(NULL), depth(0),
01518 target(false), shown(false), channelType(0), contextInfo(NULL),
01519 name(NULL), writePort(NULL), alphaID(0), unicodeName(NULL), isEnabled(true) {}
01520 #endif // __cplusplus
01522 } ReadChannelDesc;
01523
01524
01525
01526
01527
01528
01529
01530
01532 #define kCurrentMinVersReadLayerDesc 0
01534 #define kCurrentMaxVersReadLayerDesc 3
01538 typedef struct ReadLayerDesc
01539 {
01540
01541 int32 minVersion;
01542 int32 maxVersion;
01544
01545
01546
01547 struct ReadLayerDesc *next;
01549 ReadChannelDesc *compositeChannelsList;
01551 ReadChannelDesc *transparency;
01553 ReadChannelDesc *layerMask;
01555 unsigned32 sheetID;
01557 const char *name;
01559 Boolean isPixelBased;
01561
01562
01563
01564
01566
01567 const uint16 *unicodeName;
01569
01570
01571
01572
01573
01575
01576 Boolean isVisible;
01578 Boolean isAdjustor;
01580 Boolean isContentGenerator;
01582 Boolean isRendered;
01584 unsigned8 opacity;
01586 unsigned8 fillOpacity;
01588 PIType blendMode;
01590 ReadChannelDesc *vectorMask;
01592
01593
01594
01595
01596
01597 ReadChannelDesc *smartFilterMask;
01600
01601 #ifdef __cplusplus
01602 ReadLayerDesc()
01603 : minVersion(0), maxVersion(0), next(NULL), compositeChannelsList(NULL),
01604 transparency(NULL), layerMask(NULL), sheetID(0), name(NULL), isPixelBased(true),
01605 unicodeName(NULL), isVisible(true), blendMode(PIBlendNormal), opacity(255),
01606 fillOpacity(255), vectorMask(NULL), smartFilterMask(NULL) {}
01607 #endif // __cplusplus
01609 } ReadLayerDesc;
01610
01611
01612
01613
01616
01617 #define dtImageDocument 0
01618 #define dtImageScrap 1
01619 // @}
01620
01621
01622
01623
01624
01625
01626
01628 #define kCurrentMinVersReadImageDocDesc 0
01630 #define kCurrentMaxVersReadImageDocDesc 4
01639 typedef struct ReadImageDocumentDesc
01640 {
01641
01642 int32 minVersion;
01643 int32 maxVersion;
01645
01646
01647
01648
01649 int32 imageMode;
01650 int32 depth;
01651 VRect bounds;
01653 Fixed hResolution;
01654 Fixed vResolution;
01656 LookUpTable redLUT;
01657 LookUpTable greenLUT;
01658 LookUpTable blueLUT;
01661 ReadChannelDesc *targetCompositeChannels;
01663 ReadChannelDesc *targetTransparency;
01665 ReadChannelDesc *targetLayerMask;
01667 ReadChannelDesc *mergedCompositeChannels;
01671 ReadChannelDesc *mergedTransparency;
01673 ReadChannelDesc *alphaChannels;
01675 ReadChannelDesc *selection;
01677
01678
01679
01680
01682
01683 struct SPPlatformFileSpecification_t *fileSpec;
01685
01687
01688 ReadLayerDesc *layersDescriptor;
01690 int32 documentType;
01692 struct ReadImageDocumentDesc *next;
01694
01695
01696
01697
01698
01700
01701 void * iCCprofileData;
01703 int32 iCCprofileSize;
01705 int32 compositeChannelCount;
01707 int32 layerCount;
01710 int32 alphaChannelCount;
01712
01713
01714
01715
01716
01717
01718 ReadChannelDesc *targetSmartFilterMask;
01719
01720
01721 #ifdef __cplusplus
01722 ReadImageDocumentDesc()
01723 : minVersion(0), maxVersion(0), imageMode(0), depth(0),
01724 hResolution(0), vResolution(0),
01725 targetCompositeChannels(NULL), targetTransparency(NULL), targetLayerMask(NULL),
01726 mergedCompositeChannels(NULL), mergedTransparency(NULL), alphaChannels(NULL),
01727 selection(NULL), fileSpec(NULL), layersDescriptor(NULL), documentType(0),
01728 next(NULL), iCCprofileData(NULL), iCCprofileSize(0), compositeChannelCount(0),
01729 layerCount(0), alphaChannelCount(0), targetSmartFilterMask(NULL)
01730 {
01731 }
01732 #endif // __cplusplus
01733
01734 } ReadImageDocumentDesc;
01736
01737
01738
01739 #ifdef __cplusplus
01740
01741 extern "C"
01742 {
01743 #endif
01744
01745
01747
01748
01766 typedef MACPASCAL Boolean (*TestAbortProc) (void);
01767
01768
01779 typedef MACPASCAL void (*ProgressProc) (int32 done, int32 total);
01780
01781
01793 typedef MACPASCAL void (*HostProc) (int16 selector, intptr_t *data);
01794
01795
01803 typedef MACPASCAL int32 (*SpaceProc) (void);
01804
01805
01814 typedef MACPASCAL void (*ProcessEventProc) (void *event);
01815
01816
01838 typedef MACPASCAL OSErr (*DisplayPixelsProc) (const PSPixelMap *source,
01839 const VRect *srcRect,
01840 int32 dstRow,
01841 int32 dstCol,
01842 void *platformContext);
01843
01844
01874 typedef MACPASCAL OSErr (*AdvanceStateProc) (void);
01875
01876
01895 typedef MACPASCAL OSErr (*ColorServicesProc) (ColorServicesInfo *info);
01900
01901
01903
01904
01974 typedef MACPASCAL Handle (*NewPIHandleProc) (int32 size);
01975
01980 typedef MACPASCAL void (*DisposePIHandleProc) (Handle h);
01981
01986 typedef MACPASCAL void (*DisposeRegularHandlePIHandleProc) (Handle h);
01987
01993 typedef MACPASCAL int32 (*GetPIHandleSizeProc) (Handle h);
01994
02001 typedef MACPASCAL OSErr (*SetPIHandleSizeProc) (Handle h, int32 newSize);
02002
02010 typedef MACPASCAL Ptr (*LockPIHandleProc) (Handle h, Boolean moveHigh);
02011
02018 typedef MACPASCAL void (*UnlockPIHandleProc) (Handle h);
02019
02031 typedef MACPASCAL void (*RecoverSpaceProc) (int32 size);
02032
02036
02037
02039
02040
02097 typedef MACPASCAL OSErr (*AllocateBufferProc) (int32 size, BufferID *bufferID);
02098
02107 typedef MACPASCAL Ptr (*LockBufferProc) (BufferID bufferID, Boolean moveHigh);
02108
02115 typedef MACPASCAL void (*UnlockBufferProc) (BufferID bufferID);
02116
02122 typedef MACPASCAL void (*FreeBufferProc) (BufferID bufferID);
02123
02128 typedef MACPASCAL int32 (*BufferSpaceProc) (void);
02129
02134
02135
02136
02177 typedef MACPASCAL int16 (*CountPIResourcesProc) (ResType type);
02178
02186 typedef MACPASCAL Handle (*GetPIResourceProc) (ResType type, int16 index);
02187
02194 typedef MACPASCAL void (*DeletePIResourceProc) (ResType type, int16 index);
02195
02203 typedef MACPASCAL OSErr (*AddPIResourceProc) (ResType type, Handle data);
02208
02209
02211
02212
02271 typedef MACPASCAL OSErr (*GetPropertyProc) (PIType signature,
02272 PIType key,
02273 int32 index,
02274 intptr_t *simpleProperty,
02275 Handle *complexProperty);
02276
02284 typedef MACPASCAL OSErr (*SetPropertyProc) (PIType signature,
02285 PIType key,
02286 int32 index,
02287 intptr_t simpleProperty,
02288 Handle complexProperty);
02289
02294
02295
02297
02298
02392 typedef MACPASCAL OSErr (*PIResampleProc) (PSImagePlane *source,
02393 PSImagePlane *destination,
02394 Rect *area,
02395 Fixed *coords,
02396 int16 method);
02397
02398 typedef MACPASCAL OSErr (*PIResampleMultiProc) (PSImageMultiPlane *source,
02399 PSImageMultiPlane *destination,
02400 Rect *area,
02401 Fixed *coords,
02402 int16 method);
02403
02404 typedef MACPASCAL OSErr (*PIResampleMulti32Proc) (PSImageMultiPlane32 *source,
02405 PSImageMultiPlane32 *destination,
02406 VRect *area,
02407 int64 *coords,
02408 int16 method);
02409
02414
02415
02417
02418
02440 typedef MACPASCAL OSErr (*ReadPixelsProc) (ChannelReadPort port,
02441 const PSScaling *scaling,
02442 const VRect *writeRect,
02443
02444 const PixelMemoryDesc *destination,
02445 VRect *wroteRect);
02446
02460 typedef MACPASCAL OSErr (*WriteBasePixelsProc) (ChannelWritePort port,
02461 const VRect *writeRect,
02462 const PixelMemoryDesc *source);
02463
02470 typedef MACPASCAL OSErr (*ReadPortForWritePortProc) (ChannelReadPort *readPort,
02471 ChannelWritePort writePort);
02472
02474 #ifdef __cplusplus
02475 }
02476 #endif
02477
02478
02479
02480
02481
02483 #define kCurrentBufferProcsVersion 2
02485
02486 #define kPIBufferSuite "Photoshop Buffer Suite for Plug-ins"
02488 #define kPIBufferSuiteVersion kCurrentBufferProcsVersion
02489
02490
02493 typedef struct BufferProcs
02494 {
02495
02496 int16 bufferProcsVersion;
02498 int16 numBufferProcs;
02500 AllocateBufferProc allocateProc;
02502 LockBufferProc lockProc;
02504 UnlockBufferProc unlockProc;
02506 FreeBufferProc freeProc;
02508 BufferSpaceProc spaceProc;
02510 } BufferProcs;
02511
02515 #define kCurrentBufferProcsCount \
02516 ((sizeof(BufferProcs) - offsetof(BufferProcs, allocateProc)) / sizeof(void *))
02517
02518
02519
02520
02521
02523 #define kCurrentResourceProcsVersion 3
02525
02526 #define kPIResourceSuite "Photoshop Resource Suite for Plug-ins"
02528 #define kPIResourceSuiteVersion kCurrentResourceProcsVersion
02529
02532 typedef struct ResourceProcs
02533 {
02534
02535 int16 resourceProcsVersion;
02537 int16 numResourceProcs;
02539 CountPIResourcesProc countProc;
02541 GetPIResourceProc getProc;
02543 DeletePIResourceProc deleteProc;
02545 AddPIResourceProc addProc;
02547 } ResourceProcs;
02548
02552 #define kCurrentResourceProcsCount \
02553 ((sizeof(ResourceProcs) - offsetof(ResourceProcs, countProc)) / sizeof(void *))
02554
02555
02556
02557 #define kDayStarColorMatchingResource 'DCSR'
02558 #define kPhotoDeluxeResource 'PHUT'
02559
02560
02561
02562
02563
02565 #define kCurrentHandleProcsVersion 1
02567
02568 #define kPIHandleSuite "Photoshop Handle Suite for Plug-ins"
02570 #define kPIHandleSuiteVersion kCurrentHandleProcsVersion
02571
02573
02574 typedef struct HandleProcs
02575 {
02576
02577 int16 handleProcsVersion;
02579 int16 numHandleProcs;
02581 NewPIHandleProc newProc;
02583 DisposePIHandleProc disposeProc;
02585 GetPIHandleSizeProc getSizeProc;
02587 SetPIHandleSizeProc setSizeProc;
02589 LockPIHandleProc lockProc;
02591 UnlockPIHandleProc unlockProc;
02593 RecoverSpaceProc recoverSpaceProc;
02595 DisposeRegularHandlePIHandleProc disposeRegularHandleProc;
02597 } HandleProcs;
02598
02602 #define kCurrentHandleProcsCount \
02603 ((sizeof(HandleProcs) - offsetof(HandleProcs, newProc)) / sizeof(void *))
02604
02605
02606
02607
02608
02610 #define kCurrentImageServicesProcsVersion 1
02612
02613 #define kPIImageServicesSuite "Photoshop Image Services Suite for Plug-ins"
02615 #define kPIImageServicesSuiteVersion kCurrentImageServicesProcsVersion
02616
02619 typedef struct ImageServicesProcs
02620 {
02621
02622 int16 imageServicesProcsVersion;
02623 int16 numImageServicesProcs;
02625 PIResampleProc interpolate1DProc;
02626 PIResampleProc interpolate2DProc;
02628 PIResampleMultiProc interpolate1DMultiProc;
02629 PIResampleMultiProc interpolate2DMultiProc;
02631 PIResampleMulti32Proc interpolate1DMulti32Proc;
02632 PIResampleMulti32Proc interpolate2DMulti32Proc;
02634 } ImageServicesProcs;
02635
02639 #define kCurrentImageServicesProcsCount \
02640 ((sizeof(ImageServicesProcs) - offsetof(ImageServicesProcs, interpolate1DProc)) / sizeof(void *))
02641
02642
02643
02644
02645
02647 #define kCurrentPropertyProcsVersion 1
02650
02651 #define kPIPropertySuite "Photoshop Property Suite for Plug-ins"
02652
02653
02654 #define kPIPropertySuiteVersion kCurrentPropertyProcsVersion
02655
02658 typedef struct PropertyProcs
02659 {
02660
02661 int16 propertyProcsVersion;
02662 int16 numPropertyProcs;
02664 GetPropertyProc getPropertyProc;
02665 SetPropertyProc setPropertyProc;
02667 } PropertyProcs;
02668
02671 #define kCurrentPropertyProcsCount \
02672 ((sizeof(PropertyProcs) - offsetof(PropertyProcs, getPropertyProc)) / sizeof(void *))
02673
02674
02675
02676
02677
02679 #define kCurrentChannelPortProcsVersion 1
02682
02683 #define kPIChannelPortSuite "Photoshop Channel Ports Suite for Plug-ins"
02684
02685
02686 #define kPIChannelPortSuiteVersion kCurrentChannelPortProcsVersion
02687
02690 typedef struct ChannelPortProcs
02691 {
02692
02693 int16 channelPortProcsVersion;
02694 int16 numChannelPortProcs;
02696 ReadPixelsProc readPixelsProc;
02697 WriteBasePixelsProc writeBasePixelsProc;
02698 ReadPortForWritePortProc readPortForWritePortProc;
02700 } ChannelPortProcs;
02701
02704 #define kCurrentChannelPortProcsCount \
02705 ((sizeof(ChannelPortProcs) - offsetof(ChannelPortProcs, readPixelsProc)) / sizeof(void *))
02706
02707
02708
02709
02710
02735
02736 #define kPSMatrixMathSuite "9cfaa249-e6f1-11d2-b8eb-0060b0c1f95d"
02737 #define kPSMatrixMathSuiteVersion 1
02740 typedef struct PSMatrixMathProcs
02741 {
02742
02743
02750
02751 SPAPI Boolean (*Inverse) (PIAffineMatrix *m,
02752 PIAffineMatrix *result);
02753
02760 SPAPI Boolean (*Equals) (const PIAffineMatrix *m1,
02761 const PIAffineMatrix *m2);
02762
02768
02769 SPAPI void (*ScalarMultiply) (const double scalar,
02770 PIAffineMatrix *m,
02771 PIAffineMatrix *result);
02772
02779
02780 SPAPI void (*MatrixMultiply) (const PIAffineMatrix *m1,
02781 PIAffineMatrix *m2,
02782 PIAffineMatrix *result);
02783
02790
02791 SPAPI void (*PointMultiply) (PIFloatPoint *p,
02792 const PIAffineMatrix *m,
02793 PIFloatPoint *result);
02794
02795
02796
02797 SPAPI void (*PointsMultiply) (PIFloatPoint *p,
02798 int32 count,
02799 const PIAffineMatrix *m,
02800 PIFloatPoint *result);
02801
02802 } PSMatrixMathProcs;
02803
02806
02807
02808
02809
02810
02811
02812
02813
02814
02815
02816
02817
02818
02821
02822 #define plugInWantsEdgeReplication -1
02823 #define plugInDoesNotWantPadding -2
02824 #define plugInWantsErrorOnBoundsException -3
02826
02827
02828
02829
02830
02832
02833 #define hostDoesNotSupportSampling 0
02834 #define hostSupportsIntegralSampling 1
02835 #define hostSupportsFractionalSampling 2
02837
02838
02839
02840
02841
02842
02843
02846
02847 #define piLayoutTraditional 0
02848 #define piLayoutRowsColumnsPlanes 1
02849 #define piLayoutRowsPlanesColumns 2
02850 #define piLayoutColumnsRowsPlanes 3
02851 #define piLayoutColumnsPlanesRows 4
02852 #define piLayoutPlanesRowsColumns 5
02853 #define piLayoutPlanesColumnsRows 6
02854
02855
02856
02857
02858
02862 typedef struct PIInterfaceColor
02863 {
02864 RGBtuple color32;
02865 RGBtuple color2;
02867 } PIInterfaceColor;
02868
02869
02872
02873 #define kPIInterfaceButtonUpFill 1
02874 #define kPIInterfaceBevelShadow 2
02875 #define kPIInterfaceIconFillActive 3
02876 #define kPIInterfaceIconFillDimmed 4
02877 #define kPIInterfacePaletteFill 5
02878 #define kPIInterfaceIconFrameDimmed 6
02879 #define kPIInterfaceIconFrameActive 7
02880 #define kPIInterfaceBevelHighlight 8
02881 #define kPIInterfaceButtonDownFill 9
02882 #define kPIInterfaceIconFillSelected 10
02883 #define kPIInterfaceBorder 11
02884 #define kPIInterfaceButtonDarkShadow 12
02885 #define kPIInterfaceIconFrameSelected 13
02886 #define kPIInterfaceRed 14
02887
02888
02889
02890
02892
02893
02894 #define kPSPhotoshopCaller "PS Photoshop"
02898 #define kPSDoIt "Do It"
02904
02905
02906
02907
02908
02910
02916 #define PIPersistentProperty 0x70727374L
02917
02919
02925 #define PIReentrantProperty 0x7265656EL
02926
02927
02928
02929
02930
02931
02932 #define kPIAnnotMajorVersion 0x0002
02933 #define kPIAnnotMinorVersion 0x0001
02934
02935
02936 #define PIAnnotTextPopup 'txtA'
02937 #define PIAnnotSound 'sndA'
02938 #define PIAnnotTextContent 'txtC'
02939 #define PIAnnotSoundFile 'sndF'
02940 #define PIAnnotSoundMem 'sndM'
02941 #define PIFilterFlate 'fltD'
02942 #define PIFilterLZW 'lzwD'
02943 #define PIFilterNone 'none'
02944 #define PIFilterUndef ' '
02945
02946 #define PIMaxSize32Property 'ms32'
02947 #define PIMinSize32Property 'mn32'
02948
02949
02950
02951
02952
02959
02960
02967 #define PIStackRendererProperty 'sRnd'
02968
02969
02970
02971
02972
02974
02982 #define PIEditInPluginProperty 'ediP'
02983
02985
02994 #define PIPluginLaunchesEditorProperty 'piLe'
02995
02996
02997
02998
02999
03000 #if defined(__BORLANDC__)
03001 #pragma option -a.
03002 #endif
03003
03004
03005
03006 #endif // __PIGeneral_h__