Blob Blame History Raw
'\" t
...\" ClipbM.sgm /main/10 1996/09/25 10:25:05 cdedoc $
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl			\" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl			\" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie     \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie     !\\*(f4 \{\
.	ft \\*(f4
.	ds f4\"
'	br \}
.el .ie !\\*(f3 \{\
.	ft \\*(f3
.	ds f3\"
'	br \}
.el .ie !\\*(f2 \{\
.	ft \\*(f2
.	ds f2\"
'	br \}
.el .ie !\\*(f1 \{\
.	ft \\*(f1
.	ds f1\"
'	br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
.TH "XmClipboardStartCopy" "library call"
.SH "NAME"
\fBXmClipboardStartCopy\fP \(em A clipboard function that sets up a storage and data structure
.iX "XmClipboardStartCopy"
.iX "clipboard functions" "XmClipboardStartCopy"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/CutPaste\&.h>
int XmClipboardStartCopy (\fIdisplay, window, clip_label,
        timestamp, widget, callback, item_id\fP)
        Display \fI* display\fP;
        Window  \fIwindow\fP;
        XmString        \fIclip_label\fP;
        Time    \fItimestamp\fP;
        Widget  \fIwidget\fP;
        XmCutPasteProc  \fIcallback\fP;
        long    \fI* item_id\fP;
\fB\fR(\fBvoid\fR)
.fi
.SH "DESCRIPTION"
.PP
\fBXmClipboardStartCopy\fP
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\&.
.PP
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\&.
.PP
Instead, the application passes format and length information in
\fBXmClipboardCopy\fP to the clipboard functions, along with a widget
ID and a callback function address that is passed in
\fBXmClipboardStartCopy\fP\&. 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\&.
.PP
The callback functions are responsible for copying the actual data to
the clipboard through \fBXmClipboardCopyByName\fP\&. The callback
function is also called if the data item is removed from the clipboard
and the actual data is no longer needed\&.
.IP "\fIdisplay\fP" 10
Specifies a pointer to the \fBDisplay\fR structure that was returned in a
previous call to \fBXOpenDisplay\fP or \fBXtDisplay\fP\&.
.IP "\fIwindow\fP" 10
Specifies the window ID of a widget that relates the application window to the
clipboard\&. The widget\&'s window ID can be obtained through
\fBXtWindow\fP\&.
The same application instance should pass the same window ID to each of the
clipboard functions that it calls\&.
.IP "\fIclip_label\fP" 10
Specifies the label to be associated with the data item\&.
This argument
is used to identify the data item, as in a clipboard viewer\&.
An example of a label is the name of the application that places the
data in the clipboard\&.
.IP "\fItimestamp\fP" 10
Specifies the time of the event that triggered the copy\&.
A valid timestamp must be supplied; it is not sufficient to use
\fBCurrentTime\fP\&.
.IP "\fIwidget\fP" 10
Specifies the ID of the widget that receives messages requesting data
previously passed by name\&. This argument must be present in order to
pass data by name\&. Any valid widget ID in your application can be
used for this purpose and all the message handling is taken care of by
the cut and paste functions\&.
.IP "\fIcallback\fP" 10
Specifies the address of the callback function that is called when the
clipboard needs data that was originally passed by name\&. This is also
the callback to receive the \fIdelete\fP message for items that were
originally passed by name\&. This argument must be present in order to
pass data by name\&.
.IP "\fIitem_id\fP" 10
Specifies the number assigned to this data item\&.
The application uses this number in calls to
\fBXmClipboardCopy\fP, \fBXmClipboardEndCopy\fP, and
\fBXmClipboardCancelCopy\fP\&.
.PP
For more information on passing data by name, see
\fBXmClipboardCopy\fP(3) and \fBXmClipboardCopyByName\fP(3)\&.
.PP
The \fIwidget\fP and \fIcallback\fP arguments must be present in order to
pass data by name\&. The callback format is as follows:
.PP
.nf
void (*\fIcallback)\fP (\fIwidget, data_id, private, reason\fP)
        Widget  \fIwidget\fP;
        long    *\fIdata_id\fP;
        long    *\fIprivate\fP;
        int     *\fIreason\fP;
\fB\fR(\fBvoid\fR)
.fi
.IP "\fIwidget\fP" 10
Specifies the ID of the widget passed to this function\&.
.IP "\fIdata_id\fP" 10
Specifies the identifying number returned by
\fBXmClipboardCopy\fP, which identifies the pass-by-name data\&.
.IP "\fIprivate\fP" 10
Specifies the private information passed to
\fBXmClipboardCopy\fP\&.
.IP "\fIreason\fP" 10
Specifies the reason\&. \fBXmCR_CLIPBOARD_DATA_DELETE\fP
or \fBXmCR_CLIPBOARD_DATA_REQUEST\fP
are the possible values\&.
.SH "RETURN"
.IP "\fBXmClipboardSuccess\fP" 10
The function was successful\&.
.IP "\fBXmClipboardLocked\fP" 10
The function failed because the clipboard was locked by another
application\&. The application can continue to call the function again with
the same parameters until the lock goes away\&. This gives the application
the opportunity to ask if the user wants to keep trying or to give up
on the operation\&.
.SH "RELATED"
.PP
\fBXmClipboardCancelCopy\fP(3), \fBXmClipboardCopy\fP(3),
\fBXmClipboardCopyByName\fP(3),
\fBXmClipboardEndCopy\fP(3), \fBXmClipboardEndRetrieve\fP(3),
\fBXmClipboardInquireCount\fP(3), \fBXmClipboardInquireFormat\fP(3),
\fBXmClipboardInquireLength\fP(3), \fBXmClipboardInquirePendingItems\fP(3),
\fBXmClipboardLock\fP(3), \fBXmClipboardRegisterFormat\fP(3),
\fBXmClipboardRetrieve\fP(3),
\fBXmClipboardStartRetrieve\fP(3), \fBXmClipboardUndoCopy\fP(3),
\fBXmClipboardUnlock\fP(3), and \fBXmClipboardWithdrawFormat\fP(3)\&.
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:18