Blame doc/man/man3/XmClipboardStartCopy.3

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