Name
XtGetSelectionValues — obtain selection data in multiple formats.
Synopsis
void XtGetSelectionValues(w, selection, targets, count, callback, client_data, time)
Widget w;
Atom selection;
Atom ∗targets;
int count;
XtSelectionCallbackProc callback;
XtPointer client_data;
Time time;
Arguments
wSpecifies the widget that is making the request.
selectionSpecifies the particular selection desired either XA_PRIMARY or XA_SECONDARY.
targetsSpecifies the types to which the sender should convert the selection.
countSpecifies the length of the targets and client_data lists.
callbackSpecifies the callback procedure to be called with each selection value obtained. Note that this is how the selection values are communicated back to the client.
client_data
Specifies the client data (one for each target type) that is passed to the callback procedure when it is called for that target.
timeSpecifies the timestamp that indicates when the selection value is desired. This should be the timestamp of the event that triggered this request; the value CurrentTime is not acceptable.
Description
XtGetSelectionValues is similar to XtGetSelectionValue except that it takes a list of target types and a list of client data and obtains the current value of the selection converted to each of the targets. The effect is as if each target were specified in a separate call to XtGetSelectionValue. The callback is called once with the corresponding client data for each target. XtGetSelectionValues guarantees that all the conversions will use the same selection value because the ownership of the selection cannot change in the middle of the list, as could happen when calling XtGetSelectionValue repeatedly.
To determine the actual target types that the selection owner will be willing to return, intern the string TARGETS, and send the corresponding Atom as target.
Chapter 10, Interclient Communications, in Volume Four, X Toolkit Intrinsics Programming Manual, presents a complete example widget that both sends and receives data using selection.
See Also
XtGetSelectionValue(1), XtGetSelectionValueIncremental(1), XtOwnSelection(1),
XtSelectionCallbackProc(2).