00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00062 #ifndef __PIChannelPortsSuite__
00063 #define __PIChannelPortsSuite__
00064
00065 #if PRAGMA_ONCE
00066 #pragma once
00067 #endif
00068
00069 #include "PIGeneral.h"
00070
00071 #ifdef __cplusplus
00072 extern "C" {
00073 #endif
00074
00075
00076
00078 #define kPSChannelPortsSuite "Photoshop ChannelPorts Suite for Plug-ins"
00079
00080
00081
00082 #define kPSChannelPortsSuiteVersion2 2
00083 #define kPSChannelPortsSuiteVersion3 3
00085
00086
00090 typedef struct PSChannelPortsSuite1
00091 {
00098 SPAPI SPErr (*CountLevels)
00099 (
00100 PIChannelPort port,
00101 int32 *count
00102 );
00103
00110 SPAPI SPErr (*GetDepth)
00111 (
00112 PIChannelPort port,
00113 int32 level,
00114 int32 *depth
00115 );
00116
00124 SPAPI SPErr (*GetDataBounds)
00125 (
00126 PIChannelPort port,
00127 int32 level,
00128 VRect *bounds
00129 );
00130
00137 SPAPI SPErr (*GetWriteLimit)
00138 (
00139 PIChannelPort port,
00140 int32 level,
00141 VRect *writeBounds
00142 );
00143
00152 SPAPI SPErr (*GetTilingGrid)
00153 (
00154 PIChannelPort port,
00155 int32 level,
00156 VPoint *tileOrigin,
00157 VPoint *tileSize
00158 );
00159
00169 SPAPI SPErr (*GetSupportRect)
00170 (
00171 PIChannelPort port,
00172 int32 level, const
00173 VRect *bounds,
00174 int32 *supportLevel,
00175 VRect *supportBounds
00176 );
00177
00186 SPAPI SPErr (*GetDependentRect)
00187 (
00188 PIChannelPort port,
00189 int32 sourceLevel,
00190 const VRect *sourceBounds,
00191 int32 dependentLevel,
00192 VRect *dependentBounds
00193 );
00194
00200 SPAPI SPErr (*CanRead)
00201 (
00202 PIChannelPort port,
00203 Boolean *canRead
00204 );
00205
00211 SPAPI SPErr (*CanWrite)
00212 (
00213 PIChannelPort port,
00214 Boolean *canWrite
00215 );
00216
00228 SPAPI SPErr (*ReadPixelsFromLevel)
00229 (
00230 PIChannelPort port,
00231 int32 level,
00232 VRect *bounds,
00233 const PixelMemoryDesc *destination
00234 );
00235
00247 SPAPI SPErr (*WritePixelsToBaseLevel)
00248 (
00249 PIChannelPort port,
00250 VRect *bounds,
00251 const PixelMemoryDesc *source
00252 );
00253
00265 SPAPI SPErr (*ReadScaledPixels)
00266 (
00267 PIChannelPort port,
00268 VRect *readRect,
00269 const PSScaling *scaling,
00270 const PixelMemoryDesc *destination
00271 );
00272
00286 SPAPI SPErr (*FindSourceForScaledRead)
00287 (
00288 PIChannelPort port,
00289 const VRect *readRect,
00290 const PSScaling *scaling,
00291 int32 dstDepth,
00292 int32 *sourceLevel,
00293 VRect *sourceRect,
00294 VRect *sourceScalingBounds
00295 );
00296
00304 SPAPI SPErr (*New)
00305 (
00306 PIChannelPort *port,
00307 const VRect *rect,
00308 int32 depth,
00309 Boolean globalScope
00310 );
00311
00317 SPAPI SPErr(* Dispose)
00318 (
00319 PIChannelPort *port
00320 );
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00341 SPAPI SPErr(*SupportsOperation)
00342 (
00343 const char *operation,
00344 Boolean *supported
00345 );
00346
00359 SPAPI SPErr(*ApplyOperation)
00360 (
00361 const char *operation,
00362 PIChannelPort sourcePort,
00363 PIChannelPort destinationPort,
00364 PIChannelPort maskPort,
00365 void *parameters,
00366 VRect *rect
00367 );
00368
00369
00370
00381 SPAPI SPErr(*AddOperation) (const char *operation,
00382 SPErr (*proc) (PIChannelPort, PIChannelPort, PIChannelPort,
00383 void *, VRect *, void *refCon),
00384 void *refCon);
00385
00392 SPAPI SPErr(*RemoveOperation) (const char *operation, void **refCon);
00393
00402 SPAPI SPErr (*NewCopyOnWrite) (PIChannelPort *result,
00403 PIChannelPort basePort,
00404 VRect *writeLimit,
00405 Boolean globalScope);
00406
00412 SPAPI SPErr (*Freeze) (PIChannelPort port);
00413
00419 SPAPI SPErr (*Restore) (PIChannelPort port, VRect *area);
00420
00421 } PSChannelPortsSuite1;
00422
00423
00424 #ifdef __cplusplus
00425 }
00426 #endif
00427
00429 #endif // PIChannelPortsSuite