![]() |
Adobe Photoshop SDK |
|
Handle Suite Callbacks (deprecated Standard Suite) The standard Handle Suite is deprecated, please use the Handle Suite Callbacks defined with the Adobe Plug-in Component Architecture (PICA). More...
Detailed DescriptionThe standard Handle Suite is deprecated, please use the Handle Suite Callbacks defined with the Adobe Plug-in Component Architecture (PICA). The following suite of routines is used primarily for cross-platform support. Although you can allocate handles directly using the Mac OS Toolbox, these callbacks are recommended, instead. When you use these callbacks, Photoshop accounts for these handles in its virtual memory space calculations. In general, the Buffer suite routines are more effective for memory allocation than the Handle suite. The Buffer suite may have access to memory unavailable to the Handle suite. You should use the Handle suite, however, if the data you are managing is a Mac OS handle. The standard Handle 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: // The structure to hold the data, we'll create a handle for this. typedef struct Data { FilterColor color; FilterColor colorArray[4]; Boolean queryForParameters; BufferID dissolveBufferID; Ptr dissolveBuffer; VRect proxyRect; real32 scaleFactor; BufferID proxyBufferID; Ptr proxyBuffer; int32 proxyWidth; int32 proxyHeight; int32 proxyPlaneSize; } Data; 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 one of the Handle Suite routines void CreateDataHandle(void) { // Get the Handle Suite, and call the // newProc routine to allocate the memory for the handle. Handle h = gFilterRecord->handleProcs->newProc(sizeof(Data)); ... } Define Documentation
The current version of the handle suite.
Current number of routines in the Handle Suite. Typedef Documentation
Allocates a handle of the indicated size.
Disposes of the indicated handle.
Disposes of the indicated handle.
Gets the size of the indicated handle.
Attempts to resize the indicated handle.
Locks and dereferences the handle.
Unlocks the handle. Unlike the routines for buffers, the lock and unlock calls for handles are not reference counted. A single unlock call unlocks the handle no matter how many times it has been locked.
Recovers space from disposed handles not disposed of by invoking the DisposePIHandleProc callback. All handles allocated through the Handle suite have their space accounted for in estimates by Photoshop of how much image data it can make resident at one time.
The set of routines available in the Handle suite. |