Skip to main content

Module file_open

Module file_open 

Expand description

FileOpenSurface: how an app that opens files invites one, and opens a file dropped anywhere on its window.

Feed window events through FileOpenSurface::handle_event before the app’s own controls see them, and paint the app’s empty state through FileOpenSurface::paint. A drop opens wherever it lands: it does not depend on the pointer position or on a preceding hover (Wayland may deliver the path only when the transfer finishes). While a file hovers the window, the empty state becomes a lit DropZoneFace.

Opening stays the app’s: a dropped path goes to the same importer as its Open action and file chooser, which reports a file it cannot read. The surface reads nothing and grants no access.

Structs§

FileOpenSurface
Window-wide file drops and the “open a file” empty state. See the module docs.

Enums§

FileOpenEvent
A file event the surface took.