![]() |
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 #include "PSGraphicTypes.h" 00041 00042 #include "SPBasic.h" 00043 00044 /* Operation selectors */ 00045 00046 00047 00049 00050 00060 #define filterSelectorAbout 0 00061 00069 #define filterSelectorParameters 1 00070 00087 #define filterSelectorPrepare 2 00088 00101 #define filterSelectorStart 3 00102 00116 #define filterSelectorContinue 4 00117 00126 #define filterSelectorFinish 5 00127 // end ingroup 00131 00133 00134 /********************************************************************************/ 00135 00143 00144 00145 00148 #define filterCaseUnsupported -1 00149 #define filterCaseFlatImageNoSelection 1 00150 #define filterCaseFlatImageWithSelection 2 00151 #define filterCaseFloatingSelection 3 00152 #define filterCaseEditableTransparencyNoSelection 4 00157 #define filterCaseEditableTransparencyWithSelection 5 00162 #define filterCaseProtectedTransparencyNoSelection 6 00167 #define filterCaseProtectedTransparencyWithSelection 7 00172 /* @} */ 00173 00174 /********************************************************************************/ 00175 00183 00184 00185 00188 #define filterDataHandlingCantFilter 0 00190 #define filterDataHandlingNone 1 00192 #define filterDataHandlingBlackMat 2 00195 #define filterDataHandlingGrayMat 3 00198 #define filterDataHandlingWhiteMat 4 00202 /* The following modes are only useful for input. */ 00203 00204 #define filterDataHandlingDefringe 5 00207 #define filterDataHandlingBlackZap 6 00209 #define filterDataHandlingGrayZap 7 00211 #define filterDataHandlingWhiteZap 8 00214 /* The following mode is only useful for output. */ 00215 00216 #define filterDataHandlingFillMask 9 00223 /* More modes for input... */ 00224 00225 #define filterDataHandlingBackgroundZap 10 00227 #define filterDataHandlingForegroundZap 11 00230 /* @} */ 00231 00232 /********************************************************************************/ 00233 00234 /* For FilterCaseInfo (defined below) used with PIFilterCaseInfoProperty */ 00235 00236 /* Here are the bits in flag1. */ 00237 00239 00240 00254 #define PIFilterDontCopyToDestinationBit 0 00255 00265 #define PIFilterWorksWithBlankDataBit 1 00266 00280 #define PIFilterFiltersLayerMaskBit 2 00281 00289 #define PIFilterWritesOutsideSelectionBit 3 00290 /* @} */ 00292 00293 /********************************************************************************/ 00294 00296 00314 #define PIFilterCaseInfoProperty 0x66696369L 00315 00316 00317 /********************************************************************************/ 00318 00319 /* Error return values. The plug-in module may also return standard Macintosh 00320 operating system error codes, or report its own errors, in which case it 00321 can return any positive integer. */ 00323 00324 00327 #define filterBadParameters -30100 00328 #define filterBadMode -30101 00329 /* @} */ 00330 00331 00332 #ifndef RC_INVOKED 00333 00334 /********************************************************************************/ 00335 /* Pragma to byte align structures; only for Borland C */ 00336 #if defined(__BORLANDC__) 00337 #pragma option -a- 00338 #endif 00339 /********************************************************************************/ 00340 /* Packing for Microsoft compiler */ 00341 #if WIN32 00342 #pragma pack(push,1) 00343 #endif 00344 00345 /********************************************************************************/ 00346 00347 #if PRAGMA_STRUCT_ALIGN 00348 #pragma options align=mac68k 00349 #endif 00350 00351 /********************************************************************************/ 00352 00354 typedef struct FilterCaseInfo 00355 { 00356 char inputHandling; 00357 char outputHandling; 00358 char flags1; 00360 char flags2; 00361 } 00362 FilterCaseInfo; 00363 00364 #if WIN32 00365 #pragma pack(pop) 00366 #endif 00367 00368 /*********************************************************************************/ 00369 /* turn off the byte align pragma back to its original state; only for Borland C */ 00370 #if defined(__BORLANDC__) 00371 #pragma option -a. 00372 #endif 00373 /*********************************************************************************/ 00374 00376 typedef unsigned char FilterColor [4]; 00377 00378 #if WIN32 00379 #pragma pack(push,4) 00380 #endif 00381 00382 00383 /********************************************************************************/ 00384 00385 00392 typedef struct BigDocumentStruct 00393 { 00394 00395 int32 PluginUsing32BitCoordinates; 00398 VPoint imageSize32; 00401 VRect filterRect32; 00404 VRect inRect32; 00407 VRect outRect32; 00410 VRect maskRect32; 00413 VPoint floatCoord32; 00416 VPoint wholeSize32; 00419 } BigDocumentStruct; 00420 00421 /********************************************************************************/ 00422 00429 typedef struct FilterRecord 00430 { 00431 00432 int32 serialNumber; 00438 TestAbortProc abortProc; 00440 ProgressProc progressProc; 00442 Handle parameters; 00449 Point imageSize; 00452 int16 planes; 00460 Rect filterRect; 00468 PSRGBColor background; 00469 PSRGBColor foreground; 00470 int32 maxSpace; 00474 int32 bufferSpace; 00482 Rect inRect; 00490 int16 inLoPlane; 00492 int16 inHiPlane; 00494 Rect outRect; 00501 int16 outLoPlane; 00503 int16 outHiPlane; 00506 void * inData; 00509 int32 inRowBytes; 00511 void * outData; 00514 int32 outRowBytes; 00517 Boolean isFloating; 00519 Boolean haveMask; 00521 Boolean autoMask; 00530 Rect maskRect; 00538 void * maskData; 00544 int32 maskRowBytes; 00546 FilterColor backColor; 00548 FilterColor foreColor; 00550 OSType hostSig; 00552 HostProc hostProc; 00554 int16 imageMode; 00558 Fixed imageHRes; 00560 Fixed imageVRes; 00562 Point floatCoord; 00565 Point wholeSize; 00568 PlugInMonitor monitor; 00570 void *platformData; 00572 BufferProcs *bufferProcs; 00575 ResourceProcs *resourceProcs; 00578 ProcessEventProc processEvent; 00580 DisplayPixelsProc displayPixels; 00582 HandleProcs *handleProcs; 00586 00587 00588 Boolean supportsDummyChannels; 00593 Boolean supportsAlternateLayouts; 00597 int16 wantLayout; 00601 int16 filterCase; 00606 int16 dummyPlaneValue; 00610 void * premiereHook; 00612 AdvanceStateProc advanceState; 00614 Boolean supportsAbsolute; 00620 Boolean wantsAbsolute; 00623 GetPropertyProc getPropertyObsolete; 00627 Boolean cannotUndo; 00632 Boolean supportsPadding; 00635 int16 inputPadding; 00644 int16 outputPadding; 00653 int16 maskPadding; 00662 char samplingSupport; 00668 char reservedByte; 00670 Fixed inputRate; 00680 Fixed maskRate; 00682 ColorServicesProc colorServices; 00684 /* Photoshop structures its data as follows for plug-ins when processing 00685 layer data: 00686 target layer channels 00687 transparency mask for target layer 00688 layer mask channels for target layer 00689 inverted layer mask channels for target layer 00690 non-layer channels 00691 When processing non-layer data (including running a filter on the 00692 layer mask alone), Photoshop structures the data as consisting only 00693 of non-layer channels. It indicates this structure through a series 00694 of short counts. The transparency count must be either 0 or 1. */ 00695 00696 int16 inLayerPlanes; 00719 int16 inTransparencyMask; 00722 int16 inLayerMasks; 00725 int16 inInvertedLayerMasks; 00730 int16 inNonLayerPlanes; 00733 int16 outLayerPlanes; 00736 int16 outTransparencyMask; 00739 int16 outLayerMasks; 00742 int16 outInvertedLayerMasks; 00745 int16 outNonLayerPlanes; 00749 int16 absLayerPlanes; 00754 int16 absTransparencyMask; 00759 int16 absLayerMasks; 00764 int16 absInvertedLayerMasks; 00769 int16 absNonLayerPlanes; 00775 /* We allow for extra planes in the input and the output. These planes 00776 will be filled with dummyPlaneValue at those times when we build the 00777 buffers. These features will only be available if supportsDummyPlanes 00778 is TRUE. */ 00779 00780 int16 inPreDummyPlanes; 00784 int16 inPostDummyPlanes; 00789 int16 outPreDummyPlanes; 00792 int16 outPostDummyPlanes; 00796 /* If the plug-in makes use of the layout options, then the following 00797 fields should be obeyed for identifying the steps between components. 00798 The last component in the list will always have a step of one. */ 00799 00800 int32 inColumnBytes; 00804 int32 inPlaneBytes; 00808 int32 outColumnBytes; 00809 int32 outPlaneBytes; 00811 00812 00813 ImageServicesProcs *imageServicesProcs; 00816 PropertyProcs *propertyProcs; 00821 int16 inTileHeight; 00823 int16 inTileWidth; 00825 Point inTileOrigin; 00827 int16 absTileHeight; 00829 int16 absTileWidth; 00831 Point absTileOrigin; 00833 int16 outTileHeight; 00835 int16 outTileWidth; 00837 Point outTileOrigin; 00839 int16 maskTileHeight; 00841 int16 maskTileWidth; 00843 Point maskTileOrigin; 00845 00846 00847 PIDescriptorParameters *descriptorParameters; 00848 Str255 *errorString; 00853 ChannelPortProcs *channelPortProcs; 00856 ReadImageDocumentDesc *documentInfo; 00859 00860 00861 SPBasicSuite *sSPBasic; 00862 void *plugInRef; 00864 int32 depth; 00866 00867 00868 Handle iCCprofileData; 00874 int32 iCCprofileSize; 00876 int32 canUseICCProfiles; 00882 00883 00884 int32 hasImageScrap; 00894 00895 00896 BigDocumentStruct *bigDocumentData; 00901 00902 00903 PIDescriptorParameters *input3DScene; 00905 PIDescriptorParameters *output3DScene; 00907 Boolean createNewLayer; 00910 00911 00912 Handle iCCWorkingProfileData; 00919 int32 iCCWorkingProfileSize; 00922 00923 00924 char reserved [29]; 00926 00927 } 00928 FilterRecord, *FilterRecordPtr; 00929 00930 #if WIN32 00931 #pragma pack(pop) 00932 #endif 00933 00934 #if PRAGMA_STRUCT_ALIGN 00935 #pragma options align=reset 00936 #endif 00937 00938 /*********************************************************************************/ 00939 00940 // ifdef RC_INVOKED 00941 #endif 00942 00943 #endif // __PIFilter_h__ |