File: XmClipboardStartCopy.3

package info (click to toggle)
motif 2.3.4-13
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 81,160 kB
  • ctags: 51,769
  • sloc: ansic: 596,938; cpp: 3,951; yacc: 2,854; makefile: 2,070; csh: 1,199; sh: 1,070; lex: 455
file content (178 lines) | stat: -rw-r--r-- 6,416 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
'\" 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