![]() |
Adobe Photoshop SDK |
|
Buffer Suite Callbacks (deprecated Standard Suite) The standard Buffer Suite is deprecated, please use the Buffer Suite Callbacks defined with the Adobe Plug-in Component Architecture (PICA). More...
Detailed DescriptionThe standard Buffer Suite is deprecated, please use the Buffer Suite Callbacks defined with the Adobe Plug-in Component Architecture (PICA). The Buffer suite provides an alternative to the memory management functions available in previous versions of the Photoshop plug-in specification. It provides a set of routines to request that the host allocate and dispose of memory out of a pool which it manages. The standard Buffer Suite is found as a pointer in the parameter blocks of the plug-in modules. You can access the routines within the Buffer Suite in the following manner: FilterRecord *gFilterRecord = NULL; DLLExport MACPASCAL void PluginMain(const int16 selector, FilterRecordPtr filterRecord, intptr_t* data, int16* result) { // The parameter block that contains the suite is found in filterRecord. gFilterRecord = filterRecord; ... } // This function uses two of the Buffer Suite routines void CreateDissolveBuffer(const int32 width, const int32 height) { // Get the Buffer Suite from the parameter block BufferProcs *bufferProcs = gFilterRecord->bufferProcs; // Call the allocateProc routine from the Buffer Suite to allocate // the space needed for the buffer (gdata->dissolveBufferID) bufferProcs->allocateProc(width * height, &gData->dissolveBufferID); // Call the lockProc routine to lock the memory gData->dissolveBuffer = bufferProcs->lockProc(gData->dissolveBufferID, true); } Typedef Documentation
Sets
Sets
Returns a pointer to the beginning of the buffer.
Has no effect.
Releases the storage associated with a buffer. Using
Returns the amount of space available for buffers. This space may be fragmented, so an attempt to allocate all of the space as a single buffer may fail.
Returns the amount of space available for buffers. This space may be fragmented, so an attempt to allocate all of the space as a single buffer may fail.
Attempts to insure that the requested amount of space is available as a single contiguous block in the address space. The very first allocation of any kind after calling this routine can cut the available contiguous space by an arbitrary amount, and it's hard to guarantee that nothing else does any allocations until you do. THIS IS A NOP WHEN CALLED IN THE 64 BIT VERSION because there's always contiguous address space available |