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 #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
00050
00051
00053 #define kPhotoshopSignature 0x3842494d
00054
00055
00056
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
00087
00092 #define errHostVersionIncompatible -30905
00093
00094
00095
00096
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
00121
00122
00124
00125
00126 #define errWrongPlatformFilePath -30916
00128 #define errIllegalCharInID -30917
00130 #define errMissingParameter -1715
00133 //-------------------------------------------------------------------------------
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143 #ifndef kGeneralPiPLPropertiesDefined
00144 #define kGeneralPiPLPropertiesDefined
00167 typedef uint32 PIType;
00169 //-------------------------------------------------------------------------------
00170
00171
00172
00174 #define kCurrentPiPLVersion 0
00175
00176
00221
00222
00235 #define PIKindProperty 0x6b696e64L
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245 #define PIPowerPCCodeProperty 0x70777063L
00246
00247
00248
00249 #define PIPowerPCCarbonCodeProperty 'ppcb'
00250
00252
00257 #define PIPowerPCMachOCodeProperty 'mach'
00258
00259
00260 #define PICodeMacIntel32Property 'mi32'
00261
00262
00263 #define PICodeMacIntel64Property 'mi64'
00264
00266
00271 #define PICodeFragmentProperty 'frag'
00272
00274
00279 #define PICarbonCodeFragmentProperty 'frgc'
00280
00281
00282 #define PIWin64X86CodeProperty 0x38363634L
00283
00284
00285 #define PIWin32X86CodeProperty 0x77783836L
00286
00287
00288 #define PIWin16X86CodeProperty 0x66783836L
00289
00290
00291
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
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
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
00433
00434 typedef struct PIMacIntelCodeDesc
00435 {
00436
00437
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
00486
00487
00488
00489
00490
00491
00493
00508 #define PIVersionProperty 0x76657273L
00509
00511
00520 #define PIPriorityProperty 0x70727479L
00521
00523
00528 #define PIComponentProperty 0x636d7074L
00529
00531
00543 #define PIImageModesProperty 0x6d6f6465L
00544
00546
00557 #define PIEnableInfoProperty 0x656e626cL
00558
00560
00565 #define PIWantsScrapProperty 0x776E7363L
00566
00568
00574 #define PICocoaProperty 0x636F636FL
00575
00577
00582 #define PIFileBrowserAwareProperty 0x66626177L
00583
00585
00590 #define PINoAboutBoxProperty 0x6E61626FL
00591
00593
00598 #define PILegacyFilterGalleryMenuItemProperty 0x6C46476DL
00599
00601
00607 #define PIFilterLayerSupport 0x666c6c79L
00608
00610
00617 #define PIRequiredHostProperty 0x686f7374L
00618
00620
00628 #define PICategoryProperty 0x63617467L
00629
00631
00639 #define PIZCategoryProperty 0x7A636174L
00640
00642
00650 #define PINameProperty 0x6e616d65L
00651
00653
00661 #define PIZNameProperty 0x7A6E616DL
00662
00664
00673 #define PIProgressTextProperty 0x70726f67
00674
00676
00685 #define PIZProgressTextProperty 0x7A70726F
00686
00688
00700 #define PIPickerIDProperty 0x706e6d65L
00701
00703
00708 #define PI68KFPUCodeProperty 0x36386670L
00709
00711
00714 #define PIUnixSPARCV7CodeProperty 0x75737037
00715
00717
00720 #define PIUnixSPARCV8CodeProperty 0x75737038
00721
00723
00726 #define PIUnixSPARCV9CodeProperty 0x75737039
00727
00729
00731 #define PIUnixSPARCCodeProperty PIUnixSPARCV7CodeProperty
00732
00734
00737 #define PIUnixMIPSR3000CodeProperty 0x756d7233
00738
00740
00743 #define PIUnixMIPSR4000CodeProperty 0x756d7234
00744
00746
00749 #define PIUnixMIPSR400064BitCodeProperty 0x756d3477
00750
00752
00755 #define PIUnixMIPSR8000CodeProperty 0x756d7238
00756
00758
00760 #define PIUnixMIPSCodeProperty PIUnixMIPSR3000CodeProperty
00761
00763
00767 #define PILoadUnloadProperty 0x70694c55
00768
00770
00774 #define PIPreferencesProperty 0x70695046
00775
00776
00777 #define PIFeatureEnabledProperty 0x6665656e
00778
00779
00780 #define PIPositionDependentProperty 0x706f7364
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
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
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
00890
00891
00892
00893
00894
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
00926
00927
00931 typedef struct PIBlendMode
00932 {
00933 PIType signature;
00934 PIType key;
00935 } PIBlendMode;
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945 #define PSmovableDBoxProc (128*16+5)
00946
00947
00948
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
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
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
01018
01019 #define kStandardAlphaOverlay 0
01020 #define kInvertedAlphaOverlay 1
01022
01023
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
01057
01059
01060 PSPixelMask *mat;
01067 PSPixelMask *masks;
01073
01074 int32 maskPhaseRow;
01075 int32 maskPhaseCol;
01077
01078
01079
01081
01082
01083 PSPixelOverlay *pixelOverlays;
01084 unsigned32 colorManagementOptions;
01087 } PSPixelMap;
01088
01104 typedef struct PSPlatformContext
01105 {
01106 void *fCGContextRef;
01107 VRect fScreenRect;
01108 } PSPlatformContext;
01109
01110
01111
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
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
01287
01288 #define PIFilteryLayersSupported 0
01289
01290
01291
01292
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
01374 typedef struct _PIChannelPortDesc *PIChannelPort;
01375
01376
01378 typedef PIChannelPort ChannelReadPort;
01380 typedef PIChannelPort ChannelWritePort;
01382
01383
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
01416
01417
01419 #define kCurrentMinVersWriteChannelDesc 0
01421 #define kCurrentMaxVersWriteChannelDesc 1
01426 typedef struct WriteChannelDesc
01427 {
01428
01429 int32 minVersion;
01430 int32 maxVersion;
01432
01433
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
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
01474
01476 #define kCurrentMinVersReadChannelDesc 0
01478 #define kCurrentMaxVersReadChannelDesc 5
01483 typedef struct ReadChannelDesc
01484 {
01485
01486 int32 minVersion;
01487 int32 maxVersion;
01489
01490
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
01516
01518
01519 PIChannelPort writePort;
01523
01524
01525
01527
01528 unsigned32 alphaID;
01531
01533
01534 const uint16 *unicodeName;
01536
01537
01538
01539
01540
01542
01543 Boolean isEnabled;
01546
01547
01548
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
01568
01569
01570
01571
01573 #define kCurrentMinVersReadLayerDesc 0
01575 #define kCurrentMaxVersReadLayerDesc 3
01579 typedef struct ReadLayerDesc
01580 {
01581
01582 int32 minVersion;
01583 int32 maxVersion;
01585
01586
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
01604
01605
01607
01608 const uint16 *unicodeName;
01610
01611
01612
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
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
01656
01659
01660 #define dtImageDocument 0
01661 #define dtImageScrap 1
01662 // @}
01663
01664
01665
01666
01667
01668
01669
01671 #define kCurrentMinVersReadImageDocDesc 0
01673 #define kCurrentMaxVersReadImageDocDesc 5
01682 typedef struct ReadImageDocumentDesc
01683 {
01684
01685 int32 minVersion;
01686 int32 maxVersion;
01688
01689
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
01721
01722
01723
01725
01726 struct SPPlatformFileSpecification_t *fileSpec;
01728
01730
01731 ReadLayerDesc *layersDescriptor;
01733 int32 documentType;
01735 struct ReadImageDocumentDesc *next;
01737
01738
01739
01740
01741
01743
01744 void * iCCprofileData;
01746 int32 iCCprofileSize;
01748 int32 compositeChannelCount;
01750 int32 layerCount;
01753 int32 alphaChannelCount;
01755
01756
01757
01758
01759
01760
01761 ReadChannelDesc *targetSmartFilterMask;
01762
01763
01764
01765
01766
01767
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
01788
01789 #ifdef __cplusplus
01790
01791 extern "C"
01792 {
01793 #endif
01794
01795
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
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
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);
02279
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
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,
02479 int16 method);
02480
02485
02486
02488
02489
02511 typedef MACPASCAL OSErr (*ReadPixelsProc) (ChannelReadPort port,
02512 const PSScaling *scaling,
02513 const VRect *writeRect,
02514
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
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
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
02632
02633 #define kDayStarColorMatchingResource 'DCSR'
02634 #define kPhotoDeluxeResource 'PHUT'
02635
02636
02637
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
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
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
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
02785
02786
02811
02812 #define kPSMatrixMathSuite "9cfaa249-e6f1-11d2-b8eb-0060b0c1f95d"
02813 #define kPSMatrixMathSuiteVersion 1
02816 typedef struct PSMatrixMathProcs
02817 {
02818
02819
02826
02827 SPAPI Boolean (*Inverse) (PIAffineMatrix *m,
02828 PIAffineMatrix *result);
02829
02836 SPAPI Boolean (*Equals) (const PIAffineMatrix *m1,
02837 const PIAffineMatrix *m2);
02838
02844
02845 SPAPI void (*ScalarMultiply) (const real64 scalar,
02846 PIAffineMatrix *m,
02847 PIAffineMatrix *result);
02848
02855
02856 SPAPI void (*MatrixMultiply) (const PIAffineMatrix *m1,
02857 PIAffineMatrix *m2,
02858 PIAffineMatrix *result);
02859
02866
02867 SPAPI void (*PointMultiply) (PIFloatPoint *p,
02868 const PIAffineMatrix *m,
02869 PIFloatPoint *result);
02870
02871
02872
02873 SPAPI void (*PointsMultiply) (PIFloatPoint *p,
02874 int32 count,
02875 const PIAffineMatrix *m,
02876 PIFloatPoint *result);
02877
02878 } PSMatrixMathProcs;
02879
02882
02883
02884
02885
02886
02887
02888
02889
02890
02891
02892
02893
02894
02897
02898 #define plugInWantsEdgeReplication -1
02899 #define plugInDoesNotWantPadding -2
02900 #define plugInWantsErrorOnBoundsException -3
02902
02903
02904
02905
02906
02908
02909 #define hostDoesNotSupportSampling 0
02910 #define hostSupportsIntegralSampling 1
02911 #define hostSupportsFractionalSampling 2
02913
02914
02915
02916
02917
02918
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
02934
02938 typedef struct PIInterfaceColor
02939 {
02940 RGBtuple color32;
02941 RGBtuple color2;
02943 } PIInterfaceColor;
02944
02945
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
02966
02968
02969
02970 #define kPSPhotoshopCaller "PS Photoshop"
02974 #define kPSDoIt "Do It"
02980
02981
02982
02983
02984
02986
02992 #define PIPersistentProperty 0x70727374L
02993
02995
03001 #define PIReentrantProperty 0x7265656EL
03002
03003
03004
03005
03006
03007
03008 #define kPIAnnotMajorVersion 0x0002
03009 #define kPIAnnotMinorVersion 0x0001
03010
03011
03012 #define PIAnnotTextPopup 'txtA'
03013 #define PIAnnotSound 'sndA'
03014 #define PIAnnotTextContent 'txtC'
03015 #define PIAnnotSoundFile 'sndF'
03016 #define PIAnnotSoundMem 'sndM'
03017 #define PIFilterFlate 'fltD'
03018 #define PIFilterLZW 'lzwD'
03019 #define PIFilterNone 'none'
03020 #define PIFilterUndef ' '
03021
03022 #define PIMaxSize32Property 'ms32'
03023 #define PIMinSize32Property 'mn32'
03024
03025
03026
03027
03028
03035
03036
03043 #define PIStackRendererProperty 'sRnd'
03044
03045
03046
03047
03048
03050
03058 #define PIEditInPluginProperty 'ediP'
03059
03061
03070 #define PIPluginLaunchesEditorProperty 'piLe'
03071
03072
03073
03074
03075
03076 #if defined(__BORLANDC__)
03077 #pragma option -a.
03078 #endif
03079
03080
03081
03082 #endif // __PIGeneral_h__