|
Adobe Photoshop SDK |
|
PIFilter.hGo to the documentation of this file.00001 // ADOBE SYSTEMS INCORPORATED 00002 // Copyright 1993 - 2005 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 //------------------------------------------------------------------- 00031 #ifndef __PIFilter__ 00032 #define __PIFilter__ 00033 00034 #if PRAGMA_ONCE 00035 #pragma once 00036 #endif 00037 00038 #include "PIActions.h" 00039 #include "PIGeneral.h" 00040 00041 #include "SPBasic.h" 00042 00043 /* Operation selectors */ 00044 00045 00046 00048 00049 00059 #define filterSelectorAbout 0 00060 00068 #define filterSelectorParameters 1 00069 00086 #define filterSelectorPrepare 2 00087 00100 #define filterSelectorStart 3 00101 00115 #define filterSelectorContinue 4 00116 00125 #define filterSelectorFinish 5 00126 // end ingroup 00130 00132 00133 /********************************************************************************/ 00134 00142 00143 00144 00147 #define filterCaseUnsupported -1 00148 #define filterCaseFlatImageNoSelection 1 00149 #define filterCaseFlatImageWithSelection 2 00150 #define filterCaseFloatingSelection 3 00151 #define filterCaseEditableTransparencyNoSelection 4 00156 #define filterCaseEditableTransparencyWithSelection 5 00161 #define filterCaseProtectedTransparencyNoSelection 6 00166 #define filterCaseProtectedTransparencyWithSelection 7 00171 /* @} */ 00172 00173 /********************************************************************************/ 00174 00182 00183 00184 00187 #define filterDataHandlingCantFilter 0 00189 #define filterDataHandlingNone 1 00191 #define filterDataHandlingBlackMat 2 00194 #define filterDataHandlingGrayMat 3 00197 #define filterDataHandlingWhiteMat 4 00201 /* The following modes are only useful for input. */ 00202 00203 #define filterDataHandlingDefringe 5 00206 #define filterDataHandlingBlackZap 6 00208 #define filterDataHandlingGrayZap 7 00210 #define filterDataHandlingWhiteZap 8 00213 /* The following mode is only useful for output. */ 00214 00215 #define filterDataHandlingFillMask 9 00222 /* More modes for input... */ 00223 00224 #define filterDataHandlingBackgroundZap 10 00226 #define filterDataHandlingForegroundZap 11 00229 /* @} */ 00230 00231 /********************************************************************************/ 00232 00233 /* For FilterCaseInfo (defined below) used with PIFilterCaseInfoProperty */ 00234 00235 /* Here are the bits in flag1. */ 00236 00238 00239 00253 #define PIFilterDontCopyToDestinationBit 0 00254 00264 #define PIFilterWorksWithBlankDataBit 1 00265 00279 #define PIFilterFiltersLayerMaskBit 2 00280 00288 #define PIFilterWritesOutsideSelectionBit 3 00289 /* @} */ 00291 00292 /********************************************************************************/ 00293 00295 00313 #define PIFilterCaseInfoProperty 0x66696369L 00314 00315 00316 /********************************************************************************/ 00317 00318 /* Error return values. The plug-in module may also return standard Macintosh 00319 operating system error codes, or report its own errors, in which case it 00320 can return any positive integer. */ 00322 00323 00326 #define filterBadParameters -30100 00327 #define filterBadMode -30101 00328 /* @} */ 00329 00330 00331 #ifndef RC_INVOKED 00332 00333 /********************************************************************************/ 00334 /* Pragma to byte align structures; only for Borland C */ 00335 #if defined(__BORLANDC__) 00336 #pragma option -a- 00337 #endif 00338 /********************************************************************************/ 00339 /* Packing for Microsoft compiler */ 00340 #if WIN32 00341 #pragma pack(push,1) 00342 #endif 00343 00344 /********************************************************************************/ 00345 00346 #if PRAGMA_STRUCT_ALIGN 00347 #pragma options align=mac68k 00348 #endif 00349 00350 /********************************************************************************/ 00351 00353 typedef struct FilterCaseInfo 00354 { 00355 char inputHandling; 00356 char outputHandling; 00357 char flags1; 00359 char flags2; 00360 } 00361 FilterCaseInfo; 00362 00363 #if WIN32 00364 #pragma pack(pop) 00365 #endif 00366 00367 /*********************************************************************************/ 00368 /* turn off the byte align pragma back to its original state; only for Borland C */ 00369 #if defined(__BORLANDC__) 00370 #pragma option -a. 00371 #endif 00372 /*********************************************************************************/ 00373 00375 typedef unsigned char FilterColor [4]; 00376 00377 #if WIN32 00378 #pragma pack(push,4) 00379 #endif 00380 00381 00382 /********************************************************************************/ 00383 00384 00391 typedef struct BigDocumentStruct 00392 { 00393 00394 int32 PluginUsing32BitCoordinates; 00397 VPoint imageSize32; 00400 VRect filterRect32; 00403 VRect inRect32; 00406 VRect outRect32; 00409 VRect maskRect32; 00412 VPoint floatCoord32; 00415 VPoint wholeSize32; 00418 } BigDocumentStruct; 00419 00420 /********************************************************************************/ 00421 00428 typedef struct FilterRecord 00429 { 00430 00431 int32 serialNumber; 00437 TestAbortProc abortProc; 00439 ProgressProc progressProc; 00441 Handle parameters; 00448 Point imageSize; 00451 int16 planes; 00459 Rect filterRect; 00467 RGBColor background; 00468 RGBColor foreground; 00469 int32 maxSpace; 00473 int32 bufferSpace; 00481 Rect inRect; 00489 int16 inLoPlane; 00491 int16 inHiPlane; 00493 Rect outRect; 00500 int16 outLoPlane; 00502 int16 outHiPlane; 00505 void * inData; 00508 int32 inRowBytes; 00510 void * outData; 00513 int32 outRowBytes; 00516 Boolean isFloating; 00518 Boolean haveMask; 00520 Boolean autoMask; 00529 Rect maskRect; 00537 void * maskData; 00543 int32 maskRowBytes; 00545 FilterColor backColor; 00547 FilterColor foreColor; 00549 OSType hostSig; 00551 HostProc hostProc; 00553 int16 imageMode; 00557 Fixed imageHRes; 00559 Fixed imageVRes; 00561 Point floatCoord; 00564 Point wholeSize; 00567 PlugInMonitor monitor; 00569 void *platformData; 00571 BufferProcs *bufferProcs; 00574 ResourceProcs *resourceProcs; 00577 ProcessEventProc processEvent; 00579 DisplayPixelsProc displayPixels; 00581 HandleProcs *handleProcs; 00585 00586 00587 Boolean supportsDummyChannels; 00592 Boolean supportsAlternateLayouts; 00596 int16 wantLayout; 00600 int16 filterCase; 00605 int16 dummyPlaneValue; 00609 void * premiereHook; 00611 AdvanceStateProc advanceState; 00613 Boolean supportsAbsolute; 00619 Boolean wantsAbsolute; 00622 GetPropertyProc getPropertyObsolete; 00626 Boolean cannotUndo; 00631 Boolean supportsPadding; 00634 int16 inputPadding; 00643 int16 outputPadding; 00652 int16 maskPadding; 00661 char samplingSupport; 00667 char reservedByte; 00669 Fixed inputRate; 00679 Fixed maskRate; 00681 ColorServicesProc colorServices; 00683 /* Photoshop structures its data as follows for plug-ins when processing 00684 layer data: 00685 target layer channels 00686 transparency mask for target layer 00687 layer mask channels for target layer 00688 inverted layer mask channels for target layer 00689 non-layer channels 00690 When processing non-layer data (including running a filter on the 00691 layer mask alone), Photoshop structures the data as consisting only 00692 of non-layer channels. It indicates this structure through a series 00693 of short counts. The transparency count must be either 0 or 1. */ 00694 00695 int16 inLayerPlanes; 00718 int16 inTransparencyMask; 00721 int16 inLayerMasks; 00724 int16 inInvertedLayerMasks; 00729 int16 inNonLayerPlanes; 00732 int16 outLayerPlanes; 00735 int16 outTransparencyMask; 00738 int16 outLayerMasks; 00741 int16 outInvertedLayerMasks; 00744 int16 outNonLayerPlanes; 00748 int16 absLayerPlanes; 00753 int16 absTransparencyMask; 00758 int16 absLayerMasks; 00763 int16 absInvertedLayerMasks; 00768 int16 absNonLayerPlanes; 00774 /* We allow for extra planes in the input and the output. These planes 00775 will be filled with dummyPlaneValue at those times when we build the 00776 buffers. These features will only be available if supportsDummyPlanes 00777 is TRUE. */ 00778 00779 int16 inPreDummyPlanes; 00783 int16 inPostDummyPlanes; 00788 int16 outPreDummyPlanes; 00791 int16 outPostDummyPlanes; 00795 /* If the plug-in makes use of the layout options, then the following 00796 fields should be obeyed for identifying the steps between components. 00797 The last component in the list will always have a step of one. */ 00798 00799 int32 inColumnBytes; 00803 int32 inPlaneBytes; 00807 int32 outColumnBytes; 00808 int32 outPlaneBytes; 00810 00811 00812 ImageServicesProcs *imageServicesProcs; 00815 PropertyProcs *propertyProcs; 00820 int16 inTileHeight; 00822 int16 inTileWidth; 00824 Point inTileOrigin; 00826 int16 absTileHeight; 00828 int16 absTileWidth; 00830 Point absTileOrigin; 00832 int16 outTileHeight; 00834 int16 outTileWidth; 00836 Point outTileOrigin; 00838 int16 maskTileHeight; 00840 int16 maskTileWidth; 00842 Point maskTileOrigin; 00844 00845 00846 PIDescriptorParameters *descriptorParameters; 00847 Str255 *errorString; 00852 ChannelPortProcs *channelPortProcs; 00855 ReadImageDocumentDesc *documentInfo; 00858 00859 00860 SPBasicSuite *sSPBasic; 00861 void *plugInRef; 00863 int32 depth; 00865 00866 00867 Handle iCCprofileData; 00873 int32 iCCprofileSize; 00875 int32 canUseICCProfiles; 00881 00882 00883 int32 hasImageScrap; 00893 00894 00895 BigDocumentStruct *bigDocumentData; 00900 00901 00902 PIDescriptorParameters *input3DScene; 00904 PIDescriptorParameters *output3DScene; 00906 Boolean createNewLayer; 00909 00910 00911 char reserved [37]; 00913 00914 } 00915 FilterRecord, *FilterRecordPtr; 00916 00917 #if WIN32 00918 #pragma pack(pop) 00919 #endif 00920 00921 #if PRAGMA_STRUCT_ALIGN 00922 #pragma options align=reset 00923 #endif 00924 00925 /*********************************************************************************/ 00926 00927 // ifdef RC_INVOKED 00928 #endif 00929 00930 #endif // __PIFilter_h__ |