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
00334
00335
00342 SPAPI SPErr(*SupportsOperation)
00343 (
00344 const char *operation,
00345 Boolean *supported
00346 );
00347
00360 SPAPI SPErr(*ApplyOperation)
00361 (
00362 const char *operation,
00363 PIChannelPort sourcePort,
00364 PIChannelPort destinationPort,
00365 PIChannelPort maskPort,
00366 void *parameters,
00367 VRect *rect
00368 );
00369
00370
00371
00382 SPAPI SPErr(*AddOperation) (const char *operation,
00383 SPErr (*proc) (PIChannelPort, PIChannelPort, PIChannelPort,
00384 void *, VRect *, void *refCon),
00385 void *refCon);
00386
00393 SPAPI SPErr(*RemoveOperation) (const char *operation, void **refCon);
00394
00403 SPAPI SPErr (*NewCopyOnWrite) (PIChannelPort *result,
00404 PIChannelPort basePort,
00405 VRect *writeLimit,
00406 Boolean globalScope);
00407
00413 SPAPI SPErr (*Freeze) (PIChannelPort port);
00414
00420 SPAPI SPErr (*Restore) (PIChannelPort port, VRect *area);
00422
00423 } PSChannelPortsSuite1;
00424
00425
00426 #ifdef __cplusplus
00427 }
00428 #endif
00429
00431 #endif // PIChannelPortsSuite