glfw/glfw — pull request #186 by arturoc (2013-12-04 13:24:57+00:00)
Title: Basic support for drag & drop

This adds basic support for drag and drop. Right now on windows and osx it only supports drag and drop of files, in linux it works the same for every type so it supports anything. The syntax of the callback is very similar to how the clipboard one works.

There could be a function that allows to set the supported types but this is really platform specific so a general implementation could be kind of complex

The window always has the drag and drop property as it is now, there could be a function that enables this explicitly or it could be enabled only when the callback is set.

To use it set a drag and drop callback function using glfwSetDropCallback(GLFWwindow* window, GLFWdropfun cbfun); which receives a string with the path to the file being dropped

Another possible enhancement would be to add a boolean value to the callback so it can return true or false depending if the drop event was attended or not which should show a different visual feedback.