XmePrimarySource — A toolkit function that takes ownership of the primary selection
#include <Xm/TransferP.h>
Boolean XmePrimarySource
(widget, time);XmePrimarySource takes ownership of the primary selection.
This routine establishes a function that is called when the widget is asked to convert the primary selection. That function makes the following sequence of calls:
Calls the application's XmNconvertCallback procedures, if any. XmePrimarySource passes an XmConvertCallbackStruct (with the selection member set to PRIMARY) to each of these XmNconvertCallback procedures.
Calls the source widget's convertProc trait method. (convertProc is one of the trait methods of the XmQTtransfer trait.) However, if any XmNconvertCallback procedure returns XmCONVERT_DONE or XmCONVERT_REFUSE, then XmePrimarySource will not call convertProc.
XmePrimarySource also establishes a function that is called when the widget loses the selection. That function makes the following sequence of calls:
Calls the application's XmNconvertCallback procedures, if any. XmePrimarySource passes an XmConvertCallbackStruct to each of these XmNconvertCallback procedures. XmePrimarySource initializes the XmConvertCallbackStruct as follows:
Sets the selection member to PRIMARY
Sets the target member to _MOTIF_LOSE_SELECTION
Calls the source widget's convertProc trait method. However, if any XmNconvertCallback procedure returns XmCONVERT_DONE or XmCONVERT_REFUSE, then XmePrimarySource will not call convertProc.
widget | Specifies the widget that is to take ownership of the selection. | |
time | Specifies the time of the transfer. This is usually the timestamp from the event passed to an action routine. You should call XtLastTimeStampProcessed to generate the time value. If you set time to CurrentTime or 0, UTM will automatically change the call to XtLastTimeStampProcessed. |
This function returns False if the widget cannot take ownership of the primary selection. Otherwise, it returns True.
XmQTtransfer(3), XmTransferDone(3), XmTransferValue(3), XmeClipboardSink(3), XmeClipboardSource(3), XmeConvertMerge(3), XmeDragSource(3), XmeDropSink(3), XmeGetEncodingAtom(3), XmePrimarySink(3), XmeSecondarySink(3), XmeSecondarySource(3), XmeSecondaryTransfer(3), XmeStandardConvert(3), XmeStandardTargets(3), and XmeTransferAddDoneProc(3).