NAME
XConvertSelection − request conversion of the selection.
Synopsis
XConvertSelection(display, selection, target, property,
requestor, time)
Display *display;
Atom selection, target;
Atom property;
Window requestor;
Time time;
Arguments
displaySpecifies a connection to an X server; returned from XOpenDisplay().
selectionSpecifies the selection atom. XA_PRIMARY and XA_SECONDARY are the standard selection atoms.
targetSpecifies the atom describing the desired format for the data.
propertySpecifies the property in which the requested data is to be placed. None is also valid, but current conventions specify that the requestor is in a better position to select a property than the selection owner.
requestorSpecifies the requesting window.
timeSpecifies the time when the conversion should take place. Pass the timestamp from the event that triggered the selection request.
Description
XConvertSelection() causes a SelectionRequest event to be sent to the current selection owner if there is one. This event specifies the selection property (selection), the format into which to convert that data before storing it (target), the property in which the owner will place the information (property), the window that wants the information (requestor), and the time of the conversion request (time). The selection owner responds by sending a SelectionNotify event, which confirms the selected atom and type. If no owner for the specified selection exists, or if the owner could not convert to the type specified by requestor, the X server generates or the owner sends a SelectionNotify event to the requestor with property None. Whether or not the owner exists, the arguments are passed unchanged. See Volume One, Chapter 10, Interclient Communication, for a description of selection events and selection conventions.
Errors
BadAtom
BadWindow
See Also
XGetSelectionOwner(), XSetSelectionOwner().
Copyright O’Reilly & Assoc. —