Skip to main content

Module dnd

Module dnd 

Enums§

DragPayload

Constants§

DRAG_START_THRESHOLD_PX
Threshold in logical pixels after which a pointer press-and-move is promoted to a drag gesture. Matches macOS / GTK conventions.
URI_LIST_MIME
The mime type a list of file:// URIs travels as.

Functions§

mime_for_path
The mime type to offer a file’s bytes under, from its extension.
set_drag_window
Publish the window a drag out of this app is issued on.
start_drag_offering
Start a drag carrying arbitrary offers (mime type → bytes).
start_file_drag
Start a drag carrying paths, out of this app and into whatever application the pointer is released over. Call from a press-and-move gesture once the pointer has travelled DRAG_START_THRESHOLD_PX while the button is still held, so the compositor can validate the drag against that implicit grab.
uri_list
The text/uri-list body for paths: one file:// URI per line, CRLF terminated as RFC 2483 wants, with the bytes a URI cannot carry verbatim percent-encoded. A path that is not absolute has no file URI and is left out.