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


XmeDropSink

A toolkit function that establishes a widget as a drop site

Format

#include <Xm/TransferP.h>
void XmeDropSinkWidget
widgetArgList argsCardinal
arg_count

DESCRIPTION

XmeDropSink establishes a widget as a drop site for drag and drop operations. This routine calls XmDropSiteRegister with the widget specified in widget and the arguments specified in args. It overrides any setting of XmNdropProc in args.

This routine sets the DropSite's XmNdropProc to a function that initializes an XmDestinationCallbackStruct as follows:

  1. Sets the selection member to _MOTIF_DROP.

  2. Sets the operation member to the following value:

    1. XmCOPY, if the operation member of the XmDropProcCallbackStruct passed to the XmNdropProc is XmDROP_COPY and the dropAction member of the XmDropProcCallbackStruct is not XmDROP_HELP.

    2. XmMOVE, if the operation member of the XmDropProcCallbackStruct passed to the XmNdropProc is XmDROP_MOVE and the dropAction member of the XmDropProcCallbackStruct is not XmDROP_HELP.

    3. XmLINK, if the operation member of the XmDropProcCallbackStruct passed to the XmNdropProc is XmDROP_LINK and the dropAction member of the XmDropProcCallbackStruct is not XmDROP_HELP.

    4. XmOTHER, if the operation member of the XmDropProcCallbackStruct passed to the XmNdropProc is XmDROP_NOOP or if the dropAction member of the XmDropProcCallbackStruct is XmDROP_HELP.

    5. Sets the destination_data member to a pointer to the XmDropProcCallbackStruct passed to the XmNdropProc.

    6. Sets the time member to the timeStamp member of the XmDropProcCallbackStruct passed to the XmNdropProc.

      XmeDropSink 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. XmeDropSink 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.

        widget
        Specifies the widget that is the drop site.

        args
        Specifies arguments to be passed to XmDropSiteRegister.

        arg_count
        Specifies the number of arguments in args.

        RELATED

        XmQTtransfer(3), XmTransferDone(3), XmTransferValue(3), XmeClipboardSink(3), XmeClipboardSource(3), XmeConvertMerge(3), XmeDragSource(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 ]