Skip to content
Lukas Dürrenberger edited this page Aug 5, 2021 · 2 revisions

Links

Current Situation

SFML has currently no built-in way to handle file drop events/requests, as such they are simply ignored.

On Windows file drop requests are initiated through the normal event pump, this makes it quite difficult for an external library/user code to implement this on their own. There are ways to work around it, but it's not very pretty.

Since it is a feature that is being requested every now and then, and the integration isn't easily possible, this solution design should help to look at the existing options, possible implementations, and the best way to integrate it into SFML.

Target Situation

Rationale

Why do we need this? What are the advantages? What are limitations does this introduce? Does this align with the principles of SFML?

OS APIs

Windows

  • DragAcceptFiles(...)
  • DragQueryFile(...)
  • DragQueryPoint(...)
  • DragFinish(...)
  • Event WM_DROPFILES

See also: Win32 API approach to Windows Drag-and-Drop

Linux

See also: Drag-and-Drop Protocol for the X Window System

macOS

API Design

Clone this wiki locally