1XmTransferValue(library call) XmTransferValue(library call)
2
3
4
6 XmTransferValue — A toolkit function that transfers data to a destina‐
7 tion
8
10 #include <Xm/Xm.h>
11
12 void XmTransferValue(
13 XtPointer transfer_id,
14 Atom target,
15 XtCallbackProc proc,
16 XtPointer client_data,
17 Time time);
18
20 XmTransferValue converts a selection, transferring any data from the
21 selection owner, in the context of an already-initiated data transfer
22 operation. An application can call this routine from an XmNdestina‐
23 tionCallback procedure or any function called as a result.
24
25 The caller of XmTransferValue supplies the target to which the selec‐
26 tion is converted. The caller also supplies a callback procedure to
27 handle the data that results from the conversion.
28
29 transfer_id
30 Specifies a unique indentifier for the data transfer opera‐
31 tion. The value must be the same as the value of the trans‐
32 fer_id member of the XmDestinationCallbackStruct passed to
33 the XmNdestinationCallback procedure.
34
35 target Specifies the target to which the selection is to be con‐
36 verted.
37
38 proc Specifies a callback procedure to be invoked when the selec‐
39 tion has been converted and the data, if any, is available.
40 This procedure is responsible for inserting or otherwise han‐
41 dling any data transferred. The procedure can also terminate
42 the data transfer by calling XmTransferDone. The proc
43 receives three arguments:
44
45 · The widget that requested the conversion
46
47 · The value of the client_data argument
48
49 · A pointer to an XmSelectionCallbackStruct
50
51 This procedure can be called before or after XmTransferValue
52 returns.
53
54 client_data
55 Specifies data to be passed to the callback procedure (the
56 value of the proc argument) when the selection has been con‐
57 verted.
58
59 time Specifies the time of the XEvent that triggered the data
60 transfer. You should typically set this field to XtLast‐
61 TimestampProcessed.
62
63 The callback procedure (the value of the proc argument) receives a
64 pointer to an XmSelectionCallbackStruct, which has the following defi‐
65 nition:
66
67 typedef struct
68 {
69 int reason;
70 XEvent *event;
71 Atom selection;
72 Atom target;
73 Atom type;
74 XtPointer transfer_id;
75 int flags;
76 int remaining;
77 XtPointer value;
78 unsigned long length;
79 int format;
80 } XmSelectionCallbackStruct;
81
82 reason Indicates why the callback was invoked.
83
84 event Points to the XEvent that triggered the callback. It can be
85 NULL.
86
87 selection Specifies the selection that has been converted.
88
89 target Specifies the target to which XmTransferValue requested con‐
90 version. The value is the same as the value of the target
91 argument to XmTransferValue.
92
93 type Specifies the type of the selection value. This is not the
94 target, but the type used to represent the target. The value
95 XT_CONVERT_FAIL means that the selection owner did not
96 respond to the conversion request within the Intrinsics
97 selection timeout interval.
98
99 transfer_id
100 Specifies a unique indentifier for the data transfer opera‐
101 tion. The value is the same as the value of the transfer_id
102 argument to XmTransferValue.
103
104 flags This member is currently unused. The value is always XmSE‐
105 LECTION_DEFAULT.
106
107 remaining Indicates the number of transfers remaining for the operation
108 specified by transfer_id.
109
110 value Represents the data transferred by this request. The appli‐
111 cation is responsible for freeing the value by calling
112 XtFree.
113
114 length Indicates the number of elements of data in value, where each
115 element has the size symbolized by format. If value is NULL,
116 length is 0.
117
118 format Indicates whether the data in value should be viewed as a
119 list of char, short, or long quantities. Possible values are
120 8 (for a list of char), 16 (for a list of short), or 32 (for
121 a list of long).
122
124 XmTransferSetParameters(3), XmTransferSendRequest(3), and XmTransfer‐
125 StartRequest(3).
126
127
128
129 XmTransferValue(library call)