#include <Xm/DragDrop.h>
#include "bitmap.h"

extern Boolean export_bitmap();

void 
drag_bitmap(w, bitmap, event)
	Widget          w;
	Bitmap_p        bitmap;
	XEvent         *event;
{
	Widget          drag_context;
	Arg             al[10];
	int             ac = 0;
	Atom            export_targets[2];

	/* Extra target XA_PIXMAP */
	export_targets[0] = XA_STRING;
	export_targets[1] = XA_PIXMAP;

	XtSetArg (al[ac], XmNconvertProc, export_bitmap); ac++;
	XtSetArg (al[ac], XmNclientData, bitmap); ac++;
	XtSetArg (al[ac], XmNexportTargets, export_targets); ac++;
	XtSetArg (al[ac], XmNnumExportTargets, 2); ac++;
	XtSetArg (al[ac], XmNdragOperations, XmDROP_COPY); ac++;
	drag_context = XmDragStart (w, event, al, ac);
}
