XmClipboardStartCopy(3) | Library Functions Manual | XmClipboardStartCopy(3) |
XmClipboardStartCopy — A clipboard function that sets up a storage and data structure "XmClipboardStartCopy" "clipboard functions" "XmClipboardStartCopy"
#include <Xm/CutPaste.h> int XmClipboardStartCopy (display, window, clip_label,
timestamp, widget, callback, item_id)
Display * display;
Window window;
XmString clip_label;
Time timestamp;
Widget widget;
XmCutPasteProc callback;
long * item_id; (void)
XmClipboardStartCopy sets up storage and data structures to receive clipboard data. An application calls this function during a cut or copy operation. The data item that these structures receive then becomes the next data item in the clipboard.
Copying a large piece of data to the clipboard can take a long time. It is possible that, once the data is copied, no application will ever request that data. The Motif Toolkit provides a mechanism so that an application does not need to actually pass data to the clipboard until the data has been requested by some application.
Instead, the application passes format and length information in XmClipboardCopy to the clipboard functions, along with a widget ID and a callback function address that is passed in XmClipboardStartCopy. The widget ID is necessary for communications between the clipboard functions in the application that owns the data and the clipboard functions in the application that requests the data.
The callback functions are responsible for copying the actual data to the clipboard through XmClipboardCopyByName. The callback function is also called if the data item is removed from the clipboard and the actual data is no longer needed.
For more information on passing data by name, see XmClipboardCopy(3) and XmClipboardCopyByName(3).
The widget and callback arguments must be present in order to pass data by name. The callback format is as follows:
void (*callback) (widget, data_id, private, reason)
Widget widget;
long *data_id;
long *private;
int *reason; (void)
XmClipboardCancelCopy(3), XmClipboardCopy(3), XmClipboardCopyByName(3), XmClipboardEndCopy(3), XmClipboardEndRetrieve(3), XmClipboardInquireCount(3), XmClipboardInquireFormat(3), XmClipboardInquireLength(3), XmClipboardInquirePendingItems(3), XmClipboardLock(3), XmClipboardRegisterFormat(3), XmClipboardRetrieve(3), XmClipboardStartRetrieve(3), XmClipboardUndoCopy(3), XmClipboardUnlock(3), and XmClipboardWithdrawFormat(3).