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


XmeTransferAddDoneProc

A toolkit function that establishes a procedure to be called when data transfer is complete

Format

#include <Xm/TransferP.h>
void XmeTransferAddDoneProcXtPointer
transfer_idXmSelectionFinishedProc
done_proc

DESCRIPTION

XmeTransferAddDoneProc establishes a procedure to be called by the toolkit when a data transfer operation is complete. This routine can be called from an XmNdestinationCallback procedure or from any function called as a result, including the following:

  1. From the selection procedures called as a result of calls to XmTransferValue,

  2. From a destinationProc trait method; destinationProc is one of the trait methods of the XmQTtransfer trait.

    If more than one such procedure has been established for a given transfer operation, all procedures are called when the transfer operation is complete.

    The done_proc argument holds a function of type XmSelectionFinishedProc, which has the following definition:

    void (* XmSelectionFinishedProc)Widget
    widgetXtEnum
    operationXmTransferDoneCallbackStruct
    *call_data

    widget
    Specifies the widget that requested the conversion.

    operation
    Specifies the transfer operation. Possible values are XmMOVE, XmCOPY, XmLINK, and XmOTHER.

    call_data
    Specifies a pointer to an XmTransferDoneCallbackStruct structure containing information about the status of the transfer.

    XmTransferDoneCallbackStruct is defined as follows:

    typedef struct {
            int      reason;
            XEvent  * event;
            Atom     selection;
            XtPointer        transfer_id;
            XmTransferStatus         status;
            XtPointer        client_data;
    } XmTransferDoneCallbackStruct;

    reason
    Indicates why the callback was invoked.

    event
    Points to the XEvent that triggered the callback. It can be NULL.

    selection
    Indicates the selection being converted.

    transfer_id
    Specifies a unique indentifier for the data transfer operation.

    status
    Indicates whether or not the transfer completed successfully. Following are the possible values:

    XmTRANSFER_DONE_SUCCEED
    The transfer completed successfully.

    XmTRANSFER_DONE_FAIL
    The transfer did not complete successfully.

    client_data
    Specifies data to be passed to the callback procedure.

    The XmeTransferAddDoneProc routine takes the following arguments:

    transfer_id
    Specifies a unique indentifier for the data transfer operation. The value must be the same as the value of the transfer_id member of the XmDestinationCallbackStruct passed to the XmNdestinationCallback procedure or the destinationProc XmQTtransfer trait method.

    done_proc
    Specifies a procedure to be called when the data transfer is complete. The procedure is of type XmSelectionFinishedProc.

    RELATED

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


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