PIBufferSuite.h
Go 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 //-------------------------------------------------------------------
00054 #ifndef __PIBufferSuite__
00055 #define __PIBufferSuite__
00056 
00057 #if PRAGMA_ONCE
00058 #pragma once
00059 #endif
00060 
00061 #include "SPTypes.h"
00062 
00063 #ifdef __cplusplus
00064 extern "C" {
00065 #endif
00066 
00067 /******************************************************************************/
00068 
00070 #define kPSBufferSuite          "Photoshop Buffer Suite for Plug-ins"
00071 
00072 //-------------------------------------------------------------------------
00073 //  Buffer suite typedefs 
00074 //-------------------------------------------------------------------------
00075 
00090 typedef SPAPI Ptr (*BufferNewProc) (unsigned32 *pRequestedSize, /* IN/OUT: Actual size returned here. */
00091                               unsigned32 minimumSize);  
00092                                             
00093     
00108 typedef SPAPI Ptr (*BufferNewProc64) (unsigned64 *pRequestedSize,   /* IN/OUT: Actual size returned here. */
00109                               unsigned64 minimumSize);  
00110                                             
00111     
00117 typedef SPAPI void (*BufferDisposeProc) (Ptr *ppBuffer);    
00118                                           
00125 typedef SPAPI unsigned32 (*BufferGetSizeProc) (Ptr pBuffer);
00126 
00127     
00134 typedef SPAPI unsigned64 (*BufferGetSizeProc64) (Ptr pBuffer);
00135 
00136     
00141 typedef SPAPI unsigned32 (*BufferGetSpaceProc) (void);
00142     
00143 
00148 typedef SPAPI unsigned64 (*BufferGetSpaceProc64) (void);
00149 
00150 
00151 //-------------------------------------------------------------------------
00152 //  Buffer suite version 1 
00153 //-------------------------------------------------------------------------
00154 
00156 #define kPSBufferSuiteVersion1      1
00157 
00159 typedef struct 
00160 {
00161     BufferNewProc       New;        
00162     BufferDisposeProc   Dispose;    
00163     BufferGetSizeProc   GetSize;    
00164     BufferGetSpaceProc  GetSpace;   
00166 } PSBufferSuite1;
00167 
00168 
00170 #define kPSBufferSuiteVersion2      2
00171 
00173 #define kPSBufferSuiteVersion       kPSBufferSuiteVersion2
00174 
00176 typedef struct 
00177 {
00178     BufferNewProc           New;        
00179     BufferDisposeProc       Dispose;    
00180     BufferGetSizeProc       GetSize;    
00181     BufferGetSpaceProc      GetSpace;   
00182     BufferNewProc64         New64;      
00183     BufferGetSizeProc64     GetSize64;  
00184     BufferGetSpaceProc64    GetSpace64; 
00186 } PSBufferSuite2;
00187 
00188 /******************************************************************************/
00189 
00190 #ifdef __cplusplus
00191 }
00192 #endif
00193 
00194 
00195 #endif  // PIBufferSuite
00196