Macaw OS C reference

Function ondrop

#include <macawui.h>
void ondrop(void (*fn)(const char **paths, int n, int x, int y));

Sets a function to call when files are dropped on your window, from Files or the computer. It takes the place of a _drop function.

Parameters

fnvoid (*)(const char **paths, int n, int x, int y)
Your function. It gets an array of n whole paths, and where they were dropped in the window, in pixels (-1, -1 for files from pickfiles). NULL stops it.

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