[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Widget Writer's Guide


XmeClipboardSink

A toolkit function that transfers data from the clipboard to a widget

Format

#include <Xm/Xm.h>
Boolean XmeClipboardSinkWidget
widgetXtEnum opXtPointer
location_data

DESCRIPTION

XmeClipboardSink transfers data from the clipboard to a widget.

This routine initializes an XmDestinationCallbackStruct as follows:

  1. Sets the selection member to CLIPBOARD

  2. Sets the operation member to the value of the op argument

  3. Sets the location_data member to the value of the location_data argument

    The routine then makes the following sequence of calls:

    1. Calls the destination widget's destinationPreHookProc trait method, if any. destinationPreHookProc is one of the trait methods of the XmQTtransfer trait. XmeClipboardSink passes the initialized XmDestinationCallbackStruct as the call_data argument.

    2. Calls any XmNdestinationCallback procedures that the application has attached to the destination widget.

    3. Calls the destination widget's destinationProc trait method, if any, after all transfers initiated by XmNdestinationCallback procedures have finished. However, if an XmNdestinationCallback procedure has called XmTransferDone with a status of XmTRANSFER_DONE_DEFAULT, XmePrimarySink does not call the destinationProc trait method.

      It is the responsibility of the XmNdestinationCallback procedures and the destinationProc trait method to transfer any data to the widget.

      widget
      Specifies the widget that is the destination for the data.

      op
      Specifies the transfer operation. Possible values are XmCOPY and XmLINK.

      location_data
      Specifies information about the location where data is to be transferred. If the value is NULL, the data is to be inserted at the widget's cursor position. If location_data cannot fit inside an XtPointer, location_data must either be a static variable or be allocated. If location_data is allocated, a call must be made to XmeTransferAddDoneProc to establish a procedure to free the allocated memory. The value of location_data is only valid for the duration of a transfer. Once the transfer done procedures start to be called, location_data will no longer be stable.

      RETURN

      This function returns False if no transfers take place. Otherwise, it returns True.

      RELATED

      XmQTtransfer(3), XmTransferDone(3), XmTransferValue(3), XmeClipboardSource(3), XmeConvertMerge(3), XmeDragSource(3), XmeDropSink(3), XmeGetEncodingAtom(3), XmePrimarySink(3), XmePrimarySource(3), XmeSecondarySink(3), XmeSecondarySource(3), XmeSecondaryTransfer(3), XmeStandardConvert(3), XmeStandardTargets(3), and XmeTransferAddDoneProc(3).


    4. [ Previous | Next | Contents | Glossary | Home | Search ]