Macaw OS C reference

Function startdrag

#include <macawui.h>
void startdrag(const char **paths, int n, const char *label);

Starts dragging files out of your window, to Files, the Trash, the desktop or another program. Call it while the mouse button is down: they're dropped where it's let go.

Parameters

pathsconst char **
An array of n paths, each from your program's folder unless it starts with /.
nint
How many paths there are.
labelconst char *
The text shown by the pointer while dragging. NULL for the first file's name.

In Drag and drop, with ondrop, canpickfiles, pickfiles, putondesktop.