Up: GEOS SDK TechDocs | Up | Prev: ClipboardClearQuickTransferNotification() ... | Next: ClipboardSetQuickTransferFeedback() ...

ClipboardQueryItem()

void	ClipboardQueryItem(
        ClipboardItemFlags 			flags,
        ClipboardQueryArgs *			retValues);

This routine locks the transfer item for the caller's exclusive access and returns information about the current transfer item. You should call this routine when beginning any paste or clipboard query operation. For operations in which you will change the clipboard's contents, you should instead use the routine ClipboardRegisterItem() .

Pass the following values:

flags
A record of ClipboardItemFlags indicating the transfer item you want to query. Use CIF_QUICK to get information on the quick transfer item, and pass zero (or TIF_NORMAL) to get information on the normal transfer item.
retValues A pointer to an empty ClipboardQueryArgs structure into which return information about the transfer item will be passed. This structure is defined as follows:
typedef struct {
	word			CQA_numFormats;
	optr			CQA_owner;
	TransferBlockID			CQA_header;
} ClipboardQueryArgs;

The CQA_header field of ClipboardQueryArgs is used as a pass value to several other clipboard routines. It contains the VM file handle of the transfer VM file and the VM block handle of the transfer item's header block. The CQA_owner field is the optr of the object that originated the transfer item. The CQA_numFormats field specifies the total number of formats available for this transfer item. To see if a particular format is supported by the transfer item, call the routine ClipboardTestItemFormat() .

Be Sure To: You must call ClipboardDoneWithItem() when you are done accessing the transfer item. This routine relinquishes your exclusive access to the transfer VM file.

Include: clipbrd.goh

See Also: ClipboardRequestItemFormat(), ClipboardDoneWithItem().

ClipboardRegisterItem()

Boolean	ClipboardRegisterItem(
        TransferBlockID header,
        ClipboardItemFlags flags);

This routine completes a change to the transfer item. You should use this routine whenever copying or cutting something into the clipboard or whenever attaching something as the quick-transfer item.

This routine puts the item specified by header into the transfer VM file. It frees any transfer item that may already be in the file. Pass this routine the following:

header
Header information for the item, consisting of the transfer VM file handle and the VM block handle of the block containing the new transfer item. Create the TransferBlockID structure using the macro BlockIDFromFileAndBlock() .
flags
A record of ClipboardItemFlags indicating whether you're registering a clipboard item or a quick-transfer item. The flag CIF_QUICK indicates the item is a quick-transfer item; zero (or TIF_NORMAL) indicates the item is a normal clipboard item.

Include: clipbrd.goh

See Also: ClipboardRequestItemFormat().

ClipboardRemoveFromNotificationList()

Boolean	ClipboardRemoveFromNotificationList(
        optr	notificationOD);

This routine removes an object or Process from the clipboard's change notification list. It is typically called when the object or Process is being detached or destroyed. Pass it the same optr that was added to the notification list with ClipboardAddToNotificationList ().

This routine returns an error flag: The flag will be true if the object could not be found in the notification list, false if the object was successfully removed from the list.

Include: clipbrd.goh

See Also: ClipboardAddToNotificationList().

ClipboardRequestItemFormat()

void	ClipboardRequestItemFormat(
        ClipboardItemFormatID 			format,
        TransferBlockID 			header,
        ClipboardRequestArgs *			retValue);

This routine returns specific information about a particular transfer item. Because some of the passed information must be retrieved with ClipboardQueryItem() , you must call ClipboardQueryItem() before calling this routine.

Pass this routine the following:

format
The manufacturer ID and format type of the new transfer item being put into the transfer VM file. Create the ClipboardItemFormatID value with the macro FormatIDFromManufacturerAndType() .
header
Header information for the item, consisting of the transfer VM file handle and the VM block handle of the block containing the new transfer item. Create the TransferBlockID structure using the macro BlockIDFromFileAndBlock() using returned information from ClipboardQueryItem() .
retValue A pointer to an empty ClipboardRequestArgs structure that will be filled by the routine. This structure is defined as follows:
typedef struct {
	VMFileHandle		CRA_file;
	VMChain		CRA_data;
	word		CRA_extra1;
	word		CRA_extra2;
} ClipboardRequestArgs;

Upon return, the CRA_file field will contain the transfer VM file's VM file handle and the CRA_data field will contain the VM block handle of the transfer item's header block. If there is no transfer item, CRA_data will be zero.

Include: clipbrd.goh

See Also: ClipboardRegisterItem(), ClipboardQueryItem().


Up: GEOS SDK TechDocs | Up | Prev: ClipboardClearQuickTransferNotification() ... | Next: ClipboardSetQuickTransferFeedback() ...