|
Adobe Photoshop SDK |
|
Buffer Suite Callbacks (DEPRECATED Standard Suite)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: FilterRecordPtr 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 = (FilterRecordPtr)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); }
Define Documentation
Current version of the Buffer Suite.
Current number of routines in the Buffer Suite.
Typedef Documentation
Sets
Locks the buffer to a particular memory location and returns a pointer to the beginning of the buffer.
Unlocks a buffer. Buffer locking uses a reference counting scheme; a buffer may be locked multiple times, and only with the final balancing unlock call does it actually unlock.
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.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||