![]() |
PutScrapFlavor |
||||
Header: | Scrap.h | Carbon status: | Supported | |
Puts data on or promises data to the specified scrap.
OSStatus PutScrapFlavor ( ScrapRef scrap, ScrapFlavorType flavorType, ScrapFlavorFlags flavorFlags, Size flavorSize, const void *flavorData );
A reference to the scrap to supply data or promises to.
The flavor type to supply or promise the data for. Some flavor types are described in
A variable of type ScrapFlavorFlags that you use to supply information about the flavor specified by flavorType.
If you are supplying flavor data, specify the size in bytes. If you don't know the size, pass -1. If you are not passing any data, but merely promising it, pass a value of 0. In that case, the Scrap Manager ignores the flavorData parameter.
A pointer to a buffer, local variable, or other storage location, created and disposed of by your application. Before calling PutScrapFlavor to put flavor data for the scrap, store the data in this buffer. For information on the number of bytes of data, see the flavorSize parameter.
Pass NULL for this parameter to indicate you will provide data through a subsequent call to PutScrapFlavor, either later in the same code flow or during execution of your ScrapPromiseKeeperProcPtr callback.
The last time you can provide scrap flavor data is when your scrap promise-keeper function gets called. It is not possible to call PutScrapFlavor while handling a suspend event; suspend events under Carbon simply don't work the way they do under Mac OS 8 and 9.
A result code.
PutScrapFlavor is different than PutScrap in that it includes a ScrapRef parameter and it supports promising a flavor for later delivery, rather than supplying it immediately.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)