XmClipboardStartCopy - A clipboard function that sets up a storage and data structure
#include <Xm/Xm.h>
#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;
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 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 needed 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 via XmClipboardCopyByName. The callback function is also called if the data item is removed from the clipboard, and the actual data is therefore no longer needed.
For more information on passing data by name, see XmClipboardCopy(3X) and XmClipboardCopyByName(3X).
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;
     int     *data_id;
     int     *private;
     int     *reason;
     
XmClipboardCancelCopy(3X), XmClipboardCopy(3X), XmClipboardCopyByName(3X), XmClipboardEndCopy(3X), XmClipboardEndRetrieve(3X), XmClipboardInquireCount(3X), XmClipboardInquireFormat(3X), XmClipboardInquireLength(3X), XmClipboardInquirePendingItems(3X), XmClipboardLock(3X), XmClipboardRegisterFormat(3X), XmClipboardRetrieve(3X), XmClipboardStartRetrieve(3X), XmClipboardUndoCopy(3X), XmClipboardUnlock(3X), and XmClipboardWithdrawFormat(3X).