Handling File Drag & Drop in simple XLIB or OpenGL App (C++)
Can anyone point me in the right direction for allowing my application to be able to receive a file dragged onto it from a the desktop or a file browser.
I need to know the following ...
1) That a file has been dropped (obviously)
2) The path and filename of the file(s)
3) If possible, the screen/window co-ordinates of where the file(s) were dropped
* Application is written in C++, on Linux, and I'm using the Gnome desktop, but want to support other desktops as well.
* Application is either OpenGL, or just displaying a bitmap, where the bitmap occupies the entire window.
* It would be beneficial to avoid the use of other libraries designed to manage buttons, and other GUI controls, since my application is drawing and managing it's own controls.
Later on, I would also like to allow the user to drag a file out of my application onto the desktop, or a file browser, but this is not critical for now.
Any help on this would be greatly appreciated (I mostly need to receive file drops, but any information on dragging files out would also be helpful).
- Stephen Fraser