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


XmeConvertMerge

A toolkit function that merges data converted during a transfer operation

Format

#include <Xm/Xm.h>
void XmeConvertMergeXtPointer
dataAtom typeint
formatunsigned long
lengthXmConvertCallbackStruct
*call_data

DESCRIPTION

XmeConvertMerge merges data converted in the course of a transfer operation. The data to be merged is typically two list of targets. An XmNconvertCallback procedure in an application may supply some elements of the list, and the convertProc trait method of a widget may supply others. Therefore, the convertProc trait method will need to call XmeConvertMerge to merge the two target lists.

XmeConvertMerge can only be called from an XmNconvertCallback procedure or from a convertProc trait method.

A convertProc trait method usually calls XmeConvertMerge when an XmNconvertCallback procedure returns an XmConvertCallbackStruct structure containing a status of XmCONVERT_MERGE.

XmeConvertMerge uses XtRealloc to increase the allocated storage for the value member of the XmConvertCallbackStruct passed in the call_data argument. It then appends data to the data already present in the value member. The type and format passed as arguments to XmeConvertMerge must match the type and format fields passed in the XmConvertCallbackStruct.

data
Specifies the data to be added to the value member of the callback struct.

type
Indicates the type of data.

format
Specifies how the call should interpret data. You must specify 8, 16, or 32. A value of 8 implies that data is an array of char. A value of 16 implies that data is an array of short. A value of 32 implies that data is an array of long. It is possible that the specified number may not match the actual number of bits passed in data. For example, a value of 32 may actually correspond to a 64-bit data structure on some machines.

length
Specifies the number of elements in data, where each element has the number of bits specified by format.

call_data
Specifies a pointer to the XmConvertCallbackStruct that is to be modified.

RELATED

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


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