Skip to Main Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced content levelIntermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
Arg args[10];
int n;
Widget label;
Atom importList[1];
void HandleDrop();
...
n = 0;
importList[0] = COMPOUND_TEXT;
XtSetArg (args[n], XmNimportTargets, importList); n++;
XtSetArg (args[n], XmNnumImportTargets, XtNumber (importList)); n++;
XtSetArg (args[n], XmNdropSiteOperations, XmDROP_COPY); n++;
XtSetArg (args[n], XmNdropProc, HandleDrop); n++;
XmDropSiteRegister (label, args, n);
When a drop occurs in the drop site, the XmN-dropProc is called automatically by the Motif toolkit. This routine
must call XmDropTransferStart() whether or not the drop is -successful. XmDropTransferStart()
creates a DropTransfer object that maintains information about the data transfer. When The DropTransfer object is
created, the XmN-transferStatus resource must be set to indicate the success or failure of the drop. If the
resource is set to XmTRANSFER_FAILURE, XmDropTransferStart() does not transfer any data and merely
cleans up after the drag and drop transfer.
If XmN-transferStatus is set to XmTRANSFER_SUCCESS when the DropTransfer object is created, some other
resources must also be specified to cause the data to be transferred. The XmN-dropTransfers and
XmN-numDropTransfers resources specify the data targets to be processed, while XmN-transferProc
indicates the procedure that receives the converted data from the drag source. This procedure is of type
XtSelectionCallbackProc. Once the data transfer has started, XmDropTransferAdd() can be used to
request the processing of additional data targets. In ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431